/* ============================================================================
   HiveSystem — landing stylesheet  (landing/assets/site.css)
   ----------------------------------------------------------------------------
   Plain CSS. No framework, no bundler, no npm step. The page must render the
   same opened straight off the filesystem (file://) and served from a web root,
   so nothing here depends on a build or on an absolute origin.

   WHERE THE VALUES COME FROM
     Every colour, radius, duration, ease and type step below is the REAL
     product token, read out of frontend/src/styles.css (design tokens v0.5.0).
     The approved mockup (landing/mockup-v2-modern.html) carried hand-copied
     near-misses; those copies were not trusted and are not reproduced.

   WHAT THIS FILE DELIBERATELY DOES NOT DO
     - No CDN, ever. The typeface is self-hosted from ../fonts/ because an
       on-prem / air-gapped install has no route to a CDN — see the comments in
       frontend/index.html:15-17 and frontend/src/styles.css:24-30.
     - No drop shadow for depth. Depth is the hairline (--line / --line-strong)
       only, and a card "lift" is translateY + border-strong, never a shadow
       (design law rule 18). The only elevation the product allows is
       --shadow-pop on overlays, and a landing page has no overlays.
     - No gradient other than --gradient-accent, and that one is decorative:
       exactly one word in the hero. Never a button, never a card, never data
       (rule 16).
     - No text label on a chart series fill (rule 11). The data bars in the
       hero frame and in the wide bento card carry no labels at all.
     - No raw colour in the markup: index.html only ever names a custom
       property or a class. Raw values live here, once, in :root.
   ========================================================================= */

/* --- 1. Self-hosted Persian typeface -----------------------------------------
   IRANYekanX (FaNum variable build) is the product's own licence-held face.
   It is a VARIABLE font: the wght axis runs 100..1000, so no static weight is
   invented — matching frontend/src/styles.css:31-40, which declares the axis
   range rather than a fixed weight. The two url() paths are relative to this
   stylesheet (assets/ -> ../fonts/), which is what keeps the page working both
   from disk and from a web root.
   Persian needs kerning + contextual alternates for correct letter joining.  */
@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanXFaNumVF.woff2") format("woff2-variations"),
       url("../fonts/IRANYekanXFaNumVF.woff") format("woff-variations");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* --- 2. Tokens --------------------------------------------------------------
   Layer 1: primitive palette, verbatim from frontend/src/styles.css @theme.
   Layer 2: semantic roles, verbatim from the :root block there.
   Nothing below this block may introduce a new colour.                        */
:root {
  /* --- primitives: ink ramp (warm throughout — the cream floor and the warm
     near-black ink are what stop the page reading as a default admin skin) --- */
  --neutral-0: #ffffff;
  --neutral-25: #fafaf7;
  --neutral-50: #f7f7f4;
  --neutral-100: #efeee8;
  --neutral-200: #e6e5e0;
  --neutral-300: #cfcdc4;
  --neutral-400: #a09c92;
  --neutral-500: #807d72;
  --neutral-600: #5a5852;
  --neutral-800: #26251e;

  /* --- primitives: accent (Cursor Orange, the single brand voltage) --- */
  --accent-50: #fdeee6;
  --accent-100: #fbdccd;
  --accent-200: #f6b699;
  --accent-300: #f28a5e;
  --accent-400: #f56b30;
  --accent-500: #f54e00;
  --accent-600: #d04200;
  --accent-700: #a83600;
  --accent-800: #7d2900;

  /* --- primitives: status roles --- */
  --success: #1f8a65;
  --success-bg: #e8f5ef;
  --success-border: #b9e2d1;
  --warning: #8a5a12;
  --warning-bg: #fbf1e3;
  --warning-border: #eed9b6;
  --error: #ba284d;
  --error-bg: #fdecef;
  --error-border: #f7c3d0;

  /* --- semantic roles (the shadcn contract) --- */
  --canvas: var(--neutral-50);
  --surface: var(--neutral-0);
  --ink: var(--neutral-800);
  --muted: var(--neutral-600);          /* readable secondary text: 7.11:1 on card */
  --disabled: var(--neutral-400);       /* disabled text ONLY: 2.74:1 — never body copy */
  --line: var(--neutral-200);           /* hairline */
  --line-strong: var(--neutral-300);    /* hairline-strong */
  --primary: var(--accent-700);         /* white on it is 6.58:1 — NOT accent-500 */
  --primary-foreground: #ffffff;
  --primary-hover: var(--accent-800);
  --ring: var(--accent-500);

  /* --- chart series: the NEW accessibility values.
     These were just re-measured. The mockup still carried the old decorative
     steps (amber #c08532 / violet #c0a8dd / sky #9fbbe0), which sit at 2.95:1,
     1.98:1 and 1.84:1 on the cream floor and fail the 3:1 a graphical object
     owes. chart-1 and chart-2 were already passing and are unchanged.
     Measured white / canvas: 3.52/3.28, 4.30/4.01, 4.04/3.77, 3.55/3.31, 3.54/3.30. */
  --chart-1: #f54e00;
  --chart-2: #1f8a65;
  --chart-3: #a87428;
  --chart-4: #9480a8;
  --chart-5: #748aa6;

  /* --- decorative accent gradient. DECORATIVE ONLY: the one highlighted word
     in the hero. Never a button, never a card, never a data surface, and never
     a second gradient anywhere (rule 16). It is a background-image value. --- */
  --gradient-accent: linear-gradient(120deg, #f54e00 0%, #f28a5e 55%, #dfa88f 100%);

  /* --- type scale (Cursor hierarchy: display sits at weight 400) ---
     --text-display-lg is the landing-only step that was just added to the
     product. Nothing inside the app consumes it.                             */
  --text-display-lg: 2.75rem;           /* 44px — landing hero only */
  --text-display-lg--lh: 1.3;
  --text-display-lg--fw: 400;
  --text-title: 1.375rem;               /* 22px */
  --text-title--lh: 1.4;
  --text-title--fw: 400;
  --text-heading: 1.125rem;             /* 18px */
  --text-heading--lh: 1.45;
  --text-heading--fw: 600;
  --text-subheading: 1rem;              /* 16px */
  --text-subheading--lh: 1.5;
  --text-subheading--fw: 600;
  --text-body: 0.875rem;                /* 14px */
  --text-body--lh: 1.75;                /* Persian needs the extra leading */
  --text-caption: 0.8125rem;            /* 13px */
  --text-caption--lh: 1.65;
  --text-micro: 0.6875rem;              /* 11px */
  --text-micro--lh: 1.5;
  --text-micro--fw: 600;

  --font-sans: "IRANYekanX", Tahoma, system-ui, sans-serif;

  /* --- geometry --- */
  --radius-card: 12px;
  --radius-control: 8px;
  --radius-xs: 6px;
  --radius-pill: 999px;

  /* --- motion: ONE duration pair for the whole page --- */
  --duration-fast: 140ms;
  --duration-base: 240ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* --- page rhythm --- */
  --space-card: 20px;
  --space-page: 24px;
  --space-cluster: 12px;

  --maxw: 1120px;
}

/* --- 3. Base ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

html,
body { margin: 0; padding: 0; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--text-body--lh);
  -webkit-font-smoothing: antialiased;
  /* Belt-and-braces against a stray horizontal scrollbar at 360px; every
     block below is also built to fit without this. */
  overflow-x: hidden;
}

/* Decorative dot-grid behind the fold. Token colour, masked away down the page
   (rule 17: the only background texture allowed). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--line) 1px, transparent 1.2px);
  background-size: 26px 26px;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 340px);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 340px);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-page);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; letter-spacing: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

/* Visually hidden but available to assistive tech (section headings that must
   not appear visually still need to exist for landmarks and lists). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-page);
  top: -60px;
  z-index: 40;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 10px 16px;
  font-weight: 600;
  transition: top var(--duration-fast) var(--ease);
}
.skip-link:focus-visible { top: 12px; }

/* Focus: one ring, matching the primary action colour rather than a second hue
   (--shadow-focus-strong is 0 0 0 3px rgb(245 78 0 / .16); the solid outline
   here is the same ring expressed as an outline so it survives any background). */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}

/* --- 4. Type roles ---------------------------------------------------------- */
.display-lg {
  font-size: var(--text-display-lg);
  font-weight: var(--text-display-lg--fw);
  line-height: var(--text-display-lg--lh);
}
/* The single decorative gradient on the page — one word, nothing else. */
.display-lg .grad {
  background-image: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title {
  font-size: var(--text-title);
  font-weight: var(--text-title--fw);
  line-height: var(--text-title--lh);
}
.heading {
  font-size: var(--text-heading);
  font-weight: var(--text-heading--fw);
  line-height: var(--text-heading--lh);
}
.subheading {
  font-size: var(--text-subheading);
  font-weight: var(--text-subheading--fw);
  line-height: var(--text-subheading--lh);
}
.body { font-size: var(--text-body); color: var(--muted); line-height: var(--text-body--lh); }
.caption { font-size: var(--text-caption); color: var(--muted); line-height: var(--text-caption--lh); }
.micro {
  font-size: var(--text-micro);
  font-weight: var(--text-micro--fw);
  color: var(--muted);
  line-height: var(--text-micro--lh);
}

/* --- 5. Buttons -------------------------------------------------------------
   Primary fills use --primary (#a83600, white on it is 6.58:1). They must NOT
   use accent-500: white on #f54e00 is 3.52:1 and fails AA. That was a real
   defect in the first draft and this is the deliberate fix, not a preference. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--primary-hover); }

.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--accent-50); border-color: var(--accent-300); }

.btn-block { width: 100%; }

/* --- 6. Header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(12px)) {
  .site-header { background: rgb(247 247 244 / 0.85); backdrop-filter: blur(12px); }
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 64px;
  flex-wrap: wrap;
}
.logo { font-weight: 600; font-size: var(--text-heading); }
.logo span { color: var(--accent-500); }   /* wordmark is a sanctioned accent-500 use */

.nav-links { display: flex; gap: 22px; margin-inline-start: auto; flex-wrap: wrap; }
.nav-links a {
  position: relative;
  padding: 4px 0;
  font-size: var(--text-body);
  color: var(--muted);
}
.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-500);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-fast) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

.header-cta { padding: 9px 18px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav { justify-content: space-between; }
}

/* --- 7. Sections ------------------------------------------------------------ */
section { padding: 72px 0; }
.sec-head { max-width: 620px; margin-bottom: 40px; }
.sec-head .body { margin-top: 12px; }
.sec-tight { padding-top: 0; }

/* --- 8. Hero ---------------------------------------------------------------- */
.hero { padding: 88px 0 64px; text-align: center; }
.hero .body { max-width: 560px; margin: 20px auto 0; }
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--text-caption);
  color: var(--muted);
}
.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-500);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(245 78 0 / 0.35); }
  55% { box-shadow: 0 0 0 6px rgb(245 78 0 / 0); }
}

/* --- 9. Product frame in the hero -------------------------------------------
   A real app window (sidebar + table + chart) rather than an empty box, built
   entirely from the product's own surfaces. No shadow: the frame is not an
   overlay, so it gets the hairline only (rule 18).                            */
.hero-visual {
  position: relative;
  margin-top: 56px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
  text-align: right;
}
.hv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}
.hv-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.hv-bar .t {
  margin-inline-start: auto;
  font-size: var(--text-micro);
  font-weight: var(--text-micro--fw);
  /* FIX-5: was --disabled (#a09c92) - 2.55:1 on this bar's background
     (--canvas #f7f7f4) and 2.74:1 on white. This is chrome text inside the
     sample product frame, NOT an inactive control, so the WCAG exemption for
     disabled components does not apply and axe flags it. --muted (#5a5852) is
     6.63:1 on --canvas and still reads as secondary. */
  color: var(--muted);
}
/* Plain wrapper so role="img" can sit on the window alone — the caption under
   it must stay in the accessibility tree. */
.hv-window { display: block; }

.hv-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 300px;
}
.hv-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  border-inline-end: 1px solid var(--line);
  background: var(--surface);
}
.hv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  font-size: var(--text-caption);
  color: var(--muted);
}
.hv-item.on {
  background: var(--accent-50);
  color: var(--primary);
  font-weight: 600;
}
.hv-item.on::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-500);
  flex: none;
}
.hv-main { padding: var(--space-card); min-width: 0; }

.hv-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.hv-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px;
  min-width: 0;
}
.hv-kpi b {
  display: block;
  font-size: var(--text-heading);
  font-weight: 400;
}
.hv-kpi span { font-size: var(--text-micro); color: var(--muted); }

.hv-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  overflow: hidden;
}
.hv-tr {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-caption);
}
.hv-tr:last-child { border-bottom: 0; }
.hv-tr.hd {
  background: var(--canvas);
  color: var(--muted);
  font-size: var(--text-micro);
  font-weight: var(--text-micro--fw);
}
.hv-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-micro);
  font-weight: 600;
}
.hv-badge.g { background: var(--success-bg); color: var(--success); }
.hv-badge.a { background: var(--warning-bg); color: var(--warning); }

/* Data bars. Series colours come from --chart-* only, they cycle, and no label
   is ever drawn on a fill (rule 11). */
.hv-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 44px;
  margin-top: 14px;
}
.hv-chart i {
  flex: 1;
  min-width: 4px;
  border-radius: 4px 4px 0 0;
  transform-origin: bottom;
  animation: grow 1s var(--ease) both;
}
.hv-chart i:nth-child(1) { height: 45%; background: var(--chart-1); animation-delay: 0.05s; }
.hv-chart i:nth-child(2) { height: 70%; background: var(--chart-2); animation-delay: 0.12s; }
.hv-chart i:nth-child(3) { height: 52%; background: var(--chart-3); animation-delay: 0.19s; }
.hv-chart i:nth-child(4) { height: 88%; background: var(--chart-4); animation-delay: 0.26s; }
.hv-chart i:nth-child(5) { height: 64%; background: var(--chart-5); animation-delay: 0.33s; }
.hv-chart i:nth-child(6) { height: 95%; background: var(--chart-1); animation-delay: 0.4s; }
@keyframes grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.hv-note {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
  font-size: var(--text-micro);
  color: var(--muted);
}

@media (max-width: 700px) {
  .hv-body { grid-template-columns: 1fr; }
  .hv-side {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }
  .hv-item { padding: 6px 10px; }
}
@media (max-width: 520px) {
  .hv-kpis { grid-template-columns: 1fr; }
  .hv-tr { grid-template-columns: 1fr 1fr; }
  .hv-tr span:nth-child(3),
  .hv-tr span:nth-child(4) { display: none; }
}

/* --- 10. Trust strip (marquee) ----------------------------------------------
   Every item here is a fact this repository proves — installer size, Windows
   target, per-user install, supported formats, per-file ceiling, and where the
   documents live. The mockup's placeholder figures (a claimed percentage time
   saving, a time-to-first-report claim, a 24/7 claim and a "100% of data"
   claim) had no source anywhere in the repo, so they were dropped rather than
   dressed up as achievements.                                                */
.trust {
  padding: 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.marquee {
  display: flex;
  width: max-content;
  animation: slide 46s linear infinite;
}
.trust:hover .marquee { animation-play-state: paused; }
.m-list { display: flex; }
.m-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 20px 34px;
  border-inline-end: 1px solid var(--line);
  white-space: nowrap;
}
.m-item strong {
  font-size: var(--text-title);
  font-weight: 400;
  color: var(--primary);
}
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* --- 11. Bento value grid ---------------------------------------------------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px;
  transition:
    border-color var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}
/* Lift is translateY + border-strong. Not a shadow (rule 18). */
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card h3 { font-size: var(--text-subheading); font-weight: 600; margin-bottom: 8px; }
.card .body { font-size: var(--text-caption); }

.bento-wide {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}
.bento-wide .hv-chart { height: 120px; margin-top: auto; padding-top: 16px; }

/* Icons are always currentColor and carry no colour of their own (rule 13). */
.ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--canvas);
  color: var(--ink);
}
.ico svg { width: 18px; height: 18px; }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; grid-row: span 1; }
}

/* --- 12. Steps --------------------------------------------------------------- */
.step-num {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--text-micro);
  font-weight: 600;
  color: var(--accent-600);
}

/* --- 13. Consult form ------------------------------------------------------- */
.consult {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-caption);
  font-weight: 600;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--canvas);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-body);
  transition: border-color var(--duration-fast) var(--ease);
}
.field input:focus,
.field select:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px rgb(245 78 0 / 0.16); }
/* The phone field is a Latin-digit value inside an RTL page: it renders LTR and
   is normalised to 09xxxxxxxxx before it ever leaves the browser. */
.field input[dir="ltr"] { text-align: right; font-variant-numeric: tabular-nums; }

.field .err {
  display: none;
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--error);
}
.field.invalid input,
.field.invalid select { border-color: var(--error); background: var(--error-bg); }
.field.invalid .err { display: block; }

.hint { margin-top: 10px; font-size: 0.75rem; color: var(--muted); line-height: 1.9; }

/* Result boxes. The success box is only ever shown when the network call
   actually returned ok — a form that fakes success loses real leads. */
.ok,
.warn {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  font-size: var(--text-caption);
}
.ok {
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  color: var(--success);
}
.warn {
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning);
}
.ok.show,
.warn.show { display: block; }

@media (max-width: 900px) {
  .consult { grid-template-columns: 1fr; gap: 26px; padding: 26px; }
}

/* --- 14. Download panel (dark ink surface) ---------------------------------- */
.dl {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: center;
  overflow: hidden;
  padding: 40px;
  border-radius: var(--radius-card);
  background: var(--ink);
  color: var(--primary-foreground);
}
/* Dot-grid texture on the dark surface, same token-coloured texture family as
   the page floor, masked away to the left (rule 17). */
.dl::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / 0.14) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
  mask-image: linear-gradient(to left, #000, transparent 70%);
}
.dl > * { position: relative; }
/* Inverting a heading on the dark panel is a token change, never an inline
   colour in the markup. */
.on-ink { color: var(--primary-foreground); }
.dl .body { color: rgb(255 255 255 / 0.72); }
.dl .meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.dl .meta div { font-size: 0.75rem; color: rgb(255 255 255 / 0.6); }
.dl .meta b {
  display: block;
  margin-top: 2px;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--primary-foreground);
}
.dl-box {
  padding: var(--space-card);
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 0.06);
}
.dl-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius-control);
  background: rgb(0 0 0 / 0.18);
  font-size: var(--text-caption);
  color: rgb(255 255 255 / 0.85);
  direction: ltr;
  justify-content: flex-start;
  overflow-wrap: anywhere;
}
.dl-file svg { width: 16px; height: 16px; flex: none; color: var(--accent-300); }
.dl-btn { width: 100%; }
.dl-box .micro { margin-top: 12px; color: rgb(255 255 255 / 0.55); }

@media (max-width: 900px) {
  .dl { grid-template-columns: 1fr; padding: 28px; }
}

/* --- 15. FAQ accordion -------------------------------------------------------
   Native <details>/<summary>: the disclosure semantics, the keyboard behaviour
   and the expanded-state announcement come from the platform rather than from
   ARIA re-implemented by hand. The "+" mark is a real span so it is a single
   aria-hidden decoration instead of CSS-generated text in the a11y tree.     */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--primary); }
.faq-mark {
  flex: none;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  /* FIX-6: was --accent-500 (#f54e00, 3.52:1 on white). At 20px weight 400
     this is NOT large text (AA large needs 24px, or 18.66px bold), so it needed
     4.5:1 and failed. --primary (#a83600) is 6.58:1 and matches the text-colour
     role already used at .faq-item summary:hover. */
  color: var(--primary);
  transition: transform var(--duration-fast) var(--ease);
}
.faq-item[open] .faq-mark { transform: rotate(45deg); }
/* grid-template-rows 0fr -> 1fr is the height-agnostic open animation. */
.acc {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-base) var(--ease);
}
.faq-item[open] .acc { grid-template-rows: 1fr; }
.acc > div { overflow: hidden; }
.faq-item .body { margin: 0 0 18px; font-size: var(--text-caption); }

/* --- 16. Footer -------------------------------------------------------------- */
.site-footer {
  margin-top: 20px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* --- 17. Motion opt-out ------------------------------------------------------
   Rule 19: every automatic animation must stop under prefers-reduced-motion.
   The marquee also stops being a marquee — it becomes a wrapped, centred list,
   because a frozen strip would simply be cut off.                            */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee {
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
    animation: none;
  }
  .m-list { flex-wrap: wrap; justify-content: center; }
  .m-list[aria-hidden="true"] { display: none; }
  .hv-chart i,
  .pill .dot { animation: none; }
  .acc { transition: none; }
  .faq-mark { transition: none; }
  .card,
  .btn,
  .nav-links a::after,
  .skip-link,
  .field input,
  .field select { transition: none; }
}

/* --- 18. Small screens -------------------------------------------------------
   360px is the floor. Nothing on the page may overflow horizontally.          */
@media (max-width: 520px) {
  :root { --space-page: 16px; }
  section { padding: 48px 0; }
  .hero { padding: 56px 0 44px; }
  .consult { padding: 20px; }
  .dl { padding: 20px; }
  .m-item { padding: 16px 20px; }
  .btn { padding: 11px 18px; }
}
