/* ============================================================
   Sera landing page — "instrument datasheet" art direction
   The site wears the product's own palette (tokens mirror
   dentacore/src/main/resources/styles/{dark,light}.json) and
   borrows its visual language from clinical paperwork:
   hairline rules, square corners, mono data voice, registration
   ticks, one brand blue. No gradients, no glows, no serif.
   ============================================================ */

:root, [data-theme="dark"] {
  /* ---- app tokens (mirror dark.json) ---- */
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --bg-0: #0f172a;
  --bg-1: #1e293b;
  --bg-2: #334155;
  --text-0: #f8fafc;
  --text-1: #e2e8f0;
  --text-2: #94a3b8;
  --border: #334155;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --scheduled: #8b5cf6;
  --confirmed: #3b82f6;

  /* ---- instrument layer ---- */
  --line-strong: #475569;
  --grid-line: rgba(148, 163, 184, .09);
  --deep: #0b1220;          /* deeper than bg-0: CTA floor */
}

[data-theme="light"] {
  /* ---- app tokens (mirror light.json) ---- */
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --bg-0: #ffffff;
  --bg-1: #f8fafc;
  --bg-2: #f1f5f9;
  --text-0: #0f172a;
  --text-1: #334155;
  --text-2: #64748b;
  --border: #e2e8f0;
  --success: #059669;
  --warning: #d97706;
  --error: #dc2626;
  --scheduled: #7c3aed;
  --confirmed: #2563eb;

  /* ---- instrument layer ---- */
  --line-strong: #cbd5e1;
  --grid-line: rgba(71, 85, 105, .13);
  --deep: #0f172a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: var(--bg-0);
  scrollbar-color: var(--line-strong) var(--bg-0);
  scrollbar-width: thin;
}

body {
  font-family: 'Readex Pro', 'Segoe UI', system-ui, sans-serif;
  color: var(--text-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- Custom themed scrollbar (WebKit) ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--line-strong); border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

::selection { background: var(--primary); color: #fff; }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px dashed var(--primary); outline-offset: 3px;
}

/* ---- Scroll progress bar: calibration stroke ---- */
#progressBar {
  position: fixed; top: 0; left: 0; z-index: 100;
  width: 100%; height: 2px;
  background: var(--primary);
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

.container { width: min(1140px, calc(100% - 48px)); margin-inline: auto; }
.container.narrow { width: min(780px, calc(100% - 48px)); }

/* ---------- Type ---------- */
h1 {
  font-size: clamp(2.45rem, 5vw, 3.85rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
}
h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.022em;
}
.lede { color: var(--text-2); font-size: 1.12rem; max-width: 54ch; margin-top: 22px; }
.accent { color: var(--primary); }

/* mono voice */
.eyebrow, .idx, .specimen, .tag, .step-num, .badge, .price, .lname small,
.mono, .cal-cell .cnt, .week-strip .day span {
  font-family: 'Fira Code', monospace;
}
.eyebrow {
  display: inline-flex; align-items: baseline;
  color: var(--text-2); font-weight: 500; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .16em; margin-bottom: 16px;
}
.eyebrow::before { content: '[ '; color: var(--primary); }
.eyebrow::after { content: ' ]'; color: var(--primary); }

/* highlighted term: a highlighter pen strike, not a gradient */
.hero-copy mark {
  background: var(--primary); color: #fff;
  padding: 0 .16em; margin-inline: .04em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-0) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.nav.scrolled {
  background: color-mix(in srgb, var(--bg-0) 96%, transparent);
  box-shadow: 0 1px 0 var(--line-strong);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-0); }
.brand-mark {
  display: grid; place-items: center;
  width: 31px; height: 31px; border-radius: 6px;
  background: var(--primary); color: #fff; flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand.small .brand-mark { width: 27px; height: 27px; border-radius: 5px; }
.brand.small .brand-mark svg { width: 17px; height: 17px; }
.brand-name { font-weight: 700; font-size: 1.18rem; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: .93rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 5px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); cursor: pointer;
  transition: color .12s, border-color .12s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .theme-toggle svg:last-of-type { display: none; }
[data-theme="light"] .theme-toggle svg:first-of-type { display: none; }

/* ---- Language picker ---- */
.lang-picker { position: relative; }
.lang-picker img { display: block; border-radius: 2px; object-fit: cover; }
#langFlag { width: 20px; height: 14px; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  background: var(--bg-0); border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 5px; min-width: 160px; display: none; z-index: 60;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 3px; border: none; cursor: pointer;
  background: transparent; color: var(--text-1);
  font-family: inherit; font-size: .9rem; text-align: start;
}
.lang-menu button:hover { background: var(--bg-2); color: var(--text-0); }
.lang-menu button.active { color: var(--primary); font-weight: 600; }

/* ---------- Buttons: squared instrument keys ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 4px; text-decoration: none;
  font-weight: 600; font-size: .95rem; font-family: inherit;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text-0); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text-0); background: var(--bg-1); }
.btn-outline { background: transparent; color: var(--text-0); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: #0f172a; border-color: #fff; }
.btn-light:hover { background: #e2e8f0; border-color: #e2e8f0; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 96px; overflow: hidden; }
/* graph paper, plotted then fading out */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(to bottom, black 25%, transparent 90%);
  mask-image: linear-gradient(to bottom, black 25%, transparent 90%);
}
.hero > .container { position: relative; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px; align-items: center;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-meta {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px;
  margin-top: 26px; color: var(--text-2); font-size: .87rem;
}
.hero-meta li { display: flex; align-items: center; gap: 9px; }
.hero-meta li::before {
  content: ''; width: 6px; height: 6px; background: var(--primary);
  display: inline-block; flex-shrink: 0;
}

/* spec strip: product vocabulary in mono */
.specimen {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 0; margin-top: 32px; padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  font-size: .72rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-2);
}
.specimen li { display: flex; align-items: center; }
.specimen li + li::before { content: '/'; margin-inline: 11px; color: var(--primary); }

/* ---------- Mock app window (echoes the desktop client) ---------- */
.hero-app {
  border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 30px 70px rgba(2, 6, 23, .45);
  transition: opacity .6s ease, translate .6s ease, transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
[data-theme="light"] .hero-app { box-shadow: 0 30px 70px rgba(15, 23, 42, .14); }
.hero-app.reveal { translate: 0 26px; }
.hero-app.reveal.in { translate: 0 0; }
.hero-app.reveal.in:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 36px 80px rgba(2, 6, 23, .55);
}
[data-theme="light"] .hero-app.reveal.in:hover { box-shadow: 0 36px 80px rgba(15, 23, 42, .18); }

.app-chrome {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
}
.app-chrome .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.app-chrome::after {
  content: 'SERA / CONSOLE \2014  v0.8';
  margin-left: auto; font-family: 'Fira Code', monospace;
  font-size: .62rem; letter-spacing: .14em; color: var(--text-2);
}
[dir="rtl"] .app-chrome::after { margin-left: 0; margin-right: auto; }

.app-body { display: grid; grid-template-columns: 150px 1fr; min-height: 380px; }
.app-side {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 10px;
  background: var(--bg-0); border-right: 1px solid var(--border);
  font-size: .82rem;
}
.side-item {
  display: flex; align-items: center; gap: 9px;
  color: var(--text-2); padding: 8px 12px; border-radius: 4px; white-space: nowrap;
  background: transparent; border: none; font-family: inherit; font-size: inherit;
  text-align: left; cursor: pointer; transition: color .15s, background .15s;
}
.side-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.side-item:hover:not(.active) { color: var(--text-0); background: var(--bg-2); }
.side-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.side-end { margin-top: auto; }

.app-main { padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Interactive panels */
.app-panel { display: none; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.app-panel.visible { display: flex; animation: panelIn .22s ease; }
@keyframes panelIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-panel.visible { animation: none; }
}

/* Appointments — month calendar (mirrors desktop MonthView) */
.cal-wrap { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.cal-head { display: flex; justify-content: space-between; align-items: center; }
.cal-title { font-weight: 600; font-size: .86rem; }
.cal-week {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
  font-size: .6rem; color: var(--text-2); text-align: center;
  background: var(--bg-2); border-radius: 3px; padding: 4px 0;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr; gap: 3px; flex: 1;
}
.cal-cell {
  position: relative; border: 1px solid var(--border); border-radius: 3px;
  background: var(--bg-1); color: var(--text-1);
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 3px 5px 0 0; font-size: .66rem; line-height: 1.3;
  cursor: pointer; transition: border-color .12s ease;
}
.cal-cell:hover { border-color: var(--primary); z-index: 1; }
.cal-cell.off { opacity: .38; cursor: default; pointer-events: none; }
.cal-cell.today { color: var(--primary); font-weight: 700; border-color: var(--primary); }
.cal-cell .cnt {
  position: absolute; left: 5px; top: 50%; translate: 0 -50%;
  font-size: .58rem; color: var(--text-2);
}

/* Day drill-down (mirrors MonthViewCell -> DayView) */
.cal-dayview { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; animation: panelIn .22s ease; }
.day-back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border); border-radius: 3px;
  padding: 5px 11px; color: var(--text-2); cursor: pointer;
  font-family: inherit; font-size: .74rem;
}
.day-back:hover { color: var(--text-0); border-color: var(--primary); }
.day-back b { font-weight: 600; }
.day-back svg { width: 14px; height: 14px; }

/* Appointments week strip */
.week-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.week-strip .day {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1px solid var(--border); border-radius: 4px; padding: 8px 4px;
  font-size: .66rem; color: var(--text-2);
}
.week-strip .day span { font-size: .82rem; font-weight: 500; color: var(--text-0); }
.week-strip .day.today { border-color: var(--primary); background: rgba(59, 130, 246, .12); }
.week-strip .day.today span { color: var(--primary); }
.week-strip .day.off { opacity: .45; }
.pill.live {
  background: rgba(16, 185, 129, .15); color: var(--success);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.app-schedule.grow { flex: 1; }

/* Patients / Billing list rows */
.fake-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 9px 13px; font-size: .8rem; color: var(--text-2);
}
.fake-search svg { width: 13px; height: 13px; flex-shrink: 0; }
.list-rows { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lrow {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-0); border: 1px solid var(--border); border-radius: 4px;
  padding: 10px 14px; transition: border-color .15s;
  animation: rowIn .26s ease backwards;
}
.app-panel.visible .lrow:nth-child(1) { animation-delay: .04s; }
.app-panel.visible .lrow:nth-child(2) { animation-delay: .09s; }
.app-panel.visible .lrow:nth-child(3) { animation-delay: .14s; }
.app-panel.visible .lrow:nth-child(4) { animation-delay: .19s; }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .lrow { animation: none !important; } }
.lrow:hover { border-color: var(--primary); }
.avatar {
  width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  font-size: .68rem; font-weight: 700;
}
.av-blue   { background: var(--primary); }
.av-teal   { background: #14b8a6; }
.av-pink   { background: #ec4899; }
.av-indigo { background: #6366f1; }
.lname { display: flex; flex-direction: column; line-height: 1.3; font-size: .84rem; font-weight: 500; min-width: 0; }
.lname small { font-size: .64rem; color: var(--text-2); font-weight: 400; }
.lrow em { margin-left: auto; font-style: normal; font-size: .7rem; color: var(--text-2); white-space: nowrap; }
.mono { font-size: .68rem; color: var(--text-2); }

/* Status pills (billing) — reuse app status colors */
.pill { font-size: .68rem; padding: 2px 9px; border-radius: 3px; background: var(--bg-2); color: var(--text-2); }
.paid-pill   { background: rgba(16, 185, 129, .15);  color: var(--success); }
.partial-pill{ background: rgba(245, 158, 11, .15);  color: var(--warning); }
.unpaid-pill { background: rgba(239, 68, 68, .15);   color: var(--error); }

/* Inventory stock bars */
.lrow.col { flex-direction: column; align-items: stretch; gap: 7px; }
.stock {
  position: relative; height: 6px; border-radius: 2px;
  background: var(--bg-2); overflow: hidden;
}
.stock i {
  position: absolute; inset: 0 auto 0 0; border-radius: 2px;
  background: var(--primary);
}
.stock.low i { background: var(--error); }
.stock b {
  position: absolute; right: 0; top: -21px; font-size: .62rem;
  color: var(--error); font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}

/* Settings */
.settings-rows { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.srow {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-0); border: 1px solid var(--border); border-radius: 4px;
  padding: 12px 14px; font-size: .84rem;
}
.toggle {
  width: 34px; height: 20px; border-radius: 4px; background: var(--bg-2);
  position: relative; display: inline-block; transition: background .15s;
}
.toggle i {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 3px; background: #fff; transition: left .18s ease;
}
.toggle.on { background: var(--primary); }
.toggle.on i { left: 16px; }

.app-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.app-card {
  background: var(--bg-0); border: 1px solid var(--border); border-radius: 4px;
  padding: 14px; display: flex; flex-direction: column; gap: 2px;
}
.app-card .k { font-size: .72rem; color: var(--text-2); }
.app-card .v { font-size: 1.25rem; font-weight: 700; }
.app-card .v small { font-size: .75em; font-weight: 500; color: var(--text-2); }
.trend { font-size: .72rem; }
.trend.up { color: var(--success); }
.app-schedule {
  background: var(--bg-0); border: 1px solid var(--border); border-radius: 4px;
  padding: 14px; flex: 1;
}
.sched-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: .85rem; margin-bottom: 10px;
}
.app-schedule .row {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  font-size: .8rem; border-bottom: 1px solid var(--border); color: var(--text-1);
}
.app-schedule .row:last-child { border-bottom: none; }
.app-schedule .row.dim { color: var(--text-2); }
.app-schedule .row i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.app-schedule .row b { font-family: 'Fira Code', monospace; font-weight: 500; font-size: .74rem; }
.app-schedule .row em { margin-left: auto; font-style: normal; font-size: .72rem; color: var(--text-2); }

/* ---------- Sections: ruled datasheet heads ---------- */
.section { padding: 92px 0; }
.section.alt { background: var(--bg-1); border-block: 1px solid var(--border); }

.section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 52px; padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}
.sh-text { max-width: 620px; }
.sh-text p { color: var(--text-2); margin-top: 12px; font-size: 1.05rem; }
.idx {
  font-size: .82rem; font-weight: 500; color: var(--text-2);
  letter-spacing: .1em; flex-shrink: 0; padding-top: 10px;
}
.idx::before { content: '[ '; color: var(--primary); }
.idx::after { content: ' ]'; color: var(--primary); }

/* ---------- Features: parts-list rows, not cards ---------- */
.features { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); }
.features .card {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(180px, 230px) 1fr auto;
  gap: 20px; align-items: center;
  background: transparent; border: 0; border-top: 1px solid var(--border);
  border-radius: 0; padding: 24px 18px;
  transition: background .15s ease, box-shadow .15s ease;
}
.features .card:hover {
  background: var(--bg-1);
  box-shadow: inset 3px 0 0 var(--primary);
}
[dir="rtl"] .features .card:hover { box-shadow: inset -3px 0 0 var(--primary); }
.card-icon {
  width: 40px; height: 40px; border-radius: 5px; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
}
.card-icon svg { width: 20px; height: 20px; }
.ci-blue   { color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, transparent); }
.ci-teal   { color: #0d9488;        background: color-mix(in srgb, #0d9488 9%, transparent); }
.ci-green  { color: var(--success); background: color-mix(in srgb, var(--success) 9%, transparent); }
.ci-orange { color: #ea580c;        background: color-mix(in srgb, #ea580c 9%, transparent); }
.ci-indigo { color: #6366f1;        background: color-mix(in srgb, #6366f1 9%, transparent); }
.ci-pink   { color: #db2777;        background: color-mix(in srgb, #db2777 9%, transparent); }

.features .card h3 { font-size: 1.04rem; font-weight: 600; margin: 0; }
.features .card p { color: var(--text-2); font-size: .92rem; margin: 0; }
.tag {
  font-size: .66rem; letter-spacing: .1em; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 3px 8px; white-space: nowrap;
}

/* ---------- Steps: numbered pipeline with arrows ---------- */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.steps li {
  position: relative; background: var(--bg-0); border: 1px solid var(--border);
  border-radius: 5px; padding: 28px 26px;
  transition: border-color .15s ease;
}
.steps li:hover { border-color: var(--primary); }
.step-num {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 4px;
  border: 1.5px solid var(--primary); color: var(--primary);
  font-weight: 500; font-size: 1rem; margin-bottom: 18px;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}
.steps h3 { font-size: 1.06rem; font-weight: 600; margin-bottom: 8px; }
.steps p { color: var(--text-2); font-size: .92rem; }
.steps li:not(:last-child)::after {
  content: '\2192';
  position: absolute; top: 50%; left: calc(100% + 1px); translate: 0 -50%;
  font-family: 'Fira Code', monospace; font-size: 1.05rem;
  color: var(--line-strong); background: transparent; line-height: 1;
  padding: 0 1px;
}
[dir="rtl"] .steps li:not(:last-child)::after { content: '\2190'; }

/* ---------- Pricing: three panels, middle one inverted blue ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 5px;
  padding: 34px 30px;
}
.price-card.featured {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}
.price-card.featured h3 { color: #fff; }
.price-card.featured .for,
.price-card.featured .price span { color: rgba(255, 255, 255, .78); }
.price-card.featured li { color: rgba(255, 255, 255, .94); }
.price-card.featured li::before { color: #fff; }
.price-card.featured ul { border-top-color: rgba(255, 255, 255, .35); }
.badge {
  position: absolute; top: -12px; inset-inline-start: 24px;
  background: var(--deep); color: #fff;
  font-size: .64rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em;
  padding: 5px 10px; border-radius: 3px; white-space: nowrap;
}
.price-card h3 { font-size: 1.04rem; font-weight: 600; color: var(--text-2); }
.price { font-size: 2.15rem; font-weight: 500; letter-spacing: -.01em; margin: 12px 0 4px; }
.price span { font-family: 'Readex Pro', sans-serif; font-size: .95rem; font-weight: 500; color: var(--text-2); }
.price.custom { font-size: 1.8rem; }
.for { color: var(--text-2); font-size: .9rem; margin-bottom: 22px; }
.price-card ul {
  list-style: none; display: flex; flex-direction: column; gap: 11px;
  margin-bottom: 28px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.price-card li { display: flex; gap: 10px; font-size: .92rem; color: var(--text-1); }
.price-card li::before {
  content: '\2192'; color: var(--primary); flex-shrink: 0;
  font-family: 'Fira Code', monospace;
}
.price-card .btn { margin-top: auto; }
.price-card.featured .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
.price-card.featured .btn-primary:hover { background: var(--bg-2); border-color: var(--bg-2); }
.pricing-note { text-align: center; color: var(--text-2); margin-top: 38px; font-size: .95rem; }

/* ---------- FAQ: indexed ledger ---------- */
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); counter-reset: q; }
.faq {
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  border-radius: 0; padding: 0 2px; counter-increment: q;
}
.faq[open] { border-bottom-color: var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 21px 2px;
  font-weight: 600; font-size: 1rem; display: flex; justify-content: flex-start;
  align-items: baseline; gap: 16px;
}
.faq summary::before {
  content: 'Q.' counter(q, decimal-leading-zero);
  font-family: 'Fira Code', monospace; font-size: .78rem; font-weight: 500;
  color: var(--primary); flex-shrink: 0; letter-spacing: .05em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .q-toggle, .faq summary::after { margin-left: auto; }
.faq summary::after {
  content: '+'; font-size: 1.35rem; color: var(--text-2); font-weight: 400;
  transition: transform .15s; line-height: 1; font-family: 'Readex Pro', sans-serif;
}
.faq[open] summary::after { content: '\2212'; color: var(--primary); }
.faq p { color: var(--text-2); padding: 0 2px 22px; font-size: .95rem; max-width: 64ch; }

/* ---------- CTA band: the deep floor ---------- */
.cta-band {
  background: var(--deep); color: var(--text-0);
  border-top: 1px solid var(--border);
  padding: 100px 0; text-align: center;
  position: relative;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 30px 30px; opacity: .6;
}
.cta-inner { max-width: 640px; margin-inline: auto; position: relative; }
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.cta-band p { color: var(--text-2); margin: 16px 0 34px; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0; border-top: 1px solid var(--border); background: var(--bg-0); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.footer p { color: var(--text-2); font-size: .84rem; }
.footer-links { display: flex; gap: 22px; align-items: center; }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: .88rem; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 5px; }
.brand.small .brand-name { font-size: 1rem; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.2,.65,.3,1), transform .55s cubic-bezier(.2,.65,.3,1);
}
.reveal.in { opacity: 1; transform: none; }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] #progressBar { transform-origin: 100% 50%; }
[dir="rtl"] .side-item { text-align: right; }
[dir="rtl"] .lrow em,
[dir="rtl"] .app-schedule .row em { margin-left: 0; margin-right: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 52px; }
  .features .card { grid-template-columns: 44px 1fr; }
  .features .card .card-icon { grid-row: 1; grid-column: 1; }
  .features .card h3 { grid-row: 1; grid-column: 2; align-self: center; }
  .features .card p { grid-row: 2; grid-column: 2; }
  .features .card .tag { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps li:not(:last-child)::after { content: none; }
  .pricing { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .price-card.featured { order: -1; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .app-body { grid-template-columns: 110px 1fr; }
  .hero { padding: 60px 0 72px; }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 40px; }
  .idx { display: none; }
}
