@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #0e0e0c;
  --ink: #f0ebe0;
  --dim: #a9a396;
  --line: #2f2d28;
  --accent: #ff5b2e;
  --gut: clamp(1.25rem, 3.6vw, 3.5rem);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "DM Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; font: 400 1.1875rem/1.55 var(--serif); font-optical-sizing: auto; overflow-wrap: break-word; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--accent); transition: color .2s; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
em { font-style: italic; }

.mono, .kicker, .sec-label h2, .nw, .nr, .part-label, .foot-cols, .top nav, .reroll, .skip, .wrong .mono {
  font-family: var(--mono); font-size: .8125rem; line-height: 1.5; letter-spacing: .01em; font-weight: 400;
}
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.unconfirmed { text-decoration: underline wavy #ffd400; }

.skip { position: absolute; left: var(--gut); top: -4rem; background: var(--accent); color: var(--bg); padding: .5rem .75rem; z-index: 10; }
.skip:focus { top: .5rem; color: var(--bg); }

/* Top bar */
.top { display: flex; justify-content: space-between; align-items: baseline; padding: 1.25rem var(--gut); }
.brand { font-size: 1.5rem; font-style: italic; text-decoration: none; line-height: 1; padding: .5rem 0; }
.top nav { display: flex; gap: 1.5rem; }
.top nav a { text-decoration: none; padding: .75rem 0; color: var(--dim); }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--accent); }

/* Hero */
.avatar { margin: 0; min-width: 0; }
.avatar img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.avatar figcaption { margin-top: .7rem; font: 400 .6875rem/1.6 var(--mono); color: var(--dim); }
.hero-intro { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); align-items: center; gap: var(--gut); margin-top: 1.5rem; }
.hero .hero-intro h1 { margin-top: 0; font-size: clamp(2.875rem, 7.1vw, 8rem); }
.hero-avatar { align-self: center; }
.page-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: clamp(1.5rem, 5vw, 5rem); padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.page-head .page-intro p.lede { margin: 0; padding-bottom: 0; }
.note-avatar { max-width: 42rem; margin-top: 2rem; }
.hero { padding: clamp(2.5rem, 7vw, 6.5rem) var(--gut) 0; }
.kicker { color: var(--dim); }
.kicker a { color: inherit; }
.hero h1 {
  margin-top: 1.5rem;
  font-weight: 300; font-size: clamp(2.875rem, 11.1vw, 12rem); line-height: .96; letter-spacing: -.035em;
  font-variation-settings: "opsz" 72;
}
.hero h1 em { color: var(--accent); font-weight: 300; letter-spacing: -.02em; }
.ln { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.ln > span { display: block; animation: rise .9s var(--ease) both; }
.ln:nth-child(2) > span { animation-delay: .07s; }
.ln:nth-child(3) > span { animation-delay: .14s; }
.ln:nth-child(4) > span { animation-delay: .21s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }

.hero-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem var(--gut); margin-top: clamp(2.5rem, 6vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 6rem); animation: fade .8s .45s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lede { font-size: clamp(1.3125rem, 1.9vw, 1.75rem); line-height: 1.32; letter-spacing: -.005em; }
.hero-foot .lede { grid-column: 4 / span 5; }
.mood { grid-column: 9 / span 4; border-top: 1px solid var(--line); padding-top: .75rem; }
.mood-label { color: var(--dim); }
.mood-now { font-size: 1.625rem; line-height: 1.15; font-style: italic; margin: .5rem 0 .75rem; min-height: 2.3em; color: var(--accent); }
.mood-now.swap { animation: fade .35s ease both; }
.reroll { background: none; color: var(--ink); border: 1px solid var(--line); padding: .55rem 1rem; cursor: pointer; transition: border-color .2s, color .2s; }
.reroll:hover { border-color: var(--accent); color: var(--accent); }
.mood-note { color: var(--dim); font-size: 1rem; line-height: 1.4; margin-top: .85rem; }

/* Sections */
.sec { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem var(--gut); padding: clamp(2.25rem, 5vw, 4.5rem) var(--gut); }
.sec::before { content: ""; position: absolute; left: var(--gut); right: var(--gut); top: 0; height: 1px; background: var(--line); transform-origin: left; }
.sec-label { grid-column: 1 / span 3; }
.sec-label p { color: var(--dim); font-size: 1rem; line-height: 1.4; margin-top: .75rem; }
.sec-body { grid-column: 4 / -1; min-width: 0; }
.prose { max-width: 40rem; }
.prose p + p { margin-top: 1em; }
.big { font-size: clamp(1.625rem, 3vw, 2.625rem); line-height: 1.14; letter-spacing: -.015em; font-weight: 350; margin-bottom: .5em; }
.go { font-size: 1.3125rem; font-style: italic; }
.go::after { content: " \2192"; font-style: normal; display: inline-block; transition: transform .25s var(--ease); margin-left: .15em; }
.go:hover::after { transform: translateX(.3em); }

.facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .25rem var(--gut); padding: .8rem 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-family: var(--mono); font-size: .8125rem; line-height: 1.9; color: var(--dim); }
.facts dd { font-size: 1.3125rem; line-height: 1.3; }
.facts-wide dt { font-family: var(--serif); font-size: 1.3125rem; line-height: 1.3; color: var(--ink); font-style: italic; }
.facts-wide dd { font-size: 1.1875rem; line-height: 1.45; color: var(--ink); }

.opinions { counter-reset: op; }
.opinions li { font-size: clamp(1.5rem, 3.2vw, 2.75rem); line-height: 1.12; letter-spacing: -.015em; font-weight: 350; padding: 1.1rem 0; border-top: 1px solid var(--line); max-width: 24em; }
.opinions li:first-child { border-top: 0; padding-top: 0; }

/* Note rows */
.note-row { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 5.75rem; gap: .2rem 1rem; padding: 1rem 0 1.15rem; border-top: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.notes li:first-child .note-row { border-top: 0; padding-top: 0; }
.nr, .nw { color: var(--dim); }
.nw { text-align: right; grid-column: 3; grid-row: 1; }
.nt { grid-column: 2; grid-row: 1; font-size: clamp(1.625rem, 3vw, 2.625rem); line-height: 1.08; letter-spacing: -.02em; font-weight: 350; transition: transform .35s var(--ease), color .2s; }
.nd { grid-column: 2 / -1; grid-row: 2; color: var(--dim); font-size: 1.0625rem; line-height: 1.35; max-width: 38rem; }
.note-row:hover { color: inherit; }
.note-row:hover .nt { color: var(--accent); font-style: italic; transform: translateX(.35rem); }
.index { padding: clamp(1.5rem, 3vw, 2.5rem) var(--gut) clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); margin-top: clamp(2.5rem, 5vw, 4rem); }

/* Page heads */
.page-head { padding: clamp(2.5rem, 7vw, 6rem) var(--gut) 0; }
.page-head h1 { margin: 1.25rem 0 clamp(1.25rem, 3vw, 2.5rem); font-weight: 300; font-size: clamp(3.25rem, 11vw, 11.5rem); line-height: .96; letter-spacing: -.035em; font-variation-settings: "opsz" 72; }
.page-head .lede { max-width: 42rem; margin-left: auto; margin-right: 0; padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.page-head:has(+ .index) .lede { padding-bottom: 0; }
.lost { min-height: 52vh; }

/* A note */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; z-index: 5; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: none; } }
}
.note { padding: clamp(2.5rem, 6vw, 5rem) var(--gut) clamp(2rem, 4vw, 3rem); }
.note-head { max-width: 72rem; }
.note-head h1 { margin: 1.25rem 0 1rem; font-weight: 300; font-size: clamp(2.75rem, 7.8vw, 7.5rem); line-height: .98; letter-spacing: -.03em; font-variation-settings: "opsz" 72; }
.deck { font-size: clamp(1.3125rem, 2.1vw, 1.875rem); line-height: 1.25; font-style: italic; color: var(--dim); max-width: 38rem; }
.note-body { margin-top: clamp(2.25rem, 5vw, 4.5rem); font-size: clamp(1.1875rem, 1.45vw, 1.3125rem); line-height: 1.55; }
.note-body .row { display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 15rem); gap: 0 clamp(2rem, 5vw, 5rem); margin-bottom: 1.05em; }
.note-body .row > p:first-child { grid-column: 1; }
.sn { grid-column: 2; font-size: 1rem; line-height: 1.4; color: var(--dim); border-left: 1px solid var(--accent); padding-left: .85rem; margin-top: .3rem; align-self: start; }
.pull { font-size: clamp(1.75rem, 3.8vw, 3.25rem); line-height: 1.08; letter-spacing: -.02em; font-style: italic; font-weight: 350; color: var(--accent); margin: 1.1em 0; max-width: 20em; }

.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gut); margin: 0 var(--gut) clamp(2rem, 4vw, 3rem); padding-top: 1.25rem; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; }
.pager .next { text-align: right; }
.pager .mono { color: var(--dim); }
.pt { font-size: clamp(1.25rem, 2.2vw, 1.875rem); line-height: 1.12; letter-spacing: -.01em; }

/* Flow */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.flow li { border-top: 2px solid var(--line); padding-top: .75rem; line-height: 1.25; font-size: 1.125rem; animation: pulse 9s linear infinite; }
.flow li .mono { display: inline; color: var(--dim); font-size: .9375rem; }
.flow li:nth-child(2) { animation-delay: 1.2s; }
.flow li:nth-child(3) { animation-delay: 2.4s; }
.flow li:nth-child(4) { animation-delay: 3.6s; }
.flow li:nth-child(5) { animation-delay: 4.8s; }
@keyframes pulse { 0%, 13%, 100% { border-color: var(--line); } 3%, 9% { border-color: var(--accent); } }
.flow-sub { color: var(--dim); margin: 2.25rem 0 .9rem calc(40% + .3rem); }
.flow-b { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-left: calc(40% + .3rem); }
.flow-b li { animation-delay: 5.6s; }
.flow-b li:nth-child(2) { animation-delay: 6.5s; }
.flow-b li:nth-child(3) { animation-delay: 7.4s; }
.flow-mem { margin-top: 2.25rem; padding: .85rem 1rem; border: 1px dashed var(--line); font-size: 1.125rem; }

/* Parts */
.part { padding: 1.6rem 0 1.75rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem var(--gut); scroll-margin-top: 1rem; }
.part:first-child { border-top: 0; padding-top: 0; }
.part h3 { grid-column: 1 / -1; font-weight: inherit; }
.part-label { display: block; color: var(--dim); margin-bottom: .3rem; }
.part-name { display: block; font-size: clamp(1.625rem, 3vw, 2.625rem); line-height: 1.08; letter-spacing: -.02em; font-weight: 350; }
.wrong { color: var(--dim); }
.wrong .mono { display: block; color: var(--accent); margin-bottom: .3rem; }
.part:target .part-name { color: var(--accent); }

/* Footer */
.foot { padding: clamp(2.5rem, 6vw, 5rem) var(--gut) 1.75rem; border-top: 1px solid var(--line); }
.foot-big { font-size: clamp(2rem, 6.4vw, 6.5rem); line-height: 1; letter-spacing: -.03em; font-weight: 300; font-style: italic; }
.foot-cols { display: flex; justify-content: space-between; gap: 1rem 3rem; flex-wrap: wrap; margin-top: clamp(1.75rem, 4vw, 3.5rem); color: var(--dim); }
.foot-cols p:first-child { max-width: 34rem; }
.foot-cols a { display: inline-block; padding: .35rem 0; margin-left: 1.1rem; }
.foot-cols a:first-child { margin-left: 0; }

/* Section rules draw themselves as they arrive */
@supports (animation-timeline: view()) {
  .sec::before { animation: draw linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  @keyframes draw { from { transform: scaleX(0); } to { transform: none; } }
}

@media (max-width: 1100px) {
  .hero-foot .lede { grid-column: 1 / span 7; }
  .mood { grid-column: 8 / -1; }
  .note-body .row { grid-template-columns: minmax(0, 36rem); }
  .sn { grid-column: 1; margin: 1em 0 .4em; max-width: 30rem; }
  .sec-label { grid-column: 1 / span 3; }
}

@media (max-width: 820px) {
  .hero-intro, .page-intro { grid-template-columns: minmax(0, 1fr); }
  .hero .hero-intro h1 { font-size: clamp(2.875rem, 11.1vw, 6rem); }
  .hero-avatar { max-width: 25rem; width: 100%; margin: 1rem 0 0 auto; }
  .page-intro .avatar { max-width: 34rem; }
  .hero-foot { display: block; }
  .mood { margin-top: 2.5rem; }
  .sec { display: block; }
  .sec-label { margin-bottom: 1.5rem; }
  .sec-label h2 { color: var(--ink); }
  .part { grid-template-columns: minmax(0, 1fr); }
  .flow, .flow-b { grid-template-columns: minmax(0, 1fr); margin-left: 0; gap: 0; }
  .flow li { border-top: 0; border-left: 2px solid var(--line); padding: .6rem 0 .6rem .9rem; }
  .flow-sub { margin-left: 0; }
  @keyframes pulse { 0%, 13%, 100% { border-color: var(--line); } 3%, 9% { border-color: var(--accent); } }
  .facts > div { grid-template-columns: minmax(0, 1fr); }
  .facts dt { line-height: 1.5; }
}

@media (max-width: 480px) {
  .note-row { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .nw { grid-column: 2; grid-row: 3; text-align: left; margin-top: .2rem; }
  .nd { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .progress { display: none; }
}

@media print {
  html { background: #fff; color: #000; }
  .top nav, .reroll, .progress, .skip { display: none; }
}
