:root {
  /* Writing-paper theme: cream sheet, blue rules, red margin, ballpoint-blue ink. */
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #1d2433;
  --ink-2: #3c4558;
  --muted: #70778a;
  --line: #d6dbe8;
  --line-strong: #bcc3d4;
  --frame: #c3cadb;
  --pen-bg: transparent;
  --pen-pad: 0px;
  --rule: rgba(84, 128, 190, 0.09);
  --margin: rgba(214, 84, 72, 0.38);
  --accent: #1f3b8f;
  --focus: #c0392b;
  --danger: #b4231a;
  --warn-bg: #fbf5e6;
  --warn-ink: #6b4d00;
  --ok: #1f7a4d;
  --on-accent: #ffffff;
  --accent-hover: #2a49a8;
  --accent-disabled: #9aa3bd;
  --hover: #eff2f8;
  --hover-soft: #f7f9fc;
  --check: #eff2f8;
  --mono-bg: #2d3033;
  --shadow: rgba(0, 0, 0, 0.1);
  --ring: rgba(17, 17, 19, 0.08);
  --st-new-bg: #e4ecff; --st-new: #1d47b5;
  --st-wait-bg: #fbf1d9; --st-wait: #7a5600;
  --st-quote-bg: #efe7fb; --st-quote: #5a2fa0;
  --st-ok-bg: #e1f3ea; --st-ok: #1b6b43;
  --st-done-bg: #e9e9e6; --st-done: #3a3a3d;
  --st-cancel-bg: #fbe5e3; --st-cancel: #9c251c;
  --radius: 14px;
  --radius-sm: 9px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1440px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --header-h: 76px;
  color-scheme: light;
}

/* Dark theme: explicit choice, or the system preference when the visitor chose "auto". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141822; --surface: #1b2030; --ink: #eceef5; --ink-2: #c3c8d6; --muted: #8b93a8;
    --line: #2a3144; --line-strong: #3a4360; --frame: #3f4968; --pen-bg: #ffffff; --pen-pad: clamp(8px, 2.2%, 18px); --rule: rgba(130, 165, 220, 0.045); --margin: rgba(230, 110, 100, 0.28); --accent: #9db8ff; --focus: #ff8a7d; --danger: #ff6b5f;
    --warn-bg: #2c2513; --warn-ink: #f1d488; --ok: #3aa874;
    --on-accent: #141822; --accent-hover: #c2d3ff; --accent-disabled: #4a5370;
    --hover: #242b3d; --hover-soft: #1e2435; --check: #222a3c; --mono-bg: #0d1018;
    --shadow: rgba(0, 0, 0, 0.5); --ring: rgba(242, 242, 244, 0.12);
    --st-new-bg: #17264d; --st-new: #9db8ff; --st-wait-bg: #33290f; --st-wait: #f1d488;
    --st-quote-bg: #2a1d45; --st-quote: #c9adf5; --st-ok-bg: #12301f; --st-ok: #7fd3a5;
    --st-done-bg: #26262a; --st-done: #c9c9ce; --st-cancel-bg: #3a1714; --st-cancel: #ff9b92;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141822; --surface: #1b2030; --ink: #eceef5; --ink-2: #c3c8d6; --muted: #8b93a8;
  --line: #2a3144; --line-strong: #3a4360; --frame: #3f4968; --pen-bg: #ffffff; --pen-pad: clamp(8px, 2.2%, 18px); --rule: rgba(130, 165, 220, 0.045); --margin: rgba(230, 110, 100, 0.28); --accent: #9db8ff; --focus: #ff8a7d; --danger: #ff6b5f;
  --warn-bg: #2c2513; --warn-ink: #f1d488; --ok: #3aa874;
  --on-accent: #141822; --accent-hover: #c2d3ff; --accent-disabled: #4a5370;
  --hover: #242b3d; --hover-soft: #1e2435; --check: #222a3c; --mono-bg: #0d1018;
  --shadow: rgba(0, 0, 0, 0.5); --ring: rgba(242, 242, 244, 0.12);
  --st-new-bg: #17264d; --st-new: #9db8ff; --st-wait-bg: #33290f; --st-wait: #f1d488;
  --st-quote-bg: #2a1d45; --st-quote: #c9adf5; --st-ok-bg: #12301f; --st-ok: #7fd3a5;
  --st-done-bg: #26262a; --st-done: #c9c9ce; --st-cancel-bg: #3a1714; --st-cancel: #ff9b92;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(to bottom, transparent 31px, var(--rule) 31px, var(--rule) 32px);
  background-size: 100% 32px;
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Red margin line of a writing pad, behind the content. */
body::before { content: ""; position: fixed; z-index: -1; top: 0; bottom: 0; left: clamp(12px, 2.6vw, 38px); width: 1px; background: var(--margin); pointer-events: none; }
img, svg { display: block; max-width: 100%; }
.pen { width: 100%; height: auto; overflow: visible; }
/* The photos' uncut areas (under the clip) are opaque white and their soft edges look ragged on dark, so in the
   dark theme every pen sits on a white sheet with some padding around it. Light theme: page is white already. */
.pen { background: var(--pen-bg); border-radius: 12px; box-sizing: border-box; padding: var(--pen-pad); }
.pen--detail { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pre { white-space: pre-wrap; }

/* ---------- type */
.display {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin: 0 0 20px;
  max-width: 13ch;
}
.h1 { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.025em; line-height: 1.1; font-weight: 650; margin: 0 0 8px; }
.h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 46px); letter-spacing: -0.03em; line-height: 1.08; font-weight: 650; margin: 0 0 14px; }
.h3 { font-size: 18px; letter-spacing: -0.01em; font-weight: 620; margin: 0 0 14px; }
.h4 { font-size: 14px; font-weight: 620; margin: 22px 0 10px; }
.eyebrow { font-size: 14px; font-weight: 560; color: var(--muted); margin: 0 0 18px; letter-spacing: 0.01em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 56ch; margin: 0 0 18px; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 560; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--accent-disabled); cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-row.center { justify-content: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); cursor: pointer; font-size: 14px; }
.link-btn:hover { text-decoration-color: var(--ink); }
.link-btn.danger { color: var(--danger); }
.chip-btn { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 14px; }
.chip-btn:hover { border-color: var(--ink); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 20px; line-height: 1; display: grid; place-items: center; padding: 0 0 2px; }
.icon-btn:hover { border-color: var(--ink); }

/* ---------- header / footer */
.site-header { position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark .logo { display: block; height: 40px; width: auto; }
.admin-tag { font-style: normal; font-weight: 500; letter-spacing: 0; font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.header-nav { display: flex; align-items: center; gap: 14px; }
/* floating settings menu (language, theme) */
.float-menu { position: fixed; top: calc((var(--header-h) - 36px) / 2); right: max(12px, calc((100vw - var(--wrap)) / 2 + var(--gutter) - 8px)); z-index: 40; }
.float-toggle { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 6px 20px -12px var(--shadow); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); }
.float-toggle:hover { border-color: var(--line-strong); }
.float-toggle svg { width: 18px; height: 18px; }
.float-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 264px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 18px 40px -18px var(--shadow); display: grid; gap: 12px; }
.float-panel h2 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; letter-spacing: 0.02em; }
.float-panel .segmented { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; border-radius: 18px; }
.float-panel .segmented button { flex: 1 0 30%; padding: 0 8px; }
.float-panel .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 560; box-shadow: 0 1px 3px var(--shadow); }
.float-panel .lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.float-panel .lang-list button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink-2); font-size: 13.5px; cursor: pointer; }
/* Trim the line box to cap height so flex centering centres the letters, not the font's ascent/descent box.
   Browsers without text-box ignore it and fall back to line-height: 1 centring. */
.float-panel .lang-list button { line-height: 1; }
.float-panel .lang-list button b, .float-panel .lang-list button span { line-height: 1; text-box: trim-both cap alphabetic; }
.float-panel .lang-list button b { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.float-panel .lang-list button:hover { background: var(--bg); }
.float-panel .lang-list button[aria-pressed="true"] { background: var(--bg); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.float-panel .lang-list button[aria-pressed="true"] b { color: var(--ink); }
.float-panel hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.float-panel a { font-size: 14px; text-decoration: none; }
.float-panel a:hover { text-decoration: underline; }
.page-admin .header-nav { margin-right: 76px; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.footer-inner .muted { max-width: 60ch; }

/* ---------- home */
/* The hero fills the first screen: copy on top, the pen and its colours below. */
.hero { min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: space-evenly; gap: clamp(12px, 3vh, 36px); padding: clamp(8px, 2vh, 24px) 0 clamp(20px, 4vh, 40px); overflow: hidden; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px clamp(24px, 4vw, 72px); align-items: end; width: 100%; }
.hero-copy .display { margin: 0; max-width: 14ch; font-size: clamp(40px, min(6vw, 9.5vh), 92px); }
.hero-copy .eyebrow { margin-bottom: 12px; }
.hero-copy .lead { margin-bottom: 0; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 22px; }
.hero-note { color: var(--muted); font-size: 14px; }
.hero-stage { width: 100%; }
.hero-models { margin-bottom: clamp(8px, 2vh, 24px); }
.hero-pen { width: min(100%, max(560px, (100svh - 470px) * 8.6)); margin: 0 auto; filter: drop-shadow(0 30px 40px var(--shadow)); }
.hero-colors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: clamp(10px, 2.4vh, 28px) auto 0; max-width: 760px; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.14), inset 0 6px 8px rgba(255,255,255,0.28); transition: transform .15s; }
.dot:hover { transform: scale(1.12); }
.dot[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.14), 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.hero-color-name { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 0; min-height: 1.5em; }

.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.detail-shot { background: var(--surface); border-radius: 22px; padding: clamp(20px, 3vw, 40px) clamp(8px, 2vw, 24px); }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); margin-top: clamp(40px, 6vw, 72px); }
.points h3 { font-size: 17px; margin: 0 0 6px; font-weight: 620; }
.points p { margin: 0; color: var(--muted); }

.color-gallery { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.gallery-item { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; text-decoration: none; padding: 12px 10px 14px; border-radius: 12px; transition: background-color .15s; }
.gallery-item:hover { background: var(--surface); }
.gallery-item svg { grid-column: 1 / -1; margin-bottom: 6px; }
.gallery-name { font-size: 14.5px; font-weight: 540; }
.gallery-finish { font-size: 12.5px; color: var(--muted); }

.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.example { margin: 0; background: var(--surface); border-radius: 18px; padding: 18px 10px 14px; }
.example figcaption { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 4px; }

.table-scroll { overflow-x: auto; margin-top: 28px; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 13px 14px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 15px; font-weight: 640; border-bottom-color: var(--line-strong); }
.compare thead a { text-decoration: none; }
.compare thead a:hover { text-decoration: underline; text-underline-offset: 3px; }
.compare thead th:first-child { width: 19%; }
.compare tbody th { color: var(--muted); font-weight: 400; }
.compare td { font-weight: 500; }
.section-final .lead { margin-left: auto; margin-right: auto; }
.section-final .btn { margin-top: 12px; }

/* model switchers (hero, colour gallery) */
.hero-models { display: flex; justify-content: center; overflow-x: auto; scrollbar-width: none; padding: 3px 2px; }
.hero-models .segmented, .colors-tabs { flex: none; }
.colors-tabs { margin: 24px 0 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px 2px; }
.segmented button { white-space: nowrap; }

.model-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.model-tile { display: grid; gap: 4px; background: var(--surface); border-radius: 20px; padding: 22px 22px 20px; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.model-tile:hover { box-shadow: 0 10px 30px -18px var(--shadow); transform: translateY(-1px); }
.model-tile-pen { display: block; margin: 0 -6px 14px; }
.model-tile-name { font-family: var(--font-display); font-size: 21px; font-weight: 650; letter-spacing: -0.02em; }
.model-tile-tagline { color: var(--muted); font-size: 14.5px; }
.model-tile-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.model-tile-cta { margin-top: 14px; font-size: 14.5px; font-weight: 560; }

/* ---------- configurator */
.cfg {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(480px, 1fr); gap: clamp(24px, 3vw, 48px);
  max-width: 1680px; margin: 0 auto; padding: 8px var(--gutter) 80px; align-items: start;
}
.cfg-stage { position: sticky; top: 16px; background: var(--surface); border-radius: 22px; padding: 18px 20px 16px; display: flex; flex-direction: column; min-height: min(680px, calc(100vh - 32px)); }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stage-label { font-size: 13px; color: var(--muted); font-weight: 560; }
.segmented { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: none; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 560; box-shadow: 0 1px 3px var(--shadow); }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 0; min-height: 300px; }
.stage-single, .stage-empty { width: 100%; }
.stage-empty { text-align: center; color: var(--muted); }
.stage-empty svg { opacity: 0.35; margin-bottom: 12px; }
.stage-caption { text-align: center; font-size: 14px; margin: 18px 0 0; }
.stage-caption .caption-code { color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-detail svg { touch-action: none; }
.pen-logo-hit { cursor: grab; touch-action: none; }
.pen-logo-hit:active { cursor: grabbing; }
.stage-all { width: 100%; display: grid; gap: 4px; max-height: 64vh; overflow: auto; padding: 2px 4px 2px 2px; }
.stage-all-item { display: grid; grid-template-columns: 1fr; border: 0; background: none; padding: 6px 8px; border-radius: 12px; cursor: pointer; text-align: left; }
.stage-all-item:hover { background: var(--bg); }
.stage-all-item.is-active { background: var(--bg); }
.stage-all-item span { font-size: 13px; color: var(--muted); margin: -2px 0 0 4px; }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.stage-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stage-chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px; scrollbar-width: none; }
.chip { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.chip.is-active { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.stage-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.cfg-steps { min-width: 0; padding-top: 6px; }

/* stepper: one step visible at a time */
.stepper ol { list-style: none; margin: 18px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.stepper li { position: relative; }
.stepper li + li::before { content: ""; position: absolute; top: 14px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 1.5px; background: var(--line-strong); }
.stepper button { width: 100%; display: grid; justify-items: center; gap: 6px; border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--muted); font-size: 12.5px; line-height: 1.25; text-align: center; }
.stepper button:disabled { cursor: default; opacity: 0.55; }
.stepper-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); background: var(--bg); font-weight: 620; font-size: 13px; transition: background-color .15s, border-color .15s; }
.stepper button:not(:disabled):hover .stepper-num { border-color: var(--ink); }
.stepper .is-done { color: var(--ink-2); }
.stepper .is-done .stepper-num { border-color: var(--ink); color: var(--ink); }
.stepper .is-current { color: var(--ink); font-weight: 600; }
.stepper .is-current .stepper-num { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cfg-steps .step-head .step-num { display: none; }
.cfg-steps .step { border-bottom: 0; padding-bottom: 12px; }
.step-nav { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 0 18px; margin-top: 8px; background: linear-gradient(to bottom, transparent, var(--bg) 14px); }
.step-nav .btn-primary { margin-left: auto; }
.step-hint { flex: 1; margin: 0; font-size: 13px; color: var(--muted); text-align: right; line-height: 1.35; }
.step-hint:empty { display: none; }
.step-hint.is-alert { color: var(--danger); animation: nudge .35s ease; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.step { padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.step-head h2 { font-size: 21px; letter-spacing: -0.015em; margin: 0; font-weight: 640; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 620; display: grid; place-items: center; flex: none; }
.step-lead { color: var(--muted); margin: 0 0 18px; }

.model-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.model-card { display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1px solid transparent; border-radius: 14px; padding: 14px 14px 13px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.model-card:hover { border-color: var(--line-strong); }
.model-card.is-selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.model-pen { display: block; margin: 0 -4px 8px; }
.model-name { font-size: 15.5px; font-weight: 620; }
.model-tagline { font-size: 13px; color: var(--muted); line-height: 1.4; }
.model-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.pdf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 18px 0 6px; }
.pdf-row small { flex: 1 1 220px; }

.variant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.variant { display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.variant.is-selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.variant-toggle { position: relative; display: grid; grid-template-columns: 1fr; align-content: start; flex: 1; gap: 1px; width: 100%; border: 0; background: none; cursor: pointer; text-align: left; padding: 34px 12px 12px; border-radius: 14px; }
.variant-pen { margin: 0 -2px 10px; }
.variant-name { font-size: 14px; font-weight: 560; line-height: 1.3; }
.variant-finish { font-size: 12px; color: var(--muted); }
.variant-code { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.variant-check { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.variant.is-selected .variant-check { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--ink); }
.qty { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; margin: 0 10px 10px; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; height: 36px; }
.qty-btn { border: 0; background: var(--bg); height: 100%; cursor: pointer; font-size: 17px; }
.qty-btn:hover { background: var(--hover); }
.qty input { border: 0; text-align: center; width: 100%; min-width: 0; height: 100%; font-variant-numeric: tabular-nums; font-weight: 560; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input[aria-invalid="true"] { color: var(--danger); }
.qty-error { display: block; color: var(--danger); font-size: 12px; margin: -4px 10px 10px; line-height: 1.35; }
.selection-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 14.5px; font-weight: 520; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: center; transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); background: var(--hover-soft); }
.dz-icon { color: var(--muted); margin-bottom: 4px; }
.dz-title { font-weight: 580; }
.dz-sub { color: var(--ink-2); font-size: 14.5px; }
.dz-formats { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.error-text { color: var(--danger); font-size: 14px; margin: 10px 0 0; }

.logo-panel { display: grid; gap: 16px; }
.logo-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.logo-compare figure { margin: 0; }
.logo-compare figcaption, .file-previews figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.logo-frame { height: 120px; border-radius: 12px; display: grid; place-items: center; padding: 14px; background-color: var(--surface); background-image: linear-gradient(45deg, var(--check) 25%, transparent 25%), linear-gradient(-45deg, var(--check) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--check) 75%), linear-gradient(-45deg, transparent 75%, var(--check) 75%); background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; border: 1px solid var(--line); }
.logo-frame { overflow: hidden; }
.logo-frame img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.logo-frame-mono { background: var(--mono-bg); border-color: var(--mono-bg); }
.logo-file { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 520; }
.file-actions { display: flex; gap: 16px; flex: none; }
.settings { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.settings summary { padding: 12px 14px; cursor: pointer; font-weight: 560; font-size: 14.5px; }
.settings-body { display: grid; gap: 14px; padding: 4px 14px 14px; }
.range { display: grid; gap: 4px; font-size: 14px; }
.range > span { display: flex; justify-content: space-between; gap: 12px; }
.range output { color: var(--muted); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--ink); height: 22px; margin: 0; }
input[type="range"]:disabled { opacity: 0.4; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
.field-inline { display: grid; gap: 6px; font-size: 14px; }
select, .field input, .field textarea, .admin-filters input, .status-form input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding: 10px 12px; min-height: 42px;
}
select:focus, .field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.warnings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.warnings li { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px 10px 36px; font-size: 13.5px; line-height: 1.45; position: relative; }
.warnings li::before { content: "!"; position: absolute; left: 12px; top: 10px; width: 16px; height: 16px; border-radius: 50%; background: #e2b33c; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.radio-list { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.radio-list legend { font-weight: 560; font-size: 14.5px; margin-bottom: 8px; padding: 0; }
.radio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 14.5px; }
.radio input { accent-color: var(--ink); margin: 0; }
.refill-dot { width: 12px; height: 12px; border-radius: 50%; }
.refill-blue { background: #2346a8; }
.refill-black { background: #1b1b1b; }
.refill-red { background: #c8231c; }

.summary-list { margin: 0 0 28px; background: var(--surface); border-radius: var(--radius); padding: 4px 18px; }
.summary-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; min-width: 0; }
.summary-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.summary-lines li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); vertical-align: -2px; }
.sw-row { display: inline-flex; gap: 3px; flex-wrap: wrap; max-width: 140px; }
.summary-logo { display: inline-flex; align-items: center; justify-content: center; background: var(--mono-bg); border-radius: 6px; padding: 4px 8px; margin-right: 8px; vertical-align: middle; }
.summary-logo img { height: 18px; width: auto; max-width: 120px; }

.order-form { display: grid; gap: 14px; }
.type-cards { border: 0; padding: 0; margin: 0 0 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-card { position: relative; display: grid; gap: 3px; padding: 14px 14px 14px 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.type-card input { position: absolute; left: 14px; top: 16px; accent-color: var(--ink); margin: 0; }
.type-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.type-title { font-weight: 580; font-size: 14.5px; }
.type-hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 520; }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .field textarea { font-weight: 400; font-size: 15px; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12.5px; font-weight: 400; min-height: 0; }
.field-error:empty { display: none; }
.consent span { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.incomplete { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.incomplete p { margin: 0 0 4px; font-weight: 560; }
.incomplete ul { margin: 0; padding-left: 18px; }

.confirm { padding: clamp(48px, 9vw, 110px) 0; }
.confirm-check { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto 22px; }
.confirm .lead { margin-left: auto; margin-right: auto; }
.confirm-id { display: inline-flex; flex-direction: column; gap: 2px; background: var(--surface); padding: 14px 26px; border-radius: 14px; margin: 8px 0 24px; font-size: 13px; color: var(--muted); }
.confirm-id strong { font-family: var(--mono); color: var(--ink); font-size: 20px; letter-spacing: 0.02em; }
.confirm-preview { max-width: 820px; margin: 0 auto 20px; }

/* ---------- admin */
.admin { padding-top: 32px; padding-bottom: 80px; }
.login-card { max-width: 380px; margin: 8vh auto; display: grid; gap: 14px; background: var(--surface); padding: 32px; border-radius: 20px; }
.admin-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-filters input { width: 260px; }
.admin-filters select { width: auto; }
.table-wrap { background: var(--surface); border-radius: var(--radius); overflow-x: auto; }
.orders-table, .lines-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders-table th { text-align: left; font-weight: 560; color: var(--muted); font-size: 12.5px; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.orders-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.orders-table tbody tr { cursor: pointer; }
.orders-table tbody tr:hover { background: var(--hover-soft); }
.orders-table tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-block; font-size: 12.5px; font-weight: 560; padding: 3px 10px; border-radius: 999px; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.status-new { background: var(--st-new-bg); color: var(--st-new); }
.status-review, .status-awaiting_approval { background: var(--st-wait-bg); color: var(--st-wait); }
.status-quote_sent { background: var(--st-quote-bg); color: var(--st-quote); }
.status-approved, .status-in_production { background: var(--st-ok-bg); color: var(--st-ok); }
.status-completed { background: var(--st-done-bg); color: var(--st-done); }
.status-cancelled { background: var(--st-cancel-bg); color: var(--st-cancel); }
.back-link { display: inline-block; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 14px; }
.back-link:hover { color: var(--ink); }
.detail-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
.detail-head p { margin: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.detail-grid .panel:first-child { grid-column: 1; grid-row: span 2; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; min-width: 0; }
.admin-pens { display: grid; gap: 2px; }
.admin-pens figure { margin: 0; }
.admin-pens figcaption { font-size: 12.5px; color: var(--muted); margin: -4px 0 6px 6px; }
.admin-detail-pen { background: var(--bg); border-radius: 12px; padding: 8px; margin: 14px 0 10px; }
.status-form { display: grid; grid-template-columns: 1fr; gap: 8px; }
.history { margin: 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 6px; }
.kv { margin: 0; display: grid; }
.kv div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lines-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.lines-table tfoot td { border-bottom: 0; }
.lines-table { margin-bottom: 12px; }
.file-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.file-previews figure { margin: 0; }
.file-previews .logo-frame { height: 90px; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }

/* ---------- responsive */
@media (max-width: 1080px) {
  .cfg { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .cfg-stage { position: sticky; top: 0; z-index: 10; min-height: 0; padding: 10px 12px 10px; border-radius: 0 0 18px 18px; margin: 0 calc(-1 * var(--gutter)); box-shadow: 0 8px 20px -14px var(--shadow); }
  .stage { min-height: 0; padding: 8px 0; }
  .stage-caption { margin-top: 8px; font-size: 13px; }
  .stage-caption .muted { display: none; }
  .stage-all { max-height: 34vh; }
  .stage-note { display: none; }
  .stage-foot { padding-top: 8px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-grid .panel:first-child { grid-row: auto; }
}
@media (max-width: 760px) {
  .split, .points, .hero-copy { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .examples { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .type-cards { grid-template-columns: minmax(0, 1fr); }
  .color-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
  .variant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --header-h: 64px; }
  .wordmark .logo { height: 34px; }
  .stepper ol { gap: 0; }
  .stepper button:not(.is-current) .stepper-label { display: none; }
  .stepper .is-current .stepper-label { position: absolute; top: 34px; white-space: nowrap; }
  .stepper ol { margin-bottom: 26px; }
  .step-nav .btn { padding: 0 16px; font-size: 15px; }
  .step-nav { flex-wrap: wrap; }
  .step-hint { order: -1; flex-basis: 100%; text-align: left; }
  .float-toggle { padding: 0 9px; }
  .float-lang { display: none; }
  .summary-list > div { grid-template-columns: 1fr; gap: 4px; }
  .model-grid, .model-list { grid-template-columns: minmax(0, 1fr); }
  .hero-models { justify-content: flex-start; }
  .stage-bar .stage-label { display: none; }
  .segmented button { padding: 0 11px; font-size: 13px; }
  .admin-filters input { width: 100%; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
  .orders-table th:nth-child(6), .orders-table td:nth-child(6), .orders-table th:nth-child(2), .orders-table td:nth-child(2) { display: none; }
}

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

/* ---------- motion (only when the visitor has not asked for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  :root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

  /* hero: copy rises on load, the pen glides in once, later colour/model changes cross-fade */
  .hero-copy > * { animation: rise .8s var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-models, .hero-colors, .hero-color-name { animation: fade .8s .3s var(--ease-out) both; }
  .hero-pen.is-entering svg { animation: pen-in 1.1s .12s var(--ease-out) both; }
  .pen-swap { animation: swap .38s var(--ease-out) both; }

  /* sections reveal as they scroll in; direct children follow each other */
  .reveal > * { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .reveal.is-visible > * { opacity: 1; transform: none; }
  .reveal.is-visible > :nth-child(2) { transition-delay: .06s; }
  .reveal.is-visible > :nth-child(3) { transition-delay: .12s; }
  .reveal.is-visible > :nth-child(4) { transition-delay: .18s; }
  .reveal.is-visible > :nth-child(n+5) { transition-delay: .24s; }

  .dot, .chip { transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
  .gallery-item svg, .model-tile-pen svg, .model-pen svg { transition: transform .45s var(--ease-out); }
  .gallery-item:hover svg, .model-tile:hover .model-tile-pen svg, .model-card:hover .model-pen svg { transform: translateX(4px); }
  .model-card, .variant { transition: border-color .15s, box-shadow .2s, transform .2s var(--ease-out); }
  .model-card:active, .variant-toggle:active { transform: scale(0.985); }
  .variant-check { transition: background-color .2s, border-color .2s, transform .25s var(--ease-out); }
  .variant.is-selected .variant-check { animation: tick .3s var(--ease-out); }

  .float-panel:not([hidden]) { animation: pop .18s var(--ease-out); transform-origin: top right; }
  .cfg-steps .step:not([hidden]) { animation: step-in .4s var(--ease-out) both; }
  .stepper-num { transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease-out); }
  .stepper .is-current .stepper-num { transform: scale(1.08); }
  .confirm .wrap > * { animation: rise .7s var(--ease-out) both; }
  .confirm-check { animation: tick .5s .1s var(--ease-out) both; }
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pen-in { from { opacity: 0; transform: translateX(-6%); } to { opacity: 1; transform: none; } }
@keyframes swap { from { opacity: 0.25; transform: translateX(-0.6%); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes tick { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* Page and cards are both white, so every white component gets a visible frame and a soft shadow to read as a sheet on the ruled page. */
.detail-shot, .example, .model-tile, .cfg-stage, .summary-list, .login-card, .table-wrap, .panel, .confirm-id, .segmented {
  box-shadow: 0 0 0 1px var(--frame), 0 12px 26px -20px var(--shadow);
}
.model-card, .variant, .settings, .type-card, .radio { border-color: var(--frame); }
.model-card:hover, .variant:hover { border-color: var(--ink-2); }
.model-card.is-selected, .variant.is-selected { border-color: var(--ink); }

/* Hover states must keep a visible frame: a white fill alone disappears on the white, ruled page. */
.model-tile:hover { box-shadow: 0 0 0 1px var(--ink-2), 0 14px 30px -18px var(--shadow); }
.gallery-item:hover, .stage-all-item:hover, .stage-all-item.is-active { background: var(--surface); box-shadow: 0 0 0 1px var(--frame); }
.float-panel .lang-list button:hover { background: var(--hover); }
