/* Muafa website: design tokens, layout, components. RTL, light/dark. */
:root {
  --brand: #1048a2;
  --brand-600: #0e4192;
  --brand-800: #0b3274;
  --brand-ink: #1048a2;
  --accent: #f59e0b;
  --mint: #10b981;
  --rose: #e11d48;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #5b6475;
  --bg: #f5f7fb;
  --bg-2: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e3e8f0;
  --soft: #eaf0fa;
  --glass: rgba(255, 255, 255, .72);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px rgba(16, 72, 162, .10), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 30px 80px rgba(16, 72, 162, .22);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1180px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-ink: #8db4ff;
    --ink: #e8edf7;
    --ink-2: #c3cde0;
    --muted: #94a2bb;
    --bg: #070d1b;
    --bg-2: #0c1528;
    --surface: #0f182c;
    --surface-2: #131e36;
    --line: #1f2b47;
    --soft: #15223f;
    --glass: rgba(12, 20, 38, .72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand-ink: #8db4ff;
  --ink: #e8edf7;
  --ink-2: #c3cde0;
  --muted: #94a2bb;
  --bg: #070d1b;
  --bg-2: #0c1528;
  --surface: #0f182c;
  --surface-2: #131e36;
  --line: #1f2b47;
  --soft: #15223f;
  --glass: rgba(12, 20, 38, .72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.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; z-index: 100; background: var(--accent); color: #111; padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--brand-ink);
  background: var(--soft); border: 1px solid var(--line);
  padding: 4px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.title-xl { font-size: clamp(36px, 6.4vw, 72px); font-weight: 700; letter-spacing: -.02em; }
.title-lg { font-size: clamp(30px, 4.4vw, 50px); font-weight: 700; }
.title-md { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.grad-text {
  background: linear-gradient(100deg, var(--brand-ink) 10%, #3b82f6 55%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(16, 72, 162, .35); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-2px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-ink); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { transform: translateY(-2px); }
.btn[aria-disabled="true"] { opacity: .8; cursor: default; }
.btn svg { width: 20px; height: 20px; flex: none; }
.play-btn { background: #0b1220; color: #fff; border-radius: 16px; padding: 10px 20px; text-align: start; line-height: 1.25; }
.play-btn small { display: block; font-size: 12px; font-weight: 400; opacity: .8; }
.play-btn strong { display: block; font-size: 17px; }
:root[data-theme="dark"] .play-btn { background: #fff; color: #0b1220; }

/* ------------------------------------------------------------ header (floating pill) */
.site-head { position: sticky; top: 0; z-index: 50; padding: 12px 0; transition: padding .25s; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 8px;
  padding-inline-start: 18px; box-shadow: var(--shadow-sm);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none !important; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); padding: 6px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 15px; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--soft); color: var(--brand-ink); }
.nav-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }
.nav .btn { padding: 9px 18px; font-size: 15px; }
@media (max-width: 920px) {
  .nav-links {
    position: absolute; inset-inline: 16px; top: 72px; flex-direction: column; align-items: stretch;
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 10px;
    box-shadow: var(--shadow-lg); display: none;
  }
  .nav-links.open { display: flex; animation: pop .2s ease; }
  .nav-links a { padding: 12px 16px; font-size: 17px; }
  .menu-btn { display: grid; }
  .nav .btn.hide-sm { display: none; }
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* ------------------------------------------------------------ hero */
.hero { padding: clamp(28px, 5vw, 60px) 0 clamp(60px, 8vw, 110px); position: relative; isolation: isolate; }
.hero-bg { position: absolute; inset: -120px 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.blob.b1 { width: 520px; height: 520px; background: #93c5fd; top: -80px; inset-inline-end: -120px; }
.blob.b2 { width: 420px; height: 420px; background: #fde68a; bottom: 0; inset-inline-start: -140px; animation-delay: -6s; opacity: .45; }
.blob.b3 { width: 360px; height: 360px; background: #a7f3d0; top: 30%; inset-inline-start: 35%; animation-delay: -12s; opacity: .35; }
:root[data-theme="dark"] .blob { opacity: .18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .blob { opacity: .18; } }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.08); } }
.grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%); opacity: .55;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 15px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 18px; height: 18px; color: var(--mint); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero-copy { text-align: center; } .hero .actions, .trust { justify-content: center; } .hero .lead { margin-inline: auto; } }

/* typing word swap */
.swap { display: inline-block; position: relative; min-width: 4ch; }
.swap-word { display: inline-block; animation: wordIn .5s cubic-bezier(.2, .8, .2, 1); }
.grad-text .swap-word {
  background: linear-gradient(100deg, var(--brand-ink) 10%, #3b82f6 55%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em;
}
.swap.grad-text { background: none; color: inherit; }
@keyframes wordIn { from { opacity: 0; transform: translateY(.4em); filter: blur(6px); } }

/* ------------------------------------------------------------ phone mockup */
.stage { position: relative; display: grid; place-items: center; perspective: 1400px; min-height: 560px; }
.phone {
  --w: 290px;
  width: var(--w); aspect-ratio: 780 / 1600; border-radius: 46px; padding: 11px;
  background: linear-gradient(145deg, #1e293b, #0b1220); box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, .08);
  position: relative; transform-style: preserve-3d; transition: transform .25s ease-out;
}
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 86px; height: 22px; transform: translateX(-50%); background: #0b1220; border-radius: 999px; z-index: 3; }
.phone .screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #fff; position: relative; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity .6s ease, transform .8s ease; }
.phone .screen img.on { opacity: 1; transform: none; }
.float-chip {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px;
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}
.float-chip small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.float-chip .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.float-chip .dot svg { width: 18px; height: 18px; }
.chip-1 { top: 70px; inset-inline-end: calc(50% + 120px); }
.chip-2 { bottom: 110px; inset-inline-start: calc(50% + 110px); animation-delay: -2s; }
.chip-3 { bottom: 30px; inset-inline-end: calc(50% + 90px); animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@media (max-width: 560px) { .phone { --w: 240px; } .stage { min-height: 500px; } .chip-1 { inset-inline-end: auto; inset-inline-start: 4px; top: 40px; } .chip-2 { inset-inline-start: auto; inset-inline-end: 0; } .chip-3 { display: none; } }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: width .3s, background .3s; }
.dots button[aria-current="true"] { width: 28px; background: var(--brand); }

/* ------------------------------------------------------------ persona switch */
.switch {
  display: inline-grid; grid-template-columns: 1fr 1fr; position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow-sm);
}
.switch button { position: relative; z-index: 1; border: 0; background: none; padding: 12px 26px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.switch button[aria-selected="true"] { color: #fff; }
.switch .pill { position: absolute; top: 6px; bottom: 6px; inset-inline-start: 6px; width: calc(50% - 6px); background: var(--brand); border-radius: 999px; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); box-shadow: 0 6px 16px rgba(16, 72, 162, .35); }
[dir="rtl"] .switch[data-side="1"] .pill { transform: translateX(-100%); }
.switch button svg { width: 18px; height: 18px; }
.persona-panel { display: none; }
.persona-panel.on { display: block; animation: fadeUp .5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* ------------------------------------------------------------ steps rail (home) */
.rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; counter-reset: s; }
.rail .step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; }
.rail .step::before { counter-increment: s; content: counter(s); position: absolute; inset-inline-end: 16px; top: 4px; font-size: 64px; font-weight: 700; color: var(--soft); line-height: 1.2; }
.rail .step h3 { font-size: 19px; position: relative; }
.rail .step p { color: var(--muted); font-size: 15.5px; margin: 0; position: relative; }
.rail .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--soft); color: var(--brand-ink); display: grid; place-items: center; margin-bottom: 14px; position: relative; }
.rail .ico svg { width: 24px; height: 24px; }
@media (max-width: 920px) { .rail { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .rail { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 44px; }
.tile {
  grid-column: span 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; position: relative; overflow: hidden; min-height: 210px; isolation: isolate;
  transition: transform .3s ease, box-shadow .3s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(59, 130, 246, .14), transparent 60%);
}
.tile:hover::after { opacity: 1; }
.tile.wide { grid-column: span 3; }
.tile.xl { grid-column: span 4; }
.tile.brand { background: linear-gradient(150deg, var(--brand), var(--brand-800)); color: #fff; border-color: transparent; }
.tile.brand p { color: rgba(255, 255, 255, .82); }
.tile h3 { font-size: 20px; }
.tile p { color: var(--muted); font-size: 15.5px; margin: 0; }
.tile .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: var(--soft); color: var(--brand-ink); }
.tile.brand .ico { background: rgba(255, 255, 255, .14); color: #fff; }
.tile .ico svg { width: 24px; height: 24px; }
@media (max-width: 920px) { .tile, .tile.wide, .tile.xl { grid-column: span 3; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .tile, .tile.wide, .tile.xl { grid-column: auto; } }
.mini-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.mini-row span { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.tile:not(.brand) .mini-row span { background: var(--soft); color: var(--brand-ink); }

/* ------------------------------------------------------------ simulator */
.sim {
  display: grid; grid-template-columns: 1fr 340px; gap: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); margin-top: 40px;
}
.sim-main { padding: clamp(20px, 3vw, 34px); min-width: 0; }
.sim-side { background: linear-gradient(170deg, var(--brand), var(--brand-800)); color: #fff; padding: 28px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.sim-side::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .06); top: -120px; inset-inline-start: -100px; }
@media (max-width: 920px) { .sim { grid-template-columns: 1fr; } }
.progress { display: flex; gap: 6px; margin-bottom: 22px; }
.progress span { flex: 1; height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; position: relative; }
.progress span::after { content: ""; position: absolute; inset: 0; background: var(--brand); transform: scaleX(0); transform-origin: right; transition: transform .45s ease; }
.progress span.done::after { transform: scaleX(1); }
.sim h3 { font-size: 21px; margin-bottom: 4px; }
.sim .hint { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice {
  border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 16px; padding: 14px; cursor: pointer;
  text-align: start; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, transform .2s, background .2s;
}
.choice:hover { border-color: var(--brand-ink); transform: translateY(-2px); }
.choice[aria-pressed="true"] { border-color: var(--brand); background: var(--soft); box-shadow: 0 0 0 3px rgba(16, 72, 162, .15); }
.choice:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; transform: none; }
.choice strong { font-size: 16px; }
.choice small { color: var(--muted); font-size: 13px; }
.choice .emo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--brand-ink); margin-bottom: 4px; }
.choice .emo svg { width: 20px; height: 20px; }
.times { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.times .choice { align-items: center; font-weight: 600; }
.sim-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.ticket { background: #fff; color: #0f172a; border-radius: 20px; padding: 18px; position: relative; }
.ticket .row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; gap: 10px; }
.ticket .row:last-child { border: 0; }
.ticket .row span:first-child { color: #64748b; }
.ticket .qr { width: 132px; height: 132px; margin: 6px auto 10px; }
.ticket.empty { background: rgba(255, 255, 255, .1); color: #fff; text-align: center; padding: 40px 18px; border: 2px dashed rgba(255, 255, 255, .3); }
.ticket.issued { animation: issue .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes issue { from { transform: translateY(30px) rotate(-3deg) scale(.9); opacity: 0; } }
.queue-badge { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.queue-badge b { font-size: 22px; }
.who { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ queue demo (hospitals) */
.board { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; margin-top: 40px; }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.board-top .win { display: flex; gap: 6px; }
.board-top .win i { width: 11px; height: 11px; border-radius: 50%; background: #f87171; }
.board-top .win i:nth-child(2) { background: #fbbf24; }
.board-top .win i:nth-child(3) { background: #34d399; }
.board-body { display: grid; grid-template-columns: 1fr 300px; }
@media (max-width: 920px) { .board-body { grid-template-columns: 1fr; } }
.q-list { list-style: none; margin: 0; padding: 16px; display: grid; gap: 10px; }
.q-item {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px;
  transition: background .3s, border-color .3s, opacity .3s;
}
.q-item .t { font-weight: 700; font-size: 15px; color: var(--brand-ink); text-align: center; }
.q-item .n { font-weight: 600; font-size: 15.5px; line-height: 1.4; }
.q-item .n small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.status { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.s-booked { background: var(--soft); color: var(--brand-ink); }
.s-waiting { background: #fef3c7; color: #92400e; }
.s-in { background: #dbeafe; color: #1d4ed8; }
.s-done { background: #dcfce7; color: #15803d; }
.s-missed { background: #ffe4e6; color: #be123c; }
.q-item.is-in { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.q-item.is-done { opacity: .6; }
.q-actions { padding: 16px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 920px) { .q-actions { border-inline-start: 0; border-top: 1px solid var(--line); } }
.q-actions .btn { width: 100%; }
.log { font-size: 13.5px; color: var(--muted); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; min-height: 92px; }
.log p { margin: 0 0 4px; }
.log p:first-child { color: var(--ink); font-weight: 600; }
.toast-phone {
  position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 60; max-width: 340px; display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-lg);
  transform: translateY(140%); transition: transform .5s cubic-bezier(.2, 1.2, .4, 1);
}
.toast-phone.show { transform: none; }
.toast-phone .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); padding: 6px; flex: none; }
.toast-phone b { display: block; font-size: 14.5px; }
.toast-phone span { font-size: 13.5px; color: var(--muted); line-height: 1.6; display: block; }

/* ------------------------------------------------------------ scrollytelling */
.story { display: grid; grid-template-columns: 1fr 380px; gap: 60px; align-items: start; }
.story-steps { display: grid; gap: 22vh; padding: 10vh 0 20vh; }
.story-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; opacity: .45; transform: scale(.97); transition: opacity .4s, transform .4s, box-shadow .4s, border-color .4s; }
.story-step.active { opacity: 1; transform: none; box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.story-step .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 14px; }
.story-step h3 { font-size: 23px; }
.story-step ul { padding-inline-start: 20px; margin: 0; color: var(--ink-2); }
.story-step li { margin: 6px 0; }
.story-step p { color: var(--ink-2); }
.story-phone { position: sticky; top: 110px; display: grid; place-items: center; }
.story-phone .phone { --w: 300px; }
.step-shot { display: none; }
.story-cap { text-align: center; margin-top: 14px; font-weight: 600; color: var(--muted); font-size: 15px; min-height: 1.8em; }
@media (max-width: 920px) {
  .story { grid-template-columns: 1fr; gap: 0; }
  .story-phone { display: none; }
  .step-shot { display: block !important; float: inline-end; width: 38%; max-width: 170px; margin: 0 0 10px; margin-inline-start: 14px; border-radius: 18px; border: 5px solid #0f172a; box-shadow: var(--shadow); aspect-ratio: 780 / 1300; object-fit: cover; object-position: top; }
  .story-step::after { content: ""; display: block; clear: both; }
  .story-steps { gap: 16px; padding: 10px 0 40px; }
  .story-step { opacity: 1; transform: none; }
  .story-cap { display: none; }
}

/* ------------------------------------------------------------ feature list / cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
@media (max-width: 920px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 19px; }
.card p, .card li { color: var(--muted); font-size: 15.5px; }
.card ul { padding-inline-start: 20px; margin: 0; }
.card .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--soft); color: var(--brand-ink); display: grid; place-items: center; margin-bottom: 14px; }
.card .ico svg { width: 24px; height: 24px; }

/* roles explorer */
.roles { display: grid; grid-template-columns: 300px 1fr; gap: 20px; margin-top: 36px; }
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } }
.role-tabs { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 860px) { .role-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; } }
.role-tab { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px 16px; text-align: start; cursor: pointer; display: flex; gap: 12px; align-items: center; transition: border-color .2s, background .2s; flex: none; }
.role-tab svg { width: 22px; height: 22px; color: var(--brand-ink); flex: none; }
.role-tab b { display: block; font-size: 16px; }
.role-tab small { color: var(--muted); font-size: 13px; }
.role-tab[aria-selected="true"] { border-color: var(--brand); background: var(--soft); box-shadow: inset 4px 0 0 var(--brand); }
[dir="rtl"] .role-tab[aria-selected="true"] { box-shadow: inset -4px 0 0 var(--brand); }
.role-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: none; }
.role-panel.on { display: block; animation: fadeUp .4s ease; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
@media (max-width: 600px) { .checks { grid-template-columns: 1fr; } }
.checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 7px; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231048a2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* timeline */
.timeline { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 23px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--brand), var(--accent)); }
.timeline li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 12px 0; position: relative; }
.timeline .n { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); display: grid; place-items: center; font-weight: 700; color: var(--brand-ink); z-index: 1; }
.timeline h3 { font-size: 19px; margin: 8px 0 4px; }
.timeline p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* ------------------------------------------------------------ stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { text-align: center; padding: 22px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(30px, 4vw, 42px); color: var(--brand-ink); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 14.5px; }

/* ------------------------------------------------------------ FAQ */
.faq { max-width: 820px; margin: 36px auto 0; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px; transition: box-shadow .3s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--brand-ink); display: grid; place-items: center; font-size: 20px; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }
.faq-search { display: flex; align-items: center; gap: 10px; max-width: 820px; margin: 24px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px; }
.faq-search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.faq-search input { border: 0; background: none; font: inherit; color: var(--ink); width: 100%; padding: 8px 0; outline: none; }
.faq-empty { text-align: center; color: var(--muted); display: none; }

/* ------------------------------------------------------------ CTA */
.cta {
  border-radius: 34px; padding: clamp(36px, 6vw, 70px); color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(800px 400px at 85% -10%, rgba(255, 255, 255, .16), transparent 60%), linear-gradient(140deg, var(--brand), var(--brand-800));
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
}
.cta p { color: rgba(255, 255, 255, .85); margin: 0; }
.cta .logo-bg { position: absolute; inset-inline-start: -60px; bottom: -80px; width: 320px; opacity: .08; z-index: -1; }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; text-align: center; } .cta .actions { justify-content: center; } }

/* ------------------------------------------------------------ legal pages */
.read-bar { position: fixed; top: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--brand)); transform-origin: right; transform: scaleX(0); z-index: 70; }
.legal-hero { padding: 40px 0 10px; }
.legal-hero .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.legal-hero .meta span { font-size: 14px; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.tldr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0 0; }
@media (max-width: 760px) { .tldr { grid-template-columns: 1fr; } }
.tldr div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.7; }
.tldr svg { width: 22px; height: 22px; color: var(--mint); flex: none; margin-top: 2px; }
.legal { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 30px 0 80px; align-items: start; }
@media (max-width: 920px) { .legal { grid-template-columns: 1fr; } .toc { display: none; } }
.toc { position: sticky; top: 100px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.toc b { display: block; font-size: 14px; color: var(--muted); margin: 0 6px 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 10px; border-radius: 10px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; text-decoration: none; }
.toc a.active { background: var(--soft); color: var(--brand-ink); font-weight: 600; }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: clamp(22px, 4vw, 44px); min-width: 0; }
.doc section { scroll-margin-top: 100px; padding-bottom: 8px; }
.doc section + section { border-top: 1px solid var(--line); padding-top: 22px; }
.doc h2 { font-size: 22px; display: flex; gap: 12px; align-items: center; }
.doc h2 .n { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--brand-ink); display: grid; place-items: center; font-size: 15px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul, .doc ol { padding-inline-start: 22px; }
.doc li { margin: 6px 0; }
.note { border-radius: 16px; padding: 14px 18px; background: var(--soft); border: 1px solid var(--line); font-size: 15.5px; }
.note.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
:root[data-theme="dark"] .note.warn { background: #2a1607; border-color: #7c2d12; color: #fdba74; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note.warn { background: #2a1607; border-color: #7c2d12; color: #fdba74; } }
.fill { background: #fef3c7; color: #92400e; padding: 0 6px; border-radius: 6px; font-weight: 600; }

/* deletion page */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } }
.path { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; position: relative; }
.path .tag { position: absolute; top: 18px; inset-inline-end: 18px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #dcfce7; color: #15803d; }
.path ol { padding-inline-start: 22px; margin: 0; }
.path li { margin: 8px 0; color: var(--ink-2); }
.kept { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .kept { grid-template-columns: 1fr; } }
.kept > div { border-radius: 22px; padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.kept h3 { display: flex; gap: 10px; align-items: center; font-size: 18px; }
.kept h3 i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; color: #fff; }
.kept ul { padding-inline-start: 20px; margin: 0; }
.kept li { color: var(--ink-2); margin: 5px 0; font-size: 15.5px; }

/* ------------------------------------------------------------ footer */
.site-foot { border-top: 1px solid var(--line); padding: 50px 0 30px; background: var(--surface); margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.site-foot h4 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-foot ul a { color: var(--ink-2); font-size: 15px; }
.site-foot .fine { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 34px; padding-top: 20px; color: var(--muted); font-size: 14px; }
.emergency { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); margin-top: 14px; }
.emergency svg { width: 18px; height: 18px; color: var(--rose); flex: none; }

/* ------------------------------------------------------------ reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* animated logo */
.logo-draw .stroke { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s cubic-bezier(.6, 0, .3, 1) forwards; }
.logo-draw .stroke.v { animation-delay: 1.1s; animation-duration: .7s; }
.logo-draw .head { transform-origin: 975px 636px; transform: scale(0); animation: grow .5s 1.7s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
