/* ecadlib landing page, in the Hairline style of the web UI: one ground colour, 1px lines, mono labels,
   ink for what matters, motion that eases out (github.com/lucasmarkes/hairline) */
:root {
  color-scheme: light;
  --bg: #ffffff; --text: #232327; --muted: #6f6f78; --line: #e0e0e4; --line-2: #ececef; --hover: #f6f6f7;
  --trace: #d9d9de; --trace-hi: #232327;
  --copper: #c2622d;                                  /* brand accent: the mark's leaves, focus rings, one side trace per section */
  --trace-cu: color-mix(in srgb, var(--copper) 45%, var(--bg));
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --hairline-plate: var(--bg); --hairline-hi: #232327; --hairline-edge: #8f8f98; --hairline-mid: #b4b4bb; --hairline-lo: #e4e4e7;
  --pcb-board: #000000; --pcb-grid: #1c1c1c; --pcb-grid-major: #333333; --pcb-top: #ff0000; --pcb-silk: #ffff00;
  --pcb-fab: #ff00ff; --pcb-crtyd: #00d000; --pcb-text: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #08090a; --text: #d0d6e0; --muted: #8a8c95; --line: #29292d; --line-2: #1d1d20; --hover: #111214;
    --trace: #1f2023; --trace-hi: #d0d6e0; --copper: #e8834a;
    --hairline-hi: #fafafa; --hairline-edge: #a1a1aa; --hairline-mid: #52525b; --hairline-lo: #27272a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090a; --text: #d0d6e0; --muted: #8a8c95; --line: #29292d; --line-2: #1d1d20; --hover: #111214;
  --trace: #1f2023; --trace-hi: #d0d6e0; --copper: #e8834a;
  --hairline-hi: #fafafa; --hairline-edge: #a1a1aa; --hairline-mid: #52525b; --hairline-lo: #27272a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--text); color: var(--bg); }
a { color: inherit; }
code { font: 13px/1 var(--mono); padding: 1px 5px; border: 1px solid var(--line); border-radius: 5px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr { position: absolute; width: 0; height: 0; overflow: hidden; }
.skiplink { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 8px 14px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; white-space: nowrap; }
.skiplink:focus { top: 12px; outline: 2px solid var(--copper); outline-offset: 2px; }
:focus-visible { outline: 1.5px solid var(--copper); outline-offset: 3px; border-radius: 6px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .5s var(--ease); }
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 500 15px/1 var(--mono); letter-spacing: .02em; text-decoration: none; }
.brand .mark { width: 20px; height: 20px; flex: none; }
.nav nav { display: flex; gap: 22px; margin-left: 12px; }
.nav nav a { white-space: nowrap; font: 12.5px/1 var(--mono); color: var(--muted); text-decoration: none; position: relative; padding: 6px 0; transition: color .3s var(--ease); }
.nav nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.nav nav a:hover, .nav nav a.on { color: var(--text); }
.nav nav a:hover::after, .nav nav a.on::after { transform: scaleX(1); }
.nav nav a.on::after { background: var(--copper); }  /* the section you are in */
.navend { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 980px) { .nav nav { display: none; } }

/* buttons */
.btn, button { font: 13px/1 var(--sans); display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: transparent; color: var(--text); text-decoration: none; cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease), opacity .3s var(--ease); }
.btn:hover, button:hover { border-color: var(--text); }
.btn:active, button:active { transform: translateY(1px); }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.ghost { font: 11.5px/1 var(--mono); min-height: 30px; padding: 0 10px; color: var(--muted); }
.i { width: 15px; height: 15px; }

/* layout */
main { position: relative; }
section { position: relative; }
.block, .rail, .footin { max-width: 1200px; margin: 0 auto; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.block { padding-top: clamp(80px, 12vw, 150px); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow .num { color: var(--text); }
.eyebrow .num::after { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--copper); margin-left: 10px; vertical-align: 3px; }
.eyebrow .tick { width: 6px; height: 6px; border-radius: 50%; background: #2f8a57; box-shadow: 0 0 0 3px color-mix(in srgb, #2f8a57 18%, transparent); }
h1, h2, h3 { font-weight: 500; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.04em; }
h1 em { font-style: normal; color: var(--muted); }
h2 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.06; letter-spacing: -.035em; }
h3 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 6px; }
.lede { font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); max-width: 34em; margin: 24px 0 30px; }
.lede strong { color: var(--text); font-weight: 500; }
.sub { color: var(--muted); max-width: 40em; margin: 18px 0 0; }
.head { margin-bottom: 44px; }
.head:last-child { margin-bottom: 0; }
.head > .lines { max-width: 640px; }
.n { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.plate { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: hidden; }
.tags { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); z-index: 1; pointer-events: none; }
.tags span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }
.fig { width: 100%; aspect-ratio: 5 / 4; }
.fig.sm { width: 100%; }
.axis { display: flex; gap: 18px; justify-content: flex-end; padding: 0 14px 12px; margin-top: -30px; font-size: 11px; color: var(--muted); position: relative; }
.axis b { font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums; }

/* sources rail */
.rail { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 0; padding-bottom: 0; max-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.railtrack { display: flex; align-items: center; gap: 28px; width: max-content; padding: 16px 0; font-size: 12px; color: var(--muted); animation: marquee 48s linear infinite; }
.railtrack i { width: 4px; height: 4px; border-radius: 50%; border: 1px solid var(--muted); }
.rail:hover .railtrack { animation-play-state: paused; }

/* footprint section */
.fpwrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.spec { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.spechead, .pcbbar { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); }
#fpstate { color: var(--text); }
#fpstate::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; animation: blink 1.2s steps(2) infinite; }
#fpstate.done::before { animation: none; background: #2f8a57; }
#fpspec { margin: 0; padding: 14px 16px; font-size: 12px; line-height: 1.6; white-space: pre; overflow: auto; flex: 1; min-height: 300px; color: var(--muted); }
#fpspec .k { color: var(--text); }
#fpspec .caret { display: inline-block; width: 7px; height: 13px; background: var(--text); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
.ipc { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); }
.ipc div { padding: 10px 14px; border-right: 1px solid var(--line); }
.ipc div:last-child { border-right: 0; }
.ipc dt { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ipc dd { margin: 4px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.pcb { background: var(--pcb-board); display: flex; flex-direction: column; min-width: 0; }
.pcbbar { background: #111; color: #9a9a9a; border-bottom-color: #000; }
#fpname { color: #e6e6e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fpcoord { font-variant-numeric: tabular-nums; white-space: nowrap; }
svg.fp { display: block; width: 100%; flex: 1; aspect-ratio: 5 / 4; cursor: crosshair; }
svg.fp .grid { fill: none; stroke: var(--pcb-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
svg.fp .grid.major { stroke: var(--pcb-grid-major); }
svg.fp .origin { stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
svg.fp .draw { fill: none; stroke-width: var(--sw); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease); }
svg.fp .draw.on { stroke-dashoffset: 0; }
svg.fp .crtyd { stroke: var(--pcb-crtyd); }
svg.fp .fab { stroke: var(--pcb-fab); }
svg.fp .silk { stroke: var(--pcb-silk); stroke-width: var(--sw-silk); }   /* plain numbers set by site.js: Safari and Firefox drop a unitless calc() here and draw 1 mm */
svg.fp .silkfill { fill: var(--pcb-silk); opacity: 0; transition: opacity .6s var(--ease); }
svg.fp .silkfill.on { opacity: 1; }
svg.fp .pad { fill: var(--pcb-top); transform-box: fill-box; transform-origin: center; transform: scale(0); opacity: 0; transition: transform .7s var(--ease), opacity .4s var(--ease), stroke .3s; }
svg.fp .pad.on { transform: scale(1); opacity: 1; }
svg.fp .pad.hot, svg.fp .pad.focus.on { stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
svg.fp .padnum { fill: var(--pcb-text); font-family: var(--mono); text-anchor: middle; dominant-baseline: central; opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
svg.fp .padnum.on { opacity: .9; }
svg.fp .dim { stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; opacity: 0; transition: opacity .6s var(--ease); }
svg.fp .dimtxt { fill: #fff; font-family: var(--mono); opacity: 0; transition: opacity .6s var(--ease); }
svg.fp .dim.on, svg.fp .dimtxt.on { opacity: .85; }
svg.fp .draw.focus { stroke-width: var(--sw-focus); transition: stroke-width .5s var(--ease); }
svg.fp .pad.focus.on { stroke-width: 1.8; }
svg.fp .focuscap { opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
svg.fp .focuscap.on { opacity: 1; }
svg.fp .focuscap rect { fill: #000; fill-opacity: .78; stroke: #fff; stroke-opacity: .35; stroke-width: 1; vector-effect: non-scaling-stroke; }
svg.fp .focuscap text { fill: #fff; font-family: var(--mono); }
svg.fp .focuscap .capdim { fill: none; stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.layertabs { display: flex; overflow-x: auto; background: #1b1b1b; border-top: 1px solid #000; font: 11px/1 var(--sans); color: #d6d6d6; scrollbar-width: none; }
.layertabs span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; white-space: nowrap; border-right: 1px solid #000; }
.layertabs span:first-child { color: #9a9a9a; }
.layertabs span { transition: background .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease); }
.layertabs span.on { background: #2a2a2a; color: #fff; box-shadow: inset 0 2px 0 #fff; }
svg.fp :is(.pad, .silk, .silkfill, .fab, .crtyd, .padnum) { transition-property: transform, opacity, stroke, stroke-dashoffset, stroke-width; }
svg.fp[data-solo] :is(.pad.on, .silk, .silkfill.on, .fab, .crtyd, .padnum.on) { opacity: .16; }
svg.fp[data-solo="top"] :is(.pad.on, .padnum.on), svg.fp[data-solo="overlay"] :is(.silk, .silkfill.on), svg.fp[data-solo="mech13"] .fab, svg.fp[data-solo="mech15"] .crtyd { opacity: 1 !important; }
svg.fp[data-solo="top"] .pad.on:not(.focus) { opacity: .45 !important; }
.layertabs i { width: 9px; height: 9px; display: inline-block; border: 1px solid #000; }
.pkgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pkgs button { font: 11.5px/1 var(--mono); min-height: 30px; border-radius: 999px; padding: 0 12px 0 10px; color: var(--muted); position: relative; overflow: hidden; }
.pkgs button::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; margin-right: 2px; }
.pkgs button[aria-selected="true"] { color: var(--text); border-color: var(--text); }
.pkgs button[aria-selected="true"]::before { background: var(--text); }
.pkgs button .bar { position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--text); transform: scaleX(0); transform-origin: left; }
@media (max-width: 860px) { .fpwrap { grid-template-columns: minmax(0, 1fr); } .spec { border-right: 0; border-bottom: 1px solid var(--line); } #fpspec { min-height: 0; max-height: 220px; } }

/* split sections */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split .head { margin: 0; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split.rev > :first-child { order: 2; } }
.code { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; border-radius: 0; border-right: 1px solid var(--line); font: 11.5px/1 var(--mono); color: var(--muted); min-height: 38px; position: relative; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--text); transform: scaleX(0); transition: transform .5s var(--ease); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.code pre, .term pre { margin: 0; padding: 16px 18px; font-size: 12.5px; line-height: 1.7; overflow-x: auto; }
.code pre .c, .term pre .c { color: var(--muted); }
.code pre .s { color: var(--text); }
.code pre { min-height: 120px; animation: fadein .5s var(--ease) both; }

/* cards */
.grid2, .grid3 { display: grid; gap: 14px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; transition: border-color .4s var(--ease), transform .6s var(--ease); }
.card:hover { border-color: var(--muted); }
.card p:last-child { color: var(--muted); margin: 0; font-size: 14px; }
.lines { list-style: none; padding: 0; margin: 12px 0 0; }
.lines li { position: relative; padding: 9px 0 9px 20px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 14px; }
.lines li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 9px; height: 1px; background: var(--text); }

/* terminal */
.term { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.termbar { display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.termbar .copy { margin-left: auto; }
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line); }

/* running cost, set like an itemised bill */
.bill { margin-top: 28px; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 16px; max-width: 520px; }
.billhead { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.billhead span:last-child { text-transform: none; letter-spacing: 0; color: var(--text); }
.bill dl { margin: 0; display: grid; }
.bill dl div { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.bill dt { font-size: 14px; color: var(--muted); }
.bill dl div::after { content: ""; order: 1; flex: 1; min-width: 12px; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.bill dd { order: 2; margin: 0; font: 500 14px/1 var(--mono); color: var(--text); white-space: nowrap; text-align: right; }
.bill dd small { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); font-weight: 400; }
.bill .big dt { color: var(--text); }
.bill .big dd { font-size: 20px; letter-spacing: -.02em; }
.billfoot { margin: 10px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.billfoot code { white-space: nowrap; }
@media (max-width: 480px) { .bill .big dd { font-size: 17px; } .bill dt { font-size: 13px; } }

/* footer */
.foot { margin-top: clamp(90px, 12vw, 160px); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.footin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; padding-top: 56px; padding-bottom: 64px; position: relative; }
.brand.big { font-size: 22px; margin: 0 0 14px; }
.brand.big .mark { width: 28px; height: 28px; }
.credits p { margin: 0 0 12px; line-height: 1.6; }
@media (max-width: 760px) { .footin { grid-template-columns: 1fr; } }
.maker { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 6px; max-width: 46ch; }
.maker p { margin: 0; }
.maker .who { font-size: 20px; letter-spacing: -.01em; }
.maker .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* PCB traces behind every section, drawn in as they scroll into view */
.traces { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; height: 100%; pointer-events: none; z-index: -1; overflow: visible; }
.traces path { fill: none; stroke: var(--trace); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease); }
.traces.on path { stroke-dashoffset: 0; }
.traces circle { fill: var(--bg); stroke: var(--trace); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .8s var(--ease) 1.6s; }
.traces.on circle { opacity: 1; }
.traces .sig { fill: var(--trace-hi); stroke: none; opacity: 0; }
.traces.on .sig { opacity: .8; transition: opacity .6s var(--ease) 2s; }
.traces .cu { stroke: var(--trace-cu); }               /* one copper bus per section */
.traces .sig.cu { fill: var(--copper); }

/* motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.grid3 .reveal:nth-child(2), .grid2 .reveal:nth-child(2) { transition-delay: .08s; } .grid3 .reveal:nth-child(3) { transition-delay: .16s; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes fadein { from { opacity: 0; } }


/* illustrate: lines ink in, then settle to their own colour */
.undrawn, .drawing { transition: border-color .5s var(--ease), background-color .5s var(--ease), color .5s var(--ease) !important; }
.undrawn, .drawing:not(.inked) { border-color: transparent !important; }
.btn.primary:is(.undrawn, .drawing:not(.inked)) { background-color: transparent; color: var(--text); }
.inkbox { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 30; overflow: visible; }
.inkbox :is(rect, path) { fill: none; stroke: var(--text); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ink 1.4s var(--ease) forwards; transition: stroke .5s var(--ease), opacity .4s var(--ease) .5s; }
.inkbox.settle :is(rect, path) { stroke: var(--line); opacity: 0; }
.unwritten { clip-path: inset(0 100% 0 0); }
.writing { animation: write 1.1s var(--ease) both; }
@keyframes write { from { clip-path: inset(-4px 100% -4px -4px); } to { clip-path: inset(-4px -4px -4px -4px); } }
.reveal :is(h1, h2) { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease) .15s; }
.reveal.in :is(h1, h2) { clip-path: inset(0 0 0 0); }
/* one shared pen position per figure, so a figure that redraws itself mid-way (pointer, scroll camera) stays in step */
@property --ink { syntax: "<number>"; inherits: true; initial-value: 0; }
svg.inking { animation: inkpen 1.7s var(--ease) both; }
svg.inking :is(path, line, polyline, rect, circle)[pathLength] { stroke-dasharray: 1; stroke-dashoffset: var(--ink); vector-effect: none; }
svg.inking :is(path, rect, circle):not(.nf) { fill-opacity: clamp(0, calc(1.6 - var(--ink) * 2.6), 1); }
svg.inking :is(ellipse, text) { opacity: clamp(0, calc(1.6 - var(--ink) * 2.6), 1); }
@keyframes inkpen { from { --ink: 1; } to { --ink: 0; } }
@keyframes ink { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill-opacity: 1; } }
@keyframes showup { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .reveal :is(h1, h2) { clip-path: none; }
}
.note { font-size: 14px; margin-top: 24px; }

/* legal pages (terms.html, privacy.html) */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 40px) 40px; }
.legal h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin: 8px 0 18px; }
.legal h2 { font-size: 18px; font-weight: 500; margin: 40px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.legal .lede { font-size: 17px; line-height: 1.6; }
.legal ol, .legal ul { padding-left: 22px; }
.legal li { margin: 0 0 10px; }
.legal .caps { text-transform: uppercase; font-size: 13px; letter-spacing: .01em; }
.legal .source { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); line-height: 1.6; }
.legalfoot { max-width: 760px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 48px; border-top: 1px solid var(--line); }
.legalfoot a, .footlegal a { color: inherit; }
.footlegal { margin-top: 18px; }
