/* حكومة واحدة · One Government — prototype design system
   Tokens → base → layout → components → pages. Logical properties throughout so AR (rtl) and EN (ltr) share one stylesheet. */

:root{
  --maroon:#8A1538; --maroon-deep:#5C0F28; --maroon-soft:#F3E3E8; --maroon-tint:#F9EEF1;
  --ink:#1A1418; --ink-2:#4A3F45; --muted:#6B5F65;
  --sand:#F5F0E8; --sand-2:#EDE6DA; --white:#FFFFFF; --line:#D9CFC2; --line-2:#E8E0D4;
  --success:#1E7B5A; --success-soft:#E3F1EA; --warn:#B8741A; --warn-soft:#F7ECD9; --info:#2C5E8A; --info-soft:#E1EAF2;
  --bg:var(--sand); --surface:var(--white); --text:var(--ink); --text-2:var(--ink-2);
  --r-sm:8px; --r:12px; --r-lg:20px; --r-pill:999px;
  --shadow:0 16px 40px rgba(26,20,24,.14); --shadow-sm:0 4px 14px rgba(26,20,24,.08);
  --font-ar:'IBM Plex Sans Arabic'; --font-en:'IBM Plex Sans';
  --ease:cubic-bezier(.2,.7,.2,1); --t:200ms; --t-slow:420ms;
  --wrap:1200px; --gutter:24px; --header-h:68px;
}
@view-transition{ navigation:auto; }
::view-transition-old(root),::view-transition-new(root){ animation-duration:220ms; }

*,*::before,*::after{ box-sizing:border-box; }
html.i18n-pending body{ visibility:hidden; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
html[lang="ar"]{ font-family:var(--font-ar),'SF Arabic','Segoe UI',system-ui,sans-serif; }
html[lang="en"]{ font-family:var(--font-en),var(--font-ar),-apple-system,'Segoe UI',system-ui,sans-serif; }
body{ margin:0; background:var(--bg); color:var(--text); font-size:17px; line-height:1.7; font-weight:400; -webkit-font-smoothing:antialiased; min-height:100dvh; display:flex; flex-direction:column; }
html[lang="en"] body{ font-size:16px; line-height:1.55; }
main{ flex:1; }
img,svg{ display:block; max-width:100%; }
a{ color:var(--maroon); text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset:3px; }
h1,h2,h3,h4{ margin:0 0 .4em; line-height:1.2; font-weight:700; letter-spacing:-.005em; color:var(--text); }
h1{ font-size:44px; } h2{ font-size:30px; } h3{ font-size:20px; } h4{ font-size:17px; }
p{ margin:0 0 1em; }
ul{ margin:0; padding:0; list-style:none; }
button{ font:inherit; cursor:pointer; }
input,select,textarea{ font:inherit; color:inherit; }
:focus-visible{ outline:3px solid var(--maroon); outline-offset:2px; border-radius:4px; }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip{ position:absolute; inset-inline-start:16px; top:-60px; background:var(--maroon); color:#fff; padding:10px 16px; border-radius:var(--r-sm); z-index:100; }
.skip:focus{ top:12px; }
.wrap{ max-width:var(--wrap); margin-inline:auto; padding-inline:var(--gutter); width:100%; }
.muted{ color:var(--muted); }
.small{ font-size:14px; }
.num{ font-variant-numeric:tabular-nums; unicode-bidi:isolate; }
.eyebrow{ font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--maroon); margin-bottom:10px; }
html[lang="ar"] .eyebrow{ letter-spacing:0; }
.section{ padding-block:64px; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:28px; }
.section-head p{ margin:0; max-width:56ch; color:var(--text-2); }
.grid{ display:grid; gap:20px; }
.grid > *, .two-col > *, .journey > *, .hero-grid > *, .assistant-page > *{ min-width:0; }
.grid-2{ grid-template-columns:repeat(2,1fr); } .grid-3{ grid-template-columns:repeat(3,1fr); } .grid-4{ grid-template-columns:repeat(4,1fr); }
.row{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.two-col{ display:grid; grid-template-columns:1.6fr 1fr; gap:20px; align-items:start; }
.between{ justify-content:space-between; }

/* ---------- header ---------- */
.site-header{ position:sticky; top:0; z-index:40; background:rgba(245,240,232,.9); backdrop-filter:saturate(1.4) blur(12px); -webkit-backdrop-filter:saturate(1.4) blur(12px); border-bottom:1px solid var(--line); }
#site-header{ display:block; min-height:calc(var(--header-h) + 1px); }
.site-header .inner{ display:flex; align-items:center; gap:28px; height:var(--header-h); }
.brand{ display:inline-flex; align-items:center; gap:12px; color:var(--text); font-weight:700; font-size:20px; letter-spacing:-.01em; }
.brand:hover{ text-decoration:none; }
.brand .mark{ width:38px; height:38px; flex:0 0 38px; }
.brand > span{ white-space:nowrap; }
.brand .sub{ display:block; font-size:12px; font-weight:500; color:var(--muted); letter-spacing:.02em; line-height:1.1; }
.nav{ display:flex; gap:26px; margin-inline-start:12px; }
.nav a{ color:var(--text-2); font-weight:500; font-size:15px; padding:6px 0; border-bottom:2px solid transparent; white-space:nowrap; }
.nav a:hover{ color:var(--text); text-decoration:none; }
.nav a[aria-current="page"]{ color:var(--maroon); border-color:var(--maroon); }
.nav a.only-mobile{ display:none; }
.header-actions{ margin-inline-start:auto; display:flex; align-items:center; gap:10px; }
.proto-ribbon{ display:none; }
.proto-pill{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:500; color:var(--muted); border:1px dashed var(--line); border-radius:var(--r-pill); padding:4px 10px; white-space:nowrap; }
.proto-pill::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--warn); }
.lang-toggle{ height:36px; min-width:44px; padding:0 12px; border:1px solid var(--line); background:var(--white); border-radius:var(--r-pill); font-weight:600; font-size:14px; color:var(--text-2); }
.lang-toggle:hover{ border-color:var(--ink-2); color:var(--text); }
.menu-btn{ display:none; width:44px; height:44px; border:1px solid var(--line); background:var(--white); border-radius:var(--r); align-items:center; justify-content:center; }
.menu-btn svg{ width:22px; height:22px; }

/* ---------- buttons, pills, cards ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; height:44px; padding:0 20px; border-radius:10px; border:1px solid transparent; font-weight:600; font-size:15px; line-height:1; white-space:nowrap; transition:background var(--t) var(--ease),border-color var(--t) var(--ease),transform var(--t) var(--ease),box-shadow var(--t) var(--ease); }
.btn:hover{ text-decoration:none; }
.btn:active{ transform:translateY(1px); }
.btn svg{ width:18px; height:18px; }
.btn-primary{ background:var(--maroon); color:#fff; }
.btn-primary:hover{ background:var(--maroon-deep); color:#fff; }
.btn-secondary{ background:var(--white); color:var(--text); border-color:var(--line); }
.btn-secondary:hover{ border-color:var(--ink-2); }
.btn-ghost{ background:transparent; color:var(--maroon); }
.btn-ghost:hover{ background:var(--maroon-tint); }
.btn-sm{ height:36px; padding:0 14px; font-size:14px; border-radius:8px; }
.btn-lg{ height:52px; padding:0 26px; font-size:16px; border-radius:12px; }
.btn-block{ width:100%; }
.pill{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; line-height:1; padding:6px 10px; border-radius:var(--r-pill); background:var(--sand-2); color:var(--text-2); white-space:nowrap; }
.pill::before{ content:''; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.7; }
.pill-success{ background:var(--success-soft); color:var(--success); }
.pill-warn{ background:var(--warn-soft); color:var(--warn); }
.pill-info{ background:var(--info-soft); color:var(--info); }
.pill-maroon{ background:var(--maroon-soft); color:var(--maroon); }
.pill.plain::before{ display:none; }
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:24px; }
.card-sm{ padding:18px; border-radius:var(--r); }
.card-link{ color:inherit; display:block; transition:transform var(--t) var(--ease),border-color var(--t) var(--ease),box-shadow var(--t) var(--ease); }
.card-link:hover{ text-decoration:none; transform:translateY(-2px); border-color:var(--maroon); box-shadow:var(--shadow-sm); }
.note{ font-size:13px; color:var(--muted); display:inline-flex; align-items:center; gap:6px; }
.note::before{ content:'i'; display:inline-flex; width:16px; height:16px; align-items:center; justify-content:center; border-radius:50%; border:1px solid var(--line); font-size:11px; font-weight:700; font-style:normal; }
.icon{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
html[dir="rtl"] .icon.flip{ transform:scaleX(-1); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.alert > .pill{ align-self:flex-start; }
.icon-wrap{ width:48px; height:48px; border-radius:14px; background:var(--maroon-soft); color:var(--maroon); display:inline-flex; align-items:center; justify-content:center; }
.icon-wrap .icon{ width:24px; height:24px; }
.divider{ height:1px; background:var(--line-2); margin-block:20px; }
.reveal{ opacity:0; transform:translateY(14px); transition:opacity .55s var(--ease),transform .55s var(--ease); }
.reveal.in{ opacity:1; transform:none; }

/* ---------- hero + search ---------- */
.hero{ padding-block:76px 56px; position:relative; }
.hero h1{ max-width:16ch; margin-bottom:12px; }
.hero .lead{ font-size:19px; color:var(--text-2); max-width:52ch; margin-bottom:28px; }
.search{ position:relative; max-width:760px; }
.search-input{ width:100%; height:66px; border:1px solid var(--line); background:var(--white); border-radius:16px; padding-inline:56px 128px; font-size:18px; box-shadow:var(--shadow-sm); transition:border-color var(--t),box-shadow var(--t); }
.search-input:focus{ outline:none; border-color:var(--maroon); box-shadow:0 0 0 4px var(--maroon-soft); }
.search .lead-icon{ position:absolute; inset-inline-start:20px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.search .submit{ position:absolute; inset-inline-end:9px; top:9px; height:48px; border-radius:12px; padding:0 18px; }
.search .hint{ position:absolute; inset-inline-end:118px; top:50%; transform:translateY(-50%); font-size:12px; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:2px 6px; display:none; }
.search-results{ position:absolute; inset-inline:0; top:calc(100% + 8px); background:var(--white); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); padding:8px; z-index:30; display:none; }
.search-results.open{ display:block; }
.search-results .res{ display:flex; align-items:center; gap:14px; padding:12px 12px; border-radius:10px; color:inherit; }
.search-results .res:hover,.search-results .res:focus{ background:var(--sand); text-decoration:none; }
.search-results .res .t{ font-weight:600; }
.search-results .res .a{ font-size:13px; color:var(--muted); }
.search-results .res .go{ margin-inline-start:auto; color:var(--maroon); font-weight:600; font-size:14px; }
.search-results .ask{ display:flex; align-items:center; gap:10px; padding:12px; border-top:1px solid var(--line-2); margin-top:4px; color:var(--maroon); font-weight:600; width:100%; background:none; border-inline:0; border-bottom:0; border-radius:0 0 12px 12px; text-align:start; }
.search-results .ask:hover{ background:var(--maroon-tint); }
.chips{ display:flex; gap:10px; flex-wrap:wrap; margin-top:18px; }
.chip{ height:38px; padding:0 14px; border-radius:var(--r-pill); border:1px solid var(--line); background:var(--white); font-size:14.5px; font-weight:500; color:var(--text-2); display:inline-flex; align-items:center; gap:8px; transition:border-color var(--t),color var(--t),background var(--t); }
.chip:hover{ border-color:var(--maroon); color:var(--maroon); background:var(--maroon-tint); }
.hero-side{ display:grid; gap:12px; align-content:start; }
.stat-card{ display:flex; gap:14px; align-items:center; }
.stat-card b{ font-size:22px; display:block; line-height:1.1; }
.hero-grid{ display:grid; grid-template-columns:1.6fr 1fr; gap:48px; align-items:start; }

/* ---------- tiles / props / before-after / agencies ---------- */
.tile{ display:flex; flex-direction:column; gap:14px; min-height:200px; }
.tile .count{ margin-top:auto; font-size:13.5px; color:var(--muted); }
.tile h3{ margin:0; }
.tile p{ margin:0; color:var(--text-2); font-size:15px; }
.props .card{ display:flex; flex-direction:column; gap:12px; }
.props p{ margin:0; color:var(--text-2); font-size:15px; }
.ba{ display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; background:var(--white); }
.ba > div{ padding:28px; }
.ba .today{ background:var(--sand); border-inline-end:1px solid var(--line); }
.ba h3{ display:flex; align-items:center; gap:10px; }
.ba li{ display:flex; gap:12px; padding:10px 0; border-bottom:1px solid var(--line-2); align-items:flex-start; }
.ba li:last-child{ border-bottom:0; }
.ba .x{ color:var(--muted); font-weight:700; } .ba .ok{ color:var(--success); font-weight:700; }
.agencies{ display:flex; flex-wrap:wrap; gap:10px; }
.agency-chip{ display:inline-flex; align-items:center; gap:10px; padding:10px 16px; border:1px solid var(--line); background:var(--white); border-radius:var(--r-pill); font-weight:500; font-size:15px; }
.agency-chip i{ width:10px; height:10px; border-radius:50%; background:var(--success); }
.agency-chip.pending i{ background:var(--warn); }
.agency-chip.planned i{ background:var(--line); }

/* ---------- footer ---------- */
.site-footer{ border-top:1px solid var(--line); background:var(--sand-2); margin-top:48px; }
.site-footer .cols{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; padding-block:48px 32px; }
.site-footer h3{ font-size:14px; margin-bottom:12px; color:var(--text-2); }
.cta-panel .btn:focus-visible{ outline-color:#fff; outline-offset:3px; }
.site-footer li{ padding:4px 0; font-size:15px; }
.site-footer a{ color:var(--text-2); }
.site-footer .bottom{ border-top:1px solid var(--line); padding-block:18px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:13.5px; color:var(--muted); }

/* ---------- app pages (signed-in) ---------- */
.page-head{ padding-block:40px 24px; display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap; }
.page-head h1{ font-size:34px; margin-bottom:6px; }
.page-head .meta{ color:var(--muted); font-size:15px; }
.alert{ border-inline-start:4px solid var(--maroon); display:flex; flex-direction:column; gap:10px; }
.alert.warn{ border-inline-start-color:var(--warn); }
.alert.info{ border-inline-start-color:var(--info); }
.alert h3{ font-size:17px; margin:0; }
.alert p{ margin:0; font-size:15px; color:var(--text-2); }
.alert .actions{ display:flex; gap:8px; margin-top:auto; }
.timeline li{ display:grid; grid-template-columns:28px 1fr auto; gap:16px; padding:16px 0; border-bottom:1px solid var(--line-2); align-items:start; }
.timeline li:last-child{ border-bottom:0; }
.timeline .dot{ width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--sand-2); color:var(--muted); font-size:13px; font-weight:700; }
.timeline .dot.done{ background:var(--success-soft); color:var(--success); }
.timeline .dot.active{ background:var(--maroon-soft); color:var(--maroon); }
.timeline .dot.wait{ background:var(--warn-soft); color:var(--warn); }
.timeline .t{ font-weight:600; }
.timeline .m{ font-size:13.5px; color:var(--muted); }
.doc{ border-radius:var(--r-lg); overflow:hidden; border:1px solid var(--line); background:var(--white); display:flex; flex-direction:column; min-height:170px; }
.doc .band{ background:var(--maroon); color:#fff; padding:12px 16px; font-size:13px; font-weight:600; display:flex; justify-content:space-between; align-items:center; }
.doc .body{ padding:16px; display:flex; gap:14px; align-items:center; }
.doc .qr{ width:56px; height:56px; flex:0 0 56px; }
.doc b{ display:block; } .doc .m{ font-size:13px; color:var(--muted); }
.avatars{ display:flex; gap:12px; flex-wrap:wrap; }
.avatar{ display:flex; align-items:center; gap:10px; padding:8px 14px 8px 8px; border:1px solid var(--line); border-radius:var(--r-pill); background:var(--white); font-size:14.5px; }
.avatar i{ width:32px; height:32px; border-radius:50%; background:var(--maroon-soft); color:var(--maroon); display:inline-flex; align-items:center; justify-content:center; font-style:normal; font-weight:700; font-size:13px; }
.kv{ display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line-2); font-size:15px; }
.kv:last-child{ border-bottom:0; }
.kv b{ font-weight:600; }
.tabbar{ display:none; }

/* ---------- journey ---------- */
.journey{ display:grid; grid-template-columns:300px 1fr; gap:32px; padding-block:32px 64px; align-items:start; }
.steps{ position:sticky; top:calc(var(--header-h) + 24px); }
.steps li{ display:flex; gap:14px; padding:12px 0; align-items:flex-start; color:var(--muted); }
.steps li .n{ width:30px; height:30px; flex:0 0 30px; border-radius:50%; border:1.5px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; background:var(--white); }
.steps li.current{ color:var(--text); } .steps li.current .n{ border-color:var(--maroon); color:var(--maroon); }
.steps li.done{ color:var(--text-2); } .steps li.done .n{ background:var(--success); border-color:var(--success); color:#fff; }
.steps li b{ display:block; font-size:15px; } .steps li span{ font-size:13px; }
.progress{ height:6px; background:var(--sand-2); border-radius:3px; overflow:hidden; margin-bottom:24px; }
.progress i{ display:block; height:100%; background:var(--maroon); width:0; transition:width .6s var(--ease); }
.step-panel{ display:none; }
.step-panel.active{ display:block; animation:fade .35s var(--ease); }
@keyframes fade{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }
.field{ display:grid; gap:6px; margin-bottom:14px; }
.field label{ font-size:13.5px; font-weight:600; color:var(--text-2); }
.field .val{ min-height:48px; border:1px solid var(--line); border-radius:10px; background:var(--sand); padding:10px 14px; display:flex; align-items:center; justify-content:space-between; gap:6px 12px; flex-wrap:wrap; font-size:15.5px; }
.field .val .src{ font-size:12px; color:var(--success); font-weight:600; }
.switch{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; }
.switch input{ appearance:none; width:46px; height:26px; border-radius:13px; background:var(--line); position:relative; cursor:pointer; transition:background var(--t); flex:0 0 46px; margin:0; }
.switch input::after{ content:''; position:absolute; top:3px; inset-inline-start:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition:transform var(--t) var(--ease); }
.switch input:checked{ background:var(--success); }
html[dir="rtl"] .switch input:checked::after{ transform:translateX(-20px); }
html[dir="ltr"] .switch input:checked::after{ transform:translateX(20px); }
.rail{ display:grid; gap:0; }
.rail li{ display:grid; grid-template-columns:36px 1fr auto; gap:16px; align-items:center; padding:16px 0; border-bottom:1px solid var(--line-2); }
.rail li:last-child{ border-bottom:0; }
.rail .node{ width:36px; height:36px; border-radius:50%; border:1.5px solid var(--line); background:var(--white); display:flex; align-items:center; justify-content:center; color:var(--muted); transition:all .4s var(--ease); position:relative; }
.rail .node svg{ width:18px; height:18px; }
.rail li.running .node{ border-color:var(--maroon); color:var(--maroon); }
.rail li.running .node::after{ content:''; position:absolute; inset:-5px; border-radius:50%; border:2px solid var(--maroon-soft); animation:pulse 1.2s ease-out infinite; }
.rail li.done .node{ background:var(--success); border-color:var(--success); color:#fff; }
@keyframes pulse{ 0%{ transform:scale(.85); opacity:1;} 100%{ transform:scale(1.25); opacity:0;} }
.rail b{ display:block; font-size:16px; } .rail .m{ font-size:13.5px; color:var(--muted); }
.rail .st{ font-size:13px; font-weight:600; color:var(--muted); min-width:92px; text-align:end; }
.rail li.running .st{ color:var(--maroon); } .rail li.done .st{ color:var(--success); }
.fee{ border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.fee .kv{ padding:12px 16px; } .fee .total{ background:var(--sand); font-weight:700; }
.success-mark{ width:88px; height:88px; margin:8px auto 20px; }
.success-mark circle{ stroke:var(--success); stroke-width:3; fill:var(--success-soft); }
.success-mark path{ stroke:var(--success); stroke-width:4; fill:none; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:60; stroke-dashoffset:60; animation:draw .7s .2s var(--ease) forwards; }
@keyframes draw{ to{ stroke-dashoffset:0; } }
.tracking-no{ font-size:28px; font-weight:700; letter-spacing:.04em; font-variant-numeric:tabular-nums; }

/* ---------- assistant ---------- */
.fab{ position:fixed; inset-inline-end:24px; bottom:24px; z-index:45; height:56px; padding:0 20px 0 16px; border-radius:28px; border:0; background:var(--maroon); color:#fff; display:inline-flex; align-items:center; gap:10px; font-weight:600; font-size:15px; box-shadow:0 10px 28px rgba(138,21,56,.32); transition:transform var(--t) var(--ease),background var(--t); }
html[dir="rtl"] .fab{ padding:0 16px 0 20px; }
.fab:hover{ background:var(--maroon-deep); transform:translateY(-2px); }
.fab .mark{ width:28px; height:28px; }
.scrim{ position:fixed; inset:0; background:rgba(26,20,24,.35); z-index:49; opacity:0; pointer-events:none; transition:opacity var(--t); }
.scrim.open{ opacity:1; pointer-events:auto; }
.drawer{ position:fixed; top:0; bottom:0; inset-inline-end:0; width:min(440px,100%); background:var(--white); z-index:50; display:flex; flex-direction:column; box-shadow:var(--shadow); transition:transform var(--t-slow) var(--ease); }
html[dir="rtl"] .drawer{ transform:translateX(-102%); }
html[dir="ltr"] .drawer{ transform:translateX(102%); }
html[dir] .drawer.open{ transform:none; }
.chat-head{ display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid var(--line-2); }
.chat-head .mark{ width:36px; height:36px; }
.chat-head b{ display:block; font-size:15px; line-height:1.2; }
.chat-head .m{ font-size:12.5px; color:var(--muted); }
.chat-head .close{ margin-inline-start:auto; width:38px; height:38px; border-radius:10px; border:1px solid var(--line); background:var(--white); display:inline-flex; align-items:center; justify-content:center; }
.chat-head .close svg{ width:18px; height:18px; }
.chat-log{ flex:1; overflow:auto; padding:18px 16px; display:flex; flex-direction:column; gap:12px; background:var(--sand); scroll-behavior:smooth; }
.msg{ flex-shrink:0; max-width:88%; padding:12px 14px; border-radius:16px; font-size:15px; line-height:1.6; white-space:pre-wrap; }
.msg.user{ align-self:flex-end; background:var(--maroon); color:#fff; border-end-end-radius:4px; }
.msg.agent{ align-self:flex-start; background:var(--white); border:1px solid var(--line); border-end-start-radius:4px; }
.msg.agent .caret{ display:inline-block; width:6px; height:16px; background:var(--maroon); vertical-align:-3px; margin-inline-start:2px; animation:blink .9s steps(2) infinite; }
@keyframes blink{ to{ opacity:0; } }
.typing{ flex-shrink:0; align-self:flex-start; background:var(--white); border:1px solid var(--line); border-radius:16px; border-end-start-radius:4px; padding:12px 16px; display:flex; gap:5px; }
.typing i{ width:7px; height:7px; border-radius:50%; background:var(--muted); animation:bounce 1.1s infinite; }
.typing i:nth-child(2){ animation-delay:.15s; } .typing i:nth-child(3){ animation-delay:.3s; }
@keyframes bounce{ 0%,60%,100%{ transform:translateY(0); opacity:.5;} 30%{ transform:translateY(-5px); opacity:1;} }
.svc-card{ flex-shrink:0; align-self:flex-start; width:88%; background:var(--white); border:1px solid var(--line); border-radius:14px; overflow:hidden; animation:fade .35s var(--ease); }
.svc-card .top{ padding:12px 14px; border-bottom:1px solid var(--line-2); display:flex; gap:10px; align-items:center; }
.svc-card .top b{ font-size:15px; display:block; line-height:1.3; }
.svc-card .top .m{ font-size:12.5px; color:var(--muted); }
.svc-card .rows{ padding:8px 14px; }
.svc-card .kv{ padding:7px 0; font-size:14px; }
.svc-card .ready{ color:var(--success); font-weight:600; }
.svc-card .acts{ display:flex; gap:8px; padding:10px 14px 14px; }
.svc-card .acts .btn{ flex:1; }
.mini-steps{ display:flex; flex-direction:column; gap:8px; padding:4px 0; }
.mini-steps div{ display:flex; gap:10px; align-items:center; font-size:14px; }
.mini-steps i{ width:18px; height:18px; border-radius:50%; flex:0 0 18px; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-style:normal; font-weight:700; border:1.5px solid var(--line); color:var(--muted); }
.mini-steps .done i{ background:var(--success); border-color:var(--success); color:#fff; }
.mini-steps .active i{ border-color:var(--maroon); color:var(--maroon); }
.chat-chips{ display:flex; gap:8px; padding:10px 16px 0; overflow:auto; scrollbar-width:none; }
.chat-chips .chip{ height:34px; font-size:13.5px; flex:0 0 auto; }
.chat-form{ display:flex; gap:8px; padding:12px 16px; border-top:1px solid var(--line-2); background:var(--white); }
.chat-form input{ flex:1; height:46px; border:1px solid var(--line); border-radius:12px; padding:0 14px; font-size:15px; background:var(--sand); }
.chat-form input:focus{ outline:none; border-color:var(--maroon); background:var(--white); }
.chat-form button{ width:46px; height:46px; border-radius:12px; border:0; background:var(--maroon); color:#fff; display:inline-flex; align-items:center; justify-content:center; }
.chat-form button svg{ width:20px; height:20px; }
.chat-foot{ font-size:11.5px; color:var(--muted); text-align:center; padding:0 16px 10px; background:var(--white); }
/* full page assistant */
.assistant-page{ display:grid; grid-template-columns:1fr 340px; gap:28px; padding-block:32px 64px; }
.assistant-page .panel{ border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; background:var(--white); display:flex; flex-direction:column; height:min(72vh,760px); }
.assistant-page .panel .chat-log{ flex:1; }

/* ---------- services ---------- */
.filters{ display:grid; grid-template-columns:1fr auto auto auto; gap:12px; align-items:center; margin-bottom:24px; }
.filters input,.filters select{ height:48px; border:1px solid var(--line); border-radius:12px; background:var(--white); padding:0 14px; font-size:15px; min-width:0; }
.filters select{ width:200px; text-overflow:ellipsis; }
.filters input{ min-width:160px; }
.filters input:focus,.filters select:focus{ outline:none; border-color:var(--maroon); box-shadow:0 0 0 4px var(--maroon-soft); }
.seg{ display:inline-flex; border:1px solid var(--line); border-radius:12px; background:var(--white); padding:4px; gap:2px; }
.seg button{ height:38px; padding:0 14px; border-radius:9px; border:0; background:transparent; font-weight:500; font-size:14.5px; color:var(--text-2); }
.seg button[aria-pressed="true"]{ background:var(--maroon); color:#fff; }
.svc{ display:flex; flex-direction:column; gap:10px; min-height:190px; }
.svc .agency{ font-size:13px; color:var(--muted); }
.svc h2, .svc h3{ font-size:17px; margin:0; }
.svc .meta{ display:flex; gap:14px; font-size:13.5px; color:var(--text-2); margin-top:auto; }
.svc .meta span{ display:inline-flex; gap:6px; align-items:center; }
.svc .meta svg{ width:16px; height:16px; }
.empty{ text-align:center; padding:48px; color:var(--muted); }

/* ---------- track ---------- */
.stepper{ display:grid; grid-template-columns:repeat(3,1fr); gap:0; position:relative; margin:8px 0 28px; }
.stepper::before{ content:''; position:absolute; top:22px; inset-inline:16%; height:2px; background:var(--line); }
.stepper li{ position:relative; text-align:center; padding:0 8px; }
.stepper .node{ width:46px; height:46px; margin:0 auto 10px; border-radius:50%; background:var(--white); border:2px solid var(--line); display:flex; align-items:center; justify-content:center; color:var(--muted); position:relative; }
.stepper .node svg{ width:20px; height:20px; }
.stepper li.done .node{ background:var(--success); border-color:var(--success); color:#fff; }
.stepper li.active .node{ border-color:var(--maroon); color:var(--maroon); box-shadow:0 0 0 6px var(--maroon-soft); }
.stepper b{ display:block; font-size:15px; } .stepper .m{ font-size:13px; color:var(--muted); }

/* ---------- cockpit (dark) ---------- */
.theme-dark{ --bg:#1A1418; --white:#241C21; --surface:#241C21; --text:#F5F0E8; --text-2:#D9CFC2; --muted:#A89AA0; --line:#3A3035; --line-2:#2F272C; --sand:#201A1E; --sand-2:#2C2429; --maroon-soft:#3E1A28; --maroon-tint:#2E1620; --success-soft:#1C3A2E; --warn-soft:#3B2E1A; --info-soft:#1C2C3A; }
.theme-dark .site-header{ background:rgba(26,20,24,.86); }
.theme-dark .brand,.theme-dark h1,.theme-dark h2,.theme-dark h3,.theme-dark h4{ color:var(--text); }
.theme-dark .nav a{ color:var(--text-2); } .theme-dark .nav a[aria-current="page"]{ color:#fff; border-color:#fff; }
.theme-dark .lang-toggle,.theme-dark .menu-btn{ background:var(--surface); color:var(--text); }
.theme-dark .btn-secondary{ background:var(--surface); color:var(--text); }
.theme-dark .site-footer{ background:#151013; }
.theme-dark .pill{ background:var(--sand-2); color:var(--text-2); }
.theme-dark .pill-success{ background:var(--success-soft); color:#6FC79F; }
.theme-dark .pill-warn{ background:var(--warn-soft); color:#E2A95A; }
.theme-dark .pill-maroon{ background:var(--maroon-soft); color:#F0A3B9; }
.theme-dark .agency-chip{ background:var(--surface); }
.theme-dark .svc-card .ready{ color:#6FC79F; }
.theme-dark :focus-visible{ outline-color:#F0A3B9; }
.kpi{ display:flex; flex-direction:column; gap:6px; }
.kpi .l{ font-size:14px; color:var(--muted); }
.kpi .v{ font-size:40px; font-weight:700; line-height:1.05; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.kpi .d{ font-size:14px; color:var(--text-2); display:flex; gap:8px; align-items:center; }
.kpi .d .up{ color:#6FC79F; font-weight:600; } .kpi .d .down{ color:#6FC79F; font-weight:600; }
.chart{ width:100%; height:auto; direction:ltr; }
.chart text{ font-family:inherit; font-size:12px; fill:var(--muted); }
.chart .bar-before{ fill:#4A3F45; } .chart .bar-after{ fill:#C8405E; }
.chart .axis{ stroke:var(--line); stroke-width:1; }
.chart .line{ fill:none; stroke:#F0A3B9; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.chart .area{ fill:#C8405E; fill-opacity:.16; }
.chart .pt{ fill:#F5F0E8; stroke:#C8405E; stroke-width:2; }
.legend{ display:flex; gap:18px; font-size:13.5px; color:var(--text-2); margin-top:10px; }
.legend i{ display:inline-block; width:12px; height:12px; border-radius:3px; margin-inline-end:6px; vertical-align:-1px; }
.heat{ display:grid; grid-template-columns:120px repeat(12,minmax(0,1fr)); gap:4px; align-items:center; font-size:12.5px; }
.heat .lbl{ color:var(--text-2); padding-inline-end:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.heat .cell{ aspect-ratio:1.4; border-radius:4px; background:rgba(200,64,94,var(--a,.1)); }
.heat .mo{ color:var(--muted); text-align:center; font-size:11px; overflow:hidden; white-space:nowrap; min-width:0; }
.board li{ display:grid; grid-template-columns:1fr auto; gap:12px; padding:12px 0; border-bottom:1px solid var(--line-2); align-items:center; font-size:15px; }
.board li:last-child{ border-bottom:0; }
.board .m{ font-size:13px; color:var(--muted); display:block; }

/* ---------- mobile ---------- */
@media (max-width: 1180px){
  #site-header{ min-height:calc(var(--header-h) + 36px); }
  .proto-pill{ display:none; }
  .nav{ gap:20px; margin-inline-start:4px; }
  .site-header .inner{ gap:20px; }
  .proto-ribbon{ display:block; height:35px; line-height:22px; padding:6px 16px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; text-align:center; font-size:13px; color:var(--text-2); background:var(--sand-2); border-bottom:1px solid var(--line); }
}
@media (max-width: 1080px){
  .grid-4{ grid-template-columns:repeat(2,1fr); }
  .hero-grid{ grid-template-columns:1fr; gap:28px; }
  .site-footer .cols{ grid-template-columns:1fr 1fr; }
  .assistant-page{ grid-template-columns:1fr; }
}
@media (max-width: 960px){
  .two-col{ grid-template-columns:1fr; }
  .nav{ display:none; }
  .menu-btn{ display:inline-flex; }
  .header-actions .btn-signin{ display:none; }
  .nav.mobile-open{ display:flex; position:absolute; top:100%; inset-inline:0; height:calc(100dvh - var(--header-h)); overflow:auto; background:var(--sand); flex-direction:column; padding:16px 24px 40px; gap:4px; z-index:39; margin:0; border-top:1px solid var(--line); }
  .nav.mobile-open a{ font-size:20px; padding:14px 0; border-bottom:1px solid var(--line-2); }
  .nav.mobile-open a.only-mobile{ display:block; color:var(--maroon); }
  .journey{ grid-template-columns:1fr; }
  .steps{ position:static; }
  .steps ul{ display:flex; gap:14px; overflow:auto; scrollbar-width:none; }
  .steps li{ flex:1 0 auto; padding:4px 0; }
  .steps li span{ display:none; }
  .filters{ grid-template-columns:1fr 1fr; }
  .filters input{ grid-column:1 / -1; }
  .filters .seg{ grid-column:1 / -1; display:flex; flex-wrap:wrap; }
  .seg button{ flex:1 1 auto; padding:0 10px; min-width:0; }
  .filters select{ min-width:0; width:100%; }
  body.app{ padding-bottom:76px; }
  .tabbar{ display:grid; grid-template-columns:repeat(4,1fr); position:fixed; bottom:0; inset-inline:0; background:var(--white); border-top:1px solid var(--line); z-index:44; padding:6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a{ display:flex; flex-direction:column; align-items:center; gap:3px; font-size:11.5px; font-weight:500; color:var(--muted); padding:6px 0; border-radius:10px; }
  .tabbar a svg{ width:22px; height:22px; }
  .tabbar a[aria-current="page"]{ color:var(--maroon); }
  body.app .fab{ bottom:88px; }
}
@media (max-width: 640px){
  :root{ --gutter:16px; --header-h:60px; }
  h1{ font-size:32px; } h2{ font-size:24px; }
  .hero{ padding-block:40px 36px; }
  .hero .lead{ font-size:16.5px; }
  .search-input{ height:58px; font-size:16px; padding-inline:48px 62px; }
  .search .lead-icon{ inset-inline-start:16px; }
  .search .submit{ padding:0 12px; height:42px; top:8px; inset-inline-end:8px; width:46px; }
  .search .submit span[data-i18n]{ display:none; }
  .grid-2,.grid-3,.grid-4{ grid-template-columns:1fr; }
  .grid-2.keep,.grid-4.keep{ grid-template-columns:1fr 1fr; }
  .ba{ grid-template-columns:1fr; } .ba .today{ border-inline-end:0; border-bottom:1px solid var(--line); }
  .site-footer .cols{ grid-template-columns:1fr; gap:20px; padding-block:32px 24px; }
  .section{ padding-block:40px; }
  .section-head{ flex-direction:column; align-items:flex-start; gap:8px; }
  .page-head h1{ font-size:26px; }
  .fab{ height:52px; padding:0 14px; inset-inline-end:16px; bottom:16px; }
  .fab .mark{ width:26px; height:26px; }
  .stepper{ grid-template-columns:1fr; gap:14px; }
  .stepper::before{ display:none; }
  .stepper li{ display:flex; gap:14px; text-align:start; align-items:center; }
  .stepper .node{ margin:0; flex:0 0 46px; }
  .heat{ grid-template-columns:72px repeat(12,minmax(0,1fr)); gap:3px; font-size:11px; }
  .heat .mo{ font-size:8.5px; }
  .kpi .v{ font-size:32px; }
  .brand{ font-size:17px; min-width:0; } .brand .sub{ display:none; } .brand > span{ overflow:hidden; text-overflow:ellipsis; }
  .site-header .inner{ gap:12px; }
  .card{ padding:18px; }
  .drawer{ width:100%; }
  .msg,.svc-card{ max-width:94%; width:94%; }
}
@media (max-width: 360px){
  .brand{ gap:8px; font-size:16px; }
  .brand .mark{ width:32px; height:32px; flex:0 0 32px; }
  .header-actions{ gap:8px; }
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
  .reveal{ opacity:1; transform:none; }
  .rail li.running .node::after{ display:none; }
  .success-mark path{ stroke-dashoffset:0; }
}
/* service filters: two-row layout below 1100px so long English labels never widen the page */
@media (max-width: 1100px){
  .filters{ grid-template-columns:1fr 1fr; }
  .filters input{ grid-column:1 / -1; min-width:0; }
  .filters .seg{ grid-column:1 / -1; display:flex; flex-wrap:wrap; }
  .filters .seg button{ flex:1 1 auto; padding:0 10px; min-width:0; }
  .filters select{ min-width:0; width:100%; }
}
