  /*
    Etichette Facili design system: light paper, deep green ink, lime only
    for measurements; Manrope for headings, DM Sans for text, DM Mono for
    numbers and measurements. Token names follow DESIGN.md, which documents
    the full system (tokens, rules, components).

    The real print area (.sheet, .cell) stays black and white: it is
    calibrated in cm on the physical sheet, and the selectable fonts for the
    printed text (IBM Plex Sans, Roboto, Montserrat...) are a product choice,
    not part of the interface chrome, so no theme token touches them.
  */
  :root {
    /* paper */
    --paper: #f7f6f0;
    --card: #fffefa;
    --surface: #edf1e5;
    --sage: #dce9c5;
    --sage-deep: #c9dfa8;
    --sage-wash: #e9f0de;
    --line: #e3e5dc;
    --line-cut: #bdc8b5;

    /* ink */
    --ink: #142a25;
    --ink-hover: #284c3c;
    --ink-muted: #5d6b63;
    --ink-faint: #68736b;

    /* greens */
    --deep: #153c32;
    --forest: #315e47;
    --forest-dark: #1d4436;
    --leaf: #628531;
    --leaf-focus: #769744;
    --green: #5f912d;

    /* signals */
    --lime: #c9f36a;
    --lime-wash: #f2f8e8;
    --coral: #ff7557;
    --brick: #a74838;

    /* typography */
    --font-display: 'Manrope', sans-serif;
    --font-ui: 'DM Sans', sans-serif;
    --font-mono: 'DM Mono', monospace;

    /* spacing (4px scale) */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 72px;
    --s-9: 96px;

    /* shape */
    --r-sm: 8px;
    --r-md: 12px;
    --r-pill: 999px;
    --container: 1160px;

    /* Highlight tint for the mini diagrams (the "active" cell/row): a diluted
       green from the palette, never a new colour. */
    --leaf-tint: rgba(111, 153, 69, 0.11);
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }

  html { scroll-behavior: smooth; }
  html, body { height: auto; }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
  }

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

  a { color: var(--forest); }
  a:hover { color: var(--forest-dark); text-decoration: underline; }

  section, header.site-header, footer.site-footer { scroll-margin-top: 16px; }

  /* Single style for every mono kicker on the site (hero, sections, footer).
     Coloured text, no box: it is typography, not a badge. */
  .eyebrow, .section-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #62736a;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: var(--s-4);
  }
  .eyebrow { display: flex; align-items: center; gap: 9px; text-align: left; margin-bottom: 0; }
  .section-kicker { text-align: center; }

  /* ================= header / nav ================= */
  .site-header { padding: 0; background: var(--paper); }
  .site-header-inner {
    max-width: var(--container); min-height: 76px; margin: 0 auto; padding: 0 var(--s-5);
    display: flex; align-items: center; gap: var(--s-4);
  }
  .brand { display: flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--ink); }
  .brand:hover { text-decoration: none; }
  .brand-badge {
    flex: none; width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--deep);
    display: flex; align-items: center; justify-content: center;
  }
  .brand-badge svg { width: 19px; height: 19px; }
  .brand-badge svg path, .brand-badge svg circle { stroke: #ffffff; }
  .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.5px; }
  .site-nav { display: flex; gap: 32px; margin: 0 auto; }
  .site-nav a {
    color: #53625c; text-decoration: none; font-size: 13px; font-weight: 600;
    border-bottom: 2px solid transparent; padding-bottom: 2px;
  }
  .site-nav a:hover { border-bottom-color: var(--forest); text-decoration: none; }
  .site-nav a[aria-current="page"] { color: var(--forest); border-bottom-color: var(--forest); }
  .btn-sm { padding: var(--s-2) var(--s-4); white-space: nowrap; min-height: 38px; }

  /* ================= hero ================= */
  .hero { position: relative; padding: 76px 0 46px; }
  .hero-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5);
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.03fr 0.97fr; gap: 38px; align-items: center;
    text-align: left;
  }
  .hero-copy { min-width: 0; }
  .hero-title {
    display: block;
    font: 700 clamp(46px, 6.1vw, 76px)/0.99 var(--font-display);
    letter-spacing: -0.065em;
    margin: 22px 0 20px; max-width: 660px; text-wrap: pretty;
  }
  .hero-title em { font-style: normal; color: var(--leaf); }
  .hero-sub {
    font: 400 17px/1.65 var(--font-ui); color: #65716a;
    max-width: 520px; margin: 0 0 27px;
  }

  .hero-actions { display: flex; gap: 11px; flex-wrap: wrap; }
  .hero-button {
    display: inline-flex; align-items: center; gap: 11px;
    padding: 15px 19px; border-radius: 9px;
    font-size: 13px; font-weight: 700; text-decoration: none;
    transition: transform 0.15s ease;
  }
  .hero-button .ico-arrow { width: 16px; height: 16px; flex: none; }
  .hero-button--dark { background: var(--ink); color: #ffffff; }
  .hero-button--light { border: 1px solid #d9ddd4; background: var(--card); color: var(--ink); }
  .hero-button:hover { text-decoration: none; transform: translateY(-1px); }

  .hero-proof {
    display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px;
    color: #53645a; font-size: 12px; font-weight: 600;
  }
  .hero-proof span { display: flex; gap: 7px; align-items: center; }
  .hero-proof .ico-check { width: 15px; height: 15px; color: var(--green); flex: none; }

  .hero-dot { width: 8px; height: 8px; border-radius: 50%; background: #80b93d; box-shadow: 0 0 0 4px #e4f3cb; }

  .hero-visual {
    position: relative; min-height: 492px;
    background: var(--sage); border-radius: 20px; overflow: hidden;
    display: grid; place-items: center;
  }
  .hero-visual::before {
    content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
    background: var(--sage-deep); right: -90px; top: -130px;
  }
  .hero-visual::after {
    content: ""; position: absolute; width: 250px; height: 250px; border-radius: 50%;
    background: #e7efda; left: -110px; bottom: -100px;
  }
  .visual-label, .visual-note, .visual-sheet, .visual-stamp { position: absolute; z-index: 2; }
  .visual-label, .visual-note, .visual-stamp { z-index: 3; }
  .visual-label {
    left: 28px; top: 32px; padding: 10px 13px;
    background: var(--card); border: 1px solid #dce2d2; border-radius: 8px;
    font: 10px var(--font-mono); color: #66746b;
  }
  .visual-note {
    right: 25px; top: 31px; padding: 12px 15px;
    background: var(--deep); color: #ffffff; border-radius: 10px;
    font-size: 11px; box-shadow: 0 10px 22px #19332925;
  }
  .visual-note b { display: block; font: 500 18px var(--font-mono); color: var(--lime); margin-bottom: 3px; }
  .visual-sheet {
    width: 280px; height: 374px; padding: 22px 18px;
    background: var(--card); border: 1px solid #e4e1d7; border-radius: 5px;
    box-shadow: 0 22px 50px #273a2440; transform: rotate(-4deg);
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, 1fr); gap: 10px;
  }
  .visual-sheet > div {
    border: 1px dashed #c9cec1; border-radius: 3px; padding: 9px;
    display: flex; flex-direction: column; justify-content: center; line-height: 1.1;
  }
  .visual-sheet strong { font: 700 10px var(--font-display); letter-spacing: -0.2px; }
  .visual-sheet small { font: 8px var(--font-mono); color: #858e81; margin-top: 5px; }
  .visual-sheet > div.selected {
    background: var(--lime-wash); border: 1px solid #98bc62;
    transform: scale(1.05); box-shadow: 0 4px 10px #233b2014;
  }
  .visual-sheet > div.selected strong { color: #426b26; }
  .visual-stamp {
    right: 35px; bottom: 40px; padding: 15px 18px;
    background: var(--coral); color: #ffffff; border-radius: 50%;
    font: 700 10px/1.35 var(--font-mono);
    transform: rotate(9deg); box-shadow: 0 8px 17px #c6614b3d;
  }

  @media (max-width: 800px) {
    .hero { padding: 52px 0 38px; }
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero-title { font-size: clamp(44px, 12vw, 66px); }
    .hero-visual { min-height: 420px; }
    .visual-sheet { width: 250px; height: 340px; }
  }
  @media (max-width: 440px) {
    .hero-title { font-size: 43px; }
    .hero-sub { font-size: 15px; }
    .hero-button { padding: 13px 15px; }
    .hero-visual { min-height: 365px; }
    .visual-sheet { width: 220px; height: 300px; padding: 17px 14px; gap: 8px; }
    .visual-sheet > div { padding: 6px; }
    .visual-sheet strong { font-size: 8px; }
    .visual-note { display: none; }
    .visual-label { left: 13px; top: 17px; }
    .visual-stamp { right: 14px; bottom: 18px; padding: 11px 13px; font-size: 8px; }
  }

  /* ================= trust strip ================= */
  .trust-strip {
    display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
    max-width: none; margin: 0 auto;
    padding: 24px max(28px, calc((100% - 1160px) / 2));
    background: var(--deep);
  }
  .trust-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600; color: #ecf1e9;
  }
  .trust-chip .ico-check { width: 14px; height: 14px; color: var(--lime); flex: none; }
  @media (max-width: 800px) {
    .trust-strip { justify-content: center; }
  }

  /* ================= section title ================= */
  .section-title {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.05em; line-height: 1.05;
    margin: 0 0 var(--s-4); text-align: center; text-wrap: pretty;
  }
  .section-sub {
    text-align: center; color: var(--ink-muted); font-size: 17px; line-height: 1.55; max-width: 68ch;
    margin: 0 auto var(--s-8);
  }

  /* ================= diagrams (shared primitives) =================
     Small reconstructions of the print grid and preview, built only with
     borders and text (no images to export). Used in the "Come funziona"
     steps, in the format comparison of "Per chi è" and in the mail merge
     flow. Dashed lines are allowed here because they stand for the real cut
     between labels, not for section decoration. */
  .diagram-grid {
    border: 1px solid var(--line); background: #ffffff;
    display: grid; gap: 6px; padding: 10px;
  }
  .diagram-cell { border: 1px dashed var(--line-cut); }
  .diagram-cell--active { border-color: var(--forest); background: var(--leaf-tint); }

  .diagram-stack { border: 1px solid var(--line); background: #ffffff; display: flex; flex-direction: column; gap: 7px; padding: 10px; }
  .diagram-row {
    flex: 1; display: flex; align-items: center; gap: 6px; padding: 0 10px;
    border: 1px dashed var(--line-cut); font-size: 13px; color: var(--ink-muted);
  }
  .diagram-row--active { border-color: var(--forest); color: var(--ink); font-weight: 600; }
  .diagram-cursor { width: 1px; align-self: stretch; background: var(--forest); }

  .diagram-print {
    border: 1px solid var(--line); background: #ffffff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3);
  }
  .diagram-page { border: 1px solid var(--ink); background: #ffffff; }
  .diagram-arrow { color: var(--forest); line-height: 0; }
  .diagram-arrow .ico-arrow { width: 18px; height: 18px; }

  .tag-chip {
    font-family: var(--font-mono); font-size: 11px; font-weight: 700;
    padding: 6px 10px; border-radius: var(--r-sm); text-align: center; white-space: nowrap;
  }
  .tag-chip--green { background: var(--green); color: #ffffff; }
  .tag-chip--outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }

  /* ================= how it works ================= */
  /* Vertical steps, alternating text and diagram. */
  .how-it-works { padding: 64px 0 var(--s-2); }
  .how-steps { max-width: 960px; margin: 0 auto; padding: 0 var(--s-5); }
  .how-step {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6);
    align-items: center; padding: var(--s-6) 0; border-bottom: 1px solid var(--line);
  }
  .how-steps .how-step:last-child { border-bottom: 0; }
  .how-step-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
  .step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 9px; background: var(--deep); color: var(--lime);
    font-family: var(--font-mono); font-weight: 700; font-size: 13px; flex: none;
  }
  .how-step h2 { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin: 0 0 10px; text-wrap: pretty; }
  .how-step p { margin: 0 0 var(--s-3); color: var(--ink-muted); font-size: 15px; line-height: 1.6; }
  .how-step-tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .how-step-diagram { height: 180px; padding: var(--s-3); background: var(--card); border-radius: 10px; }
  .how-step-diagram.diagram-print { height: 180px; padding: 0; }

  @media (max-width: 760px) {
    .how-step { grid-template-columns: 1fr; }
    .how-step-diagram { order: -1; height: 150px; }
  }

  /* ---- compact version, for the preview on the home page ---- */
  .mini-steps-section { padding: var(--s-9) 0; background: var(--paper); }
  .mini-steps {
    max-width: 960px; margin: 0 auto; padding: 0 var(--s-5);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-6);
  }
  .mini-step {
    display: flex; flex-direction: column; gap: var(--s-3);
    padding: 17px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  }
  .mini-step-diagram { height: 130px; padding: 10px; border-radius: 8px; }
  .mini-step-diagram.diagram-print { padding: 0; }
  .mini-step-body { display: flex; gap: var(--s-3); align-items: flex-start; }
  .mini-step h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 4px; text-wrap: pretty; }
  .mini-step p { margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 1.55; }

  /* ================= tool section wrapper ================= */
  .tool-section { padding: 42px 0 var(--s-2); }
  .tool-section .app-shell { padding: 0 var(--s-5) var(--s-4); }
  .tool-section .masthead h1 {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.045em; margin: 0; line-height: 1.05;
    color: var(--ink); text-wrap: pretty;
  }

  /* ================= use cases ================= */
  .use-cases { padding: 64px 0 var(--s-2); }
  .use-cases-grid {
    max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-4);
  }
  .use-case {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: var(--s-5);
    display: flex; flex-direction: column;
  }
  .use-case-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-4); }
  .use-case-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin: 0; text-wrap: pretty; }
  .use-case-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
  .use-case-meta--accent { color: var(--forest); }
  .use-case ul { margin: 0 0 var(--s-5); padding-left: 20px; color: var(--ink-muted); font-size: 15px; line-height: 1.65; }
  .use-case li strong { color: var(--ink); }
  .use-case .btn { display: inline-block; margin-top: auto; align-self: flex-start; }

  /* Format comparison inside the use-case cards: the same A4
     proportion (210×297) drawn with the .diagram-grid/.diagram-cell primitives. */
  .format-diagram { width: 100%; max-width: 200px; aspect-ratio: 210 / 297; max-height: 260px; margin: 0 auto var(--s-4); }
  .format-diagram-wrap { position: relative; width: 100%; max-width: 220px; margin: 0 auto var(--s-4); padding: 0 0 20px 26px; }
  .format-diagram-wrap .format-diagram { margin: 0; max-width: none; }
  .format-diagram-arrow-v, .format-diagram-arrow-h {
    position: absolute; font-family: var(--font-mono); font-size: 10px; color: var(--forest);
    display: flex; align-items: center; justify-content: center; white-space: nowrap;
  }
  .format-diagram-arrow-v { left: 0; top: 0; bottom: 20px; width: 24px; transform: rotate(-90deg); }
  .format-diagram-arrow-h { left: 26px; right: 0; bottom: 0; height: 18px; }

  .persona-panel {
    max-width: 960px; margin: var(--s-8) auto 0; padding: var(--s-6);
    border: 1px solid var(--line); border-radius: 12px; background: var(--sage-wash);
  }
  .persona-panel-label {
    display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--s-4);
  }
  .persona-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-5); }
  .persona { display: flex; flex-direction: column; gap: 6px; }
  .persona-num { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--leaf); }
  .persona-title { font-weight: 600; font-size: 15px; }
  .persona p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-muted); }

  /* ================= mail merge (home) ================= */
  .merge-section { padding: var(--s-9) 0 var(--s-7); }
  .merge-inner { max-width: 960px; margin: 0 auto; padding: 0 var(--s-5); }
  .merge-head { max-width: 60ch; margin: 0 0 var(--s-6); }
  .merge-head .section-kicker, .merge-head .section-title { text-align: left; }
  .merge-head .section-title { margin-bottom: var(--s-3); }
  .merge-head p { margin: 0; color: var(--ink-muted); font-size: 17px; line-height: 1.6; }

  .merge-panel { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); padding: var(--s-6) var(--s-5); }
  .merge-flow { display: flex; gap: var(--s-5); align-items: stretch; }
  .merge-col { flex: 1; min-width: 0; }
  .merge-col-label { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-bottom: var(--s-2); }
  .merge-col-hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: var(--s-2); }
  .merge-col p { margin: var(--s-2) 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-muted); }
  .merge-arrow { flex: none; display: flex; align-items: center; justify-content: center; color: var(--forest); }
  .merge-arrow .ico-arrow { width: 20px; height: 20px; }

  .merge-table { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
  .merge-table-row { display: grid; border-bottom: 1px solid var(--line); }
  .merge-table-row:last-child { border-bottom: 0; }
  .merge-table-row--head { background: var(--surface); font-family: var(--font-mono); font-size: 11px; }
  .merge-table-cell { padding: 8px 10px; font-size: 13px; border-right: 1px solid var(--line); }
  .merge-table-cell:last-child { border-right: 0; }
  .merge-table-cell--muted { color: var(--ink-faint); }

  .merge-template { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s-4); background: var(--paper); min-height: 92px; }
  .merge-template-text { font-family: var(--font-mono); font-size: 14px; line-height: 1.9; }
  .merge-token { background: var(--lime-wash); border: 1px solid var(--lime); border-radius: 3px; padding: 2px 5px; }

  .merge-result { display: flex; flex-direction: column; gap: 6px; }
  .merge-result-card { border: 1px dashed var(--ink); background: #ffffff; padding: 8px 10px; text-align: center; }
  .merge-result-card strong { display: block; font-size: 13px; font-weight: 600; }
  .merge-result-card span { font-size: 12px; color: var(--ink-muted); }
  .merge-generated { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); font-family: var(--font-mono); font-size: 11px; }
  .merge-generated strong { color: var(--green); display: inline-flex; align-items: center; gap: 5px; }
  .merge-generated .ico-check { width: 13px; height: 13px; }
  .merge-generated span { color: var(--ink-faint); }

  @media (max-width: 760px) {
    .merge-flow { flex-direction: column; }
    .merge-arrow { transform: rotate(90deg); padding: var(--s-2) 0; }
  }

  /* ================= guides (home) ================= */
  /* Same list as the landings' "Altre guide" (.lp-related in landing.css). */
  .guides-section { padding: 0 0 var(--s-9); }
  .guides-inner { max-width: 960px; margin: 0 auto; padding: 0 var(--s-5); }
  .guides-head { max-width: 60ch; margin: 0 0 var(--s-5); }
  .guides-head .section-title { text-align: left; margin-bottom: var(--s-3); }
  .guides-head p { margin: 0; color: var(--ink-muted); font-size: 17px; line-height: 1.6; }
  .guide-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
  .guide-list li { border-bottom: 1px solid var(--line); }
  .guide-list a {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; gap: 20px; align-items: center;
    padding: 22px 4px; color: var(--ink); text-decoration: none;
    transition: background .2s ease, padding .3s cubic-bezier(.16, 1, .3, 1);
  }
  .guide-list a:hover { background: var(--sage-wash); padding-left: 14px; color: var(--ink); text-decoration: none; }
  .guide-list a:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
  .guide-list strong { font: 700 20px/1.25 var(--font-display); letter-spacing: -.02em; }
  .guide-list small { display: block; font-size: 14px; color: #5f6c65; margin-top: 4px; font-weight: 400; }
  .guide-list code { font: 500 12px var(--font-mono); color: #5b6b62; background: none; }
  .guide-list svg { width: 20px; height: 20px; color: var(--leaf); }
  @media (max-width: 760px) {
    .guide-list a { grid-template-columns: minmax(0, 1fr) 20px; }
    .guide-list code { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .guide-list a { transition: none; }
  }

  /* ================= final cta (home) ================= */
  .cta-band {
    background: var(--sage-wash); color: var(--ink);
    padding: 52px 24px;
    display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center;
  }
  .cta-band h2 {
    font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4vw, 36px);
    line-height: 1.05; letter-spacing: -0.045em; margin: 0; max-width: 28ch; text-wrap: pretty; color: var(--ink);
  }
  .cta-band-caption { font-family: var(--font-mono); font-size: 12px; color: #647064; }
  @media (max-width: 800px) {
    .cta-band { padding: 40px 22px; }
  }

  /* ================= faq ================= */
  /* Rows separated by a hairline, no cards and no shadows: it is a list,
     not a stack of boxes. */
  .faq { padding: 64px 0 var(--s-2); }
  .faq-list { max-width: 760px; margin: 0 auto; padding: 0 var(--s-5); }
  .faq-item {
    border-bottom: 1px solid var(--line);
  }
  .faq-item:last-child { border-bottom: 0; }
  .faq-item summary {
    cursor: pointer; list-style: none; padding: var(--s-4) 0; font-weight: 600; font-size: 16px;
    font-family: var(--font-ui);
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  /* Drawn as an SVG mask so the sign takes its colour from background. */
  .faq-item summary::after {
    content: ""; flex: none; width: 16px; height: 16px; background: var(--forest);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2.5v11M2.5 8h11' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2.5v11M2.5 8h11' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .25s ease;
  }
  .faq-item[open] summary::after { transform: rotate(45deg); }
  .faq-item p { margin: 0 0 var(--s-4); color: var(--ink-muted); font-size: 15px; line-height: 1.6; max-width: 60ch; }

  .faq-cta { max-width: 760px; margin: var(--s-8) auto 0; padding: 0 var(--s-5); }
  .faq-cta-inner {
    border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card);
    padding: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between;
  }
  .faq-cta-text { max-width: 46ch; }
  .faq-cta-text h2 { font-family: var(--font-display); font-weight: 700; font-size: 21px; margin: 0 0 6px; }
  .faq-cta-text p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }

  /* ================= footer ================= */
  .site-footer { padding: var(--s-7) 0 var(--s-6); margin-top: 0; }
  .footer-inner {
    max-width: var(--container); margin: 0 auto; padding: var(--s-5) var(--s-5) 0; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: var(--s-5); justify-content: space-between;
  }
  .footer-brand { max-width: 320px; }
  .footer-brand .brand { margin-bottom: var(--s-2); }
  .footer-brand p { color: var(--ink-muted); font-size: 14px; line-height: 1.6; margin: 0; }
  .footer-cols { display: flex; gap: var(--s-7); flex-wrap: wrap; }
  .footer-col h2 {
    font-family: var(--font-mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 var(--s-2);
  }
  .footer-col a { display: block; color: var(--ink); text-decoration: none; font-size: 14px; margin-bottom: var(--s-2); }
  .footer-col a:hover { color: var(--forest-dark); text-decoration: underline; }
  .footer-legal {
    max-width: var(--container); margin: var(--s-5) auto 0; padding: var(--s-4) var(--s-5) 0; border-top: 1px solid var(--line);
    color: var(--ink-faint); font-size: 12px; text-align: center;
  }

  /* ================= configurator styles ================= */
  /* Wider than the site container: it holds a real-size A4 sheet (.sheet,
     21cm ≈ 794px) that, with the 280px sidebar + gap + padding, needs at
     least 1146px; anything narrower causes a permanent horizontal scroll
     even on wide screens. */
  .app-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 var(--s-4);
    position: relative;
  }

  .masthead {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    margin-bottom: 17px;
    padding: 19px 21px;
    background: var(--sage-wash);
    border-radius: 14px;
  }
  @media (max-width: 440px) {
    .masthead { align-items: flex-start; }
  }

  .badge {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--deep);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .badge svg { width: 22px; height: 22px; }
  .badge svg path, .badge svg circle { stroke: #ffffff; }

  .kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #65766a;
    display: block;
    margin-top: 3px;
  }

  .subhead {
    color: var(--ink-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: var(--s-1) 0 var(--s-4);
    max-width: 70ch;
  }

  .spec-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-bottom: var(--s-5);
  }

  /* Measurement chips (computed data: pages, capacity, sizes, margins):
     mono and small radius, not a pill (pills are reserved for info tags). */
  .spec-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 5px 9px;
  }
  .spec-chip strong { font-weight: 700; }

  .layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 17px;
    align-items: start;
  }

  /* Breakpoint matches the minimum the sheet column needs (280px sidebar +
     gap + padding + the real 794px A4 sheet = 1146px): below it the two
     columns cannot fit anyway, so switch straight to the scrollable box
     below instead of squeezing two columns with the horizontal scrollbar
     hidden inside .sheet-wrapper. */
  @media (max-width: 1170px) {
    .layout { grid-template-columns: 1fr; }
    /* The A4 sheet is wider than the screen: without a height cap the
       horizontal scrollbar of .sheet-wrapper ends up below a whole printable
       page (or several), out of view. Capping the height gives a box that
       scrolls both ways with both scrollbars always reachable. */
    .sheet-wrapper {
      max-height: 65vh;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      border: 1px solid var(--line);
      border-radius: var(--r-md);
    }
  }

  .main-col { min-width: 0; }

  .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 0 #142a2507;
    padding: var(--s-3) var(--s-4);
    margin-bottom: var(--s-4);
  }

  /* Buttons: filled = main action, outline = support, text only =
     destructive or secondary action. 44px minimum height for touch. */
  .btn {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    border-radius: 9px;
    padding: 11px 20px;
    min-height: 44px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
  }
  .btn:hover { border-color: var(--ink-muted); }
  .btn:active { transform: translateY(1px); }
  .btn:focus-visible { outline: 2px solid var(--leaf-focus); outline-offset: 2px; }

  .btn-primary { background: var(--ink); color: #ffffff; border-color: var(--ink); }
  .btn-primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
  /* Link buttons: without this, a:hover would turn the white text green. */
  .btn-primary:hover, .btn-primary:focus, .btn-primary:visited,
  .hero-button--dark, .hero-button--dark:hover, .hero-button--dark:focus, .hero-button--dark:visited { color: #ffffff; }

  .btn-ghost { background: transparent; color: var(--brick); border: none; padding: 11px 8px; min-height: auto; }
  .btn-ghost:hover { border-color: transparent; text-decoration: underline; }

  .btn:disabled { opacity: 0.45; cursor: not-allowed; }
  .btn:disabled:hover { border-color: var(--line); text-decoration: none; }

  .counter {
    margin-left: auto;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: var(--ink-faint);
  }
  .counter strong { color: var(--green); }

  /* Shown right above the print button, with the values to copy in mono. */
  .print-note {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.6;
    margin: 0 0 var(--s-4);
    padding: var(--s-4) var(--s-4) var(--s-4) 14px;
    background: #f0f4e9;
    border: 1px solid #dce6cf;
    border-left: 4px solid #dce6cf;
    border-radius: 10px;
  }
  .print-note strong { color: var(--ink); font-weight: 600; }
  .print-note code {
    font-family: var(--font-mono);
    background: var(--surface);
    color: var(--ink);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12.5px;
  }

  .page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-4);
    margin: 0 0 var(--s-4);
  }
  .page-nav-btn { padding: 7px 15px; min-height: auto; line-height: 1; }
  .page-nav-label {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-faint);
    min-width: 100px;
    text-align: center;
  }

  .sheet-stage { position: relative; }

  .sheet-wrapper {
    overflow-x: auto;
    padding: 4px 0 var(--s-9);
    border-radius: 12px;
    background: #e8ece2;
  }

  /* Empty sheet: a translucent veil with a prompt and two shortcuts. It
     hides itself (JS) as soon as the first cell gets text or an import
     succeeds. The veil lets clicks outside its card through, because
     "click a cell and type" must stay a valid way to dismiss it. Anchored
     to the top rather than centred, since the real sheet can be as tall as
     a full A4 page. */
  .empty-state {
    position: absolute; inset: 0;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 56px var(--s-5);
    background: rgba(255, 255, 255, 0.88);
    pointer-events: none;
  }
  .empty-state-card {
    display: flex; flex-direction: column; align-items: center; gap: var(--s-4);
    max-width: 380px; text-align: center;
    padding: var(--s-6);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 14px 40px #142a2520;
  }
  /* Only the ghost label and the buttons take clicks: the rest of the card
     lets them through to the cell underneath. */
  .empty-state-tag, .empty-state-actions {
    pointer-events: auto;
  }
  .empty-state-tag {
    border: 1px dashed var(--forest); background: #ffffff; border-radius: var(--r-sm);
    padding: 10px 18px; display: flex; flex-direction: column; gap: 2px;
    cursor: pointer;
  }
  .empty-state-tag:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
  .empty-state-tag strong { font-size: 14px; font-weight: 600; }
  .empty-state-tag span { font-size: 12px; color: var(--ink-muted); }
  .empty-state-copy h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 0 0 6px; }
  .empty-state-copy p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
  .empty-state-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; }
  .empty-state-hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

  /* Veil animation: staggered entrance, continuous "breathing" of the ghost
     label while the veil is on screen, a faster exit on the first typed
     character, and a "soft" return (a single delayed fade, no stagger) when
     content is deleted rather than typed for the first time, so the veil
     does not flash while a deleted name is being retyped.
     setEmptyStateVisible in app.js picks .is-visible alone (staggered
     entrance) or .is-visible + .is-soft (soft return), and uses .is-leaving
     for the exit. */
  @media (prefers-reduced-motion: no-preference) {
    .empty-state {
      opacity: 0;
      transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .empty-state.is-visible { opacity: 1; }
    .empty-state.is-soft { transition-delay: 0.6s; transition-duration: 0.26s; }

    .empty-state-tag, .empty-state-copy, .empty-state-actions {
      opacity: 0;
      transform: translateY(8px);
    }
    .empty-state-tag {
      transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
                  transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
    }
    .empty-state-copy {
      transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.16s,
                  transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.16s;
    }
    .empty-state-actions {
      transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.24s,
                  transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.24s;
    }
    .is-visible .empty-state-tag, .is-visible .empty-state-copy, .is-visible .empty-state-actions {
      opacity: 1;
      transform: translateY(0);
    }
    /* Soft return: the pieces appear together with the veil (same grace
       delay, no transition of their own). */
    .is-soft .empty-state-tag, .is-soft .empty-state-copy, .is-soft .empty-state-actions {
      transition: none;
      opacity: 1;
      transform: translateY(0);
    }

    /* Breathing starts only once the staggered entrance is over: a running
       animation takes priority over a transition on the same property
       (transform), so starting earlier would snap the label to its final
       position instead of sliding it up. */
    .is-visible:not(.is-leaving) .empty-state-tag {
      animation: ghost-breathe 3.6s ease-in-out 0.4s infinite;
    }
    .is-soft.is-visible:not(.is-leaving) .empty-state-tag {
      animation-delay: 0.86s;
    }
    @keyframes ghost-breathe {
      0%, 100% { transform: translateY(0);    border-color: var(--forest); opacity: 0.92; }
      50%      { transform: translateY(-3px); border-color: #e0a07a;      opacity: 1;    }
    }

    .empty-state.is-leaving {
      opacity: 0;
      transition: opacity 0.22s cubic-bezier(0.4, 0, 1, 1) 0.1s;
    }
    .is-leaving .empty-state-tag, .is-leaving .empty-state-copy, .is-leaving .empty-state-actions {
      pointer-events: none;
    }
    .is-leaving .empty-state-actions {
      opacity: 0; transform: translateY(4px);
      transition: opacity 0.14s cubic-bezier(0.4, 0, 1, 1) 0s,
                  transform 0.14s cubic-bezier(0.4, 0, 1, 1) 0s;
    }
    .is-leaving .empty-state-copy {
      opacity: 0; transform: translateY(4px);
      transition: opacity 0.14s cubic-bezier(0.4, 0, 1, 1) 0.04s,
                  transform 0.14s cubic-bezier(0.4, 0, 1, 1) 0.04s;
    }
    .is-leaving .empty-state-tag {
      opacity: 0; transform: scale(0.97);
      transition: opacity 0.18s cubic-bezier(0.4, 0, 1, 1) 0.06s,
                  transform 0.18s cubic-bezier(0.4, 0, 1, 1) 0.06s;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .empty-state { opacity: 0; transition: opacity 0.12s linear; }
    .empty-state.is-visible { opacity: 1; }
    .empty-state.is-leaving { opacity: 0; pointer-events: none; }
    .empty-state-tag, .empty-state-copy, .empty-state-actions {
      opacity: 1; transform: none; transition: none; animation: none;
    }
  }

  /* ---- real print area: calibrated in cm on the A4 sheet ---- */
  .sheet {
    position: relative;
    width: 21cm;
    min-height: 29.7cm;
    margin: 0 auto;
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    padding: var(--sheet-pad-top, 0.7cm) 0.5cm 0.5cm var(--sheet-pad-left, 0.5cm);
  }
  .sheet + .sheet { margin-top: 24px; }

  .sheet-header {
    min-height: 1.1cm;
    margin: 0 0 0.5cm;
    font-family: Arial, Helvetica, sans-serif;
  }
  .sheet-title { font-weight: 700; font-size: 13pt; margin: 0 0 2pt; }
  .sheet-spec { font-size: 8pt; color: #555555; margin: 0; }
  .sheet.sheet--preset .sheet-header { display: none; }

  .sheet-page-num {
    position: absolute;
    top: 0.3cm;
    right: 0.4cm;
    font-family: var(--font-mono);
    font-size: 8pt;
    color: #9a9a90;
  }

  .sheet-grid {
    width: var(--grid-width, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--tag-w, 5cm));
    column-gap: var(--gap-h, 0.2cm);
    row-gap: var(--gap-v, 0.2cm);
    /* In custom mode the leftover space (when the columns do not fill the
       usable width exactly) is centred instead of all on the right. Standard
       formats stay left-aligned, because they must match the real offset of
       the pre-cut sheet. */
    justify-content: center;
    align-content: start;
  }
  .sheet.sheet--preset .sheet-grid { justify-content: start; }

  .cell {
    position: relative;
    width: var(--tag-w, 5cm);
    height: var(--tag-h, 1.5cm);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2mm;
    border: 0.6pt dashed #000000;
    overflow: hidden;
  }

  .cell.cell--overflow { border-color: var(--brick); border-style: solid; }
  /* Hidden cut lines: a faint guide stays on screen, while in print the
     border is transparent (same width, so the geometry does not change). */
  .sheet-wrapper--no-cut .cell { border-color: #d9d9d9; border-style: dotted; }
  .sheet-wrapper--no-cut .cell.cell--overflow { border-color: var(--brick); border-style: solid; }

  .cell-input {
    width: 100%;
    text-align: center;
    border: 0;
    outline: 0;
    resize: none;
    overflow: hidden;
    background: transparent;
    padding: 0;
    margin: 0;
    display: block;
    font-family: var(--tag-font, "IBM Plex Sans", Arial, sans-serif);
    font-weight: var(--tag-weight, 700);
    font-size: var(--tag-size, 12pt);
    line-height: 1.18;
    color: #000000;
  }
  .cell-input::placeholder { font-weight: 400; color: #b7bfc9; }
  .cell-input:focus { background: var(--lime-wash); }
  /* ---- end of real print area ---- */

  /* --- sidebar --- */
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    position: sticky;
    top: var(--s-5);
  }
  /* Must stay AFTER the base rule above: with equal specificity the later
     rule wins, and a sticky sidebar stacked above a single-column layout
     would stay pinned to the top and overlap the rest of the configurator. */
  @media (max-width: 1170px) {
    .sidebar { position: static; }
  }

  /* Configurator density, not marketing-page density: 16px padding and
     8px gaps instead of 24/12. */
  .panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 0 #142a2507;
    padding: var(--s-4);
  }

  .panel h2 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 var(--s-3);
  }

  .field { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-2); }
  .field:last-child { margin-bottom: 0; }
  .field label {
    font-size: 13px; font-weight: 600; color: var(--ink);
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .field .hint { font-size: 12px; color: var(--ink-muted); font-weight: 400; text-transform: none; letter-spacing: normal; }

  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }

  input[type="number"], select, textarea, input[type="text"], input[type="file"] {
    font-family: var(--font-ui);
    font-size: 14px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #ffffff;
    color: var(--ink);
    width: 100%;
  }
  input[type="number"] { font-family: var(--font-mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
  input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none;
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(98, 133, 49, 0.2);
  }

  .unit-input {
    display: flex; align-items: stretch;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: #ffffff; overflow: hidden;
  }
  .unit-input:focus-within { border-color: var(--leaf); box-shadow: 0 0 0 3px #62853120; }
  .unit-input input {
    flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent;
  }
  .unit-input input:focus-visible { outline: none; box-shadow: none; }
  .unit-input .unit {
    flex: none; display: flex; align-items: center;
    font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint);
    padding: 0 10px; border-left: 1px solid var(--line); background: var(--surface);
    pointer-events: none;
  }

  .weight-toggle { display: flex; gap: 3px; background: var(--surface); border-radius: var(--r-sm); padding: 3px; }
  .weight-toggle button {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 0;
    border: none;
    background: transparent;
    color: var(--ink);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .weight-toggle button[aria-pressed="true"] {
    background: var(--deep);
    color: #ffffff;
  }
  .weight-toggle button:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }

  .font-preview {
    margin-top: var(--s-2);
    padding: 10px 12px;
    background: var(--surface);
    border-radius: var(--r-sm);
    color: var(--ink);
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .col-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-2) 0; }
  .col-chip {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 9px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .col-chip:hover { background: var(--forest); border-color: var(--forest); color: #ffffff; }

  .import-status {
    font-size: 12.5px;
    color: var(--ink-muted);
    margin: var(--s-2) 0 0;
    line-height: 1.5;
  }
  .import-status strong { color: var(--ink); }

  .btn-block { width: 100%; text-align: center; margin-top: var(--s-1); }

  footer.credits {
    text-align: center;
    color: var(--ink-faint);
    font-size: 12px;
    margin-top: var(--s-3);
  }

  @media print {
    body { background: #ffffff; }
    .no-print { display: none !important; }
    /* Screen padding would push the first sheet past the A4 page, leaving
       an empty page before the second one. */
    .tool-section { padding: 0; }
    .tool-section .app-shell,
    .app-shell { max-width: none; margin: 0; padding: 0; }
    .layout { display: block; }
    .sheet-wrapper { overflow: visible; max-height: none; padding: 0; border: 0; }
    .sheet { border: 0; }
    .sheet + .sheet { margin-top: 0; }
    .sheet:not(:last-child) { page-break-after: always; break-after: page; }
    .sheet-page-num { color: #999999; }
    /* On screen one page at a time is shown (the others via [hidden]); in
       print they must all appear, so this overrides the global
       "[hidden] { display: none !important; }". */
    .sheet[hidden] { display: block !important; }
    .cell-input:focus { background: transparent; }
    .cell-input::placeholder { color: transparent; }
    .cell.cell--overflow { border-color: #000000; border-style: dashed; }
    .sheet-wrapper--no-cut .cell,
    .sheet-wrapper--no-cut .cell.cell--overflow { border-color: transparent; }
  }

  @page { size: A4; margin: 0; }

  /* ================= cookie banner ================= */
  .cookie-banner {
    position: fixed; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); z-index: 500;
    max-width: 640px; margin: 0 auto;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px 12px 0 0;
    box-shadow: 0 1px 0 var(--line);
    padding: var(--s-4) var(--s-5);
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
  }
  .cookie-banner-text {
    flex: 1 1 320px; margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 1.55;
  }
  .cookie-banner-actions {
    display: flex; gap: var(--s-2); flex: none;
  }
  .cookie-banner-actions .btn { min-height: 40px; padding: 9px 18px; }

  /* ================= legal page (privacy/cookie) ================= */
  .legal { padding: 64px 0 var(--s-8); }
  .legal-content { max-width: 760px; margin: 0 auto; padding: 0 var(--s-5); }
  .legal-content h2 {
    font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.035em;
    margin: var(--s-7) 0 var(--s-3);
  }
  .legal-content h2:first-child { margin-top: 0; }
  .legal-content h3 {
    font-family: var(--font-ui); font-weight: 700; font-size: 17px;
    margin: var(--s-5) 0 var(--s-2);
  }
  .legal-content p, .legal-content li { color: var(--ink-muted); font-size: 15px; line-height: 1.65; }
  .legal-content p { margin: 0 0 var(--s-3); }
  .legal-content ul { margin: 0 0 var(--s-3); padding-left: 1.2em; }
  .legal-content li { margin-bottom: var(--s-2); }
  .legal-content strong { color: var(--ink); }
  .legal-content .legal-updated {
    font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin: 0 0 var(--s-6);
  }
  .legal-table {
    width: 100%; border-collapse: collapse; margin: 0 0 var(--s-4); font-size: 14px;
  }
  .legal-table th, .legal-table td {
    border: 1px solid var(--line); padding: var(--s-2) var(--s-3); text-align: left; vertical-align: top;
  }
  .legal-table th {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--ink-faint); background: var(--surface); font-weight: 500;
  }
  .legal-table td { overflow-wrap: anywhere; }
  .legal-content .btn { margin-top: var(--s-1); }
  @media (max-width: 600px) {
    .legal-table { display: block; overflow-x: auto; }
  }

  /* ================= mobile nav (js/nav.js) ================= */
  .nav-toggle { display: none; }
  @media (max-width: 800px) {
    .site-header { position: relative; z-index: 50; }
    .site-header-inner { justify-content: space-between; }
    .site-header-inner .btn-sm { margin-left: auto; }
    .site-nav { display: none; }
    .nav-toggle {
      flex: none; display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
      width: 40px; height: 40px; padding: 0 11px;
      border: 1px solid var(--line); border-radius: 9px; background: var(--card); cursor: pointer;
    }
    .nav-toggle span {
      display: block; height: 2px; border-radius: 2px; background: var(--ink);
      transition: transform 0.2s ease, opacity 0.2s ease;
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .nav-toggle:focus-visible { outline: 2px solid var(--leaf-focus); outline-offset: 2px; }
    .site-nav.is-open {
      display: flex; flex-direction: column; gap: 0;
      position: absolute; top: 100%; left: 0; right: 0;
      margin: 0; padding: 4px 24px 12px;
      background: var(--paper); border-bottom: 1px solid var(--line);
      box-shadow: 0 14px 24px #142a2514;
    }
    .site-nav.is-open a { padding: 14px 0; font-size: 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
    .site-nav.is-open a:last-child { border-bottom: 0; }
    .site-nav.is-open a[aria-current="page"] { color: var(--forest); }
  }
  @media (max-width: 440px) {
    .site-header-inner { padding: 0 16px; gap: 10px; }
    .brand-name { white-space: nowrap; }
    .site-nav.is-open { padding-left: 16px; padding-right: 16px; }
  }
  @media (max-width: 360px) {
    .site-header-inner .btn-sm { display: none; }
    .nav-toggle { margin-left: auto; }
  }
