/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

/* ============================================================
   APP SHELL (dashboard / admin) — uses brand tokens.
   Lives under <body class="sh"> so it inherits all the brand
   custom-properties (--bg, --amber, --rule, etc.). Selectors are
   kept legacy so existing dashboard/admin templates pick up the
   new look without any HTML changes.
   ============================================================ */

/* Push content below the fixed 64-px brand nav. */
.sh-app {
    padding-top: 64px;
}

/* Force the brand nav to always look "scrolled" on app pages
   (no hero video → no transparent state). */
.sh-nav.sh-nav-solid {
    background: color-mix(in oklch, var(--bg) 94%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--rule);
}
.sh-nav.sh-nav-solid .sh-nav-menu-inline > .sh-btn {
    max-width: 14rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: 0;
    border-width: 1px;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Legacy stub: a few admin redirects might still hit `.app-nav` —
   keep it invisible if it ever renders. */
.app-nav { display: none; }
.spacer { flex: 1; }

/* ============================================================
   SHARED APP COMPONENTS
   ============================================================ */
.sh-app .container {
    max-width: 1000px;
    margin: 2.2rem auto 3.6rem;
    padding: 0 1.2rem;
}
.sh-app h1 {
    font-size: clamp(1.7rem, 2.2vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.022em;
    margin-bottom: 1.6rem;
    color: var(--text);
}
.sh-app h2 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.sh-app .card {
    background: var(--bg-1);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 1.6rem 1.7rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--card-elev, none);
}

.sh-app .glass {
    background: color-mix(in oklch, var(--bg-1) 70%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid color-mix(in oklch, var(--amber) 28%, var(--rule));
    border-radius: 16px;
}

.sh-app .form-group { margin-bottom: 1rem; }
.sh-app label {
    display: block;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}
.sh-app input[type=text],
.sh-app input[type=email],
.sh-app input[type=password],
.sh-app input[type=date],
.sh-app input[type=number],
.sh-app select,
.sh-app textarea {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--sans);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.sh-app input:focus,
.sh-app select:focus,
.sh-app textarea:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--amber) 22%, transparent);
}

.sh-app .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 160ms var(--easeq), background 160ms ease,
                color 160ms ease, border-color 160ms ease, box-shadow 200ms var(--easeq);
}
.sh-app .btn:hover { transform: translateY(-1px); }
.sh-app .btn-primary {
    background: var(--amber);
    color: oklch(20% 0.06 60);
    border-color: var(--amber);
}
.sh-app .btn-primary:hover {
    background: color-mix(in oklch, var(--amber) 92%, white);
    box-shadow: 0 6px 24px -8px color-mix(in oklch, var(--amber) 60%, transparent);
}
.sh-app .btn-danger {
    background: transparent;
    color: oklch(82% 0.13 28);
    border-color: oklch(50% 0.18 28);
}
.sh-app .btn-danger:hover {
    background: color-mix(in oklch, oklch(50% 0.18 28) 18%, transparent);
    color: oklch(92% 0.11 28);
}
.sh-app .btn-sm { padding: 0.4rem 0.8rem; font-size: 0.68rem; }

.sh-app table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.sh-app th {
    text-align: left;
    padding: 0.65rem 0.8rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-bottom: 1px solid var(--rule);
}
.sh-app td {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid color-mix(in oklch, var(--rule) 50%, transparent);
    color: var(--text-mid);
}
.sh-app tr:hover td { background: color-mix(in oklch, var(--bg-1-hi) 50%, transparent); }

.sh-app .badge {
    display: inline-block;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.sh-app .badge-green {
    background: color-mix(in oklch, oklch(58% 0.16 145) 16%, var(--bg-1));
    color: oklch(86% 0.14 145);
    border: 1px solid color-mix(in oklch, oklch(58% 0.16 145) 45%, transparent);
}
.sh-app .badge-red {
    background: color-mix(in oklch, oklch(55% 0.20 28) 16%, var(--bg-1));
    color: oklch(86% 0.13 28);
    border: 1px solid color-mix(in oklch, oklch(55% 0.20 28) 45%, transparent);
}
.sh-app .badge-yellow {
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-1));
    color: var(--amber);
    border: 1px solid color-mix(in oklch, var(--amber) 45%, transparent);
}
.sh-app .badge-gray {
    background: var(--bg-1-hi);
    color: var(--text-dim);
    border: 1px solid var(--rule);
}

.sh-app .tier-badge {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sh-app .tier-free {
    background: color-mix(in oklch, var(--teal) 14%, var(--bg-1));
    color: var(--teal);
    border: 1px solid color-mix(in oklch, var(--teal) 38%, transparent);
}
.sh-app .tier-pro {
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-1));
    color: var(--amber);
    border: 1px solid color-mix(in oklch, var(--amber) 45%, transparent);
}

.sh-app .error { color: oklch(82% 0.13 28); font-size: 0.9rem; margin-top: 0.5rem; }
.sh-app .info  { color: var(--teal-mid); font-size: 0.9rem; }
.sh-app .center { text-align: center; }

/* ============================================================
   DASHBOARD-SPECIFIC COMPONENTS
   ============================================================ */
.sh-app .flash-card {
    padding: 1.3rem 1.6rem;
    margin-bottom: 1.6rem;
    border-radius: 16px;
    border: 1px solid color-mix(in oklch, var(--amber) 35%, var(--rule));
    background:
        radial-gradient(ellipse 60% 60% at 0% 0%, color-mix(in oklch, var(--amber) 14%, transparent), transparent 70%),
        color-mix(in oklch, var(--bg-1) 80%, transparent);
}
.sh-app .flash-card strong { color: var(--amber); }

.sh-app .flash-key-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.sh-app .license-key-display {
    font-family: var(--mono);
    font-size: 1.02rem;
    color: var(--amber);
    background: var(--bg-2);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    letter-spacing: 0.08em;
    border: 1px solid color-mix(in oklch, var(--amber) 30%, var(--rule));
}

.sh-app .howto-steps {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
}
.sh-app .howto-steps strong { color: var(--text); }

.sh-app .expiry-block { margin-bottom: 0.9rem; }
.sh-app .expiry-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
}
.sh-app .expiry-label { color: var(--text-mid); }
.sh-app .expiry-date {
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.sh-app .progress-bar {
    height: 6px;
    background: var(--bg-2);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--rule);
}
.sh-app .progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}
.sh-app .fill-green  { background: linear-gradient(90deg, oklch(50% 0.16 145), oklch(76% 0.18 145)); }
.sh-app .fill-yellow { background: linear-gradient(90deg, var(--amber-deep), var(--amber)); }
.sh-app .fill-red    { background: linear-gradient(90deg, oklch(50% 0.20 28), oklch(76% 0.18 28)); }

.sh-app .alert-banner {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 0.8rem;
    border: 1px solid transparent;
}
.sh-app .alert-red {
    background: color-mix(in oklch, oklch(50% 0.20 28) 14%, var(--bg-1));
    border-color: color-mix(in oklch, oklch(50% 0.20 28) 45%, transparent);
    color: oklch(86% 0.13 28);
}
.sh-app .alert-yellow {
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-1));
    border-color: color-mix(in oklch, var(--amber) 45%, transparent);
    color: var(--amber);
}

/* ============================================================
   DASHBOARD — ADMIN BANNER + SWITCH INSTRUCTIONS
   ============================================================ */
.sh-app .admin-hint-banner {
    background: color-mix(in oklch, var(--amber) 10%, var(--bg-1));
    border: 1px solid color-mix(in oklch, var(--amber) 30%, var(--rule));
    border-radius: 10px;
    padding: 0.7rem 1.1rem;
    font-size: 0.85rem;
    color: var(--text-mid);
    margin-bottom: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.sh-app .admin-hint-banner a {
    color: var(--amber);
    text-decoration: none;
    font-weight: 600;
}
.sh-app .admin-hint-banner a:hover { text-decoration: underline; }

.sh-app .switch-instructions {
    background: var(--bg-2);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 0.95rem 1.1rem;
    margin-top: 0.9rem;
    font-size: 0.86rem;
    color: var(--text-mid);
}
.sh-app .switch-instructions strong { color: var(--text); }
.sh-app .switch-instructions ol {
    margin: 0.5rem 0 0;
    padding-left: 1.3rem;
    line-height: 1.8;
}

/* ============================================================
   ADMIN — STATS
   ============================================================ */
.sh-app .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.6rem;
}
.sh-app .stat-card {
    background: var(--bg-1);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    text-align: center;
}
.sh-app .stat-num {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1;
}
.sh-app .stat-num.green  { color: oklch(82% 0.16 145); }
.sh-app .stat-num.yellow { color: var(--amber); }
.sh-app .stat-num.accent { color: var(--teal); }
.sh-app .stat-label {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-top: 0.4rem;
}

/* Small label tags for HA-detected devices / claim metadata. */
.sh-app .device-ha-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber);
    margin-left: 0.4rem;
}
.sh-app .admin-key-mini {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--amber);
    margin-left: auto;
}
.sh-app .claim-meta {
    margin-left: 0.5rem;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 0.72rem;
}

/* Filter grid for admin (kept loose, no hard-coded inline widths). */
.sh-app .admin-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.9rem;
    align-items: end;
}

/* ============================================================
   DASHBOARD V2 — single-license hero card
   Apple-style: one wide canvas, generous breathing room, stripes
   separated by hairlines, one big focal point per stripe.
   ============================================================ */
.dash {
    max-width: 880px;
    margin: clamp(2rem, 5vh, 4rem) auto clamp(3rem, 7vh, 5.5rem);
    padding: 0 1.4rem;
}

.dash-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: clamp(1.6rem, 4vh, 2.6rem);
}
.dash-eyebrow {
    flex: 0 0 100%;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.35rem;
}
.dash-title {
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--text);
    margin: 0;
}
.dash-admin-link {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--amber);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid color-mix(in oklch, var(--amber) 40%, transparent);
    transition: background 160ms ease, transform 160ms var(--easeq);
}
.dash-admin-link:hover {
    background: color-mix(in oklch, var(--amber) 10%, transparent);
    transform: translateY(-1px);
}

/* ── New-license flash (after first login) ──────────────────── */
.dash-flash {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.6rem;
    border-radius: 16px;
    background:
        radial-gradient(ellipse 70% 100% at 0% 0%, color-mix(in oklch, var(--amber) 16%, transparent), transparent 70%),
        color-mix(in oklch, var(--bg-1) 75%, transparent);
    border: 1px solid color-mix(in oklch, var(--amber) 30%, var(--rule));
}
.dash-flash-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: oklch(20% 0.06 60);
    background: var(--amber);
}
.dash-flash-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--text);
    margin: 0 0 0.25rem;
}
.dash-flash-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-mid);
    margin: 0;
    max-width: 56ch;
}

/* ── Empty state ────────────────────────────────────────────── */
.dash-empty {
    padding: 4.2rem 2rem;
    text-align: center;
    border: 1px dashed color-mix(in oklch, var(--rule) 70%, transparent);
    border-radius: 20px;
    background: color-mix(in oklch, var(--bg-1) 40%, transparent);
}
.dash-empty-mark {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 1.5rem;
    opacity: 0.55;
}
.dash-empty-mark span {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--amber);
    animation: dash-empty-pulse 1.8s var(--easeq) infinite;
}
.dash-empty-mark span:nth-child(2) { animation-delay: 0.2s; opacity: 0.7; }
.dash-empty-mark span:nth-child(3) { animation-delay: 0.4s; opacity: 0.45; }
@keyframes dash-empty-pulse {
    0%, 100% { transform: scale(0.85); }
    50%      { transform: scale(1.1); }
}
.dash-empty h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.022em;
    color: var(--text);
    margin: 0 0 0.6rem;
}
.dash-empty p {
    color: var(--text-mid);
    font-size: 0.98rem;
    line-height: 1.55;
    max-width: 42ch;
    margin: 0 auto 1.6rem;
}

/* ============================================================
   LICENSE CARD — the centerpiece
   ============================================================ */
.lic-card {
    position: relative;
    background:
        radial-gradient(ellipse 60% 30% at 100% 0%, color-mix(in oklch, var(--amber) 10%, transparent), transparent 70%),
        var(--bg-1);
    border: 1px solid var(--rule);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--card-elev);
    margin-bottom: 1.6rem;
}
.lic-card.is-suspended,
.lic-card.is-revoked,
.lic-card.is-expired {
    background: var(--bg-1);  /* drop the amber glow when not active */
}

/* Hairline separator between every stripe inside a card. */
.lic-card > * + * {
    border-top: 1px solid color-mix(in oklch, var(--rule) 55%, transparent);
}

/* ── Stripe: identity ───────────────────────────────────────── */
.lic-identity {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.6rem;
    padding: clamp(1.6rem, 3.6vw, 2.4rem) clamp(1.6rem, 3.6vw, 2.4rem) clamp(1.4rem, 3vw, 2rem);
    flex-wrap: wrap;
}
.lic-identity-main { min-width: 0; }
.lic-tier-pill {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.85rem;
}
.lic-tier-free {
    background: color-mix(in oklch, var(--teal) 14%, var(--bg-2));
    color: var(--teal);
    border: 1px solid color-mix(in oklch, var(--teal) 38%, transparent);
}
.lic-tier-pro {
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-2));
    color: var(--amber);
    border: 1px solid color-mix(in oklch, var(--amber) 45%, transparent);
}
.lic-id-title {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 0.4rem;
}
.lic-id-sub {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    margin: 0;
}

.lic-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem 0.4rem 0.75rem;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}
.lic-status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}
.lic-status.is-active {
    color: oklch(82% 0.16 145);
    background: color-mix(in oklch, oklch(58% 0.16 145) 14%, var(--bg-1));
    border-color: color-mix(in oklch, oklch(58% 0.16 145) 40%, transparent);
}
.lic-status.is-active .lic-status-dot { background: oklch(82% 0.16 145); animation: lic-pulse 2.2s ease-in-out infinite; }
.lic-status.is-warn {
    color: var(--amber);
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-1));
    border-color: color-mix(in oklch, var(--amber) 40%, transparent);
}
.lic-status.is-warn .lic-status-dot { background: var(--amber); }
.lic-status.is-error {
    color: oklch(82% 0.14 28);
    background: color-mix(in oklch, oklch(55% 0.20 28) 14%, var(--bg-1));
    border-color: color-mix(in oklch, oklch(55% 0.20 28) 40%, transparent);
}
.lic-status.is-error .lic-status-dot { background: oklch(82% 0.14 28); }
@keyframes lic-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.85); }
    50%      { opacity: 1;    transform: scale(1); }
}

/* ── Stripe: countdown hero ─────────────────────────────────── */
.lic-countdown {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1.4rem, 4vw, 2.4rem);
    align-items: center;
    padding: clamp(2rem, 4.5vw, 3rem) clamp(1.6rem, 3.6vw, 2.4rem);
}
.lic-cd-numeric {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}
.lic-cd-num {
    font-size: clamp(4.2rem, 12vw, 7.5rem);
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 0.85;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.lic-cd-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: -0.005em;
}
.lic-cd-meta {
    min-width: 0;
}
.lic-cd-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.3rem;
}
.lic-cd-date {
    display: block;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.012em;
    margin-bottom: 1.1rem;
}
.lic-cd-bar {
    height: 4px;
    background: color-mix(in oklch, var(--bg-2) 60%, transparent);
    border-radius: 999px;
    overflow: hidden;
}
.lic-cd-fill {
    height: 100%;
    background: linear-gradient(90deg,
        color-mix(in oklch, oklch(60% 0.16 145) 70%, transparent),
        oklch(82% 0.16 145));
    border-radius: 999px;
    transition: width 0.5s var(--easeq);
}
.lic-cd-fill.is-soon {
    background: linear-gradient(90deg, var(--amber-deep), var(--amber));
}
.lic-cd-fill.is-urgent {
    background: linear-gradient(90deg, oklch(50% 0.20 28), oklch(76% 0.18 28));
}

/* ── Stripe: banners (expired / suspended) ──────────────────── */
.lic-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: clamp(1.2rem, 2.5vw, 1.6rem) clamp(1.6rem, 3.6vw, 2.4rem);
    font-size: 0.95rem;
    line-height: 1.55;
}
.lic-banner strong {
    font-size: 1.04rem;
    font-weight: 600;
    letter-spacing: -0.012em;
}
.lic-banner span {
    color: var(--text-mid);
    font-size: 0.88rem;
}
.lic-banner-mark {
    flex: 0 0 auto;
    width: 6px;
    align-self: stretch;
    border-radius: 4px;
}
.lic-banner.is-error { color: oklch(86% 0.13 28); }
.lic-banner.is-error .lic-banner-mark { background: oklch(55% 0.20 28); }
.lic-banner.is-warn { color: var(--amber); }
.lic-banner.is-warn .lic-banner-mark { background: var(--amber); }

/* ── Stripe label (shared) ──────────────────────────────────── */
.lic-section-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ── Stripe: license key ────────────────────────────────────── */
.lic-keyblock {
    padding: clamp(1.6rem, 3.6vw, 2.2rem) clamp(1.6rem, 3.6vw, 2.4rem);
}
.lic-keyblock .lic-section-label { margin-bottom: 0.85rem; }

.lic-key-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.lic-key {
    flex: 1 1 22rem;
    min-width: 0;
    font-family: var(--mono);
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--amber);
    background: var(--bg-2);
    padding: 0.95rem 1.1rem;
    border-radius: 10px;
    border: 1px solid color-mix(in oklch, var(--amber) 22%, var(--rule));
    word-break: break-all;
}
.lic-key.is-redacted {
    color: var(--text-faint);
    border-color: var(--rule);
}
.lic-key-note {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--text-faint);
}

.lic-key-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem 1.1rem;
    background: var(--amber);
    color: oklch(20% 0.06 60);
    border: 1px solid var(--amber);
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 160ms var(--easeq), background 160ms ease, box-shadow 200ms var(--easeq);
}
.lic-key-copy:hover {
    transform: translateY(-1px);
    background: color-mix(in oklch, var(--amber) 92%, white);
    box-shadow: 0 6px 24px -8px color-mix(in oklch, var(--amber) 60%, transparent);
}
.lic-key-copy.is-copied {
    background: oklch(82% 0.16 145);
    border-color: oklch(82% 0.16 145);
    color: oklch(22% 0.06 145);
}
.lic-key-copy-ico { flex: 0 0 auto; }

.lic-key-hint {
    margin: 0.85rem 0 0;
    font-size: 0.82rem;
    color: var(--text-faint);
    max-width: 56ch;
    line-height: 1.5;
}

/* ── Stripe: devices ────────────────────────────────────────── */
.lic-devices {
    padding: clamp(1.6rem, 3.6vw, 2.2rem) clamp(1.6rem, 3.6vw, 2.4rem) clamp(1.8rem, 4vw, 2.4rem);
}
.lic-devices-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}
.lic-devices-count {
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}
.lic-devices-count strong { color: var(--text); font-weight: 600; }
.lic-devices-empty {
    margin: 0 0 1.4rem;
    color: var(--text-faint);
    font-size: 0.92rem;
}

.lic-device-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.lic-device {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.1rem;
    align-items: center;
    padding: 1.1rem 1.2rem;
    border-radius: 14px;
    background: color-mix(in oklch, var(--bg-2) 65%, transparent);
    border: 1px solid color-mix(in oklch, var(--rule) 65%, transparent);
}
.lic-device.is-released { opacity: 0.72; }
.lic-device-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--text);
    background: color-mix(in oklch, var(--bg-1-hi) 80%, transparent);
    border: 1px solid var(--rule);
}
.lic-device-info { min-width: 0; }
.lic-device-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}
.lic-device-name {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lic-device-tag {
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-1));
    color: var(--amber);
    border: 1px solid color-mix(in oklch, var(--amber) 40%, transparent);
}
.lic-device-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--text-faint);
    margin-bottom: 0.45rem;
}
.lic-device-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-faint);
    flex: 0 0 auto;
}
.lic-device-hb {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.lic-device-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.22rem 0.55rem 0.22rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
}
.lic-device-pill span {
    width: 6px; height: 6px; border-radius: 50%;
}
.lic-device-pill.is-green {
    color: oklch(82% 0.16 145);
    background: color-mix(in oklch, oklch(58% 0.16 145) 14%, transparent);
    border-color: color-mix(in oklch, oklch(58% 0.16 145) 38%, transparent);
}
.lic-device-pill.is-green span { background: oklch(82% 0.16 145); box-shadow: 0 0 6px oklch(82% 0.16 145); }
.lic-device-pill.is-red {
    color: oklch(82% 0.13 28);
    background: color-mix(in oklch, oklch(55% 0.20 28) 14%, transparent);
    border-color: color-mix(in oklch, oklch(55% 0.20 28) 38%, transparent);
}
.lic-device-pill.is-red span { background: oklch(82% 0.13 28); }
.lic-device-hb-time {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--text-faint);
}

.lic-device-action { flex: 0 0 auto; }
.lic-device-release {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.lic-device-release:hover {
    border-color: color-mix(in oklch, oklch(55% 0.20 28) 60%, var(--rule));
    color: oklch(86% 0.13 28);
    background: color-mix(in oklch, oklch(55% 0.20 28) 10%, transparent);
}

/* ── Activation guidance ────────────────────────────────────── */
.lic-howto {
    margin-top: 1.6rem;
    padding: 1.4rem 1.5rem 1.55rem;
    border-radius: 14px;
    background: color-mix(in oklch, var(--bg-2) 60%, transparent);
    border: 1px dashed color-mix(in oklch, var(--rule) 80%, transparent);
}
.lic-howto-head {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.lic-howto-eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
}
.lic-howto-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--text);
}
.lic-howto-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    counter-reset: lic-howto;
}
.lic-howto-steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
}
.lic-howto-n {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-1);
    border: 1px solid var(--rule);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text);
}
.lic-howto-t {
    color: var(--text-mid);
    font-size: 0.92rem;
    line-height: 1.55;
    padding-top: 0.2rem;
}
.lic-howto-link {
    color: var(--accent, #f59e0b);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}
.lic-howto-link:hover {
    text-decoration-thickness: 2px;
}

/* ── Mobile tightening ──────────────────────────────────────── */
@media (max-width: 720px) {
    .dash { padding: 0 1rem; }
    .dash-title { font-size: 1.85rem; }
    .lic-identity { flex-direction: column; gap: 1rem; }
    .lic-identity-status { align-self: flex-start; }
    .lic-countdown { grid-template-columns: 1fr; gap: 0.6rem; }
    .lic-cd-num { font-size: 5.2rem; }
    .lic-device {
        grid-template-columns: auto 1fr;
        row-gap: 0.8rem;
    }
    .lic-device-action {
        grid-column: 1 / -1;
        justify-self: end;
    }
    .lic-key-row { flex-direction: column; align-items: stretch; }
    .lic-key-copy { justify-content: center; }
}

/* Small alert variants for the admin pages. */
.sh-app code {
    font-family: var(--mono);
    font-size: 0.84em;
    background: color-mix(in oklch, var(--bg-2) 70%, transparent);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* ============================================================
   LANDING — TECH PRODUCT, DARK WARM GRAPHITE
   Computer vision feel: telemetry teal, activation amber.
   Self-contained: no overlap with dashboard styles.
   ============================================================ */

.sh {
    --bg:           oklch(10% 0.007 75);
    --bg-1:         oklch(23% 0.014 75);
    --bg-1-hi:      oklch(27% 0.014 75);
    --bg-2:         oklch(7% 0.005 75);
    --bg-deep:      oklch(4% 0.003 75);
    --rule:         oklch(42% 0.018 75);
    --rule-soft:    oklch(32% 0.014 75);

    --card-elev:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.10),
        0 1px 2px oklch(0% 0 0 / 0.45),
        0 4px 10px -2px oklch(0% 0 0 / 0.50),
        0 18px 36px -16px oklch(0% 0 0 / 0.62),
        0 34px 80px -28px oklch(0% 0 0 / 0.72);
    /* Premium card elevation: same shape, deeper farthest layer.
       Use on hero pieces (large photos, comparison table, ESP32 band). */
    --card-elev-hi:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.12),
        0 2px 4px oklch(0% 0 0 / 0.55),
        0 8px 18px -4px oklch(0% 0 0 / 0.55),
        0 24px 48px -18px oklch(0% 0 0 / 0.70),
        0 50px 110px -40px oklch(0% 0 0 / 0.85);
    --text:         oklch(99% 0.003 80);
    --text-mid:     oklch(93% 0.010 75);
    --text-dim:     oklch(82% 0.014 75);
    --text-faint:   oklch(72% 0.014 75);
    --amber:        oklch(84% 0.18 75);
    --amber-mid:    oklch(76% 0.16 70);
    --amber-deep:   oklch(68% 0.19 55);
    --teal:         oklch(86% 0.13 200);
    --teal-mid:     oklch(78% 0.12 200);
    --teal-deep:    oklch(62% 0.11 205);

    --paper:        oklch(99% 0.003 80);
    --paper-2:      oklch(96% 0.006 75);
    --paper-3:      oklch(91% 0.008 75);
    --ink:          oklch(13% 0.012 60);
    --ink-mid:      oklch(38% 0.014 60);
    --ink-dim:      oklch(58% 0.014 60);
    --ink-rule:     oklch(85% 0.010 70);

    --sans:  "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono:  "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;

    --easeq: cubic-bezier(0.16, 1, 0.3, 1);

    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv11";
    overflow-x: hidden;
}

.sh::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 80% 0%, color-mix(in oklch, var(--amber) 8%, transparent) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 0% 100%, color-mix(in oklch, var(--teal) 6%, transparent) 0%, transparent 65%);
    z-index: 0;
    pointer-events: none;
}

:where(.sh) a { color: inherit; text-decoration: none; }
.sh code, .sh pre { font-family: var(--mono); }
.sh em { font-style: normal; }

/* ============================================================
   NAV
   ============================================================ */
.sh-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    height: 64px;
    padding: 0 1.6rem;
    background: transparent;
    border-bottom: 1.5px solid transparent;
    transition:
        background 260ms ease,
        border-color 260ms ease,
        backdrop-filter 260ms ease,
        -webkit-backdrop-filter 260ms ease;
}
.sh-nav.is-scrolled {
    background: color-mix(in oklch, var(--bg) 94%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--rule);
}

/* Collapse the nav CTA to zero footprint while the bar is transparent
   over the hero video — Log in (or the last visible link) sits flush
   against the right edge, no empty slot. When the nav goes solid, the
   button slides in from the right and pushes the other links left as
   it expands. Scoped to the inline menu only so the mobile side-panel
   button (under `.sh-nav-menu` displayed as a slide-in) is never
   collapsed by this rule. */
.sh-nav-menu-inline > .sh-btn {
    max-width: 0;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    margin-left: -1.2rem;   /* cancel the flex gap before the button */
    border-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(18px);
    pointer-events: none;
    transition:
        max-width 380ms cubic-bezier(0.22, 1, 0.36, 1),
        padding 380ms cubic-bezier(0.22, 1, 0.36, 1),
        margin 380ms cubic-bezier(0.22, 1, 0.36, 1),
        border-width 380ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 240ms ease 60ms,
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sh-nav.is-scrolled .sh-nav-menu-inline > .sh-btn {
    max-width: 14rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: 0;
    border-width: 1px;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
/* Reserve the nav's height as scroll-anchor padding so #anchors don't
   land underneath the fixed bar. */
html { scroll-padding-top: 64px; }

.sh-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: -0.005em;
    color: var(--text);
    line-height: 1;
}
.sh-mark-logo {
    /* Sized to the cap-height of the wordmark so it sits balanced
       next to it. Stays well within the 64-px nav. The new logo PNG
       has almost no internal padding, so this height is smaller than
       the old one to keep the visible mark balanced with the text. */
    height: 22px;
    width: auto;
    display: block;
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}
.sh-mark > .sh-mark-bk,
.sh-mark > .sh-mark-w {
    /* Center-align with the logo (was baseline, which dropped the
       text below the logo's optical center). */
    align-self: center;
    line-height: 1;
}
.sh-mark-bk {
    color: var(--teal-mid);
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.92rem;
}
.sh-mark-w { color: var(--text); }

.sh-mark-tag {
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text);
    padding: 0.24rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--bg-1);
}

.sh-nav-spacer { flex: 1; }

/* Desktop inline navigation (lives inside <nav>). */
.sh-nav-menu-inline {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Mobile side panel (lives outside <nav>, hidden on desktop). */
.sh-nav-menu-mobile {
    display: none;
}

.sh-nav-link {
    font-family: var(--mono);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text);
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    transition: color 140ms ease, background 140ms ease;
}
.sh-nav-link:hover { color: var(--amber); background: var(--bg-1); }

/* Hamburger: hidden on desktop, revealed below 720px */
.sh-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.sh-nav-toggle-bar {
    display: block;
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 280ms var(--easeq), opacity 200ms ease, top 280ms var(--easeq);
}
.sh-nav-toggle-bar:nth-child(1) { top: 14px; }
.sh-nav-toggle-bar:nth-child(2) { top: 19px; }
.sh-nav-toggle-bar:nth-child(3) { top: 24px; }
.sh-nav-toggle.is-open .sh-nav-toggle-bar:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}
.sh-nav-toggle.is-open .sh-nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.sh-nav-toggle.is-open .sh-nav-toggle-bar:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}

.sh-nav-backdrop {
    position: fixed;
    inset: 0;
    /* Softer veil: lets the page show through, still readable. */
    background: color-mix(in oklch, oklch(2% 0.003 75) 32%, transparent);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 199;
    animation: sh-nav-backdrop-in 220ms ease forwards;
}
@keyframes sh-nav-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sh-no-scroll { overflow: hidden; }

@media (max-width: 720px) {
    .sh-nav-toggle { display: block; }
    .sh-nav-menu-inline { display: none; }

    /* Slide-in side panel on the right — translucent so the page
       shows through, frosted-glass against the body content. */
    .sh-nav-menu-mobile {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        height: 100svh;
        width: min(80vw, 320px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.4rem;
        padding: 4.4rem 1.4rem 2rem;
        background: color-mix(in oklch, var(--bg) 72%, transparent);
        backdrop-filter: saturate(170%) blur(22px);
        -webkit-backdrop-filter: saturate(170%) blur(22px);
        border-left: 1px solid color-mix(in oklch, var(--rule) 80%, transparent);
        z-index: 201;
        transform: translateX(100%);
        transition: transform 320ms var(--easeq);
        box-shadow: -24px 0 48px -12px oklch(0% 0 0 / 0.45);
    }
    .sh-nav-menu-mobile.is-open { transform: translateX(0); }

    .sh-nav-menu-mobile .sh-nav-link {
        font-size: 1.05rem;
        padding: 0.85rem 0.9rem;
        border-radius: 8px;
    }
    .sh-nav-menu-mobile .sh-btn {
        max-width: none;
        margin: 0.6rem 0 0;
        padding: 0.9rem 1.1rem;
        border-width: 1px;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        justify-content: center;
        font-size: 0.78rem;
        letter-spacing: 0.06em;
    }
}

/* Close button sits in the top-right corner of the side panel. */
.sh-nav-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 36px;
    height: 36px;
    border: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
    background: color-mix(in oklch, var(--bg-1) 60%, transparent);
    color: var(--text);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms var(--easeq);
}
.sh-nav-close:hover {
    background: var(--bg-1);
    color: var(--amber);
}
.sh-nav-close:active {
    transform: scale(0.94);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.sh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 180ms var(--easeq), background 160ms ease,
                color 160ms ease, border-color 160ms ease, box-shadow 200ms var(--easeq);
}

.sh-btn-amber {
    background: var(--amber);
    color: oklch(20% 0.06 60);
    border-color: var(--amber);
    box-shadow: 0 0 0 0 color-mix(in oklch, var(--amber) 0%, transparent);
}
.sh-btn-amber:hover {
    background: color-mix(in oklch, var(--amber) 92%, white);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px -8px color-mix(in oklch, var(--amber) 60%, transparent);
}

.sh-btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--rule);
}
.sh-btn-ghost:hover { background: var(--bg-1); border-color: var(--text-faint); }

.sh-btn-lg { padding: 0.72rem 1.2rem; font-size: 0.76rem; }
.sh-arrow { display: inline-block; transition: transform 220ms var(--easeq); }
.sh-btn:hover .sh-arrow { transform: translateX(3px); }

.sh-cta-short { display: none; }
.sh-cta-long  { display: inline; }

/* ============================================================
   HERO
   ============================================================ */
.sh-hero {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4.5rem 1.6rem 5rem;
    z-index: 1;
}

.sh-banner {
    margin-bottom: 1.6rem;
    padding: 0.6rem 0.9rem;
    background: color-mix(in oklch, oklch(50% 0.18 30) 18%, var(--bg-1));
    border: 1px solid oklch(50% 0.18 30);
    color: oklch(85% 0.10 30);
    font-family: var(--mono);
    font-size: 0.78rem;
    border-radius: 6px;
}

.sh-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.sh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding: 0.32rem 0.7rem 0.32rem 0.5rem;
    background: var(--bg-1);
    border: 1px solid var(--rule);
    border-radius: 999px;
    margin-bottom: 1.8rem;
}
.sh-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 8px var(--teal);
    animation: sh-dot-pulse 2.2s var(--easeq) infinite;
}
@keyframes sh-dot-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50%      { opacity: 1;   transform: scale(1); }
}
.sh-dot-teal { background: var(--teal); box-shadow: 0 0 8px var(--teal); }

.sh-h1 {
    font-size: clamp(3.2rem, 7.6vw, 6.8rem);
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: -0.045em;
    margin-bottom: 1.8rem;
    color: var(--text);
}
.sh-h1-amber {
    color: var(--amber);
    font-weight: 900;
    letter-spacing: -0.052em;
    font-style: italic;
}

.sh-sub {
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--text-mid);
    max-width: 32rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.sh-cta-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
}

.sh-inline-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    padding-top: 1rem;
    border-top: 1px dashed var(--rule);
}
.sh-inline-stats b {
    color: var(--text);
    font-weight: 600;
    margin-right: 0.25rem;
}
.sh-istats-sep {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--text-faint);
}


/* ============================================================
   HERO DEMO — Unified scene: lamp (top) + hand (bottom)
   Single camera view containing the whole demonstration.
   ============================================================ */
.sh-hero-demo {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
}

.sh-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-width: 520px;
    margin: 0 auto;
    background:
        radial-gradient(ellipse 70% 90% at 50% 50%,
            oklch(19% 0.014 75) 0%,
            oklch(13% 0.011 75) 75%,
            var(--bg-deep) 100%);
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px color-mix(in oklch, var(--teal) 10%, transparent),
        0 28px 80px -28px color-mix(in oklch, var(--bg-deep) 90%, transparent),
        inset 0 0 80px color-mix(in oklch, var(--bg-deep) 60%, transparent);
    animation: sh-scene-frame 7s var(--easeq) infinite;
}

@keyframes sh-scene-frame {
    0%, 32%, 80%, 100% {
        border-color: var(--rule);
        box-shadow:
            0 0 0 1px color-mix(in oklch, var(--teal) 10%, transparent),
            0 28px 80px -28px color-mix(in oklch, var(--bg-deep) 90%, transparent),
            inset 0 0 80px color-mix(in oklch, var(--bg-deep) 60%, transparent);
    }
    38%, 70% {
        border-color: var(--amber);
        box-shadow:
            0 0 0 1px color-mix(in oklch, var(--amber) 55%, transparent),
            0 32px 100px -20px color-mix(in oklch, var(--amber) 40%, transparent),
            inset 0 0 100px color-mix(in oklch, var(--amber) 14%, transparent);
    }
}

/* Viewfinder bracket corners */
.sh-vp-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--teal);
    z-index: 3;
}
.vp-tl { top: 12px; left: 12px;       border-right: none; border-bottom: none; }
.vp-tr { top: 12px; right: 12px;      border-left: none;  border-bottom: none; }
.vp-bl { bottom: 12px; left: 12px;    border-right: none; border-top: none; }
.vp-br { bottom: 12px; right: 12px;   border-left: none;  border-top: none; }

/* Minimal telemetry: LIVE indicator + LOCAL label */
.sh-scene-tel {
    position: absolute;
    top: 17px;
    z-index: 4;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--teal);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    pointer-events: none;
}
.sh-scene-tel.tel-tl { left: 44px; }
.sh-scene-tel.tel-tr { right: 44px; }

.sh-scene-led {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: oklch(70% 0.18 25);
    box-shadow: 0 0 8px oklch(70% 0.18 25);
    animation: sh-scene-led 1.6s ease-in-out infinite;
}
@keyframes sh-scene-led {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 1; }
}

/* Background grid layer */
.sh-scene-grid {
    position: absolute;
    inset: 30px;
    background-image:
        linear-gradient(to right, color-mix(in oklch, var(--teal) 9%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in oklch, var(--teal) 9%, transparent) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 30%, transparent 82%);
    -webkit-mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 30%, transparent 82%);
    opacity: 0.55;
    z-index: 1;
    pointer-events: none;
}

/* Scan line — slow continuous downward sweep */
.sh-scene-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        transparent 0%,
        transparent 49%,
        color-mix(in oklch, var(--teal) 30%, transparent) 50%,
        transparent 51%,
        transparent 100%);
    background-size: 100% 10px;
    opacity: 0.12;
    animation: sh-scene-scan 5s linear infinite;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: screen;
}
@keyframes sh-scene-scan {
    0%   { background-position: 0 0; }
    100% { background-position: 0 -200px; }
}

/* Big amber ambient — fills the whole scene when light is on */
.sh-scene-ambient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 22%,
        color-mix(in oklch, var(--amber) 45%, transparent) 0%,
        color-mix(in oklch, var(--amber) 22%, transparent) 32%,
        color-mix(in oklch, var(--amber) 6%, transparent) 60%,
        transparent 85%);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: sh-scene-ambient 7s var(--easeq) infinite;
}
@keyframes sh-scene-ambient {
    0%, 33%, 80%, 100% { opacity: 0; }
    42%, 72%           { opacity: 1; }
}

/* ============================================================
   LAMP — top of the scene
   ============================================================ */
.sh-scene-lamp {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.sh-lamp-wire {
    width: 2px;
    height: 56px;
    background: linear-gradient(to bottom, var(--text-faint), var(--text-dim));
    border-radius: 2px;
}

.sh-lamp-fixture {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
.sh-lamp-cap {
    width: 42px;
    height: 22px;
    background: linear-gradient(to bottom, oklch(64% 0.014 75), oklch(34% 0.012 75));
    border: 1px solid oklch(50% 0.014 75);
    border-bottom: none;
    border-radius: 8px 8px 4px 4px;
    box-shadow: inset 0 1px 0 oklch(78% 0.014 75);
    z-index: 2;
}
.sh-lamp-disc {
    position: relative;
    width: 110px;
    height: 142px;
    margin-top: -3px;
    background: radial-gradient(circle at 40% 32%,
        oklch(78% 0.012 75) 0%,
        oklch(48% 0.012 75) 50%,
        oklch(30% 0.011 75) 100%);
    border: 2px solid oklch(64% 0.014 75);
    border-radius: 50% 50% 44% 44% / 62% 62% 38% 38%;
    overflow: hidden;
    z-index: 1;
    animation: sh-lamp-disc 7s var(--easeq) infinite;
}
@keyframes sh-lamp-disc {
    0%, 33%, 80%, 100% {
        background: radial-gradient(circle at 40% 32%,
            oklch(78% 0.012 75) 0%,
            oklch(48% 0.012 75) 50%,
            oklch(30% 0.011 75) 100%);
        border-color: oklch(64% 0.014 75);
        box-shadow: none;
    }
    42%, 72% {
        background: radial-gradient(circle at 40% 30%,
            oklch(99% 0.05 80) 0%,
            oklch(94% 0.17 78) 32%,
            var(--amber) 72%);
        border-color: oklch(96% 0.06 78);
        box-shadow:
            0 0 70px oklch(85% 0.18 75 / 1),
            0 0 28px oklch(99% 0.06 78 / 0.95),
            inset 0 0 26px oklch(99% 0.06 78 / 0.8);
    }
}

.sh-lamp-filament {
    position: absolute;
    top: 36%;
    left: 50%;
    width: 36px;
    height: 46px;
    transform: translate(-50%, -50%);
    border: 1.5px solid transparent;
    border-top: none;
    border-radius: 40% 40% 60% 60%;
    animation: sh-lamp-filament 7s var(--easeq) infinite;
}
@keyframes sh-lamp-filament {
    0%, 33%, 80%, 100% { border-color: transparent; box-shadow: none; }
    42%, 72%           { border-color: oklch(99% 0.05 78); box-shadow: 0 0 18px oklch(99% 0.06 78); }
}

/* Light rays radiating from the lamp */
.sh-lamp-rays {
    position: absolute;
    top: 100px;
    left: 50%;
    width: 4px;
    height: 4px;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    animation: sh-lamp-rays 7s var(--easeq) infinite;
    z-index: 3;
}
.sh-lamp-rays span {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 180px;
    background: linear-gradient(to bottom,
        oklch(99% 0.06 78 / 0.9) 0%,
        oklch(88% 0.18 75 / 0.55) 35%,
        transparent 100%);
    transform-origin: top center;
    border-radius: 2px;
    filter: blur(0.6px);
}
.sh-lamp-rays span:nth-child(1) { transform: translateX(-50%) rotate(-60deg); }
.sh-lamp-rays span:nth-child(2) { transform: translateX(-50%) rotate(-40deg); }
.sh-lamp-rays span:nth-child(3) { transform: translateX(-50%) rotate(-20deg); }
.sh-lamp-rays span:nth-child(4) { transform: translateX(-50%) rotate(0deg);   height: 230px; width: 4px; }
.sh-lamp-rays span:nth-child(5) { transform: translateX(-50%) rotate(20deg); }
.sh-lamp-rays span:nth-child(6) { transform: translateX(-50%) rotate(40deg); }
.sh-lamp-rays span:nth-child(7) { transform: translateX(-50%) rotate(60deg); }
@keyframes sh-lamp-rays {
    0%, 36%, 78%, 100% { opacity: 0; }
    44%, 56%           { opacity: 1; }
    66%, 74%           { opacity: 0.6; }
}

/* Bloom around the lamp */
.sh-lamp-bloom {
    position: absolute;
    top: 30px;
    left: 50%;
    width: 420px;
    height: 420px;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(circle at center,
        oklch(99% 0.04 78 / 0.8) 0%,
        oklch(88% 0.18 75 / 0.5) 18%,
        oklch(78% 0.17 75 / 0.25) 38%,
        transparent 72%);
    filter: blur(4px);
    z-index: 0;
    animation: sh-lamp-bloom 7s var(--easeq) infinite;
    mix-blend-mode: screen;
}
@keyframes sh-lamp-bloom {
    0%, 36%, 78%, 100% { opacity: 0; }
    44%, 70%           { opacity: 1; }
}

/* ============================================================
   BEAM — visible energy travelling hand → lamp on fire
   ============================================================ */
.sh-scene-beam {
    position: absolute;
    top: 22%;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    animation: sh-beam-show 7s var(--easeq) infinite;
}
@keyframes sh-beam-show {
    0%, 33%, 60%, 100% { opacity: 0; }
    36%, 44%           { opacity: 1; }
    50%                { opacity: 0.5; }
}

.sh-beam-shaft {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        oklch(95% 0.06 78 / 0) 0%,
        oklch(95% 0.18 75 / 0.55) 30%,
        oklch(99% 0.06 78 / 0.85) 100%);
    border-radius: 6px;
    filter: blur(2px);
    box-shadow:
        0 0 24px oklch(85% 0.18 75 / 0.7),
        0 0 60px oklch(85% 0.18 75 / 0.4);
    transform-origin: bottom center;
    transform: scaleY(0);
    animation: sh-beam-shaft 7s var(--easeq) infinite;
}
@keyframes sh-beam-shaft {
    0%, 33%, 100% { transform: scaleY(0); }
    38%           { transform: scaleY(1); }
    52%, 60%      { transform: scaleY(1); }
    66%           { transform: scaleY(0); }
}

.sh-beam-head {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, oklch(99% 0.04 78) 0%, oklch(90% 0.18 75) 60%, transparent 100%);
    box-shadow:
        0 0 30px oklch(85% 0.18 75),
        0 0 60px oklch(85% 0.18 75 / 0.5);
    opacity: 0;
    animation: sh-beam-head 7s var(--easeq) infinite;
}
@keyframes sh-beam-head {
    0%, 33%, 100% { opacity: 0; bottom: 0%; }
    35%           { opacity: 1; bottom: 0%; }
    44%           { opacity: 1; bottom: 100%; }
    50%           { opacity: 0; bottom: 100%; }
}

/* ============================================================
   HAND — bottom of the scene
   ============================================================ */
.sh-scene-hand {
    position: absolute;
    bottom: 4%;
    left: 50%;
    width: 44%;
    max-width: 230px;
    transform: translateX(-50%) translateY(40%);
    opacity: 0;
    z-index: 6;
    animation: sh-scene-hand 7s var(--easeq) infinite;
}
.sh-scene-hand-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 30px color-mix(in oklch, var(--bg-deep) 80%, transparent));
}
@keyframes sh-scene-hand {
    0%, 8%   { opacity: 0; transform: translateX(-50%) translateY(50%) scale(0.94); }
    18%, 30% { opacity: 1; transform: translateX(-50%) translateY(0%)  scale(1); }
    38%, 78% { opacity: 1; transform: translateX(-50%) translateY(0%)  scale(1.02); filter: drop-shadow(0 0 22px oklch(85% 0.16 75 / 0.5)); }
    88%,100% { opacity: 0; transform: translateX(-50%) translateY(50%) scale(0.94); }
}

/* Bounding box around the hand */
.sh-scene-bbox {
    position: absolute;
    inset: 4% 6% 2% 6%;
    pointer-events: none;
}
.bbox-c {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2.5px solid var(--teal);
    opacity: 0;
    box-shadow: 0 0 10px color-mix(in oklch, var(--teal) 50%, transparent);
    animation: sh-scene-bbox 7s var(--easeq) infinite;
}
.bbox-tl { top: 0; left: 0;       border-right: none; border-bottom: none; }
.bbox-tr { top: 0; right: 0;      border-left: none;  border-bottom: none; }
.bbox-bl { bottom: 0; left: 0;    border-right: none; border-top: none; }
.bbox-br { bottom: 0; right: 0;   border-left: none;  border-top: none; }
@keyframes sh-scene-bbox {
    0%, 18%   { opacity: 0; transform: scale(1.35); }
    24%, 32%  { opacity: 1; transform: scale(1.1);  border-color: var(--teal); }
    38%, 78%  { opacity: 1; transform: scale(1);    border-color: var(--amber); box-shadow: 0 0 16px color-mix(in oklch, var(--amber) 70%, transparent); }
    86%,100%  { opacity: 0; transform: scale(1.35); }
}

/* Event log strip below the scene */
.sh-scene-log {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-1);
    border: 1.5px solid var(--rule);
    border-radius: 8px;
    box-shadow: var(--card-elev);
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
}
.sh-scene-log .lg-ts { color: var(--text-dim); }
.sh-scene-log .lg-ev { color: var(--teal); }
.sh-scene-log .lg-ar { color: var(--text-faint); }
.sh-scene-log .lg-en { color: var(--text); }
.sh-scene-log .lg-st {
    margin-left: auto;
    color: var(--amber);
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.sh-vocab,
.sh-cv,
.sh-hw,
.sh-install,
.sh-pricing {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 5.5rem 1.6rem;
    z-index: 1;
}

.sh-section-head {
    max-width: 56rem;
    margin-bottom: 2.6rem;
}

.sh-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 1.1rem;
}
.sh-k-num {
    padding: 0.22rem 0.55rem;
    background: var(--bg-1);
    border: 1px solid var(--rule);
    border-radius: 4px;
    color: var(--teal);
    font-weight: 700;
}

.sh-h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--text);
}
.sh-h2-amber { color: var(--amber); }

.sh-dek {
    margin-top: 0.9rem;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-mid);
    max-width: 40rem;
}

/* ============================================================
   VOCABULARY — two gesture cards (palm + L)
   ============================================================ */
.sh-vocab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: stretch;
}

.sh-gcard {
    display: flex;
    flex-direction: column;
    background: var(--bg-1);
    border: 1.5px solid var(--rule);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--card-elev);
    transition: transform 280ms var(--easeq), border-color 200ms ease, box-shadow 280ms var(--easeq);
}
.sh-gcard:hover {
    transform: translateY(-5px);
    border-color: color-mix(in oklch, var(--amber) 55%, var(--rule));
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.12),
        0 2px 4px oklch(0% 0 0 / 0.45),
        0 12px 26px -8px oklch(0% 0 0 / 0.55),
        0 32px 60px -20px oklch(0% 0 0 / 0.65),
        0 0 60px -10px color-mix(in oklch, var(--amber) 38%, transparent);
}
.sh-gcard:hover .sh-gcard-frame img { transform: scale(1.04); }
.sh-gcard-frame img { transition: transform 480ms cubic-bezier(0.16, 1, 0.3, 1); }

.sh-gcard-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(ellipse 60% 70% at 50% 55%,
            oklch(20% 0.013 75) 0%,
            var(--bg-2) 80%);
    border-bottom: 1.5px solid var(--rule);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.sh-gcard-frame img {
    width: 36%;
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 10px 18px color-mix(in oklch, var(--bg-deep) 80%, transparent));
}
.gf-bk {
    position: absolute;
    width: 16px; height: 16px;
    border: 2px solid var(--teal);
}
.sh-gcard:hover .gf-bk { border-color: var(--amber); }
.sh-gcard-class {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--teal);
    text-transform: uppercase;
    background: color-mix(in oklch, var(--bg-deep) 80%, transparent);
    padding: 0.26rem 0.6rem;
    border: 1px solid color-mix(in oklch, var(--teal) 30%, var(--rule-soft));
    border-radius: 4px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Action rows inside each card (tap / hold / cycle) */
.sh-gcard-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.4rem 0;
    flex: 1;
}
.sh-gact {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 1.2rem;
    align-items: start;
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid var(--rule-soft);
}
.sh-gact:last-child { border-bottom: none; }
.sh-gact-mode {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber);
    padding-top: 0.15rem;
}
.sh-gact-name {
    font-family: var(--mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.005em;
    margin-bottom: 0.4rem;
}
.sh-gact-body p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-mid);
}
.sh-gact-ex {
    display: block;
    margin-top: 0.35rem;
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text-dim, rgba(255, 255, 255, 0.55));
}

/* ============================================================
   SCENARIOS — photos do the talking, dark surface
   ============================================================ */
.sh-scen {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 5.5rem 1.6rem 6rem;
    z-index: 1;
}
.sh-scen-inner { width: 100%; }

/* Section head: stacked title + lead, same family, scaled
   hierarchy so they read as a pair, not as title-vs-caption. */
.sh-scen-head {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 1.6vw, 1.4rem);
    margin-bottom: clamp(2.4rem, 4vw, 3.4rem);
    max-width: 62rem;
}
.sh-scen-h2 {
    font-family: var(--sans);
    font-size: clamp(2.4rem, 5.6vw, 4.4rem);
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 0.98;
    color: var(--text);
    margin: 0;
}
.sh-scen-h2-amber {
    color: var(--amber);
    font-weight: 800;
}
.sh-scen-dek {
    font-family: var(--sans);
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    font-weight: 400;
    line-height: 1.55;
    color: var(--text-mid);
    max-width: 58ch;
    margin: 0;
}

/* Hero photo: editorial widescreen */
.sh-scen-stage {
    margin-bottom: 1.4rem;
    position: relative;
}
/* Warm bloom that sits behind the hero photo, peeking outside its bounds.
   Gives the picture a "lit from below" feel without touching the image. */
.sh-scen-stage::before {
    content: "";
    position: absolute;
    inset: 8% -4% -14% -4%;
    background: radial-gradient(60% 70% at 50% 100%,
        color-mix(in oklch, var(--amber) 14%, transparent) 0%,
        color-mix(in oklch, var(--amber) 6%, transparent) 35%,
        transparent 70%);
    filter: blur(28px);
    z-index: 0;
    pointer-events: none;
}
.sh-scen-stage > * { position: relative; z-index: 1; }
.sh-scen-hero {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 7;
    background: var(--bg);
    border: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
    box-shadow: var(--card-elev-hi);
    transition:
        border-color 220ms ease,
        transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sh-scen-hero img,
.sh-scen-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms cubic-bezier(0.16,1,0.3,1);
}
.sh-scen-hero:hover img,
.sh-scen-thumb:hover img { transform: scale(1.025); }
.sh-scen-hero:hover {
    transform: translateY(-4px);
    border-color: color-mix(in oklch, var(--amber) 35%, var(--rule));
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.07),
        0 30px 80px -32px oklch(0% 0 0 / 0.75),
        0 0 80px -16px color-mix(in oklch, var(--amber) 30%, transparent);
}

/* Hero photo: long, deep falloff calibrated for a 16/7 widescreen. */
.sh-scen-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px color-mix(in oklch, var(--text) 5%, transparent),
        inset 0 0 180px 50px oklch(7% 0.005 75 / 0.78),
        inset 0 0 80px 18px oklch(7% 0.005 75 / 0.55),
        inset 0 0 28px  6px oklch(7% 0.005 75 / 0.40);
}
/* Thumbs: subjects fill more of the frame, so the falloff has to be much
   smaller or the picture goes black. Short reach, low strength. */
.sh-scen-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px color-mix(in oklch, var(--text) 5%, transparent),
        inset 0 0 60px 10px oklch(7% 0.005 75 / 0.45),
        inset 0 0 22px  3px oklch(7% 0.005 75 / 0.30);
}

/* Caption sits BELOW the photo, never on top */
.sh-scen-hero figcaption,
.sh-scen-thumb figcaption {
    position: absolute;
    left: 22px;
    bottom: 18px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    letter-spacing: -0.015em;
    color: var(--text);
    text-shadow: 0 1px 24px oklch(8% 0.005 75 / 0.6);
    line-height: 1;
    z-index: 2;
}

/* Three thumbnails in a row, identical weight */
.sh-scen-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    position: relative;
}
/* Soft warm wash behind the trio, gives the row depth without
   touching individual photos. */
.sh-scen-thumbs::before {
    content: "";
    position: absolute;
    inset: -5% -2% -10% -2%;
    background: radial-gradient(70% 110% at 50% 50%,
        color-mix(in oklch, var(--amber) 7%, transparent) 0%,
        transparent 65%);
    filter: blur(34px);
    z-index: 0;
    pointer-events: none;
}
.sh-scen-thumbs > * { position: relative; z-index: 1; }
.sh-scen-thumb {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 11;
    background: var(--bg);
    border: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.06),
        0 1px 2px oklch(0% 0 0 / 0.40),
        0 6px 14px -4px oklch(0% 0 0 / 0.55),
        0 18px 38px -14px oklch(0% 0 0 / 0.65),
        0 36px 70px -24px oklch(0% 0 0 / 0.55);
    transition:
        border-color 220ms ease,
        transform 360ms cubic-bezier(0.16,1,0.3,1),
        box-shadow 320ms cubic-bezier(0.16,1,0.3,1);
}
.sh-scen-thumb:hover {
    transform: translateY(-3px);
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.10),
        0 1px 2px oklch(0% 0 0 / 0.45),
        0 8px 18px -4px oklch(0% 0 0 / 0.60),
        0 24px 48px -16px oklch(0% 0 0 / 0.70),
        0 46px 90px -28px oklch(0% 0 0 / 0.65),
        0 0 60px -12px color-mix(in oklch, var(--amber) 35%, transparent);
}
.sh-scen-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms cubic-bezier(0.16,1,0.3,1);
}
.sh-scen-thumb:hover { border-color: var(--rule); }
.sh-scen-thumb:hover img { transform: scale(1.03); }

.sh-scen-thumb figcaption {
    left: 16px;
    bottom: 14px;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 1px 16px oklch(8% 0.005 75 / 0.55);
}

/* The night photo is already dark, the others have white backgrounds; the
   inset shadow above gives them all a consistent dark edge so they feel like
   they belong to the same dark page. */

@media (max-width: 900px) {
    .sh-scen { padding: 4rem 1.2rem; }
    .sh-scen-hero { aspect-ratio: 4 / 3; }
    .sh-scen-thumbs { grid-template-columns: 1fr; }
    .sh-scen-thumb { aspect-ratio: 16 / 10; }
}

/* ============================================================
   COMPUTER VISION
   ============================================================ */
.sh-cv-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: start;
}

.sh-cv-text .sh-dek + .sh-dek { margin-top: 0.8rem; }

.sh-cv-tags {
    list-style: none;
    margin: 1.6rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.sh-cv-tags li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    background: var(--bg-1);
    border: 1.5px solid var(--rule);
    border-radius: 8px;
    box-shadow: var(--card-elev);
}
.tg-k {
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.tg-v {
    font-family: var(--mono);
    font-size: 0.86rem;
    color: var(--text);
}

/* ============================================================
   COMPUTER-VISION COMPARISON TABLE
   Modern, borderless cells. Label left, two values center-aligned.
   "Ours" column glows amber, "Other" column is muted.
   ============================================================ */
.sh-cv-compare {
    background: linear-gradient(180deg,
        color-mix(in oklch, var(--bg-1) 70%, transparent) 0%,
        color-mix(in oklch, var(--bg-1) 40%, transparent) 100%);
    border: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--card-elev);
}
/* Amber wash behind the "ours" column only, no internal vertical borders */
.sh-cv-compare::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(28% + 0px);
    width: calc(36%);
    background:
        linear-gradient(180deg,
            color-mix(in oklch, var(--amber) 9%, transparent) 0%,
            color-mix(in oklch, var(--amber) 5%, transparent) 100%);
    pointer-events: none;
    z-index: 0;
}

.sh-ccm-head,
.sh-ccm-row {
    display: grid;
    grid-template-columns: 28% 36% 36%;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

/* Header */
.sh-ccm-head {
    border-bottom: 1px solid color-mix(in oklch, var(--rule) 70%, transparent);
    background: color-mix(in oklch, var(--bg-2) 75%, transparent);
}
.sh-ccm-head > div {
    padding: 1.4rem 1.4rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.sh-ccm-h-feat {
    align-items: flex-start !important;
    text-align: left !important;
}
.sh-ccm-h-feat span {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.sh-ccm-h-name {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1;
}
.sh-ccm-h-ours .sh-ccm-h-name { color: var(--amber); }
.sh-ccm-h-them .sh-ccm-h-name { color: var(--text-dim); }
.sh-ccm-h-sub {
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    line-height: 1.3;
}
.sh-ccm-h-them .sh-ccm-h-sub { color: var(--text-faint); }

/* Rows: hairline horizontal separators, no vertical lines */
.sh-ccm-row {
    border-bottom: 1px solid color-mix(in oklch, var(--rule) 45%, transparent);
    transition: background 180ms ease;
}
.sh-ccm-row:last-child { border-bottom: none; }
.sh-ccm-row > div {
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.sh-ccm-row-wide > div { padding: 1.35rem 1.4rem; }

.sh-ccm-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mid);
    justify-content: flex-start !important;
    text-align: left !important;
}

/* "Ours" cell — bright text, amber strong values, no border */
.sh-ccm-ours {
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.45;
    flex-direction: column;
    gap: 0.2rem;
}
.sh-ccm-ours strong {
    color: var(--amber);
    font-weight: 800;
    letter-spacing: -0.005em;
}
.sh-ccm-line { display: block; }

/* "Other" cell — muted */
.sh-ccm-them {
    color: var(--text-dim);
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0.82;
    transition: opacity 200ms ease, color 200ms ease;
}

/* Row hover: brighten ours cell, soften them cell. */
.sh-ccm-row { transition: background 220ms ease; }
.sh-ccm-row:hover {
    background: color-mix(in oklch, var(--amber) 4%, transparent);
}
.sh-ccm-ours { transition: color 200ms ease, background 220ms ease; }
.sh-ccm-row:hover .sh-ccm-ours {
    background: color-mix(in oklch, var(--amber) 12%, transparent);
}
.sh-ccm-row:hover .sh-ccm-them {
    opacity: 0.55;
    color: var(--text-faint);
}

@media (max-width: 760px) {
    .sh-cv-compare::before {
        left: 32%;
        width: 34%;
    }
    .sh-ccm-head,
    .sh-ccm-row {
        grid-template-columns: 32% 34% 34%;
    }
    .sh-ccm-head > div,
    .sh-ccm-row > div {
        padding: 0.95rem 0.85rem;
    }
    .sh-ccm-label { font-size: 0.7rem; }
    .sh-ccm-ours { font-size: 0.92rem; }
    .sh-ccm-them { font-size: 0.84rem; }
    .sh-ccm-h-name { font-size: 0.95rem; }
    .sh-ccm-h-sub { font-size: 0.6rem; }
    .sh-ccm-h-feat span { font-size: 0.62rem; }
}

/* ============================================================
   HARDWARE
   ============================================================ */

/* Section head: split layout (overline + h2 left, dek right). No kicker. */
.sh-hw-head {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: end;
    margin-bottom: 2.8rem;
}
.sh-hw-overline {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    display: block;
    margin-bottom: 0.7rem;
}
.sh-hw-h2 {
    font-family: var(--sans);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.028em;
    line-height: 1.02;
    color: var(--text);
    margin: 0;
}
.sh-hw-dek {
    font-size: 1rem;
    line-height: 1.62;
    color: var(--text-mid);
    max-width: 48ch;
    margin: 0;
}
@media (max-width: 800px) {
    .sh-hw-head {
        grid-template-columns: 1fr;
        gap: 1.4rem;
        align-items: start;
    }
}

/* Hardware feature grid — asymmetric: small + wide, then small + wide */
.sh-hw-feats {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 1.2rem;
    margin-bottom: 4.2rem;
}
@media (max-width: 800px) {
    .sh-hw-feats {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
}

.sh-hw-feat {
    background: var(--bg-1);
    border: 1.5px solid var(--rule);
    border-radius: 14px;
    padding: 1.4rem 1.4rem 1.5rem;
    box-shadow: var(--card-elev);
    transition:
        border-color 200ms ease,
        transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.sh-hw-feat:hover {
    border-color: color-mix(in oklch, var(--amber) 55%, var(--rule));
    transform: translateY(-5px);
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.12),
        0 2px 4px oklch(0% 0 0 / 0.45),
        0 12px 26px -8px oklch(0% 0 0 / 0.55),
        0 32px 60px -20px oklch(0% 0 0 / 0.65),
        0 0 60px -10px color-mix(in oklch, var(--amber) 35%, transparent);
}
.sh-hw-feat .sh-hw-ico { transition: background 240ms ease, color 240ms ease; }
.sh-hw-feat:hover .sh-hw-ico {
    background: color-mix(in oklch, var(--amber) 30%, var(--bg-2));
    color: oklch(20% 0.06 60);
}
.sh-hw-feat-privacy:hover { border-color: color-mix(in oklch, var(--teal) 45%, var(--rule)); }
.sh-hw-feat-privacy:hover {
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.12),
        0 2px 4px oklch(0% 0 0 / 0.45),
        0 12px 26px -8px oklch(0% 0 0 / 0.55),
        0 32px 60px -20px oklch(0% 0 0 / 0.65),
        0 0 60px -10px color-mix(in oklch, var(--teal) 30%, transparent);
}

/* Camera card: small with an RTSP example badge */
.sh-hw-feat-camera { display: flex; flex-direction: column; }
.sh-hw-feat-camera .sh-hw-feat-text { flex: 1; }
.sh-hw-feat-foot {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed color-mix(in oklch, var(--rule) 60%, transparent);
}
.sh-hw-feat-foot code {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--teal);
    letter-spacing: 0.01em;
}

/* Cluster card: wide, split body + diagram */
.sh-hw-feat-cluster {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.6rem;
    padding: 1.6rem 1.6rem 1.4rem;
    background:
        radial-gradient(120% 100% at 100% 50%,
            color-mix(in oklch, var(--amber) 6%, transparent) 0%, transparent 60%),
        var(--bg-1);
}
.sh-hw-feat-cluster-body { display: flex; flex-direction: column; }
.sh-hw-feat-cluster-graph {
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 320px;
}
.sh-hw-feat-cluster-graph svg { width: 100%; height: auto; display: block; }
@media (max-width: 800px) {
    .sh-hw-feat-cluster { grid-template-columns: 1fr; }
}

/* Integration: identical to camera, no foot */

/* Privacy: text-led, no icon. Single strong claim. */
.sh-hw-feat-privacy {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.8rem 1.8rem 1.6rem;
    background:
        linear-gradient(140deg,
            color-mix(in oklch, var(--teal) 5%, var(--bg-1)) 0%,
            var(--bg-1) 60%);
}
.sh-hw-priv-eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teal);
}
.sh-hw-priv-claim {
    font-family: var(--sans);
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    font-weight: 600;
    line-height: 1.32;
    color: var(--text);
    letter-spacing: -0.015em;
    margin: 0;
    max-width: 32ch;
}
.sh-hw-priv-hl {
    color: var(--teal);
    font-weight: 700;
}
.sh-hw-priv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.sh-hw-priv-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}
.sh-hw-priv-tick {
    color: var(--teal);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}
.sh-hw-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-2));
    color: var(--amber);
    margin-bottom: 0.7rem;
}
.sh-hw-ico svg { width: 18px; height: 18px; }
.sh-hw-feat-name {
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.005em;
    margin-bottom: 0.32rem;
}
.sh-hw-feat-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-mid);
}

/* ESP32 companion: full-width band with side-text on the left, screen on the right */
.sh-hw-display {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 3rem;
    align-items: center;
    padding: 2.4rem 2.4rem 2.2rem;
    background:
        radial-gradient(120% 100% at 100% 50%,
            color-mix(in oklch, var(--amber) 6%, transparent) 0%, transparent 55%),
        var(--bg-1);
    border: 1.5px solid var(--rule);
    border-radius: 18px;
    box-shadow: var(--card-elev);
    transition:
        border-color 220ms ease,
        background 320ms ease,
        box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sh-hw-display:hover {
    border-color: color-mix(in oklch, var(--amber) 45%, var(--rule));
    background:
        radial-gradient(120% 100% at 100% 50%,
            color-mix(in oklch, var(--amber) 12%, transparent) 0%, transparent 60%),
        var(--bg-1);
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.12),
        0 2px 4px oklch(0% 0 0 / 0.45),
        0 14px 30px -10px oklch(0% 0 0 / 0.6),
        0 36px 70px -22px oklch(0% 0 0 / 0.65),
        0 0 80px -16px color-mix(in oklch, var(--amber) 28%, transparent);
}

.sh-hw-disp-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
}
.sh-hw-disp-eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
}
.sh-hw-disp-title {
    font-family: var(--sans);
    font-size: clamp(1.5rem, 2.1vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.022em;
    line-height: 1.1;
    color: var(--text);
    margin: 0;
}
.sh-hw-disp-copy {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-mid);
    max-width: 42ch;
    margin: 0;
}

.sh-hw-disp-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    justify-self: center;
}

@media (max-width: 900px) {
    .sh-hw-display {
        grid-template-columns: 1fr;
        gap: 1.8rem;
        padding: 1.8rem 1.4rem 2rem;
    }
    .sh-hw-disp-side { align-items: center; text-align: center; }
}

.sh-hw-disp-tag {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.22rem 0.55rem;
    background: var(--bg-1);
    border: 1px solid var(--rule);
    border-radius: 4px;
}

.sh-hw-disp-frame {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 16 / 12;
    background: linear-gradient(160deg, oklch(30% 0.008 75), oklch(18% 0.008 75));
    border: 1px solid oklch(36% 0.012 75);
    border-radius: 16px;
    padding: 14px;
    box-shadow:
        inset 0 1px 0 color-mix(in oklch, var(--text) 8%, transparent),
        inset 0 -1px 0 oklch(0% 0 0 / 0.45),
        0 2px 4px oklch(0% 0 0 / 0.5),
        0 14px 28px -10px oklch(0% 0 0 / 0.65),
        0 38px 80px -28px oklch(0% 0 0 / 0.80);
    position: relative;
}
.sh-hw-disp-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: oklch(6% 0.006 75);
    border-radius: 6px;
    border: 1px solid oklch(4% 0.004 75);
    overflow: hidden;
}

/* Two display states crossfade on a slow 8s cycle */
.sh-disp-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}
.sh-disp-detect { animation: sh-disp-detect 8s ease-in-out infinite; }
.sh-disp-select { animation: sh-disp-select 8s ease-in-out infinite; }

@keyframes sh-disp-detect {
    0%, 6%   { opacity: 0; }
    12%, 40% { opacity: 1; }
    46%      { opacity: 0; }
    100%     { opacity: 0; }
}
@keyframes sh-disp-select {
    0%, 50%  { opacity: 0; }
    56%, 92% { opacity: 1; }
    98%,100% { opacity: 0; }
}

/* State A: minimal red dot */
.sh-disp-red {
    width: 22%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: radial-gradient(circle,
        oklch(78% 0.18 28) 0%,
        oklch(58% 0.20 28) 70%,
        oklch(38% 0.16 28) 100%);
    box-shadow:
        0 0 28px oklch(60% 0.20 28 / 0.7),
        0 0 60px oklch(60% 0.20 28 / 0.35),
        inset 0 0 18px oklch(99% 0.04 28 / 0.4);
    animation: sh-disp-red-breath 1.6s ease-in-out infinite;
}
@keyframes sh-disp-red-breath {
    0%, 100% { transform: scale(0.92); opacity: 0.85; }
    50%      { transform: scale(1);    opacity: 1; }
}

/* State B: white ring filling clockwise, with cycling number */
.sh-disp-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: auto;
    aspect-ratio: 1/1;
    transform: translate(-50%, -50%);
}
.sh-disp-ring circle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
}
.sh-disp-ring .r-track { stroke: oklch(20% 0.006 75); }
.sh-disp-ring .r-fill {
    stroke: oklch(99% 0.005 80);
    stroke-dasharray: 301.6;
    stroke-dashoffset: 301.6;
    transform: rotate(-90deg);
    transform-origin: 60px 60px;
    filter: drop-shadow(0 0 4px oklch(95% 0.012 80 / 0.7));
    animation: sh-disp-ring-fill 4.5s linear infinite;
}
@keyframes sh-disp-ring-fill {
    0%   { stroke-dashoffset: 301.6; }
    100% { stroke-dashoffset: 0; }
}

.sh-disp-num {
    position: relative;
    width: 80px;
    height: 60px;
    overflow: hidden;
    font-family: var(--mono);
    font-weight: 700;
    color: oklch(99% 0.005 80);
    font-size: 2rem;
    text-align: center;
    line-height: 60px;
}
.sh-disp-num > span {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.sh-disp-n1 { animation: sh-disp-n1 4.5s linear infinite; }
.sh-disp-n2 { animation: sh-disp-n2 4.5s linear infinite; }
.sh-disp-n3 { animation: sh-disp-n3 4.5s linear infinite; }
.sh-disp-n4 { animation: sh-disp-n4 4.5s linear infinite; }
@keyframes sh-disp-n1 { 0%, 23% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes sh-disp-n2 { 0%, 24% { opacity: 0; } 26%, 48% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes sh-disp-n3 { 0%, 49% { opacity: 0; } 51%, 73% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes sh-disp-n4 { 0%, 74% { opacity: 0; } 76%, 98% { opacity: 1; } 100% { opacity: 0; } }

/* Caption beneath the display */
.sh-disp-caption {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--text-dim);
    padding: 0.2rem 0;
}
.sh-disp-caption > span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.sh-disp-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
}
.sh-disp-dot-red {
    background: oklch(60% 0.20 28);
    box-shadow: 0 0 6px oklch(60% 0.20 28 / 0.7);
}
.sh-disp-dot-white {
    background: oklch(95% 0.005 80);
    box-shadow: 0 0 6px oklch(95% 0.012 80 / 0.5);
}

.sh-link-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--teal);
    border-bottom: 1px solid color-mix(in oklch, var(--teal) 40%, transparent);
    padding-bottom: 2px;
    transition: color 160ms ease, border-color 160ms ease;
}
.sh-link-inline:hover { color: var(--amber); border-color: var(--amber); }
.sh-link-inline .sh-arrow { transition: transform 220ms var(--easeq); }
.sh-link-inline:hover .sh-arrow { transform: translateX(3px); }

/* ============================================================
   INSTALL TIMELINE — 3 columns
   ============================================================ */
.sh-tl {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    position: relative;
}
/* Connecting line removed: the oversize numerals are anchors enough,
   a hairline through them would just collide with their bowls. */

.sh-tl-step {
    background: var(--bg-1);
    border: 1.5px solid var(--rule);
    border-radius: 14px;
    padding: 1.6rem 1.5rem 1.7rem;
    position: relative;
    z-index: 1;
    box-shadow: var(--card-elev);
    transition:
        border-color 200ms ease,
        transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sh-tl-step:hover {
    transform: translateY(-5px);
    border-color: color-mix(in oklch, var(--amber) 55%, var(--rule));
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.12),
        0 2px 4px oklch(0% 0 0 / 0.45),
        0 12px 26px -8px oklch(0% 0 0 / 0.55),
        0 32px 60px -20px oklch(0% 0 0 / 0.65),
        0 0 60px -12px color-mix(in oklch, var(--amber) 32%, transparent);
}
.sh-tl-num { transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1); }
.sh-tl-step:hover .sh-tl-num { transform: translateY(-2px) scale(1.04); }

.sh-tl-num {
    display: block;
    font-family: var(--sans);
    font-size: clamp(3.4rem, 5.2vw, 4.6rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.06em;
    color: var(--amber);
    margin-bottom: 0.8rem;
    margin-left: -0.05em;
    position: relative;
    z-index: 1;
    font-feature-settings: "tnum" 1, "lnum" 1;
}

.sh-tl-body h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.018em;
    margin-bottom: 0.55rem;
}
.sh-tl-body p {
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-mid);
    margin-bottom: 1.1rem;
}

.sh-code {
    background: var(--bg-deep);
    color: var(--text);
    border: 1.5px solid var(--rule);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    font-family: var(--mono);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.65;
    overflow-x: auto;
    white-space: pre;
    box-shadow: inset 0 1px 0 oklch(99% 0.003 80 / 0.04);
}
.sh-code-prompt { color: var(--amber); font-weight: 600; margin-right: 0.5rem; }

/* Step actions — primary button + secondary text link, stacked */
.sh-tl-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.4rem;
}
.sh-tl-btn {
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    border-radius: 8px;
}
.sh-tl-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-mid);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 160ms ease;
}
.sh-tl-link:hover { color: var(--amber); }
.sh-tl-link-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: color-mix(in oklch, var(--amber) 14%, var(--bg-2));
    color: var(--amber);
    transition: background 180ms ease;
    flex-shrink: 0;
}
.sh-tl-link-ico svg { width: 13px; height: 13px; }
.sh-tl-link:hover .sh-tl-link-ico {
    background: color-mix(in oklch, var(--amber) 26%, var(--bg-2));
}

/* Plain config checklist for step 03 — no dark code block */
.sh-tl-list {
    list-style: none;
    margin: 0.2rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.sh-tl-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--sans);
    font-size: 0.94rem;
    color: var(--text-mid);
    line-height: 1.4;
}
.sh-tl-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: color-mix(in oklch, var(--amber) 18%, transparent);
    color: var(--amber);
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

/* ============================================================
   PRICING
   ============================================================ */
.sh-plans {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}
.sh-plan {
    display: flex;
    flex-direction: column;
    background: var(--bg-1);
    border: 1.5px solid var(--rule);
    border-radius: 12px;
    padding: 1.6rem 1.5rem;
    box-shadow: var(--card-elev);
    transition:
        border-color 200ms ease,
        transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sh-plan:hover {
    transform: translateY(-5px);
    border-color: color-mix(in oklch, var(--amber) 55%, var(--rule));
    box-shadow:
        inset 0 1px 0 oklch(99% 0.003 80 / 0.12),
        0 2px 4px oklch(0% 0 0 / 0.45),
        0 12px 26px -8px oklch(0% 0 0 / 0.55),
        0 32px 60px -20px oklch(0% 0 0 / 0.65),
        0 0 70px -12px color-mix(in oklch, var(--amber) 38%, transparent);
}
/* Featured card already lifted by halo + scale; just nudge it more. */
.sh-plan-feat:hover {
    transform: translateY(-7px);
}
.sh-plan-feat {
    background: linear-gradient(165deg,
        color-mix(in oklch, var(--amber) 8%, var(--bg-1)) 0%,
        var(--bg-1) 70%);
    border-color: color-mix(in oklch, var(--amber) 35%, var(--rule));
    box-shadow: 0 0 0 1px color-mix(in oklch, var(--amber) 20%, transparent) inset;
}

.sh-plan-mark { margin-bottom: 1.2rem; }
.sh-plan-pill {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.2rem 0.55rem;
    background: var(--bg-2);
    border: 1px solid var(--rule);
    border-radius: 4px;
    margin-bottom: 0.85rem;
}
.sh-plan-pill.on {
    color: oklch(20% 0.06 60);
    background: var(--amber);
    border-color: var(--amber);
}

.sh-plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.sh-plan-feat .sh-plan-name { font-size: 1.6rem; }

.sh-plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-faint);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.3rem;
}
.sh-plan-price b {
    color: var(--text);
    font-family: var(--sans);
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: none;
}
.sh-plan-price span {
    flex: 1 1 100%;
    color: var(--text-dim);
}
.sh-plan-feat .sh-plan-price b { color: var(--amber); }

.sh-plan-tag {
    margin-top: 0.7rem;
    margin-bottom: 0;
    font-family: var(--sans);
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-dim);
    max-width: 36ch;
}
.sh-plan-soon .sh-plan-tag { color: var(--text-faint); }

.sh-plan-list {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
    flex: 1;
}
.sh-plan-list li {
    font-size: 0.88rem;
    color: var(--text-mid);
    padding: 0.35rem 0 0.35rem 1.3rem;
    border-bottom: 1px solid var(--rule-soft);
    position: relative;
    line-height: 1.45;
}
.sh-plan-list li:last-child { border-bottom: none; }
.sh-plan-list li::before {
    content: "";
    position: absolute;
    left: 0.1rem; top: 0.85em;
    width: 8px; height: 1px;
    background: var(--text-faint);
}
.sh-plan-feat .sh-plan-list li { color: var(--text); }
.sh-plan-feat .sh-plan-list li::before { background: var(--amber); height: 2px; top: 0.85em; }

.sh-plan-soon .sh-plan-list li { color: var(--text-dim); }
.sh-plan-soon .sh-plan-name,
.sh-plan-soon .sh-plan-price b { color: var(--text-mid); }

.sh-plan-locked {
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.55rem 0;
    border-top: 1px dashed var(--rule);
    display: block;
    text-align: center;
}

.sh-plan-cta { margin-top: auto; }

/* ============================================================
   FOOTER — oversize wordmark close
   Three rows: small (tagline + links) → DISPLAY wordmark → micro meta.
   The wordmark is the page outro and mirrors the hero h1 scale.
   ============================================================ */
.sh-foot {
    margin-top: 5rem;
    border-top: 1px solid color-mix(in oklch, var(--rule) 50%, transparent);
    background:
        radial-gradient(140% 100% at 50% 0%,
            color-mix(in oklch, var(--amber) 6%, transparent) 0%, transparent 55%),
        var(--bg-2);
    padding: 3.2rem 1.6rem 1.6rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.sh-foot-top {
    max-width: 1280px;
    margin: 0 auto 2.8rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.4rem;
    align-items: center;
}
.sh-foot-tag {
    font-size: 0.94rem;
    line-height: 1.45;
    color: var(--text-mid);
    max-width: 56ch;
    margin: 0;
}
.sh-foot-links {
    display: flex;
    gap: 1.6rem;
}
.sh-foot-links a {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    text-transform: uppercase;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 160ms ease, border-color 160ms ease;
}
.sh-foot-links a:hover {
    color: var(--amber);
    border-bottom-color: color-mix(in oklch, var(--amber) 50%, transparent);
}
.sh-foot-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.1rem;
}
.sh-foot-social {
    display: flex;
    gap: 1.1rem;
}
.sh-foot-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: color 160ms ease, transform 160ms ease;
}
.sh-foot-social a:hover {
    color: var(--amber);
    transform: translateY(-2px);
}
@media (max-width: 640px) {
    .sh-foot-nav { align-items: flex-start; }
}

/* The closing wordmark — sized to fit within the container, never clipped */
.sh-foot-display {
    max-width: 1280px;
    margin: 0 auto;
    font-family: var(--sans);
    font-size: clamp(2.6rem, 11.5vw, 9.5rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.055em;
    color: var(--text);
    user-select: none;
    white-space: nowrap;
    text-align: left;
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 1.6vw, 1.4rem);
}
.sh-foot-logo {
    /* The new logo PNG has very little internal padding, so the glyph
       fills the box. Scaled to match the wordmark's cap-height instead
       of overshooting it like the old padded PNG required. */
    height: 1em;
    width: auto;
    flex: 0 0 auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
    user-select: none;
    pointer-events: none;
}
.sh-foot-wordmark { display: inline-block; }
.sh-foot-bk { color: var(--amber); font-weight: 400; }
.sh-foot-w  { color: var(--text);  font-weight: 900; }

.sh-foot-bottom {
    max-width: 1280px;
    margin: 1.4rem auto 0;
    padding-top: 1.4rem;
    border-top: 1px solid color-mix(in oklch, var(--rule) 35%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.sh-foot-copy,
.sh-foot-meta {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

@media (max-width: 720px) {
    .sh-foot { padding-top: 2.4rem; }
    .sh-foot-top { grid-template-columns: 1fr; gap: 1rem; }
    .sh-foot-display {
        font-size: clamp(2.4rem, 16vw, 5rem);
        letter-spacing: -0.05em;
    }
    .sh-foot-bottom { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .sh-hero-grid { gap: 2.2rem; }
    .sh-cv-grid { grid-template-columns: 1fr; gap: 2rem; }
    .sh-cv-tags { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .sh-hw-grid { grid-template-columns: 1fr; gap: 2.2rem; }
    /* .sh-foot-inner removed: footer rewritten to oversize-wordmark layout */
}

@media (max-width: 860px) {
    .sh-nav { gap: 0.6rem; padding: 0 1rem; }
    .sh-nav-link { padding: 0.4rem 0.55rem; }
    .sh-mark-tag { display: none; }

    .sh-hero { padding: 3rem 1.1rem 3rem; }
    .sh-hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
    .sh-viewport { max-width: 100%; }

    .sh-vocab,
    .sh-cv,
    .sh-hw,
    .sh-install,
    .sh-pricing { padding: 3.6rem 1.1rem; }

    .sh-vocab-grid { grid-template-columns: 1fr; gap: 0.9rem; }
    .sh-cv-tags { grid-template-columns: 1fr 1fr; }

    .sh-tl { grid-template-columns: 1fr; gap: 0.9rem; }
    .sh-tl::before { display: none; }

    .sh-plans { grid-template-columns: 1fr; }

    .sh-bar-row { grid-template-columns: 80px 1fr 60px; gap: 0.5rem; }
    .sh-bar-name { font-size: 0.68rem; }
    .sh-bar-val { font-size: 0.72rem; }
}

@media (max-width: 520px) {
    .sh-nav { height: 52px; }
    .sh-btn { padding: 0.4rem 0.75rem; font-size: 0.66rem; }

    .sh-h1 { font-size: 2.2rem; }
    .sh-cta-row { flex-direction: column; align-items: stretch; }
    .sh-btn-lg { justify-content: center; }

    .sh-inline-stats { font-size: 0.7rem; gap: 0.6rem; }
    .sh-istats-sep { display: none; }

    .sh-cv-tags { grid-template-columns: 1fr; }

    .sh-vp-tel { font-size: 0.55rem; }
    .tel-bl, .tel-br { display: none; }
    .sh-vp-status { min-width: 0; padding: 0.3rem 0.6rem 0.3rem 24px; }
    .sh-vp-status > span:not(.sh-vp-status-led) { left: 24px; font-size: 0.6rem; }

    .sh-cv-chart { padding: 1rem 1.1rem; }
    .sh-cv-chart-legend { flex-direction: column; gap: 0.2rem; }
}

/* ============================================================
   DASHBOARD — DEVICE LIST
   Desktop: standard table. Mobile: each row becomes a stacked
   card so all info is visible without horizontal scrolling.
   ============================================================ */
.device-machine {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.82rem;
}
.device-machine strong { color: #f8fafc; font-size: 0.92rem; }
.device-id { font-size: 0.75rem; color: #94a3b8; }
.device-cpu { color: #94a3b8; font-size: 0.75rem; }
.device-ram { color: #64748b; font-size: 0.75rem; }
.device-ha {
    color: #a5b4fc;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.1rem;
}

/* ============================================================
   DASHBOARD / ADMIN — RESPONSIVE
   Applies to all pages that extend base.html (dashboard, admin,
   admin_users, admin_user_detail, admin_license_detail).
   ============================================================ */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; max-width: 100vw; }

    /* App nav (dashboard/admin) — tighten so brand + links + logout fit */
    .app-nav {
        padding: 0 0.8rem;
        gap: 0.7rem;
        height: 52px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .app-nav::-webkit-scrollbar { display: none; }
    .app-nav .brand { font-size: 0.95rem; flex-shrink: 0; }
    .app-nav a { font-size: 0.82rem; white-space: nowrap; flex-shrink: 0; }
    .app-nav .btn { font-size: 0.75rem; padding: 0.3rem 0.65rem; flex-shrink: 0; }
    /* Hide the long email on mobile — the user already knows who they are */
    .app-nav > span:not(.spacer) { display: none; }

    /* Container: full-width with small padding */
    .container {
        margin: 1rem auto;
        padding: 0 0.9rem;
        max-width: 100% !important;
    }

    /* Cards: smaller padding, full width, no horizontal margin */
    .card {
        padding: 1rem;
        border-radius: 10px;
    }
    .card h1 { font-size: 1.25rem; }
    .card h2 { font-size: 1rem; }

    /* Tables become horizontally scrollable on small screens —
       prevents page-wide overflow without losing data. */
    .container table,
    .card table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 0.82rem;
    }
    .container table th,
    .container table td,
    .card table th,
    .card table td { padding: 0.45rem 0.6rem; }

    /* Dashboard device list — drop the horizontal scroll table and
       render each device as a clean stacked card. Header becomes
       invisible; each <td> shows its label via data-label.
       Higher specificity (.card .device-table) overrides the
       generic mobile table rules above. */
    .card .device-table,
    .card .device-table thead,
    .card .device-table tbody,
    .card .device-table tr,
    .card .device-table td {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        white-space: normal;
        border: 0;
    }
    .card .device-table { margin-top: 0.6rem; }
    .card .device-table thead { display: none; }

    .card .device-table tr {
        background: rgba(15, 23, 42, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 0.9rem 1rem;
        margin-bottom: 0.7rem;
    }

    .card .device-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.8rem;
        padding: 0.45rem 0;
        font-size: 0.85rem;
        color: #e2e8f0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }
    .card .device-table td:last-child { border-bottom: none; }

    .card .device-table td[data-label]::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.78rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    /* Machine row: full-width header inside the card */
    .card .device-table td[data-label="Machine"] {
        display: block;
        padding: 0 0 0.7rem 0;
        margin-bottom: 0.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .card .device-table td[data-label="Machine"]::before { display: none; }
    .card .device-table .device-machine { gap: 0.25rem; }

    /* Status badge: align right without weird stretching */
    .card .device-table td[data-label="Status"] .badge {
        margin-left: auto;
    }

    /* Action cell: full-width button below */
    .card .device-table .device-action {
        display: block;
        padding-top: 0.7rem;
        margin-top: 0.3rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        border-bottom: none;
    }
    .card .device-table .device-action::before { display: none; }
    .card .device-table .device-action form { width: 100%; margin: 0; }
    .card .device-table .device-action button {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.88rem;
        font-weight: 600;
    }

    /* Forms: stack and full-width */
    input[type=text], input[type=email], input[type=password],
    input[type=date], input[type=number], select {
        font-size: 16px;   /* iOS won't auto-zoom on focus */
    }

    /* Headings */
    .container h1 { font-size: 1.4rem; margin-bottom: 1rem; }

    /* License-key display: allow wrap so it never overflows */
    .license-key-display {
        font-size: 0.9rem;
        word-break: break-all;
        white-space: normal;
    }
    .flash-key-row { gap: 0.5rem; }

    /* Stats grid: tighter on mobile */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
    .stat-card { padding: 0.7rem 0.6rem; }
    .stat-num { font-size: 1.45rem; }
    .stat-label { font-size: 0.72rem; }

    /* Banners */
    .admin-hint-banner,
    .alert-banner,
    .flash-card {
        padding: 0.7rem 0.85rem;
        font-size: 0.85rem;
    }
    .flash-card .howto-steps ol { padding-left: 1rem; }

    /* Switch instructions */
    .switch-instructions ol { padding-left: 1.1rem; }
    .switch-instructions { font-size: 0.82rem; }

    /* Expiry / progress */
    .expiry-row { flex-wrap: wrap; gap: 0.3rem; }
}

/* Extra-small phones (≤380px) — final safety net */
@media (max-width: 380px) {
    .hero-title { font-size: 1.85rem; }
    .landing-nav { gap: 0.4rem; }
    .landing-nav .brand { font-size: 0.95rem; }
    .btn-nav-outline { padding: 0.3rem 0.55rem; font-size: 0.75rem; }
    .btn-nav-primary { padding: 0.3rem 0.7rem; font-size: 0.75rem; }
    .gesture-scene { height: 400px; max-width: 320px; }
    .gs-hand-img { width: 210px; }
}

/* ============================================================
   DOCS PAGE — DOCUSAURUS-INSPIRED
   ============================================================ */

/* Body */
.docs-page {
    background: #111318;
    color: #e3e3e3;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Docs layout ─────────────────────────────────────────── */
.docs-wrapper {
    display: grid;
    grid-template-columns: 256px 1fr;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - 64px);
    padding-top: 64px;
}

/* ── Left sidebar ─────────────────────────────────────────── */
.docs-sidebar {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255,255,255,0.07);
    padding: 1.5rem 0 3rem;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 99px; }

.docs-version-wrap {
    padding: 0 1rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 1rem;
}
.docs-version-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    margin-bottom: 0.3rem;
}
.docs-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a5b4fc;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}
.docs-version-badge .dot { width:6px;height:6px;border-radius:50%;background:#4ade80; }

.docs-nav-group { margin-bottom: 0.2rem; }
.docs-nav-group-title {
    padding: 0.35rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-top: 0.8rem;
}
.docs-nav-link {
    display: block;
    padding: 0.32rem 1rem 0.32rem 1.25rem;
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    line-height: 1.45;
    margin: 0.05rem 0;
}
.docs-nav-link:hover { color: #e2e8f0; background: rgba(255,255,255,0.04); }
.docs-nav-link.active {
    color: #a5b4fc;
    border-left-color: #6366f1;
    background: rgba(99,102,241,0.08);
    font-weight: 600;
}
.docs-nav-link.sub { padding-left: 2rem; font-size: 0.83rem; }

/* ── Main content area ───────────────────────────────────── */
.docs-main {
    min-width: 0;
    padding: 0;
    max-width: 900px;
}

/* ── Alternating section wrappers ────────────────────────── */
.doc-section {
    padding: 2.5rem 3.5rem;
}
.doc-section.theme-a {
    background: #111318;
}
.doc-section.theme-b {
    background: #090d1a;
}
.doc-section:last-of-type { padding-bottom: 5rem; }

/* Section label chip above each h2 */
.doc-section h2:first-of-type::before {
    content: attr(data-section-label);
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6366f1;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

/* Breadcrumb */
.docs-breadcrumb {
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.docs-breadcrumb a { color: #64748b; text-decoration: none; }
.docs-breadcrumb a:hover { color: #94a3b8; }
.docs-breadcrumb .sep { color: #334155; }

/* Section anchors (offset for sticky nav) */
.docs-anchor {
    display: block;
    height: 0;
    margin-top: -80px;
    padding-top: 80px;
    pointer-events: none;
}

/* Typography */
.docs-main h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
    line-height: 1.2;
}
.docs-main .doc-lead {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.docs-main h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
    margin: 0.3rem 0 0.9rem;
    padding: 0.6rem 0 0.6rem 1rem;
    border-left: 3px solid #6366f1;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    scroll-margin-top: 80px;
    background: linear-gradient(to right, rgba(99,102,241,0.07), transparent 60%);
    border-radius: 0 4px 4px 0;
}
.docs-main h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 1.8rem 0 0.5rem;
    scroll-margin-top: 80px;
}
.docs-main h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.2rem 0 0.4rem;
}
.docs-main p {
    font-size: 0.925rem;
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 0.9rem;
}
.docs-main strong { color: #e2e8f0; }
.docs-main a { color: #a5b4fc; text-decoration: none; }
.docs-main a:hover { text-decoration: underline; }
.docs-main ul, .docs-main ol {
    font-size: 0.925rem;
    color: #94a3b8;
    line-height: 1.8;
    margin: 0.6rem 0 1rem 1.5rem;
}
.docs-main li { margin-bottom: 0.3rem; }
.docs-main code {
    font-family: 'Courier New', monospace;
    font-size: 0.84em;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    padding: 0.1em 0.45em;
    color: #c4b5fd;
}

/* ── Code blocks ─────────────────────────────────────────── */
.code-block {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.8rem 0 1.4rem;
}
.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 1rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.code-block-lang {
    font-size: 0.72rem;
    font-family: 'Courier New', monospace;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.code-block pre {
    margin: 0;
    padding: 1rem 1.2rem;
    font-family: 'Courier New', monospace;
    font-size: 0.83rem;
    line-height: 1.75;
    overflow-x: auto;
    color: #e2e8f0;
    white-space: pre;
}
.code-block pre .c  { color: #475569; } /* comment */
.code-block pre .k  { color: #f87171; } /* env key */
.code-block pre .v  { color: #4ade80; } /* value */
.code-block pre .s  { color: #fbbf24; } /* string/path */
.code-block pre .h  { color: #a5b4fc; } /* highlight */

/* ── Admonitions ─────────────────────────────────────────── */
.admonition {
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
    margin: 1.1rem 0;
    font-size: 0.9rem;
    line-height: 1.7;
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}
.admonition-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }
.admonition-body { flex: 1; }
.admonition-body strong { display: block; margin-bottom: 0.2rem; font-size: 0.88rem; }
.admonition-body p { margin: 0; font-size: 0.875rem; }
.adm-note   { background: rgba(99,102,241,0.1);  border-left: 3px solid #6366f1; color: #c7d2fe; }
.adm-tip    { background: rgba(16,185,129,0.1);  border-left: 3px solid #10b981; color: #6ee7b7; }
.adm-warn   { background: rgba(245,158,11,0.1);  border-left: 3px solid #f59e0b; color: #fde68a; }
.adm-danger { background: rgba(239,68,68,0.1);   border-left: 3px solid #ef4444; color: #fca5a5; }

/* ── Numbered steps ──────────────────────────────────────── */
.doc-steps { list-style: none; margin: 0.8rem 0 1.4rem; padding: 0; }
.doc-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.4rem;
    align-items: flex-start;
}
.doc-step-num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 800; color: white;
    margin-top: 0.1rem;
    box-shadow: 0 2px 8px rgba(99,102,241,0.45);
}
.doc-step-body { flex: 1; min-width: 0; }
.doc-step-body strong { display: block; color: #e2e8f0; font-size: 0.95rem; margin-bottom: 0.3rem; }
.doc-step-body p { margin: 0; font-size: 0.875rem; color: #94a3b8; line-height: 1.7; }
.doc-step-body .code-block { margin-top: 0.6rem; }

/* ── Tables ──────────────────────────────────────────────── */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 0.8rem 0 1.4rem;
}
.doc-table th {
    text-align: left;
    padding: 0.55rem 0.9rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
}
.doc-table td {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #cbd5e1;
    line-height: 1.55;
    vertical-align: top;
}
.doc-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Section break gradient transitions ─────────────────── */
.section-break {
    height: 120px;
    width: 100%;
    position: relative;
    flex-shrink: 0;
}
.section-break.a-to-b { background: linear-gradient(to bottom, #111318 0%, #090d1a 100%); }
.section-break.b-to-a { background: linear-gradient(to bottom, #090d1a 0%, #111318 100%); }
.section-break::after {
    content: '';
    position: absolute;
    left: 3.5rem;
    right: 3.5rem;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(to right, rgba(99,102,241,0.7), rgba(139,92,246,0.3) 55%, transparent);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(99,102,241,0.25);
}

/* ── Install-mode cards ──────────────────────────────────── */
.install-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.8rem;
}
a.install-mode-card {
    display: block;
    text-decoration: none;
    color: inherit;
}
a.install-mode-card:hover { text-decoration: none; }
.install-mode-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.2rem 1.3rem;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}
.install-mode-card:hover { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.04); }
.install-mode-card .imc-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.install-mode-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 0.3rem;
    text-transform: none;
    letter-spacing: 0;
}
.install-mode-card p {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 0.7rem;
}
.install-mode-card .imc-cta {
    font-size: 0.78rem;
    color: #a5b4fc;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.install-mode-card.recommended { border-color: rgba(99,102,241,0.35); }
.install-mode-card.recommended h4::after {
    content: " ✦ Recommended";
    font-size: 0.7rem;
    color: #a5b4fc;
    font-weight: 500;
}

/* ── Installation mode tab bar ───────────────────────────── */
.install-tabs {
    display: flex;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin: 1.5rem 0 1.8rem;
}
.install-tab {
    flex: 1;
    padding: 0.65rem 0.8rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    font-family: 'Inter', sans-serif;
    text-align: center;
    line-height: 1.3;
}
.install-tab .tab-icon { font-size: 1rem; display: block; margin-bottom: 0.15rem; }
.install-tab .tab-label { font-size: 0.8rem; }
.install-tab:hover { color: #94a3b8; background: rgba(255,255,255,0.04); }
.install-tab.active {
    background: rgba(99,102,241,0.18);
    color: #c7d2fe;
    border-color: rgba(99,102,241,0.45);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.15) inset;
}
.install-panel { display: none; padding-top: 0.5rem; }
.install-panel.active { display: block; }

/* ── Page navigation prev/next ───────────────────────────── */
.docs-page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    gap: 1rem;
}
.docs-page-nav a {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.8rem 1.1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    max-width: 48%;
}
.docs-page-nav a:hover { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.06); }
.docs-page-nav .nav-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #475569; }
.docs-page-nav .nav-title { font-size: 0.9rem; font-weight: 600; color: #a5b4fc; }
.docs-page-nav .next { text-align: right; margin-left: auto; }

/* ── Mobile TOC bar (replaces sidebar on mobile) ─────────── */
.docs-mobile-toc {
    display: none;
    position: sticky;
    top: 64px;
    z-index: 90;
    background: rgba(17,19,24,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    padding: 0 0.5rem;
}
.docs-mobile-toc::-webkit-scrollbar { display: none; }
.docs-mobile-toc a {
    display: inline-block;
    padding: 0.65rem 0.8rem;
    font-size: 0.83rem;
    color: #64748b;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.docs-mobile-toc a:hover { color: #e2e8f0; border-bottom-color: rgba(165,180,252,0.4); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .docs-wrapper { grid-template-columns: 220px 1fr; }
    .docs-main { padding: 0; }
    .doc-section { padding: 2rem 2rem; }
    .section-break::after { left: 2rem; right: 2rem; }
}
@media (max-width: 860px) {
    .docs-wrapper { grid-template-columns: 1fr; padding-top: 64px; }
    .docs-sidebar  { display: none; }
    .docs-mobile-toc { display: block; }
    .docs-main { padding: 0; max-width: 100%; }
    .doc-section { padding: 1.5rem 1.2rem; }
    .section-break { height: 70px; }
    .section-break::after { left: 1.2rem; right: 1.2rem; }
    .docs-main h2 { font-size: 1.2rem; }
    .install-modes { grid-template-columns: 1fr; }
    .install-tabs { flex-direction: column; }
    .docs-page-nav { flex-direction: column; }
    .docs-page-nav a { max-width: 100%; }
}
@media (max-width: 640px) {
    .docs-main h1 { font-size: 1.6rem; }
    .doc-table { display: block; overflow-x: auto; white-space: nowrap; }
    .code-block pre { font-size: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   THEME BUTTON (single icon — sun in dark mode, moon in light)
   ═══════════════════════════════════════════════════════════ */
.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.theme-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #c7d2fe;
    border-color: rgba(165,180,252,0.4);
    box-shadow: 0 0 14px rgba(165,180,252,0.25), 0 0 4px rgba(165,180,252,0.15);
}
.theme-icon {
    width: 17px;
    height: 17px;
    position: absolute;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.4,0,.2,1);
}
/* Dark mode: show sun (click → switch to light) */
.icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
.icon-moon { opacity: 0; transform: rotate(30deg) scale(0.6); }
/* Light mode: show moon (click → switch to dark) */
[data-theme="light"] .icon-sun  { opacity: 0; transform: rotate(-30deg) scale(0.6); }
[data-theme="light"] .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="light"] .theme-btn {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.14);
    color: #475569;
}
[data-theme="light"] .theme-btn:hover {
    background: rgba(99,102,241,0.1);
    color: #4338ca;
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 0 14px rgba(99,102,241,0.15);
}

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════════════════ */
[data-theme="light"].docs-page,
[data-theme="light"] .docs-page { background: #f5f7fa; color: #334155; }

/* Nav */
[data-theme="light"] .landing-nav {
    background: rgba(255,255,255,0.96) !important;
    border-bottom: 1px solid rgba(0,0,0,0.09) !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}
[data-theme="light"] .landing-nav .brand { color: #0f172a !important; }
[data-theme="light"] .landing-nav .nav-link { color: #475569 !important; }
[data-theme="light"] .landing-nav .nav-link:hover { color: #0f172a !important; }
[data-theme="light"] .btn-nav-outline { border-color: rgba(0,0,0,0.18) !important; color: #334155 !important; }
[data-theme="light"] .btn-nav-outline:hover { background: rgba(0,0,0,0.05) !important; }

/* Sidebar */
[data-theme="light"] .docs-sidebar {
    background: #ffffff;
    border-right-color: rgba(0,0,0,0.1);
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
}
[data-theme="light"] .docs-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; }
[data-theme="light"] .docs-version-wrap { border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .docs-version-badge {
    background: rgba(99,102,241,0.08);
    border-color: rgba(99,102,241,0.22);
    color: #4f46e5;
}
[data-theme="light"] .docs-version-badge .dot { background: #22c55e; }
[data-theme="light"] .docs-nav-group-title { color: #94a3b8; }
[data-theme="light"] .docs-nav-link { color: #475569; }
[data-theme="light"] .docs-nav-link:hover { color: #0f172a; background: rgba(0,0,0,0.04); }
[data-theme="light"] .docs-nav-link.active {
    color: #4f46e5;
    border-left-color: #4f46e5;
    background: rgba(99,102,241,0.08);
}

/* Mobile TOC */
[data-theme="light"] .docs-mobile-toc {
    background: rgba(245,247,250,0.97);
    border-bottom-color: rgba(0,0,0,0.09);
}
[data-theme="light"] .docs-mobile-toc a { color: #64748b; }
[data-theme="light"] .docs-mobile-toc a:hover { color: #0f172a; }

/* Section backgrounds & transitions */
[data-theme="light"] .doc-section.theme-a { background: #ffffff; }
[data-theme="light"] .doc-section.theme-b { background: #eef1f8; }
[data-theme="light"] .section-break.a-to-b { background: linear-gradient(to bottom, #ffffff, #eef1f8); }
[data-theme="light"] .section-break.b-to-a { background: linear-gradient(to bottom, #eef1f8, #ffffff); }
[data-theme="light"] .section-break::after {
    background: linear-gradient(to right, rgba(99,102,241,0.45), rgba(139,92,246,0.18) 55%, transparent);
    box-shadow: none;
}

/* Typography */
[data-theme="light"] .docs-main h1 { color: #0f172a; }
[data-theme="light"] .docs-main h2 {
    color: #0f172a;
    border-bottom-color: rgba(0,0,0,0.09);
    background: linear-gradient(to right, rgba(99,102,241,0.07), transparent 60%);
    border-left-color: #4f46e5;
}
[data-theme="light"] .docs-main h3 { color: #1e293b; }
[data-theme="light"] .docs-main h4 { color: #64748b; }
[data-theme="light"] .docs-main p { color: #475569; }
[data-theme="light"] .docs-main strong { color: #0f172a; }
[data-theme="light"] .docs-main a { color: #4f46e5; }
[data-theme="light"] .docs-main a:hover { color: #3730a3; }
[data-theme="light"] .doc-lead { color: #64748b; border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .docs-main ul,
[data-theme="light"] .docs-main ol { color: #475569; }
[data-theme="light"] .docs-main code {
    background: rgba(99,102,241,0.08);
    border-color: rgba(99,102,241,0.18);
    color: #4f46e5;
}

/* Code blocks — keep dark in light mode (better readability) */
[data-theme="light"] .code-block {
    background: #1e293b;
    border-color: rgba(0,0,0,0.2);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
[data-theme="light"] .code-block-header {
    background: rgba(255,255,255,0.06);
    border-bottom-color: rgba(255,255,255,0.08);
}
[data-theme="light"] .code-block-lang { color: #94a3b8; }

/* Tables */
[data-theme="light"] .doc-table th {
    background: rgba(0,0,0,0.04);
    color: #64748b;
    border-bottom-color: rgba(0,0,0,0.12);
}
[data-theme="light"] .doc-table td {
    color: #334155;
    border-bottom-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .doc-table tr:hover td { background: rgba(99,102,241,0.03); }

/* Admonitions */
[data-theme="light"] .adm-note  { background: rgba(99,102,241,0.07);  border-left-color: #6366f1; color: #3730a3; }
[data-theme="light"] .adm-tip   { background: rgba(16,185,129,0.07);  border-left-color: #10b981; color: #064e3b; }
[data-theme="light"] .adm-warn  { background: rgba(245,158,11,0.09);  border-left-color: #f59e0b; color: #78350f; }
[data-theme="light"] .adm-danger{ background: rgba(239,68,68,0.07);   border-left-color: #ef4444; color: #7f1d1d; }
[data-theme="light"] .admonition-body strong { color: inherit; opacity: 0.9; }
[data-theme="light"] .admonition-body p { color: inherit; opacity: 0.85; }

/* Step numbers */
[data-theme="light"] .doc-step-body strong { color: #0f172a; }
[data-theme="light"] .doc-step-body p { color: #475569; }

/* Install tabs */
[data-theme="light"] .install-tabs {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .install-tab { color: #64748b; }
[data-theme="light"] .install-tab:hover { color: #1e293b; background: rgba(0,0,0,0.05); }
[data-theme="light"] .install-tab.active {
    background: rgba(99,102,241,0.1);
    color: #4338ca;
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.12) inset;
}

/* Page nav */
[data-theme="light"] .docs-page-nav { border-top-color: rgba(0,0,0,0.09); }
[data-theme="light"] .docs-page-nav a { border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .docs-page-nav a:hover { border-color: rgba(99,102,241,0.35); background: rgba(99,102,241,0.05); }
[data-theme="light"] .docs-page-nav .nav-label { color: #94a3b8; }
[data-theme="light"] .docs-page-nav .nav-title { color: #4f46e5; }

/* Install mode cards (not currently on the page but kept for completeness) */
[data-theme="light"] .install-mode-card {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .install-mode-card:hover { background: rgba(99,102,241,0.05); border-color: rgba(99,102,241,0.3); }
[data-theme="light"] .install-mode-card h4 { color: #0f172a; }
[data-theme="light"] .install-mode-card p { color: #64748b; }
[data-theme="light"] .install-mode-card .imc-cta { color: #4f46e5; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* ============================================================
   MOTION SYSTEM
   Hero entrance choreography, scroll reveals with stagger,
   cluster diagram pulse, featured pricing breath glow.
   All motion uses transform + opacity only.
   Respects prefers-reduced-motion via JS gate + media query.
   ============================================================ */

/* ── Easing tokens ─────────────────────────────────────────── */
:root {
    --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Hero entrance (staggered text + scene) ────────────────── */
.sh-anim-step {
    opacity: 0;
    transform: translateY(16px);
    will-change: transform, opacity;
    transition:
        opacity 700ms var(--ease-expo),
        transform 800ms var(--ease-expo);
    transition-delay: calc(var(--ai, 0) * 110ms + 80ms);
}
.sh-anim-hero.is-revealed .sh-anim-step,
.sh-anim-scene.is-revealed {
    opacity: 1;
    transform: translateY(0);
}
.sh-anim-scene {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
    will-change: transform, opacity;
    transition:
        opacity 900ms var(--ease-expo),
        transform 1000ms var(--ease-expo);
    transition-delay: 320ms;
}
.sh-anim-scene.is-revealed {
    transform: translateY(0) scale(1);
}

/* ── Scroll reveals: simple fade-up ────────────────────────── */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 720ms var(--ease-expo),
        transform 800ms var(--ease-expo);
    will-change: transform, opacity;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Scroll reveals: stagger children up to 6 ──────────────── */
[data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 720ms var(--ease-expo),
        transform 820ms var(--ease-expo);
    will-change: transform, opacity;
}
[data-reveal-stagger].is-revealed > *               { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].is-revealed > *:nth-child(1)  { transition-delay:  20ms; }
[data-reveal-stagger].is-revealed > *:nth-child(2)  { transition-delay: 110ms; }
[data-reveal-stagger].is-revealed > *:nth-child(3)  { transition-delay: 200ms; }
[data-reveal-stagger].is-revealed > *:nth-child(4)  { transition-delay: 290ms; }
[data-reveal-stagger].is-revealed > *:nth-child(5)  { transition-delay: 380ms; }
[data-reveal-stagger].is-revealed > *:nth-child(6)  { transition-delay: 470ms; }

/* ── Cluster diagram: subtle pulse on master + worker ping ── */
.sh-hw-feat-cluster-graph svg circle:nth-of-type(1) {
    /* The master node aura (url(#ndA) fill) */
    transform-box: fill-box;
    transform-origin: 140px 32px;
    animation: sh-master-breath 4.2s ease-in-out infinite;
}
@keyframes sh-master-breath {
    0%, 100% { opacity: 0.55; transform: scale(0.92); }
    50%      { opacity: 1;    transform: scale(1.04); }
}
.sh-hw-feat-cluster-graph svg circle:nth-of-type(3),
.sh-hw-feat-cluster-graph svg circle:nth-of-type(4),
.sh-hw-feat-cluster-graph svg circle:nth-of-type(5) {
    transform-box: fill-box;
    transform-origin: center;
    animation: sh-worker-ping 4.2s ease-in-out infinite;
}
.sh-hw-feat-cluster-graph svg circle:nth-of-type(3) { animation-delay: 0s; }
.sh-hw-feat-cluster-graph svg circle:nth-of-type(4) { animation-delay: 1.2s; }
.sh-hw-feat-cluster-graph svg circle:nth-of-type(5) { animation-delay: 2.4s; }
@keyframes sh-worker-ping {
    0%, 60%, 100% { transform: scale(1);    filter: none; }
    72%           { transform: scale(1.32); filter: drop-shadow(0 0 6px oklch(86% 0.13 200 / 0.85)); }
    84%           { transform: scale(1);    filter: none; }
}

/* ── Featured pricing card: gentle border-glow breath ──────── */
.sh-plan-feat {
    animation: sh-feat-breath 5.4s ease-in-out infinite;
}
@keyframes sh-feat-breath {
    0%, 100% { box-shadow: var(--card-elev), 0 0 0 0 color-mix(in oklch, var(--amber) 0%, transparent); }
    50%      { box-shadow: var(--card-elev), 0 0 40px -4px color-mix(in oklch, var(--amber) 40%, transparent); }
}

/* ── Setup numbers: subtle scale-up on reveal ─────────────── */
[data-reveal-stagger].is-revealed .sh-tl-num {
    animation: sh-num-pop 700ms var(--ease-expo) both;
    animation-delay: 380ms;
}
@keyframes sh-num-pop {
    0%   { transform: scale(0.7) translateY(8px); opacity: 0; }
    60%  { transform: scale(1.02) translateY(0);  opacity: 1; }
    100% { transform: scale(1)    translateY(0);  opacity: 1; }
}
[data-reveal-stagger].is-revealed .sh-tl-num { transform-origin: left center; }

/* ── Reduced motion: kill all the page-load + scroll motion ─ */
@media (prefers-reduced-motion: reduce) {
    .sh-anim-step,
    .sh-anim-scene,
    [data-reveal],
    [data-reveal-stagger] > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
    .sh-hw-feat-cluster-graph svg circle,
    .sh-plan-feat,
    .sh-tl-num {
        animation: none !important;
    }
    /* Hover lifts off; users keep color/border feedback but no movement. */
    .sh-gcard:hover,
    .sh-hw-feat:hover,
    .sh-plan:hover,
    .sh-plan-feat:hover,
    .sh-scen-hero:hover,
    .sh-scen-thumb:hover,
    .sh-tl-step:hover {
        transform: none !important;
    }
    .sh-tl-step:hover .sh-tl-num,
    .sh-gcard:hover .sh-gcard-frame img,
    .sh-scen-hero:hover img,
    .sh-scen-thumb:hover img {
        transform: none !important;
    }
}

/* ============================================================
   VIDEO HERO — Apple-style full-screen looping reel
   Source is landscape ~16:9. On desktop the entire frame is shown
   inside a 100vh stage (object-fit: contain, never cropped). On
   mobile the layout switches to a stacked column: a 16:9 video
   tile at the top + Apple-style centered text below it.
   ============================================================ */
.sh-vhero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    /* On viewports taller than the 16:9 reel, shrink the hero down to
       the reel's natural rendered height so the next section can show
       below it instead of a dead black band. Floor at 560 px so very
       narrow desktop windows still get a usable hero. */
    max-height: max(560px, calc(100vw * 9 / 16));
    min-height: 480px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 50%, oklch(8% 0.005 75) 0%, oklch(3% 0.003 75) 80%);
    isolation: isolate;
}

.sh-vhero-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
}

.sh-vhero-video {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
    /* Force a GPU layer so the video and any overlays composite on
       their own surfaces — no shared repaints, no sub-pixel jitter. */
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Stay completely unpainted until JS confirms the video can
       play. visibility:hidden tells Safari to skip rendering the
       element entirely, so no partial top-to-bottom paint can leak
       through while frames are still being decoded. */
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 600ms ease-out,
        visibility 0s linear 600ms;
}
.sh-vhero-video.is-ready {
    visibility: visible;
    opacity: 1;
    transition:
        opacity 600ms ease-out,
        visibility 0s linear 0s;
}

/* Two video sources: a horizontal 16:9 reel for desktop, a vertical
   9:16 reel for tablet/phone. Show only one at a time. */
.sh-vhero-video-h {
    object-fit: contain;
    object-position: center top;
}
.sh-vhero-video-v {
    display: none;
    object-fit: cover;
    object-position: center center;
}

/* Solid loading curtain: a single fully-opaque dark layer that
   sits above the video and below the loader. Painted from the
   first frame the browser draws, so nothing of the loading video
   is ever visible. Fades to transparent when the video is ready. */
.sh-vhero-curtain {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: oklch(4% 0.003 75);
    pointer-events: none;
    transition: opacity 700ms ease-out;
}
.sh-vhero-curtain.is-fading-out {
    opacity: 0;
}

/* Hero video loader — thematic to the product.
   An open palm in the centre, gently breathing, with a warm amber
   glow and two soft concentric pulses radiating outward (the
   computer-vision "scan" the system performs on real palms).
   Stays invisible for fast loads via the same delayed fade-in. */
.sh-vhero-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 360ms ease-out;
}
.sh-vhero-loader.is-visible {
    opacity: 1;
    transition-delay: 400ms;
    transition-duration: 480ms;
}

/* Steady warm-amber glow behind the palm; subtly breathes. */
.sh-vhero-loader-glow {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: radial-gradient(circle,
        color-mix(in oklch, var(--amber) 55%, transparent) 0%,
        color-mix(in oklch, var(--amber) 22%, transparent) 38%,
        transparent 72%);
    filter: blur(6px);
    animation: sh-loader-glow 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* Concentric outward pulses — staggered for a continuous, calm
   "scan" rhythm. Border-only so they read as light, not mass. */
.sh-vhero-loader-ring {
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    border: 1.5px solid color-mix(in oklch, var(--amber) 70%, transparent);
    box-shadow: 0 0 16px color-mix(in oklch, var(--amber) 35%, transparent);
    animation: sh-loader-ring 2.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    opacity: 0;
}
.sh-vhero-loader-ring-late {
    animation-delay: 1.3s;
}

/* Centre icon: gently breathing palm. */
.sh-vhero-loader-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    /* Tint the PNG toward the brand amber while keeping the form
       readable on any video frame. */
    filter:
        drop-shadow(0 0 12px color-mix(in oklch, var(--amber) 65%, transparent))
        drop-shadow(0 2px 6px rgba(0,0,0,0.55));
    animation: sh-loader-breath 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes sh-loader-breath {
    0%, 100% { transform: scale(0.94); opacity: 0.88; }
    50%      { transform: scale(1.00); opacity: 1; }
}
@keyframes sh-loader-glow {
    0%, 100% { transform: scale(0.85); opacity: 0.55; }
    50%      { transform: scale(1.05); opacity: 0.95; }
}
@keyframes sh-loader-ring {
    0%   { transform: scale(0.55); opacity: 0; }
    18%  { opacity: 0.85; }
    100% { transform: scale(1.85); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sh-vhero-loader-icon,
    .sh-vhero-loader-glow,
    .sh-vhero-loader-ring { animation: none; }
    .sh-vhero-loader-icon { opacity: 1; transform: none; }
    .sh-vhero-loader-glow { opacity: 0.7; transform: none; }
    .sh-vhero-loader-ring { opacity: 0.4; transform: none; }
}

/* The vignette sits ON TOP of the video and is what actually feathers
   the visible edges. It uses VIEWPORT-anchored gradients (left/right
   sides + top/bottom) — far more robust than masking the video element,
   which is fooled by object-fit: contain on widescreen monitors. */
.sh-vhero-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        /* Side fades — base tier (always on). Strong dark at the very
           edge, dropping rapidly so 16:9 monitors only get a subtle
           cinematic vignette and don't lose video brightness. */
        linear-gradient(to right,
            oklch(3% 0.003 75) 0%,
            color-mix(in oklch, oklch(3% 0.003 75) 95%, transparent) 2%,
            color-mix(in oklch, oklch(3% 0.003 75) 50%, transparent) 5%,
            color-mix(in oklch, oklch(3% 0.003 75) 15%, transparent) 8%,
            transparent 12%,
            transparent 88%,
            color-mix(in oklch, oklch(3% 0.003 75) 15%, transparent) 92%,
            color-mix(in oklch, oklch(3% 0.003 75) 50%, transparent) 95%,
            color-mix(in oklch, oklch(3% 0.003 75) 95%, transparent) 98%,
            oklch(3% 0.003 75) 100%),
        /* Vertical fade — darkens the top (nav legibility, H1 contrast)
           and runs a long, gradual dissolve at the bottom that ends
           matching the body background, so when the hero shrinks to the
           reel's natural height (taller-than-16:9 viewports) the next
           section appears underneath without any hard cut. */
        linear-gradient(to bottom,
            color-mix(in oklch, oklch(3% 0.003 75) 80%, transparent) 0%,
            color-mix(in oklch, oklch(3% 0.003 75) 35%, transparent) 14%,
            transparent 28%,
            transparent 58%,
            color-mix(in oklch, var(--bg) 30%, transparent) 76%,
            color-mix(in oklch, var(--bg) 70%, transparent) 90%,
            var(--bg) 100%);
}

/* Wider-than-16:9 viewports actually have pillarbox bars to cover.
   Stretch the side fade further inward so the bars never read as a
   hard cut against the video edge. */
@media (min-aspect-ratio: 9/5) {
    .sh-vhero-vignette {
        background:
            linear-gradient(to right,
                oklch(3% 0.003 75) 0%,
                color-mix(in oklch, oklch(3% 0.003 75) 95%, transparent) 5%,
                color-mix(in oklch, oklch(3% 0.003 75) 65%, transparent) 11%,
                color-mix(in oklch, oklch(3% 0.003 75) 30%, transparent) 16%,
                color-mix(in oklch, oklch(3% 0.003 75) 10%, transparent) 20%,
                transparent 24%,
                transparent 76%,
                color-mix(in oklch, oklch(3% 0.003 75) 10%, transparent) 80%,
                color-mix(in oklch, oklch(3% 0.003 75) 30%, transparent) 84%,
                color-mix(in oklch, oklch(3% 0.003 75) 65%, transparent) 89%,
                color-mix(in oklch, oklch(3% 0.003 75) 95%, transparent) 95%,
                oklch(3% 0.003 75) 100%),
            linear-gradient(to bottom,
                color-mix(in oklch, oklch(3% 0.003 75) 80%, transparent) 0%,
                color-mix(in oklch, oklch(3% 0.003 75) 35%, transparent) 14%,
                transparent 28%,
                transparent 58%,
                color-mix(in oklch, var(--bg) 30%, transparent) 76%,
                color-mix(in oklch, var(--bg) 70%, transparent) 90%,
                var(--bg) 100%);
    }
}

.sh-vhero-banner {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    margin: 0;
}

.sh-vhero-content {
    position: absolute;
    left: 0;
    right: 0;
    /* Nav is transparent over the video, so the block can sit higher. */
    top: clamp(3rem, 6.5vh, 5rem);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1.4rem;
    pointer-events: none;
}
.sh-vhero-content > * { pointer-events: auto; }

.sh-vhero-h1 {
    /* Quieter still: smaller cap, tight vertical rhythm. */
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin: 0 0 1rem;
    color: var(--text);
    text-shadow: 0 4px 22px color-mix(in oklch, oklch(3% 0.003 75) 60%, transparent);
}
.sh-vhero-h1 .sh-h1-amber {
    font-weight: 700;
    letter-spacing: -0.038em;
}

.sh-vhero-sub {
    font-size: clamp(0.98rem, 1.2vw, 1.15rem);
    line-height: 1.4;
    color: color-mix(in oklch, white 88%, transparent);
    max-width: 28rem;
    margin: 0 auto 1.4rem;
    text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}

.sh-vhero-cta {
    margin: 0;
    justify-content: center;
    gap: 0.8rem;
}

/* Frosted-glass "Learn more" button — sits cleanly on top of the video */
.sh-btn-glass {
    background: color-mix(in oklch, white 10%, transparent);
    color: #fff;
    border-color: color-mix(in oklch, white 30%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.sh-btn-glass:hover {
    background: color-mix(in oklch, white 18%, transparent);
    border-color: color-mix(in oklch, white 55%, transparent);
    transform: translateY(-1px);
}

/* Scroll-down hint (Apple-style dot-in-pill) */
.sh-vhero-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.6rem;
    transform: translateX(-50%);
    z-index: 2;
    width: 26px;
    height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    animation: sh-vhero-fade-in 1.2s ease-out 1.4s forwards;
}
.sh-vhero-scroll-track {
    width: 100%;
    height: 100%;
    border: 1.5px solid color-mix(in oklch, white 55%, transparent);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 7px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.sh-vhero-scroll-dot {
    display: block;
    width: 3px;
    height: 8px;
    background: color-mix(in oklch, white 85%, transparent);
    border-radius: 2px;
    animation: sh-vhero-scroll-dot 1.8s var(--ease-quart, ease-in-out) infinite;
}
@keyframes sh-vhero-scroll-dot {
    0%   { transform: translateY(0);    opacity: 1; }
    60%  { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(10px); opacity: 0; }
}
@keyframes sh-vhero-fade-in {
    to { opacity: 1; }
}

/* ── Tablet / phone ──────────────────────────────────────────────
   Same overlay grammar as desktop — full-screen video, text + CTAs
   composited on top, transparent nav — but using a portrait 9:16
   reel that fills naturally. */
@media (max-width: 860px) {
    .sh-vhero {
        /* Restore the desktop overlay layout (un-flex). The portrait
           video covers the portrait viewport edge-to-edge, so the
           desktop-only "shrink to reel height" rule does NOT apply
           here — kill the inherited max-height. */
        display: block;
        height: 100vh;
        height: 100svh;
        min-height: 560px;
        max-height: none;
        padding: 0;
        background:
            radial-gradient(ellipse 80% 60% at 50% 50%, oklch(8% 0.005 75) 0%, oklch(3% 0.003 75) 80%);
    }
    /* Swap which video shows. */
    .sh-vhero-video-h { display: none; }
    .sh-vhero-video-v {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
    .sh-vhero-stage {
        /* Back to absolute overlay. */
        position: absolute;
        inset: 0;
        margin: 0;
        width: auto;
        aspect-ratio: auto;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }
    .sh-vhero-vignette {
        /* Vertical legibility fades only — no side fades needed when
           a portrait video covers the portrait viewport edge-to-edge.
           Bottom fade is longer here so the CTAs (anchored at the
           bottom of the overlay) sit on darker ground regardless of
           what frame the reel is playing. */
        background:
            linear-gradient(to bottom,
                color-mix(in oklch, oklch(3% 0.003 75) 70%, transparent) 0%,
                color-mix(in oklch, oklch(3% 0.003 75) 30%, transparent) 14%,
                transparent 30%,
                transparent 52%,
                color-mix(in oklch, oklch(3% 0.003 75) 22%, transparent) 68%,
                color-mix(in oklch, oklch(3% 0.003 75) 55%, transparent) 84%,
                color-mix(in oklch, oklch(3% 0.003 75) 88%, transparent) 96%,
                oklch(3% 0.003 75) 100%);
    }
    .sh-vhero-content {
        /* Stretch the overlay over the entire video. H1 + sub stay
           pinned at the top, CTAs are pushed all the way to the bottom
           so the main subject of the portrait reel (the hand) stays
           uncovered. */
        position: absolute;
        inset: 0;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: clamp(4.5rem, 9vh, 7rem) 1.4rem clamp(1.8rem, 5vh, 3rem);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .sh-vhero-h1 {
        font-size: clamp(2.4rem, 9.5vw, 3.6rem);
        margin: 0 0 1rem;
        text-align: center;
        line-height: 1.02;
    }
    .sh-vhero-sub {
        font-size: 1.02rem;
        line-height: 1.45;
        margin: 0 auto 0;
        max-width: 22rem;
        text-align: center;
    }
    .sh-vhero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        margin: auto auto 0;   /* push to bottom of flex column */
        max-width: 22rem;
        width: 100%;
    }
    .sh-vhero-cta .sh-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.3rem;
        font-size: 0.82rem;
        letter-spacing: 0.06em;
    }
    .sh-vhero-scroll {
        display: none;
    }
    .sh-vhero-banner {
        top: 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-vhero-video,
    .sh-vhero-scroll-dot,
    .sh-vhero-scroll {
        animation: none !important;
    }
    .sh-vhero-scroll { opacity: 1; }
}
