/* PlotBridge: an engineering drawing sheet.
   Light theme = drafting vellum. Dark theme = blueprint.
   No external fonts: Bahnschrift (Windows) and DIN-style system faces carry
   the technical-drawing voice; everything else uses the system UI face. */

:root {
  --sheet: #f2f5f3;
  --panel: #ffffff;
  --ink: #17212b;
  --muted: #55626e;
  --rule: #b9c6c0;
  --rule-strong: #17212b;
  --grid: #dfe7e3;
  --grid-major: #c9d6d0;
  --accent: #1f4fb5;
  --accent-ink: #ffffff;
  --accent-hover: #173c8a;
  --alert: #a8231b;
  --alert-bg: #fbeceb;
  --note-bg: #eef3fb;
  --focus: #1f4fb5;

  /* Classic eight-pen carousel. */
  --pen-1: #17212b;
  --pen-2: #c62f28;
  --pen-3: #237a3b;
  --pen-4: #1f4fb5;
  --pen-5: #9b2f8a;
  --pen-6: #00808c;
  --pen-7: #a35f00;
  --pen-8: #6a7480;

  --font-display: Bahnschrift, "DIN Alternate", "DIN 2014", "D-DIN", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Type scale: 16px base, ratio 1.25 */
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: clamp(2.2rem, 1.4rem + 3.6vw, 3.815rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
  --radius: 3px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sheet: #0e2747;
    --panel: #123259;
    --ink: #e8eef6;
    --muted: #a9bcd2;
    --rule: #3a5b82;
    --rule-strong: #c9d8ea;
    --grid: #15365e;
    --grid-major: #1d4472;
    --accent: #9ccbff;
    --accent-ink: #0b2240;
    --accent-hover: #c6e1ff;
    --alert: #ffb4a8;
    --alert-bg: #3a2030;
    --note-bg: #173b66;
    --focus: #ffd166;

    --pen-1: #e8eef6;
    --pen-2: #ff8a80;
    --pen-3: #7fd99a;
    --pen-4: #9ccbff;
    --pen-5: #f0a6e4;
    --pen-6: #6fe0e8;
    --pen-7: #ffc46b;
    --pen-8: #b8c3cf;
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */

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

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

body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; max-width: 68ch; }

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

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

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

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.5rem 0.875rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

[hidden] { display: none !important; }

/* --------------------------------------------------------------- buttons */

.primary,
.secondary,
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.55rem 1.1rem;
  font: 600 var(--step-0)/1.2 var(--font-body);
  border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.secondary:hover { background: var(--grid); color: var(--ink); }
.ghost {
  background: none; color: var(--accent); min-height: 2.25rem; padding: 0.3rem 0.5rem;
  font-weight: 500; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px;
}
.ghost:hover { color: var(--accent-hover); }

.link-button {
  color: var(--accent); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px;
}

/* -------------------------------------------------------------- masthead */

.masthead { border-bottom: 1px solid var(--rule-strong); }
.masthead__row { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 2rem; height: 2rem; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.brand__arch { stroke: var(--accent); }
.brand__pen { fill: var(--ink); stroke: none; }
.brand__pen--two { fill: var(--pen-2); }
.brand__name { font: 600 var(--step-1)/1 var(--font-display); }

.nav { display: flex; gap: 1.25rem; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: var(--step--1); font-weight: 500; padding-block: 0.5rem; }
.nav a:hover { color: var(--accent); text-decoration: underline; }

.lang {
  margin-left: auto;
  display: inline-grid; place-items: center;
  min-width: 2.75rem; min-height: 2.75rem;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
  font: 600 var(--step--1)/1 var(--font-display); letter-spacing: 0.04em;
}
.nav + .lang { margin-left: 0; }
.lang:hover { background: var(--ink); color: var(--sheet); }

/* ------------------------------------------------------------------ hero */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule-strong); }

/* Drafting grid behind the hero; drifts slower than the page on scroll. */
.hero__grid {
  position: absolute; inset: -20% 0 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 6rem 6rem, 6rem 6rem, 1.2rem 1.2rem, 1.2rem 1.2rem;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  opacity: 0.75;
}

.hero__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.hero__copy { padding-top: 0.5rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Letter-by-letter headline (built by motion.js). */
.split__word { display: inline-block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; vertical-align: top; }
.split__char { display: inline-block; will-change: transform; }

/* ---------------------------------------------------------- plotter stage */

.stage { margin: 0; }
.stage__svg {
  display: block; width: 100%; height: auto;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -32px rgba(23, 33, 43, 0.35);
}
.stage__svg .pl { fill: none; stroke-width: 0.7; stroke-linecap: round; stroke-linejoin: round; }
.stage__svg .pl--guide { stroke: none; }
.stage__svg .pl--dim { stroke-width: 0.35; }
.stage__svg .stage__label { font: 600 4.6px var(--font-display); stroke: none; }
.stage__dim { font: 500 3.2px var(--font-display); fill: var(--pen-8); }
.stage__gantry rect { fill: var(--rule); opacity: 0.85; }
.stage__carriage { fill: var(--panel); stroke: var(--ink); stroke-width: 0.5; }
.stage__nib { stroke: none; }
.stage__head { will-change: transform; }

.stage__caption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem;
  margin-top: 0.6rem; font-size: var(--step--1); color: var(--muted);
}
.stage__replay { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; }
.stage__replay svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Pre-hide what motion.js will reveal, only until it takes over. */
.motion:not(.motion-ready) [data-intro],
.motion:not(.motion-ready) [data-reveal],
.motion:not(.motion-ready) .hero__title { opacity: 0; }

.hero__title {
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  font-stretch: condensed;
}

.hero__lead { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 34ch; }

.hero__points {
  list-style: none; margin: 2rem 0 0; padding: 0;
  border-top: 1px solid var(--rule);
  max-width: 34rem;
}
.hero__points li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.75rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
}
/* A registration cross: the drafting mark for "aligned". */
.hero__points li::before,
.hero__points li::after {
  content: ""; position: absolute; left: 0.35rem; top: 50%; background: var(--accent);
}
.hero__points li::before { width: 0.75rem; height: 1px; transform: translateY(-50%); }
.hero__points li::after { width: 1px; height: 0.75rem; left: 0.725rem; transform: translateY(-50%); }

/* ------------------------------------------------------------------ tool */

.tool {
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  scroll-margin-top: 1rem;
}
.tool:focus { outline: none; }

.drop {
  position: relative;
  margin: 0.75rem;
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem;
  text-align: center;
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius);
  /* A cutting-mat grid: 1 cm squares with 5 cm major lines. */
  background-color: var(--sheet);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 5rem 5rem, 5rem 5rem, 1rem 1rem, 1rem 1rem;
  background-position: -1px -1px;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.drop:focus-within { border-color: var(--focus); border-style: solid; }
.drop[data-state="over"] { border-color: var(--accent); border-style: solid; background-color: var(--note-bg); }
.drop[data-state="busy"] { opacity: 0.7; }

.drop__icon {
  width: 3rem; height: 3rem; margin-bottom: 0.75rem;
  fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round;
}
.drop__title { margin-inline: auto; font: 600 var(--step-2)/1.2 var(--font-display); max-width: 22ch; }
.drop__action { margin: 0.5rem auto 0; color: var(--muted); }
.drop__hint { margin: 0.75rem auto 0; font-size: var(--step--1); color: var(--muted); }
.drop .ghost { margin-top: 1rem; }

.status { margin: 0 1rem; min-height: 0; font-size: var(--step--1); color: var(--muted); }
.status:not(:empty) { padding-block: 0.5rem; }

.error {
  margin: 0 0.75rem 0.75rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--alert);
  background: var(--alert-bg);
  color: var(--ink);
}

.result { padding: 0.25rem 1.25rem 1.25rem; }
.result__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.result__title { font-size: var(--step-1); }
.result__files { font-size: var(--step--1); color: var(--muted); overflow-wrap: anywhere; }

.preview { margin: 0.75rem 0 0; }
.preview__svg {
  display: block; width: 100%; height: clamp(14rem, 40vw, 22rem);
  background-color: var(--sheet);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 1rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.preview__svg path,
.preview__svg circle { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.preview__svg text { stroke: none; font-family: var(--font-display); }
.preview__note { margin-top: 0.4rem; font-size: var(--step--1); color: var(--muted); }

.p1 { stroke: var(--pen-1); fill: var(--pen-1); }
.p2 { stroke: var(--pen-2); fill: var(--pen-2); }
.p3 { stroke: var(--pen-3); fill: var(--pen-3); }
.p4 { stroke: var(--pen-4); fill: var(--pen-4); }
.p5 { stroke: var(--pen-5); fill: var(--pen-5); }
.p6 { stroke: var(--pen-6); fill: var(--pen-6); }
.p7 { stroke: var(--pen-7); fill: var(--pen-7); }
.p8 { stroke: var(--pen-8); fill: var(--pen-8); }

.stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 1rem 0 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
.stats > div { padding: 0.5rem 0.75rem; border-left: 1px solid var(--rule); min-width: 0; }
.stats > div:first-child { border-left: 0; }
.stats dt { font-size: 0.75rem; color: var(--muted); }
.stats dd { margin: 0.1rem 0 0; font: 600 var(--step-0)/1.3 var(--font-display); overflow-wrap: anywhere; }

.pen-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pen-chip {
  display: inline-grid; place-items: center;
  min-width: 1.5rem; height: 1.5rem; padding: 0 0.3rem;
  border: 1.5px solid currentColor; border-radius: 50%;
  font-size: 0.75rem; line-height: 1;
}
.pen-chip.p1 { color: var(--pen-1); } .pen-chip.p2 { color: var(--pen-2); }
.pen-chip.p3 { color: var(--pen-3); } .pen-chip.p4 { color: var(--pen-4); }
.pen-chip.p5 { color: var(--pen-5); } .pen-chip.p6 { color: var(--pen-6); }
.pen-chip.p7 { color: var(--pen-7); } .pen-chip.p8 { color: var(--pen-8); }
.pen-chip { fill: none; }

.warnings { margin-top: 1rem; padding: 0.75rem 1rem; background: var(--note-bg); border-radius: var(--radius); }
.warnings h4 { font-size: var(--step-0); }
.warnings ul { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: var(--step--1); }
.warnings li + li { margin-top: 0.25rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

.settings { border-top: 1px solid var(--rule); }
.settings > summary {
  padding: 0.85rem 1.25rem; cursor: pointer;
  font: 600 var(--step-0)/1.2 var(--font-display);
  list-style-position: inside;
}
.settings > summary:hover { color: var(--accent); }
.settings__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; padding: 0.25rem 1.25rem 1.5rem; }

.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label:not(.choice),
.field > legend { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: var(--step--1); padding: 0; }
.field select {
  width: 100%; min-height: 2.75rem; padding: 0.4rem 0.6rem;
  font: inherit; font-size: var(--step--1); color: var(--ink);
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius);
}
.choice { display: flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; font-size: var(--step--1); cursor: pointer; }
.choice input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.help { margin-top: 0.35rem; font-size: 0.8125rem; color: var(--muted); }

/* --------------------------------------------------------------- sections */

.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section-title { font-size: var(--step-3); margin-bottom: 1.75rem; }
.section-title:has(+ .section-lead) { margin-bottom: 0.75rem; }
.section-lead { color: var(--muted); font-size: var(--step-1); margin-bottom: 1.75rem; max-width: 52ch; }

/* A drafting rule under each section title, drawn on scroll. */
.title-rule {
  display: block; width: 4.5rem; height: 3px; margin-top: 0.7rem;
  background: var(--accent); border-radius: 2px;
}

.converter-section .tool { max-width: 52rem; }

/* Elements waiting off-screen to slide in must never widen the page. */
main { overflow-x: clip; }

.how--pinned { min-height: 100vh; display: grid; align-content: center; }
.steps-wrap { position: relative; }
.steps__dim { display: block; width: 100%; height: 1.5rem; margin-bottom: 1.25rem; overflow: visible; }
.steps__dim path { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.band { background: var(--panel); border-block: 1px solid var(--rule-strong); padding-block: clamp(3rem, 7vw, 5rem); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.step { --step-fill: 1; counter-increment: step; padding: 0 1.5rem 0 0; }
.step + .step { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.step::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem; margin-bottom: 1rem;
  border: 1.5px solid var(--accent); border-radius: 50%;
  font: 600 var(--step-0)/1 var(--font-display);
  /* Fills with the accent as the step becomes active (animated by motion.js). */
  background: color-mix(in srgb, var(--accent) calc(var(--step-fill) * 100%), transparent);
  color: color-mix(in srgb, var(--accent-ink) calc(var(--step-fill) * 100%), var(--ink));
}
.step h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.step p { color: var(--muted); }

.formats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.format { padding: 1.5rem; }
.format + .format { border-left: 1px solid var(--rule-strong); }
.format h3 { display: flex; align-items: center; gap: 0.75rem; font-size: var(--step-2); margin-bottom: 1rem; }
.format__arrow { display: inline-block; width: 2.5rem; height: 1px; background: var(--ink); position: relative; }
.format__arrow::after {
  content: ""; position: absolute; right: 0; top: -4px;
  border-left: 8px solid var(--ink); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.format__to { color: var(--accent); }
.format p + p { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--rule); }

.faq { border-top: 1px solid var(--rule-strong); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 0; cursor: pointer; list-style: none;
  font: 600 var(--step-1)/1.3 var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.75rem; height: 0.75rem;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 150ms ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding-bottom: 1.25rem; color: var(--muted); }

/* ------------------------------------------------------------ title block */

.titleblock-wrap { padding-block: 2rem 3rem; }

.titleblock {
  width: 100%; max-width: 44rem; margin-left: auto;
  border-collapse: collapse;
  border: 2px solid var(--rule-strong);
  font-size: var(--step--1);
}
.titleblock th,
.titleblock td { border: 1px solid var(--rule-strong); padding: 0.45rem 0.7rem; text-align: left; vertical-align: top; }
.titleblock__brand { font: 700 var(--step-2)/1 var(--font-display); vertical-align: middle !important; width: 30%; }
.titleblock__label { display: block; font-size: 0.6875rem; color: var(--muted); margin-bottom: 0.1rem; }
.titleblock__cell--wide { width: 40%; }
.titleblock__links { display: table-cell; }
.titleblock__links a { margin-right: 1.25rem; display: inline-block; padding-block: 0.25rem; }

/* ------------------------------------------------------------------ prose */

.prose { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.prose h1 { font-size: var(--step-4); margin-bottom: 0.5rem; }
.prose h2 { font-size: var(--step-2); margin: 2.25rem 0 0.6rem; }
.prose p + p { margin-top: 0.9rem; }
.prose__meta { color: var(--muted); font-size: var(--step--1); margin-bottom: 1.5rem; }
.prose .secondary,
.prose .primary { margin-top: 1rem; }

.notfound__code { font: 700 clamp(4rem, 15vw, 9rem)/1 var(--font-display); color: var(--accent); }
.notfound [lang="fr"] { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 60rem) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__lead { max-width: 52ch; }
  .nav { display: none; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats > div:nth-child(4) { border-left: 0; }
  .stats > div:nth-child(n + 4) { border-top: 1px solid var(--rule); }
}

@media (max-width: 40rem) {
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .step, .step + .step { padding: 0; border-left: 0; }
  .formats { grid-template-columns: 1fr; }
  .format + .format { border-left: 0; border-top: 1px solid var(--rule-strong); }
  .settings__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(n) { border-left: 0; border-top: 1px solid var(--rule); }
  .stats > div:nth-child(even) { border-left: 1px solid var(--rule); }
  .stats > div:nth-child(-n + 2) { border-top: 0; }
  .titleblock__brand { font-size: var(--step-1); }
  .titleblock__links a { margin-right: 0.9rem; }
}

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

@media print {
  .masthead, .tool, .band, .faq, .skip, .stage, .hero__actions { display: none; }
}

/* ------------------------------------------------------------ interaction */

.primary, .secondary, .ghost, .lang, .link-button {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.primary:hover { box-shadow: 0 10px 24px -12px var(--accent); }
.primary:active, .secondary:active { transform: translateY(1px) scale(0.98); }

/* While a file converts, a pen line sweeps across the drop zone. */
.drop::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--accent); opacity: 0; pointer-events: none;
}
.drop[data-state="busy"]::after { opacity: 0.9; animation: plot-scan 1.1s ease-in-out infinite alternate; }
@keyframes plot-scan { from { transform: translateY(0); } to { transform: translateY(calc(var(--drop-h, 16rem) - 2px)); } }
.drop { --drop-h: 16rem; }

/* Dragging a file over the zone: the dashed frame starts moving. */
.drop[data-state="over"] { animation: drop-pulse 900ms ease-in-out infinite alternate; }
@keyframes drop-pulse { from { box-shadow: inset 0 0 0 0 var(--accent); } to { box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); } }
