/* ==========================================================================
   Daedalus — drawing set stylesheet
   Single hand-written stylesheet. No frameworks, no build step, no remote assets.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */

:root {
  /* ink-on-vellum (light) */
  --paper:        #f2ede0;
  --paper-2:      #e8e1cf;
  --paper-3:      #ded5be;
  --ink:          #14324a;
  --ink-strong:   #0a1e2f;
  --ink-dim:      #4a6579;
  --rule:         rgba(20, 50, 74, 0.22);
  --rule-strong:  rgba(20, 50, 74, 0.55);
  --accent:       #0a6a83;
  --accent-soft:  rgba(10, 106, 131, 0.12);
  --amber:        #8a5a06;
  --amber-soft:   rgba(138, 90, 6, 0.12);
  --rust:         #9c3418;
  --rust-soft:    rgba(156, 52, 24, 0.10);
  --grid-fine:    rgba(20, 50, 74, 0.055);
  --grid-coarse:  rgba(20, 50, 74, 0.11);
  --tex-opacity:  0.05;
  --tex-blend:    multiply;
  --shell-bg:     #11202c;
  --shell-ink:    #d6e4ec;
  --shell-dim:    #7f9aab;
  --shell-accent: #56c8d8;
  --shell-amber:  #e0aa4a;

  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;

  --rail-w: 15.5rem;
  --sheet-max: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* cyan-on-navy (dark) */
    --paper:        #071726;
    --paper-2:      #0c2135;
    --paper-3:      #123048;
    --ink:          #d3e9f4;
    --ink-strong:   #f0fbff;
    --ink-dim:      #8ab0c6;
    --rule:         rgba(125, 200, 235, 0.26);
    --rule-strong:  rgba(150, 220, 255, 0.62);
    --accent:       #4fd0e8;
    --accent-soft:  rgba(79, 208, 232, 0.13);
    --amber:        #e8b552;
    --amber-soft:   rgba(232, 181, 82, 0.13);
    --rust:         #ff9270;
    --rust-soft:    rgba(255, 146, 112, 0.12);
    --grid-fine:    rgba(125, 200, 235, 0.055);
    --grid-coarse:  rgba(125, 200, 235, 0.11);
    --tex-opacity:  0.09;
    --tex-blend:    screen;
    --shell-bg:     #030d16;
    --shell-ink:    #cfe4ef;
  }
}

/* --- 2. Reset & page ---------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  /* grid paper: fine 8px grid over coarse 80px grid */
  background-image:
    linear-gradient(var(--grid-coarse) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-coarse) 1px, transparent 1px),
    linear-gradient(var(--grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: -1px -1px;
  overflow-wrap: break-word;
}

/* Blueprint paper texture, held deliberately low */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("blueprint.png");
  background-size: 900px auto;
  background-repeat: repeat;
  opacity: var(--tex-opacity);
  mix-blend-mode: var(--tex-blend);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper-2);
  color: var(--ink);
  padding: .6rem 1rem;
  border: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: .8rem;
  z-index: 50;
}
.skip:focus { left: .5rem; top: .5rem; }

/* --- 3. Drawing frame --------------------------------------------------- */

.drawing {
  position: relative;
  z-index: 1;
  max-width: 96rem;
  margin: 0 auto;
  padding: clamp(.5rem, 2vw, 1.75rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .drawing { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
}

/* --- 4. Index rail (replaces top nav) ----------------------------------- */

.rail {
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--paper-2) 82%, transparent);
  padding: 1rem 1rem 1.1rem;
  font-family: var(--mono);
  font-size: .78rem;
}

@media (min-width: 62rem) {
  .rail { position: sticky; top: clamp(.5rem, 2vw, 1.75rem); }
}

.rail__stamp {
  border-bottom: 1px solid var(--rule);
  padding-bottom: .7rem;
  margin-bottom: .8rem;
}

.rail__mark {
  display: block;
  font-size: 1.15rem;
  letter-spacing: .30em;
  text-transform: uppercase;
  color: var(--ink-strong);
  font-weight: 600;
  margin: 0;
}

.rail__sub {
  display: block;
  color: var(--ink-dim);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: .25rem;
}

.rail__caption {
  color: var(--ink-dim);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 .55rem;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.rail li { margin: 0; }

.rail a {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: .5rem;
  align-items: baseline;
  padding: .38rem .35rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
  line-height: 1.35;
}

.rail a:hover { background: var(--accent-soft); color: var(--ink-strong); }

.rail a .no {
  color: var(--accent);
  letter-spacing: .06em;
}

.rail a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--ink-strong);
  box-shadow: inset 3px 0 0 var(--accent);
}

.rail__foot {
  margin-top: 1rem;
  padding-top: .7rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-dim);
  font-size: .68rem;
  line-height: 1.6;
}

.rail__foot dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; }
.rail__foot dt { letter-spacing: .1em; text-transform: uppercase; }
.rail__foot dd { margin: 0; color: var(--ink); }

/* --- 5. Sheet ----------------------------------------------------------- */

.sheet {
  border: 1px solid var(--rule-strong);
  outline: 4px solid transparent;
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--paper) 60%, transparent),
              inset 0 0 0 5px var(--rule);
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  padding: clamp(1.1rem, 3.2vw, 2.75rem);
  min-width: 0;
}

.sheet > * + * { margin-top: 2.4rem; }

.sheet-head {
  border-bottom: 2px solid var(--rule-strong);
  padding-bottom: 1.1rem;
}

.sheet-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.4rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: .7rem;
}

.sheet-head__meta b { color: var(--accent); font-weight: 600; }

.sheet-head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  font-weight: 650;
}

.sheet-head .lede {
  margin: .9rem 0 0;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--ink);
  max-width: 58ch;
}

/* --- 6. Typography ------------------------------------------------------ */

h2, h3, h4 { color: var(--ink-strong); line-height: 1.2; }

h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  margin: 0 0 .85rem;
  letter-spacing: -0.01em;
  font-weight: 620;
}

h3 {
  font-size: 1.06rem;
  margin: 2rem 0 .6rem;
  font-weight: 620;
}

/* Drafting-style category label. Kept at h3 so heading levels never skip. */
h4, h3.lbl {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.6rem 0 .5rem;
  font-weight: 600;
}

.plate h3.lbl { font-size: .8rem; margin: 1.5rem 0 .5rem; }
.plate h3.lbl:first-child { margin-top: 0; }
.notes h3.lbl { margin-top: 0; }

p { margin: 0 0 1rem; max-width: 74ch; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink-strong); }

code, kbd, samp {
  font-family: var(--mono);
  font-size: .875em;
}

p code, li code, td code, dd code, figcaption code, th code {
  background: var(--accent-soft);
  padding: .08em .34em;
  border-radius: 2px;
  color: var(--ink-strong);
  /* long identifiers must be able to break, or narrow viewports scroll sideways */
  overflow-wrap: break-word;
  word-break: break-word;
}

ul, ol { max-width: 74ch; padding-left: 1.3rem; }
li { margin: .3rem 0; }

ul.tick { list-style: none; padding-left: 0; }
ul.tick > li {
  position: relative;
  padding-left: 1.5rem;
}
ul.tick > li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

/* --- 7. Drafting section header (dimension line) ------------------------ */

.dimline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  margin: 3rem 0 1.2rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.dimline::before {
  content: "";
  width: 1.1rem;
  height: 9px;
  border-left: 1px solid var(--rule-strong);
  border-right: 1px solid var(--rule-strong);
  border-top: 1px solid var(--rule-strong);
  flex: none;
}

.dimline::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: repeating-linear-gradient(
    90deg, var(--rule) 0 6px, transparent 6px 10px);
}

.dimline span { color: var(--accent); }

/* --- 8. Callout bubbles with leader lines ------------------------------- */

.callout {
  position: relative;
  margin: 1.5rem 0 1.5rem 1.6rem;
  padding: .9rem 1.1rem .95rem 1.35rem;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--paper-2) 65%, transparent);
  font-size: .95rem;
  max-width: 68ch;
}

.callout::before {
  /* leader line running out to the bubble */
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 1.35rem;
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
}

.callout__no {
  position: absolute;
  left: -2.65rem;
  top: .55rem;
  width: 2.05rem;
  height: 2.05rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
  background: var(--paper);
}

.callout p:last-child { margin-bottom: 0; }

.callout--warn { border-left-color: var(--amber); }
.callout--warn::before { background: var(--amber); }
.callout--warn .callout__no { border-color: var(--amber); color: var(--amber); }

@media (max-width: 40rem) {
  .callout { margin-left: 2.9rem; }
}

/* --- 9. Pull quote ------------------------------------------------------ */

.pull {
  margin: 2.2rem 0;
  padding: 1.3rem 0 1.3rem 1.6rem;
  border-left: 3px double var(--rule-strong);
  max-width: 60ch;
}

.pull p {
  margin: 0;
  font-size: clamp(1.08rem, 2.1vw, 1.3rem);
  line-height: 1.45;
  color: var(--ink-strong);
  font-weight: 500;
  text-wrap: balance;
}

.pull cite {
  display: block;
  margin-top: .7rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-style: normal;
}

/* --- 10. Figures & diagrams -------------------------------------------- */

figure {
  margin: 2rem 0;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--paper-2) 55%, transparent);
  padding: clamp(.7rem, 2vw, 1.25rem);
  /* wide drawings scroll inside the figure rather than shrinking to illegibility */
  overflow-x: auto;
}

figure > svg { display: block; width: 100%; height: auto; }

@media (max-width: 52rem) {
  figure > svg { min-width: 640px; }
}

figcaption {
  margin-top: .85rem;
  padding-top: .7rem;
  border-top: 1px dotted var(--rule);
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

figcaption b {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* diagram element classes, theme-aware.
   `color` is set on the root so marker heads resolve currentColor sensibly
   regardless of how a browser scopes marker inheritance. */
.dgm { color: var(--accent); }
.dgm text { font-family: var(--mono); fill: var(--ink); }
.dgm .t-lbl  { font-size: 11px; }
.dgm .t-sm   { font-size: 9px;  fill: var(--ink-dim); }
.dgm .t-xs   { font-size: 7.5px; fill: var(--ink-dim); letter-spacing: .06em; }
.dgm .t-ttl  { font-size: 11px; fill: var(--accent); letter-spacing: .12em; }
.dgm .t-acc  { fill: var(--accent); }
.dgm .t-amb  { fill: var(--amber); }
.dgm .t-rst  { fill: var(--rust); }
.dgm .t-str  { fill: var(--ink-strong); font-size: 12px; }
.dgm .t-b    { font-weight: 600; }

.dgm .box     { fill: var(--paper-2); stroke: var(--rule-strong); stroke-width: 1; }
.dgm .box-acc { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.dgm .box-amb { fill: var(--amber-soft); stroke: var(--amber); stroke-width: 1.2; }
.dgm .box-rst { fill: var(--rust-soft); stroke: var(--rust); stroke-width: 1.2; }
.dgm .box-gh  { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 4 3; }
.dgm .plate   { fill: none; stroke: var(--rule); stroke-width: 1; }

.dgm .rule    { stroke: var(--rule-strong); stroke-width: 1; fill: none; }
.dgm .rule-lt { stroke: var(--rule); stroke-width: 1; fill: none; }
.dgm .dash    { stroke: var(--rule-strong); stroke-width: 1; fill: none; stroke-dasharray: 5 4; }
.dgm .dim     { stroke: var(--ink-dim); stroke-width: .7; fill: none; }
.dgm .lead    { stroke: var(--amber); stroke-width: .8; fill: none; }
.dgm .flow    { stroke: var(--accent); stroke-width: 1.4; fill: none; }
.dgm .flow-gh { stroke: var(--ink-dim); stroke-width: 1; fill: none; stroke-dasharray: 4 3; }
.dgm .flow-rst{ stroke: var(--rust); stroke-width: 1.3; fill: none; }
.dgm .fill-acc{ fill: var(--accent); }
.dgm .fill-amb{ fill: var(--amber); }
.dgm .fill-rst{ fill: var(--rust); }
.dgm .fill-dim{ fill: var(--ink-dim); }
.dgm .fill-pap{ fill: var(--paper); }
.dgm .hatch-cell { fill: var(--accent-soft); stroke: var(--rule); stroke-width: .6; }
.dgm .void-cell  { fill: none; stroke: var(--rule); stroke-width: .6; }

.dgm marker path, .dgm marker polygon { fill: currentColor; stroke: none; }

/* --- 11. Terminal renderings -------------------------------------------- */

.shell {
  margin: 1.8rem 0;
  border: 1px solid var(--rule-strong);
  background: var(--shell-bg);
  color: var(--shell-ink);
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.62;
  overflow: hidden;
}

.shell__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .6rem;
  padding: .45rem .8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--shell-dim);
}

.shell__bar .dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: currentColor; opacity: .5; flex: none;
}

.shell__body {
  margin: 0;
  padding: .9rem 1rem 1.05rem;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

.shell__body code { font-size: inherit; background: none; padding: 0; white-space: pre; }

.shell b     { color: var(--shell-accent); font-weight: 600; }  /* prompt/command */
.shell i     { color: var(--shell-dim); font-style: normal; }   /* comment */
.shell u     { color: var(--shell-amber); text-decoration: none; }
.shell .ok   { color: #7fd6a0; }
.shell .bad  { color: #ff9d7d; }
.shell .key  { color: var(--shell-accent); }
.shell .str  { color: #c7d9a0; }
.shell .num  { color: #e0aa4a; }

/* --- 12. Tables ---------------------------------------------------------- */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--rule-strong);
  margin: 1.6rem 0;
  background: color-mix(in srgb, var(--paper-2) 45%, transparent);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: .86rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: .7rem .9rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--rule);
}

th, td {
  text-align: left;
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

thead th {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
  font-weight: 600;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--accent-soft); }

td.mono, th.mono, .mono { font-family: var(--mono); }
td.num { font-variant-numeric: tabular-nums; }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .1rem .45rem;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.tag--ok   { color: var(--accent); }
.tag--warn { color: var(--amber); }
.tag--off  { color: var(--ink-dim); }
.tag--bad  { color: var(--rust); }

/* --- 13. Annotated code ------------------------------------------------- */

.srcblock {
  margin: 1.7rem 0;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}

.srcblock__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .3rem 1rem;
  padding: .45rem .85rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--ink-dim);
}

.srcblock__head b { color: var(--accent); font-weight: 600; }

.srcblock pre {
  margin: 0;
  padding: .8rem .85rem .9rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.7;
  white-space: pre;
  color: var(--ink);
}

.srcblock .ln {
  display: inline-block;
  width: 2.6rem;
  color: var(--ink-dim);
  user-select: none;
  border-right: 1px solid var(--rule);
  margin-right: .8rem;
  text-align: right;
  padding-right: .5rem;
}

.srcblock .kw  { color: var(--accent); }
.srcblock .st  { color: var(--amber); }
.srcblock .cm  { color: var(--ink-dim); font-style: italic; }
.srcblock .hl  { background: var(--amber-soft); display: inline-block; width: 100%; }

/* --- 14. Note blocks (drafting notes) ----------------------------------- */

.notes {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding: 1.1rem 0 1.2rem;
  margin: 2rem 0;
}

.notes h3.lbl { margin-top: 0; }

.notes ol {
  counter-reset: note;
  list-style: none;
  padding-left: 0;
  margin: 0;
  max-width: 76ch;
}

.notes ol > li {
  counter-increment: note;
  position: relative;
  padding-left: 2.6rem;
  margin: .5rem 0;
  font-size: .93rem;
}

.notes ol > li::before {
  content: counter(note, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .05rem;
}

/* --- 15. Spec grid (key/value drafting schedule) ------------------------ */

.spec {
  display: grid;
  gap: 0;
  border: 1px solid var(--rule-strong);
  margin: 1.6rem 0;
  font-size: .87rem;
}

@media (min-width: 34rem) {
  .spec { grid-template-columns: minmax(9rem, 14rem) 1fr; }
}

.spec dt {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: .55rem .85rem;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}

.spec dd {
  margin: 0;
  padding: .55rem .85rem;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 33.99rem) {
  .spec dt { border-bottom: none; }
}

.spec > :nth-last-child(1),
.spec > :nth-last-child(2) { border-bottom: none; }

/* --- 16. Two-column plates ---------------------------------------------- */

.plates {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  margin: 1.6rem 0;
}

@media (min-width: 48rem) {
  .plates--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.plate {
  border: 1px solid var(--rule);
  padding: 1rem 1.1rem 1.1rem;
  background: color-mix(in srgb, var(--paper-2) 45%, transparent);
  min-width: 0;
}

.plate h3 { margin-top: 0; font-size: .98rem; }
.plate p:last-child, .plate ul:last-child { margin-bottom: 0; }

/* --- 17. Title block (sheet footer) ------------------------------------- */

.titleblock {
  margin-top: 3rem;
  border: 2px solid var(--rule-strong);
  display: grid;
  grid-template-columns: 1fr;
  font-family: var(--mono);
  font-size: .72rem;
}

@media (min-width: 44rem) {
  .titleblock { grid-template-columns: 1.5fr 1fr 1fr; }
}

.titleblock > div {
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 44rem) {
  .titleblock > div { border-bottom: none; border-right: 1px solid var(--rule); }
  .titleblock > div:last-child { border-right: none; }
}

.titleblock > div:last-child { border-bottom: none; }

.titleblock .k {
  display: block;
  font-size: .62rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: .15rem;
}

.titleblock .v { color: var(--ink-strong); }
.titleblock a { color: var(--accent); }

/* --- 18. Sheet-to-sheet continuation ------------------------------------ */

.contin {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.4rem;
}

.contin a {
  flex: 1 1 15rem;
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--accent);
  padding: .75rem .95rem;
  text-decoration: none;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper-2) 45%, transparent);
  font-size: .9rem;
}

.contin a:hover { background: var(--accent-soft); }

.contin .k {
  display: block;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: .2rem;
}

.contin .v { color: var(--ink-strong); font-weight: 550; }

/* --- 19. Utilities ------------------------------------------------------- */

.lead-in {
  font-size: 1.02rem;
  color: var(--ink);
}

.dim { color: var(--ink-dim); }
.acc { color: var(--accent); }
.amb { color: var(--amber); }
.rst { color: var(--rust); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.stampline {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-top: 1px solid var(--rule);
  padding-top: .5rem;
  margin-top: 1.6rem;
}

@media print {
  body::before { display: none; }
  .rail { display: none; }
}
