/* SofIA site: one stylesheet for the homepage and the legal pages.
   Direction A «Notturno evoluto» (owner decision D14): the dark world of the
   logo made calm, the light theme derived from the app's warm neutrals; blue
   = action, teal = AI. Token and class names are frozen: add, never rename.
   Nothing here needs an inline style.
   Layer order is the cascade order: no rule lives outside a layer, bare
   element selectors live only in base, page scopes are body.home,
   body.legal and body.notfound. */
@layer tokens, base, components, legal, home;

/* ---------------------------------------------------------------- tokens */
@layer tokens {
  :root {
    color-scheme: light dark;

    /* colour roles, light (the app's warm neutrals) */
    --bg: #FAFAF9;
    --bg-alt: #F5F4F2;
    --surface: #FFFFFF;
    --surface-2: #EDECE9;
    --text: #1A1A1A;
    --text-muted: #5C5A56;
    --border: #E4E2DE; /* hairline, decorative */
    --border-strong: #8A8782; /* a control's edge, 3:1 */
    --focus: #1D4ED8;
    --action: #2563EB; /* blue = action */
    --action-hover: #1D4ED8;
    --action-text: #FFFFFF; /* text on --action */
    --link: #1D4ED8;
    --ai: #0F766E; /* teal = AI, decoration */
    --ai-text: #0F766E; /* teal as text */
    --ai-soft: #E6F4F1;
    --callout-bg: #EFF6FF;
    --callout-border: #BFDBFE;
    --warn: #DC2626;
    --warn-bg: #FEF2F2;
    --warn-text: #991B1B;
    --code-bg: #EFF6FF;
    --code-text: #1E40AF;
    /* homepage scenes: VIP amber, the phone frame, the sheen on its glass, the highlighter */
    --vip: #B45309;
    --phone-body: #1C1C21;
    --phone-edge: #3B3B43;
    --phone-screen: #F5F4F2;
    --phone-bar: #8A8782;
    --sheen: rgb(255 255 255 / 0.28);
    --hl: rgb(250 204 21 / 0.6);

    /* shadows, light */
    --shadow-subtle: 0 1px 2px rgb(26 26 26 / 0.06);
    --shadow-small: 0 2px 6px rgb(26 26 26 / 0.08);
    --shadow-medium: 0 8px 20px -4px rgb(26 26 26 / 0.12);
    --shadow-large: 0 20px 44px -12px rgb(26 26 26 / 0.18);
    --shadow-panel: 0 20px 50px -28px rgb(26 26 26 / 0.35);
    --shadow-action: 0 4px 14px rgb(37 99 235 / 0.25);

    /* radii (the app: 4 pill, 12 control, 16 card, 20 hero, 999 chip) */
    --radius-xs: 4px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* spacing, 4 px base */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --gutter: 1rem;

    /* type: DM Sans from hosting/fonts, then a size-matched fallback */
    --font-sans: "DM Sans", "DM Sans Fallback", "DM Sans Fallback Roboto", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: clamp(1.625rem, 4vw, 2.25rem);
    --text-3xl: clamp(1.9rem, 5.2vw, 3.25rem);
    --text-display: clamp(2.75rem, 10.5vw, 6rem);
    --leading-tight: 1.05;
    --leading-snug: 1.3;
    --leading-body: 1.6;
    --measure: 68ch;

    /* layout */
    --container: 72rem;
    --container-narrow: 47.5rem; /* the legal text column */
    --header-h: 4rem;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --scroll-offset: calc(var(--header-h) + var(--space-3));
    --target-min: 2.75rem;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0C0C0F;
      --bg-alt: #131317;
      --surface: #18181B;
      --surface-2: #222227;
      --text: #F4F4F5;
      --text-muted: #A8A8B1;
      --border: #2A2A30;
      --border-strong: #70707A;
      --focus: #7DD3FC;
      --action: #60A5FA;
      --action-hover: #7DB6FB;
      --action-text: #08111F;
      --link: #7DB6FB;
      --ai: #2DD4BF;
      --ai-text: #2DD4BF;
      --ai-soft: #0F2A2A;
      --callout-bg: #111C2E;
      --callout-border: #2F4F7F;
      --warn: #F87171;
      --warn-bg: #2A1416;
      --warn-text: #FCA5A5;
      --code-bg: #1F2A3B;
      --code-text: #93C5FD;
      --vip: #FBBF24;
      --phone-body: #26262C;
      --phone-edge: #3B3B43;
      --phone-screen: #131317;
      --phone-bar: #5A5A63;
      --sheen: rgb(255 255 255 / 0.06);
      --hl: rgb(251 191 36 / 0.38);

      --shadow-subtle: 0 1px 2px rgb(0 0 0 / 0.4);
      --shadow-small: 0 2px 6px rgb(0 0 0 / 0.45);
      --shadow-medium: 0 8px 20px -4px rgb(0 0 0 / 0.55);
      --shadow-large: 0 20px 44px -12px rgb(0 0 0 / 0.7);
      --shadow-panel: 0 20px 50px -28px rgb(0 0 0 / 0.55);
      --shadow-action: 0 4px 14px rgb(0 0 0 / 0.45);
    }
  }
}

/* ------------------------------------------------------------------ base */
@layer base {
  @font-face {
    font-family: "DM Sans";
    src: url("../fonts/dm-sans-400.v1.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: "DM Sans";
    src: url("../fonts/dm-sans-700.v1.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }
  /* what shows until DM Sans is ready, sized to the same footprint */
  @font-face {
    font-family: "DM Sans Fallback";
    src: local("Arial");
    size-adjust: 104%;
    ascent-override: 94%;
    descent-override: 30%;
    line-gap-override: 0%;
  }
  /* Android has no Arial face: the same footprint on Roboto (estimated from its metrics, not measured on a device) */
  @font-face {
    font-family: "DM Sans Fallback Roboto";
    src: local("Roboto");
    size-adjust: 107%;
    ascent-override: 92.7%;
    descent-override: 29%;
    line-gap-override: 0%;
  }

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

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* anchors and keyboard focus stay below the sticky header (WCAG 2.4.11); never also a margin on the target: the offset would double */
    scroll-padding-top: var(--scroll-offset);
  }

  body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-body);
    font-feature-settings: "kern", "liga";
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
  }

  h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote, pre { margin: 0; }
  h1, h2, h3, h4 { line-height: var(--leading-snug); text-wrap: balance; }
  h1 { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.03em; }
  h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; }
  h3 { font-size: var(--text-base); font-weight: 700; }
  h4 { font-size: var(--text-sm); font-weight: 700; }
  ul, ol { padding-left: var(--space-5); }
  li + li { margin-top: var(--space-2); }
  strong, b { font-weight: 700; }
  small { font-size: var(--text-sm); }
  img, svg, video, picture { display: block; max-width: 100%; height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-5) 0; }

  a {
    color: var(--link);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    overflow-wrap: anywhere;
  }
  a:hover { text-decoration-thickness: 2px; }

  code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
  }
  code {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.125em 0.4em;
    border-radius: var(--radius-xs);
    overflow-wrap: anywhere;
  }

  table { border-collapse: collapse; width: 100%; }
  th, td { text-align: left; vertical-align: top; }

  ::selection { background: var(--action); color: var(--action-text); }

  /* focus: a 3 px outline, 3:1 against every surface it sits on */
  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
  }
  :focus:not(:focus-visible) { outline: none; }

  /* the header is static under 21em (see .site-nav in components): nothing to clear */
  @media (max-width: 21em) {
    html { scroll-padding-top: 0; }
  }

  /* the language contract: the other half is hidden only once
     html[data-lang] is set; without it (no JavaScript) both show */
  html[data-lang="it"] .lang-en,
  html[data-lang="en"] .lang-it,
  html[data-lang] .lang-sep { display: none !important; }

  /* motion: no smooth scrolling anywhere (it would animate the jump to a fragment on load); reduce stops the rest */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
      animation: none !important;
      transition: none !important;
      scroll-behavior: auto !important;
    }
  }

  @media (forced-colors: active) {
    :focus-visible { outline-color: Highlight; }
  }

  /* print: the legal text on paper, both halves when no language is set */
  @media print {
    :root { color-scheme: light; }
    *,
    *::before,
    *::after {
      background: transparent !important;
      color: CanvasText !important;
      box-shadow: none !important;
      text-shadow: none !important;
    }
    body { font-size: 11pt; line-height: 1.45; min-height: 0; }
    nav, .skip-link, .lang-switch, .toc, .toc-details { display: none !important; }
    a { text-decoration: underline; }
    a[href^="http"]::after,
    a[href^="/"]::after { content: " (" attr(href) ")"; font-size: 0.85em; overflow-wrap: anywhere; }
    h1, h2, h3, h4 { break-after: avoid; }
    tr, figure, pre, blockquote { break-inside: avoid; }
    p, li { orphans: 3; widows: 3; }
    code { border: 1px solid GrayText; }
  }
}

/* ------------------------------------------------------------ components */
@layer components {
  .container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
  }
  .container-narrow {
    width: min(100% - 2 * var(--gutter), var(--container-narrow));
    margin-inline: auto;
  }

  .skip-link {
    position: absolute;
    left: var(--space-4);
    top: -5rem;
    z-index: 30;
    padding: var(--space-3) var(--space-4);
    background: var(--action);
    color: var(--action-text);
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
  }
  .skip-link:focus { top: var(--space-4); }

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }

  /* header bar */
  .site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .site-nav__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    min-height: var(--header-h);
    padding-block: var(--space-2);
  }
  .brand {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
    margin-right: auto;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
  }
  .brand img { height: 2.5rem; width: auto; }
  .nav-links { display: flex; flex-wrap: wrap; gap: var(--space-1); padding: 0; list-style: none; }
  .nav-links li + li { margin-top: 0; }
  .nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
    padding: 0 var(--space-3);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 700;
    text-decoration: none;
  }
  .nav-links a:hover { background: var(--surface-2); }
  .nav-links a[aria-current] { box-shadow: inset 0 -2px 0 var(--action); }
  /* a header that can wrap (200% text, 180 CSS px) is no longer pinned: it would cover the content and the anchors */
  @media (max-width: 21em) {
    .site-nav { position: static; }
  }

  /* language switch: buttons with aria-pressed (home), links with aria-current (legal) */
  .lang-switch {
    display: inline-flex;
    gap: var(--space-1);
    padding: 2px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
  }
  .lang-switch button,
  .lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.25rem;
    padding: 0 var(--space-3);
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
  }
  .lang-switch button:hover,
  .lang-switch a:hover { color: var(--text); }
  .lang-switch button[aria-pressed="true"],
  .lang-switch a[aria-current] {
    background: var(--text);
    color: var(--bg);
  }

  /* buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: var(--target-min);
    padding: 0 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--action);
    color: var(--action-text);
    font-size: var(--text-base);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow-action);
    transition: background-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
  }
  .btn:hover { background: var(--action-hover); text-decoration: none; }
  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .btn:hover { transform: translateY(-2px); }
  }
  .btn:active { transform: none; box-shadow: none; }
  .btn[aria-disabled="true"],
  .btn:disabled { opacity: 0.55; pointer-events: none; box-shadow: none; }
  .btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: none;
  }
  .btn-secondary:hover { background: var(--surface-2); transform: none; }
  .btn-sm { min-height: 2.5rem; padding: 0 .8rem; font-size: .9375rem; }
  .btn-lg { min-height: 3.5rem; padding: 0 1.6rem; font-size: 1.0625rem; border-radius: var(--radius-lg); }

  /* card */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-subtle);
  }
  .card > :first-child { margin-top: 0; }
  .card > :last-child { margin-bottom: 0; }
  .card-ai { border-color: var(--ai); }

  /* section */
  .section { padding-block: clamp(var(--space-7), 9vw, var(--space-9)); }
  .section + .section { border-top: 1px solid var(--border); }
  .section-alt { background: var(--bg-alt); }
  .section__title { font-size: var(--text-3xl); letter-spacing: -0.035em; line-height: var(--leading-tight); max-width: 18ch; }
  .eyebrow {
    color: var(--ai-text);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  /* page head of a text page: title, then the meta line */
  .page-head { padding-block: var(--space-7) var(--space-5); }
  .page-head .meta { margin-top: var(--space-2); }
  .lead { font-size: 1.1875rem; color: var(--text); }
  .note { max-width: 46ch; color: var(--text-muted); font-size: .9375rem; }
  .link { font-weight: 700; text-underline-offset: 0.25em; text-decoration-thickness: 2px; }

  /* panel: the raised surface a demo or a figure sits on */
  .panel {
    container-type: inline-size;
    position: relative;
    display: grid;
    gap: .8rem;
    align-content: start;
    padding: 1.1rem;
    font-size: var(--text-base);
    line-height: 1.4;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-panel);
  }
  .panel > * { min-width: 0; }

  /* «Esempio»: the tag every invented sample on the site wears */
  .tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.1em 0.65em;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: .78em;
  }

  /* segmented control: real buttons, aria-pressed marks the one in force */
  .seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.2rem;
    width: 100%;
    padding: 0.25rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--bg-alt);
  }
  .seg button {
    min-height: var(--target-min);
    padding: 0 0.35rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-muted);
    font-size: .8125rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.25s, color 0.25s;
  }
  .seg button:hover { color: var(--text); }
  /* wide screens: the control hugs its labels (the comp's variant) */
  @media (min-width: 40rem) {
    .seg { display: inline-grid; width: auto; grid-auto-columns: auto; }
    .seg button { padding: 0 1rem; font-size: .875rem; }
  }
  .seg button[aria-pressed="true"] { background: var(--action); color: var(--action-text); }

  /* chips: small labels and choices; the AI one is teal */
  .chips { display: flex; flex-wrap: wrap; gap: .4em; padding: 0; list-style: none; }
  .chips li + li { margin-top: 0; }
  .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.35em 0.7em;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text);
    font-size: .8em;
  }
  .chip svg { width: 1.1em; height: 1.1em; color: var(--ai); }
  .chip-ai { border-color: var(--ai); background: var(--ai-soft); color: var(--ai-text); font-weight: 700; }

  /* footer: the homepage's own (the legal pages' bare footer is in the legal layer) */
  .site-footer {
    margin-top: var(--space-7);
    padding-block: var(--space-6);
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: var(--text-sm);
  }
  .site-footer p { color: var(--text-muted); max-width: var(--measure); margin-bottom: var(--space-2); }
  .site-footer a { color: var(--text-muted); font-weight: 700; }
  .site-footer a:hover { color: var(--text); }
  .footer-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); padding: 0; list-style: none; }
  .footer-links li + li { margin-top: 0; }
  .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
  }

  /* the meta line (version, date) under a page title; .nobr keeps a date in one piece (hyphens would let it break) */
  .meta { color: var(--text-muted); font-size: var(--text-sm); }
  .nobr { white-space: nowrap; }

  /* table of contents, outside the language halves */
  .toc {
    padding: var(--space-4) var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
  }
  .toc ol,
  .toc ul { display: grid; gap: 0; padding: 0; list-style: none; }
  .toc li + li { margin-top: 0; }
  .toc li { break-inside: avoid; }
  @media (min-width: 48rem) {
    .toc ol,
    .toc ul { display: block; column-count: 2; column-gap: var(--space-6); }
  }
  .toc a {
    display: flex;
    align-items: center;
    min-height: 2rem;
    padding-block: 0.25rem;
    color: var(--text);
    text-decoration: none;
  }
  .toc a:hover { color: var(--link); text-decoration: underline; }

  /* callout and its warning twin (legal markup: class="callout warn") */
  .callout {
    margin-block: var(--space-3);
    padding: var(--space-4);
    background: var(--callout-bg);
    border: 1px solid var(--callout-border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: var(--text-sm);
  }
  .callout > :last-child { margin-bottom: 0; }
  .callout.warn {
    background: var(--warn-bg);
    border-color: var(--warn);
    color: var(--warn-text);
  }
  .callout.warn a { color: inherit; }
  .callout.warn :is(p, ul, ol, li, strong) { color: inherit; }

  /* long-form text: legal pages and any prose; its sections are cards */
  .prose { max-width: var(--measure); }
  .prose p,
  .prose ul,
  .prose ol { color: var(--text-muted); margin-bottom: var(--space-3); max-width: var(--measure); }
  .prose :is(h2, h3) { color: var(--text); }
  .prose h2 { margin-bottom: var(--space-3); }
  .prose h3 { margin: var(--space-4) 0 var(--space-2); }
  .prose strong { color: var(--text); }
  .prose > :last-child { margin-bottom: 0; }
  .prose-wide { max-width: none; }
  .prose .callout { max-width: var(--measure); }
  .prose section {
    margin-bottom: var(--space-4);
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
  .prose section > :last-child { margin-bottom: 0; }
  /* after .prose ul / ol (same specificity): the TOC lists have no margin of their own, so the card pads evenly */
  .toc :is(ol, ul) { margin: 0; max-width: none; }

  /* tables: a scrollable strip on wide screens, stacked cards under 600 px
     (every cell carries its column name in data-label) */
  .table-wrap { overflow-x: auto; margin-bottom: var(--space-3); }
  .prose table { font-size: var(--text-sm); color: var(--text-muted); }
  .prose th,
  .prose td { padding: var(--space-3) var(--space-2); border-top: 1px solid var(--border); }
  .prose th { color: var(--text); font-weight: 700; }
  @media (max-width: 37.5rem) {
    .prose table,
    .prose tbody,
    .prose tr,
    .prose th,
    .prose td { display: block; }
    /* the head row leaves the screen but not the accessibility tree */
    .prose thead {
      position: absolute;
      inline-size: 1px;
      block-size: 1px;
      margin: -1px;
      overflow: hidden;
      white-space: nowrap;
    }
    .prose tr { padding: var(--space-2) 0; border-top: 1px solid var(--border); }
    .prose td { padding: var(--space-1) 0; border: 0; }
    .prose td[data-label]::before {
      content: attr(data-label) ": ";
      color: var(--text);
      font-weight: 700;
    }
  }
}

/* forced colours: the current state may not rest on a background the system replaces (after the rules it overrides) */
@layer components {
  @media (forced-colors: active) {
    .lang-switch a[aria-current],
    .lang-switch button[aria-pressed="true"],
    .seg button[aria-pressed="true"],
    .nav-links a[aria-current] {
      forced-color-adjust: none;
      background: Highlight;
      color: HighlightText;
    }
    .nav-links a[aria-current] { text-decoration: underline; }
  }
}

/* -------------------------------------------------------- legal and home */
/* `legal` holds what only the legal pages and the 404 need (body.legal, body.notfound); Phase 6 fills `home`
   (body.home); each only adds, and re-captures the other page type unchanged. */
@layer legal {
  /* the legal pages' footer: bare, byte-identical on every page, so it is styled by position (also the 404's) */
  body.legal footer,
  body.notfound footer {
    margin-top: var(--space-7);
    padding-block: var(--space-6);
    padding-inline: max(var(--gutter), (100% - var(--container-narrow)) / 2);
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: var(--text-sm);
  }
  body.legal footer p,
  body.notfound footer p { color: var(--text-muted); max-width: var(--measure); margin-bottom: var(--space-2); }
  /* 24 px of line on 14 px text: the footer links meet WCAG 2.5.8 without a markup change */
  body.legal footer p,
  body.notfound footer p { line-height: 1.75; }
  body.legal footer a,
  body.notfound footer a { color: var(--text-muted); font-weight: 700; }
  body.legal footer a:hover,
  body.notfound footer a:hover { color: var(--text); }

  /* the 404's two actions */
  .btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); max-width: none; }

  /* the second language half sits below the first when both show (no JavaScript); with one hidden the visible half
     would carry this margin too, and the gap under the index would be 3rem instead of a card gap */
  html:not([data-lang]) .lang-block + .lang-block { margin-top: var(--space-7); }

  /* the «Indice»: a <details> that is open in the markup (open without JavaScript); toc.js closes it on a narrow screen.
     The gap under it is the gap between two section cards. */
  .toc-details { margin-bottom: var(--space-4); }
  .toc-details .toc { margin-bottom: 0; }
  .toc-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: var(--target-min);
    margin-bottom: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    font-size: var(--text-base);
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
  }
  .toc-details > summary::-webkit-details-marker { display: none; }
  .toc-details > summary:hover { background: var(--surface-2); }
  .toc-details:not([open]) > summary { margin-bottom: 0; }
  /* a chevron drawn with borders: down when closed, up when open */
  .toc-details > summary::after {
    content: "";
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.15rem) rotate(45deg);
    transition: transform 0.2s var(--ease);
  }
  .toc-details[open] > summary::after { transform: translateY(0.1rem) rotate(-135deg); }
}
/* ---------------------------------------------------------------- home */
/* The homepage (body.home): ported from the approved scenic comp. The hiding state of the scenes exists only under html.live,
   which site.js adds; without JavaScript, or with reduced motion, every scene shows its final state. */
@layer home {
body.home h1, body.home h2{font-weight:700;letter-spacing:-.035em;line-height:1.04;text-wrap:balance}
body.home h2{font-size:clamp(1.9rem,5.2vw,3.25rem);max-width:18ch}
body.home .hero{position:relative;overflow:hidden;padding-top:clamp(3rem,9vw,6.5rem)}
body.home .hero-in{display:grid;gap:1.5rem;justify-items:start}
body.home .hero h1{font-size:clamp(2.75rem,10.5vw,6rem);max-width:11ch}
body.home .lede{font-size:clamp(1.0625rem,2.4vw,1.375rem);max-width:36ch;color:var(--text-muted)}
body.home .hero-stage{position:relative;height:25rem;margin-top:2rem;overflow:hidden}
body.home .hero-stage .scene{position:absolute;left:50%;top:1.5rem;margin-left:-.5em}
body.home .hp{font-size:min(17rem,72vw)}
body.home .glow{position:absolute;left:50%;top:-2rem;width:min(46rem,150vw);aspect-ratio:1;transform:translateX(-50%);border-radius:50%;
background:radial-gradient(closest-side,rgb(40 235 245/.5),rgb(61 124 233/.3) 45%,transparent 72%)}
@media (prefers-color-scheme:light){body.home .glow{background:radial-gradient(closest-side,rgb(10 140 168/.2),rgb(37 99 235/.12) 45%,transparent 72%)}}
body.home .scene{perspective:1500px;perspective-origin:50% 38%;width:1em}
body.home .settle{position:relative;transform-style:preserve-3d}
body.home .phone3d{position:relative;width:1em;aspect-ratio:9/18.5;transform-style:preserve-3d;transform:rotateX(6deg) rotateY(-16deg);will-change:transform}
body.home .ph-layers, body.home .ph-layers i, body.home .face, body.home .glare{position:absolute;inset:0;border-radius:.105em}
body.home .ph-layers{transform-style:preserve-3d}
body.home .ph-layers i{background:linear-gradient(100deg,rgb(44 44 51),var(--phone-edge) 40%,rgb(44 44 51))}
body.home .ph-layers i:nth-child(1){transform:translateZ(-.1rem)}
body.home .ph-layers i:nth-child(2){transform:translateZ(-.2rem)}
body.home .ph-layers i:nth-child(3){transform:translateZ(-.3rem)}
body.home .ph-layers i:nth-child(4){transform:translateZ(-.4rem)}
body.home .ph-layers i:nth-child(5){transform:translateZ(-.5rem)}
body.home .ph-layers i:nth-child(6){transform:translateZ(-.6rem)}
body.home .ph-layers i:nth-child(7){transform:translateZ(-.7rem)}
body.home .ph-layers i:nth-child(8){transform:translateZ(-.8rem)}
body.home .ph-layers i:nth-child(9){transform:translateZ(-.9rem)}
body.home .ph-layers i:nth-child(10){transform:translateZ(-1rem);background:rgb(20 20 24);box-shadow:0 2.4rem 3.5rem -1rem rgb(0 0 0/.65)}
body.home .face{padding:.03em;background:var(--phone-body);box-shadow:inset 0 0 0 1.5px var(--phone-edge),inset 0 2px 0 rgb(255 255 255/.12);transform:translateZ(.02rem)}
body.home .phone-in{position:relative;height:100%;border-radius:.078em;overflow:hidden;background:var(--phone-screen)}
body.home .cam{position:absolute;z-index:4;top:.034em;left:50%;width:.038em;aspect-ratio:1;margin-left:-.019em;border-radius:50%;background:rgb(5 5 7);box-shadow:0 0 0 2px rgb(26 26 32)}
body.home .bar{position:absolute;z-index:4;bottom:.026em;left:50%;width:34%;height:.014em;margin-left:-17%;border-radius:999px;background:var(--phone-bar)}
body.home .glare{z-index:5;overflow:hidden;pointer-events:none}
body.home .glare i{position:absolute;top:0;bottom:0;left:-60%;width:220%;background:linear-gradient(112deg,transparent 40%,var(--sheen) 47%,transparent 53%,rgb(255 255 255/.03) 58%,transparent 63%);}
body.home .pbtn{position:absolute;right:-.012em;top:24%;width:.22rem;height:9%;border-radius:2px;background:var(--phone-edge);transform:translateZ(-.45rem)}
body.home .screens{position:absolute;inset:0}
body.home .screen{container-type:inline-size;background:var(--phone-screen);color:var(--text)}
body.home .phone-in .screen{position:absolute;inset:0}
body.home .sx{position:absolute;inset:0;display:flex;flex-direction:column;gap:.7em;padding:3.1em 1em 4.6em;font-size:5cqw;line-height:1.4;overflow:hidden}
body.home .sh{display:flex;align-items:center;justify-content:space-between;gap:.5em}
body.home .sh b{font-size:1.1em}
body.home .lbl{font-size:.82em;color:var(--text-muted)}
body.home .swap{display:grid}
body.home .swap>*{grid-area:1/1;min-width:0;align-self:start}
body.home .qb{align-self:flex-end;max-width:90%;background:var(--action);color:var(--action-text);padding:.6em .85em;border-radius:1em 1em .25em 1em;font-weight:700}
body.home .th{visibility:hidden}
body.home .run{display:grid;gap:.5em;align-content:start;padding-top:.3em}
body.home .ln{display:flex;align-items:center;gap:.6em;color:var(--text-muted)}
body.home .dot{width:.7em;height:.7em;border-radius:50%;background:var(--ai);flex:none}
body.home .ln:not(.dn) .dot{animation:pulse 1.1s ease-in-out 4}
body.home .ln.dn .dot{background:var(--border-strong)}
body.home .meter{justify-self:end;font-size:.9em;color:var(--text-muted)}
body.home .tk{animation:tick .4s var(--ease)}
body.home .ans{display:flex;gap:.6em;align-items:flex-start;background:var(--ai-soft);border-radius:1em;padding:.8em}
body.home .ans p{font-size:.95em}
body.home .spark{color:var(--ai);flex:none;width:1.15em;height:1.15em;margin-top:.1em}
body.home .bt{margin-top:auto}
body.home .foot{font-size:.9em;color:var(--text-muted);border-top:1px solid var(--border);padding-top:.6em}
body.home .stop{justify-self:center;align-self:end;border:1px solid var(--border-strong);border-radius:99px;padding:.4em 1.3em;font-weight:700;background:var(--surface)}
body.home .comp{display:flex;align-items:center;justify-content:space-between;gap:.5em;border:1px solid var(--border-strong);border-radius:99px;padding:.55em .5em .55em 1em;color:var(--text-muted);font-size:.9em;background:var(--surface)}
body.home .comp i{width:1.6em;height:1.6em;border-radius:50%;background:var(--action);flex:none}
body.home .tabs{position:absolute;left:0;right:0;bottom:0;display:flex;height:3.5em;border-top:1px solid var(--border);background:var(--phone-screen)}
body.home .tabs span{flex:1;display:grid;place-items:start center;padding-top:.7em;font-size:.8em;color:var(--text-muted)}
body.home .tabs .cur{color:var(--action);font-weight:700}
body.home .av{width:1.9em;height:1.9em;flex:none;border-radius:50%;background:var(--surface-2);display:grid;place-items:center;font-style:normal;font-weight:700;font-size:.8em;color:var(--text-muted)}
body.home .draft{background:var(--surface);border:1px solid var(--border);border-radius:.9em;padding:.8em;min-height:11.5em;align-content:start}
body.home .dr{line-height:1.45}
body.home .acts{display:flex;justify-content:space-between;align-items:center;gap:.6em;margin-top:auto}
body.home .ghost{padding:.5em 1em;color:var(--text-muted)}
body.home .send{position:relative;background:var(--action);color:var(--action-text);font-weight:700;padding:.5em 1.4em;border-radius:99px}
body.home .rows{display:grid;gap:.4em}
body.home .row{display:flex;align-items:center;gap:.6em;background:var(--surface);border:1px solid var(--border);border-radius:.8em;padding:.5em .6em}
body.home .rt{display:grid;flex:1;min-width:0}
body.home .rt b{font-size:.9em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.home .rt em{font-style:normal;font-size:.78em;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.home .t1{color:var(--action)}
body.home .t2{color:var(--ai)}
body.home .t3{color:var(--vip)}
body.home .t4{color:var(--text-muted)}
body.home .phn{display:flex;align-items:center;gap:.5em;color:var(--text-muted);font-size:.82em;margin-top:auto}
body.home .wcard{display:grid;gap:.15em;background:var(--surface);border:1px solid var(--border);border-radius:.9em;padding:.7em .85em}
body.home .wt{font-size:.8em;color:var(--text-muted)}
body.home .big{font-size:2.1em;font-weight:700;letter-spacing:-.03em;line-height:1.05;font-variant-numeric:tabular-nums}
body.home .wsub{font-size:.75em;color:var(--text-muted)}
body.home .bars{display:flex;align-items:flex-end;gap:.35em;height:6em;margin-top:.3em}
body.home .b{flex:1;background:var(--action);border-radius:.25em .25em 0 0;transform-origin:bottom}
body.home .b:nth-child(1){height:35%}
body.home .b:nth-child(2){height:55%}
body.home .b:nth-child(3){height:42%}
body.home .b:nth-child(4){height:70%}
body.home .b:nth-child(5){height:60%}
body.home .b:nth-child(6){height:88%}
body.home .b:nth-child(7){height:66%}
body.home .b:nth-child(8){height:100%}
body.home .sec{border-top:1px solid var(--border);padding-block:clamp(2.5rem,6vw,4.5rem)}
body.home .sec-in{display:grid;gap:1.5rem;grid-template-areas:"a" "d" "b"}
body.home .txt-a{grid-area:a}
body.home .txt-b{grid-area:b}
body.home .demo{grid-area:d;min-width:0}
body.home .txt-a, body.home .txt-b{display:grid;gap:.9rem;align-content:start;min-width:0}
body.home .txt-a p, body.home .txt-b p{max-width:52ch}
body.home .txt-b>p{color:var(--text-muted)}
body.home .txt-a>p:not(.lead){font-size:1.125rem}
body.home .ph{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
body.home .ph b{font-size:1.05em}
body.home .phw{display:grid;place-items:center;position:relative;padding-block:.5rem}
body.home .phw .halo{position:absolute;left:50%;top:50%;width:min(30rem,100%);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(closest-side,rgb(61 124 233/.28),rgb(40 235 245/.12) 55%,transparent 72%)}
body.home .sp2{font-size:min(15rem,66vw);position:relative}
body.home .ruler{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
body.home .ruler li{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:.8rem .9rem;font-size:.9375rem;line-height:1.4}
body.home .ruler b{color:var(--ai)}
body.home .tl{display:flex;flex-wrap:wrap;gap:.45rem}
body.home .tl li{display:inline-flex;align-items:center;gap:.5rem;padding:.35rem .8rem;border:1px solid var(--ai);border-radius:99px;font-size:.875rem;font-weight:700;transition:opacity .4s var(--ease),border-color .4s}
body.home .tl .dt{display:block;flex:none;width:.55rem;height:.55rem;border-radius:50%;background:var(--ai)}
html.live body.home .tl li:not(.v){color:var(--text-muted);border-color:var(--border-strong)}
html.live body.home .tl li:not(.v) .dt{background:var(--border-strong)}
body.home .seg.big button{min-height:3rem;font-size:1rem}
body.home .instr{border:1px solid var(--border-strong);border-radius:12px;background:var(--bg-alt);padding:.7rem .85rem;min-height:4.2rem;font-size:1rem}
body.home .gline{display:flex;align-items:center;justify-content:flex-end;gap:.8rem}
body.home .stt{color:var(--text-muted);font-size:.875rem}
body.home .gen{padding:.5rem 1.4rem;font-weight:700;border-radius:99px;background:var(--action);color:var(--action-text)}
html.live body.home .gen.dn{animation:press .45s var(--ease)}
@keyframes press{40%{transform:scale(.92)}}
body.home .pw .draft{min-height:7.5rem}
body.home .pw .scenes>.vr{display:grid;gap:.6rem;align-content:start}
html:not(.live) body.home .mg .modes{display:none}
html:not(.live) body.home .mg .scenes{gap:1.2rem}
html:not(.live) body.home .mg .scenes>.vr{grid-area:auto;opacity:1;visibility:visible}
body.home .vs{display:grid}
body.home .vs>.vr{grid-area:1/1;opacity:0;visibility:hidden;transition:opacity .35s var(--ease),visibility 0s .35s}
body.home .vs>.vr.on{opacity:1;visibility:visible;transition-delay:0s}
body.home .pw .draft{min-height:9rem;font-size:1.0625rem;border-radius:14px;align-content:start}
body.home .th{visibility:hidden}
body.home .cols{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
body.home .col{display:grid;gap:.5rem;align-content:start;background:var(--bg-alt);border:1px solid var(--border);border-radius:14px;padding:.7rem;min-height:9rem}
body.home .ch{display:inline-flex;align-items:center;gap:.35rem;justify-self:start;font-weight:700;font-size:.9rem;border:1px solid currentColor;border-radius:99px;padding:.15rem .75rem}
body.home .why{font-size:.8125rem;color:var(--text-muted)}
body.home .col .rows .row{padding:.5rem .6rem}
body.home .col .rt b{font-size:.9rem}
body.home .col .rt em{font-size:.78rem}
html.live body.home .col:nth-child(1) .row.c:not(.v){transform:translate(150%,-6rem) scale(.92)}
html.live body.home .col:nth-child(2) .row.c:not(.v){transform:translate(50%,-6rem) scale(.92)}
html.live body.home .col:nth-child(3) .row.c:not(.v){transform:translate(-50%,-6rem) scale(.92)}
html.live body.home .col:nth-child(4) .row.c:not(.v){transform:translate(-150%,-6rem) scale(.92)}
body.home .phn{display:flex;align-items:center;gap:.5rem;color:var(--text-muted);font-size:.875rem}
body.home .bento{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
body.home .bento .wcard{font-size:1rem;padding:.9rem 1rem;align-content:start;gap:.3rem}
body.home .t-bars, body.home .t-list, body.home .t-rank{grid-column:1/-1}
body.home .bento .bars{height:7rem}
body.home .li2{display:grid;gap:.4rem}
body.home .li2 li{padding:.45rem .7rem;border:1px solid var(--border);border-radius:10px;font-size:.9rem;background:var(--bg-alt)}
body.home .rk{display:grid;gap:.5rem}
body.home .rk li{display:grid;gap:.2rem;font-size:.875rem}
body.home .rb{display:block;height:.55rem;border-radius:99px;background:var(--ai);transform-origin:left}
body.home .rk li:nth-child(1) .rb{width:100%}
body.home .rk li:nth-child(2) .rb{width:68%}
body.home .rk li:nth-child(3) .rb{width:44%}
html.live body.home .rb.c:not(.v){opacity:1;transform:scaleX(.02)}
body.home .mini .row{padding:.7rem .8rem}
body.home .mini .rt b{font-size:1rem}
body.home .mini .rt em{font-size:.875rem}
body.home .pmb{min-height:14rem}
body.home .pv-grid{display:grid;gap:.8rem}
body.home .pv-card{display:grid;gap:.8rem;align-content:start;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:1.1rem;transition:border-color .25s,transform .35s var(--ease)}
body.home .pv-card:hover{border-color:var(--ai)}
@media (hover: hover) and (prefers-reduced-motion: no-preference){body.home .pv-card:hover{transform:translateY(-3px)}}
body.home .pv-card p{max-width:none}
body.home .ic{display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:12px;background:var(--ai-soft);color:var(--ai)}
body.home .pv-note{display:flex;gap:.8rem;align-items:flex-start}
body.home .pv-note svg{flex:none;color:var(--ai);margin-top:.15rem}
html.live body.home .c, html.live body.home .x{transition:opacity .55s var(--ease),transform .7s var(--ease),visibility 0s}
html.live body.home .c:not(.v){opacity:0;transform:translateY(.7em)}
html.live body.home .land:not(.v){transform:translateY(-1em) scale(1.14)}
html.live body.home .b.c:not(.v){opacity:1;transform:scaleY(.02)}
html.live body.home .g{opacity:0;visibility:hidden;transform:translateY(-.4em) scale(.98);transition:opacity .4s var(--ease),transform .5s var(--ease),visibility 0s .4s}
html:not(.live) body.home .x{display:none}
body.home .send{position:relative}
html.live body.home .on-view .send{animation:ring 1.8s var(--ease) 2}
html.live body.home .rv{transition:opacity .9s var(--ease),transform 1s var(--ease)}
html.live body.home .rv:not(.in){opacity:0;transform:translateY(1.6rem)}
@keyframes pulse{50%{opacity:.35}}
@keyframes tick{from{transform:scale(1.18);color:var(--text)}}
@keyframes ring{from{box-shadow:0 0 0 0 color-mix(in srgb,var(--action) 70%,transparent)}
to{box-shadow:0 0 0 .5em color-mix(in srgb,var(--action) 0%,transparent)}}
@keyframes settle{from{opacity:0;transform:translateY(2rem) rotateY(-26deg)}}
@keyframes rise{from{opacity:0;transform:translateY(.7em)}}
@keyframes land{from{opacity:0;transform:translateY(-1em) scale(1.14)}}
@media (prefers-reduced-motion:no-preference){body.home .hero .settle{animation:settle 1.6s var(--ease) both}
body.home .hero-screen .qb{animation:rise .7s var(--ease) .5s both}
body.home .hero-screen .ans{animation:rise .8s var(--ease) .9s both}
body.home .hero-screen .chip{animation:land .9s var(--ease) 1.5s both}
body.home .hero-screen .chip+.chip{animation-delay:1.8s}
body.home .hero-screen .foot{animation:rise .8s var(--ease) 2.1s both}}
body.home .privacy{padding-block:clamp(2.5rem,6vw,4.5rem);background:var(--bg-alt);border-top:1px solid var(--border)}
body.home .privacy .container{display:grid;gap:1.5rem}
body.home .pv-note{color:var(--text-muted);max-width:62ch;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:1rem 1.25rem}
body.home .plans{padding-block:clamp(2.5rem,6vw,4.5rem);border-top:1px solid var(--border)}
body.home .plans .container{display:grid;gap:1.5rem}
body.home .plan-row{display:grid;gap:1rem}
body.home .plan{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:1.5rem;font-size:1.0625rem;transition:border-color .25s,transform .35s var(--ease)}
body.home .plan:hover{border-color:var(--ai)}
@media (hover: hover) and (prefers-reduced-motion: no-preference){body.home .plan:hover{transform:translateY(-3px)}}
body.home .plan strong{display:block;font-size:2rem;letter-spacing:-.03em;line-height:1.1}
body.home .plan-top{border-color:var(--ai)}
body.home .costs{display:grid;gap:.6rem}
body.home .costs li{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:.9rem 1rem}
body.home .costs strong{display:block;color:var(--ai);font-size:1.25rem;letter-spacing:-.02em}
body.home .pl-note{color:var(--text-muted)}
body.home .download{position:relative;overflow:hidden;padding-block:clamp(4.5rem,11vw,9rem);border-top:1px solid var(--border);text-align:center}
body.home .download .halo2{position:absolute;left:50%;top:50%;width:min(52rem,160vw);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(closest-side,rgb(61 124 233/.26),transparent 70%)}
@media (prefers-color-scheme:light){body.home .download .halo2{background:radial-gradient(closest-side,rgb(37 99 235/.1),transparent 70%)}}
body.home .dl-in{position:relative;display:grid;gap:1.25rem;justify-items:center}
body.home .dl-in h2{max-width:14ch}
@media (min-width:40rem){body.home .cols{grid-template-columns:repeat(4,1fr)}body.home .pv-grid{grid-template-columns:1fr 1fr}body.home .costs{grid-template-columns:repeat(2,1fr)}}
@media (min-width:56rem){body.home .hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:end;padding-top:clamp(4rem,8vw,7rem)}
body.home .hero-in{width:auto;margin-left:max(1rem,calc((100vw - 72rem)/2));margin-right:0;padding-bottom:5rem;align-self:center}
body.home .hero-stage{height:auto;min-height:40rem;align-self:stretch;margin-top:calc(1rem - clamp(4rem,8vw,7rem))}
body.home .hero-stage .scene{top:2rem}
body.home .hp{font-size:22rem}
body.home .glow{top:0}
body.home .sec-in{column-gap:4rem;row-gap:1.25rem;align-items:start}
body.home .l-split .sec-in{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"a d" "b d";grid-template-rows:auto 1fr}
body.home .l-split.rev .sec-in{grid-template-areas:"d a" "d b"}
body.home .l-split.bigd .sec-in{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
body.home .l-wide .sec-in{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"a b" "d d";align-items:end}
body.home .l-split .demo{align-self:center}
body.home .sp2{font-size:19rem}
body.home .bento{grid-template-columns:repeat(6,1fr)}
body.home .bento>*{grid-column:span 2}
body.home .bento .t-bars{grid-row:span 2}
body.home .bento .bars{height:11rem}
body.home .plan-row{grid-template-columns:repeat(3,1fr)}
body.home .pv-grid{grid-template-columns:repeat(3,1fr)}
body.home .costs{grid-template-columns:repeat(4,1fr)}}
body.home .th3{display:grid;gap:.9rem}
body.home .deck, body.home .an{align-content:start}
body.home .atts{display:flex;flex-wrap:wrap;gap:.5rem}
body.home .att, body.home .badge{display:inline-flex;align-items:center;gap:.45rem;font-size:.875rem;font-weight:700;border:1px solid var(--border-strong);border-radius:10px;padding:.3rem .65rem;background:var(--bg-alt)}
body.home .att svg, body.home .badge svg{color:var(--vip);flex:none}
body.home .badge{border-radius:99px;font-size:.8125rem;border-color:var(--ai);color:var(--ai)}
body.home .badge svg{color:var(--ai)}
body.home .sheets{display:grid;padding:.3rem 0 .4rem}
body.home .sh{position:relative;isolation:isolate;display:grid;grid-template-columns:auto 1fr;gap:.15rem .65rem;align-items:center;background:var(--bg-alt);border:1px solid var(--border-strong);border-radius:12px;padding:.65rem .8rem .7rem;margin-top:-.5rem;box-shadow:0 8px 18px -12px rgb(0 0 0/.7);transition:box-shadow .3s,border-color .3s}
body.home .sh:first-child{margin-top:0}
body.home .sh p{grid-column:1/-1;font-size:.9375rem;line-height:1.4}
body.home .sb{display:flex;align-items:baseline;gap:.5rem;min-width:0}
body.home .sb em{font-style:normal;font-size:.8125rem;color:var(--text-muted)}
body.home .sh .av{font-size:.9rem;width:1.9rem;height:1.9rem}
body.home .r1{transform:rotate(-.6deg)}
body.home .r2{transform:rotate(.5deg) translateX(.25rem)}
body.home .r3{transform:rotate(-.4deg)}
body.home .r4{transform:rotate(.6deg) translateX(-.2rem)}
body.home .r5{transform:rotate(-.3deg)}
body.home .more{justify-self:start;font-size:.875rem;font-weight:700;color:var(--text-muted);padding:.3rem .8rem;border:1px dashed var(--border-strong);border-radius:99px}
body.home mark.hl{background:linear-gradient(var(--hl),var(--hl)) no-repeat left center/100% 100%;color:inherit;font-weight:700;border-radius:.2em;padding:0 .12em;-webkit-box-decoration-break:clone;box-decoration-break:clone;transition:background-size .6s var(--ease)}
html.live body.home mark.hl:not(.v){background-size:0 100%}
body.home .sum{font-size:clamp(1.15rem,2.2vw,1.4rem);font-weight:700;letter-spacing:-.02em;line-height:1.3}
body.home .duo2{display:grid;gap:.9rem}
body.home .bl{font-size:.8125rem;color:var(--ai);display:block;margin-bottom:.35rem}
body.home .blk ul{display:grid;gap:.4rem}
body.home .tg{position:relative;padding:.45rem .7rem;border:1px solid var(--border);border-radius:10px;background:var(--bg-alt);font-size:.9375rem;cursor:default;transition:border-color .25s,background-color .25s}
body.home .tg:hover, body.home .tg:focus-visible{border-color:var(--ai)}
body.home .acts2 .tg{padding-left:2.1rem}
body.home .acts2 .tg .bx{position:absolute;left:.65rem;top:50%;width:.9rem;height:.9rem;margin-top:-.45rem;border:2px solid var(--ai);border-radius:.25rem}
html.live body.home .acts2 .tg.v .bx{animation:tickbox .9s var(--ease) .1s}
body.home .bubble{position:relative;margin-bottom:.4rem;background:var(--ai-soft);border-radius:16px 16px 16px 4px;padding:.7rem .9rem}
body.home .bubble .tg{background:none;border-color:transparent;padding:.2rem 0;font-weight:700;font-size:1rem}
body.home .bubble .tg:hover{border-color:transparent}
body.home .tn{display:grid;gap:.3rem;margin-top:auto}
body.home .sb b{font-size:.9375rem}
body.home .bubble .tail{position:absolute;left:1rem;bottom:-.4rem;width:.9rem;height:.9rem;background:var(--ai-soft);transform:rotate(45deg);border-radius:0 0 .2rem 0}
body.home .scale{position:relative;height:1.1rem;margin-block:.2rem;overflow-x:clip}
body.home .trk3{position:absolute;left:0;right:0;top:.4rem;height:.35rem;border-radius:99px;background:linear-gradient(90deg,rgb(248 113 113),rgb(251 191 36) 50%,rgb(45 212 191))}
body.home .mkw{position:absolute;inset:0;transform:translateX(82%);transition:transform 1.1s var(--ease)}
html.live body.home .mkw:not(.v){transform:translateX(50%)}
body.home .mk{position:absolute;left:0;top:0;width:1.1rem;height:1.1rem;margin-left:-.55rem;border-radius:50%;background:var(--text);border:3px solid var(--bg-alt);box-shadow:0 2px 8px rgb(0 0 0/.5)}
body.home .tl3{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.2rem .5rem;font-size:.8125rem;color:var(--text-muted)}
body.home .tl3 span:first-child{justify-self:start}
body.home .tl3 span:last-child{justify-self:end}
body.home .tl3 strong{color:var(--text);font-size:.9375rem}
body.home .tl3 strong{grid-column:2;grid-row:1}
body.home .chat .qb{font-size:.9375rem}
body.home .chat .ans{font-size:.9375rem}
body.home .flyc{position:absolute;z-index:6;pointer-events:none;white-space:nowrap;font-weight:700;background:linear-gradient(var(--hl),var(--hl));border-radius:.25em;padding:0 .2em;color:var(--text)}
@keyframes tickbox{0%{background:var(--ai)}
60%{background:var(--ai)}
100%{background:transparent}}
@media (min-width:40rem){body.home .duo2{grid-template-columns:1fr 1fr}}
@media (min-width:56rem){body.home .th3{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:stretch}
body.home .chat{grid-column:1/-1}}
body.home .board .panel{overflow:clip}
body.home .sec-in{grid-template-columns:minmax(0,1fr)}
body.home .stp button{display:grid;justify-items:center;align-content:center;gap:.15rem;min-height:3.3rem;font-size:.75rem;padding:0 .2rem}
body.home .stp i{font-style:normal;display:grid;place-items:center;width:1.3rem;height:1.3rem;border:1.5px solid currentColor;border-radius:50%;font-size:.75rem}
body.home .pco .scenes>.vr{display:grid;gap:.7rem;align-content:start}
body.home .snl{display:none;font-weight:700;color:var(--ai);font-size:.875rem}
html:not(.live) body.home .snl{display:block}
html:not(.live) body.home .co .modes{display:none}
html:not(.live) body.home .co .scenes{gap:1.4rem}
html:not(.live) body.home .co .scenes>.vr{grid-area:auto;opacity:1;visibility:visible}
body.home .pillc{justify-self:start;padding:.5rem .9rem;border:1.5px solid var(--ai);border-radius:99px;color:var(--ai);background:var(--ai-soft);font-weight:700;font-size:.9375rem}
body.home .sht{font-weight:700;font-size:1.0625rem}
body.home .f2{display:grid;gap:.3rem}
body.home .inp{border:1px solid var(--border-strong);border-radius:10px;background:var(--bg-alt);padding:.55rem .75rem;min-height:2.6rem}
body.home .chs{display:flex;flex-wrap:wrap;gap:.4rem}
body.home .chip2{font-size:.875rem;padding:.25rem .7rem;border:1px solid var(--border-strong);border-radius:99px;background:var(--bg-alt)}
body.home .sel2{border-color:var(--ai);color:var(--ai);font-weight:700}
body.home .qv{min-height:2.7rem}
body.home .qv .vr{font-size:.875rem;color:var(--text-muted)}
body.home .ctile{display:grid;gap:.1rem;background:var(--ai-soft);border:1px solid var(--ai);border-radius:14px;padding:.8rem 1rem}
body.home .stamp{flex:none;white-space:nowrap;font-size:.75rem;font-weight:700;color:var(--ai);border:1px solid var(--ai);border-radius:99px;padding:0 .5rem}
body.home .prog{display:grid;gap:.3rem;background:var(--bg-alt);border:1px solid var(--border);border-radius:14px;padding:.8rem 1rem}
body.home .pt{font-size:.875rem;color:var(--text-muted)}
body.home .pbar{height:.5rem;background:var(--surface-2);border-radius:99px;overflow:hidden}
body.home .fill{display:block;height:100%;background:var(--ai);border-radius:99px;transform-origin:left}
html.live body.home .fill:not(.v){transform:scaleX(.02)}
html.live body.home .fill.v{animation:fillup 5.7s linear forwards}
@keyframes fillup{from{transform:scaleX(.02)}}
body.home .pause{justify-self:start;font-size:.875rem;font-weight:700;border:1px solid var(--border-strong);border-radius:99px;padding:.25rem .9rem}
body.home .done{display:grid;grid-template-columns:auto 1fr;gap:.5rem .7rem;align-items:center;background:var(--ai-soft);border:1px solid var(--ai);border-radius:14px;padding:.8rem 1rem}
body.home .ok{color:var(--ai);display:grid}
body.home .done .gen{grid-column:1/-1;justify-self:start}
body.home .th2{display:flex;justify-content:space-between;align-items:center;gap:.5rem}
body.home .th2 .bl{margin:0}
body.home .mixp{font-size:.75rem;border:1px solid var(--border-strong);border-radius:99px;padding:0 .6rem;color:var(--text-muted)}
body.home .pw .scenes>.vr[data-v="polish"]{grid-template-rows:auto 1fr auto;align-content:stretch}
body.home .pt, body.home .meter{transform-origin:left}

/* chrome of the homepage on the shared components */
body.home{overflow-x:clip}
body.home ul,body.home ol{padding:0;list-style:none}
body.home li + li{margin-top:0}
body.home .site-nav__inner{gap:.5rem 1rem}
body.home .brand img{height:2.75rem}
body.home .foot-in{display:grid;gap:1rem;justify-items:start}
body.home .site-footer{margin-top:0;padding-block:3rem 4rem}
body.home .site-footer .brand img{height:2.25rem}
body.home .cta a{display:inline-block;line-height:0;border-radius:var(--radius-md)}
body.home .badge-play{width:11.5rem;height:auto}
body.home .seg button{white-space:normal;line-height:1.2;padding-block:.3rem}
body.home .stp button{white-space:normal}
html.i18n-pending body.home [data-i18n]:not([data-i18n-attr]){visibility:hidden}
@media (max-width:35rem){body.home .nav-feat{display:none}body.home .brand img{height:2.25rem}body.home .site-nav__inner{gap:.25rem .4rem}body.home .nav-links a{padding:0 .5rem}body.home .lang-switch button{min-width:2rem}}
@media (min-width:56rem){body.home .site-nav__inner{flex-wrap:nowrap}}
@media (max-width:26rem){body.home .site-nav__inner>.btn{display:none}body.home .col .av{display:none}}
body.home .site-nav__inner>.btn{min-width:6.5rem}
html:not(.js) body.home .seg, html:not([data-lang]) body.home .lang-switch{display:none}
html.i18n-pending body.home .hero, html.i18n-pending body.home .badge-play{visibility:hidden}
@media (hover:none){body.home .ph-layers i:not(:nth-child(3)):not(:nth-child(6)):not(:nth-child(10)){display:none}}
body.home .txt-a p, body.home .txt-b p, body.home .pv-card p{text-wrap:pretty}
}
