/* Passenger Rights Assistant - design system.
   Navy + green on soft slate, Inter / Manrope (Latin) and IBM Plex Sans Arabic, pill buttons, rounded cards, light and dark themes.
   No build step. Colours are RGB channels so alpha works: rgb(var(--fg) / .5). Layout uses logical properties, so right-to-left needs no overrides.
   Theme: <html data-theme="light|dark"> (set by assets/js/theme-init.js); with no choice saved the system setting decides. */

:root {
  --canvas: 255 255 255;
  --subtle: 244 247 250;
  --surface: 255 255 255;
  --fg: 10 31 51;               /* 15.9:1 on white */
  --muted: 74 87 104;           /* 7.3:1 on white */
  --line: 226 232 240;
  --panel: 239 244 249;
  --panel-line: 218 228 238;
  --primary: 14 53 83;
  --primary-hover: 10 41 66;
  --on-primary: 255 255 255;
  --accent: 0 184 132;          /* logo green */
  --accent-fg: 0 107 80;        /* 6.5:1 on white: green text and links */
  --accent-soft: 232 250 243;
  --ring: 0 128 95;
  --ok: 15 122 61;    --ok-bg: 228 244 234;
  --warn: 138 90 0;   --warn-bg: 253 242 217;
  --bad: 163 38 38;   --bad-bg: 251 232 232;
  --info: 14 53 83;   --info-bg: 233 240 247;
  --shadow-c: 14 53 83;
  --shadow-sm: 0 1px 2px rgb(var(--shadow-c) / .06), 0 8px 24px -14px rgb(var(--shadow-c) / .25);
  --shadow-md: 0 2px 4px rgb(var(--shadow-c) / .05), 0 18px 40px -20px rgb(var(--shadow-c) / .35);
  --shadow-lg: 0 30px 70px -30px rgb(var(--shadow-c) / .5);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --font-display: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --header-h: 64px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --canvas: 5 14 24;
  --subtle: 9 21 35;
  --surface: 12 26 42;
  --fg: 233 239 246;
  --muted: 160 175 194;
  --line: 28 45 66;
  --panel: 11 26 43;
  --panel-line: 30 48 70;
  --primary: 0 184 132;
  --primary-hover: 34 196 147;
  --on-primary: 4 18 31;
  --accent: 0 184 132;
  --accent-fg: 61 214 160;
  --accent-soft: 8 40 36;
  --ring: 61 214 160;
  --ok: 92 200 139;   --ok-bg: 17 46 33;
  --warn: 228 178 77; --warn-bg: 52 40 14;
  --bad: 240 140 140; --bad-bg: 58 29 29;
  --info: 150 190 230; --info-bg: 17 36 58;
  --shadow-c: 0 0 0;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: 5 14 24; --subtle: 9 21 35; --surface: 12 26 42; --fg: 233 239 246; --muted: 160 175 194; --line: 28 45 66;
    --panel: 11 26 43; --panel-line: 30 48 70; --primary: 0 184 132; --primary-hover: 34 196 147; --on-primary: 4 18 31;
    --accent-fg: 61 214 160; --accent-soft: 8 40 36; --ring: 61 214 160;
    --ok: 92 200 139; --ok-bg: 17 46 33; --warn: 228 178 77; --warn-bg: 52 40 14; --bad: 240 140 140; --bad-bg: 58 29 29;
    --info: 150 190 230; --info-bg: 17 36 58; --shadow-c: 0 0 0; color-scheme: dark;
  }
}

/* ── base ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; background: rgb(var(--canvas)); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: rgb(var(--fg));
  font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
html[lang="ar"] body { line-height: 1.75; }
/* soft colour and a faint grid behind the whole page, so wide screens never show flat empty margins */
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(70rem 46rem at 4% -8%, rgb(var(--accent) / .26), transparent 64%), radial-gradient(64rem 48rem at 104% 4%, rgb(48 96 160 / .26), transparent 62%), radial-gradient(56rem 34rem at 50% 114%, rgb(var(--accent) / .14), transparent 64%); }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .9;
  background-image: linear-gradient(to right, rgb(var(--line) / .75) 1px, transparent 1px), linear-gradient(to bottom, rgb(var(--line) / .75) 1px, transparent 1px); background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 75%); mask-image: linear-gradient(to bottom, #000 0, transparent 75%); }
@media (prefers-reduced-motion: no-preference) { body::before { animation: drift 26s ease-in-out infinite alternate; } }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-1.5%, 1.5%, 0); } }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -0.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: 1.875rem; } h2 { font-size: 1.375rem; } h3 { font-size: 1.125rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .75em; } ul, ol { margin: .25em 0 .75em; padding-inline-start: 1.25em; }
a { color: rgb(var(--accent-fg)); text-underline-offset: 3px; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgb(var(--accent) / .28); }
:focus-visible { outline: 2px solid rgb(var(--ring)); outline-offset: 2px; border-radius: 6px; }
img, svg { max-width: 100%; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; }
[dir="rtl"] .icon-flip { transform: scaleX(-1); }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: rgb(var(--fg)); color: rgb(var(--canvas)); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* a little larger type on big monitors: every size below is in rem, so the whole interface scales together */
@media (min-width: 1500px) { html { font-size: 106.25%; } }
@media (min-width: 1800px) { html { font-size: 112.5%; } }

/* utilities the page scripts use */
.hide { display: none !important; }
.mute { color: rgb(var(--muted)); } .small { font-size: .875rem; } .center { text-align: center; } .grow { flex: 1; min-width: 0; } .strong { font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* ── layout, header, footer ─────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1680px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 40px) 56px; flex: 1; }
.container.mid { max-width: 820px; } .container.narrow { max-width: 480px; }
.wrap { width: 100%; max-width: 1680px; margin: 0 auto; padding-inline: clamp(10px, 2.2vw, 40px); }

.site-header { position: sticky; top: 0; z-index: 50; padding-top: 12px; }
.topbar { position: relative; display: flex; align-items: center; gap: 12px; min-height: var(--header-h); padding: 8px 12px 8px 16px; border: 1px solid rgb(var(--line)); border-radius: var(--r-lg);
  background: rgb(var(--surface) / .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); }
[dir="rtl"] .topbar { padding: 8px 16px 8px 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: rgb(var(--fg)); text-decoration: none; min-width: 0; flex: 0 1 auto; overflow: hidden; } .brand:hover { text-decoration: none; }
.brand-mark { --mark: 36px; display: inline-grid; place-items: center; width: var(--mark); height: var(--mark); border-radius: calc(var(--mark) * .3); flex: none;
  background: linear-gradient(135deg, #0e3553, #071d30); color: #00b884; box-shadow: 0 6px 16px -8px rgb(14 53 83 / .7); }
.brand-text { display: grid; line-height: 1.1; min-width: 0; } .brand-text b { overflow: hidden; text-overflow: ellipsis; font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-text small { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--accent-fg)); white-space: nowrap; }
html[lang="ar"] .brand-text small { letter-spacing: 0; text-transform: none; font-size: .75rem; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 12px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; color: rgb(var(--fg) / .78); font-weight: 500; font-size: .9375rem; text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s; }
.nav a:hover { background: rgb(var(--subtle)); color: rgb(var(--fg)); } .nav a.on { background: rgb(var(--primary)); color: rgb(var(--on-primary)); }
.tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; flex: none; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: rgb(var(--fg) / .8); cursor: pointer; transition: background-color .15s, color .15s, transform .1s; }
.icon-btn:hover { background: rgb(var(--subtle)); color: rgb(var(--fg)); } .icon-btn:active { transform: scale(.94); } .icon-btn.bordered { border-color: rgb(var(--line)); }
.lang-btn { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(var(--line)); background: transparent; color: rgb(var(--fg) / .85); font-weight: 600; font-size: .875rem; cursor: pointer; }
.lang-btn:hover { background: rgb(var(--subtle)); }
.plan-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: rgb(var(--accent-soft)); color: rgb(var(--accent-fg)); font-size: .8125rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.plan-badge:hover { text-decoration: none; filter: brightness(.97); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(var(--primary)); color: rgb(var(--on-primary)); font-weight: 700; font-size: .875rem; flex: none; text-transform: uppercase; }
.menu-wrap { position: relative; }
.popover { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 240px; padding: 8px; border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--surface)); box-shadow: var(--shadow-md); z-index: 60; animation: pop .14s ease-out; }
.popover .who { padding: 10px 12px 12px; border-bottom: 1px solid rgb(var(--line)); margin-bottom: 6px; } .popover .who b { display: block; overflow: hidden; text-overflow: ellipsis; } .popover .who span { font-size: .8125rem; color: rgb(var(--muted)); }
.popover a, .popover button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: rgb(var(--fg)); font-size: .9375rem; text-align: start; text-decoration: none; cursor: pointer; }
.popover a:hover, .popover button:hover { background: rgb(var(--subtle)); text-decoration: none; }
.burger { display: none; }
.mobile-menu { position: fixed; inset: calc(var(--header-h) + 24px) 0 0 0; z-index: 49; padding: 12px 16px 32px; background: rgb(var(--canvas)); overflow-y: auto; animation: fade .15s ease-out; }
.mobile-menu a { display: flex; align-items: center; gap: 14px; min-height: 56px; border-bottom: 1px solid rgb(var(--line)); color: rgb(var(--fg)); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.mobile-menu a.on { color: rgb(var(--accent-fg)); } .mobile-menu .btn { margin-top: 20px; }

.site-footer { border-top: 1px solid rgb(var(--line)); background: rgb(var(--subtle)); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-block: 28px; }
.site-footer p { margin: 0; max-width: 62ch; font-size: .875rem; color: rgb(var(--muted)); } .site-footer .links { display: flex; gap: 20px; align-items: center; font-size: .875rem; }
.site-footer .links a { color: rgb(var(--fg) / .8); } .site-footer .copy { width: 100%; font-size: .8125rem; color: rgb(var(--muted)); padding-top: 14px; border-top: 1px solid rgb(var(--line)); }

/* ── buttons and form controls ──────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 1px solid rgb(var(--line)); border-radius: 999px; background: rgb(var(--surface)); color: rgb(var(--fg));
  font-weight: 600; font-size: .9375rem; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, transform .1s; }
.btn:hover { border-color: rgb(var(--fg) / .3); text-decoration: none; } .btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: rgb(var(--on-primary)); box-shadow: 0 10px 22px -12px rgb(var(--primary) / .75); }
.btn.primary:hover { background: rgb(var(--primary-hover)); border-color: rgb(var(--primary-hover)); box-shadow: 0 14px 28px -12px rgb(var(--primary) / .8); }
.btn.accent { background: rgb(var(--accent)); border-color: rgb(var(--accent)); color: #04281f; } .btn.accent:hover { filter: brightness(1.06); }
.btn.danger { color: rgb(var(--bad)); border-color: rgb(var(--bad) / .5); background: transparent; } .btn.danger:hover { background: rgb(var(--bad-bg)); border-color: rgb(var(--bad)); }
.btn.danger.solid { background: rgb(var(--bad)); color: #fff; border-color: rgb(var(--bad)); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: rgb(var(--subtle)); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .875rem; } .btn.lg { min-height: 52px; padding: 0 30px; font-size: 1rem; } .btn.block { width: 100%; }
@media (pointer: coarse) { .btn.sm { min-height: 44px; } .icon-btn { width: 44px; height: 44px; } }

.field { display: block; margin-bottom: 16px; } .field > span { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; color: rgb(var(--fg) / .85); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--surface)); color: rgb(var(--fg)); transition: border-color .15s, box-shadow .15s; }
textarea { line-height: 1.5; } select { appearance: none; padding-inline-end: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a97a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
[dir="rtl"] select { background-position: left 14px center; }
input::placeholder, textarea::placeholder { color: rgb(var(--muted) / .75); }
input:hover, select:hover, textarea:hover { border-color: rgb(var(--fg) / .28); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgb(var(--ring)); box-shadow: 0 0 0 3px rgb(var(--ring) / .22); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: rgb(var(--fg) / .85); line-height: 1.5; } .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: rgb(var(--primary)); flex: none; }
.input-icon { position: relative; } .input-icon > .icon { position: absolute; z-index: 2; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: rgb(var(--muted)); pointer-events: none; } .input-icon input { padding-inline-start: 42px; }

.seg { display: inline-flex; padding: 4px; border: 1px solid rgb(var(--line)); border-radius: 999px; background: rgb(var(--subtle)); }
.seg button { min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: rgb(var(--muted)); font-weight: 600; font-size: .875rem; cursor: pointer; transition: background-color .15s, color .15s; }
.seg button.on { background: rgb(var(--surface)); color: rgb(var(--fg)); box-shadow: var(--shadow-sm); } .seg .save { margin-inline-start: 6px; font-size: .75rem; font-weight: 700; color: rgb(var(--accent-fg)); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 20px; border-radius: 999px; background: rgb(var(--subtle)); border: 1px solid rgb(var(--line)); }
.tabs button { min-height: 40px; border: 0; border-radius: 999px; background: none; color: rgb(var(--muted)); font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.tabs button.on { background: rgb(var(--surface)); color: rgb(var(--fg)); box-shadow: var(--shadow-sm); }

/* ── surfaces and small components ──────────────────────────────────────────────────── */
.card { padding: 20px; border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); background: rgb(var(--surface)); box-shadow: var(--shadow-sm); }
.card.flat { box-shadow: none; } .card h3 { margin-bottom: 6px; }
.card.lift { transition: transform .2s, box-shadow .2s, border-color .2s; } .card.lift:hover { transform: translateY(-3px); border-color: rgb(var(--accent) / .55); box-shadow: var(--shadow-md); }
.panel { border: 1px solid rgb(var(--panel-line)); border-radius: var(--r-xl); background: rgb(var(--panel) / .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.grid { display: grid; gap: 16px; } .grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } .grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 11px; border-radius: 999px; background: rgb(var(--subtle)); border: 1px solid rgb(var(--line)); color: rgb(var(--fg) / .85); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.pill.ok { background: rgb(var(--ok-bg)); color: rgb(var(--ok)); border-color: transparent; } .pill.warn { background: rgb(var(--warn-bg)); color: rgb(var(--warn)); border-color: transparent; }
.pill.bad { background: rgb(var(--bad-bg)); color: rgb(var(--bad)); border-color: transparent; } .pill.info { background: rgb(var(--info-bg)); color: rgb(var(--info)); border-color: transparent; }
.pill .icon { width: 14px; height: 14px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: .9375rem; background: rgb(var(--subtle)); line-height: 1.5; }
.alert.ok { background: rgb(var(--ok-bg)); color: rgb(var(--ok)); } .alert.warn { background: rgb(var(--warn-bg)); color: rgb(var(--warn)); } .alert.bad { background: rgb(var(--bad-bg)); color: rgb(var(--bad)); } .alert.info { background: rgb(var(--info-bg)); color: rgb(var(--info)); }
.alert .icon { margin-top: 2px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--accent-fg)); }
.kicker::before { content: ""; width: 24px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #88c840, #00b884 40%, #3060a0 70%, #f86838); }
html[lang="ar"] .kicker { letter-spacing: 0; text-transform: none; font-size: .875rem; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .9375rem; margin: 0; } .dl dt { color: rgb(var(--muted)); } .dl dd { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .9375rem; } .kv dt { color: rgb(var(--muted)); } .kv dd { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); background: rgb(var(--surface)); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; } table.data th, table.data td { text-align: start; padding: 14px 16px; border-bottom: 1px solid rgb(var(--line)); vertical-align: middle; font-size: .9375rem; }
table.data th { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--muted)); background: rgb(var(--subtle)); } table.data tr:last-child td { border-bottom: 0; }
html[lang="ar"] table.data th { letter-spacing: 0; text-transform: none; font-size: .8125rem; }
.spinner { width: 22px; height: 22px; border: 3px solid rgb(var(--line)); border-top-color: rgb(var(--accent)); border-radius: 50%; animation: spin .75s linear infinite; display: inline-block; vertical-align: middle; }
.skeleton { border-radius: var(--r-md); background: linear-gradient(90deg, rgb(var(--subtle)), rgb(var(--line)), rgb(var(--subtle))); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.state-box { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.state-box .big { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: rgb(var(--accent-soft)); color: rgb(var(--accent-fg)); margin-bottom: 8px; } .state-box .big .icon { width: 34px; height: 34px; }
.state-box .big.bad { background: rgb(var(--bad-bg)); color: rgb(var(--bad)); } .state-box .big.warn { background: rgb(var(--warn-bg)); color: rgb(var(--warn)); }
.state-box h2 { margin: 0; } .state-box p { max-width: 46ch; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border: 1px solid rgb(var(--line)); border-radius: 999px; background: rgb(var(--surface)); color: rgb(var(--fg) / .85); font-size: .875rem; cursor: pointer; }
.chip:hover { background: rgb(var(--subtle)); } .chip.file { cursor: default; padding-inline-end: 6px; } .chip.file button { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: rgb(var(--muted)); cursor: pointer; } .chip.file button:hover { background: rgb(var(--subtle)); color: rgb(var(--fg)); }
pre.box { margin: 8px 0; padding: 16px; max-height: 46vh; overflow: auto; border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--subtle)); white-space: pre-wrap; word-wrap: break-word; font: .9rem/1.65 ui-monospace, Consolas, "IBM Plex Sans Arabic", monospace; }

/* dialogs, toasts */
dialog.modal { width: min(94vw, 640px); max-height: 90vh; padding: 0; border: 1px solid rgb(var(--line)); border-radius: var(--r-xl); background: rgb(var(--surface)); color: rgb(var(--fg)); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.modal[open] { animation: rise .2s cubic-bezier(.2, .7, .2, 1); } dialog.modal::backdrop { background: rgb(4 18 31 / .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.modal .m-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid rgb(var(--line)); } dialog.modal .m-head h3 { flex: 1; margin: 0; }
dialog.modal .m-body { padding: 20px; overflow-y: auto; max-height: calc(90vh - 150px); } dialog.modal .m-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid rgb(var(--line)); background: rgb(var(--subtle)); }
#toasts { position: fixed; inset-inline: 16px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(92vw, 440px); padding: 12px 18px; border-radius: 14px; background: rgb(var(--fg)); color: rgb(var(--canvas)); box-shadow: var(--shadow-md); font-size: .9375rem; pointer-events: auto; animation: rise .2s ease-out; }
.toast.ok { background: rgb(var(--ok)); color: #fff; } .toast.bad { background: rgb(var(--bad)); color: #fff; }
[data-theme="dark"] .toast.ok, [data-theme="dark"] .toast.bad { color: #04121f; }

/* ── landing ───────────────────────────────────────────────────────────────────────── */
.landing { display: grid; gap: clamp(56px, 7vw, 104px); padding-bottom: 24px; }
.hero { position: relative; overflow: hidden; display: grid; align-items: center; margin-top: 8px; padding: clamp(28px, 5vw, 72px) clamp(28px, 5vw, 80px); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgb(var(--line) / .8) 1px, transparent 1px), linear-gradient(to bottom, rgb(var(--line) / .8) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 0 0, #000 15%, transparent 70%); mask-image: radial-gradient(ellipse at 0 0, #000 15%, transparent 70%); }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; inset-inline-start: -140px; top: -160px; border-radius: 50%; background: rgb(var(--accent) / .16); filter: blur(70px); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: clamp(32px, 5vw, 96px); align-items: center; grid-template-columns: minmax(0, 1.1fr) minmax(0, 480px); }
.hero h1 { margin: 18px 0 0; font-size: clamp(2.25rem, 4.6vw, 4.5rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; }
html[lang="ar"] .hero h1 { line-height: 1.3; letter-spacing: 0; }
.hero .lead { margin: 20px 0 0; max-width: 54ch; font-size: clamp(1.0625rem, 1.6vw, 1.2rem); line-height: 1.7; color: rgb(var(--muted)); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.trust li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid rgb(var(--panel-line)); border-radius: 999px; background: rgb(var(--surface) / .85); font-size: .9375rem; font-weight: 500; }
.trust .icon { color: rgb(var(--accent-fg)); }
.auth-card { padding: 28px; border: 1px solid rgb(var(--line)); border-radius: var(--r-xl); background: rgb(var(--surface)); box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 1.375rem; margin-bottom: 4px; } .auth-card .sub { margin: 0 0 18px; color: rgb(var(--muted)); font-size: .9375rem; }
.auth-card .forgot { display: block; margin-top: 14px; text-align: center; font-size: .9rem; }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; } .section-head h2 { margin: 14px 0 12px; font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
html[lang="ar"] .section-head h2 { letter-spacing: 0; } .section-head p { margin: 0; font-size: 1.0625rem; color: rgb(var(--muted)); }
.steps { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { position: relative; padding: 28px; counter-increment: step; }
.step .num { position: absolute; inset-inline-end: 22px; top: 18px; font: 800 3rem/1 var(--font-display); color: rgb(var(--line)); }
.step .ico, .feature .ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 16px; background: rgb(var(--accent-soft)); color: rgb(var(--accent-fg)); } .step .ico .icon, .feature .ico .icon { width: 26px; height: 26px; }
.step h3, .feature h3 { margin-bottom: 8px; font-size: 1.1875rem; } .step p, .feature p { margin: 0; color: rgb(var(--muted)); font-size: .9688rem; }
.features { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); } .feature { padding: 26px; }
.coverage { padding: clamp(24px, 4vw, 48px); } .coverage .chips { justify-content: center; gap: 10px; } .coverage .chip { min-height: 42px; padding: 0 18px; font-weight: 600; cursor: default; background: rgb(var(--surface)); }
.coverage .chip small { font-weight: 500; color: rgb(var(--muted)); }
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--surface)); transition: border-color .15s; } .faq details[open] { border-color: rgb(var(--accent) / .55); box-shadow: var(--shadow-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 20px; font-weight: 600; cursor: pointer; list-style: none; } .faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: rgb(var(--muted)); transition: transform .2s; } .faq details[open] summary .icon { transform: rotate(180deg); }
.faq .answer { padding: 0 20px 20px; color: rgb(var(--muted)); line-height: 1.7; }
.cta-band { position: relative; overflow: hidden; display: grid; gap: 20px; justify-items: center; padding: clamp(36px, 6vw, 72px) 24px; text-align: center; border: 0; background: linear-gradient(135deg, #0e3553, #071d30); color: #fff; }
.cta-band::after { content: ""; position: absolute; width: 360px; height: 360px; inset-inline-end: -100px; bottom: -160px; border-radius: 50%; background: rgb(0 184 132 / .3); filter: blur(70px); }
.cta-band h2 { position: relative; margin: 0; font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 800; color: #fff; } .cta-band p { position: relative; margin: 0; max-width: 56ch; color: rgb(255 255 255 / .75); } .cta-band .btn { position: relative; background: #fff; color: #0e3553; border-color: #fff; }
.reveal { opacity: 0; transform: translateY(18px); } .reveal.in { opacity: 1; transform: none; transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }

/* utility pages (forgot, reset, verify, payment result) */
.auth-wrap { display: grid; justify-items: center; padding-top: 24px; } .auth-wrap .card { width: 100%; padding: 32px; box-shadow: var(--shadow-md); }
.auth-wrap h1 { font-size: 1.625rem; margin-bottom: 14px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; } .page-head h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; } .page-head p { margin: 6px 0 0; color: rgb(var(--muted)); max-width: 62ch; }

/* ── chat ──────────────────────────────────────────────────────────────────────────── */
body.chat-page { height: 100vh; height: 100dvh; overflow: hidden; }
body.chat-page .site-header { position: static; padding-top: 10px; } body.chat-page .site-footer { display: none; }
body.chat-page .container { max-width: none; width: 100%; padding: 12px clamp(8px, 2.2vw, 40px) 16px; min-height: 0; display: flex; }
.chat-layout { flex: 1; min-height: 0; width: 100%; max-width: 1760px; margin: 0 auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; grid-template-rows: minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 0; border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); background: rgb(var(--subtle)); overflow: hidden; }
.sidebar .s-head { padding: 14px; } .sidebar .s-label { padding: 6px 18px 6px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--muted)); }
html[lang="ar"] .sidebar .s-label { letter-spacing: 0; text-transform: none; font-size: .8125rem; }
.sidebar .s-list { flex: 1; overflow-y: auto; padding: 4px 10px 10px; } .sidebar .s-foot { padding: 14px 16px; border-top: 1px solid rgb(var(--line)); background: rgb(var(--surface)); }
.s-item { display: flex; align-items: center; gap: 2px; border-radius: 12px; padding: 2px; } .s-item:hover { background: rgb(var(--surface)); } .s-item.on { background: rgb(var(--surface)); box-shadow: inset 0 0 0 1px rgb(var(--accent) / .5); }
.s-item button.title { flex: 1; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: none; text-align: start; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.s-item .acts { display: none; gap: 0; } .s-item:hover .acts, .s-item.on .acts, .s-item:focus-within .acts { display: flex; }
.s-item .acts button { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: rgb(var(--muted)); cursor: pointer; } .s-item .acts button:hover { background: rgb(var(--subtle)); color: rgb(var(--fg)); }
.meter { height: 6px; margin-top: 8px; border-radius: 6px; background: rgb(var(--line)); overflow: hidden; } .meter > i { display: block; height: 100%; border-radius: 6px; background: rgb(var(--accent)); transition: width .4s; }
.usage-line { display: flex; justify-content: space-between; font-size: .8125rem; color: rgb(var(--muted)); }
.chat-main { position: relative; display: flex; flex-direction: column; min-height: 0; border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); background: rgb(var(--surface)); box-shadow: var(--shadow-sm); overflow: hidden; }
.chat-top { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px; border-bottom: 1px solid rgb(var(--line)); } .chat-top h1 { margin: 0; font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.thread { flex: 1; overflow-y: auto; padding: 28px 20px 12px; scroll-behavior: smooth; } .thread-inner { max-width: 780px; margin: 0 auto; display: grid; gap: 22px; align-content: start; min-height: 100%; }
.msg { animation: rise .22s ease-out; overflow-wrap: anywhere; }
.msg.user { justify-self: end; max-width: min(86%, 600px); padding: 12px 18px; border-radius: 22px; border-end-end-radius: 6px; background: rgb(var(--primary)); color: rgb(var(--on-primary)); white-space: pre-wrap; line-height: 1.55; }
.msg.user .files { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .8125rem; opacity: .85; }
.bot-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; animation: rise .22s ease-out; } .bot-row .brand-mark { margin-top: 2px; }
.msg.bot { min-width: 0; line-height: 1.7; } .msg.bot > :first-child { margin-top: 0; } .msg.bot p:last-child { margin-bottom: 0; } .msg.bot li { margin: 4px 0; } .msg.bot ul, .msg.bot ol { padding-inline-start: 1.4em; }
.msg.bot h4 { margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid rgb(var(--line)); font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--muted)); }
html[lang="ar"] .msg.bot h4 { letter-spacing: 0; text-transform: none; font-size: .9375rem; }
.msg.bot strong { font-weight: 650; }
.msg.err { padding: 14px 16px; border-radius: var(--r-md); background: rgb(var(--bad-bg)); color: rgb(var(--bad)); }
.typing { display: inline-flex; gap: 5px; align-items: center; height: 26px; } .typing i { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--muted)); animation: bounce 1.2s ease-in-out infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.msg-actions { display: flex; gap: 4px; margin-top: 10px; } .msg-actions .icon-btn { width: 34px; height: 34px; }
.extras { display: grid; gap: 12px; margin-inline-start: 50px; }
.understood { padding: 16px 18px; border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--subtle)); } .understood > h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--muted)); font-family: var(--font-body); }
html[lang="ar"] .understood > h3 { letter-spacing: 0; text-transform: none; font-size: .9375rem; }
.understood .route { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; } .understood .route .icon { color: rgb(var(--accent-fg)); } .understood .route small { font-family: var(--font-body); font-weight: 500; color: rgb(var(--muted)); font-size: .875rem; }
.understood ul { margin: 6px 0 0; font-size: .875rem; } .understood .label { margin-top: 12px; font-size: .8125rem; font-weight: 600; color: rgb(var(--muted)); }
.claim { position: relative; padding: 18px 20px; border: 1px solid rgb(var(--line)); border-inline-start: 4px solid rgb(var(--muted)); border-radius: var(--r-md); background: rgb(var(--surface)); box-shadow: var(--shadow-sm); }
.claim.ok { border-inline-start-color: rgb(var(--ok)); } .claim.warn { border-inline-start-color: rgb(var(--warn)); }
.claim .amount { margin: 10px 0 2px; font: 800 2rem/1.1 var(--font-display); letter-spacing: -0.02em; } .claim .amount small { font-size: .9rem; font-weight: 600; color: rgb(var(--muted)); letter-spacing: 0; }
.claim .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; } .claim .why { margin-top: 10px; font-size: .875rem; color: rgb(var(--muted)); }
details.sources { border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--surface)); font-size: .875rem; } details.sources summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; font-weight: 600; cursor: pointer; list-style: none; color: rgb(var(--muted)); }
details.sources summary::-webkit-details-marker { display: none; } details.sources[open] summary { color: rgb(var(--fg)); border-bottom: 1px solid rgb(var(--line)); } details.sources ul { margin: 0; padding: 12px 16px 12px 36px; } [dir="rtl"] details.sources ul { padding: 12px 36px 12px 16px; } details.sources li { margin: 6px 0; }
.welcome { display: grid; justify-items: center; gap: 12px; padding: 7vh 0 12px; text-align: center; } .welcome .brand-mark { margin-bottom: 8px; box-shadow: 0 14px 30px -12px rgb(14 53 83 / .6); }
.welcome h2 { margin: 0; font-size: clamp(1.625rem, 3.4vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; } .welcome p { max-width: 54ch; margin: 0; color: rgb(var(--muted)); }
.suggest { display: grid; gap: 12px; width: 100%; max-width: 760px; margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.suggest button { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px; border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--surface)); text-align: start; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.suggest button:hover { border-color: rgb(var(--accent) / .6); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.suggest .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgb(var(--accent-soft)); color: rgb(var(--accent-fg)); } .suggest b { display: block; margin-bottom: 2px; font-size: .9375rem; } .suggest span.t { display: block; font-size: .8438rem; line-height: 1.45; color: rgb(var(--muted)); }
.composer { padding: 8px 20px 16px; } .composer-inner { max-width: 780px; margin: 0 auto; }
.composer .box { display: flex; align-items: flex-end; gap: 6px; padding: 8px 8px 8px 12px; border: 1px solid rgb(var(--line)); border-radius: 26px; background: rgb(var(--surface)); box-shadow: var(--shadow-md); transition: border-color .15s, box-shadow .15s; }
[dir="rtl"] .composer .box { padding: 8px 12px 8px 8px; } .composer .box:focus-within { border-color: rgb(var(--ring)); box-shadow: 0 0 0 3px rgb(var(--ring) / .2), var(--shadow-md); }
.composer textarea { flex: 1; min-height: 44px; max-height: 180px; padding: 11px 6px; border: 0; border-radius: 0; background: transparent; box-shadow: none; resize: none; overflow-y: hidden; line-height: 1.5; }
.composer textarea:focus { box-shadow: none; } .composer .send { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(var(--primary)); color: rgb(var(--on-primary)); cursor: pointer; transition: transform .1s, background-color .15s, opacity .15s; }
.composer .send:hover { background: rgb(var(--primary-hover)); } .composer .send:active { transform: scale(.94); } .composer .send:disabled { opacity: .45; cursor: not-allowed; } .composer .send.stop { background: rgb(var(--fg)); color: rgb(var(--canvas)); } .composer .send.stop .icon { fill: currentColor; }
.composer .chips { margin-bottom: 10px; } .composer .hint { margin: 10px 0 0; text-align: center; font-size: .75rem; color: rgb(var(--muted)); }
#drawer-btn { display: none; } .scrim { display: none; }

/* ── claims, plans, account, terms ─────────────────────────────────────────────────── */
.claim-card { display: grid; gap: 10px; width: 100%; padding: 20px; border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); background: rgb(var(--surface)); text-align: start; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s, border-color .2s, box-shadow .2s; }
.claim-card:hover { transform: translateY(-3px); border-color: rgb(var(--accent) / .55); box-shadow: var(--shadow-md); }
.claim-card .route { display: flex; align-items: center; gap: 10px; font: 800 1.25rem/1.2 var(--font-display); letter-spacing: -0.01em; } .claim-card .route .icon { color: rgb(var(--accent-fg)); }
.claim-card .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .875rem; color: rgb(var(--muted)); } .claim-card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 28px; border: 1px solid rgb(var(--line)); border-radius: var(--r-xl); background: rgb(var(--surface)); box-shadow: var(--shadow-sm); }
.plan.featured { border-color: rgb(var(--accent)); box-shadow: 0 0 0 1px rgb(var(--accent)), var(--shadow-md); } .plan.current { background: rgb(var(--accent-soft)); }
.plan .ribbon { position: absolute; top: -13px; inset-inline-start: 24px; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 12px; border-radius: 999px; background: rgb(var(--accent)); color: #04281f; font-size: .75rem; font-weight: 800; letter-spacing: .04em; }
.plan h3 { margin: 0; font-size: 1.25rem; } .price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font: 800 2.25rem/1.1 var(--font-display); letter-spacing: -0.02em; } .price small { font: 500 .9375rem var(--font-body); letter-spacing: 0; color: rgb(var(--muted)); }
.plan ul.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: .9375rem; } .plan ul.ticks li { display: flex; gap: 10px; align-items: flex-start; } .plan ul.ticks .icon { color: rgb(var(--accent-fg)); margin-top: 3px; }
.plan .foot { margin-top: auto; }
.usage-card { display: grid; gap: 18px; padding: 22px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } .usage-card .u b { font: 800 1.5rem/1.1 var(--font-display); } .usage-card .u span { display: block; color: rgb(var(--muted)); font-size: .875rem; }
.account-grid { display: grid; gap: 20px; grid-template-columns: 300px minmax(0, 1fr); align-items: start; } .profile-card { position: sticky; top: 96px; display: grid; justify-items: center; gap: 6px; padding: 28px 22px; text-align: center; }
.profile-card .avatar { width: 84px; height: 84px; font-size: 2rem; margin-bottom: 8px; } .profile-card h3 { margin: 0; } .profile-card .pill { margin-top: 8px; }
.settings { display: grid; gap: 20px; } .settings .card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .settings .card h3 .icon { color: rgb(var(--accent-fg)); }
.danger-card { border-color: rgb(var(--bad) / .35); } .danger-card h3 .icon { color: rgb(var(--bad)) !important; }
.terms-layout { display: grid; gap: 40px; grid-template-columns: 260px minmax(0, 1fr); align-items: start; } .toc { position: sticky; top: 96px; display: grid; gap: 2px; padding: 16px; border: 1px solid rgb(var(--line)); border-radius: var(--r-md); background: rgb(var(--subtle)); }
.toc b { margin-bottom: 8px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--muted)); } .toc a { display: block; padding: 6px 8px; border-radius: 8px; color: rgb(var(--fg) / .8); font-size: .875rem; text-decoration: none; } .toc a:hover { background: rgb(var(--surface)); color: rgb(var(--fg)); }
.prose { max-width: 70ch; font-size: 1rem; line-height: 1.75; } .prose h2 { margin: 2.2em 0 .6em; font-size: 1.375rem; scroll-margin-top: 96px; } .prose h2:first-child { margin-top: 0; } .prose h4 { margin: 1.6em 0 .4em; font-size: 1.0625rem; } .prose p { color: rgb(var(--fg) / .88); }
.legal-note { margin: 0 0 28px; padding: 14px 18px; border-radius: var(--r-md); background: rgb(var(--info-bg)); color: rgb(var(--info)); font-size: .9375rem; }

/* password box with a show/hide button */
.pw-wrap { position: relative; } .pw-wrap input { padding-inline-end: 52px; }
.pw-toggle { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); } .pw-toggle:active { transform: translateY(-50%) scale(.94); }

/* ── motion and responsive ─────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } } @keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } } @keyframes fade { from { opacity: 0; } to { opacity: 1; } } @keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

@media (max-width: 1100px) { .nav a span.t { display: none; } .nav a { padding: 0 12px; } .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .steps, .features { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; } .account-grid, .terms-layout { grid-template-columns: 1fr; } .toc { position: static; }
  .nav { display: none; } .burger { display: inline-grid; } .plan-badge { display: none; }
}
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; } #drawer-btn { display: inline-grid; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 80; width: min(86vw, 340px); border-radius: 0; transform: translateX(-105%); transition: transform .22s ease; } [dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); } .scrim.show { display: block; position: fixed; inset: 0; z-index: 70; background: rgb(4 18 31 / .5); animation: fade .15s; }
  .thread { padding: 20px 14px 8px; } .composer { padding: 6px 12px 12px; } body.chat-page .container { padding: 8px 8px 8px; } .extras { margin-inline-start: 0; }
}
@media (max-width: 640px) {
  .container { padding: 20px 16px 40px; } .brand-text small { display: none; } .tools .plan-badge { display: none; } .suggest { grid-template-columns: 1fr; } .bot-row { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .auth-card { padding: 22px 18px; } .hero { padding: 24px 18px; border-radius: var(--r-lg); } .msg.user { max-width: 92%; } .step, .feature, .plan { padding: 22px; } .lang-btn span.t { display: none; }
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; } .page-head { margin-bottom: 20px; }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 10px; } .topbar { gap: 8px; padding: 6px 8px 6px 10px; } [dir="rtl"] .topbar { padding: 6px 10px 6px 8px; }
  .brand { gap: 8px; } .brand-text b { font-size: .875rem; } .tools { gap: 2px; } .icon-btn { width: 38px; height: 38px; } .lang-btn { min-height: 38px; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
