/* hellhed.com — one stylesheet for everything */
:root {
  --paper: #e9e9e9;          /* matches the paper in the drawings */
  --ink: #111;
  --faint: #555;
  --type: "Courier Prime", "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--type);
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 4px; }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--ink); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the box every inner page lives in ---------- */
.frame {
  position: relative;
  max-width: 1100px;
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 56px 64px 40px;
  border: 3px solid var(--ink);
  border-radius: 3px 6px 2px 5px / 5px 2px 6px 3px;   /* a little wonky, like a hand-drawn box */
  display: flex;
  flex-direction: column;
}
.foot {
  margin-top: auto;
  padding-top: 48px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 19px;
}
.foot a { text-decoration-thickness: 3px; }

h1, h2 { font-weight: 400; letter-spacing: .02em; }
h1 { font-size: 30px; margin: 0 0 12px; }
header p { margin: 0; color: var(--faint); }

/* ---------- section hubs (music, words) ---------- */
.hub { justify-content: center; }
.hub > .head, .hub > .links { align-self: center; }
.hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-rows: 1fr auto;
  column-gap: 48px;
  align-items: center;
}
.hub .head { margin: 0; grid-column: 1; grid-row: 1; }
.hub .links { grid-column: 2; grid-row: 1; }
.hub.flip .head { grid-column: 2; }
.hub.flip .links { grid-column: 1; }
.hub .foot { grid-column: 1 / -1; grid-row: 2; }
.hub .head img { display: block; width: 100%; max-width: 520px; margin: 0 auto; }
.hub .item { margin: 0 0 44px; }
.hub .item:last-child { margin-bottom: 0; }
.hub h2 { font-size: 30px; margin: 0 0 14px; line-height: 1.2; }
.hub h2 a { text-decoration: none; border-bottom: 4px solid var(--ink); padding-bottom: 2px; }
.hub h2 a:hover { border-bottom-width: 7px; }
.hub .item p { margin: 0; font-size: 19px; line-height: 1.75; }

/* ---------- small head in the corner of inner pages ---------- */
.mini { position: absolute; top: 18px; right: 22px; width: 104px; line-height: 0; transition: transform .15s; }
.mini img { width: 100%; }
.mini:hover { transform: rotate(-4deg) scale(1.05); }

/* ---------- lists ---------- */
.list header { margin-bottom: 36px; padding-right: 120px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin: 0 0 6px; }
ul.big li { font-size: 20px; margin-bottom: 10px; }
.cols { columns: 2 300px; column-gap: 48px; }
.cols section { break-inside: avoid; margin-bottom: 28px; }
.cols h2 { font-size: 20px; margin: 0 0 8px; border-bottom: 2px solid var(--ink); display: inline-block; }

/* my songs */
.tracks { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.tracks li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px dashed #999;
}
.songtitle { font-size: 20px; }
.lyr { font-size: 15px; margin-left: 10px; }
.player { display: flex; align-items: center; gap: 12px; }
.player audio { width: 300px; max-width: 70vw; height: 36px; }
.dl { font-size: 14px; }
.nomp3 { color: var(--faint); font-size: 15px; }

/* ---------- drawings ---------- */
.drawhead { display: flex; align-items: center; gap: 32px; margin-bottom: 32px; }
.drawhead .head { margin: 0; flex: 0 0 340px; }
.drawhead .head img { display: block; width: 100%; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px; }
.grid a { display: block; text-decoration: none; }
.grid img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #fff;
  border: 2px solid var(--ink); filter: grayscale(.15); transition: transform .15s;
}
.grid a:hover img { transform: rotate(-1.5deg) scale(1.02); }
.grid span { display: block; margin-top: 8px; font-size: 16px; line-height: 1.35; }
.grid a:hover span { text-decoration: underline; text-decoration-thickness: 2px; }
.grid i { font-style: normal; color: var(--faint); }

/* ---------- reading pages ---------- */
.leaf .text { max-width: 720px; padding-right: 110px; overflow-wrap: anywhere; }
.leaf .text p { margin: 0 0 1.1em; }
.leaf .text b:first-child, .leaf .text strong:first-child { font-size: 22px; }
.leaf.sketch .text, .leaf.mom .text, .leaf.scream .text, .leaf.notfound .text { padding-right: 0; }
.leaf.sketch .text { max-width: none; }
.leaf.sketch .text img { display: block; margin: 0 auto 24px; max-height: 80vh; width: auto; border: 2px solid var(--ink); background: #fff; }
.leaf.sketch .text { text-align: center; }
.leaf.sketch .text > * { text-align: left; max-width: 720px; margin-left: auto; margin-right: auto; }
.leaf.sketch .text > img, .leaf.sketch .text > p:has(img) { max-width: none; }
.leaf.essay .text { max-width: 760px; }
.toc ul { padding-left: 1.3em; }
.figtop { margin: 0 0 24px; }
.figtop img { display: block; width: 360px; max-width: 100%; }

/* ---------- scream on my hed ---------- */
.scream-form { max-width: 620px; display: grid; gap: 20px; margin-top: 8px; }
.scream-form label { display: grid; gap: 6px; font-size: 17px; }
.scream-form input, .scream-form textarea {
  font: inherit; color: var(--ink); background: #f4f4f4;
  border: 2px solid var(--ink); border-radius: 2px; padding: 10px 12px; width: 100%;
}
.scream-form textarea { resize: vertical; }
.scream-form button {
  justify-self: start; font: inherit; font-size: 20px; color: var(--paper); background: var(--ink);
  border: 2px solid var(--ink); padding: 10px 22px; cursor: pointer; border-radius: 2px;
}
.scream-form button:hover { background: var(--paper); color: var(--ink); }
.scream-form button:disabled { opacity: .6; cursor: wait; }
.scream-form .trap { position: absolute; left: -9999px; }
.status { margin: 0; min-height: 1.6em; }
.thanks { font-size: 20px; }

/* ---------- home ---------- */
.homepage { min-height: 100vh; display: flex; }
.home { margin: auto; padding: 12px 16px 20px; width: 100%; }
.stage {
  position: relative; margin: 0 auto;
  width: min(100%, calc((100vh - 40px) * 1706 / 960));
  min-width: min(100%, 560px);
}
.drawing { display: block; width: 100%; height: auto; }
.hot { position: absolute; inset: 0; width: 100%; height: 100%; }
.spot polygon { fill: transparent; cursor: pointer; }
.spot:focus { outline: none; }
.spot:focus-visible polygon { stroke: var(--ink); stroke-width: 4; stroke-dasharray: 14 10; }
.stage:has(.spot[href="music.html"]:hover) .t-music,
.stage:has(.spot[href="artfrites.html"]:hover) .t-drawings,
.stage:has(.spot[href="words.html"]:hover) .t-words,
.stage:has(.spot[href="hhyomama.html"]:hover) .t-mom,
.stage:has(.spot[href="scream.html"]:hover) .t-you { opacity: 1; }
.tag {
  position: absolute; transform: translate(-50%, 0) rotate(-3deg);
  background: var(--paper); border: 2px solid var(--ink); padding: 2px 10px;
  font-size: clamp(13px, 1.6vw, 22px); white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.tag.on { opacity: 1; }
.t-music    { left: 22%; top: 2%; }
.t-drawings { left: 78%; top: 2%; }
.t-words    { left: 49%; top: 21%; }
.t-mom      { left: 21%; top: 66%; }
.t-you      { left: 82%; top: 58%; }
.homenav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 28px;
  margin-top: 14px; font-size: 18px;
}

/* ---------- phones / small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .frame { margin: 10px; min-height: calc(100vh - 20px); padding: 28px 18px 24px; }
  .hub { display: flex; flex-direction: column; justify-content: flex-start; }
  .hub .head img { max-width: 300px; }
  .hub .head { margin-bottom: 28px; }
  .hub.flip .head { order: -1; }
  .hub h2 { font-size: 25px; }
  .hub .item p { font-size: 16px; }
  .mini { width: 64px; top: 10px; right: 10px; }
  .list header { padding-right: 70px; }
  .leaf .text { padding-right: 0; }
  .leaf:not(.sketch):not(.mom):not(.scream):not(.notfound):not(.book) .text { padding-top: 46px; }
  .drawhead { flex-direction: column; align-items: flex-start; gap: 12px; }
  .drawhead .head { flex-basis: auto; width: 260px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .grid span { font-size: 14px; }
  .player audio { width: 230px; }
  .stage { min-width: 0; }
  .homenav { font-size: 17px; gap: 8px 20px; }
}

/* ---------- connected (the book) ---------- */
.book .chaphead { margin-bottom: 28px; padding-right: 120px; }
.book .kicker { margin: 0 0 6px; color: var(--faint); font-size: 15px; letter-spacing: .04em; }
.book .kicker a { color: var(--faint); text-decoration-thickness: 1px; }
.book .chaphead h1 { margin: 0; line-height: 1.25; }
.book .text { max-width: 740px; }
.book .text h2 { font-size: 22px; margin: 1.8em 0 .5em; line-height: 1.3; }
.book .text ol, .book .text ul { padding-left: 1.6em; margin: 0 0 1.1em; }
.book .text li { margin-bottom: .4em; }
.book .text blockquote { margin: 0 0 1.1em; padding: 2px 0 2px 20px; border-left: 3px solid var(--ink); }
.book .text blockquote p { margin: 0; }
.book .poem p { margin: 0 0 1.4em; }
sup.fn { line-height: 0; font-size: 12px; }
sup.fn a { text-decoration: none; padding: 0 2px; }
sup.fn a:hover { text-decoration: underline; }
:target { scroll-margin-top: 24px; }
li:target, sup.fn a:target { background: #d6d6d6; }
.bookfig { margin: 28px auto 32px; text-align: center; }
.bookfig img { width: 300px; max-width: 100%; }
.notes { margin-top: 44px; padding-top: 14px; border-top: 2px dashed #999; font-size: 14px; line-height: 1.5; }
.book .text .notes h2 { font-size: 17px; margin: 0 0 10px; }
.notes ol { padding-left: 2.4em; }
.notes li { margin-bottom: 8px; overflow-wrap: anywhere; }
.notes a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.notes .backref { text-decoration: none; }
.chapnav { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; max-width: 740px; }
.chapnav a {
  flex: 1 1 0; display: block; text-decoration: none; padding: 10px 14px;
  border: 2px solid var(--ink); border-radius: 2px 5px 3px 4px / 4px 2px 5px 3px; line-height: 1.35;
}
.chapnav a:hover { background: #dcdcdc; }
.chapnav .next { text-align: right; }
.chapnav span { display: block; font-size: 14px; color: var(--faint); margin-bottom: 2px; }
.booktoc .titlepage { text-align: center; margin: 0 auto 40px; padding: 0 110px; }
.booktoc .cover { display: block; width: 130px; margin: 0 auto 18px; }
.booktoc .titlepage h1 { font-size: 40px; letter-spacing: .3em; margin: 0 0 6px; padding-left: .3em; }
.booktoc .sub { margin: 0 0 14px; font-size: 18px; color: var(--ink); }
.booktoc .by { margin: 0; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.booktoc .toc { max-width: 640px; margin: 0 auto; width: 100%; }
.toc .parts > li { margin-bottom: 26px; }
.toc .inv { font-size: 19px; }
.toc .part h2 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; color: var(--faint); }
.toc .part li { font-size: 18px; margin-bottom: 6px; }
.toc .num { display: inline-block; min-width: 2.2em; color: var(--faint); }
.toc .part a { text-decoration: none; }
.toc .part a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .book .chaphead { padding-right: 70px; }
  .booktoc .titlepage { padding: 40px 0 0; }
  .booktoc .titlepage h1 { font-size: 30px; }
  .chapnav { flex-direction: column; gap: 12px; }
  .chapnav .next { text-align: left; }
  .bookfig img { width: 240px; }
}
