/* C · Margin notes. A report on paper: Noticia Text for everything read, T26 Carbon (the site's
   "telex" face) only for small metadata at one size and weight, Abolition for the masthead.
   Purple Heart Kiwi is the one accent. No cards, no lines: space and tone carry the structure. */
:root {
  --paper: #F5F4F1;
  --tone: rgb(28 25 23 / .045);
  --tone-2: rgb(28 25 23 / .08);
  --ink: #1C1917;
  --ink-2: rgb(28 25 23 / .74);
  --ink-3: rgb(28 25 23 / .64);
  --accent: #86198F;
  --accent-wash: rgb(134 25 143 / .09);
  --serif: "Noticia Text", Georgia, serif;
  --telex: "t26-carbon", ui-monospace, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html.locked body { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--serif); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.telex { font: 400 12px/1.4 var(--telex); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.page { max-width: 940px; margin: 0 auto; padding: 56px 32px 40px; }
.masthead h1 { margin: 0; font: 400 52px/.95 "abolition", sans-serif; text-transform: uppercase; letter-spacing: .01em; color: var(--ink); }
.masthead .telex { margin: 10px 0 0; }
.intro { margin-top: 32px; max-width: 620px; }
.lede { margin: 0 0 28px; font-size: 18px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.examples { margin: 0; padding: 0; list-style: none; counter-reset: ex; }
.examples li { counter-increment: ex; }
.examples button {
  display: grid; grid-template-columns: 32px 1fr; width: calc(100% + 24px); text-align: start; border: 0; background: transparent; padding: 10px 12px; margin-inline: -12px; border-radius: 10px;
  font: 400 17px/1.5 var(--serif); color: var(--ink-2); transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.examples button::before { content: counter(ex, decimal-leading-zero); font: 400 12px/25px var(--telex); letter-spacing: .06em; color: var(--accent); }
.examples button:hover { background: var(--tone); color: var(--ink); }

.turn { margin-top: 48px; scroll-margin-top: 24px; }
.turn-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.turn-meta span:first-child { color: var(--accent); }
.status { font-variant-numeric: tabular-nums; }
.question { margin: 10px 0 0; max-width: 620px; font: 700 28px/1.25 var(--serif); color: var(--ink); text-wrap: balance; }
.progress { margin-top: 20px; max-width: 620px; height: 2px; border-radius: 2px; background: var(--accent-wash); overflow: hidden; transition: opacity 300ms ease-out 120ms; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.progress i.go { transform: scaleX(.92); transition: transform 26s cubic-bezier(.08, .6, .2, 1); }
.progress.done i { transform: scaleX(1); transition: transform 220ms var(--ease-out); }
.progress.done { opacity: 0; }
.ghost { margin-top: 28px; max-width: 620px; display: grid; gap: 17px; }
.ghost i { display: block; height: 12px; border-radius: 6px; background: var(--tone-2); }
.ghost i.short { width: 60%; }

.answer { margin-top: 24px; }
.row { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); column-gap: 48px; }
.para { margin: 0 0 20px; font-size: 18px; line-height: 1.7; color: var(--ink-2); text-wrap: pretty; }
.cite {
  position: relative; top: -.45em; margin: 0 0 0 1px; padding: 1px 3px; border: 0; border-radius: 4px; background: transparent;
  font: 400 12px/1 var(--telex); color: var(--accent); transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.cite::before { content: ""; position: absolute; inset: -6px -3px; }
.cite:hover { background: var(--accent-wash); }
.cite[aria-expanded="true"] { background: var(--accent); color: #fff; }
.margin { display: grid; align-content: start; gap: 6px; padding-top: 4px; }
.note { display: grid; gap: 2px; text-align: start; border: 0; background: transparent; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; transition: background-color 160ms var(--ease-out); }
.note:hover { background: var(--tone); }
.note .telex { color: var(--accent); }
.note-title { font: 400 14px/1.4 var(--serif); color: var(--ink-2); }
.slot { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 240ms var(--ease-out), opacity 180ms var(--ease-out); }
.slot.open { grid-template-rows: 1fr; opacity: 1; }
.clip { min-height: 0; overflow: hidden; }
.passage { max-width: 620px; margin: 0 0 28px; padding: 18px 20px 16px; border-radius: 14px; background: var(--tone); }
.passage > .telex { margin: 0; }
.passage-title { margin: 4px 0 0; font: 700 17px/1.35 var(--serif); }
.passage-author { margin: 0; font-size: 14px; color: var(--ink-3); }
.excerpt { margin-top: 12px; }
.excerpt p { margin: 0 0 10px; font-size: 16px; line-height: 1.65; }
.excerpt .dim { color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.excerpt .hit { color: var(--ink); background: var(--accent-wash); margin-inline: -8px; padding: 6px 8px; border-radius: 8px; }
.excerpt .warn { color: #92400E; }
.passage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 6px; }
.passage-actions button, .passage-actions a { border: 0; background: transparent; padding: 6px 0; font: 700 14px/1.3 var(--serif); color: var(--accent); text-decoration: underline; text-decoration-color: rgb(134 25 143 / .3); text-underline-offset: 4px; }
.passage-actions button:hover, .passage-actions a:hover { text-decoration-color: currentColor; }
.error { max-width: 620px; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--tone); }
.error p { margin: 0; flex: 1 1 240px; }
.error button { border: 0; border-radius: 10px; padding: 8px 14px; background: var(--accent); color: #fff; }
.enter { animation: rise 280ms var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.composer { margin-top: 48px; max-width: 620px; }
.composer .telex { display: block; margin-bottom: 8px; }
.field { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgb(28 25 23 / .06), 0 8px 24px -12px rgb(28 25 23 / .18); }
.field textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; border: 0; outline: 0; background: transparent; padding: 10px 0; font: 400 18px/24px var(--serif); color: var(--ink); }
.field textarea::placeholder { color: var(--ink-3); font-style: italic; }
#send { flex: none; height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 700 15px/1 var(--serif); transition: opacity 160ms var(--ease-out); }
#send:disabled { opacity: .35; cursor: default; }
.colophon { margin-top: 28px; max-width: 620px; font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.colophon p { margin: 0 0 8px; }
.colophon a { color: var(--accent); text-underline-offset: 3px; text-decoration-color: rgb(134 25 143 / .3); }

.reader { position: fixed; inset: 0; z-index: 10; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); opacity: 0; transform: translateY(8px); transition: opacity 160ms ease-in, transform 160ms ease-in; }
.reader.in { opacity: 1; transform: none; transition: opacity 220ms var(--ease-out), transform 300ms var(--ease-out); }
.reader[hidden] { display: none; }
.reader-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 16px; padding: 14px 24px; background: rgb(245 244 241 / .86); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.reader-bar button { border: 0; background: transparent; padding: 6px 0; font: 700 14px/1.3 var(--serif); color: var(--ink); text-decoration: underline; text-decoration-color: rgb(28 25 23 / .25); text-underline-offset: 4px; }
#reader-link { display: flex; }
.reader-bar #reader-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-bar a { padding: 6px 0; font: 700 14px/1.3 var(--serif); color: var(--accent); text-decoration: underline; text-decoration-color: rgb(134 25 143 / .3); text-underline-offset: 4px; }
.reader-page { max-width: 640px; margin: 0 auto; padding: 24px 24px 96px; }
.reader-page h2 { margin: 16px 0 4px; font: 700 30px/1.2 var(--serif); text-wrap: balance; }
.reader-author { margin: 0 0 28px; color: var(--ink-3); font-size: 15px; }
.reader-page .pp, .reader-page .pl { margin: 0 0 16px; font-size: 18px; line-height: 1.72; color: var(--ink-2); }
.reader-page .pl { padding-left: 22px; }
.reader-page .ph { margin: 32px 0 10px; font: 700 20px/1.3 var(--serif); }
.reader-page .hit { margin-inline: -12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-wash); color: var(--ink); }

@media (max-width: 860px) {
  .page { padding: 32px 20px 32px; }
  .masthead h1 { font-size: 42px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .margin { display: none; }
  .question { font-size: 24px; }
  .para { font-size: 17px; line-height: 1.66; }
  .passage { margin-inline: -8px; padding: 16px; }
  .reader-bar { padding: 12px 16px; }
  .reader-page { padding: 16px 20px 80px; }
  .reader-page h2 { font-size: 26px; }
  .reader-page .pp, .reader-page .pl { font-size: 17px; }
}

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

/* Reserve the answer's room while it is written, so the composer and footer below never jump when it lands. */
.ghost { min-height: 60dvh; align-content: start; }
