/* ===========================================================================
   Masrafban — site styles
   Sections:  tokens · themes · base · grid backdrop · aurora · layout ·
              buttons · header · hero · console · phone · hub · audience ·
              compliance · modules · charts · forms · advisor · plans ·
              contractors · cta · docs · footer · responsive
   ========================================================================= */

/* ── tokens (dark is the base theme) ─────────────────────────────────────
   The control room is dark. Every surface here is an instrument panel:
   graphite-navy metal, a hairline grid, and light only where there is
   energy to report. Accents are named for what they measure, so a future
   palette change is a token edit rather than a hunt for hex codes.        */
:root {
    /* deep graphite navy — a switchgear room at night, not black */
    --ink: #060e16;
    --ink-1: #0a1620;
    --ink-2: #0f1f2c;
    --ink-3: #14293a;

    --line: rgba(160, 214, 236, .14);
    --line-strong: rgba(160, 214, 236, .28);

    --text: #eaf4fa;
    --muted: #97aebe;
    --muted-soft: rgba(151, 174, 190, .68);

    /* the meters */
    --volt: #2ee6a6;      /* live power, efficiency, the primary accent */
    --current: #43c9ff;   /* the grid itself, data, telemetry */
    --solar: #ffb43d;     /* generation, solar, the marketplace */
    --peak: #ff7a66;      /* peak load, alarms, shortfall */
    --storage: #9d7bff;   /* batteries, storage, flexibility */

    --on-accent: #04231a;

    /* instrument panels: opaque enough that readings stay legible above
       the animated grid behind them */
    --panel: linear-gradient(158deg, rgba(12, 26, 38, .92), rgba(7, 17, 26, .96));
    --panel-strong: linear-gradient(158deg, rgba(16, 33, 47, .96), rgba(8, 19, 29, .98));
    --panel-flat: rgba(10, 22, 33, .9);
    --panel-inset: rgba(4, 11, 18, .58);
    --inset-hi: inset 0 1px 0 rgba(180, 230, 255, .1);

    /* chips: "live", "forecast", "verified" and friends */
    --tint-bg: rgba(46, 230, 166, .09);
    --tint-border: rgba(46, 230, 166, .3);
    --tint-color: var(--volt);

    /* eyebrow labels, inline links, list bullets — bright --volt reads well
       straight onto the dark panel but not onto the light theme's pale one,
       so this stays separate from --volt itself (which keeps its brand
       value for fills, gradients and icons). */
    --accent-text: var(--volt);

    --header-bg: rgba(6, 14, 22, .82);

    /* the grid plane behind everything */
    --grid-line: rgba(67, 201, 255, .085);
    --grid-line-strong: rgba(67, 201, 255, .16);
    --grid-size: 58px;
    --grid-opacity: 1;
    --grid-scrim:
        radial-gradient(120% 78% at 50% 0%, rgba(6, 14, 22, .18), rgba(6, 14, 22, .74) 72%),
        linear-gradient(180deg, rgba(6, 14, 22, .35) 0%, rgba(6, 14, 22, .6) 55%, rgba(6, 14, 22, .92) 100%);

    --shadow-sm: 0 6px 20px rgba(2, 8, 14, .5);
    --shadow: 0 24px 54px -20px rgba(2, 8, 14, .86);
    --shadow-lg: 0 64px 128px -44px rgba(2, 8, 14, .96);
    --glow-volt: 0 0 0 1px rgba(46, 230, 166, .28), 0 18px 46px -20px rgba(46, 230, 166, .5);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 34px;

    --shell: 1200px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Space Grotesk", var(--font);
    /* every number that represents a reading — kWh, kW, %, meter ids —
       is set in the mono face, so figures line up column to column */
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --ease: cubic-bezier(.22, .8, .28, 1);

    color-scheme: dark;
}

/* ── light theme ──────────────────────────────────────────────────────────
   Daylight in a utility office, not a white page: cool paper over a faint
   blueprint grid. Same structure and the same alphas — only the base hue
   moves, and the accents darken enough to stay readable on pale surfaces. */
:root[data-theme="light"] {
    --ink: #eef3f7;
    --ink-1: #ffffff;
    --ink-2: #f4f8fb;
    --ink-3: #e6eef4;

    --line: rgba(13, 42, 62, .14);
    --line-strong: rgba(13, 42, 62, .26);

    --text: #0b2130;
    --muted: #4c6577;
    --muted-soft: rgba(76, 101, 119, .72);

    --panel: linear-gradient(158deg, rgba(255, 255, 255, .96), rgba(240, 246, 250, .98));
    --panel-strong: linear-gradient(158deg, #ffffff, rgba(238, 245, 250, .99));
    --panel-flat: rgba(255, 255, 255, .94);
    --panel-inset: rgba(13, 42, 62, .05);
    --inset-hi: inset 0 1px 0 rgba(255, 255, 255, .9);

    --tint-bg: rgba(4, 122, 86, .08);
    --tint-border: rgba(4, 122, 86, .26);
    --tint-color: #04795a;

    /* --volt at full strength disappears on paper; these two are the
       readable versions used for text and hairlines */
    --accent-text: #04795a;

    --header-bg: rgba(255, 255, 255, .86);

    --grid-line: rgba(13, 62, 94, .07);
    --grid-line-strong: rgba(13, 62, 94, .13);
    --grid-scrim:
        radial-gradient(120% 78% at 50% 0%, rgba(238, 243, 247, .1), rgba(238, 243, 247, .62) 72%),
        linear-gradient(180deg, rgba(238, 243, 247, .3) 0%, rgba(238, 243, 247, .55) 55%, rgba(238, 243, 247, .9) 100%);

    --shadow-sm: 0 6px 18px rgba(13, 42, 62, .08);
    --shadow: 0 22px 48px -22px rgba(13, 42, 62, .28);
    --shadow-lg: 0 60px 120px -46px rgba(13, 42, 62, .34);
    --glow-volt: 0 0 0 1px rgba(4, 121, 90, .2), 0 16px 40px -22px rgba(4, 121, 90, .4);

    color-scheme: light;
}

/* Surfaces that stay dark in both themes because they *are* the product:
   the phone screen, the operator console and the government band. Scoping
   the tokens keeps every child rule unchanged. */
.on-dark {
    color: #eaf4fa;
    --text: #eaf4fa;
    --muted: #97aebe;
    --muted-soft: rgba(151, 174, 190, .68);
    --ink: #060e16;
    --ink-1: #0a1620;
    --ink-2: #0f1f2c;
    --ink-3: #14293a;
    --line: rgba(160, 214, 236, .14);
    --line-strong: rgba(160, 214, 236, .28);
    --panel: linear-gradient(158deg, rgba(12, 26, 38, .92), rgba(7, 17, 26, .96));
    --panel-strong: linear-gradient(158deg, rgba(16, 33, 47, .96), rgba(8, 19, 29, .98));
    --panel-flat: rgba(10, 22, 33, .9);
    --panel-inset: rgba(4, 11, 18, .58);
    --accent-text: var(--volt);
    --tint-bg: rgba(46, 230, 166, .09);
    --tint-border: rgba(46, 230, 166, .3);
    --tint-color: var(--volt);
    --grid-line: rgba(67, 201, 255, .085);
    --grid-line-strong: rgba(67, 201, 255, .16);
}

/* Space Grotesk and JetBrains Mono have no Arabic or Persian glyphs; letting
   them fall back glyph by glyph renders a broken mix. RTL keeps one face. */
html[dir="rtl"] {
    --font: "Vazirmatn", system-ui, sans-serif;
    --font-display: "Vazirmatn", system-ui, sans-serif;
    --font-mono: "Vazirmatn", system-ui, sans-serif;
}

/* ── base ────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
    overflow-x: clip;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    touch-action: manipulation;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.62;
    letter-spacing: -.005em;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    transition: background .4s var(--ease), color .4s var(--ease);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -.028em;
    line-height: 1.14;
    margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-xs);
    background: var(--ink-2);
    z-index: 60;
}

.skip-link:focus { inset-inline-start: 16px; }

:focus-visible {
    outline: 2px solid var(--volt);
    outline-offset: 3px;
    border-radius: 6px;
}

main[tabindex="-1"]:focus { outline: none; }

/* ── grid backdrop ───────────────────────────────────────────────────────
   Travim put photographs behind its pages. A utility has no photograph that
   describes it; the network does. The backdrop is the network: a hairline
   plane, a heavier transmission line every fifth cell, and a slow pulse of
   current travelling across it. Entirely CSS — no image weight, no licence,
   and it stays crisp at any width.                                        */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: var(--grid-opacity);
}

.grid-plane {
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to right, var(--grid-line-strong) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line-strong) 1px, transparent 1px);
    background-size:
        var(--grid-size) var(--grid-size),
        var(--grid-size) var(--grid-size),
        calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
        calc(var(--grid-size) * 5) calc(var(--grid-size) * 5);
    mask-image: radial-gradient(115% 85% at 50% 18%, #000 30%, transparent 78%);
    animation: grid-drift 68s linear infinite;
}

/* Current running along the transmission lines. Two sweeps, crossing. */
.grid-sweep {
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
}

.grid-sweep::before,
.grid-sweep::after {
    content: "";
    position: absolute;
    inset: -40%;
    opacity: .5;
}

.grid-sweep::before {
    background: linear-gradient(105deg, transparent 42%, rgba(67, 201, 255, .16) 50%, transparent 58%);
    animation: sweep-x 15s var(--ease) infinite;
}

.grid-sweep::after {
    background: linear-gradient(255deg, transparent 44%, rgba(46, 230, 166, .13) 50%, transparent 56%);
    animation: sweep-y 21s var(--ease) 3s infinite;
}

.grid-scrim {
    position: absolute;
    inset: 0;
    background: var(--grid-scrim);
}

@keyframes grid-drift {
    to { transform: translate3d(calc(var(--grid-size) * -5), calc(var(--grid-size) * -5), 0); }
}

@keyframes sweep-x {
    0% { transform: translate3d(-32%, 0, 0); opacity: 0; }
    18% { opacity: .55; }
    82% { opacity: .55; }
    100% { transform: translate3d(32%, 0, 0); opacity: 0; }
}

@keyframes sweep-y {
    0% { transform: translate3d(0, 28%, 0); opacity: 0; }
    20% { opacity: .5; }
    80% { opacity: .5; }
    100% { transform: translate3d(0, -28%, 0); opacity: 0; }
}

/* ── aurora: substation glow ─────────────────────────────────────────────── */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .3;
}

.orb-volt {
    width: 620px;
    height: 620px;
    top: -14%;
    inset-inline-start: -8%;
    background: radial-gradient(circle, rgba(46, 230, 166, .85), transparent 68%);
    animation: orb-float 26s ease-in-out infinite;
}

.orb-current {
    width: 560px;
    height: 560px;
    top: 26%;
    inset-inline-end: -10%;
    background: radial-gradient(circle, rgba(67, 201, 255, .8), transparent 68%);
    animation: orb-float 32s ease-in-out 4s infinite reverse;
}

.orb-solar {
    width: 480px;
    height: 480px;
    bottom: -12%;
    inset-inline-start: 34%;
    background: radial-gradient(circle, rgba(255, 180, 61, .6), transparent 68%);
    animation: orb-float 38s ease-in-out 2s infinite;
}

:root[data-theme="light"] .orb { opacity: .2; }

@keyframes orb-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(3%, 5%, 0) scale(1.08); }
}

/* ── layout ──────────────────────────────────────────────────────────────── */
.shell {
    width: min(100% - 48px, var(--shell));
    margin-inline: auto;
}

main {
    position: relative;
    z-index: 1;
    flex: 1;
}

.section { padding: 104px 0; }
.section-tight { padding: 72px 0; }

.section-head {
    max-width: 760px;
    margin-bottom: 52px;
}

.section-head.center {
    margin-inline: auto;
    text-align: center;
}

.section-head h2 { font-size: clamp(28px, 3.4vw, 42px); }

.section-head p {
    margin-top: 16px;
    color: var(--muted);
    font-size: clamp(16px, 1.6vw, 18px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: .6;
}

.section-head.center .eyebrow::before { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border: 1px solid var(--tint-border);
    border-radius: 999px;
    background: var(--tint-bg);
    color: var(--tint-color);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
}

.chip-solar { --tint-border: rgba(255, 180, 61, .34); --tint-bg: rgba(255, 180, 61, .1); --tint-color: var(--solar); }
.chip-current { --tint-border: rgba(67, 201, 255, .34); --tint-bg: rgba(67, 201, 255, .1); --tint-color: var(--current); }
.chip-storage { --tint-border: rgba(157, 123, 255, .34); --tint-bg: rgba(157, 123, 255, .1); --tint-color: var(--storage); }
.chip-peak { --tint-border: rgba(255, 122, 102, .34); --tint-bg: rgba(255, 122, 102, .1); --tint-color: var(--peak); }

:root[data-theme="light"] .chip-solar { --tint-color: #96610a; }
:root[data-theme="light"] .chip-current { --tint-color: #0a6a94; }
:root[data-theme="light"] .chip-storage { --tint-color: #5436b8; }
:root[data-theme="light"] .chip-peak { --tint-color: #b23f2e; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 26px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease),
                background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

.btn-primary {
    background: linear-gradient(135deg, var(--volt), #22c9e0 58%, var(--current));
    color: var(--on-accent);
    box-shadow: var(--glow-volt);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(46, 230, 166, .4), 0 24px 54px -20px rgba(46, 230, 166, .62);
}

.btn-ghost {
    border-color: var(--line-strong);
    background: var(--panel-inset);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--volt);
    color: var(--accent-text);
    transform: translateY(-2px);
}

.btn-spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.btn.is-busy .btn-spinner { display: block; }
.btn.is-busy { pointer-events: none; opacity: .82; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── header ──────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px) saturate(140%);
    background: var(--header-bg);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header.is-elevated {
    border-bottom-color: var(--line);
    box-shadow: 0 12px 34px -26px rgba(2, 8, 14, .9);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.02em;
}

/* The second half of the name carries the accent colour. */
.brand-name b {
    font-weight: 700;
    background: linear-gradient(120deg, var(--volt), var(--current));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: auto;
}

.nav-links a {
    padding: 8px 11px;
    border-radius: var(--radius-xs);
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 500;
    transition: color .2s var(--ease), background .2s var(--ease);
}

.nav-links a:hover {
    background: var(--panel-inset);
    color: var(--text);
}

.nav-links a[aria-current] {
    color: var(--accent-text);
    background: var(--tint-bg);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-inline-start: auto;
}

.nav-links + .nav-actions { margin-inline-start: 0; }

.icon-btn {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    background: var(--panel-inset);
    color: var(--muted);
    cursor: pointer;
    transition: color .2s var(--ease), border-color .2s var(--ease);
}

.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }

.lang-switch { position: relative; }

.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    background: var(--panel-inset);
    color: var(--muted);
    cursor: pointer;
    transition: color .2s var(--ease), border-color .2s var(--ease);
}

.lang-trigger:hover { color: var(--text); border-color: var(--line-strong); }

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    z-index: 60;
}

.lang-switch.is-open .lang-menu { display: block; }

.lang-menu a {
    display: block;
    padding: 8px 11px;
    border-radius: var(--radius-xs);
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.lang-menu a:hover { background: var(--panel-inset); color: var(--text); }

/* The only language switch on the page is the footer one, so its menu
   opens upward. */
.footer-lang-switch .lang-menu { top: auto; bottom: calc(100% + 8px); }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    background: var(--panel-inset);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color .2s var(--ease), border-color .2s var(--ease);
}

.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }

.theme-toggle-label span,
.theme-toggle .icon-system,
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }

.theme-toggle svg { flex: 0 0 auto; }

:root[data-theme-mode="system"] .theme-toggle .label-system,
:root[data-theme-mode="system"] .theme-toggle .icon-system,
:root:not([data-theme-mode]) .theme-toggle .label-system,
:root:not([data-theme-mode]) .theme-toggle .icon-system { display: inline-block; }
:root[data-theme-mode="light"] .theme-toggle .label-light,
:root[data-theme-mode="light"] .theme-toggle .icon-sun { display: inline-block; }
:root[data-theme-mode="dark"] .theme-toggle .label-dark,
:root[data-theme-mode="dark"] .theme-toggle .icon-moon { display: inline-block; }

.mobile-menu-switch { position: relative; display: none; }

.menu-bars { position: relative; width: 17px; height: 12px; }

.menu-bars span {
    position: absolute;
    inset-inline: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}

.menu-bars span:nth-child(1) { top: 0; }
.menu-bars span:nth-child(2) { top: 5px; opacity: 1; }
.menu-bars span:nth-child(3) { top: 10px; }

.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.mobile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    z-index: 60;
}

.mobile-menu-switch.is-open .mobile-menu { display: block; }

.mobile-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-xs);
    color: var(--muted);
    font-size: 14.5px;
}

.mobile-menu a:hover { background: var(--panel-inset); color: var(--text); }
.mobile-menu a[aria-current] { color: var(--accent-text); }

.mobile-menu hr {
    margin: 6px 4px;
    border: 0;
    border-top: 1px solid var(--line);
}

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 40px; }

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 15px 7px 11px;
    border: 1px solid var(--tint-border);
    border-radius: 999px;
    background: var(--tint-bg);
    color: var(--tint-color);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

/* a supply that is actually live, rather than a static dot */
.pill-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.pill-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: pulse-ring 2.4s var(--ease) infinite;
}

@keyframes pulse-ring {
    0% { opacity: .8; transform: scale(.6); }
    100% { opacity: 0; transform: scale(1.5); }
}

.hero-title {
    margin-top: 20px;
    font-size: clamp(38px, 5.4vw, 66px);
    letter-spacing: -.045em;
    line-height: 1.04;
}

.grad {
    background: linear-gradient(115deg, var(--volt) 0%, var(--current) 48%, var(--storage) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 36em;
    margin-top: 20px;
    color: var(--muted);
    font-size: clamp(16.5px, 1.75vw, 19px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-meta {
    margin-top: 14px;
    color: var(--muted-soft);
    font-size: 13px;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 34px;
    margin: 30px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.hero-proof li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--muted);
    font-size: 13px;
}

.hero-proof strong {
    font-family: var(--font-mono);
    font-size: 21px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.02em;
}

/* ── store buttons ───────────────────────────────────────────────────────── */
.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 176px;
    padding: 9px 20px 9px 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel-flat);
    transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.store-btn:hover {
    transform: translateY(-2px);
    border-color: var(--volt);
    box-shadow: var(--shadow-sm);
}

.store-btn > svg { flex: 0 0 26px; }

.store-text { display: flex; flex-direction: column; line-height: 1.16; }

.store-text small {
    color: var(--muted-soft);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.store-text strong { font-size: 15.5px; font-weight: 600; }

/* ── the operator console (hero stage) ───────────────────────────────────
   The product is a console before it is an app, so the hero shows the
   console with the phone docked at its corner: one system, two surfaces.  */
.hero-stage {
    position: relative;
    perspective: 1400px;
}

.console {
    position: relative;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: rotateX(4deg) rotateY(7deg);
    transform-style: preserve-3d;
    transition: transform .5s var(--ease);
}

html[dir="rtl"] .console { transform: rotateX(4deg) rotateY(-7deg); }

.console::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 60% at 20% 0%, rgba(67, 201, 255, .12), transparent 70%);
    pointer-events: none;
}

.console-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-inset);
}

.console-dots { display: flex; gap: 5px; }

.console-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
}

.console-dots i:first-child { background: rgba(255, 122, 102, .7); }
.console-dots i:nth-child(2) { background: rgba(255, 180, 61, .7); }
.console-dots i:nth-child(3) { background: rgba(46, 230, 166, .7); }

.console-title {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--muted-soft);
    letter-spacing: .04em;
}

.console-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
    color: var(--volt);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.console-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: .25; } }

.console-body { padding: 18px; }

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.metric {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-inset);
}

.metric-label {
    color: var(--muted-soft);
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.metric-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.metric-value small {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted-soft);
}

.metric-delta {
    margin-top: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.delta-up { color: var(--peak); }
.delta-down { color: var(--volt); }

:root[data-theme="light"] .delta-down { color: #04795a; }

/* In the hero the phone stands in front of the console's outer corner, which
   is where the chart's legend sits. The mock keeps the title and drops the
   legend rather than showing half of one. Every other page that uses this
   chart shows it for information and keeps both. */
.console .chart-legend { display: none; }

/* the load curve */
.chart {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-inset);
}

.chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.chart-head h4 { font-size: 13px; font-weight: 600; }

.chart-legend {
    display: flex;
    gap: 12px;
    color: var(--muted-soft);
    font-family: var(--font-mono);
    font-size: 10px;
}

.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }

.chart-legend i {
    width: 9px;
    height: 2.5px;
    border-radius: 2px;
    background: currentColor;
}

.chart svg { width: 100%; height: auto; }

/* the dashed forecast line draws itself, then holds */
.line-forecast {
    stroke-dasharray: 5 5;
    animation: draw 2.6s var(--ease) forwards;
}

.line-actual {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-solid 2.2s var(--ease) forwards;
}

@keyframes draw { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw-solid { to { stroke-dashoffset: 0; } }

/* generation mix as stacked bars */
.mix { margin-top: 14px; display: grid; gap: 9px; }

.mix-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
}

.mix-row span { color: var(--muted); }

.mix-row b {
    font-family: var(--font-mono);
    font-weight: 600;
    text-align: end;
    font-size: 11.5px;
}

.mix-track {
    height: 7px;
    border-radius: 999px;
    background: var(--panel-inset);
    border: 1px solid var(--line);
    overflow: hidden;
}

/* The bar grows from nothing to the width set inline on the element. The
   animation deliberately has no `to` keyframe and no `forwards`: the implied
   end state is the element's own width, and holding the only declared
   keyframe (`from`) would pin every bar at zero. */
.mix-fill {
    /* A nested <span>: the grid row blockifies the track but not this, and an
       inline box ignores width and height. */
    display: block;
    height: 100%;
    border-radius: 999px;
    animation: fill-in 1.4s var(--ease);
}

@keyframes fill-in { from { width: 0; } }

.fill-solar { background: linear-gradient(90deg, var(--solar), #ffd27a); }
.fill-volt { background: linear-gradient(90deg, var(--volt), #7bf0c6); }
.fill-current { background: linear-gradient(90deg, var(--current), #8ddfff); }
.fill-storage { background: linear-gradient(90deg, var(--storage), #c2adff); }
.fill-peak { background: linear-gradient(90deg, var(--peak), #ffab9c); }

/* ── phone mock ──────────────────────────────────────────────────────────── */
/* The phone stands at the stage's inline-end edge, turned back toward the
   console it sits beside. `inset-inline-end` mirrors on its own: in LTR the
   stage is the right column and its end edge is the outer one, in RTL the
   stage is the left column and its end edge is the outer one again. The
   rotation is unchanged — the face still turns inward, toward the panel. */
.phone {
    position: absolute;
    bottom: -145px;
    inset-inline-end: -14px;
    width: 172px;
    border-radius: 26px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(160deg, #16293a, #060e16);
    box-shadow: var(--shadow-lg);
    padding: 7px;
    transform: rotate(3deg) rotateY(-7deg);
    transition: transform .5s var(--ease);
    z-index: 2;
}

html[dir="rtl"] .phone { transform: rotate(-3deg) rotateY(7deg); }

.phone-screen {
    border-radius: 20px;
    background: linear-gradient(170deg, #0b1a26, #050c13);
    padding: 13px 11px;
    overflow: hidden;
}

.app-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(160, 214, 236, .12);
    font-size: 11.5px;
    font-weight: 600;
    color: #eaf4fa;
}

.app-bar img { width: 17px; height: 17px; }

.app-meter {
    margin-top: 11px;
    padding: 11px;
    border-radius: 12px;
    border: 1px solid rgba(46, 230, 166, .22);
    background: rgba(46, 230, 166, .07);
}

.app-meter small {
    display: block;
    color: rgba(151, 174, 190, .9);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-meter strong {
    display: block;
    margin-top: 3px;
    color: #eaf4fa;
    font-family: var(--font-mono);
    font-size: 19px;
    font-weight: 600;
}

.app-meter em {
    display: block;
    margin-top: 2px;
    color: var(--volt);
    font-family: var(--font-mono);
    font-size: 10px;
    font-style: normal;
}

.app-list { margin-top: 10px; display: grid; gap: 7px; }

.app-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 10px;
    border: 1px solid rgba(160, 214, 236, .1);
    background: rgba(255, 255, 255, .03);
    color: #d5e5ee;
    font-size: 10.5px;
}

.app-item i {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    border-radius: 6px;
    background: rgba(67, 201, 255, .14);
    color: var(--current);
    font-family: var(--font-mono);
    font-size: 10px;
    font-style: normal;
}

.app-item b { margin-inline-start: auto; font-family: var(--font-mono); font-weight: 600; }

.app-cta {
    margin-top: 11px;
    padding: 9px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--volt), var(--current));
    color: var(--on-accent);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

/* ── the hub diagram ─────────────────────────────────────────────────────
   The whole argument of the product in one picture: every party already
   exists, Masrafban is the thing between them. Lines animate to show that
   the connection carries something in both directions.                    */
.hub-wrap {
    position: relative;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hub { width: 100%; height: auto; }

.hub-line {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1.3;
}

.hub-flow {
    fill: none;
    stroke: var(--current);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-dasharray: 7 150;
    animation: flow 4.5s linear infinite;
    opacity: .9;
}

.hub-flow.f2 { stroke: var(--volt); animation-delay: .6s; }
.hub-flow.f3 { stroke: var(--solar); animation-delay: 1.2s; }
.hub-flow.f4 { stroke: var(--storage); animation-delay: 1.8s; }
.hub-flow.f5 { stroke: var(--current); animation-delay: 2.4s; }
.hub-flow.f6 { stroke: var(--volt); animation-delay: 3s; }
.hub-flow.f7 { stroke: var(--solar); animation-delay: 3.6s; }

@keyframes flow { to { stroke-dashoffset: -157; } }

.hub-node {
    fill: var(--panel-flat);
    stroke: var(--line-strong);
    stroke-width: 1.2;
}

.hub-core {
    fill: none;
    stroke: var(--volt);
    stroke-width: 1.8;
}

/* The labels are HTML laid over the drawing, not SVG <text> — see the comment
   in templates/partials/hub.html for why. The figure is the shared coordinate
   space: the SVG fills it, and the label layer is positioned in percentages of
   the same box, so the two stay registered at any width.

   `container-type: inline-size` makes `cqw` mean "one percent of this figure's
   width", which is what lets label type scale exactly as the drawing does: a
   size of N units in the 640-wide viewBox is N / 6.4 cqw. Each size is
   declared twice so a browser without container units still gets a sensible
   fixed value rather than inheriting the body size. */
.hub-figure {
    position: relative;
    container-type: inline-size;
}

.hub-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Physical `left`/`top`, because the drawing underneath does not mirror. */
.hub-label,
.hub-core-label {
    position: absolute;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
}

.hub-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.2;
}

.hub-label b {
    color: var(--text);
    font-family: var(--font);
    font-weight: 600;
    font-size: 13px;
    font-size: clamp(8.5px, 2.66cqw, 22px);
}

.hub-label i {
    color: var(--muted-soft);
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 9px;
    font-size: clamp(7px, 1.88cqw, 15px);
}

.hub-core-label {
    color: var(--volt);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    font-size: clamp(12px, 3.59cqw, 30px);
}

.hub-node {
    fill: var(--panel-flat);
    stroke: var(--line-strong);
    stroke-width: 1.2;
}

.hub-core {
    fill: none;
    stroke: var(--volt);
    stroke-width: 1.8;
}

/* ── the audience split ──────────────────────────────────────────────────
   Two cards, deliberately larger than anything else on the page, because
   choosing between "my home" and "my business" is the first thing a visitor
   has to do and every later page differs by that choice. Each card keeps its
   accent colour wherever that audience appears again. */
.audience {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.audience-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 34px 32px 32px;
    border: 1px solid var(--tint-border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(90% 120% at 12% 0%, var(--tint-bg), transparent 62%),
        var(--panel);
    box-shadow: var(--shadow-sm), var(--inset-hi);
    transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}

.audience-card:hover {
    transform: translateY(-4px);
    border-color: var(--tint-color);
    box-shadow: var(--shadow), var(--inset-hi);
}

.audience-home { --tint-bg: rgba(46, 230, 166, .12); --tint-border: rgba(46, 230, 166, .3); --tint-color: var(--volt); }
.audience-biz { --tint-bg: rgba(67, 201, 255, .12); --tint-border: rgba(67, 201, 255, .3); --tint-color: var(--current); }

:root[data-theme="light"] .audience-home { --tint-color: #04795a; }
:root[data-theme="light"] .audience-biz { --tint-color: #0a6a94; }

.audience-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--tint-border);
    background: var(--tint-bg);
    color: var(--tint-color);
}

.audience-icon svg { width: 26px; height: 26px; }

.audience-card h3 { font-size: clamp(21px, 2.2vw, 26px); }

.audience-card > p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 15.5px;
}

.audience-card ul {
    margin: 22px 0 26px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 11px;
    flex: 1;
}

.audience-card li {
    position: relative;
    padding-inline-start: 26px;
    color: var(--muted);
    font-size: 14.5px;
}

.audience-card li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 7px;
    width: 14px;
    height: 14px;
    border-radius: 5px;
    background: var(--tint-bg);
    border: 1px solid var(--tint-border);
}

.audience-card li::after {
    content: "";
    position: absolute;
    inset-inline-start: 4.6px;
    top: 10.5px;
    width: 4px;
    height: 7px;
    border: solid var(--tint-color);
    border-width: 0 1.7px 1.7px 0;
    transform: rotate(42deg);
}

.audience-card .btn { align-self: flex-start; }

.audience-home .btn-primary {
    background: linear-gradient(135deg, var(--volt), #22c9e0);
    color: var(--on-accent);
}

.audience-biz .btn-primary {
    background: linear-gradient(135deg, var(--current), var(--storage));
    color: #04161f;
}

/* ── compliance band ─────────────────────────────────────────────────────
   The sector's rules and the distribution company are facts about the
   product, not an audience to sell to, so this reads as a statement rather
   than a pitch. */
.compliance-band {
    position: relative;
    z-index: 1;
    padding: 68px 0;
    border-block: 1px solid var(--line);
    background: var(--panel-inset);
}

.compliance-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
    gap: 52px;
    align-items: center;
}

.compliance-list {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.compliance-list li {
    position: relative;
    padding-inline-start: 34px;
    color: var(--muted);
    font-size: 15px;
}

.compliance-list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--tint-bg);
    border: 1px solid var(--tint-border);
}

.compliance-list li::after {
    content: "";
    position: absolute;
    inset-inline-start: 8px;
    top: 8px;
    width: 5px;
    height: 9px;
    border: solid var(--tint-color);
    border-width: 0 1.9px 1.9px 0;
    transform: rotate(42deg);
}

.record-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.record-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.record-row:last-child { border-bottom: 0; }

.record-row span { color: var(--muted); }

.record-row b {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
}

.record-row .ok { color: var(--accent-text); }


/* ── cards: modules, steps, tiles ─────────────────────────────────── */
.card,
.module,
.step,
.tile,
.plan-card,
.provider-card,
.product-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-sm), var(--inset-hi);
    transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}

.card:hover,
.module:hover,
.step:hover,
.tile:hover,
.provider-card:hover,
.product-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow), var(--inset-hi);
}

/* the modules */
.modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.module {
    display: flex;
    flex-direction: column;
    padding: 26px 24px 28px;
}

.module-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted-soft);
    letter-spacing: .14em;
}

.module h3 { margin-top: 12px; font-size: 19px; }

.module p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14.5px;
}

.module-link {
    margin-top: auto;
    padding-top: 18px;
    color: var(--accent-text);
    font-size: 13.5px;
    font-weight: 600;
}

.module-link::after {
    content: " \2192";
    transition: margin .2s var(--ease);
}

.module:hover .module-link::after { margin-inline-start: 4px; }

/* numbered steps */
.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    counter-reset: step;
}

.step { padding: 28px 24px 30px; }

.step-num {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--volt), var(--current));
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
}

.step h3 { font-size: 18px; }

.step p { margin-top: 9px; color: var(--muted); font-size: 14.5px; }

/* small feature tiles */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.tile { padding: 20px 20px 22px; }

.tile h4 { font-size: 15.5px; }

.tile p { margin-top: 7px; color: var(--muted); font-size: 13.5px; }

.tile-mark {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 9px;
    background: var(--tint-bg);
    border: 1px solid var(--tint-border);
    color: var(--tint-color);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
}

/* two-column feature section */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 52px;
    align-items: center;
}

.split.reverse .split-visual { order: -1; }

.split-copy h2 { font-size: clamp(26px, 3vw, 38px); }

.split-copy > p {
    margin-top: 16px;
    color: var(--muted);
    font-size: 16.5px;
}

.checklist {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 13px;
}

.checklist li {
    position: relative;
    padding-inline-start: 30px;
    color: var(--muted);
    font-size: 15px;
}

.checklist li strong { color: var(--text); font-weight: 600; }

.checklist li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--tint-bg);
    border: 1px solid var(--tint-border);
}

.checklist li::after {
    content: "";
    position: absolute;
    inset-inline-start: 6px;
    top: 10px;
    width: 5px;
    height: 8px;
    border: solid var(--tint-color);
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(42deg);
}

html[dir="rtl"] .checklist li::after { transform: rotate(42deg) scaleX(1); }

.split-visual {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow);
}

/* ── panels that carry readings ──────────────────────────────────────────── */
.panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-flat);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head h4 { font-size: 14.5px; }

.readout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.readout > div {
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-inset);
}

.readout small {
    display: block;
    color: var(--muted-soft);
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.readout strong {
    display: block;
    margin-top: 5px;
    font-family: var(--font-mono);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.02em;
}

/* a bill / invoice mock */
.bill {
    display: grid;
    gap: 9px;
    font-size: 13.5px;
}

.bill-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 9px;
    border-bottom: 1px dashed var(--line);
    color: var(--muted);
}

.bill-row b { font-family: var(--font-mono); color: var(--text); font-weight: 600; }

.bill-row.total {
    border-bottom: 0;
    padding-top: 4px;
    color: var(--text);
    font-weight: 600;
}

.bill-row.total b { color: var(--accent-text); font-size: 17px; }

/* ── numeric readings in RTL ─────────────────────────────────────────────
   A figure like "−11.20" is a left-to-right run. Dropped into an Arabic or
   Persian paragraph, the bidi algorithm moves the leading sign to the other
   end and it renders as "11.20−". These cells hold readings rather than
   prose, so each one is isolated as its own LTR run. Alignment is unaffected:
   they are flex or grid items and keep their side of the row. */
.bill-row b,
.record-row b,
.readout strong,
.metric-value,
.metric-delta,
.mix-row b,
.product-price strong,
.plan-price strong,
.result-summary strong,
.hero-proof strong {
    direction: ltr;
    unicode-bidi: isolate;
}


/* ── the statistics band ─────────────────────────────────────────────────── */
.stat-band {
    position: relative;
    z-index: 1;
    padding: 46px 0;
    border-block: 1px solid var(--line);
    background: var(--panel-inset);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    text-align: center;
}

.stat strong {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 600;
    letter-spacing: -.03em;
    background: linear-gradient(120deg, var(--volt), var(--current));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13.5px;
}

/* ── forms ───────────────────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field.wide { grid-column: 1 / -1; }

.field label {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel-inset);
    color: var(--text);
    font-size: 15px;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.field textarea { min-height: 104px; resize: vertical; line-height: 1.6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--volt);
    box-shadow: 0 0 0 3px rgba(46, 230, 166, .16);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted-soft); }

.field select { appearance: none; cursor: pointer; }

.field-hint { color: var(--muted-soft); font-size: 12px; }

.form-note {
    margin-top: 14px;
    color: var(--muted-soft);
    font-size: 12.5px;
}

.form-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--panel-inset);
    font-size: 14px;
}

.form-status[hidden] { display: none; }
.form-status.ok { border-color: var(--tint-border); color: var(--accent-text); }
.form-status.err { border-color: rgba(255, 122, 102, .4); color: var(--peak); }

:root[data-theme="light"] .form-status.err { color: #b23f2e; }

/* ── the advisor (the live estimate on the home page) ────────────────────── */
.advisor {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
    gap: 32px;
    padding: 28px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.advisor-out {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-inset);
    min-height: 260px;
}

.advisor-empty {
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted-soft);
    font-size: 14px;
    min-height: 220px;
}

.advisor-empty svg { width: 42px; height: 42px; margin: 0 auto 12px; opacity: .55; }

.result-card {
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-flat);
}

.result-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
}

.result-card p { margin-top: 7px; color: var(--muted); font-size: 13.5px; }

.result-card .figure {
    margin-inline-start: auto;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-text);
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.result-summary > div {
    padding: 11px 12px;
    border: 1px solid var(--tint-border);
    border-radius: var(--radius-sm);
    background: var(--tint-bg);
    text-align: center;
}

.result-summary small {
    display: block;
    color: var(--muted);
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.result-summary strong {
    display: block;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-text);
}

.result-source {
    color: var(--muted-soft);
    font-size: 11.5px;
    font-family: var(--font-mono);
}

/* ── pricing ─────────────────────────────────────────────────────────────── */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.plan-card { padding: 28px 24px 30px; display: flex; flex-direction: column; }

.plan-card.featured {
    border-color: var(--tint-border);
    box-shadow: var(--glow-volt), var(--shadow);
}

.plan-flag {
    position: absolute;
    top: -11px;
    inset-inline-start: 24px;
    padding: 4px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--volt), var(--current));
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.plan-card h3 { font-size: 19px; }

.plan-card > p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    min-height: 42px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 18px 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
}

.plan-price strong { font-size: 30px; font-weight: 600; letter-spacing: -.03em; }

.plan-price span { color: var(--muted-soft); font-size: 12.5px; }

.plan-card ul {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    flex: 1;
}

.plan-card li {
    position: relative;
    padding-inline-start: 22px;
    color: var(--muted);
    font-size: 14px;
}

.plan-card li::before {
    content: "";
    position: absolute;
    inset-inline-start: 2px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--tint-color);
    opacity: .8;
}

.plan-card .btn { width: 100%; }

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.price-table th,
.price-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: start;
}

.price-table thead th {
    color: var(--muted-soft);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.price-table tbody th { color: var(--text); font-weight: 600; }

.price-table td { color: var(--muted); font-family: var(--font-mono); font-size: 13.5px; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

/* ── directories: providers and products ─────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.filter-bar input,
.filter-bar select {
    padding: 10px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel-inset);
    color: var(--text);
    font-size: 14.5px;
}

.filter-bar input { flex: 1 1 240px; }

.filter-count {
    margin-inline-start: auto;
    color: var(--muted-soft);
    font-family: var(--font-mono);
    font-size: 12.5px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.provider-card,
.product-card { padding: 22px 20px 24px; display: flex; flex-direction: column; }

.provider-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.provider-logo {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--tint-bg);
    border: 1px solid var(--tint-border);
    color: var(--tint-color);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
}

.provider-head h3 { font-size: 16.5px; }

.provider-head p {
    margin-top: 3px;
    color: var(--muted-soft);
    font-family: var(--font-mono);
    font-size: 11.5px;
}

.provider-card > p,
.product-card > p { color: var(--muted); font-size: 14px; }

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.tag {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-inset);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
}

.provider-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--solar);
    font-family: var(--font-mono);
    font-weight: 600;
}

:root[data-theme="light"] .rating { color: #96610a; }

.verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-text);
    font-size: 12.5px;
    font-weight: 600;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    font-family: var(--font-mono);
}

.product-price strong { font-size: 20px; font-weight: 600; }
.product-price span { color: var(--muted-soft); font-size: 12px; }

.product-spec {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--panel-inset);
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 12px;
}

.product-spec div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.product-spec b { color: var(--text); font-weight: 600; }

.empty-state {
    padding: 56px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
}

/* ── call to action ──────────────────────────────────────────────────────── */
.cta-band { padding: 96px 0 112px; }

.cta-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 40px;
    align-items: center;
    padding: 44px 42px;
    border: 1px solid var(--tint-border);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(80% 140% at 8% 0%, rgba(46, 230, 166, .12), transparent 60%),
        var(--panel-strong);
    box-shadow: var(--shadow-lg);
}

.cta-copy h2 { font-size: clamp(26px, 3.2vw, 38px); }

.cta-copy p {
    margin-top: 14px;
    color: var(--muted);
    font-size: 16.5px;
}

/* ── documents (support / privacy / terms / disclaimer) ──────────────────── */
.doc { padding: 68px 0 100px; }

.doc-shell {
    width: min(100% - 48px, 920px);
    margin-inline: auto;
    padding: 40px 38px 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.doc-shell.center { text-align: center; }

.doc h1 { font-size: clamp(30px, 4.2vw, 46px); }

.doc-lead {
    margin-top: 16px;
    color: var(--muted);
    font-size: 17px;
}

.doc-body {
    margin-top: 32px;
    color: var(--muted);
    font-size: 15.5px;
}

.doc-body h2 {
    margin-top: 32px;
    color: var(--text);
    font-size: 20px;
}

.doc-body h3 {
    margin-top: 22px;
    color: var(--text);
    font-size: 16px;
}

.doc-body p { margin-top: 12px; }
.doc-body ul, .doc-body ol { margin-top: 12px; padding-inline-start: 22px; }
.doc-body li { margin-top: 7px; }
.doc-body a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

.doc-body code {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--panel-inset);
    font-family: var(--font-mono);
    font-size: 13px;
}

.faq { margin-top: 30px; display: grid; gap: 10px; }

.faq details {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-inset);
    overflow: hidden;
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    color: var(--text);
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 18px;
}

.faq details[open] summary::after { content: "–"; }

.faq p { padding: 0 18px 18px; color: var(--muted); font-size: 14.5px; }

.doc-contact { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc-contact h2 { font-size: 20px; }
.doc-contact p { margin-top: 10px; color: var(--muted); }
.doc-contact a { color: var(--accent-text); }

/* page hero used by every non-home page */
.page-hero {
    padding: 58px 0 10px;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(32px, 4.6vw, 54px);
    letter-spacing: -.04em;
}

/* The lead is a grandchild — `.page-hero > .shell > p` — so a child combinator
   here matched nothing and every module page ran its lead the full width of
   the shell. */
.page-hero p {
    max-width: 700px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: clamp(16px, 1.8vw, 18.5px);
}

.page-hero .store-row,
.page-hero .hero-actions { justify-content: center; }

/* ── footer ──────────────────────────────────────────────────────────────── */
.site-footer {
    position: relative;
    z-index: 1;
    padding-top: 54px;
    border-top: 1px solid var(--line);
    background: var(--ink);
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.6fr);
    gap: 44px;
    padding-bottom: 42px;
}

.footer-brand p {
    max-width: 32em;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14.5px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.footer-links h3 {
    margin-bottom: 12px;
    color: var(--muted-soft);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.footer-links a {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    transition: color .2s var(--ease);
}

.footer-links a:hover { color: var(--text); }

.footer-cookie-link {
    display: block;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 14px;
    text-align: start;
    cursor: pointer;
}

.footer-cookie-link:hover { color: var(--text); }

.footer-base {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: space-between;
    padding: 20px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted-soft);
    font-size: 13px;
}

.footer-controls { display: flex; align-items: center; gap: 10px; }

.footer-base a { color: var(--muted); }
.footer-base a:hover { color: var(--text); }

/* ── responsive ──────────────────────────────────────────────────────────── */
/* Between about 960 and 1240 the hero stage's overhanging pieces — the phone
   and the right-hand reading — reach past the shell gutter, and `overflow-x:
   clip` on the document trims them. Pull them inside the gutter instead of
   letting a chip render cut in half. */
@media (max-width: 1240px) {
    .phone { inset-inline-end: -14px; bottom: -132px; width: 160px; }
}

@media (max-width: 1120px) {
    .nav-shell { gap: 12px; }
    .nav-links a { padding-inline: 8px; font-size: 14px; }
    .modules, .steps, .plan-cards, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .nav-links { display: none; }
    .mobile-menu-switch { display: flex; }

    .hero { padding-top: 34px; }
    .hero-shell { grid-template-columns: 1fr; gap: 64px; }
    .hero-stage { margin-inline: auto; max-width: 560px; width: 100%; }
    .console { transform: none; }
    html[dir="rtl"] .console { transform: none; }
    .phone { inset-inline-end: -8px; bottom: -116px; width: 152px; }

    .split, .advisor, .cta-shell, .footer-shell,
    .audience, .compliance-shell { grid-template-columns: 1fr; }
    .split.reverse .split-visual { order: 0; }
    .split { gap: 34px; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .section { padding: 72px 0; }
    .shell { width: min(100% - 32px, var(--shell)); }
    .doc-shell { width: min(100% - 32px, 920px); padding: 28px 22px 34px; }

    .modules, .steps, .plan-cards, .card-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .metric-row { grid-template-columns: 1fr; }
    .result-summary { grid-template-columns: 1fr; }

    .header-install-btn { display: none; }
    .theme-toggle-label { display: none; }

    .hero-title { font-size: clamp(30px, 8.4vw, 42px); }
    .hero-lead { font-size: 15.5px; }
    .hero-proof { gap: 10px 22px; }
    .hero-proof strong { font-size: 18px; }

    .phone { display: none; }

    .cta-shell { padding: 30px 22px; }
    .cta-shell .btn { width: 100%; }

    .filter-count { margin-inline-start: 0; }
    .footer-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .grid-plane, .grid-sweep::before, .grid-sweep::after, .orb { animation: none; }
    .line-actual { stroke-dashoffset: 0; }
}

/* The grid plane costs nothing but it is still decoration: on a printed
   page it is only toner. */
@media print {
    .backdrop, .aurora, .site-header, .site-footer, .cta-band { display: none; }
    body { background: #fff; color: #000; }
}
