/* anacreon.dev, quiet forum: the explainer pages.
   Loaded after forum.css on pages with body.quiet. Uses only the
   forum tokens, so both themes hold. Square corners, single rules, numbers
   in Arabic numerals except the Roman mark on each top-level section. */

.quiet .nav a[aria-current="page"] { color: var(--accent); }

/* Page head: what the homepage's opening does, one column. */
.quiet .page-head { border-bottom: 1px solid var(--rule); }
.quiet .page-head .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.75rem, 4vw, 2.75rem); }
.quiet .page-head h1 { font: 600 var(--step-3)/1.1 var(--inscribe); letter-spacing: -0.01em; max-width: 22ch; text-wrap: balance; }
.quiet .page-head .lede { max-width: 42rem; }
.quiet .crumbs { display: flex; flex-wrap: wrap; gap: 0.25rem 0; margin-bottom: 1.4rem; font: 500 0.72rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.quiet .crumbs > * + *::before { content: "·"; padding-inline: 0.6em; }

/* Body: the reading rail beside the column. */
.quiet .learn-body { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 4rem); padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.quiet .learn-body > * { min-width: 0; }
.quiet .rail { position: sticky; top: 1rem; align-self: start; font-size: 0.95rem; line-height: 1.35; }
.quiet .rail .label { display: block; margin-bottom: 0.75rem; }
.quiet .rail ol { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--ink); }
.quiet .rail li { border-bottom: 1px solid var(--rule); }
.quiet .rail li a { display: grid; grid-template-columns: 2rem minmax(0, 1fr); padding: 0.45rem 0; color: var(--ink); text-decoration: none; }
.quiet .rail li a:hover { color: var(--accent); }
.quiet .rail li a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.quiet .rail .lv { font: 500 0.7rem/1.9 var(--mono); color: var(--muted); }
.quiet .rail .sub { margin-top: 1.25rem; display: grid; gap: 0.4rem; font-size: 0.9rem; }
.quiet .rail .sub a { color: var(--muted); }

/* The reading column. Top-level sections carry a Roman mark; nothing else does. */
.quiet .content { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); max-width: 48rem; counter-reset: sec; }
.quiet .content section { display: grid; gap: 1rem; scroll-margin-top: 1rem; min-width: 0; }
.quiet .content > section > h2 { counter-increment: sec; display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: baseline; padding-top: 0.9rem; border-top: 1px solid var(--rule); font: 600 var(--step-2)/1.2 var(--inscribe); text-wrap: balance; }
.quiet .content > section > h2::before { content: counter(sec, upper-roman); font: 400 1.15rem/1 var(--inscribe); letter-spacing: 0.04em; color: var(--accent); }
.quiet .content h3 { font: 600 1.1rem/1.3 var(--body); margin-top: 0.5rem; }
.quiet .content p, .quiet .content li { max-width: var(--measure); }
.quiet .content :is(ul, ol):not(.steps, .ladder, .notices) { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.quiet .content ol:not(.steps, .ladder) { list-style: decimal; }
.quiet .content ol:not(.steps, .ladder) > li::marker { font-family: var(--inscribe); color: var(--accent); }
.quiet .content code { font: 400 0.86em/1 var(--mono); background: var(--surface); border: 1px solid var(--rule); padding: 0.05em 0.3em; overflow-wrap: anywhere; }
.quiet .kicker { display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; }

/* "In short": the shallowest read of every page. */
.quiet .inshort { border-left: 1px solid var(--ink); padding: 0.2rem 0 0.2rem 1.1rem; font-size: var(--step-1); line-height: 1.5; max-width: 42rem; }

/* Status marks: forum.css .state, also when a table cell holds one. */
.quiet .state.person { color: var(--seal); }

/* Folds: the exact rules, closed until opened. */
.quiet details.deeper { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.quiet details.deeper + details.deeper { margin-top: -1px; }
.quiet details.deeper > summary { cursor: pointer; padding: 0.85rem 0; font: 600 1.02rem/1.3 var(--body); list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem; align-items: baseline; }
.quiet details.deeper > summary::-webkit-details-marker { display: none; }
.quiet details.deeper > summary::before { content: "+"; font: 500 1rem/1 var(--mono); color: var(--accent); width: 1ch; }
.quiet details.deeper[open] > summary::before { content: "\2212"; }
.quiet details.deeper > summary .label, .quiet details.deeper > summary .state { margin-left: auto; }
.quiet details.deeper > .fold { padding: 0 0 1.2rem 1.7rem; display: grid; gap: 0.8rem; min-width: 0; }

/* Tables: the wrapper scrolls sideways on a phone; the page never does. */
.quiet .table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.quiet table.data { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.45; }
.quiet table.data th, .quiet table.data td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem 0.65rem 0; border-bottom: 1px solid var(--rule); }
.quiet table.data tr:last-child td { border-bottom: 0; }
.quiet table.data th { font: 500 0.7rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.quiet table.data td:first-child { font-weight: 600; }
.quiet table.data .state { white-space: nowrap; }
.quiet table.data td.yes { color: var(--accent); font-weight: 600; }
.quiet table.data td.no { color: var(--muted); }
.quiet table.data.wide { min-width: 36rem; }
.quiet table.data td.num { font: 500 0.9rem/1.45 var(--mono); text-align: right; white-space: nowrap; }
.quiet table.data th.num { text-align: right; }

/* Figures. A wide diagram scrolls inside its frame. */
.quiet figure.diagram { margin: 0; border: 1px solid var(--rule-strong); background: var(--surface); padding: 1.1rem; display: grid; gap: 0.8rem; min-width: 0; }
.quiet figure.diagram .scroll { overflow-x: auto; }
.quiet figure.diagram svg { display: block; width: 100%; height: auto; }
.quiet figure.diagram .scroll svg { min-width: 34rem; }
.quiet figure.diagram figcaption { font-size: var(--step--1); color: var(--muted); max-width: var(--measure); }
.quiet figure.diagram figcaption b { color: var(--ink); }

.quiet svg .d-box { fill: var(--paper); stroke: var(--rule-strong); stroke-width: 1; }
.quiet svg .d-box-ink { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.quiet svg .d-box-accent { fill: var(--paper); stroke: var(--accent); stroke-width: 1.4; }
.quiet svg .d-box-seal { fill: var(--seal-wash); stroke: var(--seal); stroke-width: 1.6; }
.quiet svg .d-box-dash { fill: none; stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 4 4; }
.quiet svg .d-fill-accent { fill: var(--accent); }
.quiet svg .d-fill-seal { fill: var(--seal); }
.quiet svg .d-fill-muted { fill: var(--rule-strong); }
.quiet svg .d-line { fill: none; stroke: var(--muted); stroke-width: 1.3; }
.quiet svg .d-line-accent { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.quiet svg .d-line-seal { fill: none; stroke: var(--seal); stroke-width: 1.5; }
.quiet svg .d-line-dash { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 5 4; }
.quiet svg .d-grid { fill: none; stroke: var(--rule); stroke-width: 1; }
.quiet svg .d-head { fill: var(--muted); }
.quiet svg .d-head-accent { fill: var(--accent); }
.quiet svg .d-head-seal { fill: var(--seal); }
.quiet svg text { font-family: var(--body); font-size: 14px; fill: var(--ink); }
.quiet svg .t-bold { font-weight: 600; }
.quiet svg .t-small { font-size: 12px; fill: var(--muted); }
.quiet svg .t-mono { font-family: var(--mono); font-size: 11.5px; fill: var(--muted); }
.quiet svg .t-accent { fill: var(--accent); }
.quiet svg .t-seal { fill: var(--seal); font-weight: 600; }
.quiet svg .t-mid { text-anchor: middle; }
.quiet svg .t-end { text-anchor: end; }

/* A flow of steps, counted in Arabic numerals. */
.quiet .steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.9rem; counter-reset: s; }
.quiet .steps.five { grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr)); }
.quiet .steps li { counter-increment: s; border-top: 1px solid var(--rule-strong); padding-top: 0.6rem; display: grid; gap: 0.3rem; align-content: start; max-width: none; min-width: 0; }
.quiet .steps li::before { content: counter(s); font: 400 1.2rem/1 var(--inscribe); color: var(--muted); }
.quiet .steps li span { font-size: 0.93rem; color: var(--muted); }
.quiet .steps li.person { border-top: 3px solid var(--seal); padding-top: calc(0.6rem - 2px); }
.quiet .steps li.person::before, .quiet .steps li.person b { color: var(--seal); }

/* Cards: plain entries under a rule. */
.quiet .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem); }
.quiet .card { border-left: 1px solid var(--rule); padding-left: 1.1rem; display: grid; gap: 0.5rem; align-content: start; color: var(--ink); text-decoration: none; min-width: 0; }
.quiet a.card:hover h3 { color: var(--accent); text-decoration: underline; }
.quiet .card h3 { margin: 0; font-size: 1.05rem; }
.quiet .card p { font-size: 0.97rem; }
.quiet .card .go { font-weight: 600; color: var(--accent); }
.quiet .card.lead { border-left: 2px solid var(--ink); }

/* The depth ladder. */
.quiet .ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.quiet .ladder > li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.4rem 1.25rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); max-width: none; }
.quiet .ladder .lv { font: 500 0.72rem/1.7 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.quiet .ladder h3 { margin: 0 0 0.3rem; }
.quiet .ladder .links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin-top: 0.5rem; font-weight: 600; }

/* Glossary. */
.quiet .alpha { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; font: 500 0.9rem/1.2 var(--mono); }
.quiet dl.glossary { margin: 0; display: grid; }
.quiet dl.glossary > div { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 0.35rem 1.5rem; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.quiet dl.glossary dt { font-weight: 600; }
.quiet dl.glossary dd { margin: 0; max-width: var(--measure); }
.quiet dl.glossary dd .see { display: block; margin-top: 0.3rem; font-size: 0.88rem; color: var(--muted); }
.quiet h3.letter { font: 400 var(--step-2)/1 var(--inscribe); color: var(--accent); padding: 1.25rem 0 0.5rem; margin: 0; border-bottom: 1px solid var(--ink); scroll-margin-top: 1rem; }

/* Next and previous. */
.quiet .pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.quiet .pager a { display: grid; gap: 0.25rem; text-decoration: none; font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.quiet .pager .next { text-align: right; grid-column: 2; }

/* A side note. A person's decision gets the seal colour, nothing else does. */
.quiet .callout { border-left: 1px solid var(--accent); padding: 0.2rem 0 0.2rem 1.1rem; display: grid; gap: 0.5rem; }
.quiet .callout.person { border-left: 3px solid var(--seal); }
.quiet .callout .label { color: var(--accent); }
.quiet .callout.person .label { color: var(--seal); }
.quiet .example-note { font-size: var(--step--1); color: var(--muted); font-style: italic; }

/* A record card in the column: the homepage tablet's plain cousin. */
.quiet .content .record { position: relative; background: var(--surface); border: 1px solid var(--rule-strong); padding: 1.4rem 1.3rem 1.1rem; font: 0.84rem/1.55 var(--mono); min-width: 0; }
.quiet .record-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule); }
.quiet .content .record h2 { margin-top: 1rem; font: 600 1.15rem/1.3 var(--body); max-width: 30ch; }
.quiet .record dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.45rem 1rem; margin: 1rem 0 0; }
.quiet .record dt { color: var(--muted); }
.quiet .record dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.quiet .record .quote { font: italic 1rem/1.45 var(--body); }
.quiet .record .example { margin-top: 0.7rem; color: var(--muted); font: italic 0.8rem/1.4 var(--body); }
.quiet .record .seal { position: static; float: right; width: 4.6rem; height: 4.6rem; margin: 0 0 0.5rem 1rem; font-size: 0.52rem; }

/* Real hashes and the command that checks one. */
.quiet .hash { font: 400 0.85rem/1.5 var(--mono); overflow-wrap: anywhere; }
.quiet .hash.head { font-size: var(--step-0); font-weight: 500; color: var(--accent); }
.quiet pre.cmd { margin: 0; border: 1px solid var(--rule-strong); background: var(--surface); padding: 0.9rem 1rem; overflow-x: auto; font: 400 0.82rem/1.6 var(--mono); color: var(--ink); }
.quiet pre.cmd .out { color: var(--accent); }
.quiet pre.cmd .c { color: var(--muted); }

/* What's coming: the homepage's acta, toned down. */
.quiet .acta-head { border-bottom: 1px solid var(--ink); }
.quiet .acta-title { letter-spacing: 0.08em; margin-right: -0.08em; font-size: clamp(1.8rem, 1.2rem + 3vw, 3.2rem); }
.quiet .acta-sub { font-style: normal; }
.quiet .notices .state { margin-right: 0.4rem; }
.quiet .notices .person { border-bottom-color: var(--seal); }

/* 404. */
.quiet .lost .wrap { padding-block: clamp(3rem, 9vw, 7rem); max-width: 48rem; margin-inline: auto; }
.quiet .lost h1 { font: 600 var(--step-3)/1.1 var(--inscribe); letter-spacing: -0.01em; }
.quiet .lost p { margin-top: 1.4rem; font-size: var(--step-1); line-height: 1.5; }

@media (max-width: 860px) {
  .quiet .learn-body { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .quiet .rail { position: static; border-bottom: 1px solid var(--rule); padding-bottom: 1rem; }
  .quiet .rail ol { border-top: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0; }
  .quiet .rail li { border-bottom: 0; }
  .quiet .rail li + li::before { content: "·"; color: var(--muted); padding-inline: 0.5em; }
  .quiet .rail li a { display: inline; padding: 0; }
  .quiet .rail .lv { display: none; }
  .quiet .rail .sub { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.75rem; }
  .quiet dl.glossary > div { grid-template-columns: minmax(0, 1fr); }
  .quiet .ladder > li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .quiet .content > section > h2 { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .quiet .pager { grid-template-columns: minmax(0, 1fr); }
  .quiet .pager .next { grid-column: 1; text-align: left; }
  .quiet .content .record h2 { padding-right: 0; }
}

/* Grid children never widen the column; wide things scroll in their own frame. */
.quiet .content > * { min-width: 0; }
.quiet .lost .label { display: block; margin-bottom: 1rem; }
.quiet svg .d-dot { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
