/* Layout: a 12-column Swiss grid drawn in hairlines; content sits in ruled cells, blue used only for action + one hero block */
  :root {
    --bg: #F3F2EE;
    --paper: #FBFAF7;
    --ink: #0F1117;
    --mute: #5C6070;
    --line: #C9CAD1;
    --blue: #1E3BE6;
    --blue-soft: #E3E7FD;
    --on-blue: #FFFFFF;
    --shadow: #0F1117;
    --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #101115; --paper: #16181E; --ink: #ECEBE6; --mute: #9A9EAD;
      --line: #2E313B; --blue: #6680FF; --blue-soft: #1B2147; --on-blue: #0B0D14; --shadow: #6680FF;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #101115; --paper: #16181E; --ink: #ECEBE6; --mute: #9A9EAD;
    --line: #2E313B; --blue: #6680FF; --blue-soft: #1B2147; --on-blue: #0B0D14; --shadow: #6680FF;
    color-scheme: dark;
  }

  html { scroll-behavior: smooth; }
  body {
    background: var(--bg); color: var(--ink);
    font-family: var(--f-display); font-size: 16px; line-height: 1.55;
    font-variation-settings: "wdth" 100;
    -webkit-font-smoothing: antialiased;
  }
  /* hairline grid paper behind everything */
  .gridpaper {
    background-image:
      linear-gradient(to right, var(--line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--line) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: -1px -1px;
  }
  .wrap { max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
  @media (min-width: 768px) { .wrap { padding-inline: 32px; } }

  .label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
  .mono { font-family: var(--f-mono); }
  h1, h2, h3 { text-wrap: balance; letter-spacing: -0.025em; line-height: 0.98; }
  .h-xxl { font-size: clamp(2.7rem, 7.6vw, 6.4rem); font-weight: 800; font-variation-settings: "wdth" 88; }
  .h-xl  { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 750; font-variation-settings: "wdth" 92; }
  .h-md  { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; }
  .prose-c { max-width: 64ch; }

  .rule { border-color: var(--ink); }
  .hair { border-color: var(--line); }

  /* brutalist controls: square, ink border, hard offset shadow */
  .btn {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
    border: 1.5px solid var(--ink); padding: .8rem 1.1rem;
    box-shadow: 4px 4px 0 var(--shadow);
    transition: transform .12s ease, box-shadow .12s ease;
  }
  .btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
  .btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
  .btn-blue { background: var(--blue); color: var(--on-blue); }
  .btn-plain { background: var(--paper); color: var(--ink); }

  a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--blue); outline-offset: 3px;
  }
  .navlink { font-family: var(--f-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: .35rem .1rem; border-bottom: 1.5px solid transparent; }
  .navlink:hover { color: var(--blue); }
  .navlink[aria-current="page"] { border-bottom-color: var(--blue); color: var(--blue); }

  .cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .field {
    width: 100%; background: var(--paper); color: var(--ink);
    border: 1.5px solid var(--ink); padding: .75rem .85rem; font-size: 15px; border-radius: 0;
  }
  .field::placeholder { color: var(--mute); }
  .chip { font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--ink); padding: .3rem .55rem; background: var(--paper); }
  .chip.on { background: var(--blue); color: var(--on-blue); border-color: var(--blue); }

  .legal h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: .6rem; scroll-margin-top: 110px; }
  .legal p, .legal li { color: var(--ink); opacity: .88; }
  .legal ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
  .legal li { padding-left: 1.3rem; position: relative; }
  .legal li::before { content: "—"; position: absolute; left: 0; color: var(--blue); }
  .legal section + section { border-top: 1px solid var(--line); padding-top: 2rem; }

  .page { animation: pagein .35s ease both; }
  @keyframes pagein { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .blink { animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  @media (prefers-reduced-motion: reduce) {
    .page, .blink { animation: none; }
    .btn, .btn:hover { transition: none; }
    html { scroll-behavior: auto; }
  }
  .tnum { font-variant-numeric: tabular-nums; }
  header.site { top: env(safe-area-inset-top, 0px); }
