/* flexgem.io — landing v3 (EN + HE). Every value is copied from the Claude Design project 8daffdeb
   (page inline styles + _ds tokens + the design-system components Logo/Button/Input/Checkbox/Switch/Dialog).
   Inline styles became classes because the live CSP is `style-src 'self'`. Fonts are self-hosted (SIL OFL 1.1,
   licences in /fonts): Schibsted Grotesk, JetBrains Mono, Heebo (Hebrew fallback). */

/* ---------- fonts ---------- */
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Heebo v28 (Google Fonts build, OFL). The Hebrew subset loads only where Hebrew glyphs appear; the Latin subset
   keeps mixed Hebrew/Latin runs in one face on the Hebrew pages. */
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/heebo-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/heebo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokens (_ds/tokens/*.css, the subset the pages use) ---------- */
:root {
  --gray-0: #FBFAF8; --gray-50: #F4F2ED; --gray-100: #EAE7E0; --gray-200: #DAD6CD; --gray-300: #C0BBB1;
  --gray-400: #948F85; --gray-500: #6B675F; --gray-600: #4C4941; --gray-700: #332F2B; --gray-800: #211F24; --gray-900: #141319;
  --blue-50: #EDF1FF; --blue-100: #DCE3FF; --blue-400: #4E6DFF; --blue-500: #1F4BFF; --blue-600: #123AE6; --blue-700: #0C2CB4;
  --red-50: #FCEAE7; --red-500: #D8412F; --red-600: #B22C1D;
  --bg-page: var(--gray-0); --surface: #FFFFFF; --surface-2: var(--gray-50);
  --text-strong: var(--gray-900); --text-body: var(--gray-700); --text-muted: var(--gray-500); --text-faint: var(--gray-400);
  --text-on-accent: #FFFFFF; --text-link: var(--blue-600);
  --border-subtle: var(--gray-200); --border-strong: var(--gray-300); --focus-ring: var(--blue-400);
  --accent: var(--blue-500); --accent-hover: var(--blue-600); --accent-press: var(--blue-700); --accent-tint: var(--blue-50);
  --danger: var(--red-500);
  --font-sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r-xs: 4px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --shadow-sm: 0 1px 3px rgba(20,19,25,.06), 0 1px 2px rgba(20,19,25,.04);
  --shadow-lg: 0 12px 32px rgba(20,19,25,.10), 0 4px 8px rgba(20,19,25,.05);
  --shadow-xl: 0 28px 64px rgba(20,19,25,.14), 0 8px 16px rgba(20,19,25,.06);
  --ring: 0 0 0 3px var(--blue-100), 0 0 0 1px var(--blue-500);
  --ring-danger: 0 0 0 3px var(--red-50), 0 0 0 1px var(--red-500);
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 320ms;
  --ease-out: cubic-bezier(0.22, 0.8, 0.28, 1); --ease-standard: cubic-bezier(0.3, 0.1, 0.3, 1);
  /* gradients used by the page. Contrast measured 2026-10-07 on #FBFAF8: the design's end stops #D63BFF (3.40:1)
     and #16C2B4 (2.14:1) fail AA for small text, so the end stops are darkened to #B01BCB (5.21:1) and #0B7A72
     (4.98:1); the start and middle stops pass as designed (#6E3BFF 5.39, #A23BF0 4.55, #1F4BFF 5.74). */
  --grad-talk: linear-gradient(90deg, #6E3BFF, #A23BF0 55%, #B01BCB);
  --grad-solution: linear-gradient(90deg, #6E3BFF, #1F4BFF 50%, #0B7A72);
  --talk-arrow: #B01BCB;
  --gutter: clamp(20px, 4vw, 40px);
}
/* Hebrew pages: Heebo as the Hebrew fallback for both families; the gradients run the other way. */
html[lang="he"] {
  --font-sans: 'Schibsted Grotesk', 'Heebo', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Heebo', ui-monospace, monospace;
  --grad-talk: linear-gradient(270deg, #6E3BFF, #A23BF0 55%, #B01BCB);
  --grad-solution: linear-gradient(270deg, #6E3BFF, #1F4BFF 50%, #0B7A72);
}

/* ---------- base ---------- */
html, body { margin: 0; background: #FBFAF8; }
body { -webkit-font-smoothing: antialiased; }
a { color: var(--text-link); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
button { font: inherit; }

.page { position: relative; min-height: 100vh; min-height: 100svh; background: #FBFAF8; color: var(--text-body); font-family: var(--font-sans); display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; flex: 1; display: flex; flex-direction: column; }

.skip-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50; padding: 12px 16px; border-radius: var(--r-md); background: var(--text-strong); color: #FBFAF8; font-family: var(--font-mono); font-size: 13px; text-decoration: none; }
.skip-link:focus { top: 12px; outline: none; box-shadow: var(--ring); }

/* ---------- header + logo (DS Logo, size 24) ---------- */
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(18px, 3vw, 32px) 0; }
.logo { display: inline-flex; align-items: center; gap: 5.52px; color: var(--text-strong); text-decoration: none; }
.logo-mark { display: block; flex: none; height: 22.8px; width: auto; }
.logo-word { font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 24px; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; color: var(--text-strong); }
.back-link { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-strong); text-decoration: none; padding: 12px 0; }
.back-link:hover { color: var(--accent); }
html[lang="he"] .back-link { font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: 0; }

/* ---------- hero ---------- */
.main { outline: none; flex: 1; display: flex; flex-direction: column; } /* hero + research, so the skip link lands on all content */
.main:focus-visible, .legal:focus-visible { box-shadow: none; } /* the landmarks take programmatic focus (skip link, dialog fallback on iOS) but are not controls: no ring */
.hero { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 3vw, 40px); align-items: center; align-content: center; padding: 0 0 clamp(16px, 3vw, 32px); }
.copy { display: flex; flex-direction: column; gap: 22px; max-width: 560px; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
html[lang="he"] .eyebrow { letter-spacing: .02em; text-transform: none; }
html[lang="he"] .eyebrow[dir="ltr"] { text-align: right; letter-spacing: .14em; text-transform: uppercase; } /* the English tagline on the Hebrew page: LTR so "//" leads, right-aligned like the rest of the copy */
.headline { margin: 0; font-size: clamp(44px, 6.4vw, 76px); line-height: .98; letter-spacing: -.04em; font-weight: 800; color: var(--text-strong); text-wrap: balance; }
html[lang="he"] .headline { line-height: 1.04; letter-spacing: -.015em; }
html[lang="en"] .headline { text-wrap: initial; } /* the EN headline carries explicit <br>s (3 · 2 · 1 words), operator 2026-10-07 */
.subtitle { margin: 0; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.55; color: var(--text-body); text-wrap: pretty; }
html[lang="he"] .subtitle { line-height: 1.65; }
.cta { display: flex; padding-top: 6px; }

/* "Let's Talk →" — gradient text + coloured arrow */
.talk { display: inline-flex; align-items: center; border: 0; background: transparent; cursor: pointer; font-family: var(--font-mono); font-weight: 700; letter-spacing: .02em; color: var(--text-strong); }
.talk:hover { opacity: .75; }
.btn--lg { height: 48px; min-height: 48px; padding: 0 24px; font-size: 15px; } /* hero CTA (operator 2026-10-07: a button, not the gradient link) */
html[lang="he"] .btn--lg { font-size: 16px; }
.talk--sm { align-self: flex-start; gap: 8px; padding: 10px 0 2px; font-size: 13px; }
.talk-text { background: var(--grad-talk); -webkit-background-clip: text; background-clip: text; color: transparent; }
.talk--sm .talk-text { text-decoration: underline; text-decoration-color: var(--talk-arrow); text-decoration-thickness: 1px; text-underline-offset: 3px; } /* operator 2026-10-07: show it is a link (decoration colour set explicitly — the text itself is transparent) */
.talk-arrow { color: var(--talk-arrow); }

.art { min-width: 0; margin-inline-end: calc(-1 * var(--gutter)); }
.threads { height: auto; overflow: visible; }
.threads--desk { width: 100%; display: block; }
.threads--mob { display: none; width: calc(100% + 20px); margin-inline-start: -20px; }
html[lang="he"] .threads { transform: scaleX(-1); }
.thread-bg { fill: none; stroke: rgba(20,19,25,.09); stroke-width: 1; }
.thread { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 80 1100; }
.node-ring { fill: none; stroke: #1F4BFF; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: fgRing 3s ease-out infinite; }
.node-dot { fill: #1F4BFF; }
@keyframes fgDash { from { stroke-dashoffset: 80; } to { stroke-dashoffset: -1000; } }
@keyframes fgRing { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
[data-paused="true"] [data-anim] { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { [data-anim] { animation: none !important; } .pause-btn { display: none; } } /* nothing to pause once the animation is removed */

/* ---------- research blocks ---------- */
.research { padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 6vw, 88px); display: flex; flex-direction: column; }
.feat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; }
.block { display: flex; flex-direction: column; min-width: 0; }
.block-btn { flex: 1; display: flex; flex-direction: column; gap: 12px; text-align: start; padding: 6px clamp(16px, 2vw, 28px) 20px; border: 0; border-inline-start: 2px solid var(--border-strong); background: transparent; cursor: pointer; font-family: var(--font-sans); color: inherit; }
.block-btn:hover { background: rgba(31,75,255,.03); }
.block-btn[aria-expanded="true"] { border-inline-start-color: var(--accent); }
.block-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.block-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-muted); }
.block-icon { font-family: var(--font-mono); font-size: 18px; line-height: 1; color: var(--accent); }
.block-icon::before { content: '+'; }
.block-btn[aria-expanded="true"] .block-icon::before { content: '−'; }
.block-stat { font-size: clamp(44px, 4.6vw, 60px); line-height: .92; font-weight: 800; letter-spacing: -.04em; color: var(--text-strong); }
html[lang="he"] .block-stat { letter-spacing: -.03em; }
.block-btn[aria-expanded="true"] .block-stat { color: var(--accent); }
.block-unit { font-size: clamp(15px, 1.3vw, 17px); line-height: 1.4; font-weight: 600; color: var(--text-strong); text-wrap: pretty; }

/* The detail of one block is rendered once; JS moves the node between its inline slot (≤820px) and the panel. */
.detail[hidden] { display: none; }
.detail-title { font-size: 22px; line-height: 1.25; letter-spacing: -.015em; font-weight: 800; color: var(--text-strong); text-wrap: balance; }
html[lang="he"] .detail-title { line-height: 1.35; letter-spacing: 0; }
.detail-data { display: flex; flex-direction: column; gap: 16px; }
.detail-ref { display: none; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.detail-ref strong { color: var(--text-strong); font-weight: 400; }
.detail-intro { font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--text-strong); }
.rows { display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 14px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.row-k { color: var(--text-muted); white-space: nowrap; }
.row-v { color: var(--text-strong); font-weight: 700; }
.bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.bullets li { font-size: 15px; line-height: 1.5; color: var(--text-body); padding-inline-start: 14px; position: relative; }
.bullets li::before { content: ''; position: absolute; inset-inline-start: 0; top: .62em; width: 5px; height: 5px; background: var(--accent); }
.bullets strong { color: var(--text-strong); }
.detail-source { display: flex; flex-direction: column; gap: 10px; }
.source { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.src-link { display: inline-flex; gap: .5ch; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text-strong); text-decoration: none; padding: 8px 0; }
.src-link span:not(.brace-l):not(.brace-r) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; } /* operator 2026-10-07: source links read as links */
.src-link:hover { color: var(--accent); }
.brace-l { color: #6E3BFF; } .brace-r { color: #12C98E; }
.detail-solution { position: relative; display: flex; flex-direction: column; gap: 12px; }
.solution-label { font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; background: var(--grad-solution); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="he"] .solution-label { letter-spacing: .02em; text-transform: none; }
.solution-text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-strong); text-wrap: pretty; }

/* inline (mobile) placement */
.block > .detail { padding: 8px 0 24px 18px; border-inline-start: 2px solid var(--accent); display: flex; flex-direction: column; gap: 18px; }
html[lang="he"] .block > .detail { padding: 8px 18px 24px 0; }
.block > .detail[hidden] { display: none; }
/* desktop panel placement */
.panel { margin-top: 28px; border-top: 1px solid var(--text-strong); padding-top: 32px; }
.panel[hidden] { display: none; }
.panel > .detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .8fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.panel .detail-title { grid-column: 1 / -1; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
html[lang="he"] .panel .detail-title { line-height: 1.3; letter-spacing: 0; }
.panel .detail-ref { display: block; }

@media (max-width: 1040px) { .feat { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; } }
@media (max-width: 600px) { .feat { grid-template-columns: minmax(0, 1fr); row-gap: 28px; } }
@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
  .copy { gap: 16px; }
  .art { order: -1; margin-inline-end: 0; }
  .threads--desk { display: none; }
  .threads--mob { display: block; }
  .panel { display: none; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border-subtle); padding: 12px 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-muted); }
.footer-copy { white-space: nowrap; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-link { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; padding: 12px 0; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: none; }
.footer-link:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.footer-link[aria-current="page"] { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
html[lang="he"] .footer-link { font-size: 13px; }
.lang-link { padding: 12px 0; color: var(--text-strong); text-decoration: none; }
.lang-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.lang-link--he { font-family: 'Heebo', var(--font-sans); font-size: 13px; font-weight: 600; }
.lang-link--en { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.pause-btn { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; padding: 12px 0; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pause-btn:hover { color: var(--accent); }

/* ---------- DS Button (md) ---------- */
.btn { font-family: var(--font-sans); font-weight: 600; border: 1px solid transparent; border-radius: var(--r-md); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; line-height: 1; height: 40px; padding: 0 18px; font-size: 14px; user-select: none;
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn--secondary { background: var(--surface); color: var(--text-strong); border-color: var(--border-strong); }
.btn--secondary:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); }
.btn--ghost { background: transparent; color: var(--text-body); }
.btn--ghost:hover:not(:disabled) { background: var(--gray-100); }
.spinner { display: none; animation: fg-spin .7s linear infinite; }
@keyframes fg-spin { to { transform: rotate(360deg); } }

/* ---------- DS Dialog (native <dialog>) ---------- */
/* overflow stays `auto` (the UA default for dialog:modal, max-height calc(100% - 6px - 2em)) so the form can scroll
   at 200 % zoom or on short screens; the DS used overflow:hidden for the corners, which clipped the Send button. */
.dialog { width: 100%; max-width: 520px; padding: 0; margin: auto; box-sizing: border-box; background: var(--surface); color: var(--text-body); font-family: var(--font-sans); border-radius: var(--r-xl); box-shadow: var(--shadow-xl); border: 1px solid var(--border-subtle); overflow: auto; }
.dialog[open] { animation: fg-pop var(--dur-slow) var(--ease-out); }
.dialog::backdrop { background: rgba(20,19,25,.44); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fg-fade var(--dur-base) var(--ease-out); }
@keyframes fg-fade { from { opacity: 0; } }
@keyframes fg-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog-head { padding: 24px 24px 0; }
.dialog-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.015em; color: var(--text-strong); }
.dialog-desc { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.dialog-body { padding: 20px 24px; font-size: 14px; color: var(--text-body); }

/* contact dialog states: idle → sending → sent | error */
.dialog .sent { display: none; }
.dialog[data-state="sent"] .form, .dialog[data-state="sent"] .dialog-desc { display: none; }
.dialog[data-state="sent"] .sent { display: flex; flex-direction: column; gap: 16px; }
.form-error { display: none; font-size: 13px; color: var(--red-600); } /* red-500 on white measures 4.45:1; red-600 passes AA */
.dialog[data-state="error"] .form-error { display: block; }
.dialog[data-state="sending"] .spinner { display: block; }
.dialog[data-state="sending"] .btn-label { display: none; }

/* ---------- form (DS Input / Checkbox) ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-family: var(--font-sans); }
.label { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.input, .textarea { font-family: var(--font-sans); color: var(--text-strong); background: var(--surface); border: 1px solid var(--gray-400); border-radius: var(--r-md); outline: none; box-sizing: border-box; width: 100%;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard); } /* DS border is gray-300 (1.9:1 on white); gray-400 passes the 3:1 non-text contrast */
.input { height: 40px; padding: 0 12px; font-size: 14px; }
.textarea { font-size: 16px; line-height: 1.5; padding: 10px 12px; resize: vertical; min-height: 96px; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.hint { font-size: 12px; color: var(--text-muted); }
.optional { font-weight: 400; color: var(--text-muted); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-sans); font-size: 14px; color: var(--text-body); position: relative; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); } /* 1px, not 0: a zero-size required control cannot take focus, so native validation showed nothing (fixed 2026-10-07) */
.check-box { width: 18px; height: 18px; border-radius: var(--r-xs); flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--gray-400); box-sizing: border-box;
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard); }
.check-box svg { display: none; }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box svg { display: block; }
.check input:focus-visible + .check-box { box-shadow: var(--ring); }
.check-text { line-height: 1.4; }
/* inline validation (site.js sets novalidate and fills .field-error from data-msg; without JS the browser's own messages apply) */
.field-error { display: none; font-size: 12px; line-height: 1.5; color: var(--red-600); }
.is-invalid .field-error { display: block; }
.field.is-invalid .input, .field.is-invalid .textarea { border-color: var(--red-600); }
.field.is-invalid .check-box { border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.field.is-invalid .check-text { color: var(--red-600); }
#consent-error { padding-inline-start: 28px; }
.consent-note { font-size: 12px; line-height: 1.5; color: var(--text-muted); padding-inline-start: 28px; margin: 0; }
.consent-note a { color: var(--text-link); text-decoration: underline; text-underline-offset: 2px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
html[lang="he"] .actions { justify-content: flex-start; }
.sent-text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-body); }

/* ---------- cookie banner + preferences (DS Switch) ---------- */
.banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; width: min(760px, calc(100% - 24px)); box-sizing: border-box; background: #FFFFFF; border: 1px solid var(--border-subtle); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 20px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; font-family: var(--font-sans); }
.banner[hidden] { display: none; }
.banner-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.banner-title { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.banner-body { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-body); }
.banner-body a { color: var(--text-link); text-decoration: underline; text-underline-offset: 2px; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prefs { display: flex; flex-direction: column; gap: 4px; }
.pref { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.pref-text { display: flex; flex-direction: column; gap: 4px; }
.pref-name { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.pref-desc { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.switch { display: inline-flex; align-items: center; cursor: pointer; position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch-track { width: 38px; height: 22px; border-radius: var(--r-full); position: relative; background: var(--gray-400); transition: background var(--dur-base) var(--ease-standard); display: block; } /* DS off-state is gray-300 (1.91:1 on white); gray-400 = 3.22:1 passes 1.4.11 */
.switch-knob { position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); transition: inset-inline-start var(--dur-base) var(--ease-out); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-knob { inset-inline-start: 18px; }
.switch input:disabled + .switch-track { opacity: .55; cursor: not-allowed; }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }
.prefs-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; }
html[lang="he"] .prefs-actions { justify-content: flex-start; }

/* ---------- legal pages ---------- */
.legal { outline: none; flex: 1; width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 28px; padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 7vw, 96px); }
.legal-head { display: flex; flex-direction: column; gap: 14px; }
.legal-title { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; color: var(--text-strong); }
html[lang="he"] .legal-title { line-height: 1.1; letter-spacing: -.01em; }
.legal-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.legal section { display: flex; flex-direction: column; gap: 8px; padding-top: 28px; border-top: 1px solid var(--border-subtle); }
.legal h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--text-strong); }
html[lang="he"] .legal h2 { line-height: 1.4; letter-spacing: 0; }
.legal h3 { margin: 8px 0 0; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--text-strong); }
.legal p, .legal li { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-body); text-wrap: pretty; }
html[lang="he"] .legal p, html[lang="he"] .legal li { line-height: 1.75; }
.legal ul { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal a { color: var(--text-link); text-underline-offset: 3px; }
.legal a:hover { color: var(--accent); }
.legal table { border-collapse: collapse; width: 100%; font-size: 15px; }
.legal th, .legal td { text-align: start; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); line-height: 1.5; color: var(--text-body); }
.legal th { font-weight: 600; color: var(--text-strong); }
.legal-cta { display: flex; padding-top: 8px; }
.btn--outline { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: #FFFFFF; color: var(--text-strong); font-size: 14px; font-weight: 600; text-decoration: none; font-family: var(--font-sans); cursor: pointer; }
.btn--outline:hover { background: var(--gray-50); color: var(--text-strong); }
html[lang="he"] .btn--outline { font-size: 15px; }
@media (max-width: 640px) { .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; } .legal thead { display: none; } .legal td { border: 0; padding: 4px 0; } .legal tr { border-bottom: 1px solid var(--border-subtle); padding: 8px 0; } }

@media (prefers-reduced-motion: reduce) {
  .dialog[open], .dialog::backdrop { animation: none; }
  .btn, .switch-track, .switch-knob, .input, .textarea, .check-box { transition: none; }
}
