@charset "utf-8";

/* ==========================================================================
   Gogentic Finance — technical documentation set
   Single hand-authored stylesheet. No frameworks, no build step, no CDN.
   Layout idiom: printed financial statement / annual report.
   ========================================================================== */

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

:root {
  --paper:        #f5f3ec;
  --paper-2:      #eeebe1;
  --paper-3:      #e7e3d6;
  --ink:          #1b1a16;
  --ink-2:        #4a473e;
  --ink-3:        #625e52;
  --rule:         #cfc9b8;
  --rule-strong:  #8b8675;
  --accent:       #7c2d26;
  --accent-wash:  rgba(124, 45, 38, 0.08);
  --accent-edge:  rgba(124, 45, 38, 0.35);
  --pos:          #2f5d3f;
  --sage:         #b9cdb8;
  --sage-deep:    #7d9a7c;
  --term-bg:      #221f1a;
  --term-fg:      #ded8c9;
  --term-dim:     #97907f;
  --term-accent:  #d9a06a;
  --term-green:   #9fbf8a;
  --texture-op:   0.30;
  --texture-sat:  0.75;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 68ch;
  --gutter: clamp(1rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #16171a;
    --paper-2:      #1d1e22;
    --paper-3:      #24262b;
    --ink:          #e9e6dd;
    --ink-2:        #b6b2a6;
    --ink-3:        #979284;
    --rule:         #33363c;
    --rule-strong:  #5d616a;
    --accent:       #e0897c;
    --accent-wash:  rgba(224, 137, 124, 0.13);
    --accent-edge:  rgba(224, 137, 124, 0.42);
    --pos:          #7bbd93;
    --sage:         #223026;
    --sage-deep:    #6f9280;
    --term-bg:      #0e0f11;
    --term-fg:      #d5d1c6;
    --term-dim:     #7e7a70;
    --term-accent:  #d9a06a;
    --term-green:   #9fbf8a;
    --texture-op:   0.10;
    --texture-sat:  0.35;
  }
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

@media (min-width: 900px) { body { font-size: 17.5px; } }

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

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

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

::selection { background: var(--accent-wash); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.85rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

/* --------------------------------------------------------------------------
   3. Sheet & masthead
   -------------------------------------------------------------------------- */

.sheet {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter) 0;
}

.masthead {
  position: relative;
  border-bottom: 3px double var(--rule-strong);
  padding: clamp(1.75rem, 5vw, 3.25rem) 0 1.15rem;
  overflow: hidden;
  isolation: isolate;
}

/* Ledger paper texture — used once per page, behind the masthead only. */
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("ledger.png");
  background-size: cover;
  background-position: center 20%;
  opacity: var(--texture-op);
  filter: saturate(var(--texture-sat));
  pointer-events: none;
}
.masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, transparent 0%, var(--paper) 92%);
  pointer-events: none;
}

.masthead-rule {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.4rem;
  margin-bottom: 1.15rem;
}

.entity {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.folio {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.statement-title {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.2vw, 3.1rem);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.012em;
}

.statement-standfirst {
  margin: 0;
  max-width: 58ch;
  font-size: 1.02rem;
  color: var(--ink-2);
}

.masthead-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: 0.1rem 1.4rem;
  margin: 1.35rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}
.masthead-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.24rem 0;
  border-bottom: 1px dotted var(--rule);
}
.masthead-meta dt {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.masthead-meta dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. Two-column body: statement index + main column
   -------------------------------------------------------------------------- */

.layout {
  display: block;
  padding-top: 1.5rem;
}

@media (min-width: 62rem) {
  .layout {
    display: grid;
    grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }
}

.contents {
  font-family: var(--sans);
  margin-bottom: 2.5rem;
}

@media (min-width: 62rem) {
  .contents {
    position: sticky;
    top: 1.25rem;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 0.35rem;
  }
}

.contents-head {
  margin: 0 0 0.5rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.35rem;
}

.contents-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  counter-reset: sched;
}

.contents-list li { counter-increment: sched; }

.contents-list a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.42rem 0;
  border-bottom: 1px dotted var(--rule);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.845rem;
  line-height: 1.3;
}
.contents-list a::before {
  content: counter(sched, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  flex: none;
  font-variant-numeric: tabular-nums;
}
.contents-list a:hover,
.contents-list a:focus-visible { color: var(--accent); background: var(--accent-wash); }
.contents-list a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 0.5rem;
  margin-left: -0.5rem;
  background: var(--accent-wash);
}
.contents-list .leader { flex: 1; }

.contents-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contents-sub a {
  display: block;
  padding: 0.28rem 0 0.28rem 0.85rem;
  border-left: 1px solid var(--rule);
  color: var(--ink-3);
  text-decoration: none;
  font-size: 0.79rem;
  line-height: 1.35;
}
.contents-sub a:hover,
.contents-sub a:focus-visible {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* --------------------------------------------------------------------------
   5. Main column & sections
   -------------------------------------------------------------------------- */

.main { min-width: 0; padding-bottom: 3rem; }

.section {
  padding-top: 0.5rem;
  margin-bottom: 3.5rem;
  scroll-margin-top: 1rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 0.35rem;
  margin-bottom: 1.15rem;
}

.section-no {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  flex: none;
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2.6vw, 1.55rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.section h3 {
  margin: 2rem 0 0.55rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.section h4 {
  margin: 1.4rem 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.section p { max-width: var(--measure); margin: 0 0 0.95rem; }
.section > p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.06rem;
  color: var(--ink-2);
}

.section ul, .section ol {
  max-width: var(--measure);
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}
.section li { margin-bottom: 0.32rem; }
.section li::marker { color: var(--ink-3); }

hr.rule-thin {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   6. Statement tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 0.65rem;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  -webkit-overflow-scrolling: touch;
}

table.stmt {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.855rem;
  font-family: var(--sans);
}

table.stmt.wide { min-width: 44rem; }
table.stmt.narrow { min-width: 20rem; }

table.stmt caption {
  caption-side: top;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.55rem 0 0.5rem;
  font-weight: 700;
}

table.stmt thead th {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: left;
  vertical-align: bottom;
  padding: 0.5rem 0.7rem 0.42rem 0;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}
table.stmt thead th:last-child { padding-right: 0; }

table.stmt tbody td,
table.stmt tbody th {
  padding: 0.44rem 0.7rem 0.44rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
  font-weight: 400;
}
table.stmt tbody td:last-child,
table.stmt tbody th:last-child { padding-right: 0; }

table.stmt tbody tr:last-child td,
table.stmt tbody tr:last-child th { border-bottom: 0; }

table.stmt tbody th[scope="row"] {
  color: var(--ink);
  font-weight: 600;
  padding-right: 1.1rem;
}

/* Right-aligned numeric column */
.num {
  text-align: right !important;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 0.8rem;
  white-space: nowrap;
}
th.num { text-align: right !important; }

.mono { font-family: var(--mono); font-size: 0.8rem; }
.dim { color: var(--ink-3); }
.neg { color: var(--accent); }
.pos { color: var(--pos); }

/* Ruled totals — as in a statement. `.subtotal` closes a group with a single
   rule; `.total` closes a schedule with a double rule. Neither implies a summed
   figure on its own — only `.total.sum` is a genuine total, and it alone takes
   the rule above and the bold weight. */
table.stmt tr.subtotal td,
table.stmt tr.subtotal th {
  border-bottom: 1px solid var(--rule-strong);
}
table.stmt tr.total td,
table.stmt tr.total th {
  border-bottom: 3px double var(--ink);
  padding-bottom: 0.5rem;
}
table.stmt tr.total.sum td,
table.stmt tr.total.sum th {
  border-top: 1px solid var(--ink);
  font-weight: 700;
  padding-top: 0.5rem;
  color: var(--ink);
}
table.stmt tr.group td {
  padding-top: 1.05rem;
  padding-bottom: 0.2rem;
  border-bottom: 0;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
table.stmt tr.group:first-child td { padding-top: 0.35rem; }

table.stmt tbody tr.indent th[scope="row"] { padding-left: 1.1rem; font-weight: 400; }

table.stmt td.wrap, table.stmt th.wrap { white-space: normal; min-width: 12rem; }

/* Status marks */
.mark {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  white-space: nowrap;
}
.mark-done { border-color: var(--sage-deep); color: var(--pos); }
.mark-open { border-color: var(--accent-edge); color: var(--accent); }

/* --------------------------------------------------------------------------
   7. Footnotes & references
   -------------------------------------------------------------------------- */

sup.fn { line-height: 0; font-size: 0.72em; }
sup.fn a {
  text-decoration: none;
  font-family: var(--mono);
  padding: 0 0.1em;
}
sup.fn a:hover { text-decoration: underline; }

.footnotes {
  margin: 1.1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.footnotes ol {
  margin: 0;
  padding-left: 1.35rem;
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.footnotes li { margin-bottom: 0.4rem; }
.footnotes li:target { background: var(--accent-wash); }
.footnotes code { font-size: 0.9em; }

.src {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0.15rem 0 1.6rem;
  max-width: 96ch;
}
.section p.src { max-width: 96ch; }
.src code { font-size: 0.95em; }

/* --------------------------------------------------------------------------
   8. Definition lists
   -------------------------------------------------------------------------- */

.defs {
  margin: 0 0 1.35rem;
  max-width: var(--measure);
  border-top: 1px solid var(--rule);
}
.defs dt {
  font-family: var(--mono);
  font-size: 0.815rem;
  font-weight: 600;
  color: var(--ink);
  padding-top: 0.7rem;
}
.defs dd {
  margin: 0.12rem 0 0;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-2);
}

@media (min-width: 46rem) {
  .defs.two-col dt {
    float: left;
    width: 13.5rem;
    clear: left;
    padding-top: 0.72rem;
  }
  .defs.two-col dd {
    margin-left: 14.5rem;
    padding-top: 0.7rem;
  }
  .defs.two-col::after { content: ""; display: table; clear: both; }
}

/* --------------------------------------------------------------------------
   9. Notes / callouts
   -------------------------------------------------------------------------- */

.note-block {
  margin: 1.5rem 0;
  padding: 0.95rem 1.15rem;
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  max-width: var(--measure);
}
.note-block > :first-child { margin-top: 0; }
.note-block > :last-child { margin-bottom: 0; }
.note-block p { font-size: 0.9rem; }
.note-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.tick {
  margin: 1.5rem 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--rule-strong);
  background: transparent;
  max-width: var(--measure);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.tick > :first-child { margin-top: 0; }
.tick > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   10. Code
   -------------------------------------------------------------------------- */

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

p code, li code, td code, th code, dd code, dt code,
caption code, figcaption code, .footnotes code, .src code {
  background: var(--paper-2);
  padding: 0.06em 0.32em;
  border: 1px solid var(--rule);
}

/* Long identifiers must never widen the page. In prose they break; inside table
   cells they stay on one line, because every table sits in its own scroll
   container where a wide cell is harmless. */
p code, li code, dd code, dt code, figcaption code,
.footnotes code, .src code {
  overflow-wrap: anywhere;
}
td code, th code { white-space: nowrap; }

.listing {
  margin: 1.1rem 0 0.5rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  overflow: hidden;
}
.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.42rem 0.8rem;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--ink-2);
  background: var(--paper-3);
}
.listing-head .lbl {
  font-family: var(--sans);
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.listing pre {
  margin: 0;
  padding: 0.8rem 0.9rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.62;
  color: var(--ink);
  -webkit-overflow-scrolling: touch;
}
.listing pre code { background: none; border: 0; padding: 0; white-space: pre; font-size: 1em; }

.listing .ln {
  display: inline-block;
  width: 2.4rem;
  color: var(--ink-3);
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.listing .cmt { color: var(--ink-3); font-style: italic; }
.listing .kw  { color: var(--accent); }
.listing .str { color: var(--pos); }

/* Terminal rendering */
.term {
  margin: 1.25rem 0 0.5rem;
  background: var(--term-bg);
  border: 1px solid var(--rule-strong);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.11);
  font-family: var(--sans);
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--term-dim);
  font-weight: 700;
}
.term-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--term-dim);
  opacity: 0.5;
  flex: none;
}
.term pre {
  margin: 0;
  padding: 0.85rem 0.95rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.755rem;
  line-height: 1.62;
  color: var(--term-fg);
  -webkit-overflow-scrolling: touch;
  white-space: pre;
}
.term .p  { color: var(--term-accent); }          /* prompt sigil */
.term .c  { color: var(--term-fg); font-weight: 700; }  /* command */
.term .o  { color: var(--term-dim); }             /* dim output */
.term .ok { color: var(--term-green); }
.term .wm { color: var(--term-accent); }

/* --------------------------------------------------------------------------
   11. Exhibits (figures / diagrams)
   -------------------------------------------------------------------------- */

.exhibit {
  margin: 1.9rem 0 1.6rem;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.65rem 0 0.75rem;
}
.exhibit-no {
  display: block;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}
.exhibit-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.exhibit svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Below tablet width the diagrams scroll rather than shrink into illegibility. */
@media (max-width: 46rem) {
  .exhibit-scroll svg { min-width: 34rem; }
  .exhibit-scroll { padding-bottom: 0.35rem; }
  .exhibit-hint { display: block; }
}
.exhibit-hint {
  display: none;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0.4rem 0 0;
}
.exhibit figcaption {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px dotted var(--rule);
  font-size: 0.815rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: var(--measure);
}
.exhibit figcaption b { color: var(--ink); font-weight: 600; }

/* Diagram primitives, themed from the same tokens */
.d-panel   { fill: var(--paper-2); stroke: var(--rule-strong); stroke-width: 1; }
.d-panel-2 { fill: var(--paper-3); stroke: var(--rule-strong); stroke-width: 1; }
.d-panel-a { fill: var(--accent-wash); stroke: var(--accent); stroke-width: 1.2; }
.d-panel-g { fill: var(--sage); stroke: var(--sage-deep); stroke-width: 1; }
.d-open    { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.d-hair    { fill: none; stroke: var(--rule); stroke-width: 1; }
.d-line    { fill: none; stroke: var(--rule-strong); stroke-width: 1.3; }
.d-line-a  { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.d-line-d  { fill: none; stroke: var(--rule-strong); stroke-width: 1.2; stroke-dasharray: 4 3; }
.d-rule    { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.d-bar     { fill: var(--sage-deep); }
.d-bar-a   { fill: var(--accent); }
.d-dot     { fill: var(--accent); }
.d-dot-o   { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }

.d-t {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 11px;
}
.d-t-b  { font-weight: 700; }
.d-t-s  { fill: var(--ink-3); font-size: 9.5px; }
.d-t-a  { fill: var(--accent); }
.d-t-m  { font-family: var(--mono); font-size: 10px; fill: var(--ink-2); }
.d-t-mb { font-family: var(--mono); font-size: 10.5px; fill: var(--ink); font-weight: 600; }
.d-t-h  {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  fill: var(--ink-3);
}
.d-t-num {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
}

.d-arrow { fill: var(--rule-strong); }
.d-arrow-a { fill: var(--accent); }

/* --------------------------------------------------------------------------
   12. Page-foot navigation & colophon
   -------------------------------------------------------------------------- */

.pagefoot {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 3px double var(--rule-strong);
  padding-top: 1.1rem;
  margin-top: 2.5rem;
  font-family: var(--sans);
}
.pagefoot a {
  display: block;
  max-width: 22rem;
  text-decoration: none;
  color: var(--ink);
}
.pagefoot a:hover .pf-title { color: var(--accent); text-decoration: underline; }
.pf-dir {
  display: block;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.15rem;
}
.pf-title { font-size: 0.98rem; font-family: var(--serif); }
.pagefoot .next { text-align: right; margin-left: auto; }

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 0;
  padding: 1.5rem 0 2.75rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--ink-3);
}
.colophon p { margin: 0 0 0.45rem; max-width: 72ch; }
.colophon a { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   13. Narrow-screen adjustments
   -------------------------------------------------------------------------- */

@media (max-width: 30rem) {
  body { font-size: 16px; }
  .masthead-meta { grid-template-columns: 1fr; }
  .term pre, .listing pre { font-size: 0.71rem; }
  table.stmt { font-size: 0.8rem; }
  .pagefoot { flex-direction: column; }
  .pagefoot .next { text-align: left; margin-left: 0; }
}

@media (min-width: 100rem) {
  :root { --measure: 74ch; }
}

/* --------------------------------------------------------------------------
   14. Print
   -------------------------------------------------------------------------- */

@media print {
  :root {
    --paper: #fff; --paper-2: #fff; --paper-3: #fff;
    --ink: #000; --ink-2: #222; --ink-3: #555;
    --rule: #bbb; --rule-strong: #666; --accent: #7c2d26;
  }
  .contents, .pagefoot, .skip-link { display: none; }
  .masthead::before { display: none; }
  .layout { display: block; }
  .exhibit, .section { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
