/* ==========================================================================
   Automata public site (apps.innovestraenterprises.co.ke)
   Flat, theme-aware (light / dark), responsive from 320px.
   Theme lives on <html data-theme="light|dark"> (key: automata_theme).
   ========================================================================== */

:root {
    color-scheme: light;
    --brand: #0a7f42;
    --brand-hover: #086b37;
    --brand-ink: #ffffff;
    --brand-soft: rgba(10, 127, 66, 0.09);
    --brand-line: rgba(10, 127, 66, 0.32);

    --bg: #f3f6f4;
    --surface: #ffffff;
    --surface-2: #f8faf8;
    --sunken: #e8eeea;
    --line: #dbe3dd;
    --line-strong: #c3cfc6;

    --t1: #0e1a13;
    --t2: #33423a;
    --t3: #586860;
    --t4: #86948c;

    --wa: #0f7d6e;
    --ok: #0a7f42;   --ok-soft: #e4f3ea;
    --warn: #96590a; --warn-soft: #fcefd8;
    --bad: #bc2a40;  --bad-soft: #fce8ec;
    --info: #1d5db5; --info-soft: #e7effb;

    --overlay: rgba(10, 16, 12, 0.55);
    --shadow-pop: 0 14px 38px -10px rgba(10, 16, 12, 0.32);
    --shadow-phone: 0 40px 70px -28px rgba(10, 16, 12, 0.45);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 26px;
    --r-pill: 999px;

    --gutter: 20px;
    --header-h: 68px;
    --font-display: "Bricolage Grotesque", "Geist", ui-sans-serif, system-ui, sans-serif;
    --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --brand: #3cc681;
    --brand-hover: #5ad397;
    --brand-ink: #04150c;
    --brand-soft: rgba(60, 198, 129, 0.12);
    --brand-line: rgba(60, 198, 129, 0.38);

    --bg: #09100c;
    --surface: #111914;
    --surface-2: #151f19;
    --sunken: #0c130f;
    --line: #1f2d25;
    --line-strong: #2d4034;

    --t1: #eef5f0;
    --t2: #c6d3ca;
    --t3: #98a99f;
    --t4: #6c7d73;

    --wa: #2fb5a2;
    --ok: #3cc681;   --ok-soft: rgba(60, 198, 129, 0.14);
    --warn: #e6a64a; --warn-soft: rgba(230, 166, 74, 0.14);
    --bad: #f07b8c;  --bad-soft: rgba(240, 123, 140, 0.14);
    --info: #7aa9ee; --info-soft: rgba(122, 169, 238, 0.14);

    --overlay: rgba(0, 0, 0, 0.66);
    --shadow-pop: 0 14px 38px -10px rgba(0, 0, 0, 0.7);
    --shadow-phone: 0 40px 70px -28px rgba(0, 0, 0, 0.8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--t1);
    font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.12; letter-spacing: -0.02em; color: var(--t1); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 12px; text-decoration: none; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--t3); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 46px; padding: 0 20px; border-radius: var(--r-md);
    border: 1px solid transparent; background: transparent; color: var(--t1);
    font-weight: 600; font-size: 0.95rem; line-height: 1; cursor: pointer; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.btn svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--outline { border-color: var(--line-strong); background: var(--surface); color: var(--t1); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.btn--ghost { color: var(--t2); }
.btn--ghost:hover { background: var(--sunken); color: var(--t1); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { filter: brightness(1.08); }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 0.85rem; border-radius: 10px; }
.btn[disabled], .btn.is-busy { opacity: 0.7; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ap-spin 0.7s linear infinite; }
@keyframes ap-spin { to { transform: rotate(360deg); } }

.icon-btn {
    width: 44px; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line);
    background: var(--surface); color: var(--t2); display: inline-grid; place-items: center; cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.icon-btn svg { width: 19px; height: 19px; fill: currentColor; }
.icon-btn svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: block; }

/* ---------- Header ---------- */
.header {
    position: sticky; top: 0; z-index: 100; height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}
.header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--t1); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: #0d1a12; flex: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { padding: 9px 14px; border-radius: 10px; color: var(--t2); font-weight: 550; font-size: 0.93rem; }
.nav a:hover { background: var(--sunken); color: var(--t1); text-decoration: none; }
.nav a[aria-current="page"], .nav a.is-active { color: var(--brand); background: var(--brand-soft); }
.header__actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.header__cta { display: inline-flex; }

@media (max-width: 920px) {
    .menu-btn { display: inline-grid; }
    .header__cta { display: none; }
    .nav {
        position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; padding: 12px var(--gutter) 20px;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-pop);
        transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
        transition: transform 0.2s var(--ease), opacity 0.2s, visibility 0.2s;
    }
    .nav a { padding: 14px 12px; font-size: 1.02rem; }
    .nav.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
    .nav .nav-cta { display: flex; margin-top: 8px; }
    .header__actions { margin-left: auto; }
}
@media (min-width: 921px) { .nav .nav-cta { display: none; } }

/* ---------- Layout helpers ---------- */
.section { padding: 88px 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { margin-top: 14px; color: var(--t3); font-size: 1.05rem; }
@media (max-width: 720px) { .section { padding: 60px 0; } .section-head { margin-bottom: 30px; } }

.pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
    border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
    font-size: 0.82rem; font-weight: 600; color: var(--t2);
}
.pill--brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.pill--warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pill--info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.pill--bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); position: relative; flex: none; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: ap-ping 2s ease-out infinite; }
@keyframes ap-ping { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 72px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 750; line-height: 1.03; letter-spacing: -0.035em; margin-top: 18px; text-wrap: balance; }
.hero__desc { margin-top: 20px; font-size: 1.12rem; color: var(--t3); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; min-width: 96px; }
.facts b { font-family: var(--font-mono); font-weight: 600; font-size: 0.98rem; color: var(--t1); }
.facts span { font-size: 0.8rem; color: var(--t4); }
@media (max-width: 920px) {
    .hero { padding: 36px 0 52px; }
    .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .hero__actions .btn { flex: 1 1 100%; }
}

/* Phone with a live USSD session: the one memorable thing on the page. */
.phone-wrap { display: grid; place-items: center; position: relative; }
.phone-wrap::before {
    content: ""; position: absolute; width: min(420px, 90%); aspect-ratio: 1; border-radius: 50%;
    background: var(--brand-soft); filter: none; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.phone {
    position: relative; width: 292px; max-width: 78vw; aspect-ratio: 9 / 18.4; border-radius: 42px;
    background: #0a0d0b; border: 1px solid #28312b; padding: 10px; box-shadow: var(--shadow-phone);
}
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #e9efeb; color: #101813; display: flex; flex-direction: column; }
:root[data-theme="dark"] .phone__screen { background: #121a15; color: #eef5f0; }
.phone__status { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 6px; font-size: 0.72rem; font-weight: 600; font-family: var(--font-mono); }
.phone__notch { position: absolute; top: 9px; left: 50%; width: 74px; height: 20px; transform: translateX(-50%); border-radius: 12px; background: #0a0d0b; }
.phone__dial { padding: 26px 22px 0; text-align: center; }
.phone__dial small { display: block; font-size: 0.7rem; opacity: 0.6; letter-spacing: 0.02em; }
.phone__dial output { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 600; letter-spacing: 0.04em; min-height: 2.1rem; }
.ussd {
    position: absolute; left: 16px; right: 16px; bottom: 22px; background: var(--surface); color: var(--t1);
    border-radius: 20px; padding: 16px 16px 12px; box-shadow: 0 18px 40px -14px rgba(0,0,0,0.45);
    transform: translateY(18px); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.35s;
}
.ussd.is-on { transform: none; opacity: 1; }
.ussd__title { font-weight: 700; font-size: 0.8rem; margin-bottom: 8px; color: var(--t3); }
.ussd__body { font-size: 0.92rem; line-height: 1.55; min-height: 5.6em; white-space: pre-line; }
.ussd__ok { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; font-size: 0.82rem; color: var(--brand); }
.phone__legend { position: absolute; left: 50%; bottom: -38px; transform: translateX(-50%); font-size: 0.75rem; color: var(--t4); white-space: nowrap; }
.phone__chip {
    position: absolute; right: -6px; top: 18%; padding: 8px 12px; border-radius: 12px; background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.phone__chip svg { width: 16px; height: 16px; fill: var(--brand); }
@media (max-width: 920px) { .phone-wrap { padding-bottom: 36px; } .phone__chip { right: 6%; } }

/* ---------- Latest build strip ---------- */
.build { margin-top: -24px; position: relative; z-index: 2; }
.build__bar {
    display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)) auto; gap: 8px 28px; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 22px;
}
.build__label { display: flex; align-items: center; gap: 12px; }
.kv { display: flex; flex-direction: column; min-width: 0; }
.kv span { font-size: 0.76rem; color: var(--t4); }
.kv b { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv b.mono { font-size: 0.9rem; }
@media (max-width: 920px) {
    .build { margin-top: 0; }
    .build__bar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; }
    .build__label { grid-column: 1 / -1; }
    .build__bar > .btn { grid-column: 1 / -1; }
}

/* ---------- Capabilities (bento, unequal spans) ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cap:nth-child(1) { grid-column: span 4; }
.cap:nth-child(2) { grid-column: span 2; }
.cap:nth-child(3) { grid-column: span 2; }
.cap:nth-child(4) { grid-column: span 4; }
.cap__icon { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.cap__icon svg { width: 22px; height: 22px; fill: currentColor; }
.cap h3 { font-size: 1.2rem; }
.cap p { color: var(--t3); font-size: 0.97rem; }
.cap__stat { margin-top: auto; padding-top: 14px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--brand); font-weight: 600; }
@media (max-width: 860px) { .bento { grid-template-columns: minmax(0, 1fr); } .cap:nth-child(n) { grid-column: auto; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.section--tint .step { background: var(--surface-2); }
.step::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-family: var(--font-mono); font-weight: 600; font-size: 0.9rem; }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--t3); font-size: 0.94rem; }
.step__note { margin-top: auto; padding-top: 12px; font-size: 0.82rem; color: var(--brand); font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.step__note svg { width: 16px; height: 16px; fill: currentColor; flex: none; margin-top: 2px; }
@media (max-width: 1020px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Spec + FAQ ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.specs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.specs div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--t3); font-size: 0.9rem; }
.specs dd { margin: 0; font-weight: 600; font-size: 0.92rem; text-align: right; overflow-wrap: anywhere; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; fill: none; stroke: var(--t4); stroke-width: 2; transition: transform 0.2s; flex: none; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details > div { padding: 0 18px 18px; color: var(--t3); font-size: 0.97rem; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Support ---------- */
.support {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 40px;
}
.support h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.support p { margin-top: 12px; color: var(--t3); }
.contacts { margin-top: 20px; display: grid; gap: 10px; }
.contacts li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.contacts svg { width: 18px; height: 18px; fill: var(--brand); flex: none; }
.support__actions { display: grid; gap: 12px; }
@media (max-width: 860px) { .support { grid-template-columns: minmax(0, 1fr); padding: 26px 20px; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 52px 0 30px; background: var(--surface); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.footer__desc { margin-top: 10px; color: var(--t3); font-size: 0.93rem; max-width: 38ch; }
.footer h4 { font-size: 0.92rem; margin-bottom: 14px; color: var(--t2); }
.footer li + li { margin-top: 10px; }
.footer li a { color: var(--t3); font-size: 0.93rem; overflow-wrap: anywhere; }
.footer li a:hover { color: var(--brand); }
.footer__bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 0.84rem; color: var(--t4); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 30px; } }

/* ---------- Downloads page ---------- */
.page-head { padding: 44px 0 28px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; color: var(--t4); margin-bottom: 14px; }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 750; letter-spacing: -0.03em; }
.page-head p { margin-top: 12px; color: var(--t3); max-width: 62ch; font-size: 1.05rem; }

.release {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
}
.release__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 30px; align-items: start; }
.release__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 14px; }
.release__title h2 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 750; letter-spacing: -0.035em; }
.release__title span { font-family: var(--font-mono); color: var(--t3); font-size: 0.95rem; }
.release__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 24px; padding: 0 30px 26px; }
.release__cta { display: grid; gap: 10px; min-width: 250px; }
.release__tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 30px; border-top: 1px solid var(--line); background: var(--surface-2); }
.hash { display: flex; align-items: center; gap: 10px; padding: 14px 30px; border-top: 1px solid var(--line); font-size: 0.86rem; flex-wrap: wrap; }
.hash code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--t2); overflow-wrap: anywhere; flex: 1 1 280px; }
.hash .label { color: var(--t3); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.hash .label svg { width: 16px; height: 16px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notes { padding: 28px 30px 32px; border-top: 1px solid var(--line); }
.notes h3 { font-size: 1.15rem; }
.notes__text { margin-top: 12px; color: var(--t2); max-width: 70ch; }
.highlights { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 22px; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--t2); }
.highlights svg { width: 18px; height: 18px; fill: var(--brand); flex: none; margin-top: 3px; }
@media (max-width: 760px) {
    .release__top { grid-template-columns: minmax(0, 1fr); padding: 22px 18px 18px; }
    .release__cta { min-width: 0; }
    .release__meta, .release__tools, .hash, .notes { padding-left: 18px; padding-right: 18px; }
}

.history { margin-top: 56px; }
.history__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.history__bar h2 { font-size: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--t2); border-radius: var(--r-pill); padding: 8px 14px; font-size: 0.86rem; font-weight: 600; cursor: pointer; min-height: 38px; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.search { position: relative; flex: 1 1 220px; max-width: 320px; }
.search input { width: 100%; height: 42px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--t1); padding: 0 14px 0 40px; font: inherit; font-size: 0.92rem; }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--t4); stroke-width: 2; stroke-linecap: round; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.row__main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) auto; gap: 8px 22px; align-items: center; padding: 16px 20px; }
.row__v { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.row__v b { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.01em; }
.row__d { font-size: 0.88rem; color: var(--t3); }
.row__actions { display: flex; gap: 8px; justify-content: flex-end; }
.row details > summary { list-style: none; cursor: pointer; padding: 0 20px 14px; font-size: 0.84rem; font-weight: 600; color: var(--brand); display: inline-flex; gap: 6px; align-items: center; }
.row details > summary::-webkit-details-marker { display: none; }
.row details[open] > summary { padding-bottom: 6px; }
.row details > div { padding: 0 20px 18px; color: var(--t2); font-size: 0.93rem; }
.empty { text-align: center; padding: 38px 20px; color: var(--t3); border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.more { display: flex; justify-content: center; margin-top: 18px; }
@media (max-width: 760px) {
    .row__main { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
    .row__main .row__d:nth-of-type(1) { grid-column: 1 / -1; order: 3; }
    .row__actions { grid-column: 2; grid-row: 1; }
    .row details > summary, .row details > div { padding-left: 16px; padding-right: 16px; }
    .search { max-width: none; flex-basis: 100%; }
}

/* ---------- Skeletons ---------- */
.skeleton { position: relative; overflow: hidden; color: transparent !important; background: var(--sunken); border-radius: 8px; user-select: none; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: var(--line); opacity: 0; animation: ap-pulse 1.2s ease-in-out infinite; }
@keyframes ap-pulse { 50% { opacity: 0.6; } }

/* ---------- Toasts ---------- */
.ap-toasts { position: fixed; z-index: 1300; top: 16px; right: 16px; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.ap-toast {
    pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px;
    padding: 12px 14px 12px 12px; background: var(--surface); color: var(--t1);
    border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
    font-size: 0.9rem; font-weight: 550; line-height: 1.4; animation: ap-in 0.22s var(--ease) both;
}
.ap-toast.is-leaving { animation: ap-out 0.18s ease-in both; }
.ap-toast__ic { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.ap-toast__ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ap-toast.is-error .ap-toast__ic { background: var(--bad-soft); color: var(--bad); }
.ap-toast.is-info .ap-toast__ic { background: var(--info-soft); color: var(--info); }
.ap-toast__msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ap-toast__x { border: 0; background: transparent; color: var(--t4); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 1.15rem; line-height: 1; }
.ap-toast__x:hover { background: var(--sunken); color: var(--t1); }
.ap-toast__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ok); transform-origin: left; animation: ap-bar linear both; }
.ap-toast.is-error .ap-toast__bar { background: var(--bad); }
.ap-toast.is-info .ap-toast__bar { background: var(--info); }
@keyframes ap-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes ap-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes ap-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) { .ap-toasts { top: 10px; right: 12px; left: 12px; width: auto; align-items: center; } .ap-toast { width: 100%; max-width: 420px; } }

/* ---------- Dialogs (SweetAlert2), one look everywhere ---------- */
.swal2-container { padding: 16px !important; }
.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { background: var(--overlay) !important; }
.swal2-popup {
    width: 100%; max-width: 420px; padding: 26px 24px 22px; box-sizing: border-box;
    background: var(--surface); color: var(--t1); border: 1px solid var(--line); border-radius: 22px;
    box-shadow: var(--shadow-pop); font-family: var(--font-sans); font-size: 1rem; text-align: center;
}
.swal2-popup .swal2-icon { transform: scale(0.62); margin: -6px auto 0; }
.swal2-popup .swal2-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: var(--t1); padding: 0; margin: 4px 0 0; }
.swal2-popup .swal2-html-container { font-size: 0.93rem; line-height: 1.55; color: var(--t3); margin: 12px 0 0; padding: 0; text-align: left; overflow-wrap: anywhere; }
.swal2-popup .swal2-actions { margin: 22px 0 0; gap: 10px; width: 100%; flex-wrap: wrap; }
.swal2-popup .swal2-actions button { flex: 1 1 130px; margin: 0; }
.swal2-popup .swal2-styled { min-height: 46px; padding: 0 16px; border-radius: var(--r-md); font-family: var(--font-sans); font-size: 0.93rem; font-weight: 600; box-shadow: none !important; }
.swal2-popup .swal2-styled.swal2-confirm { background: var(--brand); color: var(--brand-ink); }
.swal2-popup .swal2-styled.swal2-cancel { background: transparent; color: var(--t2); border: 1px solid var(--line-strong); }
.swal2-popup .swal2-styled:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.swal2-popup .swal2-checkbox { margin: 16px 0 0; justify-content: flex-start; color: var(--t3); font-size: 0.88rem; }
.swal2-popup .swal2-close { color: var(--t3); }
.dl-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 2px 0 14px; }
.dl-meta div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.dl-meta span { display: block; font-size: 0.74rem; color: var(--t4); }
.dl-meta b { font-size: 0.92rem; color: var(--t1); font-weight: 600; }
.dl-tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.dl-tips li { position: relative; padding-left: 26px; font-size: 0.9rem; color: var(--t2); }
.dl-tips li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.dl-hash { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); font-family: var(--font-mono); font-size: 0.74rem; color: var(--t3); overflow-wrap: anywhere; text-align: left; }
.qr-box { display: grid; place-items: center; padding: 6px 0 4px; }
.qr-box canvas, .qr-box img { width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 10px; image-rendering: pixelated; }
.qr-url { margin-top: 10px; text-align: center; font-size: 0.78rem; word-break: break-all; color: var(--t3); font-family: var(--font-mono); }
@media (max-width: 640px) {
    .swal2-container { padding: 12px !important; }
    .swal2-popup { max-width: 100%; padding: 22px 18px 18px; border-radius: 20px; }
    .swal2-popup .swal2-actions { flex-direction: column-reverse; }
    .swal2-popup .swal2-actions button { flex: 1 1 auto; width: 100%; }
}

/* ---------- Inspection lock overlay ---------- */
.devtools-lock-overlay { position: fixed; inset: 0; z-index: 999999; background: rgba(10, 16, 12, 0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: none; align-items: center; justify-content: center; padding: 24px; }
.devtools-lock-card { background: #0f1a13; border: 1px solid rgba(60, 198, 129, 0.35); border-radius: 22px; padding: 36px 28px; max-width: 440px; width: 100%; text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8); color: #eef5f0; }
.devtools-lock-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(60, 198, 129, 0.14); border: 1px solid rgba(60, 198, 129, 0.4); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: #3cc681; }
.devtools-lock-icon svg { width: 28px; height: 28px; fill: currentColor; }
.devtools-lock-title { font-family: var(--font-display); font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.devtools-lock-desc { color: #a9b9ae; font-size: 0.95rem; line-height: 1.6; }

/* Prevent text selection of marketing UI chrome only */
.btn, .chip, .icon-btn, .nav a { user-select: none; -webkit-user-select: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .btn .spin { animation-duration: 1s !important; animation-iteration-count: infinite !important; }
}
@media print { .header, .menu-btn, .ap-toasts { display: none !important; } }

/* ---------- Fixes ---------- */
ol { margin: 0; padding: 0; list-style: none; }
.support > * { min-width: 0; }
.support__actions .btn { white-space: normal; text-align: center; }
.contacts a { overflow-wrap: anywhere; }
.release__top > *, .row__main > * { min-width: 0; }

/* SweetAlert buttons (buttonsStyling:false drops .swal2-styled) */
.swal2-popup .swal2-confirm, .swal2-popup .swal2-cancel, .swal2-popup .swal2-deny {
    min-height: 46px; padding: 0 18px; border-radius: var(--r-md); font-family: var(--font-sans);
    font-size: 0.93rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; box-shadow: none; line-height: 1;
}
.swal2-popup .swal2-confirm { background: var(--brand); color: var(--brand-ink); }
.swal2-popup .swal2-confirm:hover { background: var(--brand-hover); }
.swal2-popup .swal2-cancel { background: transparent; color: var(--t2); border-color: var(--line-strong); }
.swal2-popup .swal2-cancel:hover { border-color: var(--brand); color: var(--brand); }
.swal2-popup .swal2-confirm:focus-visible, .swal2-popup .swal2-cancel:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.swal2-popup .swal2-title { text-align: center; }
.swal2-popup .swal2-input-label, .swal2-popup .swal2-checkbox { background: transparent !important; color: var(--t3) !important; margin: 16px 0 0; justify-content: flex-start; font-size: 0.88rem; }
.swal2-popup .swal2-checkbox input { accent-color: var(--brand); width: 18px; height: 18px; }
.nav a.btn--primary, .nav a.btn--primary:hover { color: var(--brand-ink); background: var(--brand); }
.nav a.btn--primary:hover { background: var(--brand-hover); }

/* ---------- Centered layout pass ---------- */
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.page-head--center { text-align: center; }
.page-head--center .crumbs { justify-content: center; }
.page-head--center p { margin-left: auto; margin-right: auto; }
.specs--center { max-width: 560px; margin: 0 auto; }
.steps .step { text-align: center; align-items: center; }
.cap { text-align: left; }

.release { text-align: center; }
.release__hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 28px 30px; }
.release__title { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; }
.release__title h2 { font-size: clamp(3rem, 11vw, 5.4rem); letter-spacing: -0.05em; line-height: 1; }
.release__tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.release__dl { width: min(100%, 340px); margin-top: 6px; }
.release__hint { font-size: 0.84rem; color: var(--t4); max-width: 38ch; }
.release__stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); background: var(--surface-2); }
.release__stats > div { padding: 18px 12px; border-right: 1px solid var(--line); min-width: 0; }
.release__stats > div:last-child { border-right: 0; }
.release__stats dt { font-size: 0.76rem; color: var(--t4); }
.release__stats dd { margin: 4px 0 0; font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.notes { text-align: center; }
.notes__text { margin-left: auto; margin-right: auto; }
.highlights { max-width: 760px; margin-left: auto; margin-right: auto; text-align: left; }
@media (max-width: 760px) {
    .release__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .release__stats > div { border-bottom: 1px solid var(--line); }
    .release__stats > div:nth-child(2n) { border-right: 0; }
    .release__stats > div:last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0; }
    .release__hero { padding: 32px 18px 24px; }
    .highlights { grid-template-columns: minmax(0, 1fr); }
}
.history__bar { justify-content: center; text-align: center; }
.history__bar h2 { flex: 1 1 100%; }
.chips { justify-content: center; }
.search { flex: 1 1 100%; max-width: 420px; }
.row__main { text-align: left; }
.support { text-align: center; }
.support .contacts li { justify-content: center; }
@media (min-width: 861px) { .support { grid-template-columns: minmax(0, 1fr); justify-items: center; } .support__actions { grid-template-columns: repeat(2, auto); } .support__actions .btn--ghost { grid-column: 1 / -1; } }
@media (max-width: 760px) {
    .row__main { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 8px; padding: 18px 16px; }
    .row__main .row__d:nth-of-type(1) { grid-column: auto; order: 0; }
    .row__v { justify-content: center; }
    .row__actions { grid-column: auto; grid-row: auto; width: 100%; justify-content: center; margin-top: 4px; }
    .row__actions .btn { width: 100%; }
}

/* ---------- Agent finder (main domain) ---------- */
.finder { padding: 72px 0 64px; text-align: center; }
.finder__inner { display: flex; flex-direction: column; align-items: center; }
.finder h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 750; letter-spacing: -0.035em; margin-top: 18px; text-wrap: balance; }
.finder__sub { margin-top: 16px; color: var(--t3); font-size: 1.1rem; max-width: 52ch; }
.finder__form { display: flex; gap: 10px; width: 100%; max-width: 640px; margin-top: 34px; }
.finder__field { position: relative; flex: 1; min-width: 0; }
.finder__icon { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--t4); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.finder__input { width: 100%; height: 56px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--t1); font: inherit; font-family: var(--font-mono); font-size: 1.02rem; padding: 0 44px 0 50px; text-transform: none; }
.finder__input::placeholder { font-family: var(--font-sans); color: var(--t4); }
.finder__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.finder__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--t4); font-size: 1.4rem; line-height: 1; cursor: pointer; display: none; }
.finder__clear.is-active { display: block; }
.finder__clear:hover { background: var(--sunken); color: var(--t1); }
.finder__submit { flex: none; }
.finder__hint { margin-top: 16px; color: var(--t4); font-size: 0.9rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; }
.chip--code { font-family: var(--font-mono); min-height: 32px; padding: 4px 12px; }
.finder__results { width: 100%; max-width: 640px; margin-top: 22px; display: none; }
.finder__results.is-visible { display: block; }
.result { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.result__ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.result__ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.result__body { flex: 1; min-width: 0; }
.result b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.05rem; overflow-wrap: anywhere; }
.result p { margin-top: 2px; font-size: 0.9rem; color: var(--t3); overflow-wrap: anywhere; }
.result--miss { border-color: transparent; background: var(--bad-soft); }
.result--miss .result__ic { background: transparent; color: var(--bad); }
.result--miss b { color: var(--bad); }
.bento--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento--three .cap:nth-child(n) { grid-column: auto; text-align: center; align-items: center; background: var(--bg); }
.footer--slim { padding: 22px 0; }
.footer--slim a { color: var(--t3); }
@media (max-width: 860px) { .bento--three { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
    .finder { padding: 44px 0 44px; }
    .finder__form { flex-direction: column; }
    .finder__submit { width: 100%; }
    .result { flex-wrap: wrap; }
    .result .btn { width: 100%; }
}
