/* ============================================================
   A Workplace Field Guide — shared stylesheet
   Fonts are self-hosted (see /fonts) so no third-party requests
   are made when pages load.
   ============================================================ */

/* ---------- Self-hosted fonts ---------- */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('fonts/fraunces-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('fonts/fraunces-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('fonts/fraunces-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 900;
  font-display: swap; src: url('fonts/fraunces-latin-900-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('fonts/newsreader-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader'; font-style: italic; font-weight: 400;
  font-display: swap; src: url('fonts/newsreader-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('fonts/newsreader-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}


  :root {
    --paper: #faf7f0;
    --ink: #16140f;
    --ink-soft: #3d3a32;
    --rule: #16140f;
    --accent: #16140f;
    --highlight: #ffe566;
    --max-text: 44rem;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

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

  body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.175rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  /* ---------- Masthead ---------- */
  header.masthead {
    border-bottom: 4px solid var(--rule);
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .masthead .kicker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
  }

  /* ---------- Hero ---------- */
  .hero {
    border-bottom: 4px solid var(--rule);
    padding: 4.5rem 2rem 3.5rem;
  }
  .hero-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
    align-items: center;
  }
  .hero-art {
    width: clamp(13rem, 24vw, 19rem);
    justify-self: end;
  }
  .hero-art svg { display: block; width: 100%; height: auto; }
  .hero h1 {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: clamp(2.6rem, 7vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.015em;
    max-width: 18ch;
  }
  .hero h1 .underline {
    box-shadow: inset 0 -0.32em 0 var(--highlight);
  }
  .hero .dek {
    margin-top: 1.8rem;
    max-width: 38rem;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--ink-soft);
  }
  .hero .meta {
    margin-top: 2.2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
  }

  /* ---------- Layout: sticky TOC + article ---------- */
  .page {
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
    padding: 0 2rem;
  }
  nav.toc {
    position: sticky;
    top: 2rem;
    align-self: start;
    padding-top: 3.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.5;
  }
  nav.toc .toc-title {
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--rule);
    padding-bottom: 0.6rem;
    margin-bottom: 0.9rem;
    list-style: none;
    cursor: default;
  }
  nav.toc summary::-webkit-details-marker { display: none; }
  nav.toc .toc-caret { display: none; }
  section, .asterism { scroll-margin-top: 1.5rem; }
  nav.toc ol { list-style: none; counter-reset: toc; }
  nav.toc li { counter-increment: toc; margin-bottom: 0.65rem; }
  nav.toc a {
    color: var(--ink);
    text-decoration: none;
    display: block;
  }
  nav.toc a::before {
    content: counter(toc, decimal-leading-zero) " ";
    font-weight: 500;
  }
  nav.toc a:hover, nav.toc a:focus-visible {
    background: var(--highlight);
    outline: none;
  }

  article { padding: 3.5rem 0 5rem; max-width: var(--max-text); }

  /* ---------- Sections ---------- */
  section { margin-bottom: 4rem; }
  .section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
  }
  h2 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin-bottom: 1.3rem;
    border-top: 4px solid var(--rule);
    padding-top: 1.2rem;
  }
  h3 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 2rem 0 0.5rem;
  }
  p { margin-bottom: 1.15rem; }
  p:last-child { margin-bottom: 0; }
  strong { font-weight: 700; }
  em { font-style: italic; }

  .principle {
    border: 3px solid var(--rule);
    padding: 1.4rem 1.6rem;
    margin: 1.6rem 0;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.4;
    box-shadow: 7px 7px 0 var(--highlight);
  }

  /* Risk category cards */
  .risk {
    border-top: 2px solid var(--rule);
    padding: 1.4rem 0 0.4rem;
  }
  .risk:first-of-type { margin-top: 1.8rem; }
  .risk-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.55rem;
  }
  .risk-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid var(--rule);
    width: 2.1rem;
    height: 2.1rem;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .risk h3 { margin: 0; font-size: 1.3rem; }

  /* Template block */
  .template {
    background: var(--ink);
    color: var(--paper);
    padding: 2rem 2.2rem;
    margin: 1.8rem 0;
    font-size: 1.1rem;
    line-height: 1.7;
  }
  .template .tlabel {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper);
    border-bottom: 1px solid var(--paper);
    padding-bottom: 0.6rem;
    margin-bottom: 1.2rem;
    display: block;
  }
  .template .blank {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.92em;
    background: var(--highlight);
    color: var(--ink);
    padding: 0 0.25em;
    white-space: nowrap;
  }
  .template .blank.wrap { white-space: normal; }

  /* Counterargument pairs */
  .counter {
    margin: 1.4rem 0;
    border-left: 5px solid var(--rule);
    padding-left: 1.3rem;
  }
  .counter .they {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
  }
  .counter .they::before { content: "“"; }
  .counter .they::after { content: "”"; }
  .counter .you { margin-bottom: 0; color: var(--ink-soft); }

  /* Avoid list */
  .avoid-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    margin: 1.1rem 0;
    align-items: start;
  }
  .avoid-mark {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.85rem;
    border: 2px solid var(--rule);
    padding: 0.1rem 0.5rem;
    margin-top: 0.2rem;
  }
  .avoid-item p { margin: 0; }
  .avoid-item p strong { font-family: 'Fraunces', serif; }

  /* Closing */
  .closing {
    border: 4px solid var(--rule);
    padding: 2rem 2.2rem;
  }
  .closing h2 { border-top: none; padding-top: 0; }

  footer {
    border-top: 4px solid var(--rule);
    padding: 1.4rem 2rem 2.2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }

  /* ---------- Ornaments & icons ---------- */
  .section-label::before {
    content: "◆";
    font-size: 0.85em;
    margin-right: 0.55rem;
    position: relative;
    top: -0.05em;
  }
  .risk-icon {
    width: 2.1rem;
    height: 2.1rem;
    flex: none;
    border: 2px solid var(--rule);
    background: var(--highlight);
    padding: 0.42rem;
  }
  .risk-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: var(--ink);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .asterism {
    text-align: center;
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    letter-spacing: 0.8em;
    margin: 0 0 4rem;
    text-indent: 0.8em; /* balance letter-spacing */
  }

  ::selection { background: var(--highlight); }

  @media (max-width: 56rem) {
    .page { grid-template-columns: 1fr; gap: 0; padding: 0 1.25rem; }
    body { font-size: 1.08rem; }
    article { padding-top: 2rem; }

    /* hero & masthead */
    header.masthead { padding: 0.9rem 1.25rem; }
    header.masthead .kicker:last-child { display: none; }
    .hero { padding: 2.8rem 1.25rem 2.6rem; }
    .hero-inner { grid-template-columns: 1fr; gap: 2.2rem; }
    .hero-art { justify-self: start; width: clamp(11rem, 50vw, 14rem); }
    .hero .meta { gap: 1.2rem; }

    /* sticky collapsible contents bar */
    nav.toc {
      position: sticky;
      top: 0;
      z-index: 10;
      background: var(--paper);
      margin: 0 -1.25rem;
      padding: 0 1.25rem;
      border-bottom: 3px solid var(--rule);
    }
    nav.toc .toc-title {
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: none;
      margin-bottom: 0;
      padding: 0.95rem 0;
      -webkit-tap-highlight-color: transparent;
    }
    nav.toc .toc-caret {
      display: inline-block;
      transition: transform 0.15s ease;
    }
    nav.toc details[open] .toc-caret { transform: rotate(180deg); }
    nav.toc details[open] .toc-title { border-bottom: 2px solid var(--rule); }
    nav.toc ol {
      padding: 0.9rem 0 1rem;
      max-height: 60vh;
      overflow-y: auto;
    }
    nav.toc li { margin-bottom: 0; }
    nav.toc a { padding: 0.55rem 0; } /* comfortable tap targets */

    /* keep anchored headings clear of the sticky bar */
    section, .asterism { scroll-margin-top: 4.2rem; }

    /* content blocks */
    .principle { font-size: 1.15rem; padding: 1.1rem 1.2rem; box-shadow: 5px 5px 0 var(--highlight); }
    .template { padding: 1.5rem 1.3rem; font-size: 1.02rem; }
    .template .blank { white-space: normal; }
    .counter { padding-left: 1rem; }
    .closing { padding: 1.5rem 1.3rem; }
    footer { padding: 1.2rem 1.25rem 2rem; }
  }


  /* ---------- Site navigation ---------- */
  header.masthead { align-items: center; gap: 1.2rem; }
  .brand {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
  }
  nav.site-nav {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  nav.site-nav a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border: 2px solid transparent;
    padding: 0.3rem 0.6rem;
  }
  nav.site-nav a:hover, nav.site-nav a:focus-visible {
    border-color: var(--rule);
    outline: none;
  }
  nav.site-nav a.active {
    border-color: var(--rule);
    background: var(--highlight);
    font-weight: 500;
  }

  /* ---------- Sub-page hero ---------- */
  .hero.hero--sub { padding: 3.2rem 2rem 2.8rem; }
  .hero.hero--sub h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
  .page--single {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 2rem;
  }
  .page--single article { max-width: var(--max-text); }

  /* ---------- Incident cards ---------- */
  .incident {
    border: 3px solid var(--rule);
    padding: 1.5rem 1.7rem 1.4rem;
    margin: 0 0 2rem;
    background: var(--paper);
  }
  .incident-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
  }
  .tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    border: 2px solid var(--rule);
    padding: 0.12rem 0.5rem;
    background: var(--highlight);
  }
  .tag--plain { background: var(--paper); }
  .incident h3 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.35rem;
    margin: 0 0 0.6rem;
    line-height: 1.2;
  }
  .incident .cost {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    box-shadow: inset 0 -0.3em 0 var(--highlight);
  }
  .incident .use-when {
    border-top: 2px solid var(--rule);
    margin-top: 1rem;
    padding-top: 0.8rem;
    font-size: 1.05rem;
  }
  .incident .src {
    margin-top: 0.7rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
  }
  .incident .src a { color: var(--ink); }

  /* ---------- Calculator ---------- */
  .calc {
    border: 4px solid var(--rule);
    padding: 1.8rem;
    margin: 1.5rem 0 2.5rem;
  }
  .calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 2rem;
  }
  .field label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0.4rem;
  }
  .field .hint {
    display: block;
    font-size: 0.92rem;
    color: var(--ink-soft);
    margin-top: 0.35rem;
    line-height: 1.4;
  }
  .field input[type="number"] {
    width: 100%;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.05rem;
    padding: 0.55rem 0.7rem;
    border: 3px solid var(--rule);
    background: #fff;
    color: var(--ink);
    box-sizing: border-box;
  }
  .field input[type="number"]:focus {
    outline: none;
    box-shadow: 4px 4px 0 var(--highlight);
  }
  .calc-results {
    background: var(--ink);
    color: var(--paper);
    padding: 1.8rem 2rem;
    margin-top: 1.8rem;
  }
  .calc-results .rlabel {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: block;
    border-bottom: 1px solid var(--paper);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }
  .rgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.2rem;
  }
  .rstat .rnum {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: 1.9rem;
    line-height: 1.05;
    display: block;
  }
  .rstat .rcap {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
    margin-top: 0.3rem;
  }
  .verdict {
    border: 2px solid var(--paper);
    padding: 0.9rem 1.1rem;
    font-size: 1.08rem;
    line-height: 1.5;
  }
  .verdict strong { box-shadow: inset 0 -0.28em 0 var(--highlight); color: var(--paper); }

  /* ---------- Toolkit blocks ---------- */
  .toolblock { margin: 0 0 3.5rem; }
  .copywrap { position: relative; margin-top: 1rem; }
  pre.copyblock {
    border: 3px solid var(--rule);
    background: #fff;
    padding: 1.4rem 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
    margin: 0;
  }
  .copy-btn {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    border: 2px solid var(--rule);
    background: var(--highlight);
    color: var(--ink);
    padding: 0.35rem 0.7rem;
    cursor: pointer;
  }
  .copy-btn:hover { background: var(--ink); color: var(--paper); }
  .btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }
  a.dl-btn, button.dl-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    border: 3px solid var(--rule);
    background: var(--highlight);
    color: var(--ink);
    padding: 0.55rem 0.9rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
  }
  a.dl-btn:hover, button.dl-btn:hover { background: var(--ink); color: var(--paper); }
  button.dl-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--paper);
  }
  button.dl-btn:disabled:hover { background: var(--paper); color: var(--ink); }

  table.logtable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
  }
  table.logtable th, table.logtable td {
    border: 2px solid var(--rule);
    padding: 0.5rem 0.6rem;
    text-align: left;
    vertical-align: top;
  }
  table.logtable th {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--highlight);
  }
  .tablewrap { overflow-x: auto; }

  /* ---------- Playbooks ---------- */
  .rulebox {
    border-left: 5px solid var(--rule);
    padding: 0.2rem 0 0.2rem 1.2rem;
    margin: 1.2rem 0;
  }
  .rulebox .rname {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
  }

  @media (max-width: 56rem) {
    .page--single { padding: 0 1.25rem; }
    .hero.hero--sub { padding: 2.4rem 1.25rem 2.2rem; }
    .calc { padding: 1.2rem; }
    .calc-grid { grid-template-columns: 1fr; }
    .rgrid { grid-template-columns: 1fr; gap: 0.9rem; }
    nav.site-nav { gap: 0.15rem; }
    nav.site-nav a { padding: 0.3rem 0.45rem; font-size: 0.68rem; }
    pre.copyblock { font-size: 0.78rem; padding: 1.1rem 1rem; }
  }

  /* ---------- Footer credit & disclaimer ---------- */
  footer { display: block; }
  .footer-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .footer-note {
    margin-top: 1.5rem;
    border-top: 2px solid var(--rule);
    padding-top: 1.2rem;
    font-family: 'Newsreader', Georgia, serif;
    text-transform: none;
    letter-spacing: normal;
    max-width: var(--max-text);
  }
  .footer-note .credit {
    font-size: 1rem;
    margin: 0 0 0.7rem;
    line-height: 1.5;
  }
  .footer-note a { color: var(--ink); }
  .footer-note a:hover, .footer-note a:focus-visible {
    background: var(--highlight);
    outline: none;
  }
  .footer-note .disclaimer {
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--ink-soft);
    margin: 0;
  }

  /* ---------- Mobile nav refinements ---------- */
  @media (max-width: 56rem) {
    header.masthead {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.55rem;
      padding-bottom: 0.7rem;
    }
    nav.site-nav {
      width: calc(100% + 1.25rem);
      flex-wrap: nowrap;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      gap: 0.2rem;
      margin: 0 -1.25rem 0 0;
      padding-right: 1.25rem;
    }
    nav.site-nav::-webkit-scrollbar { display: none; }
    nav.site-nav a {
      white-space: nowrap;
      padding: 0.45rem 0.6rem;
      font-size: 0.7rem;
    }
  }

  /* ---------- Mobile component polish ---------- */
  @media (max-width: 56rem) {
    .incident { padding: 1.1rem 1rem 1rem; }
    .incident h3 { font-size: 1.18rem; }
    .rulebox { padding-left: 0.9rem; }
    .toolblock { margin-bottom: 2.6rem; }
    footer { padding: 1.2rem 1.25rem 2rem; }
    .footer-top { flex-direction: column; gap: 0.5rem; }
    .footer-note { margin-top: 1.1rem; padding-top: 1rem; }
    .calc-results { padding: 1.3rem 1.1rem; }
    .rstat .rnum { font-size: 1.6rem; }
  }

  /* ---------- Skip link ---------- */
  .skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    background: var(--ink);
    color: var(--paper);
    padding: 0.7rem 1.1rem;
    text-decoration: none;
  }
  .skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
    outline: 3px solid var(--highlight);
  }

  /* ---------- Inline kicker labels (formerly CSS-generated text) ---------- */
  .klabel {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ink);
  }

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

  /* ---------- Print ---------- */
  @media print {
    header.masthead, .hero, nav.toc, .footer-top, .footer-note .credit,
    .skip-link, .copy-btn, .btn-row, .asterism { display: none !important; }
    footer { border-top: 1px solid #000; padding: 0.8rem 0 0; }
    .footer-note { margin-top: 0; border-top: none; padding-top: 0; max-width: none; }
    .footer-note .disclaimer { font-size: 8pt; color: #000; }
    body { background: #fff; color: #000; font-size: 11pt; }
    .page, .page--single { display: block; max-width: none; padding: 0; }
    article { max-width: none; padding: 1rem 0; }
    section { break-inside: avoid-page; margin-bottom: 2rem; }
    .incident, .closing, .principle, .calc, pre.copyblock { break-inside: avoid; box-shadow: none; }
    .template, .calc-results { background: #fff; color: #000; border: 2px solid #000; }
    .template .tlabel, .calc-results .rlabel { color: #000; border-color: #000; }
    .verdict { border-color: #000; }
    .verdict strong, .template .blank, .incident .cost,
    .hero h1 .underline { box-shadow: none; background: none; }
    a { color: #000; }
    .incident .src a::after, p.src a::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  }
