/* rooqi.ai — one stylesheet for every generated page. Logical properties keep RTL correct. */
:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --card: #fbf8f2;
  --ink: #1c1a17;
  --ink-2: #47423a;
  --muted: #7a7366;
  --line: rgba(28, 26, 23, .12);
  --accent: #5a5ed8;
  --accent-2: #8d90f2;
  --accent-ink: #3c3fb0;
  --warm: #b0502f;
  --night: #121110;
  --radius: 18px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --font-display: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
:lang(zh-Hans) { --font-sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif; }
:lang(zh-Hant) { --font-sans: -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; --font-display: "Songti TC", "Noto Serif TC", "Source Han Serif TC", serif; }
:lang(ja) { --font-sans: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; --font-display: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }
:lang(ko) { --font-sans: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; --font-display: "AppleMyungjo", "Noto Serif KR", serif; }
:lang(ar) { --font-sans: "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Naskh Arabic", Tahoma, sans-serif; --font-display: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", serif; }
:lang(hi) { --font-sans: -apple-system, "Kohinoor Devanagari", "Nirmala UI", "Noto Sans Devanagari", sans-serif; --font-display: "Kohinoor Devanagari", "Noto Serif Devanagari", serif; }
:lang(th) { --font-sans: -apple-system, "Thonburi", "Leelawadee UI", "Noto Sans Thai", sans-serif; --font-display: "Thonburi", "Noto Serif Thai", serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--font-sans); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:lang(zh-Hans) body, :lang(zh-Hant) body, :lang(ja) body, :lang(ko) body { line-height: 1.8; }
:lang(th) body, :lang(hi) body { line-height: 1.85; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
:lang(de) h1, :lang(de) h2, :lang(ru) h1, :lang(ru) h2 { hyphens: auto; }
p { margin: 0 0 1em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 860px; }
.display { font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 5.2vw, 64px); letter-spacing: -.02em; line-height: 1.06; }
:lang(zh-Hans) .display, :lang(zh-Hant) .display, :lang(ja) .display, :lang(ko) .display { letter-spacing: 0; line-height: 1.25; }
:lang(ar) .display, :lang(hi) .display, :lang(th) .display { letter-spacing: 0; line-height: 1.35; }
.kicker, .eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--warm); font-weight: 600; margin-bottom: 14px; }
:lang(ar) .kicker, :lang(ar) .eyebrow { letter-spacing: 0; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 62ch; }
.fineprint { font-size: 14px; color: var(--muted); }
.center-note { text-align: center; color: var(--ink-2); margin-top: 40px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; transition: transform .2s, background .2s, color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.35); }
.btn-light { background: #fff; color: var(--ink); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; background: var(--ink); color: #fff; }
.btn-small:hover { color: #fff; background: var(--accent-ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.cta-row.center { justify-content: center; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
[dir="rtl"] .link-arrow::after { content: " ←"; }
.chip { font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(20,18,16,.45); color: #f3eee6; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; }
.chip:hover { background: rgba(20,18,16,.7); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 12px var(--gutter); background: rgba(244, 239, 230, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); transition: background .6s, color .6s, border-color .6s; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: inherit; text-decoration: none; letter-spacing: -.01em; }
.brand img { border-radius: 0; object-fit: contain; }
.site-nav { margin-inline-start: 8px; flex: 1; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 15px; opacity: .82; }
.site-nav a:hover, .site-nav a[aria-current] { opacity: 1; background: rgba(28,26,23,.06); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { background: rgba(28,26,23,.06); }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(20, 16, 10, .16); columns: 2; column-gap: 4px; width: max-content; max-width: calc(100vw - 32px); z-index: 60; }
.lang-menu li { break-inside: avoid; }
.lang-menu a { display: block; padding: 7px 12px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 14px; white-space: nowrap; }
.lang-menu a:hover { background: var(--paper-2); }
.lang-menu a[aria-current] { font-weight: 700; background: var(--paper-2); }
.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: inherit; position: relative; }
.nav-toggle span[aria-hidden]::before, .nav-toggle span[aria-hidden]::after { content: ""; position: absolute; left: 11px; right: 11px; height: 1.6px; background: currentColor; transition: transform .25s; }
.nav-toggle span[aria-hidden]::before { top: 16px; }
.nav-toggle span[aria-hidden]::after { top: 25px; }
.nav-toggle[aria-expanded="true"] span[aria-hidden]::before { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span[aria-hidden]::after { transform: translateY(-4.5px) rotate(-45deg); }
.lang-suggest { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 10px var(--gutter); background: var(--ink); color: #fff; font-size: 14px; }
.lang-suggest[hidden] { display: none; }
.lang-suggest a, .lang-suggest button { color: #fff; font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-decoration: underline; }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: 63px 0 auto 0; margin: 0; background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 18px; display: none; box-shadow: 0 30px 60px rgba(0,0,0,.12); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { font-size: 18px; padding: 12px; }
  .lang-menu summary span { display: none; }
}
@media (max-width: 420px) { .header-actions .btn-small { display: none; } }

/* ---------- hero ---------- */
.page-home .site-header { position: fixed; inset-inline: 0; }
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 104px 0 64px; overflow: hidden; background: radial-gradient(120% 90% at 85% 40%, #fbf8f2 0%, var(--paper) 55%, var(--paper-2) 100%); isolation: isolate; }
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { overflow-wrap: normal; text-wrap: balance; font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 4.9vw, 74px); line-height: 1.02; letter-spacing: -.025em; margin-bottom: 22px; }
:lang(zh-Hans) .hero h1, :lang(zh-Hant) .hero h1, :lang(ja) .hero h1, :lang(ko) .hero h1 { letter-spacing: .01em; line-height: 1.2; font-size: clamp(40px, 5.6vw, 76px); }
:lang(ar) .hero h1, :lang(hi) .hero h1, :lang(th) .hero h1 { letter-spacing: 0; line-height: 1.3; font-size: clamp(36px, 5vw, 68px); }
:lang(de) .hero h1, :lang(ru) .hero h1, :lang(fr) .hero h1, :lang(pt-BR) .hero h1, :lang(pt-PT) .hero h1, :lang(es) .hero h1, :lang(it) .hero h1, :lang(vi) .hero h1, :lang(id) .hero h1, :lang(tr) .hero h1 { font-size: clamp(34px, 4.1vw, 62px); overflow-wrap: break-word; hyphens: auto; }
.hero .lead { margin-bottom: 0; }
.hero-status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #d29a2e; box-shadow: 0 0 0 4px rgba(210,154,46,.18); flex: none; }
.hero-visual { position: relative; }

/* app mock: the stroke in here is where the intro lands */
.app-frame { margin: 0; border-radius: 20px; background: var(--card); box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 40px 90px -30px rgba(40, 30, 15, .35), 0 12px 30px -12px rgba(40,30,15,.2); border: 1px solid rgba(28,26,23,.08); overflow: hidden; transform-origin: 0 0; will-change: transform; }
.app-chrome { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); direction: ltr; }
.app-chrome i { width: 11px; height: 11px; border-radius: 50%; background: #e4ddcf; }
.app-chrome span { margin-inline-start: 10px; font-weight: 600; }
.app-body { display: grid; grid-template-columns: 28% 1fr; min-height: 440px; }
.app-side { background: #f1ece2; border-inline-end: 1px solid var(--line); padding: 16px 14px; font-size: 12.5px; color: var(--ink-2); }
.app-side-brand { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink); margin-bottom: 14px; font-size: 13.5px; }
.app-side-brand img { border-radius: 5px; }
.app-side-item { margin: 0 0 6px; padding: 5px 8px; border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-side-item.is-active { background: rgba(90,94,216,.12); color: var(--accent-ink); font-weight: 600; }
.app-side-label { margin: 16px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.app-page { position: relative; padding: 26px 28px 22px; background: linear-gradient(#fdfbf7, #fbf8f2); background-image: repeating-linear-gradient(transparent 0 31px, rgba(90, 94, 216, .07) 31px 32px); }
.app-page-meta { font-size: 11.5px; color: var(--muted); margin: 0 0 6px; }
.app-page-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 2.1vw, 28px); margin: 0 0 4px; }
.app-ink { width: 100%; height: auto; margin: 0 0 10px; overflow: visible; }
.app-ink path { fill: #2a2d6e; }
.app-line { font-size: 14.5px; margin: 0 0 4px; color: var(--ink); }
.app-line-soft { color: var(--ink-2); }
.app-cards { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 18px; }
.app-card { border-radius: 12px; padding: 10px 12px; font-size: 11.5px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.app-card-audio span { display: block; margin-bottom: 6px; }
.wave { display: flex; align-items: center; gap: 2.5px; height: 26px; }
.wave i { flex: 1; border-radius: 2px; background: #c98b6f; height: 30%; }
.wave i:nth-child(3n) { height: 70%; } .wave i:nth-child(4n+1) { height: 50%; } .wave i:nth-child(5n+2) { height: 90%; } .wave i:nth-child(7n) { height: 40%; }
.app-card-ask { display: flex; align-items: center; background: linear-gradient(135deg, rgba(141,144,242,.18), rgba(90,94,216,.1)); color: var(--accent-ink); font-weight: 600; }

/* hero mock extras */
.mock-note { display: flex; gap: 8px; align-items: baseline; margin: 14px 4px 0; font-size: 13px; color: var(--muted); }
.app-chrome .tools { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }
.app-chrome .tools u { display: block; text-decoration: none; }
.t-pen { width: 5px; height: 16px; border-radius: 3px 3px 1px 1px; background: #2a2d6e; }
.t-hl { width: 7px; height: 16px; border-radius: 2px; background: #e8c547; }
.t-lasso { width: 14px; height: 10px; border: 1.5px dashed #8a8478; border-radius: 50%; }
.t-text { font: 600 12px/1 var(--font-display); color: var(--ink-2); }
.t-rec { width: 10px; height: 10px; border-radius: 50%; background: #c0503a; box-shadow: 0 0 0 3px rgba(192,80,58,.18); }

/* intro stage */
.intro { display: none; }
.intro-controls { display: none; }
.js-intro .intro { display: block; position: absolute; inset: 0; z-index: 3; background: #0d0c0b; transition: opacity 1.1s ease; }
.js-intro .intro-controls { display: flex; position: absolute; z-index: 6; inset-inline-start: var(--gutter); bottom: calc(18px + env(safe-area-inset-bottom)); gap: 8px; flex-wrap: wrap; }
.intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-stroke { position: absolute; left: 50%; top: 50%; width: min(78vw, 980px); transform: translate(-50%, -50%); overflow: visible; pointer-events: none; }
.intro-stroke [data-reveal-path] { fill: none; stroke: #fff; stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro-eras { position: absolute; inset-inline-start: var(--gutter); top: 50%; transform: translateY(-50%); list-style: none; margin: 0; padding: 0; color: #efe7d8; pointer-events: none; }
.intro-eras li { position: absolute; top: 0; inset-inline-start: 0; opacity: 0; transform: translateY(14px); transition: opacity .45s, transform .9s; white-space: nowrap; }
.intro-eras li.on { opacity: 1; transform: none; transition-delay: .45s; }
.intro-eras b { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 4.4vw, 58px); line-height: 1.1; text-shadow: 0 2px 30px rgba(0,0,0,.55); }
.intro-eras span { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .78; margin-top: 6px; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
:lang(ar) .intro-eras span { letter-spacing: 0; }
.intro-eras li[data-era="paper"], .intro-eras li[data-era="print"], .intro-eras li[data-era="papyrus"] { color: #2a241b; }
.intro-eras li[data-era="paper"] b, .intro-eras li[data-era="print"] b, .intro-eras li[data-era="papyrus"] b, .intro-eras li[data-era="paper"] span, .intro-eras li[data-era="print"] span, .intro-eras li[data-era="papyrus"] span { text-shadow: 0 1px 18px rgba(255,250,240,.7); }
.intro-eras li[data-era="rooqi"] { display: none; }
.intro-line { position: absolute; bottom: 18%; width: 100%; text-align: center; color: #efe7d8; font-family: var(--font-display); font-size: clamp(18px, 2vw, 26px); opacity: 0; transition: opacity 1.2s; margin: 0; padding-inline: var(--gutter); text-shadow: 0 1px 20px rgba(0,0,0,.6); }
.intro-line.on { opacity: .92; }
.chip-replay { display: none; }
.intro-unavailable .chip-replay { display: none !important; }
.intro-timeline { position: absolute; inset-inline: max(var(--gutter), 22%) max(var(--gutter), 8%); bottom: calc(26px + env(safe-area-inset-bottom)); height: 34px; pointer-events: none; color: #efe7d8; }
.tl-track { position: absolute; inset-inline: 0; top: 6px; height: 1px; background: rgba(239,231,216,.28); }
.tl-progress { position: absolute; inset: 0; background: #efe7d8; transform-origin: 0 50%; transform: scaleX(0); }
[dir="rtl"] .tl-progress { transform-origin: 100% 50%; }
.intro-timeline ol { list-style: none; margin: 0; padding: 0; }
.intro-timeline li { position: absolute; top: 0; width: 0; }
.intro-timeline li::before { content: ""; position: absolute; top: 3px; inset-inline-start: -3.5px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(239,231,216,.6); background: #0d0c0b; transition: background .4s, transform .4s; }
.intro-timeline li.on::before { background: #efe7d8; transform: scale(1.15); }
.intro-timeline span { position: absolute; top: 16px; inset-inline-start: 0; transform: translateX(-50%); font-size: 11px; letter-spacing: .06em; white-space: nowrap; opacity: .55; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
[dir="rtl"] .intro-timeline span { transform: translateX(50%); }
.intro-timeline li.on span { opacity: 1; }
.intro-timeline li:last-child span { font-weight: 600; }
@media (max-width: 760px) { .intro-timeline { inset-inline: var(--gutter); bottom: calc(66px + env(safe-area-inset-bottom)); } .intro-timeline span { display: none; } .intro-timeline li.on:not(:has(~ li.on)) span { display: block; opacity: 1; } }
.intro-done .chip-replay { display: inline-flex; background: rgba(28,26,23,.06); color: var(--ink); border-color: var(--line); }
.intro-done [data-intro-skip], .intro-done [data-intro-pause] { display: none; }

/* states driven by intro.js */
.js-intro.intro-playing .hero-copy > *, .js-intro.intro-playing .hero-visual { opacity: 0; }
.js-intro.intro-playing .site-header { background: rgba(14,13,12,.35); color: #f3eee6; border-color: rgba(255,255,255,.08); }
.js-intro.intro-playing .site-header .btn-small { background: #f3eee6; color: var(--ink); }
.js-intro.intro-landing .hero-visual { opacity: 1; }
.js-intro.intro-landing .intro { opacity: 0; pointer-events: none; }
.js-intro.intro-landing .hero-copy > * { opacity: 1; transform: none; transition: opacity .9s ease 1.05s, transform 1.1s cubic-bezier(.2,.7,.2,1) 1.05s; }
.js-intro.intro-landing .hero-copy > :nth-child(2) { transition-delay: 1.30s; }
.js-intro.intro-landing .hero-copy > :nth-child(3) { transition-delay: 1.50s; }
.js-intro.intro-landing .hero-copy > :nth-child(4) { transition-delay: 1.65s; }
.js-intro.intro-landing .hero-copy > :nth-child(5) { transition-delay: 1.80s; }
.js-intro.intro-playing .hero-copy > * { transform: translateY(16px); }
.intro-done .intro { display: none !important; }
/* While the intro plays, the stage is exactly one screen so its controls are always reachable. */
.js-intro.intro-playing:not(.intro-landing) .hero { height: 100vh; height: 100svh; min-height: 0; }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.story { background: var(--paper); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 56px; }
.story-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px 26px 30px; }
.story-card h3 { font-size: 22px; }
.story-card p { color: var(--ink-2); }
.story-art { aspect-ratio: 16 / 9; border-radius: 16px; background: var(--paper-2); margin-bottom: 24px; display: grid; place-items: center; overflow: hidden; }
.story-art svg { width: 92%; }
.sa-paper { fill: #fffdf8; stroke: rgba(28,26,23,.08); }
.sa-card { fill: #fff; stroke: rgba(28,26,23,.1); }
.sa-ink { fill: none; stroke: #2a2d6e; stroke-width: 4; stroke-linecap: round; }
.sa-rule { fill: none; stroke: rgba(28,26,23,.16); stroke-width: 3; stroke-linecap: round; }
.sa-wave rect { fill: #c98b6f; }
.sa-hl { fill: rgba(232, 197, 71, .55); }
.sa-node { fill: rgba(90,94,216,.16); stroke: var(--accent); stroke-width: 1.5; }
.sa-ask { fill: rgba(90,94,216,.12); stroke: rgba(90,94,216,.35); }
.sa-ask-t { fill: var(--accent-ink); font-size: 16px; }
.sa-ask-l { stroke: rgba(60,63,176,.45); stroke-width: 3; stroke-linecap: round; }
.points { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
.points li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; gap: 10px; }
.points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: .7em; flex: none; }
.story .fineprint { margin-top: 28px; }

.real { background: radial-gradient(90% 70% at 70% 30%, #f7f2e9 0%, var(--paper-2) 70%); overflow: hidden; }
.real-copy { max-width: 720px; }
.real-stage { position: relative; margin-top: 56px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 24px; perspective: 2000px; }
.real-stage figure { margin: 0; }
.real-stage figcaption { position: relative; z-index: 3; font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-top: 12px; max-width: 40ch; width: fit-content; padding: 6px 10px; border-radius: 10px; background: rgba(247,242,233,.92); box-shadow: 0 1px 0 rgba(28,26,23,.06); }
.shot img { width: 100%; height: auto; display: block; }
.shot-mac { grid-column: 2 / 11; grid-row: 1; transform: rotateY(-6deg) rotateX(2deg); transform-origin: 60% 50%; }
.mac-frame { border-radius: 14px; overflow: hidden; border: 10px solid #1d1c1a; border-bottom-width: 14px; box-shadow: 0 60px 100px -40px rgba(40,30,15,.45), 0 20px 40px -20px rgba(40,30,15,.25); background: #fff; }
.shot-ipad { grid-column: 1 / 4; grid-row: 1; align-self: end; z-index: 2; margin-bottom: -90px !important; transform: translateZ(80px) rotateY(10deg); }
.shot-ipad2 { grid-column: 10 / 13; grid-row: 1; align-self: start; z-index: 2; margin-top: -40px !important; transform: translateZ(60px) rotateY(-12deg); }
.ipad-frame { border-radius: 22px; overflow: hidden; border: 8px solid #1d1c1a; box-shadow: 0 40px 70px -30px rgba(40,30,15,.5); background: #fff; }
.shot-dark { grid-column: 8 / 11; grid-row: 2; margin-top: 110px !important; }
.win-frame { border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.real-stage > .shot-mac figcaption { margin-inline: auto 0; text-align: end; }
.shot-ipad figcaption, .shot-ipad2 figcaption { max-width: 100%; }
.real-note { grid-column: 2 / 7; grid-row: 2; align-self: center; margin: 110px 0 0; padding: 18px 20px; border-radius: 14px; background: rgba(255,255,255,.55); border: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
@media (max-width: 960px) {
  .real-stage { grid-template-columns: 1fr 1fr; perspective: none; }
  .real-stage figure { transform: none !important; margin: 0 !important; }
  .shot-mac { grid-column: 1 / -1; grid-row: auto; }
  .shot-ipad, .shot-ipad2 { grid-column: auto; grid-row: auto; }
  .shot-dark { grid-column: 1 / -1; grid-row: auto; max-width: 300px; }
  .real-note { grid-column: 1 / -1; grid-row: auto; margin: 8px 0 0; }
}

.platform-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 56px; }
.platform { text-align: center; padding: 32px 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.platform p { color: var(--ink-2); margin: 0; }
.device { margin: 0 auto 22px; height: 120px; display: grid; place-items: end center; }
.device span { display: block; border: 5px solid #23211e; background: linear-gradient(160deg, #fffdf8, #eee7da); border-radius: 18px; position: relative; }
.device-iphone span { width: 58px; height: 116px; border-radius: 16px; }
.device-ipad span { width: 120px; height: 92px; border-radius: 12px; }
.device-mac span { width: 160px; height: 100px; border-radius: 10px 10px 4px 4px; }
.device-mac span::after { content: ""; position: absolute; left: -22px; right: -22px; bottom: -14px; height: 9px; background: #23211e; border-radius: 0 0 10px 10px; }
.device span::before { content: ""; position: absolute; left: 18%; right: 18%; top: 42%; height: 3px; border-radius: 3px; background: #2a2d6e; transform: rotate(-6deg); }

.trust { background: var(--paper); }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 48px 0 32px; border-top: 1px solid var(--ink); }
.trust-item { padding: 26px 26px 10px 0; }
[dir="rtl"] .trust-item { padding: 26px 0 10px 26px; }
.trust-item + .trust-item { border-inline-start: 1px solid var(--line); padding-inline-start: 26px; }
.trust-item h3 { font-size: 20px; }
.trust-item p { color: var(--ink-2); }

.dev { background: var(--night); color: #efe9de; }
.dev .lead { color: #c9c1b3; }
.dev .kicker { color: var(--accent-2); }
.dev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.terminal { margin: 0; padding: 26px 28px; border-radius: 18px; background: #1d1b19; border: 1px solid rgba(255,255,255,.08); color: #d8d2ff; font: 14px/1.75 var(--font-mono); overflow-x: auto; direction: ltr; text-align: left; }
.terminal .c { color: #8a8478; }

.avail { background: radial-gradient(70% 90% at 50% 0%, #fbf8f2, var(--paper-2)); text-align: center; }
.avail-inner { max-width: 760px; }
.avail-icon { margin: 0 auto 26px; border-radius: 22px; box-shadow: 0 20px 40px -18px rgba(60,63,176,.45); }
.avail .lead { margin-inline: auto; }


/* footer */
.site-footer { background: #191816; color: #cfc8bb; padding: 64px var(--gutter) 36px; font-size: 15px; }
.footer-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer .brand { color: #fff; }
.site-footer h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #8f887b; margin: 6px 0 14px; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #e9e3d8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-brand p { margin-top: 14px; color: #a39c8f; }
.footer-legal { max-width: var(--wrap); margin: 48px auto 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #8f887b; }

/* simple pages */
.page-head { padding: clamp(64px, 9vw, 120px) 0 24px; }
.page-body { padding: 24px 0 clamp(80px, 10vw, 130px); }
.product-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.pc-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.pc-head img { border-radius: 15px; }
.pc-head h2 { font-size: 24px; margin: 0 0 2px; }
.pc-head p { margin: 0; color: var(--ink-2); font-size: 15px; }
.kb-icon { width: 64px; height: 64px; border-radius: 15px; background: #23211e; color: #fff; display: grid; place-items: center; font-size: 30px; flex: none; }
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(210,154,46,.12); color: #7c5a12; }
.status-pending .dot { background: #9a9385; box-shadow: 0 0 0 4px rgba(154,147,133,.2); }
.status-pending { background: rgba(28,26,23,.06); color: var(--ink-2); }
.req { padding-inline-start: 20px; color: var(--ink-2); margin: 18px 0 6px; }
.appstore-slot { margin: 18px 0; padding: 14px; border-radius: 14px; border: 1.5px dashed rgba(28,26,23,.2); text-align: center; color: var(--muted); font-size: 14px; }
.link-cards { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.link-card { display: block; height: 100%; padding: 22px 24px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s; }
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.link-card h2, .link-card h3 { font-size: 19px; margin-bottom: 6px; }
.link-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.contact-box { padding: 30px; border-radius: 24px; background: var(--ink); color: #efe9de; }
.contact-box h2 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: #a39c8f; }
.big-mail { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); color: #fff; text-decoration: none; }
.contact-box p:last-child { color: #c9c1b3; margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 0 0 36px 26px; position: relative; }
[dir="rtl"] .timeline li { padding: 0 26px 36px 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline time { font-weight: 600; color: var(--muted); }
.timeline h2 { font-size: 21px; }
.notfound { min-height: 60vh; }

/* docs */
.prose { max-width: 74ch; }
.prose h2 { font-size: 26px; margin-top: 46px; }
.prose h3 { font-size: 20px; margin-top: 30px; }
.prose h4 { font-size: 17px; margin: 22px 0 8px; }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }
.prose code, .doc-meta code { font-family: var(--font-mono); font-size: .88em; background: rgba(28,26,23,.07); padding: .12em .38em; border-radius: 6px; overflow-wrap: anywhere; }
.anchor { float: inline-start; margin-inline-start: -1.1em; width: 1.1em; opacity: 0; text-decoration: none; color: var(--muted); font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
.code { position: relative; margin: 18px 0 22px; }
.code pre { margin: 0; padding: 18px 20px; border-radius: 14px; background: #1d1b19; color: #ebe5da; overflow-x: auto; font: 13.5px/1.65 var(--font-mono); direction: ltr; text-align: left; }
.code pre code { background: none; padding: 0; font-size: inherit; }
.copy-btn { position: absolute; top: 8px; right: 8px; font: 12px var(--font-sans); padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #ebe5da; cursor: pointer; }
.table { overflow-x: auto; margin: 16px 0 24px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.callout { margin: 18px 0; padding: 14px 18px; border-radius: 12px; background: rgba(90,94,216,.08); border-inline-start: 3px solid var(--accent); font-size: 15.5px; }
.callout-important { background: rgba(176,80,47,.08); border-color: var(--warm); }
.callout-limit { background: rgba(210,154,46,.1); border-color: #c79025; }
.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 200px; gap: 48px; max-width: 1320px; margin: 0 auto; padding: 40px var(--gutter) 100px; }
.docs-side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding-bottom: 20px; }
.docnav-group h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.docnav-group ul { list-style: none; margin: 0; padding: 0; }
.docnav-group a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.docnav-group a:hover { background: rgba(28,26,23,.05); }
.docnav-group a[aria-current] { background: rgba(90,94,216,.1); color: var(--accent-ink); font-weight: 600; }
.docs-article h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 4vw, 48px); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0 8px; padding: 14px 0; border-block: 1px solid var(--line); font-size: 14px; }
.doc-meta dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.doc-meta dd { margin: 0; font-weight: 600; }
.doc-foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.docs-toc { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.docs-toc h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.docs-toc ul { list-style: none; padding: 0; margin: 0; border-inline-start: 1px solid var(--line); }
.docs-toc a { display: block; padding: 4px 12px; color: var(--ink-2); text-decoration: none; }
.docs-toc a:hover { color: var(--accent-ink); }
.docsearch { position: relative; margin: 6px 0 10px; }
.docsearch input { width: 100%; font: inherit; font-size: 15px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.docsearch-results { list-style: none; margin: 6px 0 0; padding: 0; }
.docsearch-results:empty { display: none; }
.docsearch-results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); margin-bottom: 6px; font-size: 14px; }
.docsearch-results small { display: block; color: var(--muted); }
.ds-meta { display: block; margin: 3px 0 2px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); }
.docsearch-results .ds-lim { color: #8a6516; margin-top: 3px; }
.docs-index-group { margin-bottom: 40px; }
.docs-index-group > h2 { font-family: var(--font-display); font-weight: 500; font-size: 32px; }

@media (max-width: 1100px) { .docs-layout { grid-template-columns: 230px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 960px) {
  .hero { padding-top: 92px; align-items: flex-start; }
  .hero-inner { grid-template-columns: 1fr; }
  .story-grid, .platform-row { grid-template-columns: 1fr; }
  .real-grid, .dev-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .product-cards, .link-cards { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .docs-layout { grid-template-columns: 1fr; gap: 10px; padding-top: 20px; }
  .docs-side { position: static; max-height: none; }
  .docs-side nav { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .app-body { grid-template-columns: 1fr; min-height: 0; }
  .app-side { display: none; }
  .app-page { padding: 18px 18px 16px; }
  .real-shots figure:nth-child(2) { margin-top: 30px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .cta-row .btn { flex: 1 1 auto; }
  .intro-eras { top: 22%; transform: none; }
  .intro-stroke { width: 92vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip-replay { display: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .docs-side, .docs-toc, .intro, .intro-controls { display: none !important; }
  body { background: #fff; }
}
