/* ERPStop public site.
   Rules this file keeps (a test enforces the first):
   1. Logical properties only (inline-start/end, block-start/end), so Arabic is the same stylesheet laid out the other way.
   2. Colours come from tokens. Dark mode redefines the tokens, never the components.
   3. One family (IBM Plex Sans Arabic carries the Latin too), three weights, so both languages share metrics. */

@font-face { font-family: 'Plex'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/plex-arabic-arabic-400.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'Plex'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/plex-arabic-arabic-500.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'Plex'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/plex-arabic-arabic-700.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'Plex'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/plex-arabic-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: 'Plex'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/plex-arabic-latin-500.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: 'Plex'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/plex-arabic-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }

/* Two themes, chosen by the visitor (data-theme on the root, set by theme.js) or, with no choice, by the system.
   Light: Alabaster Slate and Royal Teal. Dark: Onyx and Gilt. Emerald (--ok-line) is kept for tax-compliance UI only:
   the ZATCA badge, "totals match", and finished steps. */
:root {
  color-scheme: light;
  --ink: #1b1f3b;
  --ink-2: #3a4158;
  --ink-3: #59617a;
  --ground: #fafafa;
  --surface: #ffffff;
  --tint: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #b4c0d2;
  --brand: #005f73;
  --brand-hover: #004757;
  --on-brand: #ffffff;
  --brand-soft: #e0f0f3;
  --signal: #c5a059;
  --mark-hi: #c5a059;
  --ok: #00693a;
  --ok-line: #008b45;
  --ok-soft: #e3f4ea;
  --wash: linear-gradient(180deg, #fafafa 0%, #f1f5f9 100%);
  --shadow: 0 1px 0 rgba(27, 31, 59, 0.04), 0 14px 32px -18px rgba(27, 31, 59, 0.3);
  --show-sun: none;
  --show-moon: block;

  --font: 'Plex', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --measure: 62ch;
  --page: 72rem;
  --ease-out: cubic-bezier(0.2, 0.85, 0.25, 1);
  --ease-spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  --dir: 1;
}
:root[dir='rtl'] { --dir: -1; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ink: #f4f5f7;
    --ink-2: #c8cdd6;
    --ink-3: #9aa3b2;
    --ground: #0b0c10;
    --surface: #141922;
    --tint: #10141b;
    --line: #273040;
    --line-strong: #434f64;
    --brand: #d4af37;
    --brand-hover: #e4c457;
    --on-brand: #0b0c10;
    --brand-soft: #2a2511;
    --signal: #d4af37;
    --mark-hi: #efd171;
    --ok: #3fcf86;
    --ok-soft: #0f2a1d;
    --wash: linear-gradient(180deg, #0b0c10 0%, #1f2833 100%);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 36px -20px rgba(0, 0, 0, 0.85);
    --show-sun: block;
    --show-moon: none;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #f4f5f7;
  --ink-2: #c8cdd6;
  --ink-3: #9aa3b2;
  --ground: #0b0c10;
  --surface: #141922;
  --tint: #10141b;
  --line: #273040;
  --line-strong: #434f64;
  --brand: #d4af37;
  --brand-hover: #e4c457;
  --on-brand: #0b0c10;
  --brand-soft: #2a2511;
  --signal: #d4af37;
  --mark-hi: #efd171;
  --ok: #3fcf86;
  --ok-soft: #0f2a1d;
  --wash: linear-gradient(180deg, #0b0c10 0%, #1f2833 100%);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 36px -20px rgba(0, 0, 0, 0.85);
  --show-sun: block;
  --show-moon: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-block-start: 5rem; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}
:lang(ar) body, body:lang(ar) { line-height: 1.85; }
img, svg { display: block; max-inline-size: 100%; }
a { color: var(--brand); text-underline-offset: 0.2em; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; letter-spacing: -0.01em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; inset-inline-start: var(--space-4); inset-block-start: -4rem; z-index: 50;
  background: var(--ink); color: var(--ground); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
}
.skip-link:focus { inset-block-start: var(--space-3); }

.container { inline-size: min(100% - 2.5rem, var(--page)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }

/* The accountant's double rule under a label: the motif that ties headings to the mark. */
.eyebrow {
  display: inline-block;
  padding-block-end: 0.2rem;
  border-block-end: 4px double var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 0.95rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-block-size: 3rem; padding-inline: 1.4rem;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-block-size: 2.5rem; padding-inline: 1rem; font-size: 0.95rem; }
.btn-on-brand { background: var(--on-brand); color: var(--brand); }
.btn-on-brand:hover { color: var(--brand-hover); }

/* Header */
.site-header { background: var(--ground); border-block-end: 1px solid var(--line); position: sticky; inset-block-start: 0; z-index: 20; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); padding-block: var(--space-3); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-word { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.03em; white-space: nowrap; }
.brand-erp { font-weight: 500; }
.nav { margin-inline-start: var(--space-3); }
.nav ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; padding-block: 0.4rem; border-block-end: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-block-end-color: var(--signal); }
.header-actions { display: flex; align-items: center; gap: var(--space-3) var(--space-4); margin-inline-start: auto; flex-wrap: wrap; }
.lang-switch, .link-quiet { color: var(--ink-2); font-weight: 500; text-decoration: none; padding-block: 0.4rem; }
.lang-switch { border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding-inline: 0.8rem; }
.lang-switch:hover, .link-quiet:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle { display: inline-grid; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; padding: 0; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle .ic-sun { display: var(--show-sun); }
.theme-toggle .ic-moon { display: var(--show-moon); }

/* Hero */
.hero { padding-block: var(--space-7) var(--space-8); background: var(--wash); }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; }
.hero h1 { font-size: clamp(1.95rem, 4.1vw, 3.05rem); line-height: 1.15; margin-block: var(--space-4) var(--space-4); max-inline-size: 24ch; }
:lang(ar) .hero h1 { line-height: 1.4; max-inline-size: 20ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-inline-size: var(--measure); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-block-start: var(--space-6); }

.invoice {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--space-5); max-inline-size: 30rem;
}
.invoice-head { display: flex; justify-content: space-between; gap: var(--space-4); padding-block-end: var(--space-4); border-block-end: 1px solid var(--line); }
.invoice-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-3); text-transform: uppercase; }
:lang(ar) .invoice-title { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.invoice-seller { font-weight: 700; font-size: 1.1rem; margin-block-start: 0.15rem; line-height: 1.4; }
.invoice-meta { font-size: 0.85rem; color: var(--ink-3); line-height: 1.5; }
.invoice-ids { text-align: end; }
.badge {
  display: inline-block; padding: 0.05rem 0.55rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 0.78rem; font-weight: 700; margin-block-end: 0.2rem;
}
.invoice-lines { inline-size: 100%; border-collapse: collapse; margin-block: var(--space-3); font-size: 0.95rem; }
.invoice-lines th { font-size: 0.8rem; color: var(--ink-3); font-weight: 500; text-align: start; padding-block: 0.4rem; border-block-end: 1px solid var(--line); }
.invoice-lines td { padding-block: 0.45rem; border-block-end: 1px dashed var(--line); }
.invoice-lines .num { text-align: end; }
.invoice-totals { margin-block-start: var(--space-3); font-size: 0.95rem; }
.invoice-totals > div { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: 0.15rem; color: var(--ink-2); }
.invoice-totals .grand { margin-block-start: 0.35rem; padding-block-start: 0.5rem; border-block-start: 4px double var(--ink); color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.cur { font-weight: 500; font-size: 0.85rem; color: var(--ink-3); }
.invoice-foot { display: flex; align-items: center; gap: var(--space-4); margin-block-start: var(--space-4); padding-block-start: var(--space-4); border-block-start: 1px solid var(--line); }
.qr { color: var(--ink); flex: none; }
.status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--ok); }
.dot { inline-size: 0.6rem; block-size: 0.6rem; border-radius: 50%; background: var(--ok); }


/* ZATCA trust pill: emerald, because it speaks about tax compliance and nothing else. */
.trust-badge {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-block-start: var(--space-4);
  padding: 0.45rem 0.95rem; border: 1.5px solid var(--ok-line); border-radius: 1.4rem;
  background: var(--ok-soft); color: var(--ink); font-size: 0.9rem; line-height: 1.45;
}
.trust-icon { color: var(--ok-line); flex: none; }
.trust-badge strong { font-weight: 700; }
.trust-sep { margin-inline: 0.55rem; color: var(--ok-line); }

/* Proof strip */
.proof { border-block: 1px solid var(--line); background: var(--surface); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.proof-grid li { display: flex; flex-direction: column; gap: 0.25rem; padding: var(--space-5) var(--space-5); border-inline-start: 1px solid var(--line); }
.proof-grid li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.proof-grid strong { font-size: 1.05rem; }
.proof-grid span { color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; }

/* Sections */
.section { padding-block: var(--space-8); }
.section-compact { padding-block: var(--space-6); }
.section-compact .section-head { margin-block-end: var(--space-4); }
.section-compact h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.section-tint { background: var(--tint); border-block: 1px solid var(--line); }
.section-head { margin-block-end: var(--space-6); }
.section h2, .close h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.25; margin-block-start: var(--space-3); }
:lang(ar) .section h2, :lang(ar) .close h2 { line-height: 1.45; }

.jobs-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); }
.job .icon { color: var(--brand); margin-block-end: var(--space-4); }
.job-kicker { font-size: 0.85rem; color: var(--ink-3); font-weight: 500; }
.job h3 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; margin-block: 0.2rem var(--space-3); padding-block-end: var(--space-3); border-block-end: 1px solid var(--line); }
:lang(ar) .job h3 { line-height: 1.45; letter-spacing: 0; }
.job p:last-child { color: var(--ink-2); font-size: 1rem; font-weight: 400; }

.split { display: grid; gap: var(--space-7); }
.lead-sm { margin-block-start: var(--space-4); font-size: 1.1rem; color: var(--ink-2); max-inline-size: var(--measure); }
.note { margin-block-start: var(--space-4); padding-inline-start: var(--space-4); border-inline-start: 3px solid var(--signal); color: var(--ink-2); font-size: 0.97rem; max-inline-size: var(--measure); }

.steps { counter-reset: step; display: grid; gap: var(--space-4); }
.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4) var(--space-5); padding-inline-start: 4.25rem; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: var(--space-4); inset-block-start: 0.95rem;
  inline-size: 2.2rem; block-size: 2.2rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: var(--ground); font-weight: 700; font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.05rem; line-height: 1.4; }
.steps p { color: var(--ink-2); font-size: 0.97rem; }

/* Import stepper: complete without script (stacked cards); site.js shows the strip and one card at a time. */
.stepper { min-inline-size: 0; }
.stepper-nav { display: flex; align-items: flex-start; margin-block-end: var(--space-5); }
.stepper-nav[hidden] { display: none; }
.stepper-node { display: flex; align-items: flex-start; flex: 1 1 0; min-inline-size: 0; }
.stepper-node:last-child { flex: 0 0 auto; }
.stepper-btn { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.25rem; max-inline-size: 7.5rem; background: none; border: 0; font: inherit; color: var(--ink-2); text-align: center; cursor: pointer; }
.stepper-icon {
  display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 700;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.stepper-btn:hover .stepper-icon { transform: scale(1.05); }
.stepper-btn:active .stepper-icon { transform: scale(0.95); }
.stepper-btn[aria-selected='true'] .stepper-icon { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.stepper-btn.is-done .stepper-icon { border-color: var(--ok-line); color: var(--ok); }
.stepper-label { font-size: 0.88rem; line-height: 1.35; font-weight: 500; }
.stepper-btn[aria-selected='true'] .stepper-label { color: var(--ink); font-weight: 700; }
.stepper-line { flex: 1 1 auto; align-self: flex-start; margin: 1.25rem 0.25rem 0; min-inline-size: 1rem; block-size: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.stepper-fill { display: block; block-size: 100%; inline-size: 0; background: var(--brand); }
.stepper-panels { display: grid; gap: var(--space-4); }
.stepper.is-enhanced .stepper-panels { display: block; min-block-size: 15rem; }
.stepper-panel { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stepper-panel[hidden] { display: none; }
.stepper-kicker { font-size: 0.85rem; font-weight: 500; color: var(--ink-3); }
.stepper-text h3 { font-size: 1.35rem; line-height: 1.3; margin-block: 0.15rem var(--space-2); }
.stepper-text p:last-child { color: var(--ink-2); }
.art { padding: var(--space-4); background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.92rem; }
.art-meta { color: var(--ink-3); font-size: 0.85rem; }
.art-drop { padding: var(--space-4); border: 2px dashed var(--line-strong); border-radius: var(--radius-sm); text-align: center; color: var(--ink-3); }
.art-file { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin-block-start: var(--space-3); }
.art-file bdi { white-space: nowrap; }
.art-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.6rem; align-items: center; padding-block: 0.35rem; border-block-end: 1px dashed var(--line); }
.art-row-head { font-size: 0.8rem; font-weight: 500; color: var(--ink-3); }
.art-check { color: var(--ok-line); }
.art-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--space-3); align-items: center; text-align: center; }
.art-col { display: flex; flex-direction: column; gap: 0.2rem; }
.art-col strong { font-size: 1.15rem; }
.art-equals { font-size: 1.5rem; font-weight: 700; color: var(--ok); }
.art-ok { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-block-start: var(--space-2); font-weight: 700; color: var(--ok); }
.art-ok .art-check { color: var(--ok-line); }
.art-run { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block-end: var(--space-2); }
.art-undo-btn { padding: 0.3rem 0.8rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 700; white-space: nowrap; }


.ticks { margin-block-start: var(--space-4); display: grid; gap: var(--space-3); max-inline-size: var(--measure); }
.ticks li { position: relative; padding-inline-start: 2rem; color: var(--ink-2); }
.ticks li::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 0.45rem;
  inline-size: 1.15rem; block-size: 1.15rem; background: var(--brand);
  /* A tick is not mirrored in right-to-left, so it is a mask, not borders. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.close { background: var(--brand); color: var(--on-brand); padding-block: var(--space-7); }
.close-row { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; justify-content: space-between; }
.close p { margin-block-start: var(--space-2); max-inline-size: var(--measure); opacity: 0.92; }
.close h2 { margin-block-start: 0; }

/* Footer */
.site-footer { border-block-start: 1px solid var(--line); background: var(--surface); padding-block-start: var(--space-7); }
.footer-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.footer-brand p { margin-block-start: var(--space-3); color: var(--ink-2); max-inline-size: 28ch; font-size: 0.97rem; }
.footer-title { font-size: 0.85rem; color: var(--ink-3); font-weight: 500; margin-block-end: var(--space-3); }
.footer-list { display: grid; gap: var(--space-2); }
.footer-list a { color: var(--ink); text-decoration: none; }
.footer-list a:hover { color: var(--brand); text-decoration: underline; }
.footer-base { padding-block: var(--space-6) var(--space-5); font-size: 0.875rem; color: var(--ink-3); }

/* Plain pages: 404, 500 and the language chooser */
.plain { min-block-size: 60vh; display: grid; align-items: center; padding-block: var(--space-8); }
.plain h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.2; margin-block: var(--space-4); max-inline-size: 20ch; }
:lang(ar) .plain h1 { line-height: 1.4; }
.plain p { color: var(--ink-2); max-inline-size: var(--measure); }
.chooser { text-align: center; }
.chooser .brand { justify-content: center; margin-block-end: var(--space-5); }
.chooser-links { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-block-start: var(--space-5); }


.sticky-cta {
  display: none; position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30;
  padding: var(--space-3) 1.25rem calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--ground); border-block-start: 1px solid var(--line);
}
.bi-block { margin-block-start: var(--space-5); }
.bi-block h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); line-height: 1.3; margin-block: 0 var(--space-3); }
.bi-rule { border: 0; border-block-start: 1px solid var(--line); margin-block: var(--space-6); }

/* Inner pages */
.page-head { padding-block: var(--space-7) var(--space-6); border-block-end: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.15; margin-block: var(--space-4); max-inline-size: 24ch; }
:lang(ar) .page-head h1 { line-height: 1.4; }
.page-head .lead { max-inline-size: 68ch; }
.steps-wide { max-inline-size: 48rem; }
.prose { max-inline-size: 70ch; }
.prose p { margin-block-end: var(--space-3); color: var(--ink-2); }
.prose .ticks { margin-block-end: var(--space-4); }
.more { margin-block-start: var(--space-4); font-weight: 700; }
.contact-address { font-weight: 500; color: var(--ink-2); unicode-bidi: isolate; }

.faq { display: grid; gap: var(--space-3); max-inline-size: 48rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 var(--space-5); }
.faq summary { cursor: pointer; padding-block: var(--space-4); font-weight: 700; list-style-position: outside; }
.faq details[open] summary { border-block-end: 1px solid var(--line); }
.faq details p { padding-block: var(--space-4); color: var(--ink-2); }

.plan-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); }
.plan h3 { font-size: 1.2rem; }
.plan-price { margin-block: var(--space-3); font-size: 2rem; font-weight: 700; line-height: 1.2; }
.plan-period { font-size: 0.9rem; font-weight: 400; color: var(--ink-3); }
.plan-limits > div { display: flex; justify-content: space-between; padding-block: 0.4rem; border-block-start: 1px solid var(--line); color: var(--ink-2); }
.plan-featured { border-color: var(--brand); box-shadow: var(--shadow); }
.plan .badge { margin-block-end: var(--space-2); }
.plan .ticks { margin-block-start: var(--space-4); gap: var(--space-2); font-size: 0.95rem; }
.plan-note { margin-block-start: var(--space-3); font-size: 0.92rem; color: var(--ink-3); }

/* The mark. Colours come from the theme: teal with white bars on light, gilt with onyx bars on dark. */
.brand-mark { flex: none; }
.mk-w { fill: var(--brand); }
.mk-b { fill: var(--on-brand); }

/* Hero: one subscription. The heading builds in two lines, the second underlined with the accountant's double rule (the
   equals sign of the mark); the mark assembles from its eight sides; the chips land as each side does. All of it runs once,
   in CSS, and ends exactly where the static page would be, so nothing here is needed to read the page. */
.hero-one { position: relative; overflow: clip; }
.hero-one::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46rem 30rem at 76% 38%, var(--brand-soft), transparent 72%);
}
[dir='rtl'] .hero-one::before { background: radial-gradient(46rem 30rem at 24% 38%, var(--brand-soft), transparent 72%); }
.hero-one > .container { position: relative; }
.h1-a, .h1-b { display: block; }
.h1-b { color: var(--ink); }
.h1-one { position: relative; display: inline-block; max-inline-size: 100%; padding-block-end: 0.34em; color: var(--brand); }
.h1-one::before, .h1-one::after {
  content: ''; position: absolute; inset-inline: 0; block-size: 0.075em; border-radius: 2px; background: var(--signal);
  transform-origin: 0 50%; animation: rule-in 0.8s var(--ease-out) backwards;
}
.h1-one::before { inset-block-end: 0.17em; animation-delay: 1s; }
.h1-one::after { inset-block-end: 0; animation-delay: 1.12s; }
[dir='rtl'] .h1-one::before, [dir='rtl'] .h1-one::after { transform-origin: 100% 50%; }
.hero-copy > * { animation: rise 0.7s var(--ease-out) backwards; }
.hero-copy > :nth-child(1) { animation-delay: 0s; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.5s; }
.hero-copy > :nth-child(4) { animation-delay: 0.62s; }
.hero-copy > :nth-child(5) { animation-delay: 0.74s; }
.hero-copy > :nth-child(6) { animation-delay: 0.86s; }
.hero-note { margin-block-start: var(--space-4); font-size: 0.95rem; color: var(--ink-2); }
.hero-note a { font-weight: 700; }
.hero-one .cta-row .btn-primary::after, .cta-row-center .btn-primary::after, .close .btn-on-brand::after {
  content: ''; flex: none; inline-size: 1.05em; block-size: 1.05em; background: currentColor; transition: transform 0.2s var(--ease-out);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
[dir='rtl'] .hero-one .cta-row .btn-primary::after, [dir='rtl'] .cta-row-center .btn-primary::after, [dir='rtl'] .close .btn-on-brand::after { transform: scaleX(-1); }
.hero-one .cta-row .btn-primary:hover::after, .cta-row-center .btn-primary:hover::after, .close .btn-on-brand:hover::after { transform: translateX(4px); }
[dir='rtl'] .hero-one .cta-row .btn-primary:hover::after, [dir='rtl'] .cta-row-center .btn-primary:hover::after, [dir='rtl'] .close .btn-on-brand:hover::after { transform: scaleX(-1) translateX(4px); }

.stage { display: grid; justify-items: center; gap: var(--space-4); }
.stage-art { inline-size: min(100%, 25rem); aspect-ratio: 1; }
.stage-mark { inline-size: 100%; block-size: 100%; overflow: visible; filter: drop-shadow(0 22px 26px color-mix(in srgb, var(--brand) 22%, transparent)); }
.sw { fill: var(--brand); transition: transform 0.35s var(--ease-spring), fill 0.2s ease; animation: sw-in 0.95s var(--ease-out) backwards; animation-delay: calc(0.3s + var(--i) * 85ms); }
.sw.on { fill: var(--mark-hi); transform: translate(var(--dx), var(--dy)); }
.sw-0 { --dx: 0px; --dy: -8px; --fx: 0px; --fy: -42px; --i: 0; }
.sw-1 { --dx: 5.66px; --dy: -5.66px; --fx: 30px; --fy: -30px; --i: 1; }
.sw-2 { --dx: 8px; --dy: 0px; --fx: 42px; --fy: 0px; --i: 2; }
.sw-3 { --dx: 5.66px; --dy: 5.66px; --fx: 30px; --fy: 30px; --i: 3; }
.sw-4 { --dx: 0px; --dy: 8px; --fx: 0px; --fy: 42px; --i: 4; }
.sw-5 { --dx: -5.66px; --dy: 5.66px; --fx: -30px; --fy: 30px; --i: 5; }
.sw-6 { --dx: -8px; --dy: 0px; --fx: -42px; --fy: 0px; --i: 6; }
.sw-7 { --dx: -5.66px; --dy: -5.66px; --fx: -30px; --fy: -30px; --i: 7; }
.sb { fill: var(--on-brand); }
.sb-0 { animation: bar-in-a 0.7s var(--ease-out) 1.2s backwards; }
.sb-1 { animation: bar-in-b 0.7s var(--ease-out) 1.32s backwards; }
.sbars.wob { transform-origin: 100px 100px; animation: wob 0.95s ease-in-out; }
.stage-info { min-block-size: 5.6rem; max-inline-size: 28rem; text-align: center; animation: rise 0.6s ease-out 1.7s backwards; }
.stage-name { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.stage-line { margin-block-start: 0.2rem; color: var(--ink-2); }
.stage-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; max-inline-size: 31rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem; min-block-size: 2.5rem; padding-inline: 0.85rem;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font-size: 0.88rem; font-weight: 500; line-height: 1.2; text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease-out);
  animation: chip-in 0.55s var(--ease-spring) backwards; animation-delay: calc(0.55s + var(--i) * 90ms);
}
.chip .icon { color: var(--brand); flex: none; }
.chip:hover { color: var(--ink); border-color: var(--brand); transform: translateY(-2px); }
.chip.is-active { color: var(--ink); border-color: var(--brand); background: var(--brand-soft); }
.stage-chips li:nth-child(1) .chip { --i: 0; }
.stage-chips li:nth-child(2) .chip { --i: 1; }
.stage-chips li:nth-child(3) .chip { --i: 2; }
.stage-chips li:nth-child(4) .chip { --i: 3; }
.stage-chips li:nth-child(5) .chip { --i: 4; }
.stage-chips li:nth-child(6) .chip { --i: 5; }
.stage-chips li:nth-child(7) .chip { --i: 6; }
.stage-chips li:nth-child(8) .chip { --i: 7; }
.stage-toggle {
  min-block-size: 2.75rem; padding-inline: 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-2); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer;
}
.stage-toggle:hover { color: var(--ink); border-color: var(--ink); }
.stage-toggle[hidden] { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes rule-in { from { transform: scaleX(0); } }
@keyframes sw-in { from { opacity: 0; transform: translate(var(--fx), var(--fy)); } }
@keyframes bar-in-a { from { opacity: 0; transform: translateX(calc(var(--dir) * -90px)); } }
@keyframes bar-in-b { from { opacity: 0; transform: translateX(calc(var(--dir) * 90px)); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(10px) scale(0.92); } }
@keyframes wob { 0% { transform: rotate(0deg); } 18% { transform: rotate(-8deg); } 40% { transform: rotate(6deg); } 62% { transform: rotate(-3deg); } 82% { transform: rotate(1.5deg); } 100% { transform: rotate(0deg); } }

/* Scroll reveal: site.js adds .reveal to what is below the fold and .is-in as it arrives. Without script nothing is hidden. */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); transition-delay: var(--rd, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* Buttons: a small lift on hover. */
.btn { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease-out), box-shadow 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary:hover { box-shadow: 0 8px 18px -10px var(--brand); }
.cta-row-center { justify-content: center; margin-block-start: var(--space-7); }

/* Modules explorer: eight stacked cards without script; with it a strip of tabs and one card at a time. */
.mods-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-end: var(--space-5); }
.mods-nav[hidden] { display: none; }
.mods-tab {
  display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 2.75rem; padding-inline: 1rem;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font: inherit; font-weight: 500; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease-out);
}
.mods-tab .icon { flex: none; }
.mods-tab:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.mods-tab[aria-selected='true'] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.mods-panels { display: grid; gap: var(--space-5); }
.mods.is-enhanced .mods-panels { display: block; min-block-size: 25rem; }
.mod-panel { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.mod-panel[hidden] { display: none; }
.mod-kicker { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--brand); font-weight: 700; font-size: 0.95rem; }
.mod-text h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.25; margin-block: 0.5rem var(--space-3); }
:lang(ar) .mod-text h3 { line-height: 1.45; }
.mod-blurb { color: var(--ink-2); max-inline-size: var(--measure); }
.mod-art { display: grid; align-content: center; justify-items: start; gap: var(--space-3); min-inline-size: 0; }
.mod-art-note { font-size: 0.85rem; color: var(--ink-3); }
.mod-art .trust-badge { margin-block-start: 0; }
.sample { inline-size: 100%; max-inline-size: 26rem; padding: var(--space-4) var(--space-5); background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); }
.sample-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block-end: var(--space-2); }
.sample-title { font-weight: 700; }
.sample dl > div { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: 0.55rem; border-block-start: 1px dashed var(--line-strong); color: var(--ink-2); }
.sample dl > .sample-last dd { color: var(--ink); font-weight: 700; }

.h2-sm { font-size: clamp(1.35rem, 2.4vw, 1.7rem) !important; margin-block-end: var(--space-4); }

/* Cards and plans lift a little when pointed at. */
.job, .plan { transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, border-color 0.25s ease; }
.job:hover, .plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan { display: flex; flex-direction: column; }
.plan .plan-cta { margin-block-start: auto; padding-block-start: var(--space-5); }
.plan .plan-cta .btn { inline-size: 100%; }
.plan { position: relative; }
.plan-featured .badge { position: absolute; inset-block-start: -0.85rem; inset-inline-start: var(--space-5); margin: 0; padding-inline: 0.8rem; background: var(--brand); color: var(--on-brand); }
.plans-lead { margin-block-end: var(--space-5); color: var(--ink-2); font-weight: 500; }

@media (min-width: 40rem) {
  .stepper-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
  .stepper-panel .art { order: 2; }
}
@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
}
@media (max-width: 40rem) {
  .hero { padding-block: var(--space-6) var(--space-7); }
  .section { padding-block: var(--space-7); }
    .proof-grid li { border-inline-start: 0; border-block-start: 1px solid var(--line); padding-inline: 0; }
  .proof-grid li:first-child { border-block-start: 0; }
  .btn { inline-size: 100%; }
  .site-header { position: static; }
  .header-row { flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-3); }
  /* The page links get their own scrollable row under the brand, so a phone never has to squeeze five items beside it. */
  .nav { order: 3; inline-size: 100%; margin-inline-start: 0; overflow-x: auto; scrollbar-width: none; }
  .nav ul { flex-wrap: nowrap; gap: var(--space-5); }
  .nav a { white-space: nowrap; }
  .brand-word { font-size: 1.02rem; }
  .stepper-label { font-size: 0.8rem; }
  .stepper-icon { inline-size: 2.4rem; block-size: 2.4rem; }
  .stepper-line { margin-block-start: 1.1rem; }
  .theme-toggle { inline-size: 2.25rem; block-size: 2.25rem; }
  .header-actions { gap: var(--space-3); flex-wrap: nowrap; }
  .header-actions .btn { display: none; }
  .lang-switch { padding-inline: 0.6rem; font-size: 0.95rem; }
  .invoice { padding: var(--space-4); }
  .invoice-head { flex-direction: column; gap: var(--space-2); }
  .invoice-ids { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-3); text-align: start; }
  .invoice-ids .badge { margin-block-end: 0; }
  .sticky-cta { display: block; }
  .hero .cta-row .btn-primary { display: none; }
  body.has-sticky-cta { padding-block-end: 5rem; }
}
@media (min-width: 52rem) {
  .mod-panel { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; }
}
@media (max-width: 40rem) {
  /* On a phone the scene comes straight after the heading, so the assembly is the first thing seen, not something below the fold. */
  .hero-grid { gap: var(--space-4); }
  .hero-copy { display: contents; }
  .hero-copy > .eyebrow { order: 1; justify-self: start; }
  .hero-copy > h1 { order: 2; margin-block-end: 0; }
  .stage { order: 3; gap: var(--space-3); }
  .hero-copy > .lead { order: 4; }
  .hero-copy > .cta-row { order: 5; margin-block-start: 0; }
  .hero-copy > .trust-badge { order: 6; margin-block-start: 0; }
  .hero-copy > .hero-note { order: 7; margin-block-start: 0; }
  .stage-art { inline-size: min(100%, 15.5rem); }
  .stage-info { min-block-size: 6.2rem; }
  .stage-chips { gap: 0.4rem; }
  .chip { min-block-size: 2.75rem; font-size: 0.85rem; padding-inline: 0.75rem; }
  .mod-panel { padding: var(--space-5); }
  .mods-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1.25rem; padding-inline: 1.25rem; }
  .mods-tab { flex: none; }
  .cta-row-center { margin-block-start: var(--space-6); }
  .hero-note { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
