/* KosherGPT site. Tokens are the app's KosherPalette (KosherGPT/Design/KosherTheme.swift) and its Rubik face.
   Layout: one 1180px column; dark "night" bands (the app icon's ground) alternate with the light "field". */

@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/rubik-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/rubik-var-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/rubik-var-hebrew.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200F, U+20AA; }

:root {
  --field: #ece4d6;
  --shell: #d7cbb7;
  --reading: #fffaf0;
  --ink: #173f3c;
  --muted: #55615d;
  --faint: #6b726f;
  --separator: #d1c8b5;
  --line: rgba(209, 200, 181, 0.72);
  --source: #376f68;
  --hero-a: #376f68;
  --hero-b: #173f3c;
  --frame: #1f5a50;
  --action: #7d3346;
  --action-soft: #b8627a;
  --gold: #d3ab56;
  --gold-text: #8a6a2f;
  --success: #307a53;
  --success-text: #276645; /* on --success-soft */
  --muted-on-shell: #4a5551; /* --muted is 4.0:1 on the shell */
  --success-soft: #e1ece4;
  --warn: #8a5a1e;
  --warn-soft: #f6e7d6;
  --cream: #fffaf0;
  --cream-82: rgba(255, 250, 240, 0.84);
  --night: radial-gradient(ellipse 70% 85% at 72% 60%, #24584e 0%, #11302a 50%, #0b1c18 100%);
  --night-left: radial-gradient(ellipse 60% 80% at 30% 50%, #24584e 0%, #11302a 55%, #0b1c18 100%);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--field); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--source); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
:is(.night, .topbar.on-dark, .glass) :focus-visible { outline-color: var(--gold); }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: 1.0; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.06; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; line-height: 1.3; }
[dir="rtl"] h1, [dir="rtl"] h2 { letter-spacing: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
section[id], [id].anchor { scroll-margin-top: 96px; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; inset-inline-start: 12px; top: 12px; transform: translateY(-200%); z-index: 100; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 12px; text-decoration: none; }
.skip:focus { transform: none; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.lead { font-size: 1.2rem; line-height: 1.55; max-width: 32em; }

/* Night bands */
.night { background: var(--night); color: var(--cream); overflow-x: clip; }
/* Light bands clip sideways too: the Shabbat card's glows reach past the screen edge on phones. */
.day { overflow-x: clip; }
.night.left { background: var(--night-left); }
.night .lead, .night .on-night { color: var(--cream-82); }
.night a:not(.btn) { color: var(--cream); }

/* Header: colourless glass. Text switches between light and dark to match the band under it. */
.topbar { position: sticky; top: 0; z-index: 50; height: 0; }
.bar { max-width: 1204px; margin: 0 auto; padding: 12px 12px 0; }
.bar-inner {
  display: flex; align-items: center; gap: 10px 26px; flex-wrap: wrap;
  min-height: 58px; padding: 8px 10px 8px 16px; border-radius: 18px;
  background: transparent;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  color: var(--cream);
}
.topbar.on-light .bar-inner { color: var(--ink); border-color: rgba(23, 63, 60, 0.12); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; margin-inline-end: auto; }
.brand:hover { color: inherit; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { font-size: 1.2rem; font-weight: 600; }
.brand span { font-size: 0.875rem; opacity: 0.75; }
.nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 0.94rem; }
.nav a { color: inherit; opacity: 0.85; text-decoration: none; }
.nav a:hover { opacity: 1; color: inherit; text-decoration: underline; }

.lang { position: relative; }
.lang summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid currentColor; border-color: rgba(127, 127, 127, 0.35); cursor: pointer; font-size: 0.875rem; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { flex: none; }
.lang-code { display: none; }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 210px; background: var(--reading); color: var(--ink); border-radius: 16px; padding: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); border: 1px solid var(--separator); display: flex; flex-direction: column; }
.lang-menu a { padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; display: flex; justify-content: space-between; gap: 12px; }
.lang-menu a:hover { background: var(--field); color: var(--ink); }
.lang-menu a[aria-current="page"] { background: var(--field); font-weight: 600; }
.lang-menu .soon { margin-top: 4px; padding: 8px 12px 6px; border-top: 1px solid var(--separator); font-size: 0.82rem; color: var(--faint); }

.langhint { background: #0b1c18; color: var(--cream); text-align: center; font-size: 0.875rem; padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
.langhint a { color: var(--cream); font-weight: 600; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 18px; text-decoration: none; font: inherit; font-weight: 600; border: 0; cursor: pointer; }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: #fff; color: var(--ink); }
.btn-teal { background: var(--source); color: var(--cream); }
.btn-teal:hover { background: var(--ink); color: var(--cream); }
.btn-link { padding: 0 8px; font-weight: 500; color: inherit; }
.night .btn-link { color: var(--cream); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Hero */
.hero { padding-top: 96px; }
.hero-grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 40px 48px; }
.hero-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 26px; padding: 56px 0 112px; }
.arch-stage { flex: 0 1 420px; min-width: 0; margin-inline: auto; position: relative; display: flex; flex-direction: column; align-items: center; }
.arch-glow { position: absolute; left: 50%; top: 42%; width: 520px; height: 520px; max-width: 120%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 226, 166, 0.36) 0%, rgba(255, 226, 166, 0) 65%); pointer-events: none; }
.arch { position: relative; width: 400px; max-width: 100%; aspect-ratio: 400 / 520; background: var(--frame); border-radius: 200px 200px 0 0; padding: 22px 22px 0; }
.arch-inner { width: 100%; height: 100%; border-radius: 178px 178px 0 0; background: radial-gradient(ellipse 80% 70% at 50% 28%, #fffcf3 0%, #f6ebd3 65%, #e8d6b2 100%); display: flex; justify-content: center; align-items: flex-end; }
.arch-core { width: 46%; height: 76%; border: 18px solid var(--action); border-bottom: 0; border-radius: 999px 999px 0 0; }
.arch-sill { position: relative; width: 500px; max-width: 115%; height: 30px; background: var(--frame); border-radius: 16px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }

/* Sections */
.section { padding-block: 96px; }
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; }
.split.reverse { flex-wrap: wrap-reverse; }
.split > .text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split > .visual { flex: 0 1 400px; min-width: 0; margin-inline: auto; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.feature-list li { display: flex; gap: 16px; align-items: center; }
.icon-tile { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--reading); border: 1px solid var(--separator); display: grid; place-items: center; color: var(--source); }
.feature-list b { font-weight: 600; }

.num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--source); color: var(--cream); font-size: 0.75rem; font-weight: 600; line-height: 1; }
.num-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.num-list li { display: flex; gap: 12px; align-items: baseline; }

/* iPhone frames around real screenshots */
.phone { position: relative; width: 300px; max-width: 100%; border-radius: 54px; padding: 11px; background: linear-gradient(150deg, #33403c 0%, #141c1a 55%, #2b3633 100%); box-shadow: 0 34px 70px rgba(23, 63, 60, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1); margin-inline: auto; }
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; background: #1e2725; }
.phone::before { left: -3px; top: 164px; height: 56px; border-radius: 2px 0 0 2px; }
.phone::after { right: -3px; top: 150px; height: 84px; border-radius: 0 2px 2px 0; }
.phone .screen { border-radius: 43px; overflow: hidden; background: var(--field); }
.phone .screen img { width: 100%; }
.phone.sm { width: 236px; border-radius: 44px; padding: 9px; }
.phone.sm .screen { border-radius: 35px; }
.phone-pair { display: flex; justify-content: center; align-items: flex-end; }
.phone-pair .phone { margin: 0; }
.phone-pair .phone:first-child { transform: rotate(-4deg); margin-inline-end: -40px; z-index: 1; }
.phone-pair .phone:last-child { transform: rotate(3deg) translateY(-24px); z-index: 2; }

/* Scanner demo */
.scanner { display: flex; flex-direction: column; gap: 14px; }
.viewfinder { position: relative; height: 360px; border-radius: 30px; overflow: hidden; background: radial-gradient(ellipse 70% 70% at 50% 45%, #2e6157 0%, #163a34 60%, #0c211d 100%); box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.08); }
.pack { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -56%); width: 160px; height: 210px; border-radius: 18px 18px 26px 26px; background: #f3e8d2; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 22px 16px 16px; color: var(--ink); text-align: center; }
.pack b { font-size: 0.94rem; line-height: 1.25; }
.bars { width: 100%; height: 44px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 9px, var(--ink) 9px 10px, transparent 10px 13px); }
.pack small { font-size: 0.7rem; letter-spacing: 0.08em; direction: ltr; }
.corner { position: absolute; width: 40px; height: 40px; border: 0 solid var(--gold); }
.corner.tl { left: 21%; top: 15%; border-top-width: 4px; border-left-width: 4px; border-radius: 12px 0 0 0; }
.corner.tr { right: 21%; top: 15%; border-top-width: 4px; border-right-width: 4px; border-radius: 0 12px 0 0; }
.corner.bl { left: 21%; bottom: 21%; border-bottom-width: 4px; border-left-width: 4px; border-radius: 0 0 0 12px; }
.corner.br { right: 21%; bottom: 21%; border-bottom-width: 4px; border-right-width: 4px; border-radius: 0 0 12px 0; }
.beam { position: absolute; left: 19%; right: 19%; top: 46%; height: 3px; border-radius: 2px; background: #e8c877; box-shadow: 0 0 18px #e8c877; }
@media (prefers-reduced-motion: no-preference) {
  .beam { animation: kg-beam 2.6s ease-in-out infinite; }
  @keyframes kg-beam { 0%, 100% { top: 22%; } 50% { top: 70%; } }
}
.result { margin: -60px 16px 0; position: relative; background: var(--reading); color: var(--ink); border-radius: 24px; padding: 18px 20px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 12px; border: 1px solid var(--line); overflow-anchor: none; }
/* The live head and verdict share their cells with an invisible copy of every state: the card keeps
   the height of its longest state, and the verdict takes up what a shorter state leaves free. The card
   never anchors the scroll either, so a head that wraps onto a second line cannot move the page. */
.result > .result-head { grid-area: 1 / 1; }
.result > .verdict { grid-area: 2 / 1; }
.result-sizer { grid-area: 1 / 1 / 3 / 2; display: flex; flex-direction: column; gap: 12px; visibility: hidden; }
.result-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.result-head b { font-size: 1.06rem; }
.result-head small { color: var(--faint); direction: ltr; }
.verdict { border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.verdict b { font-weight: 600; }
.verdict span { font-size: 0.94rem; color: var(--muted); }
.tone-ok { background: var(--success-soft); } .tone-ok b { color: var(--success-text); }
.tone-neutral { background: var(--field); } .tone-neutral b { color: var(--ink); }
.tone-warn { background: var(--warn-soft); } .tone-warn b { color: var(--warn); }
.states { display: flex; flex-wrap: wrap; gap: 8px; }
.states button { min-height: 44px; padding: 0 16px; border-radius: 14px; font: inherit; font-size: 0.94rem; cursor: pointer; background: transparent; color: inherit; border: 1px solid rgba(127, 127, 127, 0.45); }
.states button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.day .states button[aria-pressed="true"] { background: var(--source); color: var(--cream); border-color: var(--source); }
.tag { align-self: flex-start; font-size: 0.82rem; font-weight: 600; color: var(--gold); border: 1px solid rgba(211, 171, 86, 0.6); border-radius: 999px; padding: 3px 12px; }

/* Shabbat card */
.shabbat-card { position: relative; border-radius: 26px; color: var(--cream); padding: 26px; width: 100%; }
.shabbat-card .lift { display: flex; flex-direction: column; gap: 18px; }

/* Glass with a 3D tilt (G1 on the design canvas): the pane turns towards the cursor, a faint
   reflection drifts against the tilt and the edge facing a fixed light, up and to the left, lights up.
   Warm glows behind it stand for candle light, so the glass has something to blur. */
.glass-stage { position: relative; perspective: 900px; padding: 28px 0; }
.glow { position: absolute; border-radius: 50%; pointer-events: none; }
.glow-a { width: 220px; height: 220px; left: -4%; top: -6%; background: radial-gradient(circle, rgba(211, 171, 86, 0.75), rgba(211, 171, 86, 0) 70%); }
.glow-b { width: 260px; height: 260px; right: -8%; bottom: -14%; background: radial-gradient(circle, rgba(184, 98, 122, 0.5), rgba(184, 98, 122, 0) 70%); }
.glow-c { width: 200px; height: 200px; right: 22%; top: -16%; background: radial-gradient(circle, rgba(55, 111, 104, 0.55), rgba(55, 111, 104, 0) 70%); }
.glass { background: linear-gradient(135deg, rgba(40, 86, 80, 0.9), rgba(23, 63, 60, 0.94)); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 24px 50px rgba(23, 63, 60, 0.28); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.glass.tilting { transition: transform 0.08s linear; }
.glass .lift { transform: translateZ(30px); }
.glass .band { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.07) 46%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.07) 54%, rgba(255, 255, 255, 0) 65%); background-size: 260% 100%; background-position: var(--sx, 50%) 0; opacity: var(--glare, 0.55); transition: background-position 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease; }
.glass .rim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; background: linear-gradient(var(--ang, 135deg), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.1) 35%, rgba(255, 255, 255, 0.04) 65%, rgba(255, 255, 255, 0.3)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.glass.tilting .band { transition: background-position 0.12s linear, opacity 0.4s ease; }
@media (prefers-reduced-motion: reduce) { .glass, .glass.tilting { transform: none; transition: none; } }
.shabbat-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.82rem; }
.shabbat-top span:first-child { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 250, 240, 0.92); }
.pill { background: rgba(255, 250, 240, 0.14); border-radius: 999px; padding: 3px 10px; }
.times { display: flex; gap: 12px; }
.times div { flex: 1; background: rgba(255, 250, 240, 0.1); border-radius: 18px; padding: 14px 16px; }
.times span { font-size: 0.875rem; color: rgba(255, 250, 240, 0.95); }
.times b { display: block; font-size: 2.1rem; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.reminder { display: flex; align-items: center; gap: 10px; font-size: 0.94rem; color: rgba(255, 250, 240, 0.92); }

/* Comparison */
.table-box { overflow-x: auto; background: var(--reading); border: 1px solid var(--separator); border-radius: var(--radius); }
.compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { padding: 14px 20px; text-align: start; border-bottom: 1px solid #e6decc; }
.compare thead th { font-weight: 500; color: var(--muted); border-bottom-color: var(--separator); }
.compare thead th.us { background: var(--source); color: var(--cream); font-weight: 600; border-bottom-color: var(--source); }
.compare td.us { background: #e9f1ee; }
.compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--success); font-weight: 600; }
.compare .no, .compare .partial { color: var(--faint); }

/* Live chat (the Ask board): a picked question is typed into the phone's composer and sent,
   KosherGPT answers word by word, and a citation chip opens the sources in a bottom sheet. */
.ask { background: var(--shell); }
.ask .muted { color: var(--muted-on-shell); }
.ask-inner { max-width: 1180px; margin-inline: auto; padding: 96px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px 72px; }
.ask-head { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.chat-phone { flex: 0 0 auto; width: 360px; max-width: 100%; height: 700px; margin-inline: auto; border-radius: 58px; padding: 12px; background: linear-gradient(150deg, #33403c 0%, #141c1a 55%, #2b3633 100%); box-shadow: 0 40px 80px rgba(23, 63, 60, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1); }
.chat-screen { position: relative; height: 100%; border-radius: 46px; overflow: hidden; background: var(--field); display: flex; flex-direction: column; }
.chat-island { flex: none; width: 104px; height: 30px; margin: 12px auto 0; border-radius: 999px; background: #000; }
.chat-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.chat-back { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--separator); background: var(--reading); display: grid; place-items: center; }
[dir="rtl"] .chat-back svg { transform: scaleX(-1); }
.chat-bar img { width: 26px; height: 26px; border-radius: 7px; }
.chat-thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 18px; }
.chat-thread::-webkit-scrollbar { display: none; }
.ask-empty { margin-block: auto; text-align: center; color: var(--muted); font-size: 0.94rem; padding-inline: 20px; }
.qa { display: flex; flex-direction: column; gap: 10px; }
.bubble { align-self: flex-end; max-width: 82%; background: var(--reading); border: 1px solid var(--line); border-radius: 20px; border-end-end-radius: 6px; padding: 9px 14px; font-size: 0.94rem; }
.ai { display: flex; flex-direction: column; gap: 8px; }
.ai-label { display: flex; align-items: center; gap: 6px; color: var(--source); font-weight: 600; font-size: 0.8rem; }
.ai-body { display: flex; flex-direction: column; gap: 8px; }
.ai p { font-size: 0.94rem; line-height: 1.55; }
.cite { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-start: 3px; border-radius: 50%; border: 0; background: var(--source); color: var(--cream); font: inherit; font-size: 0.68rem; font-weight: 600; cursor: pointer; vertical-align: 1px; }
.dots { display: none; gap: 5px; padding: 4px 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--source); opacity: 0.35; }
.qa.thinking .dots { display: flex; }
.qa.thinking .ai-body { display: none; }
.sources { background: var(--reading); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
html.js .chat-thread .sources { display: none; }
.sources-title { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.source { display: flex; gap: 12px; align-items: flex-start; font-size: 0.94rem; }
.source div { display: flex; flex-direction: column; gap: 2px; }
.source div > span { color: var(--muted); }
.source a { font-weight: 500; }
.chat-foot { flex: none; padding: 8px 14px 22px; display: flex; flex-direction: column; gap: 10px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button { min-height: 40px; padding: 8px 14px; border-radius: 20px; border: 1px solid rgba(55, 111, 104, 0.32); background: var(--reading); color: var(--ink); font: inherit; font-size: 0.84rem; line-height: 1.3; text-align: start; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.suggest button:hover { background: #fff; }
.suggest button:active { transform: scale(0.96); }
.composer { display: flex; align-items: flex-end; gap: 8px; min-height: 52px; padding: 6px; padding-inline-start: 16px; border-radius: 26px; background: rgba(255, 250, 240, 0.82); border: 1px solid rgba(209, 200, 181, 0.95); box-shadow: 0 8px 20px rgba(23, 63, 60, 0.1); }
.composer-text { flex: 1; min-width: 0; padding-block: 9px; font-size: 0.94rem; line-height: 1.35; color: var(--faint); }
.composer.is-typing .composer-text, .composer.is-sending .composer-text { color: var(--ink); }
.composer.is-typing .composer-text::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 1px; background: var(--source); vertical-align: -0.2em; }
.send { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(55, 111, 104, 0.45); color: var(--cream); transition: background 0.2s ease; }
.composer.is-typing .send, .composer.is-sending .send { background: var(--source); }
.sheet { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-dim { position: absolute; inset: 0; background: rgba(23, 63, 60, 0.32); }
.sheet-card { position: relative; max-height: 72%; overflow-y: auto; background: var(--reading); border-radius: 30px 30px 0 0; padding: 10px 20px 30px; box-shadow: 0 -10px 30px rgba(23, 63, 60, 0.18); }
.sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(116, 123, 120, 0.45); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--field); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-body .source { padding-bottom: 14px; border-bottom: 1px solid #e6decc; }
.sheet-body .source:last-child { padding-bottom: 0; border-bottom: 0; }
.sheet-body .source b { font-size: 1.02rem; font-weight: 600; }
.sheet-body .source a { align-self: flex-start; margin-top: 6px; padding: 8px 12px; border-radius: 12px; background: var(--field); font-weight: 600; text-decoration: none; }
html:not(.js) .js-only { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Gradient callout */
.callout { position: relative; overflow: hidden; border-radius: 30px; background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%); color: var(--cream); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; gap: 28px 56px; }
.callout .text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.callout p { color: rgba(255, 250, 240, 0.88); max-width: 34em; }
.callout h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
.mini-arch { flex: 0 0 190px; height: 230px; margin-inline: auto; display: flex; align-items: flex-end; justify-content: center; }
.mini-arch div { width: 170px; height: 220px; border: 12px solid rgba(255, 250, 240, 0.92); border-bottom: 0; border-radius: 999px 999px 0 0; display: flex; align-items: flex-end; justify-content: center; }
.mini-arch div div { width: 78px; height: 140px; border: 10px solid var(--action-soft); border-bottom: 0; }
.checks { list-style: none; display: flex; flex-direction: column; gap: 12px; flex: 1 1 420px; min-width: 0; }
.checks li { display: flex; gap: 12px; }
.checks li::before { content: "✓"; color: var(--gold); font-weight: 700; }

/* Cards and steps */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--reading); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; gap: 16px; }
.card div { display: flex; flex-direction: column; gap: 6px; }
.card p { color: var(--muted); font-size: 1rem; }
.card .num { width: 30px; height: 30px; font-size: 0.875rem; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 2px solid var(--source); }
.steps li b::before { content: counter(step) ". "; }
.steps li span { font-size: 0.94rem; color: var(--muted); }
.faq { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.faq div { background: var(--reading); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; }
.faq dt { font-weight: 600; font-size: 1.1rem; }
.faq dd { margin: 0; color: var(--muted); }

/* Forms */
.form-box { background: var(--reading); border: 1px solid var(--line); border-radius: 26px; padding: clamp(20px, 4vw, 36px); box-shadow: 0 18px 40px rgba(23, 63, 60, 0.08); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.94rem; font-weight: 500; }
.field label small { font-weight: 400; color: var(--faint); }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--separator); border-radius: 14px; padding: 12px 14px; min-height: 48px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--source); outline-offset: 1px; background: #fff; }
.field [aria-invalid="true"] { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); }
.consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 0.94rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--source); flex: none; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-status { font-size: 0.94rem; color: var(--action); }
.full-row { grid-column: 1 / -1; }
.captcha:empty { display: none; }
.check-hint { color: var(--source); font-weight: 500; }
.trap { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.form-done { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.form-done b { font-size: 1.3rem; color: var(--success); }

.center { text-align: center; align-items: center; }
.beta { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: 18px; }
.beta .form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.footer { background: var(--shell); }
.footer .wrap { padding-block: 28px 40px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; font-size: 0.875rem; color: var(--muted-on-shell); }
.footer .brand { color: var(--ink); }
.footer .brand img { width: 26px; height: 26px; border-radius: 7px; }

.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding-block: 140px 80px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding-block: 64px; }
  .hero-text { padding: 32px 0 48px; }
  .arch-glow { width: 360px; height: 360px; }
  .nav { display: none; }
  .brand span { display: none; }
  .lang-name { display: none; }
  .lang-code { display: inline; }
  .bar-inner { flex-wrap: nowrap; }
  .corner.tl, .corner.bl { left: 12%; }
  .corner.tr, .corner.br { right: 12%; }
  .beam { left: 10%; right: 10%; }
  .form, .beta .form { grid-template-columns: minmax(0, 1fr); }
  .phone-pair .phone.sm { width: 46%; }
  .phone-pair .phone:first-child { margin-inline-end: -12%; }
  .ask-inner { padding: 64px 16px; }
  .wrap { padding-inline: 16px; }
}
@media (max-width: 420px) {
  .btn { width: 100%; }
  .actions .btn-link { width: auto; }
  .viewfinder { height: 320px; }
  .chat-phone { width: 100%; height: 640px; border-radius: 50px; padding: 10px; }
  .chat-screen { border-radius: 40px; }
}

/* ---- Motion: E1 focus-in, E6 streamed answer, E10 glass button ----------------------------- */

/* E10 (after resend.com): glass at rest, filled with light and softly glowing on hover. */
.btn-glass { color: var(--cream); border: 2px solid rgba(255, 255, 255, 0.08); background: linear-gradient(104deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12)); -webkit-backdrop-filter: blur(25px); backdrop-filter: blur(25px); transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.btn-glass:hover, .btn-glass:focus-visible { background: var(--cream); color: #0b1c18; border-color: var(--cream); box-shadow: 0 0 4px rgba(255, 250, 240, 0.45), 0 0 14px rgba(255, 250, 240, 0.28), 0 0 32px rgba(255, 250, 240, 0.2); }

@keyframes kg-word { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
@keyframes kg-pop { 0% { opacity: 0; transform: scale(0.4); } 70% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: none; } }
@keyframes kg-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes kg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes kg-sent { 0% { opacity: 0; transform: translateY(44px) scale(0.94); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes kg-dot { 0%, 80%, 100% { transform: none; opacity: 0.35; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes kg-press { 0%, 100% { transform: none; } 40% { transform: scale(0.84); } }
@keyframes kg-caret { 50% { opacity: 0; } }
@keyframes kg-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes kg-sheet-out { from { transform: none; } to { transform: translateY(100%); } }
@keyframes kg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kg-fade-out { from { opacity: 1; } to { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  /* E1 (after linear.app): blocks rise out of a blur and sharpen as they reach the screen. */
  html.js main :is(h2, .lead, .actions, .visual, .arch-stage, .tag, .states, .feature-list li, .num-list li, .card, .steps li, .faq > div, .table-box, .chat-phone, .callout, .form-box, .checks li),
  html.js .words .rw {
    opacity: 0; filter: blur(14px); transform: translateY(14px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--d, 0ms);
  }
  html.js .words .rw { display: inline-block; }
  html.js main :is(h2, .lead, .actions, .visual, .arch-stage, .tag, .states, .feature-list li, .num-list li, .card, .steps li, .faq > div, .table-box, .chat-phone, .callout, .form-box, .checks li).is-in,
  html.js .words.is-in .rw { opacity: 1; filter: none; transform: none; }

  /* The live chat: the question slides up from the composer, KosherGPT thinks, and then
     E6 (after cursor.com) writes the answer word by word, its citation chips last. */
  .chat-thread { scroll-behavior: smooth; }
  .qa.streaming .bubble { animation: kg-sent 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.05) both; }
  .qa.streaming .ai-label { animation: kg-fade 0.3s ease 0.15s both; }
  .qa.thinking .dots i { animation: kg-dot 1s infinite; }
  .qa.thinking .dots i:nth-child(2) { animation-delay: 0.15s; }
  .qa.thinking .dots i:nth-child(3) { animation-delay: 0.3s; }
  .qa.answering .sw { animation: kg-word 0.45s ease both; animation-delay: calc(var(--i) * 45ms); }
  .qa.answering .cite { animation: kg-pop 0.4s ease both; animation-delay: calc(var(--i) * 45ms + 100ms); }
  .suggest.is-in { animation: kg-in 0.35s ease both; }
  .composer.is-typing .composer-text::after { animation: kg-caret 0.8s steps(1) infinite; }
  .composer.is-sending .send { animation: kg-press 0.3s ease both; }
  .sheet.is-open .sheet-card { animation: kg-sheet 0.38s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
  .sheet.is-open .sheet-dim { animation: kg-fade 0.3s ease both; }
  .sheet.is-closing .sheet-card { animation: kg-sheet-out 0.28s ease both; }
  .sheet.is-closing .sheet-dim { animation: kg-fade-out 0.28s ease both; }
}
