/* Dr Outreach — identity system: clinical teal, ink, citation.
   Light is the default theme. Tokens are the single source of colour and type. */

:root {
  color-scheme: light;
  /* surfaces: cool clinical white, a hint of teal in the greys */
  --bg: #f5f8f9; --surface: #ffffff; --surface-2: #f0f5f6; --muted: #e7eff0;
  --line: #d8e3e5; --line-strong: #c0d0d3; --field: #6a7d84;
  /* ink */
  --ink: #0f1d23; --ink-2: #4a5c63;
  /* one brand family: medical teal. Buttons, links, accents and the mark all come from it. */
  --primary: #0f766e; --primary-hover: #115e59; --on-primary: #ffffff; --primary-soft: #e1f2ee;
  --accent: #0d6b64; --accent-hover: #0a524d; --accent-soft: #dcefeb; --accent-line: #14b8a6;
  --evidence: #0d9488;
  --ok: #166534; --ok-soft: #e6f4ea; --danger: #b91c1c; --danger-soft: #fbeaea;
  /* type: editorial serif for display, Plex for UI, mono for figure labels */
  --display: "Newsreader", "IBM Plex Serif", Georgia, serif;
  --sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, "Segoe UI", sans-serif;
  --serif: "Newsreader", "IBM Plex Serif", Georgia, serif;
  --arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --ar-display: "Almarai", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --brand-font: "Newsreader", "IBM Plex Serif", Georgia, serif; /* the wordmark: never swapped for Arabic */
  --radius-sm: 4px; --radius-md: 6px; --radius: 8px; --radius-pill: 99px;
  --shadow: 0 1px 0 rgba(15, 29, 35, .04), 0 1px 2px rgba(15, 29, 35, .05);
  --shadow-md: 0 1px 0 rgba(15, 29, 35, .05), 0 10px 22px -18px rgba(15, 29, 35, .40);
  --shadow-lg: 0 1px 0 rgba(15, 29, 35, .05), 0 28px 56px -42px rgba(15, 29, 35, .50);
  --ease: cubic-bezier(.22, .7, .2, 1);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1416; --surface: #111d20; --surface-2: #0e181b; --muted: #18272a;
  --line: #24363a; --line-strong: #33494e; --field: #7a8c91;
  --ink: #e6eeec; --ink-2: #a3b3b5;
  --primary: #2dd4bf; --primary-hover: #5eead4; --on-primary: #04302b; --primary-soft: #123a36;
  --accent: #5eead4; --accent-hover: #99f6e4; --accent-soft: #123a36; --accent-line: #2dd4bf;
  --evidence: #2dd4bf;
  --ok: #4ade80; --ok-soft: #11301e; --danger: #f87171; --danger-soft: #3a1618;
  --shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 1px 0 rgba(0, 0, 0, .5), 0 10px 22px -18px rgba(0, 0, 0, .8);
  --shadow-lg: 0 1px 0 rgba(0, 0, 0, .5), 0 28px 56px -42px rgba(0, 0, 0, .9);
}
html[lang="ar"] { --sans: var(--arabic); --display: var(--ar-display); --serif: var(--arabic); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { line-height: 1.75; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }
::selection { background: var(--accent-soft); color: var(--ink); }

/* figure labels: the mono caption line that runs through the whole product */
.kicker { font-family: var(--mono); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 500;
  color: var(--accent); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.kicker .fig { color: var(--ink-2); letter-spacing: .12em; }
.kicker::after { content: ""; height: 1px; flex: 1; max-width: 72px; background: var(--line-strong); }
html[lang="ar"] .kicker { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12.5px; font-weight: 600; }

/* ---- header and navigation ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; color: var(--ink); font-family: var(--brand-font);
  font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.mark { width: 30px; height: 30px; flex: none; }
/* the mark: a message bubble with a heartbeat pulse (never a cross or crescent) */
.mark rect { fill: var(--primary); }
.mark .bubble { fill: var(--on-primary); }
.mark .pulse { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* text for screen readers only */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Brand loader: the mark's pulse line traces itself like a monitor trace inside the message bubble.
   Shown only for waits over ~350 ms (shorter waits feel instant; a flashing spinner makes them feel slower).
   Still mark when the user prefers reduced motion. */
.dl-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 72px 16px; color: var(--ink-2); text-align: center; }
.dl-mark { width: 56px; height: 56px; animation: dl-breathe 1.6s var(--ease, ease-in-out) infinite; }
.dl-mark .pulse { stroke-dasharray: 40; stroke-dashoffset: 40; animation: dl-trace 1.6s cubic-bezier(.45, 0, .25, 1) infinite; }
.dl-label { font-size: 14px; font-weight: 500; letter-spacing: .01em; }
.dl-label::after { content: ""; display: inline-block; width: 1.2em; text-align: start; animation: dl-dots 1.6s steps(4, end) infinite; }
/* search: the wait is the main thing on screen until the first draft arrives */
.search-wait { margin-top: 14px; }
.search-wait .dl-loader { padding: 40px 16px 8px; }
.search-wait-note { margin: 0 0 28px; text-align: center; }
.search-wait .dl-mark { width: 72px; height: 72px; }
.status-line .dl-inline .dl-mark { width: 22px; height: 22px; }
.search-more { display: flex; justify-content: center; padding: 18px; color: var(--ink-2); font-weight: 500; }
.search-more .dl-inline .dl-mark { width: 26px; height: 26px; }
/* on a filled (primary) button the mark is drawn in reverse so it stays visible */
.primary .dl-mark rect { fill: var(--on-primary); }
.primary .dl-mark .bubble { fill: var(--primary); }
.primary .dl-mark .pulse { stroke: var(--on-primary); }
.dl-inline { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.dl-inline .dl-mark { width: 18px; height: 18px; animation: none; }
.dl-inline .dl-mark .pulse { stroke-width: 2.6; }
@keyframes dl-trace { 0% { stroke-dashoffset: 40; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -40; } }
@keyframes dl-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes dl-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@media (prefers-reduced-motion: reduce) {
  .dl-mark, .dl-mark .pulse, .dl-label::after { animation: none; }
  .dl-mark .pulse { stroke-dashoffset: 0; }
}
nav.main { display: flex; align-items: center; gap: 2px; }
nav.main a, .navbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-md);
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; background: none; border: 0; cursor: pointer; font-family: inherit; }
nav.main a:hover, .navbtn:hover { background: var(--muted); color: var(--ink); }
nav.main a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
/* credits balance: a pill with the coins icon, so it reads as a counter, not as plain text; amber when low */
nav.main a.credits { gap: 6px; min-height: 34px; padding: 0 12px 0 10px; margin-inline: 4px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--primary-soft); color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
nav.main a.credits b { font-size: 15px; font-weight: 700; }
nav.main a.credits span { font-weight: 500; font-size: 13px; color: var(--ink-2); }
nav.main a.credits .icon { width: 16px; height: 16px; }
nav.main a.credits:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
/* Arabic: table headers and status pills use the Arabic sans at a readable size (the mono caps style is for Latin) */
html[lang="ar"] th, html[lang="ar"] .pill { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
nav.main a.credits.low, nav.main a.credits.low:hover { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
@media (max-width: 760px) { nav.main a.credits { padding: 0 10px 0 8px; margin-inline: 2px; } }
.lang { font-weight: 600; }
.bottom { position: fixed; inset-inline: 0; bottom: 0; z-index: 10; display: none; background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center;
  color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 500; border-radius: var(--radius-md); }
.bottom a[aria-current="page"] { color: var(--primary); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  nav.main .hide-sm { display: none; }
  nav.main .nav-cta { display: inline-flex; padding: 0 10px; font-size: 14px; }
  .top { padding: 10px 16px; }
  .brand { gap: 8px; }
  .brand span { font-size: 16px; }
  nav.main { gap: 0; }
  nav.main .credits, nav.main .lang { font-size: 13px; padding: 0 8px; }
  .top { gap: 6px; }
  .bottom:not([hidden]) { display: flex; }
  main { padding-bottom: 96px !important; }
}

/* ---- layout ---- */
main { max-width: 1080px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-family: var(--display); font-size: 32px; line-height: 1.15; font-weight: 600; margin: 0 0 8px; letter-spacing: -.015em; }
h2 { font-family: var(--display); font-size: 20px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.01em; }
.lede { color: var(--ink-2); margin: 0 0 24px; max-width: 64ch; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.card-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; text-decoration: none; color: var(--ink); }
.card-link:hover { border-color: var(--primary); color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--ink-2); font-size: 14px; }
.small { font-size: 13px; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 6px 0; }
.note { background: var(--muted); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.note b { color: var(--ink); }

/* ---- forms ---- */
label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 14px; }
label > span:first-child { display: block; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; margin-top: 4px; }
input, select, textarea { width: 100%; min-height: 44px; background: var(--surface); color: var(--ink); border: 1px solid var(--field);
  border-radius: var(--radius-md); padding: 10px 12px; font: 15px var(--sans); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 96px; resize: vertical; }
select[multiple] { min-height: 132px; }
.ltr { direction: ltr; text-align: left; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 15px var(--sans); cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { background: var(--muted); color: var(--ink); }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
button.primary:hover, .btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.link { border: 0; background: none; min-height: 36px; padding: 0 6px; color: var(--primary); font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button.danger-link { color: var(--danger); }
button.danger-link:hover { text-decoration: underline; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.consent-ar { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.75; margin-top: 4px; font-family: var(--arabic); direction: rtl; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--surface); cursor: pointer; font-weight: 500; }
.chips input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--primary); }
.chips label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.choice { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.choice:hover { border-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input { width: 18px; min-height: 18px; height: 18px; margin: 0; margin-inline-end: 8px; accent-color: var(--primary); vertical-align: -3px; }
.choice b { font-size: 16px; }
.choice span { display: block; margin-top: 6px; color: var(--ink-2); font-weight: 400; }
.fact { display: grid; grid-template-columns: 1fr 190px 44px; gap: 8px; margin-bottom: 8px; }
@media (max-width: 560px) { .fact { grid-template-columns: 1fr 44px; } .fact select { grid-column: 1; grid-row: 2; } }
.icon-btn { padding: 0; width: 44px; }

/* ---- steps ---- */
.step { display: flex; align-items: center; gap: 10px; }
.step-done .step-n { background: var(--primary-soft); color: var(--primary); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--primary); color: var(--on-primary); font: 600 13px var(--mono); }
.cost { font-weight: 700; font-size: 17px; }

/* ---- status ---- */
.pill { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--radius-sm); background: var(--muted); color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.pill.approved, .pill.running { background: var(--primary-soft); color: var(--primary); }
.pill.sent, .pill.done, .pill.replied { background: var(--ok-soft); color: var(--ok); }
.pill.failed, .pill.declined, .pill.bounced { background: var(--danger-soft); color: var(--danger); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; }
.num { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.bar { height: 4px; background: var(--muted); border-radius: 0; overflow: hidden; margin: 10px 0 2px; }
.bar > i { display: block; height: 100%; background: var(--primary); }
.status-line { font-size: 14px; color: var(--ink-2); }

/* ---- review: source beside the email ---- */
.draft { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .draft { grid-template-columns: 330px 1fr; align-items: start; } .source { position: sticky; top: 76px; } }
.source { background: var(--muted); border-radius: var(--radius); padding: 16px; font-size: 14px; color: var(--ink); }
.source .who { font-weight: 600; font-size: 15px; }
.paper-title { font-family: var(--serif); font-size: 16px; line-height: 1.45; display: block; margin: 10px 0 2px; text-decoration: none; }
.paper-title:hover { text-decoration: underline; }
.paper-title .icon { width: 14px; height: 14px; vertical-align: -1px; }
.quote { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.6; border-inline-start: 2px solid var(--evidence); padding-inline-start: 12px; margin: 12px 0; color: var(--ink); }
.letter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.letter textarea { min-height: 320px; font: 15px/1.6 "IBM Plex Sans", system-ui, sans-serif; }
.letter-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-preview { white-space: pre-wrap; font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.draft-card.skipped, .draft-card.refunded { opacity: .55; }

/* ---- sign in ---- */
.auth { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; margin-top: 12px; }
@media (min-width: 900px) { .auth { grid-template-columns: 1.1fr .9fr; margin-top: 40px; } }
.auth h1 { font-size: 36px; }
.promises { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; }
.promises li { display: flex; gap: 12px; align-items: flex-start; }
.promises .icon { color: var(--accent); margin-top: 3px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink-2); font-weight: 600; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

.tagline { color: var(--accent); font-weight: 600; font-size: 15px; margin: 0 0 10px; }

/* ================= landing page ================= */
body.landing { background: var(--bg); }
body.landing main { max-width: none; padding: 0 !important; }
body.landing .top { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); }
.land { position: relative; overflow-x: clip; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* graph-paper field: the only "background art", kept flat and quiet */
.fx { position: absolute; inset: 0 0 auto; height: 900px; pointer-events: none; z-index: 0; overflow: hidden; }
.fx .grid-lines { position: absolute; inset: 0;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
                    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 96px 96px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(130% 76% at 72% 4%, #000 8%, transparent 68%);
  mask-image: radial-gradient(130% 76% at 72% 4%, #000 8%, transparent 68%); opacity: .75; }
.fx .wash { position: absolute; inset-inline-end: -180px; top: -260px; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 66%); }
.land > section, .land > footer { position: relative; z-index: 1; }

/* scroll reveal: short, precise */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero h1 em::after, .stamp, .mock-card { animation: none !important; }
}

/* header bits */
.navlink { background: none; border: 0; padding: 0 10px; min-height: 40px; border-radius: var(--radius-md); font: 500 15px var(--sans); color: var(--ink-2); cursor: pointer; }
.navlink:hover { background: var(--muted); color: var(--ink); }
.iconbtn { width: 40px; padding: 0; justify-content: center; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14.5px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .btn, button { transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); } }
.btn.primary:hover { transform: translateY(-1px); }

/* hero */
.hero { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 56px; }
.hero.wrap { padding: 84px 24px 92px; }
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; gap: 40px; } .hero.wrap { padding: 40px 20px 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 0; background: none; border: 0; box-shadow: none;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
html[lang="ar"] .eyebrow { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.hero h1 { font-family: var(--display); font-size: clamp(36px, 4.7vw, 58px); line-height: 1.04; letter-spacing: -.02em; font-weight: 500; margin: 0 0 22px; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--ink); position: relative; }
.hero h1 em::after { content: ""; position: absolute; inset-inline: -.06em; bottom: .04em; height: .09em; background: var(--accent-line);
  transform: scaleX(0); transform-origin: inline-start; animation: draw-rule .8s var(--ease) .45s forwards; }
@keyframes draw-rule { to { transform: scaleX(1); } }
.hero-lede { color: var(--ink-2); font-size: 17.5px; line-height: 1.62; max-width: 50ch; margin: 0 0 26px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; }
.chips-row li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-sm); background: transparent;
  border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; color: var(--ink-2); }
html[lang="ar"] .chips-row li { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.chips-row .icon { width: 13px; height: 13px; color: var(--accent); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.micro { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--ink-2); margin: 0; }
html[lang="ar"] .micro { font-family: var(--sans); font-size: 13px; letter-spacing: 0; }
.hero-art { position: relative; }

/* the specimen sheet: the sample email, framed like a figure in a paper */
.mock { position: relative; margin: 0; }
.mock-back { position: absolute; inset: 14px -14px -14px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); transform: rotate(-1.2deg); }
.mock-card { position: relative; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px 20px 18px; }
.mock-card::before, .mock-card::after { content: ""; position: absolute; width: 12px; height: 12px; border: 1px solid var(--ink); opacity: .55; }
.mock-card::before { top: -1px; inset-inline-start: -1px; border-width: 1px 0 0 1px; }
.mock-card::after { bottom: -1px; inset-inline-end: -1px; border-width: 0 1px 1px 0; }
/* sample email by purpose: tabs on the hero card; panels share one grid cell so the height never jumps */
.mock-tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -4px 0 14px; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-2); }
.mock-tabs button { flex: 1 0 auto; min-height: 32px; padding: 5px 10px; border: 0; border-radius: calc(var(--radius-sm) - 2px); background: transparent;
  color: var(--ink-2); font: 600 12.5px var(--sans); cursor: pointer; white-space: nowrap; transition: background-color .15s var(--ease), color .15s var(--ease); }
.mock-tabs button:hover { color: var(--ink); }
.mock-tabs button[aria-selected="true"] { background: var(--surface); color: var(--accent-hover); box-shadow: 0 1px 2px rgba(15, 29, 35, .08); }
.mock-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hero-art, .mock, .mock-card { min-width: 0; } /* let the tab row scroll inside the card instead of widening it */
.mock-tabs { max-width: 100%; }
@media (max-width: 560px) { .mock-tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; } } /* all four visible on phones */
.mock-panels { display: grid; }
.mock-panels > .mock-panel { grid-area: 1 / 1; }
.mock-panels > .mock-panel.off { visibility: hidden; }
.mock-body p.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { .mock-panel:not(.off) { animation: panelIn .2s var(--ease); } }
@keyframes panelIn { from { opacity: 0; } to { opacity: 1; } }
.mock-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--muted); color: var(--ink);
  font: 600 12px var(--mono); letter-spacing: .06em; flex: none; }
.mock-head .who { display: flex; flex-direction: column; line-height: 1.25; }
.mock-head .who b { font-size: 15px; }
.mock-head .who span { font-size: 12.5px; color: var(--ink-2); }
.mock-head .pill { margin-inline-start: auto; }
.mock-subject { font-weight: 600; font-size: 13.5px; margin: 14px 0 10px; color: var(--ink); }
.mock-body p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.mock-body p:first-child { color: var(--ink); }
.mock-source { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent-hover); font-size: 12.5px; font-weight: 600; line-height: 1.45;
  border-inline-start: 2px solid var(--accent); }
.mock-source .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.mock-note { margin: 10px 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); opacity: .8; }
html[lang="ar"] .mock-note { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; text-transform: none; }
/* the stamp replaces the floating pill: a rubber stamp, not a floating badge */
.float-badge { position: absolute; top: -20px; inset-inline-end: -10px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: var(--surface); border: 1px solid var(--accent); color: var(--accent-hover); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; transform: rotate(-3deg); box-shadow: var(--shadow); }
html[lang="ar"] .float-badge { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; text-transform: none; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (max-width: 980px) { .float-badge { top: -14px; inset-inline-end: 6px; } }

/* trust strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.strip ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 0 auto; padding: 0; max-width: 1140px; }
.strip li { display: flex; align-items: center; gap: 10px; padding: 18px 24px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-2); font-weight: 500; border-inline-start: 1px solid var(--line); }
.strip li:first-child { border-inline-start: 0; }
html[lang="ar"] .strip li { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.strip .icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
@media (max-width: 880px) {
  .strip ul { grid-template-columns: 1fr 1fr; }
  .strip li { padding: 14px 20px; border-top: 1px solid var(--line); }
  .strip li:nth-child(-n+2) { border-top: 0; }
  .strip li:nth-child(odd) { border-inline-start: 0; }
}

/* bands */
.band { padding: 92px 0; }
.band + .band { border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -.022em; font-weight: 500; margin: 0 0 14px; max-width: 24ch; }
.band .sub { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 58ch; margin: 0 0 44px; }
@media (max-width: 760px) { .band { padding: 56px 0; } .band .sub { font-size: 15.5px; margin-bottom: 28px; } }

/* steps: numbered figure panels, hairline top rule instead of a floating card */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-strong); }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step-card { position: relative; padding: 26px 26px 30px 0; border-inline-end: 1px solid var(--line); }
.step-card:last-child { border-inline-end: 0; }
.step-card + .step-card { padding-inline-start: 26px; }
@media (max-width: 880px) {
  .step-card { border-inline-end: 0; padding: 22px 0 24px; }
  .step-card + .step-card { padding-inline-start: 0; border-top: 1px solid var(--line); }
}
.step-card .step-n { display: block; width: auto; height: auto; background: none; color: var(--accent); border-radius: 0; font: 500 11px var(--mono); letter-spacing: .16em; margin-bottom: 18px; }
.step-card h3 { margin: 0 0 8px; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.step-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 34ch; }

/* features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line-strong); }
@media (max-width: 780px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 16px; padding: 26px 28px 28px 0; border-bottom: 1px solid var(--line); }
.feature:nth-child(even) { border-inline-start: 1px solid var(--line); padding-inline-start: 28px; }
@media (max-width: 780px) { .feature { padding: 22px 0; } .feature:nth-child(even) { border-inline-start: 0; padding-inline-start: 0; } }
.feature .tile { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-hover); display: grid; place-items: center; flex: none; border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); }
.feature .tile .icon { width: 16px; height: 16px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }

/* anatomy of one email */
.anatomy { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .anatomy { grid-template-columns: 1fr; gap: 40px; } }
.parts { list-style: none; counter-reset: p; padding: 0; margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.parts li { position: relative; padding-block: 16px; padding-inline: 52px 0; border-bottom: 1px solid var(--line); }
.parts li::before { counter-increment: p; content: counter(p, decimal-leading-zero); position: absolute; inset-inline-start: 0; top: 16px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--accent); direction: ltr; unicode-bidi: isolate; }
.parts b { display: block; font-size: 15.5px; margin-bottom: 3px; }
.parts span { color: var(--ink-2); font-size: 14px; line-height: 1.55; }

/* honest limits: a margin note, set off with the citation rule */
.limits { padding: 0; }
.limits.wrap { padding: 0 24px; }
.limits-inner { border: 1px solid var(--line-strong); border-inline-start: 2px solid var(--accent); padding: 28px 30px; background: var(--surface);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 880px) { .limits-inner { grid-template-columns: 1fr; gap: 20px; padding: 22px; } }
.limits-inner h2 { grid-column: 1 / -1; margin: 0 0 4px; font-size: 24px; font-weight: 600; }
.limits-inner p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.limits-inner b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* faq */
.faq-list { display: grid; gap: 0; max-width: 860px; border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line); background: none; overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--mono); font-size: 18px; color: var(--accent); line-height: 1; transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .ans { padding: 0 0 20px; color: var(--ink-2); font-size: 15px; line-height: 1.65; margin: 0; max-width: 70ch; }

/* start */
.start { padding: 24px 0 96px; }
.start-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 48px; align-items: center; }
@media (max-width: 940px) { .start-grid { grid-template-columns: 1fr; gap: 32px; } }
.start h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -.022em; font-weight: 500; margin: 0 0 12px; }
.start-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.start-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 15px; }
.start-list .icon { color: var(--accent); margin-top: 3px; flex: none; width: 16px; height: 16px; }
.auth-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.auth-card > .muted { margin: 0 0 18px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 30px 0 54px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--ink-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .foot-inner { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--brand-font); font-size: 15px; letter-spacing: -.01em; text-transform: none; }
.foot-brand .mark { width: 24px; height: 24px; }

/* anchor targets clear the sticky header */
#how, #why, #sample, #faq, #start { scroll-margin-top: 84px; }
@media (max-width: 600px) { .float-badge { display: none; } }

/* Arabic display type needs its own size and leading */
html[lang="ar"] .hero h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.45; letter-spacing: 0; font-weight: 800; max-width: 26ch; text-wrap: balance; }
html[lang="ar"] .hero h1 em { color: var(--accent); }
html[lang="ar"] .hero h1 em::after { display: none; }
html[lang="ar"] .band h2, html[lang="ar"] .start h2 { line-height: 1.45; letter-spacing: 0; max-width: 26ch; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] .step-card h3, html[lang="ar"] .num { letter-spacing: 0; }
/* Arabic hero and section subheadings use the heading family (Almarai), so the hero reads as one voice:
   heading 800, motto 700, description 400. Body text elsewhere stays IBM Plex Sans Arabic. */
html[lang="ar"] .hero-lede { font-family: var(--ar-display); font-weight: 400; font-size: 18px; line-height: 1.85; }
html[lang="ar"] .band .sub, html[lang="ar"] .site-head .sub, html[lang="ar"] .start .sub, html[lang="ar"] .site-cta .sub { font-family: var(--ar-display); font-weight: 400; line-height: 1.85; }

html[lang="ar"] .quote { font-style: normal; }
/* page-level figure label above an app page title */
.page-kicker { margin-bottom: 10px; }
.page-kicker::after { max-width: 40px; }
.foot-sig { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
html[lang="ar"] .foot-sig { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12px; }

html[data-theme="dark"] .fx .grid-lines { opacity: .38; }

/* ================= app components added after identity v1, drawn in the same language =================
   Flat, hairline borders, a 2px clay or ink rule for emphasis, mono figure labels, serif numbers. */
:root { --warn: #92400e; --warn-soft: #fdf1dc; --warn-line: #f1d6a5; }
html[data-theme="dark"] { --warn: #e8c27a; --warn-soft: #2a2213; --warn-line: #5c4a26; }

/* callouts: info / warn / danger, icon first, a rule on the reading-start side */
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line);
  border-inline-start: 2px solid var(--primary); border-radius: var(--radius-sm); line-height: 1.55; }
.note > .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--primary); }
.note.warn { background: var(--warn-soft); border-color: var(--warn-line); border-inline-start-color: var(--warn); color: var(--warn); }
.note.warn b, .note.warn > .icon { color: var(--warn); }
.note.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); border-inline-start-color: var(--danger); color: var(--danger); }
.note.danger > .icon { color: var(--danger); }
.note a { color: inherit; font-weight: 600; }

/* multi-select chip groups: nothing picked means "all" */
.picker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.picker-head b { font-size: 14px; }
.picker-sum { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
html[lang="ar"] .picker-sum { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.picker-sum button.link { min-height: 28px; font: 600 12px var(--sans); letter-spacing: 0; text-transform: none; color: var(--accent); }
.chips.scroll { max-height: 220px; overflow-y: auto; padding: 2px; }
.chips label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* stat tiles (home and admin): a figure, not a widget */
.stiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 0; margin-bottom: 18px;
  border-top: 1px solid var(--line-strong); border-inline-start: 1px solid var(--line); }
.stile { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); color: var(--ink); text-decoration: none;
  border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stile .ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); flex: none;
  background: var(--primary-soft); color: var(--primary); }
.stile .ic .icon { width: 16px; height: 16px; }
.stile .tl { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); line-height: 1.4; }
.stile .tn { display: block; font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stile .tn.tn-text { font-family: var(--sans); font-size: 16px; font-weight: 600; margin-top: 6px; }
.stile .tt { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.stile.ok .ic { background: var(--ok-soft); color: var(--ok); } .stile.ok .tn { color: var(--ok); }
.stile.warn .ic { background: var(--warn-soft); color: var(--warn); } .stile.warn .tn { color: var(--warn); }
.stile.danger .ic { background: var(--danger-soft); color: var(--danger); } .stile.danger .tn { color: var(--danger); }
.stile.ink .ic { background: var(--muted); color: var(--ink-2); }
a.stile:hover { background: var(--surface-2); }
a.stile:hover .tl { color: var(--accent); }
html[lang="ar"] .stile .tl { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12.5px; }

.empty { display: grid; place-items: center; gap: 8px; text-align: center; padding: 28px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--ink-2); }
.empty .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--muted); }
.badge-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-primary); font: 600 11px var(--mono); }

/* platform banner (maintenance and announcements) */
.banner { max-width: 1080px; margin: 16px auto 0; padding: 0 16px; }
.banner .note { margin-bottom: 8px; }
body.landing .banner { max-width: 1140px; padding: 0 24px; }

/* admin console: section index on the left like a table of contents */
.admin { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .admin { grid-template-columns: 200px 1fr; align-items: start; } .admin-nav { position: sticky; top: 76px; flex-direction: column; } }
.admin-nav { display: flex; gap: 2px; overflow-x: auto; padding: 0; border-top: 1px solid var(--line-strong); }
.admin-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; color: var(--ink-2); text-decoration: none;
  font-weight: 500; font-size: 15px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.admin-nav a:hover { color: var(--ink); background: var(--surface-2); }
.admin-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 2px 0 0 var(--accent); background: var(--surface); }
html[dir="rtl"] .admin-nav a[aria-current="page"] { box-shadow: inset -2px 0 0 var(--accent); }
@media (max-width: 899px) { .admin-nav { border-top: 0; border-bottom: 1px solid var(--line); } .admin-nav a { border-bottom: 0; } .admin-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); } }
.admin-main { min-width: 0; }
.admin-main h2 { margin-top: 10px; }
.num-sm { font-variant-numeric: tabular-nums; font-weight: 600; }
code { font: 12.5px var(--mono); background: var(--muted); padding: 1px 6px; border-radius: var(--radius-sm); }
@media (max-width: 760px) { .hide-sm-text { display: none; } }

/* ---- legal pages (privacy, terms) ---- */
.foot-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
body.legal-page .top { background: var(--surface); }
.legal { max-width: 720px; margin: 0 auto; padding: 48px 22px 72px; line-height: 1.65; color: var(--ink); }
.legal h1 { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 5vw, 44px); letter-spacing: -.02em; margin: 10px 0 12px; }
.legal .lede { color: var(--ink-2); font-size: 17px; margin: 0 0 28px; }
.legal h2 { font-family: var(--display); font-weight: 500; font-size: 22px; margin: 34px 0 8px; }
.legal p, .legal li { font-size: 15.5px; }
.legal ul { padding-inline-start: 20px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--accent); }
.legal code { font-family: var(--mono); font-size: 13px; background: var(--surface-2, rgba(0,0,0,.04)); padding: 1px 5px; border-radius: 4px; }
.legal .limited-use { border-inline-start: 3px solid var(--accent); padding: 12px 16px; background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 0 10px 10px 0; }
body.legal-page .foot-inner a { color: inherit; }

/* ---- sending pace ---- */
.pace { display: block; }
.pace summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.pace summary::after { content: "+"; font-family: var(--mono); color: var(--ink-2); }
.pace[open] summary::after { content: "−"; }
.pace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 16px; align-items: end; }
.pace-grid .check, .pace-grid .row { grid-column: 1 / -1; margin: 0; }

/* ---- admin console: side nav docked to the page edge, content uses the width ---- */
body.admin-mode main { max-width: none; padding: 0; }
@media (min-width: 900px) {
  body.admin-mode .admin { grid-template-columns: 240px minmax(0, 1fr); gap: 0; min-height: calc(100vh - var(--topbar, 61px)); align-items: stretch; }
  body.admin-mode .admin-nav { position: sticky; top: var(--topbar, 61px); align-self: start; height: calc(100vh - var(--topbar, 61px));
    padding: 24px 12px; border-top: 0; border-inline-end: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
  body.admin-mode .admin-nav a { border-radius: 8px; padding: 0 12px; }
  body.admin-mode .admin-main { padding: 32px clamp(24px, 4vw, 56px) 72px; max-width: 1240px; width: 100%; }
}
@media (max-width: 899px) { body.admin-mode .admin-main { padding: 20px 16px 56px; } body.admin-mode .admin-nav { padding: 0 8px; } }

/* "All" chip leads each picker */
.chips .chip-all { font-weight: 600; }
.chips .chip-all:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.chips .chip-all input { accent-color: var(--on-primary, #fff); }

/* hero motto under the headline */
.hero-motto { margin: -4px 0 18px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
html[lang="ar"] .hero-motto { font-family: var(--ar-display); font-size: clamp(18px, 1.7vw, 21px); line-height: 1.6; font-weight: 700; letter-spacing: 0; text-transform: none; }

/* ---- admin form grids ---- */
.grid2, .grid3 { display: grid; gap: 4px 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }

/* ---- pricing ---- */
.pricing-band { padding: 72px 0; border-top: 1px solid var(--line); }
.pricing-band h2, .plans-page h2 { margin: 6px 0 8px; }
.plans-page { margin-top: 28px; }
.plan-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius, 14px); }
.plan-card.hot { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 10px 30px -18px color-mix(in srgb, var(--primary) 70%, transparent); }
.plan-card h3 { margin: 0; font-size: 18px; }
.plan-tag { margin: 0; color: var(--ink-2); font-size: 14px; min-height: 20px; }
.plan-price { margin: 10px 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price b { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
html[lang="ar"] .plan-price b { font-family: var(--ar-display); }
.plan-price s { color: var(--ink-2); }
.plan-meta { margin: 0; font-size: 13px; color: var(--ink-2); }
.plan-card ul { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 8px; font-size: 14px; flex: 1; }
.plan-card li { display: flex; gap: 8px; align-items: flex-start; }
.plan-card li .icon { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 2px; }
.plan-cta { width: 100%; justify-content: center; }
.plan-badge { position: absolute; top: -11px; inset-inline-start: 18px; background: var(--primary); color: var(--on-primary); font-size: 12px;
  font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.promo-strip { display: inline-block; margin: 4px 0 10px; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: 13.5px; }
.plan-spots { margin: 4px 0 0; font-weight: 600; color: var(--accent); }
.plan-guarantee { display: flex; gap: 8px; align-items: center; margin-top: 18px; color: var(--ink-2); font-size: 14px; }
.plan-guarantee .icon { width: 18px; height: 18px; color: var(--accent); }
.free-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding: 16px 20px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius, 14px); background: var(--surface); }
.free-strip ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.free-strip li { display: flex; gap: 6px; align-items: center; }
.free-strip li .icon { width: 15px; height: 15px; color: var(--accent); }
@media (min-width: 900px) { .plan-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.admin-loading { display: grid; gap: 12px; margin-top: 8px; }
.admin-loading span { height: 64px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2, #eef3f4) 0%, var(--surface) 50%, var(--surface-2, #eef3f4) 100%);
  background-size: 200% 100%; animation: admin-shimmer 1.2s ease-in-out infinite; }
@keyframes admin-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .admin-loading span { animation: none; } }
.discount-out { display: flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--accent); }

.plan-badges { position: absolute; top: -11px; inset-inline-start: 18px; display: flex; gap: 6px; }
.plan-badges .plan-badge { position: static; }
.plan-badge.best { background: var(--accent); color: var(--on-primary); }
.plan-card.best:not(.hot) { border-color: var(--accent); }
.plan-save { padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; }

/* ---- pre-sign-up quick search and Google button ---- */
.qs { display: grid; gap: 2px; }
.qs label { margin-bottom: 8px; }
.qs-count { min-height: 22px; margin: 2px 0 12px; font-size: 14px; color: var(--ink-2); }
.qs-count b { color: var(--primary); font-size: 17px; }
.g-explain { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 12px; border-radius: 10px;
  background: var(--primary-soft); color: var(--ink); font-size: 13.5px; line-height: 1.5; }
.g-explain .icon { width: 18px; height: 18px; flex: none; color: var(--primary); margin-top: 1px; }
.g-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.g-logo { width: 18px; height: 18px; background: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; }
.qs-free { text-align: center; margin: 10px 0 0; }

/* ---- setup wizard ---- */
.wiz { max-width: 880px; margin: 0 auto; padding: 28px 18px 72px; }
.wiz-top { position: sticky; top: var(--topbar, 61px); z-index: 5; background: color-mix(in srgb, var(--bg, #f5f8f9) 92%, transparent);
  backdrop-filter: blur(8px); padding: 10px 0 6px; margin-bottom: 14px; }
.wiz-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; margin: 0 0 8px; }
.wiz-steps button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 4px 10px; background: none; border: 0;
  border-bottom: 3px solid var(--line); color: var(--ink-2); font: 500 13px var(--sans); text-align: start; min-height: 44px; cursor: pointer; }
.wiz-steps button:disabled { cursor: default; opacity: .7; }
.wiz-steps .done button { border-color: var(--accent); color: var(--ink); }
.wiz-steps .cur button { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.wz-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line-strong); }
.wz-n .icon { width: 14px; height: 14px; }
.cur .wz-n { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.done .wz-n { background: var(--primary-soft); color: var(--primary); border-color: var(--accent); }
.wiz-steps em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .wiz-steps em { display: none; } .wiz-steps button { justify-content: center; } }
.wiz-count { margin: 0; min-height: 22px; font-size: 14px; color: var(--ink-2); }
.wiz-count b { color: var(--primary); font-size: 18px; }
.wiz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 14px); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-lg); }
.wiz-card h1 { font-size: clamp(24px, 3vw, 32px); margin: 4px 0 8px; }
.wiz-card .lede { margin-top: 0; }
.wz-h2 { font-size: 16px; margin: 22px 0 10px; }
.wz-choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 16px; }
.wz-choices.compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 0; }
.wz-choice { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 18px; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; background: var(--surface); transition: border-color .15s, box-shadow .15s; min-height: 44px; }
.wz-choices.compact .wz-choice { padding: 12px 14px; flex-direction: row; align-items: center; }
.wz-choice input { position: absolute; opacity: 0; pointer-events: none; }
.wz-choice:hover { border-color: var(--line-strong); }
.wz-choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-soft); }
.wz-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.wz-choice b { font-size: 16px; }
.wz-choices.compact .wz-choice b { font-size: 14.5px; font-weight: 600; }
.wz-choice span:not(.wz-ic) { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.wz-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.wz-ic .icon { width: 20px; height: 20px; }
.wz-search { width: 100%; margin: 8px 0 14px; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 18px; gap: 12px; }
.wiz-nav .btn { min-width: 140px; justify-content: center; }
.wz-sum { display: grid; gap: 0; margin: 14px 0 18px; border-top: 1px solid var(--line); }
.wz-sum-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .wz-sum-row { grid-template-columns: 1fr auto; } .wz-sum-row .muted { grid-column: 1 / -1; } }
.mini-steps { margin: 6px 0 18px; padding-inline-start: 22px; display: grid; gap: 6px; color: var(--ink-2); }
.nav-signin, nav.main a.nav-signin { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 14px; }
.nav-signin:hover { background: var(--surface-2, rgba(0,0,0,.04)); }

/* =====================================================================
   Form controls, refreshed: softer borders, rounder corners, our own chevron and checkmarks,
   calm hover and a clear focus ring. Native popups follow the theme through color-scheme.
   ===================================================================== */
:root { color-scheme: light; --field-r: 10px; --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5c63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --mag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5c63' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
[data-theme="dark"] { color-scheme: dark;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3b3b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --mag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3b3b5' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304302b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

label > span:first-child { font-size: 13.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  border: 1px solid var(--line-strong); border-radius: var(--field-r); background-color: var(--surface);
  box-shadow: inset 0 1px 1px rgba(15, 29, 35, .04); padding: 11px 14px; line-height: 1.35;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease); }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover, select:hover, textarea:hover { border-color: var(--field); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 75%, transparent); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; background-color: var(--surface-2); }

/* dropdowns: no native arrow; a slim chevron that sits on the reading end */
select:not([multiple]) { appearance: none; -webkit-appearance: none; cursor: pointer; padding-inline-end: 42px;
  background-image: var(--chev); background-repeat: no-repeat; background-size: 16px; background-position: right 14px center;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
html[dir="rtl"] select:not([multiple]) { background-position: left 14px center; }
select:not([multiple]):focus { background-image: var(--chev); }
select option { background: var(--surface); color: var(--ink); }

/* search boxes carry a magnifier */
input[type="search"]:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { padding-inline-start: 40px; background-image: var(--mag); background-repeat: no-repeat; background-size: 16px;
  background-position: left 14px center; }
html[dir="rtl"] input[type="search"]:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { background-position: right 14px center; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* number fields: quieter spinners */
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { opacity: 0; }
input[type="number"]:hover::-webkit-inner-spin-button, input[type="number"]:focus::-webkit-inner-spin-button { opacity: .6; }

/* checkboxes and radios, drawn by us */
input[type="checkbox"], input[type="radio"] { appearance: none; -webkit-appearance: none; flex: none; display: inline-grid; place-content: center;
  width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; border: 1.5px solid var(--field); background: var(--surface);
  cursor: pointer; transition: background-color .12s, border-color .12s, box-shadow .12s; }
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--primary); }
input[type="checkbox"]:checked { background: var(--primary) var(--tick) center / 14px no-repeat; border-color: var(--primary); }
input[type="radio"]:checked { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 4.5px, transparent 5px); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.check input { margin-top: 1px; }
.chips input { width: 18px; height: 18px; min-height: 18px; }
.chips .chip-all input { border-color: color-mix(in srgb, var(--on-primary) 70%, transparent); background-color: transparent; }
.chips .chip-all input:checked { background-color: var(--on-primary); border-color: var(--on-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.chips .chip-all:not(:has(input:checked)) input { border-color: var(--field); }

/* chips: rounder and calmer */
.chips label { border-radius: 999px; border-color: var(--line-strong); padding: 0 14px 0 10px; transition: border-color .15s, background-color .15s; }
html[dir="rtl"] .chips label { padding: 0 10px 0 14px; }
.chips label:hover { border-color: var(--primary); }

/* file picker */
input[type="file"] { width: 100%; font: 14px var(--sans); color: var(--ink-2); padding: 8px; border: 1px dashed var(--line-strong);
  border-radius: var(--field-r); background: var(--surface-2); cursor: pointer; }
input[type="file"]::file-selector-button { margin-inline-end: 12px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: 600 13.5px var(--sans); cursor: pointer; }
input[type="file"]:hover::file-selector-button { border-color: var(--primary); color: var(--primary); }

/* buttons: match the rounder fields */
button, .btn { border-radius: var(--field-r); }
.wz-choice { border-radius: 14px; }

/* ---- evidence section ---- */
#evidence, #pricing { scroll-margin-top: 84px; }
.ev-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 8px; }
.ev-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.ev-card.own { border-style: dashed; background: var(--surface-2); }
.ev-card .ev-n { margin: 0; font-family: var(--display); font-size: clamp(30px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.02em; color: var(--primary); line-height: 1.1; }
.ev-card h3 { margin: 0; font-size: 15.5px; }
.ev-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.ev-card .ev-src { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--accent); }
html[lang="ar"] .ev-card .ev-src { font-family: var(--sans); font-size: 12px; letter-spacing: 0; }
.ev-rules { margin-top: 26px; padding: 22px 24px; border-radius: 14px; background: var(--primary-soft); }
.ev-rules h3 { margin: 0 0 12px; font-size: 16px; }
.ev-rules ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ev-rules li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.ev-rules li .icon { width: 16px; height: 16px; color: var(--primary); flex: none; margin-top: 3px; }
.ev-limit { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; max-width: 820px; }
.ev-limit .icon { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }
.ev-links { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.ev-links a { color: var(--accent); }

/* ---- sending mode: two choice cards ---- */
.mode-pick { border: 0; padding: 0; margin: 4px 0 0; flex-basis: 100%; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mode-pick legend { padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.mode-opt { position: relative; display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 16px; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; background: var(--surface); transition: border-color .15s, box-shadow .15s, background-color .15s; }
.mode-opt:hover { border-color: var(--line-strong); }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-soft); }
.mode-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.mode-opt:has(input:checked) .mode-ic { background: var(--primary); color: var(--on-primary); }
.mode-ic .icon { width: 18px; height: 18px; }
.mode-txt { display: grid; gap: 2px; }
.mode-txt b { font-size: 15px; }
.mode-txt small { font-size: 13px; color: var(--ink-2); line-height: 1.45; }

/* research outputs: title, venue, year, status, remove */
.fact { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 92px 180px 44px; }
@media (max-width: 860px) {
  .fact { grid-template-columns: 1fr 92px 44px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
  .fact [data-fact] { grid-column: 1 / -1; }
  .fact [data-venue] { grid-column: 1 / -1; }
  .fact [data-year] { grid-column: 1; }
  .fact select { grid-column: 2 / 4; grid-row: auto; }
  .fact .icon-btn { grid-column: 3; grid-row: 1; }
  .fact [data-fact] { grid-column: 1 / 3; }
}

/* ---- follow-ups ---- */
.fu-soon-head { display: flex; align-items: center; gap: 10px; }
.fu-soon-head h2 { margin: 0; }
.fu-item { border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 10px; }
.fu-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.fu-item textarea { min-height: 170px; font: 14.5px/1.6 var(--sans); }
.fu-body { white-space: pre-wrap; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font: 14px/1.6 var(--sans); }

/* Admin inbox: count badge on the Inbox and Admin links, and the short list on the overview */
.nbadge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: auto; border-radius: 10px;
  background: var(--danger, #b42318); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.nav .nbadge, header .nbadge { margin-inline-start: 6px; }
.nlist { margin: 8px 0 0; padding-inline-start: 18px; }
.nlist li { margin: 4px 0; }
.afilters { margin-bottom: 12px; gap: 8px; flex-wrap: wrap; align-items: center; }
.afilters > input, .afilters > select { width: auto; flex: 0 1 200px; min-width: 140px; }
.afilters > input { flex-basis: 280px; }
/* Public SEO pages (src/pages.js): same look as the landing sections, a page title, breadcrumbs, a closing call to action */
.site-main { padding-bottom: 24px; }
.crumbs { display: flex; gap: 8px; align-items: center; padding-top: 22px; font-size: 13px; color: var(--ink-3, var(--ink-2)); }
.crumbs a { color: inherit; }
.site-head { padding-top: 36px; padding-bottom: 8px; }
.site-head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.024em; margin: 10px 0 14px; max-width: 22ch; }
.site-head .sub { max-width: 62ch; }
.site-band { padding: 48px 0; }
.site-band + .site-band { border-top: 1px solid var(--line); }
.site-band h2 { font-size: clamp(24px, 3vw, 34px); }
.site-samples { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 22px; }
.site-samples h3 { font-size: 16px; margin: 0 0 10px; }
.site-mock .mock-card { position: relative; }
.site-mock .mock-body p { margin: 0 0 10px; }
.site-more { margin: 18px 0 0; }
.site-more a, .site-foot a { color: var(--accent); }
.site-cta { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin: 40px auto; padding: 28px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.site-cta h2 { margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 30px); }
.site-cta .sub { margin: 0; }
.site-foot-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; padding: 32px 22px; }
.site-foot-grid nav { display: flex; flex-direction: column; gap: 8px; }
.site-foot .foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.site-foot .mark { width: 24px; height: 24px; }
@media (max-width: 720px) { .site-foot-grid { grid-template-columns: 1fr; } }
.faq-q { display: inline; font: inherit; margin: 0; }
.site-contact { display: grid; gap: 22px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .site-contact { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 14px; }
.contact-form textarea { width: 100%; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-contact aside .icon { width: 18px; height: 18px; vertical-align: -3px; }
.foot-pages { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.foot-pages a { color: inherit; }
.ndetail { white-space: pre-wrap; margin: 6px 0 0; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 14px; }
/* Blog */
.post-list { display: grid; gap: 18px; }
.post-card { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.post-card h2 { font-size: clamp(20px, 2.2vw, 26px); margin: 0 0 6px; max-width: none; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { margin: 6px 0 0; }
.post { max-width: 720px; padding-top: 28px; padding-bottom: 20px; }
.post h1 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -.022em; margin: 6px 0 10px; }
.post-body { font-size: 17px; line-height: 1.75; color: var(--ink); }
.post-body h2 { font-family: var(--display); font-weight: 500; font-size: 26px; margin: 36px 0 10px; }
.post-body h3 { font-size: 19px; margin: 26px 0 8px; }
.post-body a { color: var(--accent); }
.post-body blockquote { margin: 18px 0; padding: 4px 18px; border-inline-start: 3px solid var(--accent); color: var(--ink-2); }
.post-body ul, .post-body ol { padding-inline-start: 22px; }
.post-body li { margin: 6px 0; }
.post-body code { font-family: var(--mono, monospace); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.post-body .table-wrap { overflow-x: auto; margin: 18px 0; }
.post-body table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.post-body th, .post-body td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body th { font-weight: 600; background: var(--surface-2); }
