/* Tokens mirror frontend/src/app/tokens.css: neutral surfaces, violet accent. */
:root {
  --bg: #fafafa;
  --bg-alt: #f2f2f3;
  --card: #ffffff;
  --fg: #0a0a0a;
  --muted: #5f5f5f;
  --border: #e5e5e5;
  --accent: #6d28d9;
  --accent-soft: #ede9fe;
  --btn-bg: #0a0a0a;
  --btn-fg: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -12px rgb(0 0 0 / 0.12);
  --radius: 12px;
  --inset: none;
  --btn-glow: none;
  --glow: rgb(124 58 237 / 0.06);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-alt: #111113;
    --card: #141414;
    --fg: #ededed;
    --muted: #a1a1a1;
    --border: #262626;
    --accent: #a78bfa;
    --accent-soft: #2e1065;
    --btn-bg: #7c3aed;
    --btn-fg: #ffffff;
    --ok: #4ade80;
    --warn: #fbbf24;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 32px -16px rgb(0 0 0 / 0.8);
    --glow: rgb(124 58 237 / 0.16);
    --inset: inset 0 1px 0 rgb(255 255 255 / 0.06);
    --btn-glow: 0 8px 28px -8px rgb(124 58 237 / 0.7);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* app.js swaps in the chosen language; hiding until then avoids a layout shift.
   If the script never runs, the animation reveals the Russian text baked into the HTML. */
.pending body { visibility: hidden; animation: reveal 0s 1.5s forwards; }
@keyframes reveal { to { visibility: visible; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
p, li, dd, figcaption { text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.875em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }

.skip { position: absolute; left: 12px; top: -48px; padding: 8px 12px; background: var(--card); z-index: 10; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.top__row { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--fg); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand b { color: var(--accent); font-weight: 600; }
.top__nav { display: none; gap: 24px; margin-left: auto; }
.top__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.top__nav a:hover { color: var(--fg); }
.lang { display: inline-flex; margin-left: auto; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.lang button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.8125rem var(--sans);
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms cubic-bezier(0.23, 1, 0.32, 1), background-color 150ms;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--accent)); box-shadow: var(--btn-glow); }
.btn--ghost { border: 1px solid var(--border); color: var(--fg); background: var(--card); }
.btn--ghost:hover { border-color: var(--accent); }
.btn__icon { flex: none; }

/* Hero */
.hero { position: relative; isolation: isolate; display: grid; gap: 32px; padding-block: 28px 24px; }
/* Platform dot grid (frontend globals.css .dot-grid-bg) fading to the edges, with a violet glow behind the agent window. */
.hero::before,
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero::before {
  background: radial-gradient(circle, var(--border) 1px, transparent 1px) 0 0 / 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero::after { background: radial-gradient(ellipse 60% 45% at 50% 80%, var(--glow), transparent 70%); }
.eyebrow { color: var(--accent); font: 600 0.8125rem/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.eyebrow--name { letter-spacing: 0; text-transform: none; }
.hero h1 { margin-top: 12px; font-size: clamp(1.875rem, 7.6vw, 3.5rem); letter-spacing: -0.03em; }
.lead { margin-top: 14px; max-width: 36rem; color: var(--muted); font-size: 1.125rem; }
.cta { display: grid; gap: 10px; margin-top: 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 0.875rem; }
.facts li { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px 0 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.facts li::before { content: ""; width: 16px; height: 16px; background: var(--accent); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.facts li:nth-child(1) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.facts li:nth-child(2) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .5-8A6 6 0 0 0 6 9.6 4.3 4.3 0 0 0 7 18z'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E"); }
.facts li:nth-child(3) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.facts li:nth-child(4) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }

/* The agent window keeps the platform's dark code surface in both themes. */
.run {
  --bg-alt: #141414;
  --border: #262626;
  --muted: #a1a1a1;
  --accent: #a78bfa;
  --ok: #4ade80;
  margin: 0;
  align-self: center;
  background: #030303;
  color: #ededed;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 24px 48px -24px rgb(0 0 0 / 0.45);
  overflow: hidden;
}
.run__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.run__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.run__bar code { margin-left: 8px; color: var(--muted); }
.run__steps { margin: 0; padding: 8px 0; list-style: none; }
.run__step { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 11px 16px; font-size: 0.9375rem; }
.run__tag {
  justify-self: start;
  align-self: start;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--muted);
  font: 600 0.8125rem/1.6 var(--sans);
}
.run__step--hitl { padding-right: 36px; background: rgb(124 58 237 / 0.18); }
.run__step--hitl .run__tag { background: #7c3aed; color: #fff; }
.run__step--hitl::after { content: ""; position: absolute; top: 50%; right: 16px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--accent); }
.run__step--audit span { color: var(--ok); }
.run figcaption { padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8125rem; }

/* Systems strip right under the first screen: monochrome icons, one line on a desktop, wraps on a phone. */
.systems { display: grid; gap: 12px; padding-block: 8px 24px; }
.systems__title { color: var(--muted); font: 600 0.8125rem/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.systems__list { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9375rem; }
.systems__list li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.systems__list svg { flex: none; }
.systems__note { max-width: 44rem; color: var(--muted); font-size: 0.9375rem; }

/* Sections */
section[id] { scroll-margin-top: 64px; }
.section { padding-block: 32px; }
.clips { display: grid; gap: 20px; }
@media (min-width: 1024px) {
  .clips { grid-template-columns: repeat(2, 1fr); }
}
/* Clips sit in a platform window. */
.clip { --border: #262626; --muted: #a1a1a1; position: relative; margin: 0; background: #030303; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--inset), var(--shadow); overflow: hidden; }
.clip::before {
  content: "";
  display: block;
  height: 32px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle, var(--border) 4.5px, transparent 5px) 16px 50% / 15px 10px repeat-x;
  background-size: 15px 10px;
  /* three dots from 16px, plus the full-width bottom border */
  -webkit-mask: linear-gradient(90deg, transparent 16px, #000 16px 61px, transparent 61px), linear-gradient(#000 0 0) bottom / 100% 1px no-repeat;
  mask: linear-gradient(90deg, transparent 16px, #000 16px 61px, transparent 61px), linear-gradient(#000 0 0) bottom / 100% 1px no-repeat;
}
.clip__frame { position: relative; }
.clip video { display: block; cursor: pointer; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 10; background: #141414; }
/* Play badge centred on the video; hidden while playing or when native controls are shown, never catches clicks. */
.clip__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 56px;
  height: 56px;
  margin: auto;
  border-radius: 50%;
  background: rgb(10 10 10 / 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23fff'/%3E%3C/svg%3E") 55% 50% / 24px no-repeat;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18);
  pointer-events: none;
}
.clip.playing .clip__frame::after,
.clip__frame:has(video[controls])::after { display: none; }
.clip__expand {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 0.8125rem var(--sans);
  cursor: pointer;
}
.clip__expand::after { content: ""; position: absolute; inset: 0 0 -12px; }
.clip__expand:hover { color: #ededed; }
.pending .clip__expand { display: none; }
/* A phone already shows the clip at nearly full screen width; the large view gains nothing there. */
@media (max-width: 480px) {
  .clip__expand { display: none; }
}
/* The clips have no sound track, so the native player shows no volume control. */
.clip video::-webkit-media-controls-mute-button,
.clip video::-webkit-media-controls-volume-slider,
.viewer__video::-webkit-media-controls-mute-button,
.viewer__video::-webkit-media-controls-volume-slider { display: none; }

/* Large view keeps the clip's dark window; on a phone it takes the whole screen. */
.viewer {
  width: min(calc(100vw - 32px), calc((100dvh - 110px) * 1.6));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #262626;
  border-radius: var(--radius);
  background: #030303;
  color: #ededed;
}
.viewer::backdrop { background: rgb(0 0 0 / 0.82); }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 16px; border-bottom: 1px solid #262626; }
.viewer__cap { color: #a1a1a1; font-size: 0.875rem; }
.viewer__close { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: #ededed; cursor: pointer; }
.viewer__close:hover { background: #141414; }
.viewer__video { display: block; width: 100%; height: auto; max-height: calc(100dvh - 86px); background: #000; }
@media (max-width: 640px) {
  .viewer { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .viewer[open] { display: flex; flex-direction: column; }
  .viewer__video { flex: 1; min-height: 0; max-height: none; }
}
.clip figcaption { padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.875rem; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__head { max-width: 46rem; margin-bottom: 24px; }
.section__head h2 { margin-top: 12px; font-size: clamp(1.75rem, 5.4vw, 2.75rem); letter-spacing: -0.03em; }
.section__lead { margin-top: 14px; color: var(--muted); font-size: 1.0625rem; }

.grid { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--card); box-shadow: var(--inset); }
.card:nth-child(1),
.card:nth-child(5) { background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 60%) var(--card); }
.card h3 { font-size: 1.0625rem; }
.card p { color: var(--muted); font-size: 0.9375rem; }
.card .card__check { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--fg); font: 500 0.875rem/1.5 var(--sans); }
.card .card__check::before { content: "› "; color: var(--accent); }

.cases { display: grid; gap: 12px; }
.case { padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.case__head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.case__head h3 { font-size: 1.375rem; }
.tag { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 0.8125rem/1.5 var(--sans); }
.tag--deploy { background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); }
.case:has(.tag--deploy) {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: radial-gradient(ellipse 70% 90% at 100% 0%, var(--glow), transparent 70%) var(--card);
}
/* One point per line; past the first three, the rest wait for the button (hidden when app.js never ran). */
.items { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 0.9375rem; line-height: 1.45; }
.items li { position: relative; padding-left: 16px; }
.items li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
:root:not(.pending) .card:has(> .items__more[aria-expanded="false"]) .items > li:nth-child(n + 4) { display: none; }
.items__more { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); font: 600 0.9375rem var(--sans); cursor: pointer; }
.items__more[aria-expanded="false"] .items__close,
.items__more[aria-expanded="true"] .items__open,
.pending .items__more { display: none; }

.scen-head { max-width: 46rem; margin-top: 32px; }
.scen__title { font-size: 1.375rem; letter-spacing: -0.02em; }
.scen { display: grid; gap: 8px; align-items: start; margin-top: 20px; }
.scen__dept { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.scen__dept summary, .scen__dept h4 { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 48px; padding: 10px 16px; font-weight: 600; }
.scen__dept summary { cursor: pointer; list-style: none; }
.scen__dept h4 { margin: 0; font-size: inherit; line-height: inherit; }
.scen__dept ul { display: grid; gap: 8px; margin: 0; padding: 0 16px 16px; list-style: none; }
.scen__dept li { display: flex; gap: 8px; align-items: baseline; font-size: 0.9375rem; }
.mark { flex: none; width: 5.6rem; font: 600 0.8125rem/1.5 var(--sans); }
.mark::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 0.1em; }
.mark--live { color: var(--ok); }
.mark--demo { color: var(--accent); }
.mark--maybe { color: var(--muted); }

.case__steps { display: grid; gap: 12px; margin: 0; counter-reset: step; }
.case__steps div { display: grid; align-content: start; gap: 2px; padding-left: 36px; position: relative; counter-increment: step; }
.case__steps div::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  font: 600 0.75rem/22px var(--mono);
  text-align: center;
}
/* Numbers form a timeline: a 1px line joins each step to the next. */
.case__steps div:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: -10px; width: 1px; background: var(--border); }
.case__steps dt { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.case__steps dd { margin: 0; font-size: 0.9375rem; }
.case__steps div:nth-child(4) dd { font-weight: 600; }
.case__steps div:nth-child(5) dd { color: var(--muted); }

/* Why an own perimeter: three plain cards and the source line. */
.why .case h3 { margin-bottom: 10px; font-size: 1.25rem; }
.why .case p { color: var(--muted); }
.why__src { margin-top: 8px; font-size: 0.875rem; }
.why__src a { display: inline-flex; align-items: center; min-height: 44px; }

/* Payback: a row per metric, a column per example; on a phone every metric becomes a card. */
.roi { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.roi th, .roi td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9375rem; }
.roi thead th { color: var(--muted); font: 600 0.8125rem/1.4 var(--sans); }
.roi tbody th { font-weight: 500; }
.roi td { font-variant-numeric: tabular-nums; }
.roi tbody tr:last-child > * { border-bottom: 0; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.roi__note { max-width: 46rem; margin-top: 14px; color: var(--muted); font-size: 0.9375rem; }
.roi ~ .btn { margin-top: 18px; }
@media (max-width: 600px) {
  .roi, .roi tbody { display: block; }
  .roi { background: none; border: 0; box-shadow: none; overflow: visible; }
  .roi thead { display: none; }
  .roi tbody tr { display: grid; gap: 6px; margin-bottom: 10px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
  .roi th, .roi td { padding: 0; border: 0; font-size: 1rem; }
  .roi td { display: flex; justify-content: space-between; gap: 12px; }
  .roi td::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
  .roi tbody tr:last-child { background: var(--accent-soft); border-color: transparent; }
  .roi tbody tr:last-child > * { background: none; }
}

/* Tariffs: one card per plan, the price is the loudest line. */
.tariffs { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tariff { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.tariff__code { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 700 0.8125rem/1.5 var(--mono); }
.tariff h3 { margin-top: 6px; font-size: 1.125rem; }
.tariff p { color: var(--muted); font-size: 0.9375rem; }
.tariff .tariff__price { margin-top: 8px; color: var(--fg); font: 700 1.625rem/1.2 var(--sans); letter-spacing: -0.02em; }
.pricing__note { max-width: 46rem; margin-top: 14px; color: var(--muted); font-size: 0.9375rem; }
.risk { margin-top: 24px; }

.final h2 { max-width: 40rem; font-size: clamp(1.75rem, 5vw, 2.5rem); letter-spacing: -0.03em; }
.final .cta { margin-top: 18px; }

/* Try */
.try { display: grid; gap: 16px; }
.panel { display: flex; flex-direction: column; gap: 14px; padding: 24px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.panel h3 { font-size: 1.5rem; }
.panel p { color: var(--muted); }
.panel > .btn { margin-top: auto; }
.panel--demo { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.copy { min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--fg); font: 500 0.8125rem var(--sans); cursor: pointer; }
.copy:hover { border-color: var(--accent); }
.note { padding: 12px 14px; border-left: 3px solid var(--warn); border-radius: 6px; background: var(--bg-alt); font-size: 0.875rem; }
.steps { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; display: grid; gap: 12px; counter-increment: step; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 0.875rem/28px var(--sans);
  text-align: center;
}
.steps .steps__title { display: flex; align-items: center; min-height: 28px; padding-left: 40px; font-weight: 600; color: var(--fg); }
.steps--plain > li { gap: 2px; padding-left: 40px; }
.steps--plain .steps__title { padding-left: 0; }
.steps--plain .steps__title + p { text-wrap: balance; }
.steps .btn { justify-self: start; }
.prompts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.prompts li { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--bg-alt); }
.prompts q { flex: 1; min-width: 0; font-size: 0.9375rem; }
/* Narrow phones: the prompt keeps the full width, the copy button moves under it. */
@media (max-width: 480px) {
  .prompts li { flex-direction: column; align-items: stretch; }
  .copy { align-self: flex-end; }
}
.hint { font-size: 0.875rem; }

.faq { display: grid; gap: 8px; max-width: 46rem; }
.faq-contact { display: none; }
.faq-contact__mail { font-size: 0.875rem; }
.faq-contact__mail a { color: var(--accent); }
.faq__item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.faq__item summary { display: flex; justify-content: space-between; gap: 16px; min-height: 52px; align-items: center; padding: 12px 18px; font-weight: 600; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker,
.scen__dept summary::-webkit-details-marker { display: none; }
.faq__item summary::after,
.scen__dept summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; }
.faq__item[open] summary::after,
.scen__dept[open] summary::after { content: "−"; }
.faq__item p { padding: 0 18px 16px; color: var(--muted); }

.dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 6;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.dock .btn { width: 100%; }
.dock[hidden] { display: none; }

.foot { padding-block: 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.875rem; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 640px) {
  .cta { display: flex; flex-wrap: wrap; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tariffs { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: repeat(2, 1fr); }
}
/* Two columns: the odd last case takes the whole row instead of leaving half of it empty. */
@media (min-width: 640px) and (max-width: 959px) {
  .cases > .case:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 959px) {
  /* Scrolling to a clip or anchor stops above the fixed bottom bar, not under it. */
  html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); line-height: 1.5; }
}
/* Phones: the step label runs in before its text, saving a line per step. */
@media (max-width: 639px) {
  .card > p, .items, .case__steps dd, .scen__dept li, .prompts q, .note, .hint, .faq__item p { font-size: 1rem; }
  .case__steps div { display: block; }
  .case__steps dt { display: inline; margin-right: 6px; }
  .case__steps dd { display: inline; }
}

/* Narrowest phones: the product name keeps one line beside the language switch. */
@media (max-width: 389px) {
  .top__row { gap: 10px; }
  .brand { gap: 8px; font-size: 0.9375rem; }
}

/* The four facts do not fit one row beside the agent window: two even rows instead of three and one. */
@media (min-width: 960px) and (max-width: 1279px) {
  .facts { display: grid; grid-template-columns: repeat(2, max-content); }
}

@media (min-width: 960px) {
  .wrap { padding-inline: 32px; }
  .top__nav { display: flex; }
  .lang { margin-left: 8px; }
  .dock { display: none; }
  .hero { grid-template-columns: 1.6fr 1fr; gap: 48px; padding-block: 88px 40px; }
  .hero h1 { font-size: clamp(2.25rem, 3.9vw, 3.5rem); }
  .hero::after { background: radial-gradient(ellipse 45% 70% at 78% 50%, var(--glow), transparent 70%); }

  .try { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .section { padding-block: 56px; }
  .section__head { margin-bottom: 36px; }
  .card { padding: 24px; }
  .case { padding: 24px; }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(3, 1fr); }
  .tariffs { grid-template-columns: repeat(3, 1fr); }
  .risk .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .risk .steps > li { align-content: start; }
  /* Departments differ in length: columns stack them without empty cells or a lone last card. */
  .scen { display: block; columns: 2; column-gap: 8px; }
  .scen__dept { break-inside: avoid; margin-bottom: 8px; }
  .panel { padding: 36px; }
}

@media (prefers-reduced-motion: no-preference) {
  .run__step { animation: rise 420ms cubic-bezier(0.23, 1, 0.32, 1) backwards; }
  .run__step:nth-child(2) { animation-delay: 80ms; }
  .run__step:nth-child(3) { animation-delay: 160ms; }
  .run__step:nth-child(4) { animation-delay: 240ms; }
  .run__step:nth-child(5) { animation-delay: 320ms; }
  .run__step--hitl::after { animation: pulse 1.8s ease-out infinite; }
}
/* Sections settle in as they scroll into view; without scroll-driven animations they are simply visible. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section__head,
    .clips,
    .grid,
    .cases,
    .scen,
    .try,
    .faq { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pulse { 70%, 100% { box-shadow: 0 0 0 7px rgb(167 139 250 / 0); } 0% { box-shadow: 0 0 0 0 rgb(167 139 250 / 0.6); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Eight cards: 4×2 on a desktop, 2×4 on a tablet, no card left alone in a row.
   Each card spans five shared rows (title, benefit, items, more, check), so a row of cards lines up. */
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .card > p:not(.card__check) { margin-top: 6px; }
  .card > .items { align-content: start; margin-top: 10px; }
  .card > .items__more { grid-row: 4; }
  .card > .card__check { grid-row: 5; margin-top: 10px; }
}

/* Without the bottom bar (from 960) a contact card follows the questions: a row under them, beside them from 1280. */
@media (min-width: 960px) {
  .faq-layout { display: grid; gap: 24px; }
  .faq-layout .faq { max-width: none; }
  .faq-contact { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 24px; padding: 24px 28px; background: var(--card); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: var(--radius); box-shadow: var(--shadow); }
  .faq-contact h3 { font-size: 1.375rem; }
  .faq-contact p { grid-column: 1; color: var(--muted); }
  .faq-contact .btn { grid-column: 2; grid-row: 1 / span 2; }
}
@media (min-width: 1280px) {
  .scen { columns: 3; }
  .faq-layout { grid-template-columns: minmax(0, 46rem) minmax(0, 1fr); gap: 32px; align-items: start; }
  .faq-contact { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; padding: 28px; }
  .faq-contact .btn { align-self: flex-start; margin-top: 8px; }
}

/* Print: everything visible and static, no screen-only controls; collapsed card items are printed too. */
@media print {
  *, *::before, *::after { animation: none !important; }
  .top { position: static; box-shadow: none; }
  #clips, .lang, .dock, .skip, .copy, .items__more { display: none !important; }
  .card .items > li { display: block !important; }
  .case, .panel, .faq__item, .scen__dept { break-inside: avoid; }
  .eyebrow, h2, h3 { break-after: avoid; }
}

/* Delivery check page */
.verify { max-width: 46rem; margin-inline: auto; display: grid; gap: 28px; }
.verify .section__head { margin-bottom: 0; }
.verify__title { margin-top: 12px; font-size: clamp(1.75rem, 5.4vw, 2.75rem); letter-spacing: -0.03em; }
.verify__lead { color: var(--muted); }
.verify__block { display: grid; gap: 12px; }
.verify__block h2 { font-size: 1.375rem; }
.verify__hint { color: var(--muted); font-size: 0.9375rem; }
.verify__links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.verify__links a { display: inline-flex; align-items: center; min-height: 44px; }
.fp { display: grid; gap: 12px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.fp__value { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.fp .copy { justify-self: start; }
.verify__cmd { margin: 0; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.875rem; }
.verify code { white-space: nowrap; }
.verify .fp__value, .verify__cmd code { white-space: inherit; }
