/* Public site (home, features, use cases, pricing, about, FAQ, contact, legal, errors). Loads after app.css and
   re-points its tokens, so shared pieces (menus, inputs, toasts) turn dark too. The public site is dark only.
   Direction "dark canvas": a near-black page framed by hairline column rails, a grainy teal glow behind the hero and
   the closing call to action, Geist headlines with one accent phrase in Instrument Serif italic (Vazirmatn bold in
   teal for right-to-left scripts), mono labels and pill eyebrows.
   Motion: .rv fades up once in view, the hero headline blurs in word by word, the app window flags and replaces a
   risky phrase, the statement lights up as it scrolls. All of it is off with reduced motion, and every section is
   complete without JS. Logical properties keep RTL correct. */

.site {
  --ink: #050708; --panel: #0b0f11; --panel-2: #10161a;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --fg: #f2f5f6; --fg-2: #b7c2c6; --muted-c: #8b979c; --dim: #4a555a;
  --teal: #026f7d; --teal-hi: #2ad4e2; --teal-soft: rgba(42, 212, 226, .12); --teal-line: rgba(42, 212, 226, .22);
  --red: #ff6b6b; --green: #5be3a0;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --w: 1200px; --nav-h: 64px; --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

  /* app.css tokens, re-pointed to the dark canvas. */
  --bg: var(--ink); --surface: var(--panel); --surface-2: var(--panel-2);
  --text: var(--fg); --text-2: var(--muted-c); --text-3: var(--dim);
  --border: var(--line-2); --border-strong: rgba(255, 255, 255, .22);
  --primary: var(--teal-hi); --primary-hover: #6fe4ee; --primary-soft: var(--teal-soft); --primary-text: var(--ink);
  --ok: var(--green); --ok-soft: rgba(91, 227, 160, .1); --danger: #ff8a7a; --danger-soft: rgba(255, 107, 107, .1);
  --warn: #f2b45a; --warn-soft: rgba(242, 180, 90, .1); --warn-line: #c78a2a;
  --shadow-1: none; --shadow-2: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --focus: 0 0 0 2px var(--ink), 0 0 0 4px var(--teal-hi);
  --font: var(--sans); --font-display: var(--sans); --font-mono: var(--mono);
  --fg-rgb: 255, 255, 255; --ink-rgb: 5, 7, 8; --hi-rgb: 42, 212, 226;
  --btn-hover: #fff; --win-bg: rgba(9, 13, 15, .86); --dot: #20292d; --unlit: #2b3438; --flag-text: #ffb0b0; --gold-c: #f0b768;
  --fig-line: rgba(255, 255, 255, .26); --fig-side: #080b0c; --cell-hover: #070b0c; --bar: #1d272b; --pix: #141b1e;

  color-scheme: dark; background: var(--ink); color: var(--fg); font-family: var(--sans); overflow-x: clip;
}
html:has(> body.site) { background: #050708; color-scheme: dark; scroll-behavior: smooth; }
html[data-theme=light]:has(> body.site) { background: #f6f8f7; color-scheme: light; }
@media (prefers-color-scheme: light) { html:not([data-theme=dark]):has(> body.site) { background: #f6f8f7; color-scheme: light; } }
html[dir=rtl] body.site { --sans: "Vazirmatn", Tahoma, sans-serif; --mono: "Vazirmatn", Tahoma, sans-serif; --serif: "Vazirmatn", Tahoma, sans-serif; }
@media (min-width: 760px) { .site { --gutter: 32px; } }
@media (prefers-reduced-motion: reduce) { html:has(> body.site) { scroll-behavior: auto; } }

.site main { display: block; }
.site a { color: inherit; }
.site ::selection { background: rgba(var(--hi-rgb), .3); color: var(--fg); }
.wrap { width: min(var(--w), 100% - var(--gutter) * 2); margin-inline: auto; position: relative; }
.wrap.narrow { width: min(860px, 100% - var(--gutter) * 2); }
.center { text-align: center; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--fg); color: var(--ink) !important; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* Hairline column rails down both sides of the content column, and full-width section dividers. */
.rails { position: relative; }
.rails::before, .rails::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); pointer-events: none; z-index: 1; }
.rails::before { inset-inline-start: max(var(--gutter), calc(50% - var(--w) / 2)); }
.rails::after { inset-inline-end: max(var(--gutter), calc(50% - var(--w) / 2)); }
.hr { height: 1px; background: var(--line); }

/* ---------- Type ---------- */
.site h1, .site h2, .site h3 { font-family: var(--sans); font-weight: 500; letter-spacing: -.035em; margin: 0; text-wrap: balance; color: var(--fg); }
.site p { text-wrap: pretty; }
.ser { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--teal-hi); }
.lab, .footer-h, .toc-h { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-c); }
.lab.teal { color: var(--teal-hi); }
.dim { color: var(--dim); }
.muted, .site .muted, .muted-d { color: var(--muted-c); }
.fine { font-size: 13px; line-height: 1.6; color: var(--dim); max-width: 64ch; }
.fine.center { margin-inline: auto; }
.hero-lead { color: var(--fg-2); font-size: 18px; line-height: 1.6; margin: 0; max-width: 60ch; }
.h2-d { font-size: clamp(34px, 5vw, 56px); line-height: 1.04; margin-top: 18px !important; }
.site .tiny { font-size: 13px; }

/* Pill eyebrow with a pulsing dot. */
.s-pill { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal-hi); background: var(--teal-soft); border: 1px solid var(--teal-line); padding: 7px 12px; border-radius: 999px; }
.s-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-hi); box-shadow: 0 0 10px var(--teal-hi); animation: s-pulse 1.8s ease-in-out infinite; flex: none; }
@keyframes s-pulse { 50% { opacity: .35; } }

/* ---------- Buttons: white pill primary, hairline secondary ---------- */
.site .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; min-height: 0; padding: 12px 20px; font: 500 15px/1.2 var(--sans); letter-spacing: -.005em; text-decoration: none; background: var(--fg); color: var(--ink); border: 1px solid var(--fg); transition: transform .2s, background .2s, box-shadow .2s, border-color .2s; }
.site .btn:hover { background: var(--btn-hover); transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(var(--hi-rgb), .6); }
.site .btn.secondary { background: transparent; color: var(--fg); border-color: var(--line-2); }
.site .btn.secondary:hover { background: rgba(var(--fg-rgb), .05); box-shadow: none; }
.site .btn.lg { padding: 14px 24px; font-size: 15.5px; border-radius: 999px; min-height: 0; }
.site .btn.small { padding: 9px 16px; font-size: 14px; border-radius: 999px; min-height: 0; }
.site .btn.block { width: 100%; }
.site .btn:focus-visible { box-shadow: var(--focus); }
.arr { display: inline-block; transition: transform .2s; }
.btn:hover .arr, .more:hover .arr, .case:hover .arr { transform: translateX(3px); }
[dir=rtl] .arr { transform: scaleX(-1); }
[dir=rtl] .btn:hover .arr, [dir=rtl] .more:hover .arr, [dir=rtl] .case:hover .arr { transform: scaleX(-1) translateX(3px); }
.more { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.4 var(--mono); color: var(--teal-hi) !important; text-decoration: none; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Brand mark ---------- */
.site .logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.site .logo-mark { width: 30px; height: 30px; }
.wordmark { font-weight: 600; letter-spacing: .14em; font-size: 14px; }

/* ---------- Navigation ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgba(var(--ink-rgb), .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transition: background .25s; }
.site-nav.scrolled { background: rgba(var(--ink-rgb), .82); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 8px; }
.nav-inner > .logo span { white-space: nowrap; }
.nav-inner .spacer { flex: 1; }
.nav-links, .site .nav-cta { display: none; }
.nav-toggle { display: grid; }
.burger { display: grid; gap: 5px; width: 20px; }
.burger span { display: block; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
[aria-expanded=true] .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
[aria-expanded=true] .burger span:nth-child(2) { opacity: 0; }
[aria-expanded=true] .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.site-nav .icon-btn { border-color: transparent; background: transparent; color: var(--muted-c); }
.site-nav .icon-btn:hover { color: var(--fg); background: rgba(var(--fg-rgb), .06); }
.site-nav .lang-btn { border: 1px solid var(--line-2); border-radius: 999px; width: auto; padding: 0 11px; gap: 6px; font-family: var(--mono); }
.site .menu-panel { background: var(--panel-2); border-color: var(--line-2); }
.site .menu-panel a, .site .menu-panel button { color: var(--fg); }
.site .menu-panel a:hover, .site .menu-panel button:hover { background: rgba(var(--fg-rgb), .06); }
@media (max-width: 1179px) {
  .site-nav .controls a.icon-btn { display: none; } /* log in lives in the menu sheet */
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; inset-inline: 0; top: var(--nav-h); height: calc(100dvh - var(--nav-h));
    padding: 8px var(--gutter) 28px; background: var(--ink); overflow-y: auto; animation: sheet-in .35s var(--ease);
  }
  .nav-links.open > a { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; font-size: 26px; font-weight: 500; letter-spacing: -.03em; line-height: 1.2; }
  .nav-links.open > a[aria-current=page] { color: var(--teal-hi); }
  .nav-cta-mobile { display: grid; gap: 10px; margin-top: auto; padding-top: 28px; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(-10px); } }
@media (min-width: 1180px) {
  .nav-links { display: flex; align-items: center; gap: 2px; margin-inline-start: 28px; }
  .nav-links > a { padding: 8px 10px; color: var(--muted-c); text-decoration: none; font-size: 14px; white-space: nowrap; transition: color .2s; }
  .nav-links > a:hover, .nav-links > a[aria-current=page] { color: var(--fg); }
  .nav-cta-mobile, .nav-toggle { display: none; }
  .site .nav-cta { display: inline-flex; margin-inline-start: 6px; }
}

/* ---------- Teal glow, grain and cell grid (hero, page heads, closing CTA, 404) ---------- */
.s-hero, .page-hero, .s-cta, .error-page { position: relative; overflow: hidden; isolation: isolate; background: var(--ink); }
.s-glow { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(50% 45% at 50% 108%, rgba(var(--hi-rgb), .75), transparent 70%),
    radial-gradient(38% 40% at 18% 90%, rgba(2, 111, 125, .9), transparent 70%),
    radial-gradient(38% 40% at 85% 85%, rgba(2, 111, 125, .8), transparent 70%),
    radial-gradient(60% 50% at 50% 0%, rgba(2, 111, 125, .25), transparent 70%);
  animation: s-breathe 9s ease-in-out infinite alternate; }
@keyframes s-breathe { to { transform: scale(1.06) translateY(-2%); filter: hue-rotate(-8deg); } }
.s-grain { position: absolute; inset: 0; z-index: -1; opacity: .2; mix-blend-mode: overlay; pointer-events: none; background-image: var(--grain); }
.s-cells { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 80px 80px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 80%); }

/* ---------- Home hero ---------- */
.s-hero { padding-top: 96px; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.hero-h { font-size: clamp(44px, 8vw, 104px); line-height: .98 !important; max-width: 13ch; }
.hero-copy .ctas { justify-content: center; }
.hero-copy .hero-lead.lead-1 { color: var(--fg); font-size: 20px; }
.hero-copy .hero-lead + .hero-lead { margin-top: -12px; }
.facts { display: flex; gap: 10px 28px; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; font: 500 13px var(--mono); color: var(--muted-c); }
.facts li::before { content: "✓ "; color: var(--teal-hi); }
/* Headline words blur in one after another (spans added by site.js). */
[data-words] .w { display: inline-block; opacity: 0; transform: translateY(24px); filter: blur(8px); animation: s-wordin .9s var(--ease) forwards; animation-delay: calc(var(--wi) * 80ms); }
@keyframes s-wordin { to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 600px) { .s-hero { padding-top: 64px; } .hero-lead { font-size: 16.5px; } }

/* App window demo. States come from site.js: risk (underlined), flag (card shown), safe (struck and replaced). */
.appwin { margin: 64px auto 0; max-width: 1040px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 18px 18px 0 0; background: var(--win-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 -30px 120px -40px rgba(var(--hi-rgb), .55); overflow: hidden; text-align: start; }
.appwin-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.appwin-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.appwin-top span { margin-inline-start: auto; font: 12px var(--mono); color: var(--dim); }
.appwin-body { display: grid; grid-template-columns: 200px minmax(0, 1fr) 260px; min-height: 320px; }
.appwin-side { border-inline-end: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted-c); }
.appwin-side .lab { margin-bottom: 6px; }
.appwin-side div { padding: 7px 10px; border-radius: 8px; }
.appwin-side .on { background: var(--teal-soft); color: var(--fg); }
.appwin-ed { padding: 18px 22px; min-width: 0; }
.appwin-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.appwin-tabs span { font: 12px var(--mono); padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted-c); }
.appwin-tabs .on { color: var(--fg); border-color: var(--line-2); background: rgba(var(--fg-rgb), .04); }
.appwin-tabs .end { margin-inline-start: auto; }
.cap { font-size: 17px; line-height: 1.75; margin: 0; min-height: 120px; color: var(--fg); }
.cap .bad { text-decoration: underline wavy var(--red); text-underline-offset: 5px; text-decoration-skip-ink: none; transition: color .4s; }
.cap .good { color: var(--teal-hi); font-family: var(--serif); font-style: italic; font-size: 1.12em; opacity: 0; transition: opacity .5s; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--teal-hi); vertical-align: -3px; margin-inline-start: 2px; animation: s-blink 1s steps(1) infinite; }
@keyframes s-blink { 50% { opacity: 0; } }
.appwin-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font: 12px var(--mono); color: var(--muted-c); }
.appwin-foot .ready { color: var(--green); opacity: .25; transition: opacity .5s; text-transform: uppercase; letter-spacing: .06em; }
.appwin-chk { border-inline-start: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.appwin-flag { border: 1px solid rgba(255, 107, 107, .3); background: rgba(255, 107, 107, .06); border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.5; color: var(--muted-c); opacity: .35; transform: translateY(6px); transition: opacity .5s, transform .5s; }
.appwin-flag b { display: block; color: var(--flag-text); font-weight: 500; margin-bottom: 2px; }
.meter { font: 12px var(--mono); color: var(--muted-c); display: grid; gap: 8px; margin: 0; }
.meter div { display: flex; justify-content: space-between; gap: 10px; }
.meter dt { font-weight: 400; }
.meter dd { margin: 0; color: var(--fg); }
[data-demo][data-state=flag] .appwin-flag, [data-demo][data-state=safe] .appwin-flag { opacity: 1; transform: none; }
[data-demo][data-state=safe] .bad { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
[data-demo][data-state=safe] .good { opacity: 1; }
[data-demo][data-state=safe] .ready { opacity: 1; }
@media (max-width: 900px) {
  .appwin-body { grid-template-columns: minmax(0, 1fr); }
  .appwin-side { display: none; }
  .appwin-chk { border-inline-start: 0; border-top: 1px solid var(--line); }
  .appwin { margin-top: 48px; }
  .appwin-ed { padding: 16px; }
  .cap { font-size: 16px; min-height: 0; }
}

/* ---------- Ticker ---------- */
.s-ticker { border-block: 1px solid var(--line); overflow: hidden; white-space: nowrap; background: var(--ink); position: relative; z-index: 2; }
.s-ticker-track { display: inline-flex; gap: 48px; padding: 18px 0; animation: s-tick 40s linear infinite; font: 500 14px var(--mono); color: var(--muted-c); text-transform: uppercase; letter-spacing: .06em; }
.s-ticker-track span::before { content: "/ "; color: var(--teal-hi); }
@keyframes s-tick { to { transform: translateX(-50%); } }
[dir=rtl] .s-ticker-track { animation-name: s-tick-rtl; }
@keyframes s-tick-rtl { to { transform: translateX(50%); } }

/* ---------- Sections ---------- */
.sec { padding-block: 72px; position: relative; }
.sec.alt { background: linear-gradient(180deg, rgba(var(--fg-rgb), .015), transparent); border-block: 1px solid var(--line); }
.sec.tight-top { padding-top: 8px; }
@media (min-width: 960px) { .sec { padding-block: 120px; } .sec.tight-top { padding-top: 24px; } }
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 60px; align-items: end; margin-bottom: 56px; }
.head h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; margin-top: 18px; }
.head > p { color: var(--muted-c); margin: 0; max-width: 52ch; justify-self: end; font-size: 16.5px; line-height: 1.65; }
.head .more { margin-inline-start: 6px; }
@media (max-width: 820px) { .head { grid-template-columns: 1fr; margin-bottom: 40px; } .head > p { justify-self: start; } }

/* Statement: words light up as the paragraph scrolls past (spans added by site.js). */
.statement { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.statement-lab { display: grid; gap: 8px; align-content: start; }
.statement p { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.22; letter-spacing: -.025em; margin: 0; font-weight: 500; color: var(--fg); }
.statement p span { color: var(--unlit); transition: color .25s; }
.statement p span.lit { color: var(--fg); }
@media (max-width: 820px) { .statement { grid-template-columns: 1fr; gap: 20px; } }

/* Figures: thin-line isometric drawings that come apart under the mouse (or once, when scrolled into view on touch). */
.figs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 96px; border-block: 1px solid var(--line); }
.fig { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 460px; padding: 28px 32px 32px; border-inline-end: 1px solid var(--line); }
.fig:first-child { padding-inline-start: 0; }
.fig:last-child { border-inline-end: 0; padding-inline-end: 0; }
.fig-n { position: absolute; top: 24px; inset-inline-start: 32px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); unicode-bidi: isolate; }
.fig:first-child .fig-n { inset-inline-start: 0; }
.fig-art { flex: 1; display: grid; place-items: center; min-height: 0; padding: 36px 0 20px; }
.fig-art svg { width: min(100%, 270px); height: auto; overflow: visible; }
.fig h3 { font-size: 18px; letter-spacing: -.01em; }
.fig p { margin: 10px 0 0; color: var(--muted-c); font-size: 15px; line-height: 1.6; max-width: 36ch; min-height: 4.8em; }
.fig svg path { stroke: var(--fig-line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: stroke .7s cubic-bezier(.32, .72, 0, 1); }
.fig svg .top { fill: var(--ink); }
.fig svg .side { fill: var(--fig-side); }
.fig svg .mark { stroke: rgba(var(--hi-rgb), .55); stroke-linecap: round; }
.fig svg .dot { fill: rgba(var(--hi-rgb), .6); }
.f-sheet, .f-cube, .f-plate { transition: transform .7s cubic-bezier(.32, .72, 0, 1); }
.f-sheet { transition-delay: calc((4 - var(--i)) * 35ms); }
.fig:hover .f-sheet, .fig.play .f-sheet { transform: translateY(calc(var(--i) * -11px)); transition-delay: calc(var(--i) * 45ms); }
.fig:hover .f-cube, .fig.play .f-cube { transform: translateY(-5px); transition-delay: calc(var(--i) * 40ms); }
.fig .f-cube:hover, .fig.play .f-cube:nth-child(2) { transform: translateY(-22px); transition-delay: 0s; }
.f-plate { transition-delay: calc((8 - var(--i)) * 30ms); }
.fig:hover .f-plate, .fig.play .f-plate { transform: translateY(calc(-4px - var(--i) * 2.5px)); transition-delay: calc(var(--i) * 45ms); }
.fig .f-plate.near { transform: translateY(var(--lift)); transition-duration: .35s; transition-delay: 0s; }
.fig:hover svg path:not(.mark), .fig.play svg path:not(.mark) { stroke: rgba(var(--hi-rgb), .5); }
@media (max-width: 900px) {
  .figs { grid-template-columns: 1fr; margin-top: 64px; }
  .fig, .fig:first-child, .fig:last-child { min-height: 0; padding: 24px 0 32px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .fig:last-child { border-bottom: 0; }
  .fig-n, .fig:first-child .fig-n { inset-inline-start: 0; }
  .fig-art svg { width: min(100%, 220px); }
  .fig p { min-height: 0; }
}

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; position: relative; z-index: 2; }
.cell { padding: 28px; background: var(--ink); position: relative; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; transition: background-color .3s; }
.cell:hover { background-color: var(--cell-hover); }
.cell h3 { font-size: 20px; letter-spacing: -.02em; }
.cell p { margin: 0; color: var(--muted-c); font-size: 15px; line-height: 1.6; }
.cell .s-ico { position: absolute; top: 24px; inset-inline-start: 28px; }
.cell.big { grid-column: span 2; background-image: radial-gradient(60% 90% at 90% 100%, rgba(2, 111, 125, .35), transparent 70%); min-height: 300px; }
[dir=rtl] .cell.big { background-image: radial-gradient(60% 90% at 10% 100%, rgba(2, 111, 125, .35), transparent 70%); }
.s-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-soft); border: 1px solid rgba(var(--hi-rgb), .2); color: var(--teal-hi); flex: none; }
.s-ico .icon { width: 20px; height: 20px; stroke-width: 1.6; }
.drafts { position: absolute; top: 24px; inset-inline-end: 28px; display: grid; gap: 8px; width: min(46%, 320px); }
.drafts div { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 7px; animation: s-float 6s ease-in-out infinite; }
.drafts div:nth-child(2) { margin-inline-start: 18px; animation-delay: -2s; }
.drafts div:nth-child(3) { margin-inline-start: 36px; animation-delay: -4s; }
.drafts b { color: var(--fg); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.drafts i { display: block; height: 6px; border-radius: 3px; background: var(--bar); }
.drafts i.short { width: 60%; }
@keyframes s-float { 50% { transform: translateY(-5px); } }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .cell, .cell.big { grid-column: auto; min-height: 0; justify-content: flex-start; padding: 24px; }
  .cell .s-ico { position: static; margin-bottom: 14px; }
  .drafts { position: static; width: auto; margin-bottom: 22px; }
}

/* Steps with teal pixel pictures. */
.steps-d { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step-d { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 22px; align-items: end; position: relative; z-index: 2; }
.step-d:nth-child(even) .pix { order: 2; }
.pix { display: grid; grid-template-columns: repeat(16, 1fr); gap: 5px; aspect-ratio: 16 / 7; max-width: 100%; }
.pix i { border-radius: 4px; background: var(--pix); transition: background .2s; }
.pix i.on { background: var(--teal-hi); box-shadow: 0 0 12px rgba(var(--hi-rgb), .5); }
.pix i.mid { background: var(--teal); }
[dir=rtl] .pix { direction: ltr; }
.step-t { display: flex; flex-direction: column; gap: 10px; padding: 8px; }
.step-t .n { font: 500 13px var(--mono); color: var(--teal-hi); }
.step-t h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.step-t p { margin: 0; color: var(--muted-c); max-width: 46ch; }
@media (max-width: 820px) { .step-d { grid-template-columns: 1fr; gap: 18px; padding: 16px; } .step-d:nth-child(even) .pix { order: 0; } .pix { gap: 3px; } }

/* Use-case cards with grainy gradient art. */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.case { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; text-decoration: none; color: var(--fg); position: relative; z-index: 2; transition: transform .35s var(--ease), border-color .35s; }
.case:hover { transform: translateY(-6px); border-color: var(--line-2); }
.case-art { height: 200px; position: relative; overflow: hidden; }
.case:nth-child(1) .case-art { background: radial-gradient(80% 90% at 30% 110%, #2ad4e2, transparent 60%), #06191c; }
.case:nth-child(2) .case-art { background: radial-gradient(70% 90% at 70% 110%, #e8a24a, transparent 60%), radial-gradient(60% 70% at 20% 120%, #026f7d, transparent 60%), #160f08; }
.case:nth-child(3) .case-art { background: radial-gradient(80% 90% at 50% 120%, #5be3a0, transparent 60%), #07160f; }
.case-art::after { content: ""; position: absolute; inset: 0; opacity: .4; mix-blend-mode: overlay; background-image: var(--grain); }
.case-art span { direction: ltr; unicode-bidi: isolate; position: absolute; inset-inline-start: 22px; bottom: 16px; font: italic 64px/1 "Instrument Serif", Georgia, serif; color: rgba(255, 255, 255, .9); }
.case-b { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.case-b h3 { font-size: 22px; letter-spacing: -.02em; }
.case-b p { margin: 0; color: var(--muted-c); font-size: 15px; flex: 1; }
.case-b .more { margin-top: 10px; }
@media (max-width: 900px) { .cases { grid-template-columns: 1fr; } }

/* Second look */
.look { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.look .muted-d { margin: 20px 0 0; font-size: 16.5px; line-height: 1.65; }
.look-list { list-style: none; padding: 0; margin: 26px 0; border-top: 1px solid var(--line); }
.look-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: 16px; }
.look-list em { font: 12px var(--mono); font-style: normal; color: var(--red); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.cmp { display: grid; gap: 12px; position: relative; z-index: 2; }
.cmp > div { border-radius: 16px; padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.cmp .lab { margin-bottom: 8px; display: block; }
.cmp p { margin: 0; font-size: 17px; line-height: 1.6; }
.cmp-bf { opacity: .8; }
.cmp-bf p { color: var(--muted-c); }
.site mark.risk { background: none; color: inherit; padding: 0; text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.cmp-af { border-color: rgba(var(--hi-rgb), .35) !important; box-shadow: 0 20px 60px -30px rgba(var(--hi-rgb), .6); }
@media (max-width: 900px) { .look { grid-template-columns: 1fr; gap: 36px; } }

/* Risk flags at work: tabs of examples, each a flagged draft beside its safer version. Without JS (no .tabs) the
   examples stack and the tab row stays hidden; with JS the active example replays its strikes and flags. */
.rf { display: grid; gap: 14px; }
.rf-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.rf-tabs[hidden] { display: none; }
.rf-tabs button { font: 500 13px/1 var(--mono); letter-spacing: .04em; color: var(--muted-c); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 14px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.rf-tabs button:hover { color: var(--fg); border-color: var(--border-strong); }
.rf-tabs button[aria-selected=true] { color: var(--teal-hi); background: var(--teal-soft); border-color: var(--teal-line); }
.rf-tabs button:focus-visible { outline: none; box-shadow: var(--focus); }
.rf-case { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rf-case[hidden] { display: none; }
.rf-case > div { border-radius: 16px; padding: 24px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 14px; }
.rf-case p { margin: 0; font-size: 18px; line-height: 1.6; }
.rf-bf p { color: var(--muted-c); }
.rf-tabs:not([hidden]) ~ .rf-case .rf-name { display: none; }
.rf-flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rf-flags li { border: 1px solid rgba(255, 107, 107, .3); background: rgba(255, 107, 107, .06); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; color: var(--muted-c); }
.rf-flags b { display: block; color: var(--flag-text); font-weight: 500; }
.rf-af { border-color: rgba(var(--hi-rgb), .35) !important; box-shadow: 0 20px 60px -30px rgba(var(--hi-rgb), .6); justify-content: space-between; }
.rf-note { font: 12px/1.4 var(--mono); color: var(--muted-c); letter-spacing: .04em; }
.rf-fine { margin-top: 22px; }
.rf-case.play mark.risk { animation: rf-strike 1.1s var(--ease) both; }
.rf-case.play .rf-flags li { animation: rf-in .5s var(--ease) both; animation-delay: calc(.6s + var(--d, 0) * .15s); }
.rf-case.play .rf-af { animation: rf-in .6s var(--ease) both; animation-delay: .9s; }
@keyframes rf-strike { 0%, 40% { text-decoration-color: transparent; background: rgba(255, 107, 107, .14); } 100% { text-decoration-color: var(--red); background: transparent; } }
@keyframes rf-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 900px) { .rf-case { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .rf-case.play *, .rf-case.play { animation: none !important; } }

/* Tiles: hairline cards with an icon (home trust, features, about, use cases). */
.tiles, .cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile-d, .cards-3 > .tile { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 24px; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 2; }
.tile-d h3, .cards-3 h3 { font-size: 20px; letter-spacing: -.02em; margin-top: 18px; }
.tile-d p, .cards-3 p { margin: 0; color: var(--muted-c); font-size: 15px; line-height: 1.6; }
.ico-lg { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-soft); border: 1px solid rgba(var(--hi-rgb), .2); color: var(--teal-hi); }
.ico-lg.gold { background: rgba(232, 162, 74, .1); border-color: rgba(232, 162, 74, .25); color: var(--gold-c); }
.ico-lg.ok { background: rgba(91, 227, 160, .08); border-color: rgba(91, 227, 160, .22); color: var(--green); }
.ico-lg .icon { width: 20px; height: 20px; stroke-width: 1.6; }
@media (max-width: 900px) { .tiles, .cards-3 { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan { border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: var(--panel); display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }
.plan.hot { background: linear-gradient(180deg, rgba(2, 111, 125, .45), var(--panel) 60%); border-color: rgba(var(--hi-rgb), .4); box-shadow: 0 30px 80px -40px rgba(var(--hi-rgb), .7); }
.plan h3 { font-size: 20px; letter-spacing: -.02em; }
.plan .price { font-size: 40px; letter-spacing: -.04em; font-weight: 500; line-height: 1; margin: 0; color: var(--fg); }
.plan .price.soon { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; color: var(--dim); }
.plan-for { margin: 0; color: var(--muted-c); font-size: 14px; }
.plan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; flex: 1; align-content: start; }
.plan-list li { padding-inline-start: 22px; position: relative; }
.plan-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--teal-hi); }
.plan-list.soon { color: var(--dim); }
.price-note { margin-top: 28px; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }

/* FAQ accordions */
.faq-d { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; }
.faq-d .more { margin-top: 22px; }
.faq-list { position: relative; z-index: 2; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-list summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font-size: 18px; line-height: 1.4; color: var(--fg); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: "Geist Mono", ui-monospace, monospace; color: var(--teal-hi); transition: transform .3s; flex: none; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.faq-list details p { color: var(--muted-c); margin: 12px 0 0; max-width: 60ch; line-height: 1.65; }
.faq-group { font: 500 12px/1.4 var(--mono) !important; letter-spacing: .08em !important; text-transform: uppercase; color: var(--teal-hi) !important; margin: 48px 0 0 !important; padding-bottom: 6px; }
.faq-group:first-child { margin-top: 0 !important; }
@media (max-width: 820px) { .faq-d { grid-template-columns: 1fr; gap: 28px; } .faq-list summary { font-size: 16.5px; } }

/* FAQ cube: 26 small cubes in pure CSS 3D, turning slowly; a few slide out and back. Shading is baked per face. */
.cube3d { --s: 40px; --g: 45px; --out: .75; width: 100%; max-width: 320px; height: 300px; margin-top: 36px; display: grid; place-items: center; perspective: 1000px; }
.cube3d::before { content: ""; grid-area: 1 / 1; width: calc(var(--g) * 5); height: calc(var(--g) * 1.4); margin-top: calc(var(--g) * 4.4); border-radius: 50%; background: radial-gradient(closest-side, rgba(42, 212, 226, .22), transparent); filter: blur(6px); }
.cube3d .rig { grid-area: 1 / 1; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-38deg); animation: cube-spin 16s linear infinite; }
@keyframes cube-spin { to { transform: rotateX(-24deg) rotateY(322deg); } }
.cube3d .cb {
  --dx: 0; --dy: 0; --dz: 0;
  --c-top: linear-gradient(150deg, #8ce6ee, #3fb9c5); --c-front: linear-gradient(150deg, #23a3b0, #0a6672); --c-right: linear-gradient(150deg, #0e6874, #053c44);
  --c-left: linear-gradient(150deg, #137986, #064650); --c-back: #08505a; --c-bottom: #042d33; --edge: rgba(255, 255, 255, .16);
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: translate3d(calc(var(--x) * var(--g)), calc(var(--y) * var(--g)), calc(var(--z) * var(--g)));
}
.cube3d .cb.hot { --c-top: #ffd08a; --c-front: linear-gradient(150deg, #ffb54d, #e07a12); --c-right: linear-gradient(150deg, #d9790f, #9c4f06); --c-left: linear-gradient(150deg, #ea8c1f, #b25c08); --c-back: #a45606; --c-bottom: #6a3603; --edge: rgba(255, 236, 200, .45); }
.cube3d .cb.pop { animation: cube-pop 4.5s var(--ease) var(--d) infinite; }
@keyframes cube-pop {
  0%, 50%, 100% { transform: translate3d(calc(var(--x) * var(--g)), calc(var(--y) * var(--g)), calc(var(--z) * var(--g))); }
  66%, 84% { transform: translate3d(calc((var(--x) + var(--dx) * var(--out)) * var(--g)), calc((var(--y) + var(--dy) * var(--out)) * var(--g)), calc((var(--z) + var(--dz) * var(--out)) * var(--g))); }
}
.cube3d i { position: absolute; inset: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--edge); backface-visibility: hidden; }
.cube3d .f1 { background: var(--c-front); transform: translateZ(calc(var(--s) / 2)); }
.cube3d .f2 { background: var(--c-back); transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube3d .f3 { background: var(--c-right); transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube3d .f4 { background: var(--c-left); transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube3d .f5 { background: var(--c-top); transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube3d .f6 { background: var(--c-bottom); transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
@media (max-width: 820px) { .cube3d { --s: 26px; --g: 30px; height: 200px; max-width: none; margin-top: 20px; } }
@media (prefers-reduced-motion: reduce) { .cube3d .rig, .cube3d .cb.pop { animation: none; } }

/* Closing call to action */
.s-cta { text-align: center; padding-block: 130px; border-top: 1px solid var(--line); }
.s-cta .s-glow { background: radial-gradient(45% 60% at 50% 120%, rgba(var(--hi-rgb), .7), transparent 70%), radial-gradient(40% 50% at 50% 100%, rgba(2, 111, 125, .9), transparent 70%); }
.s-cta h2 { font-size: clamp(40px, 7vw, 88px); line-height: 1; margin: 22px auto 20px; max-width: 14ch; }
.s-cta p { color: var(--fg-2); max-width: 52ch; margin: 0 auto 30px; font-size: 17px; }
.s-cta .ctas { justify-content: center; }
@media (max-width: 600px) { .s-cta { padding-block: 96px; } }

/* ---------- Inner pages ---------- */
.page-hero { padding: 96px 0 80px; border-bottom: 1px solid var(--line); }
.page-hero .s-glow { opacity: .55; }
.page-hero.compact { padding: 80px 0 56px; }
.page-hero .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.display { font-size: clamp(40px, 6.4vw, 84px); line-height: 1 !important; max-width: 16ch; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-c); text-decoration: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 12px; transition: color .2s, border-color .2s; }
.jump a:hover { color: var(--fg); border-color: var(--teal-line); }
@media (max-width: 600px) { .page-hero { padding: 64px 0 56px; } .page-hero.compact { padding: 56px 0 40px; } }

/* Two-column rows: copy and a visual. */
.feature-row, .split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row.reverse > :first-child { order: 2; }
.feature-row > div > p, .split > div > p { margin: 20px 0 0; font-size: 16.5px; line-height: 1.65; }
.split > div > p + p { margin-top: 14px; }
@media (max-width: 900px) { .feature-row, .split { grid-template-columns: 1fr; gap: 36px; } .feature-row.reverse > :first-child { order: 0; } }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.55; color: var(--fg-2); }
.ticks .icon { color: var(--teal-hi); margin-top: 3px; }
.ticks.limits .icon { color: var(--red); }
.feature-row .tiny { margin-top: 18px; }

.visual { position: relative; z-index: 2; border: 1px solid var(--line); border-radius: 20px; padding: 32px; background: radial-gradient(70% 80% at 80% 100%, rgba(2, 111, 125, .3), transparent 70%), var(--panel); }
.stack-cards { display: grid; gap: 10px; }
.sc { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 12px; padding: 14px; display: grid; gap: 8px; animation: s-float 6s ease-in-out infinite; }
.sc:nth-child(2) { margin-inline-start: 22px; animation-delay: -2s; }
.sc:nth-child(3) { margin-inline-start: 44px; animation-delay: -4s; }
.sc i { display: block; height: 7px; border-radius: 4px; background: var(--bar); }
.sc i.short { width: 55%; }
.site .badge { justify-self: start; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(var(--fg-rgb), .05); color: var(--muted-c); border: 1px solid var(--line); }
.site .badge.primary { background: var(--teal-soft); color: var(--teal-hi); border-color: var(--teal-line); }
.poster { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); max-width: 340px; margin-inline: auto; background: var(--panel-2); }
.poster-art { aspect-ratio: 4 / 3; position: relative; background: radial-gradient(70% 80% at 50% 110%, #2ad4e2, transparent 60%), #06191c; display: grid; place-items: end center; overflow: hidden; }
.poster-art::after { content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: overlay; background-image: var(--grain); }
.bottle { width: 64px; height: 120px; margin-bottom: 26px; border-radius: 18px 18px 12px 12px; background: linear-gradient(180deg, #e9f6f7, #9ccdd2); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .6); position: relative; z-index: 1; }
.bottle::before { content: ""; position: absolute; top: -18px; left: 50%; width: 30px; height: 22px; transform: translateX(-50%); border-radius: 6px 6px 2px 2px; background: #10161a; }
.poster-text { display: grid; gap: 4px; padding: 16px 18px; }
.poster-text strong { font-weight: 500; font-size: 17px; }
.poster-text .tiny { color: var(--muted-c); font-family: var(--mono); }
.rf-wrap { margin-top: 48px; }
.site .flag { border: 1px solid rgba(255, 107, 107, .3); background: rgba(255, 107, 107, .06); border-radius: 12px; padding: 11px 14px; margin: 0; font-size: 14px; color: var(--muted-c); }
.site .flag .phrase { color: var(--flag-text); font-weight: 500; }

/* About */
.quote-card { position: relative; z-index: 2; border: 1px solid rgba(var(--hi-rgb), .3); border-radius: 20px; padding: 32px; background: radial-gradient(80% 90% at 20% 110%, rgba(2, 111, 125, .5), transparent 70%), var(--panel); box-shadow: 0 30px 80px -40px rgba(var(--hi-rgb), .6); }
.quote-card .icon { color: var(--teal-hi); width: 26px; height: 26px; stroke-width: 1.5; }
.quote-card p { margin: 18px 0 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -.02em; color: var(--fg); }
.site .card { position: relative; z-index: 2; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: none; padding: 24px; color: var(--fg); }
.site .card h3 { font-size: 20px; }
.site .card .small a, .site .card > a.small { color: var(--teal-hi); }
.site .row { margin-top: 24px; }

/* Contact form */
.contact-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.6fr 1fr; gap: 40px; } }
.contact-form { padding: 28px !important; }
.site label, .site .field-label { color: var(--fg); font-weight: 500; font-size: 14px; }
.site .hint { color: var(--muted-c); }
.site input[type=text], .site input[type=email], .site input[type=password], .site select, .site textarea {
  background: var(--ink); color: var(--fg); border: 1px solid var(--line-2); border-radius: 12px;
}
.site input::placeholder, .site textarea::placeholder { color: var(--dim); }
.site input:focus, .site select:focus, .site textarea:focus { border-color: var(--teal-hi); box-shadow: 0 0 0 3px rgba(var(--hi-rgb), .18); }
.site .choices label { margin: 0; font-size: 14px; font-weight: 500; background: transparent; border: 1px solid var(--line-2); color: var(--muted-c); border-radius: 999px; }
.site .choices label:has(input:checked) { background: var(--teal-soft); border-color: var(--teal-line); color: var(--teal-hi); }
.contact-form .tiny a { color: var(--teal-hi); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.contact-side { display: grid; gap: 14px; }
.info-card { position: relative; z-index: 2; display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 20px; }
.info-card h3 { font-size: 17px; margin-bottom: 4px; letter-spacing: -.01em; }
.info-card a { color: var(--teal-hi); word-break: break-all; }
.info-card p { margin: 0; }
.site .errors { background: var(--danger-soft); border-color: rgba(255, 107, 107, .3); color: var(--flag-text); }

/* Use-case pages */
.notice-card { position: relative; z-index: 2; display: flex; gap: 16px; align-items: flex-start; border: 1px solid rgba(242, 180, 90, .3); background: rgba(242, 180, 90, .05); border-radius: 20px; padding: 24px; }
.notice-card > .icon { color: var(--warn); margin-top: 3px; }
.notice-h { font-size: 20px !important; margin-bottom: 8px !important; }
.notice-card p { color: var(--fg-2); margin: 0 0 10px; }
.notice-card a { color: var(--teal-hi); }
.other-cases { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 32px; }
.other-cases a { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg); text-decoration: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 12px; }
.other-cases a:hover { border-color: var(--teal-line); color: var(--teal-hi); }

/* Legal pages */
.legal-grid { display: grid; gap: 20px; align-items: start; }
.toc { display: none; }
@media (min-width: 960px) {
  .legal-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
  .toc { display: grid; position: sticky; top: calc(var(--nav-h) + 28px); }
  .toc-h { display: block; padding: 0 0 12px; }
  .toc a { padding: 8px 0; padding-inline-start: 14px; color: var(--muted-c); text-decoration: none; font-size: 14px; border-inline-start: 1px solid var(--line); transition: color .2s, border-color .2s; }
  .toc a:hover { color: var(--fg); }
  .toc a.on { color: var(--teal-hi); border-color: var(--teal-hi); }
}
.legal-doc { padding: clamp(22px, 4vw, 44px) !important; }
.legal-doc h2 { font-size: 24px; letter-spacing: -.02em; margin: 40px 0 12px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 20px); }
.legal-doc p, .legal-doc li { color: var(--fg-2); line-height: 1.7; }
.legal-doc ul { padding-inline-start: 20px; margin: 0 0 14px; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc a { color: var(--teal-hi); }

/* Blog: a filter bar under the head, one wide featured post, then a hairline grid of cards. Cover art is a grainy
   gradient with the post number; the post page reads in one narrow column. */
.blog-bar { position: sticky; top: var(--nav-h); z-index: 20; border-bottom: 1px solid var(--line); background: rgba(var(--ink-rgb), .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.blog-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.blog-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.blog-cats::-webkit-scrollbar { display: none; }
.blog-cats a { flex: none; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-c); text-decoration: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 13px; transition: color .2s, border-color .2s, background .2s; }
.blog-cats a:hover { color: var(--fg); border-color: var(--teal-line); }
.blog-cats a[aria-current] { color: var(--teal-hi); background: var(--teal-soft); border-color: var(--teal-line); }
.blog-search { position: relative; flex: 0 1 280px; }
.site .blog-search input { width: 100%; height: 38px; border-radius: 999px; background: var(--ink); color: var(--fg); border: 1px solid var(--line-2); outline: 0; padding-block: 0; padding-inline: 16px 42px; font-size: 14px; }
.blog-search input::-webkit-search-cancel-button { display: none; }
.blog-search button { position: absolute; inset-inline-end: 4px; top: 4px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted-c); cursor: pointer; }
.blog-search button:hover { color: var(--teal-hi); }
.blog-search button:focus-visible { box-shadow: var(--focus); }
@media (max-width: 760px) { .blog-bar { position: static; } .blog-bar-in { flex-direction: column; align-items: stretch; } .blog-search { flex: none; } }
.blog-list { padding-top: 40px; }
@media (min-width: 960px) { .blog-list { padding-top: 56px; } }
.blog-empty { text-align: center; padding: 48px 0; color: var(--muted-c); display: grid; gap: 14px; justify-items: center; }
.blog-empty p { margin: 0; font-size: 17px; }

.post-art { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: radial-gradient(80% 90% at 30% 110%, #2ad4e2, transparent 60%), #06191c; }
.post-art.art-1 { background: radial-gradient(70% 90% at 70% 110%, #e8a24a, transparent 60%), radial-gradient(60% 70% at 20% 120%, #026f7d, transparent 60%), #160f08; }
.post-art.art-2 { background: radial-gradient(80% 90% at 50% 120%, #5be3a0, transparent 60%), #07160f; }
.post-art.art-3 { background: radial-gradient(70% 90% at 80% -10%, #2ad4e2, transparent 60%), radial-gradient(60% 80% at 10% 120%, #e8a24a, transparent 60%), #071214; }
.post-art::after { content: ""; position: absolute; inset: 0; opacity: .4; mix-blend-mode: overlay; background-image: var(--grain); }
.post-art span { direction: ltr; unicode-bidi: isolate; position: absolute; inset-inline-start: 22px; bottom: 14px; font: italic 72px/1 "Instrument Serif", Georgia, serif; color: rgba(255, 255, 255, .9); transition: transform .7s var(--ease); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-c); }
.post-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.post-meta .teal { color: var(--teal-hi); }
.post-by { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-size: 14px; color: var(--fg-2); }
.post-avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; background: radial-gradient(70% 70% at 30% 30%, #2ad4e2, #026f7d); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset; }

.post-feature { display: grid; grid-template-columns: 1.45fr 1fr; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); color: var(--fg); text-decoration: none; position: relative; z-index: 2; margin-bottom: 14px; transition: border-color .3s; }
.post-feature:hover { border-color: var(--line-2); }
.post-feature .post-art { aspect-ratio: auto; min-height: 380px; }
.post-feature .post-art span { font-size: 120px; inset-inline-start: 32px; bottom: 22px; }
.post-feature:hover .post-art span, .post-card:hover .post-art span { transform: translateY(-6px); }
.post-feature-b { display: flex; flex-direction: column; gap: 18px; padding: 32px; border-inline-start: 1px solid var(--line); }
.post-feature-b h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; }
.post-feature-b > p { margin: 0; color: var(--muted-c); font-size: 16px; line-height: 1.65; flex: 1; }
.post-feature-b .post-by { padding-top: 18px; border-top: 1px solid var(--line); }
.post-feature-b .more { margin-inline-start: auto; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); color: var(--fg); text-decoration: none; position: relative; z-index: 2; transition: transform .4s var(--ease), border-color .3s; }
.post-card:hover { transform: translateY(-6px); border-color: var(--line-2); }
.post-card-b { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 24px; flex: 1; }
.post-card-b h3 { font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.post-card-b .post-ex { margin: 0; color: var(--muted-c); font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-feature:focus-visible, .post-card:focus-visible { box-shadow: var(--focus); }
@media (max-width: 960px) {
  .post-feature { grid-template-columns: 1fr; }
  .post-feature .post-art { min-height: 0; aspect-ratio: 16 / 9; }
  .post-feature .post-art span { font-size: 88px; }
  .post-feature-b { border-inline-start: 0; border-top: 1px solid var(--line); padding: 24px; }
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-hero .wrap { gap: 20px; }
.post-hero .display { font-size: clamp(34px, 5vw, 60px); line-height: 1.06 !important; max-width: 22ch; }
.post-hero .post-by { margin-top: 4px; }
.more.back { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.more.back:hover .arr { transform: translateX(-3px); }
[dir=rtl] .more.back:hover .arr { transform: scaleX(-1) translateX(-3px); }
.post-hero a.s-pill { text-decoration: none; }
.post-wrap { padding-top: 40px !important; }
.post-wrap .post-art { border-radius: 20px; border: 1px solid var(--line); aspect-ratio: 21 / 9; position: relative; z-index: 2; }
.post-wrap .post-art span { font-size: 110px; inset-inline-start: 32px; bottom: 20px; }
.post-body { max-width: 68ch; margin: 48px auto 0; position: relative; z-index: 2; }
.post-body p, .post-body li { color: var(--fg-2); font-size: 17.5px; line-height: 1.75; }
.post-body p { margin: 0 0 20px; }
.post-body h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.025em; margin: 44px 0 14px; }
.post-body ul { list-style: none; padding: 0; margin: 4px 0 24px; border-top: 1px solid var(--line); }
.post-body li { padding: 12px 0; padding-inline-start: 26px; border-bottom: 1px solid var(--line); position: relative; }
.post-body li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 25px; width: 8px; height: 1px; background: var(--teal-hi); }
.post-body .post-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
@media (max-width: 600px) { .post-body p, .post-body li { font-size: 16.5px; } .post-wrap .post-art { aspect-ratio: 16 / 10; } .post-wrap .post-art span { font-size: 80px; } }
[dir=rtl] .blog-cats a, [dir=rtl] .post-meta, [dir=rtl] .more.back { text-transform: none; letter-spacing: 0; }
[dir=rtl] .post-body p, [dir=rtl] .post-body li { line-height: 1.95; }

/* 404 */
.error-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 40px var(--gutter); text-align: center; }
.error-card { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 560px; }
.error-code { font-size: clamp(110px, 22vw, 200px); line-height: .9; margin: 24px 0 0; }
.error-card h1 { font-size: clamp(28px, 4vw, 40px); }
.error-card p { color: var(--fg-2); margin: 0; }
.error-card .ctas { justify-content: center; margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; color: var(--muted-c); font-size: 14px; position: relative; background: var(--ink); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, 1fr); }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 14px; justify-items: start; }
.footer-brand p { margin: 0; max-width: 36ch; }
.footer-grid > div:not(.footer-brand) { display: grid; gap: 10px; align-content: start; }
.footer-h { margin: 0 0 4px !important; font-size: 12px !important; font-weight: 500 !important; color: var(--dim) !important; letter-spacing: .08em !important; }
.footer-grid a:not(.logo) { color: var(--muted-c); text-decoration: none; transition: color .2s; }
.footer-grid a:not(.logo):hover { color: var(--fg); }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 12.5px; line-height: 1.6; color: var(--dim); }
.footer-base p { margin: 0; max-width: 110ch; }
.footer-base a { color: var(--muted-c); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .footer-brand { grid-column: auto; } }

/* ---------- Scroll reveal: content is visible at rest; only with JS does it start hidden ---------- */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Light theme: the same design on a light canvas. Chosen with the theme button (html[data-theme]),
   or, with no choice saved, when the device is set to light. Brand teal #026f7d replaces the neon teal for contrast. ---------- */
html[data-theme=light] body.site {
  --ink: #f6f8f7; --panel: #ffffff; --panel-2: #eef2f1;
  --line: rgba(5, 7, 8, .08); --line-2: rgba(5, 7, 8, .14);
  --fg: #0b1215; --fg-2: #34424a; --muted-c: #5a676c; --dim: #6b787d;
  --teal-hi: #026f7d; --teal-soft: rgba(2, 111, 125, .08); --teal-line: rgba(2, 111, 125, .24);
  --red: #c93a3a; --green: #12805a;
  --border-strong: rgba(5, 7, 8, .24); --primary-hover: #015a66;
  --ok-soft: rgba(18, 128, 90, .08); --danger: #b42318; --danger-soft: rgba(201, 58, 58, .08); --warn: #9a5b00; --warn-soft: rgba(242, 180, 90, .14);
  --shadow-2: 0 24px 60px -24px rgba(11, 18, 21, .25);
  --fg-rgb: 11, 18, 21; --ink-rgb: 246, 248, 247; --hi-rgb: 2, 111, 125;
  --btn-hover: #1f2d33; --win-bg: rgba(255, 255, 255, .9); --dot: #d5dcda; --unlit: #c7d0ce; --flag-text: #b42318; --gold-c: #a35c0a;
  --fig-line: rgba(11, 18, 21, .34); --fig-side: #e9eeed; --cell-hover: #fbfcfc; --bar: #e3e9e8; --pix: #e6ecea;
  color-scheme: light;
}
@media (prefers-color-scheme: light) { html:not([data-theme=dark]) body.site {
  --ink: #f6f8f7; --panel: #ffffff; --panel-2: #eef2f1;
  --line: rgba(5, 7, 8, .08); --line-2: rgba(5, 7, 8, .14);
  --fg: #0b1215; --fg-2: #34424a; --muted-c: #5a676c; --dim: #6b787d;
  --teal-hi: #026f7d; --teal-soft: rgba(2, 111, 125, .08); --teal-line: rgba(2, 111, 125, .24);
  --red: #c93a3a; --green: #12805a;
  --border-strong: rgba(5, 7, 8, .24); --primary-hover: #015a66;
  --ok-soft: rgba(18, 128, 90, .08); --danger: #b42318; --danger-soft: rgba(201, 58, 58, .08); --warn: #9a5b00; --warn-soft: rgba(242, 180, 90, .14);
  --shadow-2: 0 24px 60px -24px rgba(11, 18, 21, .25);
  --fg-rgb: 11, 18, 21; --ink-rgb: 246, 248, 247; --hi-rgb: 2, 111, 125;
  --btn-hover: #1f2d33; --win-bg: rgba(255, 255, 255, .9); --dot: #d5dcda; --unlit: #c7d0ce; --flag-text: #b42318; --gold-c: #a35c0a;
  --fig-line: rgba(11, 18, 21, .34); --fig-side: #e9eeed; --cell-hover: #fbfcfc; --bar: #e3e9e8; --pix: #e6ecea;
  color-scheme: light;
} }
html[data-theme=light] body.site .s-glow { background: radial-gradient(50% 45% at 50% 108%, rgba(42, 212, 226, .32), transparent 70%), radial-gradient(38% 40% at 18% 90%, rgba(2, 111, 125, .16), transparent 70%), radial-gradient(38% 40% at 85% 85%, rgba(2, 111, 125, .14), transparent 70%), radial-gradient(60% 50% at 50% 0%, rgba(2, 111, 125, .06), transparent 70%); }
html[data-theme=light] body.site .s-cta .s-glow { background: radial-gradient(45% 60% at 50% 120%, rgba(42, 212, 226, .34), transparent 70%), radial-gradient(40% 50% at 50% 100%, rgba(2, 111, 125, .16), transparent 70%); }
html[data-theme=light] body.site .s-grain { opacity: .07; mix-blend-mode: multiply; }
html[data-theme=light] body.site .cell.big { background-image: radial-gradient(60% 90% at 90% 100%, rgba(2, 111, 125, .1), transparent 70%); }
html[data-theme=light] body.site .plan.hot { background: linear-gradient(180deg, rgba(2, 111, 125, .1), var(--panel) 60%); box-shadow: 0 30px 80px -40px rgba(2, 111, 125, .35); }
html[data-theme=light] body.site .quote-card { background: radial-gradient(80% 90% at 20% 110%, rgba(2, 111, 125, .12), transparent 70%), var(--panel); box-shadow: 0 30px 80px -40px rgba(2, 111, 125, .3); }
html[data-theme=light] body.site .visual { background: radial-gradient(70% 80% at 80% 100%, rgba(2, 111, 125, .08), transparent 70%), var(--panel); }
html[data-theme=light] body.site .appwin { box-shadow: 0 -30px 120px -40px rgba(2, 111, 125, .3), 0 1px 0 var(--line); }
html[data-theme=light] body.site .pix i.on { box-shadow: 0 0 10px rgba(2, 111, 125, .25); }
@media (prefers-color-scheme: light) {
  html:not([data-theme=dark]) body.site .s-glow { background: radial-gradient(50% 45% at 50% 108%, rgba(42, 212, 226, .32), transparent 70%), radial-gradient(38% 40% at 18% 90%, rgba(2, 111, 125, .16), transparent 70%), radial-gradient(38% 40% at 85% 85%, rgba(2, 111, 125, .14), transparent 70%), radial-gradient(60% 50% at 50% 0%, rgba(2, 111, 125, .06), transparent 70%); }
  html:not([data-theme=dark]) body.site .s-cta .s-glow { background: radial-gradient(45% 60% at 50% 120%, rgba(42, 212, 226, .34), transparent 70%), radial-gradient(40% 50% at 50% 100%, rgba(2, 111, 125, .16), transparent 70%); }
  html:not([data-theme=dark]) body.site .s-grain { opacity: .07; mix-blend-mode: multiply; }
  html:not([data-theme=dark]) body.site .cell.big { background-image: radial-gradient(60% 90% at 90% 100%, rgba(2, 111, 125, .1), transparent 70%); }
  html:not([data-theme=dark]) body.site .plan.hot { background: linear-gradient(180deg, rgba(2, 111, 125, .1), var(--panel) 60%); box-shadow: 0 30px 80px -40px rgba(2, 111, 125, .35); }
  html:not([data-theme=dark]) body.site .quote-card { background: radial-gradient(80% 90% at 20% 110%, rgba(2, 111, 125, .12), transparent 70%), var(--panel); box-shadow: 0 30px 80px -40px rgba(2, 111, 125, .3); }
  html:not([data-theme=dark]) body.site .visual { background: radial-gradient(70% 80% at 80% 100%, rgba(2, 111, 125, .08), transparent 70%), var(--panel); }
  html:not([data-theme=dark]) body.site .appwin { box-shadow: 0 -30px 120px -40px rgba(2, 111, 125, .3), 0 1px 0 var(--line); }
  html:not([data-theme=dark]) body.site .pix i.on { box-shadow: 0 0 10px rgba(2, 111, 125, .25); }
}

/* ---------- Right-to-left (fa, ar, ur): Vazirmatn everywhere, the accent becomes bold teal instead of serif italic ---------- */
[dir=rtl] .ser { font-style: normal; font-weight: 800; letter-spacing: 0; }
[dir=rtl] .site h1, [dir=rtl] .site h2, [dir=rtl] .site h3 { font-weight: 700; letter-spacing: 0; line-height: 1.35; }
[dir=rtl] .hero-h { line-height: 1.25 !important; }
[dir=rtl] .display { line-height: 1.3 !important; }
[dir=rtl] .s-pill, [dir=rtl] .lab, [dir=rtl] .footer-h, [dir=rtl] .toc-h, [dir=rtl] .s-ticker-track, [dir=rtl] .jump a, [dir=rtl] .other-cases a, [dir=rtl] .look-list em, [dir=rtl] .drafts b, [dir=rtl] .site .badge, [dir=rtl] .appwin-foot .ready { text-transform: none; }
[dir=rtl] .statement p { line-height: 1.5; }
[dir=rtl] .cap .good { font-style: normal; font-weight: 700; font-size: 1em; }
[dir=rtl] .site .btn { font-weight: 600; }

/* ---------- Reduced motion: everything still, everything visible ---------- */
@media (prefers-reduced-motion: reduce) {
  .site *, .site *::before, .site *::after { animation: none !important; transition: none !important; }
  .js .rv, [data-words] .w { opacity: 1; transform: none; filter: none; }
  .s-ticker-track { white-space: normal; flex-wrap: wrap; justify-content: center; gap: 12px 32px; padding-inline: var(--gutter); }
}
