/* ============================================================
   Prod is Down: matte control-room theme for the whole product.
   ============================================================ */

/* The page itself stays matte; depth lives on controls and panels. */
body.site-v2 {
    --v2-bg: #161616;
    --v2-panel: #1d1d1d;
    --v2-panel-2: #222222;
    --v2-panel-3: #272727;
    --v2-line: #303030;
    --v2-line-strong: #404040;
    --v2-text: #eceae6;
    --v2-muted: #9b9993;
    --v2-green: #78ff8b;
    --v2-green-deep: #2ed75c;
    --v2-red: #ff5263;
    --v2-amber: #f2bd55;
    --v2-blue: #78b7ff;
    --v2-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --bg-primary: #161616;
    --bg-secondary: #1d1d1d;
    --bg-tertiary: #222222;
    --card-bg: #1d1d1d;
    --border: #303030;
    --text-primary: #eceae6;
    --text-secondary: #9b9993;
    --surface-raised: #1d1d1d;
    --surface-soft: #222222;
    /* Legacy components still consume these names from style.css.  Keep them
       on the same palette as the v2 shell instead of mixing two greens. */
    --accent: var(--v2-green);
    --accent-dim: var(--v2-green-deep);
    --critical: var(--v2-red);
    --high: #ff895c;
    --medium: var(--v2-amber);
    --border-strong: var(--v2-line-strong);
    background-color: #161616;
    background-image: none;
    color: var(--v2-text);
    color-scheme: dark;
}

body.site-v2::before,
body.site-v2::after {
    display: none;
    content: none;
}

.site-v2 .container,
.page-home-v2 .home-hero {
    background-color: transparent;
    background-image: none;
}

body.site-v2::selection {
    background: rgba(120, 255, 139, 0.24);
    color: #fff;
}

/* ============================================================
   Site-wide application shell
   ============================================================ */

.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2000;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--v2-green);
    border-radius: 7px;
    background: #111;
    color: var(--v2-text);
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 140ms ease;
}

.skip-link:focus {
    transform: none;
}

.site-v2 .container {
    max-width: 1320px;
    padding: 1rem clamp(1rem, 3vw, 2.5rem) 3.5rem;
}

.site-v2 .site-main {
    min-height: min(64vh, 720px);
    outline: none;
}

.site-v2:not(.page-home-v2):not(.page-incident-v2) .site-main {
    animation: v2-page-in 420ms var(--v2-ease) both;
}

@keyframes v2-page-in {
    from { opacity: 0; transform: translateY(12px); }
}

.site-v2 .topnav {
    top: 0.65rem;
    z-index: 100;
    min-height: 58px;
    margin: 0 0 1.5rem;
    padding: 0.65rem 0.85rem 0.65rem 1rem;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: rgba(22, 22, 22, 0.82);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    clip-path: none;
    backdrop-filter: blur(18px) saturate(1.25);
}

.site-v2 .topnav-brand {
    color: var(--v2-text);
    font-size: 1.05rem;
}

/* Both themes use the same outlined letters, proportions and motion. */
.brand-graphic {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1;
}
.brand-graphic .brand-word { display: block; width: auto; max-width: none; height: 1em; }
.brand-graphic .logo-icon { display: block; flex: none; width: .75em; height: 1em; margin: 0; overflow: visible; fill: none; }
.brand-graphic .logo-chevron { width: .6625em; height: 1em; margin: 0; overflow: visible; fill: none; stroke: none; }
.brand-graphic .winter-chevron-snow path { stroke: none; stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
.brand-graphic .winter-chevron-snow { opacity: 0; }
.brand-graphic.is-collapsed .winter-chevron-snow { opacity: 1; }
.brand-ready .brand-graphic .winter-chevron-snow { transition: opacity .18s ease; }
.brand-ready .brand-graphic.is-collapsed .winter-chevron-snow { transition-delay: .36s; }
.brand-ready .brand-graphic .winter-core-ice { transition: opacity .2s ease; }
.brand-graphic.is-collapsed .winter-core-ice { opacity: 0; }
.site-v2 .topnav-brand .brand-graphic { font-size: 1.75rem; }
.site-v2 .topnav-brand .brand-graphic.is-collapsed { font-size: 2.125rem; }
.site-v2 .logo-hero .brand-graphic { font-size: 3.75rem; }
.site-v2 .logo-hero { will-change: auto; }

@media (max-width: 600px) {
    .site-v2 .logo-hero .brand-graphic { font-size: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .brand-graphic .winter-chevron-snow,
    .brand-graphic .winter-core-ice { transition: none !important; }
}

.site-v2 .topnav-links {
    min-width: 0;
    gap: 0.25rem;
}

.site-v2 .vk-icon,
.site-v2 .tiktok-icon {
    display: block;
}

.site-v2 .topnav-links .vk-link,
.site-v2 .topnav-links .tiktok-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 0;
    line-height: 1;
}

.site-v2 .topnav-links a,
.site-v2 .topnav-links button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 0;
    padding: 0.42rem 0.65rem;
    border-radius: 7px;
    color: var(--v2-muted);
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.site-v2 .topnav-links a:hover,
.site-v2 .topnav-links button:hover,
.site-v2 .topnav-links .is-active {
    background: rgba(255, 255, 255, 0.055);
    color: var(--v2-text);
    text-decoration: none;
}

.site-v2 .topnav-links .is-active::after {
    position: absolute;
    right: 0.65rem;
    bottom: 0.18rem;
    left: 0.65rem;
    height: 1px;
    background: var(--v2-green);
    content: "";
    opacity: 0.8;
}

.site-v2 .page-header {
    margin: 1.3rem 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--v2-line);
}

.site-v2 .page-title {
    overflow-wrap: anywhere;
    color: var(--v2-text);
    font-size: clamp(1.85rem, 4vw, 2.8rem);
    font-weight: 740;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.site-v2 .page-header .muted,
.site-v2 .page-header p {
    max-width: 760px;
    color: var(--v2-muted);
}

.site-v2 .panel,
.site-v2 .stat-tile,
.site-v2 .leaderboard-case,
.site-v2 .achievement-card {
    border-color: var(--v2-line-strong);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 34%),
        var(--v2-panel);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.site-v2 .panel {
    padding: clamp(1.15rem, 2.5vw, 1.6rem);
}

.site-v2 .panel .section-title,
.site-v2 .admin-panel-title {
    color: var(--v2-text);
    letter-spacing: -0.02em;
}

.site-v2 .narrow-panel {
    width: min(100%, 520px);
    max-width: 100%;
    margin-top: clamp(1.5rem, 5vh, 4rem);
}

.site-v2 .auth-panel,
.site-v2 .account-required {
    position: relative;
    overflow: hidden;
}

.site-v2 .auth-panel::before,
.site-v2 .account-required::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--v2-green), transparent 72%);
    content: "";
}

.site-v2 .btn {
    border-radius: 9px;
    transition: transform 180ms var(--v2-ease), border-color 180ms ease,
                background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-v2 .btn-primary,
.site-v2 .btn-check {
    border-color: var(--v2-green);
    background: var(--v2-green);
    box-shadow: 0 10px 30px rgba(46, 215, 92, 0.16);
    color: #061109;
    font-weight: 750;
}

@media (hover: hover) {
    .site-v2 .btn:hover {
        transform: translateY(-2px);
    }

    .site-v2 .btn-primary:hover,
    .site-v2 .btn-check:hover {
        border-color: #a0ffad;
        background: #a0ffad;
        box-shadow: 0 14px 36px rgba(46, 215, 92, 0.24);
    }

    .site-v2 .stat-tile:hover,
    .site-v2 .achievement-card:not(.is-locked):hover,
    .site-v2 .leaderboard-case:hover {
        border-color: rgba(120, 255, 139, 0.32);
        box-shadow: 0 22px 55px rgba(0, 0, 0, 0.26);
        transform: translateY(-3px);
    }
}

.site-v2 .form-stack {
    gap: 1.05rem;
}

.site-v2 .form-field {
    color: #d9d8d4;
    font-size: 0.88rem;
}

.site-v2 :is(input, textarea, select) {
    border-color: var(--v2-line-strong);
    border-radius: 8px;
    background: var(--v2-panel-2);
    color: var(--v2-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.site-v2 :is(input, textarea, select):focus {
    outline: none;
    border-color: rgba(120, 255, 139, 0.58);
    background: #252525;
    box-shadow: 0 0 0 3px rgba(120, 255, 139, 0.08);
}

.site-v2 .form-check {
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--v2-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
}

.site-v2 .form-error {
    border-radius: 8px;
    background: rgba(255, 82, 99, 0.07);
}

.site-v2 .stat-row {
    gap: 0.85rem;
}

.site-v2 .stat-tile {
    position: relative;
    overflow: hidden;
    padding: 1.05rem 1.1rem;
    transition: transform 200ms var(--v2-ease), border-color 180ms ease, box-shadow 200ms ease;
}

.site-v2 .stat-tile::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--v2-green-deep), transparent 75%);
    content: "";
}

.site-v2 .stat-label {
    color: var(--v2-muted);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    overflow-wrap: anywhere;
}

.site-v2 .stat-value {
    color: var(--v2-text);
    font-family: var(--font-mono);
}

.site-v2 .table-wrap {
    border: 1px solid var(--v2-line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
    scrollbar-color: var(--v2-line-strong) transparent;
}

.site-v2 .table-wrap:focus-visible {
    outline: 2px solid var(--v2-green);
    outline-offset: 3px;
}

.site-v2 .table-scroll-note {
    margin-top: 0.5rem;
    color: var(--v2-muted);
    font-size: 0.75rem;
}

.site-v2 .best-results-table td:first-child {
    min-width: 13rem;
    max-width: 26rem;
    white-space: normal;
}

.site-v2 .data-table th,
.site-v2 .data-table td {
    border-bottom-color: var(--v2-line);
}

.site-v2 .data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #202020;
    color: var(--v2-muted);
    font-family: var(--font-mono);
}

.site-v2 .data-table tbody tr {
    transition: background 140ms ease;
}

.site-v2 .data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.site-v2 .run-status {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.site-v2 .achievement-card {
    transition: transform 200ms var(--v2-ease), border-color 180ms ease, box-shadow 200ms ease;
}

.site-v2 .leaderboard-case {
    transition: transform 200ms var(--v2-ease), border-color 180ms ease, box-shadow 200ms ease;
}

.site-v2 .leaderboard-list li {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto auto;
    min-height: 42px;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--v2-line);
    border-radius: 0;
}

.site-v2 .leaderboard-name,
.site-v2 .optin-form p {
    min-width: 0;
    overflow-wrap: anywhere;
}

.site-v2 .profile-best li {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.site-v2 .leaderboard-list li:last-child {
    border-bottom: 0;
}

.site-v2 .leaderboard-list li.is-me {
    border-radius: 7px;
}

.site-v2 .share-page {
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid var(--v2-line-strong);
    border-radius: 18px;
    background: var(--v2-panel);
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.24);
}

.site-v2 .share-card-image {
    border-color: var(--v2-line-strong);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.site-v2 .legal-doc {
    max-width: 820px;
    line-height: 1.72;
}

.site-v2 .legal-doc h2 {
    padding-top: 0.2rem;
    color: var(--v2-text);
    letter-spacing: -0.02em;
}

.site-v2 .legal-doc p,
.site-v2 .legal-doc li {
    color: #b9b7b0;
}

.site-v2 .account-facts {
    padding: 1rem;
    border: 1px solid var(--v2-line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
}

.site-v2 .account-required-box {
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.site-v2 .cookie-banner {
    border-color: var(--v2-line-strong);
    border-radius: 14px;
    background: rgba(29, 29, 29, 0.94);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px) saturate(1.2);
}

.site-v2 .site-footer {
    margin-top: 2rem;
    border-top: 1px solid var(--v2-line);
    color: #77756f;
}

.site-v2 .site-footer a {
    color: #8e8c86;
}

.site-v2 :where(a, button, summary, input, textarea, select):focus-visible {
    outline: 2px solid var(--v2-green);
    outline-offset: 3px;
}

/* ============================================================
   Interior pages: the same incident-console language as home.
   ============================================================ */

.site-v2 .page-eyebrow,
.site-v2 .panel-eyebrow,
.site-v2 .state-eyebrow,
.site-v2 .console-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--v2-green);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-v2 .page-eyebrow::before,
.site-v2 .state-eyebrow::before,
.site-v2 .console-eyebrow > span {
    width: 0.42rem;
    height: 0.42rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0.65rem currentColor;
    content: "";
}

.site-v2 .console-page {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 1rem;
}

.site-v2 .console-page > :where(.page-header, .panel, .stat-row, section) {
    min-width: 0;
    margin-bottom: 0;
}

.site-v2 :is(.auth-header, .state-header, .account-header) {
    display: grid;
    min-width: 0;
    gap: 0.65rem;
}

.site-v2 :is(.auth-header, .state-header, .account-header) .page-title {
    margin: 0;
}

.site-v2 .state-header {
    margin-bottom: 1.25rem;
}

.site-v2 .state-header .console-eyebrow {
    justify-content: center;
}

.site-v2 .account-required .state-header .console-eyebrow,
.site-v2 .share-page .state-header .console-eyebrow {
    justify-content: flex-start;
}

.site-v2 .empty-state {
    display: grid;
    justify-items: start;
    gap: 0.75rem;
    padding: clamp(1rem, 3vw, 2rem) 0;
}

.site-v2 .empty-state .section-title {
    margin: 0;
}

.site-v2 .empty-state .muted {
    max-width: 620px;
}

.page-dashboard-v2 .page-header {
    position: relative;
    display: grid;
    min-height: 190px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
    gap: 1.25rem 2rem;
    align-items: end;
    margin: 1rem 0 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    overflow: hidden;
    border: 1px solid var(--v2-line-strong);
    border-radius: 17px;
    background:
        radial-gradient(circle at 94% 0, rgba(120, 255, 139, 0.08), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%),
        var(--v2-panel);
    box-shadow: 0 26px 65px rgba(0, 0, 0, 0.24);
}

.page-dashboard-v2 .page-header::after {
    position: absolute;
    right: -1rem;
    bottom: -2rem;
    color: rgba(255, 255, 255, 0.025);
    content: attr(data-console-label);
    font-family: var(--font-mono);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 1;
    pointer-events: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.page-dashboard-v2 .page-header-copy,
.page-dashboard-v2 .page-header-meta {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.page-dashboard-v2 .page-header-copy {
    display: grid;
    align-content: end;
    gap: 0.5rem;
}

.page-dashboard-v2 .page-header .page-title {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.page-dashboard-v2 .page-header .muted,
.page-dashboard-v2 .page-header-copy > p:last-child {
    max-width: 760px;
    margin: 0;
    color: var(--v2-muted);
}

.page-dashboard-v2 .page-header .console-eyebrow {
    margin: 0;
    color: var(--v2-green);
}

.page-dashboard-v2 .page-header-meta {
    display: grid;
    gap: 0.55rem;
    align-self: stretch;
    align-content: end;
    padding-left: 1.15rem;
    border-left: 1px solid var(--v2-line);
    color: var(--v2-muted);
    font-size: 0.8rem;
}

.page-dashboard-v2 .page-header-meta strong {
    color: var(--v2-text);
    font-family: var(--font-mono);
    font-size: 1rem;
}

.page-dashboard-v2 .page-header-meta a {
    overflow-wrap: anywhere;
}

.page-dashboard-v2 .stat-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.page-dashboard-v2 .stat-tile {
    min-height: 116px;
    align-content: space-between;
}

.page-dashboard-v2 .stat-tile:nth-child(2)::before {
    background: linear-gradient(90deg, var(--v2-blue), transparent 75%);
}

.page-dashboard-v2 .stat-tile:nth-child(3)::before {
    background: linear-gradient(90deg, var(--v2-amber), transparent 75%);
}

.page-dashboard-v2 .stat-tile:nth-child(4)::before {
    background: linear-gradient(90deg, #b68cff, transparent 75%);
}

.page-dashboard-v2 .panel {
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
}

.site-v2 .console-panel {
    border-color: var(--v2-line-strong);
}

.page-dashboard-v2 .panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.45rem 1.5rem;
    margin-bottom: 1rem;
}

.page-dashboard-v2 .panel-head .section-title,
.page-dashboard-v2 .panel-head .panel-note {
    margin: 0;
}

.page-dashboard-v2 .panel-head .panel-note {
    max-width: 680px;
}

/* History */
.page-history-v2 .history-chart {
    height: 300px;
    padding: 0.75rem 0.5rem 0.2rem;
    border: 1px solid var(--v2-line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.14);
}

.page-history-v2 .achievement-card:not(.is-locked) {
    border-color: rgba(242, 189, 85, 0.3);
    background:
        linear-gradient(135deg, rgba(242, 189, 85, 0.08), transparent 62%),
        var(--v2-panel-2);
}

.page-history-v2 .achievement-card.is-locked {
    opacity: 0.62;
}

.page-history-v2 .run-status-solved {
    background: rgba(120, 255, 139, 0.055);
}

/* Leaderboard */
.page-leaderboard-v2 .optin-panel {
    border-color: rgba(120, 255, 139, 0.22);
    background:
        linear-gradient(110deg, rgba(120, 255, 139, 0.07), transparent 45%),
        var(--v2-panel);
}

.page-leaderboard-v2 .weekly-panel {
    border-color: rgba(242, 189, 85, 0.34);
    background:
        radial-gradient(circle at 100% 0, rgba(242, 189, 85, 0.09), transparent 34%),
        var(--v2-panel);
}

.page-leaderboard-v2 .weekly-left,
.page-leaderboard-v2 .weekly-case a:hover {
    color: var(--v2-amber);
}

.page-leaderboard-v2 .leaderboard-table tbody tr:nth-child(-n + 3) td:first-child {
    color: var(--v2-amber);
    font-weight: 800;
}

.page-leaderboard-v2 .leaderboard-cases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.page-leaderboard-v2 .leaderboard-case {
    min-width: 0;
    padding: 1rem;
}

.page-leaderboard-v2 .leaderboard-case-title {
    min-width: 0;
    min-height: 2.75em;
    color: var(--v2-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Public profile */
.page-profile-v2 .page-header {
    border-color: rgba(120, 183, 255, 0.24);
    background:
        radial-gradient(circle at 94% 0, rgba(120, 183, 255, 0.1), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%),
        var(--v2-panel);
}

.page-profile-v2 .profile-kicker {
    color: var(--v2-blue);
}

.page-profile-v2 .profile-footer {
    padding: 0.8rem 1rem;
    border: 1px solid var(--v2-line);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.1);
}

/* Account and authentication */
.page-form-v2 .site-main {
    display: grid;
    align-items: start;
}

.page-form-v2 .narrow-panel {
    width: min(100%, 600px);
    margin-top: clamp(1rem, 5vh, 3.5rem);
}

.page-form-v2 .auth-panel,
.page-form-v2 .account-panel {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.page-form-v2 .auth-panel .page-title,
.page-form-v2 .account-panel .page-title {
    margin-bottom: 0.4rem;
}

.page-form-v2 .auth-panel::after,
.page-form-v2 .account-panel::after {
    position: absolute;
    right: -1.2rem;
    bottom: -1.8rem;
    color: rgba(255, 255, 255, 0.025);
    content: attr(data-console-label);
    font-family: var(--font-mono);
    font-size: 4.6rem;
    font-weight: 800;
    letter-spacing: -0.08em;
    pointer-events: none;
}

.page-form-v2 .form-stack,
.page-form-v2 .auth-switch,
.page-form-v2 .form-note,
.page-form-v2 .account-facts,
.page-form-v2 .page-title,
.page-form-v2 .muted {
    position: relative;
    z-index: 1;
}

.page-account-v2 .account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 1rem;
    align-items: start;
    margin-top: clamp(1rem, 4vh, 2.5rem);
}

.page-account-v2 .account-layout .narrow-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

.page-account-v2 .account-facts {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}

.page-account-v2 .account-facts dd {
    min-width: 0;
    overflow-wrap: anywhere;
}

.page-account-v2 .account-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.page-account-v2 .account-danger {
    border-color: rgba(255, 82, 99, 0.28);
    background:
        linear-gradient(135deg, rgba(255, 82, 99, 0.055), transparent 58%),
        var(--v2-panel);
}

.page-account-v2 .account-danger::before {
    background: linear-gradient(90deg, var(--v2-red), transparent 72%);
}

/* Legal documents, share links and state/error screens. */
.page-legal-v2 .legal-doc {
    position: relative;
    overflow: clip;
    padding: clamp(1.3rem, 4vw, 2.4rem);
    border-radius: 17px;
}

.page-legal-v2 .legal-doc::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(var(--v2-green), transparent 55%);
    content: "";
}

.page-legal-v2 .legal-doc .page-title {
    max-width: 720px;
    margin-bottom: 1.5rem;
}

.page-share-v2 .share-page {
    position: relative;
    max-width: 980px;
    margin: 1rem auto 0;
    overflow: hidden;
}

.page-share-v2 .share-page::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--v2-green), var(--v2-blue), transparent 82%);
    content: "";
}

.page-share-v2 .share-summary {
    color: var(--v2-muted);
    font-family: var(--font-mono);
}

.page-state-v2 .site-main {
    display: grid;
    min-height: min(62vh, 640px);
    place-items: center;
}

.page-state-v2 .state-panel,
.page-state-v2 .center-panel {
    position: relative;
    width: min(100%, 640px);
    margin: 1rem auto;
    padding: clamp(1.4rem, 5vw, 2.5rem);
    overflow: hidden;
}

.page-state-v2 .state-panel::before,
.page-state-v2 .center-panel::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--v2-green), transparent 72%);
    content: "";
}

.page-state-v2 .error-code {
    color: var(--v2-red);
    font-size: clamp(3rem, 10vw, 6rem);
    letter-spacing: -0.08em;
}

@media (max-width: 1040px) {
    .page-leaderboard-v2 .leaderboard-cases {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .page-dashboard-v2 .page-header {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .page-dashboard-v2 .page-header-meta {
        grid-row: auto;
        grid-column: 1;
        align-self: auto;
        padding: 0.8rem 0 0;
        border-top: 1px solid var(--v2-line);
        border-left: 0;
    }

    .page-dashboard-v2 .stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-account-v2 .account-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .page-account-v2 .account-facts {
        grid-template-columns: 1fr;
    }

    .page-dashboard-v2 .page-header {
        padding: 1.15rem;
        border-radius: 13px;
    }

    .page-dashboard-v2 .page-header::after {
        display: none;
    }

    .page-dashboard-v2 .page-header .page-title {
        font-size: clamp(1.9rem, 11vw, 2.75rem);
    }

    .page-dashboard-v2 .stat-tile {
        min-height: 100px;
    }

    .page-leaderboard-v2 .leaderboard-cases {
        grid-template-columns: 1fr;
    }

    .page-leaderboard-v2 .leaderboard-case-title {
        min-height: 0;
        padding-right: 0;
    }

    .page-form-v2 .narrow-panel {
        margin-top: 0.5rem;
    }
}

.page-home-v2 .container,
.page-incident-v2 .container {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    padding: 1rem clamp(1rem, 3vw, 2.5rem) 3.5rem;
}

/* Navigation */
.page-home-v2 .topnav-control,
.page-incident-v2 .topnav {
    position: sticky;
    top: 0.65rem;
    z-index: 100;
    min-height: 58px;
    margin: 0 0 1.25rem;
    padding: 0.65rem 0.85rem 0.65rem 1rem;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: rgba(22, 22, 22, 0.82);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    clip-path: none;
    backdrop-filter: blur(18px) saturate(1.25);
}

.page-home-v2 .topnav-control {
    left: auto;
    width: auto;
    background: rgba(22, 22, 22, 0.82);
    transform: none !important;
    opacity: 1;
    visibility: visible;
}

.page-home-v2 .topnav-brand,
.page-incident-v2 .topnav-brand {
    color: var(--v2-text);
    font-size: 1.05rem;
}

.page-home-v2 .topnav-links,
.page-incident-v2 .topnav-links {
    gap: 0.25rem;
}

.page-home-v2 .topnav-links a,
.page-home-v2 .topnav-links button,
.page-incident-v2 .topnav-links a,
.page-incident-v2 .topnav-links button {
    padding: 0.42rem 0.65rem;
    border-radius: 7px;
    color: var(--v2-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.page-home-v2 .topnav-links a:hover,
.page-home-v2 .topnav-links button:hover,
.page-incident-v2 .topnav-links a:hover,
.page-incident-v2 .topnav-links button:hover {
    background: rgba(255, 255, 255, 0.055);
    color: var(--v2-text);
}

/* Shared controls */
.page-home-v2 .btn,
.page-incident-v2 .btn {
    border-radius: 9px;
    transition: transform 180ms var(--v2-ease), border-color 180ms ease,
                background 180ms ease, box-shadow 180ms ease;
}

.page-home-v2 .btn:hover,
.page-incident-v2 .btn:hover {
    transform: translateY(-2px);
}

.page-home-v2 .btn-primary,
.page-home-v2 .btn-check,
.page-incident-v2 .btn-primary,
.page-incident-v2 .btn-check {
    border-color: var(--v2-green);
    background: var(--v2-green);
    box-shadow: 0 10px 30px rgba(46, 215, 92, 0.16);
    color: #061109;
    font-weight: 750;
}

.page-home-v2 .btn-primary:hover,
.page-home-v2 .btn-check:hover,
.page-incident-v2 .btn-primary:hover,
.page-incident-v2 .btn-check:hover {
    border-color: #a0ffad;
    background: #a0ffad;
    box-shadow: 0 14px 36px rgba(46, 215, 92, 0.24);
}

/* ============================================================
   Home
   ============================================================ */

.page-home-v2 .home-hero {
    display: grid;
    min-height: min(680px, calc(100vh - 110px));
    grid-template-columns: minmax(0, 0.94fr) minmax(520px, 1.06fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding: clamp(2.2rem, 6vh, 4.5rem) 0 clamp(2.5rem, 7vh, 5rem);
}

.page-home-v2 .hero-copy {
    min-width: 0;
    text-align: left;
}

.page-home-v2 .hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1.15rem;
    padding: 0.38rem 0.7rem;
    border: 1px solid rgba(120, 255, 139, 0.22);
    border-radius: 999px;
    background: rgba(120, 255, 139, 0.055);
    color: var(--v2-green);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
}

.page-home-v2 .hero-status > span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--v2-green);
    box-shadow: 0 0 0 0 rgba(120, 255, 139, 0.45);
    animation: v2-status-pulse 2.4s ease-out infinite;
}

@keyframes v2-status-pulse {
    55% { box-shadow: 0 0 0 0 rgba(120, 255, 139, 0.4); }
    100% { box-shadow: 0 0 0 0.5rem rgba(120, 255, 139, 0); }
}

.page-home-v2 .logo-hero {
    display: flex;
    align-items: center;
    max-width: 100%;
    margin: .55rem 0 1.4rem;
    overflow: visible;
    color: var(--v2-muted);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    letter-spacing: -0.055em;
    line-height: 1;
    text-align: left;
    opacity: 1;
    transform: none !important;
    filter: none !important;
}

.page-home-v2 .logo-hero::after {
    display: none;
}

.page-home-v2 .hero-headline {
    margin: 0 0 1rem;
    color: var(--v2-text);
    font-size: clamp(3.1rem, 6vw, 5.75rem);
    font-weight: 760;
    letter-spacing: -0.065em;
    line-height: 0.92;
}

.page-home-v2 .hero-headline em {
    color: var(--v2-green);
    font-style: normal;
}

.page-home-v2 .tagline {
    margin: 0 0 1rem;
    color: var(--v2-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-home-v2 .hero-pitch {
    max-width: 610px;
    margin: 0 0 1.45rem;
    color: #c4ccd5;
    font-size: clamp(1rem, 1.6vw, 1.14rem);
    line-height: 1.65;
}

.page-home-v2 .hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.15rem;
}

.page-home-v2 .hero-cta,
.page-home-v2 .hero-resume-cta {
    padding: 0.85rem 1.25rem;
    box-shadow: 0 12px 34px rgba(46, 215, 92, 0.2);
    font-size: 0.96rem;
}

.page-home-v2 .hero-secondary {
    color: var(--v2-muted);
    font-size: 0.87rem;
    text-underline-offset: 0.25rem;
}

.page-home-v2 .hero-secondary:hover {
    color: var(--v2-text);
}

.page-home-v2 .hero-note {
    max-width: 590px;
    margin: 0.75rem 0 0;
    color: #8c98a7;
    font-size: 0.76rem;
}

.page-home-v2 .hero-proof {
    display: flex;
    width: auto;
    max-width: 620px;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0;
    margin: 1.45rem 0 0;
    border: 0;
    background: transparent;
    list-style: none;
}

.page-home-v2 .hero-proof li {
    display: grid;
    grid-template-columns: auto;
    gap: 0.08rem;
    min-width: 112px;
    padding: 0 1rem;
    border-left: 1px solid var(--v2-line);
}

.page-home-v2 .hero-proof li:first-child {
    padding-left: 0;
    border-left: 0;
}

.page-home-v2 .hero-proof strong {
    color: var(--v2-text);
    font-size: 0.86rem;
}

.page-home-v2 .hero-proof span {
    color: var(--v2-muted);
    font-size: 0.68rem;
}

.page-home-v2 .user-bar {
    display: none;
}

/* Hero cockpit */
.page-home-v2 .hero-cockpit {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--v2-line-strong);
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 0, rgba(255, 82, 99, 0.09), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 30%),
        var(--v2-panel);
    box-shadow: 0 38px 90px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.page-home-v2 .hero-cockpit::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(120, 255, 139, 0.035) 48%, transparent 66%);
    background-size: 220% 100%;
    content: "";
    pointer-events: none;
    animation: v2-cockpit-scan 8s ease-in-out infinite;
}

@keyframes v2-cockpit-scan {
    0%, 68% { background-position: 160% 0; }
    100% { background-position: -60% 0; }
}

.page-home-v2 .cockpit-topline {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 44px;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--v2-line);
    color: var(--v2-muted);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
}

.page-home-v2 .cockpit-dots {
    display: flex;
    gap: 0.3rem;
}

.page-home-v2 .cockpit-dots i {
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 50%;
    background: #2c3641;
}

.page-home-v2 .cockpit-dots i:first-child { background: var(--v2-red); }
.page-home-v2 .cockpit-dots i:nth-child(2) { background: var(--v2-amber); }
.page-home-v2 .cockpit-dots i:last-child { background: var(--v2-green-deep); }

.page-home-v2 .cockpit-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--v2-red);
}

.page-home-v2 .cockpit-live i {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0.6rem currentColor;
}

.page-home-v2 .cockpit-signals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.75rem;
}

.page-home-v2 .cockpit-signal {
    position: relative;
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    overflow: hidden;
    padding: 0.65rem 0.7rem 0.72rem;
    border: 1px solid var(--v2-line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
}

.page-home-v2 .cockpit-signal span {
    overflow: hidden;
    color: var(--v2-muted);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.page-home-v2 .cockpit-signal strong {
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.page-home-v2 .cockpit-signal i {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    width: 28%;
    height: 14px;
    border-bottom: 1px solid var(--v2-green);
    opacity: 0.45;
    transform: skewY(-12deg);
}

.page-home-v2 .cockpit-signal.is-critical strong,
.page-home-v2 .cockpit-signal.is-critical i { color: var(--v2-red); border-color: var(--v2-red); }
.page-home-v2 .cockpit-signal.is-warning strong,
.page-home-v2 .cockpit-signal.is-warning i { color: var(--v2-amber); border-color: var(--v2-amber); }

.page-home-v2 .hero-cockpit .demo {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: 0 0.75rem;
}

.page-home-v2 .hero-cockpit .demo-terminal {
    border-color: var(--v2-line);
    border-radius: 10px;
    background: #0b0d0c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.page-home-v2 .hero-cockpit .demo-terminal-bar {
    padding: 0.45rem 0.65rem;
}

.page-home-v2 .hero-cockpit .demo-terminal-host {
    font-size: 0.68rem;
}

.page-home-v2 .hero-cockpit .demo-terminal-body {
    min-height: 244px;
    padding: 0.72rem 0.85rem 0.8rem;
    font-size: clamp(0.66rem, 0.85vw, 0.76rem);
    line-height: 1.52;
}

.page-home-v2 .hero-cockpit .how-it-works {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0.75rem;
    border-top: 0;
}

.page-home-v2 .hero-cockpit .how-it-works > .section-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.page-home-v2 .hero-cockpit .how-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: 0.45rem;
}

.page-home-v2 .hero-cockpit .how-step {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.15rem 0.5rem;
    padding: 0.55rem;
    border: 1px solid var(--v2-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    overflow-wrap: anywhere;
}

.page-home-v2 .hero-cockpit .how-step-badge {
    grid-row: 1 / 3;
    align-self: start;
    padding: 0.05rem 0.3rem;
    font-size: 0.55rem;
}

.page-home-v2 .hero-cockpit .how-step h3 {
    margin: 0;
    font-size: 0.69rem;
    line-height: 1.3;
}

.page-home-v2 .hero-cockpit .how-step p {
    color: var(--v2-muted);
    font-size: 0.58rem;
    line-height: 1.35;
}

/* Returning-player cockpit */
.page-home-v2 .hero-progress-cockpit {
    display: grid;
    min-height: 460px;
    grid-template-rows: auto 1fr auto auto;
    place-items: center;
    padding-bottom: 1.4rem;
}

.page-home-v2 .hero-progress-cockpit .cockpit-topline {
    width: 100%;
}

.page-home-v2 .hero-progress-cockpit .cockpit-live {
    color: var(--v2-green);
}

.page-home-v2 .hero-progress-orbit {
    position: relative;
    display: grid;
    width: 190px;
    margin: 1.6rem auto 1.2rem;
    aspect-ratio: 1;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--v2-green) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.065) 0);
    box-shadow: 0 0 52px rgba(120, 255, 139, 0.09);
}

.page-home-v2 .hero-progress-orbit::before {
    position: absolute;
    width: 164px;
    aspect-ratio: 1;
    border: 1px solid var(--v2-line);
    border-radius: 50%;
    background: var(--v2-panel);
    content: "";
}

.page-home-v2 .hero-progress-orbit > div {
    position: relative;
    z-index: 1;
    display: grid;
    text-align: center;
}

.page-home-v2 .hero-progress-orbit strong {
    font-family: var(--font-mono);
    font-size: 2rem;
}

.page-home-v2 .hero-progress-orbit span {
    color: var(--v2-muted);
    font-size: 0.72rem;
}

.page-home-v2 .hero-progress-stats {
    display: grid;
    width: min(410px, calc(100% - 2rem));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 1rem 1rem;
    border: 1px solid var(--v2-line);
    border-radius: 10px;
}

.page-home-v2 .hero-progress-stats > div {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
    padding: 0.65rem;
    text-align: center;
    overflow-wrap: anywhere;
}

.page-home-v2 .hero-progress-stats > div + div { border-left: 1px solid var(--v2-line); }
.page-home-v2 .hero-progress-stats dt { color: var(--v2-muted); font-size: 0.63rem; text-transform: uppercase; }
.page-home-v2 .hero-progress-stats dd { font-family: var(--font-mono); font-size: 1.05rem; }
.page-home-v2 .hero-progress-note {
    min-width: 0;
    max-width: min(420px, 100%);
    margin: 0;
    padding: 0 1.2rem;
    color: var(--v2-muted);
    font-size: 0.78rem;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Catalog */
.page-home-v2 .catalog-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 2rem;
    align-items: end;
    margin: 2.4rem 0 1rem;
    padding-top: 2.2rem;
    border-top: 1px solid var(--v2-line);
    scroll-margin-top: 6rem;
}

.page-home-v2 .catalog-intro > * {
    min-width: 0;
}

.page-home-v2 .catalog-kicker {
    margin-bottom: 0.45rem;
    color: var(--v2-green);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.page-home-v2 .catalog-intro h2 {
    color: var(--v2-text);
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.page-home-v2 .catalog-intro > p {
    color: var(--v2-muted);
    font-size: 0.9rem;
}

.page-home-v2 .catalog-controls {
    margin-bottom: 1.5rem;
}

.page-home-v2 .filters-toggle {
    border: 1px solid var(--v2-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.page-home-v2 .filters-toggle > summary {
    min-height: 46px;
    padding: 0.65rem 0.85rem;
    color: var(--v2-muted);
    font-size: 0.78rem;
}

.page-home-v2 .filters {
    padding: 0.75rem;
    border-top: 1px solid var(--v2-line);
}

.page-home-v2 .chip {
    border-color: var(--v2-line);
    border-radius: 999px;
    background: transparent;
    color: var(--v2-muted);
}

.page-home-v2 .chip:hover,
.page-home-v2 .chip.is-active {
    border-color: rgba(120, 255, 139, 0.42);
    background: rgba(120, 255, 139, 0.08);
    color: var(--v2-green);
}

.page-home-v2 .track-section {
    margin-bottom: 2.5rem;
}

.page-home-v2 .track-heading {
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid var(--v2-line);
}

.page-home-v2 .track-heading .section-title {
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}

.page-home-v2 .track-step {
    border-color: var(--v2-line-strong);
    background: transparent;
    color: var(--v2-muted);
}

.page-home-v2 .track-meta {
    color: #8c98a7;
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.page-home-v2 .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.page-home-v2 .track-section .card {
    position: relative;
    min-height: 274px;
    padding: 1.05rem 1.05rem 0;
    overflow: hidden;
    border: 1px solid var(--v2-line);
    border-radius: 12px;
    background-color: var(--v2-panel);
    background-image: linear-gradient(112deg, transparent 28%, rgba(255, 255, 255, 0.035) 48%, transparent 68%);
    background-position: 120% 0;
    background-size: 240% 100%;
    box-shadow: none;
    transition: transform 220ms var(--v2-ease), border-color 180ms ease,
                box-shadow 220ms ease, background-position 480ms var(--v2-ease);
}

.page-home-v2 .track-section .card::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    width: 3px;
    height: auto;
    background: #56616e;
}

.page-home-v2 .track-section .card::after {
    position: absolute;
    top: 0.68rem;
    right: 0.75rem;
    color: rgba(255, 255, 255, 0.035);
    content: "INC-" attr(data-case-id);
    font-family: var(--font-mono);
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.08em;
    pointer-events: none;
}

.page-home-v2 .track-section .card[data-severity="CRITICAL"]::before { background: var(--v2-red); }
.page-home-v2 .track-section .card[data-severity="HIGH"]::before { background: #ff895c; }
.page-home-v2 .track-section .card[data-severity="MEDIUM"]::before { background: var(--v2-amber); }
.page-home-v2 .track-section .card[data-severity="LOW"]::before { background: var(--v2-green-deep); }

@media (hover: hover) {
    .page-home-v2 .track-section a.card:hover {
        border-color: rgba(120, 255, 139, 0.32);
        background-position: -35% 0;
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
        transform: translateY(-4px);
    }
}

.page-home-v2 .card-header {
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding-right: 4.5rem;
}

.page-home-v2 .card-severity {
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    background: transparent;
    font-size: 0.62rem;
}

.page-home-v2 .card-time {
    margin-left: 0;
    color: var(--v2-muted);
    font-size: 0.68rem;
}

.page-home-v2 .card-weekly {
    order: 3;
    font-size: 0.58rem;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.page-home-v2 .card-title {
    position: relative;
    z-index: 1;
    max-width: 92%;
    margin-bottom: 0.5rem;
    color: var(--v2-text);
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.page-home-v2 .card-desc {
    position: relative;
    z-index: 1;
    color: var(--v2-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.page-home-v2 .card-tags {
    position: relative;
    z-index: 1;
    gap: 0.35rem;
}

.page-home-v2 .tag {
    padding: 0.13rem 0.48rem;
    border-color: var(--v2-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    color: #84909e;
    font-size: 0.66rem;
}

.page-home-v2 .card-footer {
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    min-height: 45px;
    margin: 0.85rem -1.05rem 0;
    padding: 0.65rem 1.05rem;
    border-top-color: var(--v2-line);
    background: rgba(0, 0, 0, 0.16);
}

.page-home-v2 .card-footer > * { min-width: 0; }
.page-home-v2 .card-action {
    overflow-wrap: anywhere;
    color: var(--v2-green);
    font-size: 0.72rem;
}
.page-home-v2 .card-state { font-size: 0.7rem; }
.page-home-v2 .card-best { border-color: var(--v2-line); background: rgba(120, 255, 139, 0.035); }
.page-home-v2 .teaser-card { border-style: solid; opacity: 0.58; filter: grayscale(0.3); }

/* Supporting home panels */
.page-home-v2 .weekly-banner,
.page-home-v2 .progress-panel,
.page-home-v2 .first-case-callout {
    border-color: var(--v2-line-strong);
    border-radius: 14px;
    background: var(--v2-panel);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.page-home-v2 .progress-panel { padding: 1.15rem; }
.page-home-v2 .progress-header { flex-wrap: wrap; }
.page-home-v2 .progress-header > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.page-home-v2 .roadmap-head { flex-wrap: wrap; }
.page-home-v2 .roadmap {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.page-home-v2 .roadmap-title {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.page-home-v2 .progress-track { height: 7px; border-color: var(--v2-line); background: #171e26; }
.page-home-v2 .progress-fill { background: var(--v2-green); box-shadow: 0 0 1rem rgba(120, 255, 139, 0.24); }
.page-home-v2 .roadmap-stage { border-color: var(--v2-line); background: rgba(255, 255, 255, 0.02); }
.page-home-v2 .roadmap-node { border-color: var(--v2-line-strong); }
.page-home-v2 .node-solved { background: rgba(120, 255, 139, 0.1); color: var(--v2-green); }

.page-home-v2 .faq {
    max-width: 900px;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--v2-line);
}

.page-home-v2 .faq > .section-title {
    font-size: 1.6rem;
}

.page-home-v2 .faq-item {
    border-color: var(--v2-line);
}

.page-home-v2 .faq-item summary {
    color: #cbd2da;
}

.page-home-v2 .site-footer,
.page-incident-v2 .site-footer {
    border-top-color: var(--v2-line);
    color: #66717e;
}

/* ============================================================
   Admin control center
   ============================================================ */

.page-admin-v2 .container {
    max-width: 1480px;
}

.page-admin-v2 .admin-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    gap: 1.25rem 2rem;
    align-items: center;
    margin: 1rem 0 1.25rem;
    padding: clamp(1.15rem, 2.5vw, 1.6rem);
    border: 1px solid var(--v2-line-strong);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 38%),
        var(--v2-panel);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.page-admin-v2 .admin-head-copy {
    min-width: 0;
}

.page-admin-v2 .admin-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    color: var(--v2-green);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-admin-v2 .admin-eyebrow > span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0.7rem currentColor;
}

.page-admin-v2 .admin-head .page-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.page-admin-v2 .admin-head-note {
    margin-top: 0.45rem;
    color: var(--v2-muted);
    font-size: 0.9rem;
}

.page-admin-v2 .admin-site {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem 1rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid var(--v2-line);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.16);
}

.page-admin-v2 .admin-site-status {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.55rem;
    color: #c7cbc6;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.35;
}

.page-admin-v2 .admin-site-status::before {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--v2-green);
    box-shadow: 0 0 0 0 rgba(120, 255, 139, 0.42);
    color: transparent;
    content: "";
    animation: v2-status-pulse 2.4s ease-out infinite;
}

.page-admin-v2 .admin-site-closed {
    border-color: rgba(255, 82, 99, 0.34);
    background: rgba(255, 82, 99, 0.045);
}

.page-admin-v2 .admin-site-closed .admin-site-status::before {
    background: var(--v2-red);
    box-shadow: 0 0 0.7rem rgba(255, 82, 99, 0.42);
    animation: none;
}

.page-admin-v2 .admin-site .btn {
    min-height: 38px;
    white-space: nowrap;
}

.page-admin-v2 .admin-stats {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    margin-bottom: 0.65rem;
}

.page-admin-v2 .admin-stats .stat-tile:nth-child(2)::before { background: linear-gradient(90deg, var(--v2-blue), transparent 75%); }
.page-admin-v2 .admin-stats .stat-tile:nth-child(3)::before { background: linear-gradient(90deg, var(--v2-amber), transparent 75%); }
.page-admin-v2 .admin-stats .stat-tile:nth-child(4)::before { background: linear-gradient(90deg, #b68cff, transparent 75%); }
.page-admin-v2 .admin-stats .stat-tile:nth-child(5)::before { background: linear-gradient(90deg, var(--v2-red), transparent 75%); }

.page-admin-v2 .admin-stats .stat-value {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.page-admin-v2 .admin-footnote {
    margin: 0.35rem 0 1.25rem;
    color: #969c9d;
    font-size: 0.78rem;
}

.page-admin-v2 .admin-panel {
    position: relative;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.page-admin-v2 .admin-panel::after {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    content: "";
    pointer-events: none;
}

.page-admin-v2 .admin-panel-head {
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    margin-bottom: 1rem;
}

.page-admin-v2 .admin-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.page-admin-v2 .admin-panel-head .muted {
    max-width: 840px;
    color: var(--v2-muted);
    font-size: 0.78rem;
}

.page-admin-v2 .admin-chart {
    height: 260px;
    padding: 0.75rem 0.5rem 0;
    border: 1px solid var(--v2-line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.14);
}

.page-admin-v2 .admin-section > summary {
    min-height: 48px;
    margin: -0.2rem;
    padding: 0.2rem;
    border-radius: 8px;
}

.page-admin-v2 .admin-section > summary::before {
    display: grid;
    width: 1.55rem;
    height: 1.55rem;
    order: 3;
    margin-left: auto;
    place-items: center;
    border: 1px solid var(--v2-line-strong);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--v2-muted);
    content: "+";
    font-family: var(--font-mono);
}

.page-admin-v2 .admin-section[open] > summary::before {
    border-color: rgba(120, 255, 139, 0.3);
    color: var(--v2-green);
    content: "−";
}

.page-admin-v2 .admin-more {
    margin-top: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--v2-line);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.1);
}

.page-admin-v2 .admin-more summary {
    min-height: 32px;
    margin: 0;
    color: #a9a8a3;
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.page-admin-v2 .admin-more[open] summary {
    margin-bottom: 0.65rem;
}

.page-admin-v2 .admin-visits {
    gap: 1rem;
}

.page-admin-v2 .admin-visits caption {
    padding: 0.65rem 0.75rem;
    color: #d4d3ce;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

@media (max-width: 1060px) {
    .page-admin-v2 .admin-stats {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 900px) {
    .page-admin-v2 .admin-head {
        grid-template-columns: 1fr;
    }

    .page-admin-v2 .admin-site {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .page-admin-v2 .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-admin-v2 .admin-stats .stat-tile:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .page-admin-v2 .admin-head,
    .page-admin-v2 .admin-panel {
        padding: 1rem;
    }

    .page-admin-v2 .admin-site {
        grid-template-columns: 1fr;
    }

    .page-admin-v2 .admin-site .btn {
        width: 100%;
    }

    .page-admin-v2 .admin-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ============================================================
   Incident workspace
   ============================================================ */

.page-incident-v2 .scenario-header {
    position: static;
    top: auto;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-color: var(--v2-line-strong);
    border-radius: 12px;
    background: rgba(9, 13, 18, 0.88);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px) saturate(1.2);
}

.page-incident-v2 .scenario-eyebrow {
    color: var(--v2-muted);
    font-size: 0.62rem;
}

.page-incident-v2 .scenario-title {
    color: var(--v2-text);
    font-size: clamp(1.25rem, 2.3vw, 1.75rem);
}

.page-incident-v2 .incident-state {
    color: var(--v2-green);
}

.page-incident-v2 .incident-state > span:first-child {
    background: currentColor;
    box-shadow: 0 0 0.65rem currentColor;
}

.page-incident-v2 .scenario-timer {
    padding: 0.38rem 0.7rem;
    border-color: var(--v2-line-strong);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--v2-green);
    font-size: 1.05rem;
}

.page-incident-v2 .incident-intro {
    position: relative;
    max-width: 1100px;
    padding: clamp(1.2rem, 3vw, 2rem);
    border-color: rgba(255, 82, 99, 0.34);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 82, 99, 0.1), transparent 38%),
        var(--v2-panel);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.page-incident-v2 .incident-intro::before {
    position: absolute;
    top: 1.2rem;
    bottom: 1.2rem;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--v2-red);
    content: "";
}

.page-incident-v2 .intro-pager { color: var(--v2-red); }
.page-incident-v2 .intro-block { border-color: var(--v2-line); background: rgba(255, 255, 255, 0.02); }
.page-incident-v2 .intro-block h3 { color: var(--v2-muted); }
.page-incident-v2 .incident-intro .intro-launch {
    min-width: 0;
    margin: 0 0 1.5rem;
    padding: 1rem;
    border: 1px solid var(--v2-line);
    border-radius: 12px;
    background: var(--v2-panel-2);
}

.page-incident-v2 #start-btn:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    max-width: 100%;
}

.page-incident-v2 #start-btn > span {
    min-width: 0;
}

.page-incident-v2 .button-icon {
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-incident-v2 .incident-intro > .intro-note { margin-bottom: 1.25rem; }

.page-incident-v2 .intro-actions > .intro-note {
    flex: 1 1 18rem;
    min-width: 0;
}

@media (max-width: 768px) {
    .page-incident-v2 .incident-intro .intro-launch {
        margin: 1rem 0 0;
    }
}

.page-incident-v2 .scenario-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 1rem;
}

.page-incident-v2 .scenario-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.page-incident-v2 .scenario-main > * {
    min-width: 0;
}

.page-incident-v2 .scenario-side .metrics-panel {
    padding: 1rem;
    border-color: var(--v2-line);
    border-radius: 11px;
    background: var(--v2-panel);
}

.page-incident-v2 .metrics-heading {
    margin-bottom: 0.55rem;
}

.page-incident-v2 .metrics-heading .section-title {
    color: #cbd2da;
    font-size: 0.85rem;
}

.page-incident-v2 .metrics-refresh {
    color: #8c98a7;
    font-size: 0.66rem;
}

.page-incident-v2 .scenario-side .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.page-incident-v2 .scenario-side .metric-card {
    height: 120px;
    padding: 0.75rem;
    border-color: var(--v2-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
    transition: border-color 180ms ease, background 180ms ease;
}

.page-incident-v2 .scenario-side .metric-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.page-incident-v2 .metric-header { align-items: flex-start; min-height: 1.7rem; gap: 0.5rem; }
.page-incident-v2 .metric-title { color: #9aa5b2; font-size: 0.62rem; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.page-incident-v2 .metric-value { color: #d8dee5; font-size: 0.9rem; }
.page-incident-v2 .metric-card.status-ok { border-left-color: var(--v2-green); }
.page-incident-v2 .metric-card.status-warn { border-left-color: var(--v2-amber); background: rgba(242, 189, 85, 0.035); }
.page-incident-v2 .metric-card.status-critical { border-left-color: var(--v2-red); background: rgba(255, 82, 99, 0.045); }

.page-incident-v2 .metric-alert {
    border-radius: 8px;
    background: rgba(255, 82, 99, 0.045);
    animation: v2-alert-in 360ms var(--v2-ease) both;
}

@keyframes v2-alert-in {
    from { opacity: 0; transform: translateY(-6px); }
}

.page-incident-v2 .terminal-panel {
    padding-bottom: 1rem;
    border-color: var(--v2-line-strong);
    border-radius: 12px;
    background: #05080b;
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.32);
    transition: border-color 180ms ease, box-shadow 220ms ease;
}

.page-incident-v2 .terminal-panel:focus-within {
    border-color: rgba(120, 255, 139, 0.42);
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(120, 255, 139, 0.055);
}

.page-incident-v2 .terminal-toolbar {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom-color: var(--v2-line);
    background: #0d1319;
}

.page-incident-v2 .terminal-live-dot { background: var(--v2-green); }
.page-incident-v2 .tool-btn { border-color: var(--v2-line); background: #151c24; color: #b5bec8; }
.page-incident-v2 .tool-btn:hover { border-color: rgba(120, 255, 139, 0.36); color: var(--v2-text); }
.page-incident-v2 .terminal-xterm { background: #05080b; }

.page-incident-v2 .terminal-panel > :is(.actions, .run-stats, .check-feedback, .stuck-nudge) {
    margin: 0.75rem 1rem 0;
}

.page-incident-v2 .terminal-panel > .actions {
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.page-incident-v2 .terminal-panel > .actions .btn {
    min-height: 44px;
}

.page-incident-v2 .terminal-panel > .run-stats:empty { display: none; }
.page-incident-v2 .terminal-panel > .phone-keys { margin: 0.75rem 1rem; }
.page-incident-v2 .terminal-panel > .phone-keys-note { margin: 0 1rem 0.75rem; }
.page-incident-v2 .shortcut-note { line-height: 1.5; }
.page-incident-v2 .scenario-main > .guest-note { margin: 0; padding: 0 0.25rem; }

.page-incident-v2 .scenario-side {
    gap: 1rem;
}

.page-incident-v2 .scenario-side .guide-panel,
.page-incident-v2 .scenario-side .hints-panel,
.page-incident-v2 .scenario-side .timeline-panel,
.page-incident-v2 .scenario-side .briefing,
.page-incident-v2 .workspace-drawer {
    border-color: var(--v2-line);
    border-radius: 11px;
    background: var(--v2-panel);
}

.page-incident-v2 .scenario-side .section-title {
    color: #cbd2da;
    font-size: 0.9rem;
}

.page-incident-v2 .scenario-side :is(.guide-panel, .hints-panel, .timeline-panel, .briefing) {
    padding: 1rem;
}

.page-incident-v2 .hint-item,
.page-incident-v2 .guide-step details {
    border-color: var(--v2-line);
    background: rgba(255, 255, 255, 0.02);
}

.page-incident-v2 .hints-score strong { color: var(--v2-green); }
.page-incident-v2 .timeline-item { border-color: var(--v2-line); }

.page-incident-v2 .debrief {
    border-color: rgba(120, 255, 139, 0.22);
    border-radius: 14px;
    background: var(--v2-panel);
}

/* Result dialog */
.page-incident-v2 .result-screen::backdrop {
    background: rgba(2, 4, 7, 0.84);
    backdrop-filter: blur(10px);
}

.page-incident-v2 .result-card {
    padding: 1.75rem;
    border-color: rgba(120, 255, 139, 0.32);
    border-radius: 18px;
    background:
        radial-gradient(circle at 0 0, rgba(120, 255, 139, 0.1), transparent 38%),
        var(--v2-panel);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.48);
    animation: v2-result-in 260ms var(--v2-ease) both;
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
}

@keyframes v2-result-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
}

.page-incident-v2 .result-badge { background: var(--v2-green); box-shadow: 0 0 2rem rgba(120, 255, 139, 0.28); }
.page-incident-v2 .result-kicker { color: var(--v2-green); }
.page-incident-v2 .result-stat,
.page-incident-v2 .result-summary { border-color: var(--v2-line); background: rgba(0, 0, 0, 0.18); }
.page-incident-v2 .result-summary-grid span { color: var(--v2-green); }

.page-incident-v2 .result-primary-actions { gap: 0.75rem; margin: 1.25rem 0 0; }
.page-incident-v2 .result-tool-actions { gap: 0.75rem; margin: 1rem 0 0; padding-top: 1rem; }

/* Motion system */
.motion-ready .page-home-v2 [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
}

.motion-ready .page-home-v2 [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: opacity 560ms var(--v2-ease) var(--reveal-delay, 0ms),
                transform 560ms var(--v2-ease) var(--reveal-delay, 0ms);
}

.motion-ready .page-home-v2 .track-section[data-reveal] .card {
    opacity: 0;
    transform: translateY(12px);
}

.motion-ready .page-home-v2 .track-section[data-reveal].is-revealed .card {
    opacity: 1;
    transform: none;
    transition: opacity 420ms var(--v2-ease), transform 420ms var(--v2-ease),
                border-color 180ms ease, box-shadow 220ms ease, background-position 480ms var(--v2-ease);
}

.motion-ready .page-home-v2 .track-section.is-revealed .card:nth-child(2) { transition-delay: 55ms; }
.motion-ready .page-home-v2 .track-section.is-revealed .card:nth-child(3) { transition-delay: 110ms; }
.motion-ready .page-home-v2 .track-section.is-revealed .card:nth-child(4) { transition-delay: 165ms; }
.motion-ready .page-home-v2 .track-section.is-revealed .card:nth-child(5) { transition-delay: 220ms; }
.motion-ready .page-home-v2 .track-section.is-revealed .card:nth-child(6) { transition-delay: 275ms; }

/* Responsive */
@media (max-width: 1080px) {
    .page-home-v2 .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-incident-v2 .scenario-layout {
        grid-template-columns: 1fr;
    }

    .page-incident-v2 .scenario-layout > .scenario-main,
    .page-incident-v2 .scenario-layout > .scenario-side {
        grid-column: 1;
    }

    .page-incident-v2 .scenario-layout > .scenario-main { grid-row: 1; }
    .page-incident-v2 .scenario-layout > .scenario-side {
        grid-row: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-incident-v2 .scenario-side .briefing { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
    .page-home-v2 .home-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 2.5rem;
    }

    .page-home-v2 .hero-copy {
        max-width: 760px;
    }

    .page-home-v2 .hero-cockpit {
        width: 100%;
        max-width: 820px;
    }
}

@media (max-width: 720px) {
    .page-home-v2 .container,
    .page-incident-v2 .container {
        padding: 0.65rem 0.8rem 2.5rem;
    }

    .page-home-v2 .topnav-control,
    .page-incident-v2 .topnav {
        top: 0.35rem;
        min-height: 52px;
        margin-bottom: 0.8rem;
        padding: 0.5rem 0.65rem;
        border-radius: 11px;
    }

    .page-home-v2 .topnav-links,
    .page-incident-v2 .topnav-links {
        gap: 0;
    }

    .page-home-v2 .topnav-links a,
    .page-home-v2 .topnav-links button,
    .page-incident-v2 .topnav-links a,
    .page-incident-v2 .topnav-links button {
        padding: 0.35rem 0.42rem;
        font-size: 0.72rem;
    }

    .page-home-v2 .home-hero {
        gap: 1.4rem;
        padding: 2rem 0 2.5rem;
    }

    .page-home-v2 .hero-headline {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .page-home-v2 .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .page-home-v2 .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .page-home-v2 .hero-secondary { text-align: center; }

    .page-home-v2 .hero-proof {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem 0;
    }

    .page-home-v2 .hero-proof li:nth-child(3) { border-left: 0; padding-left: 0; }

    .page-home-v2 .cockpit-signals {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr));
    }

    .page-home-v2 .cockpit-signal span {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .page-home-v2 .hero-cockpit .demo-terminal-body { min-height: 0; font-size: 0.61rem; white-space: pre-wrap; }
    .page-home-v2 .hero-cockpit .how-steps { grid-template-columns: 1fr; }
    .page-home-v2 .hero-cockpit .how-step p { display: none; }

    .page-home-v2 .catalog-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem;
    }

    .page-home-v2 .catalog-intro h2 {
        font-size: clamp(1.25rem, 7vw, 2.25rem);
    }

    .page-home-v2 .cards { grid-template-columns: 1fr; }
    .page-home-v2 .track-section .card { min-height: 238px; }

    .page-incident-v2 .scenario-header {
        position: static;
        padding: 0.7rem;
    }

    .page-incident-v2 .scenario-layout > .scenario-side {
        grid-template-columns: 1fr;
    }

    .page-incident-v2 .scenario-side .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .page-incident-v2 .terminal-panel > .actions { align-items: stretch; }
    .page-incident-v2 .scenario-side :is(.guide-panel, .hints-panel, .timeline-panel, .briefing) { padding: 1rem; }

    .page-incident-v2 .result-card {
        padding: 1.25rem;
        max-height: calc(100vh - 1.3rem);
        max-height: calc(100dvh - 1.3rem);
    }
}

@media (max-width: 390px) {
    .page-home-v2 .hero-headline { font-size: 2.8rem; }
    .page-home-v2 .cockpit-topline { grid-template-columns: auto 1fr; }
    .page-home-v2 .cockpit-live { display: none; }
    .page-home-v2 .hero-proof li { min-width: 0; padding-right: 0.5rem; }
    .page-home-v2 .card-header { padding-right: 3.7rem; }
}

@media (prefers-reduced-motion: reduce) {
    .page-home-v2 .hero-status > span,
    .page-home-v2 .hero-cockpit::after,
    .page-incident-v2 .metric-alert,
    .page-incident-v2 .result-card {
        animation: none !important;
    }

    .motion-ready .page-home-v2 [data-reveal],
    .motion-ready .page-home-v2 .track-section[data-reveal] .card {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .site-v2:not(.page-home-v2):not(.page-incident-v2) .site-main,
    .site-v2 .admin-site-status::before {
        animation: none !important;
    }

    .site-v2 .btn,
    .site-v2 .stat-tile,
    .site-v2 .achievement-card,
    .site-v2 .leaderboard-case {
        transition: none !important;
    }
}

@media (max-width: 720px) {
    .site-v2 .topnav-brand {
        font-size: clamp(0.75rem, 8vw, 1.05rem);
    }

    .page-home-v2 .logo-hero {
        font-size: clamp(0.7rem, 7vw, 1.3rem);
    }

    .page-home-v2 .home-hero > * {
        min-width: 0;
    }

    .site-v2 .btn {
        max-width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .site-v2:not(.page-home-v2):not(.page-incident-v2) .container {
        padding: 0.65rem 0.8rem 2.5rem;
    }

    .site-v2:not(.page-home-v2):not(.page-incident-v2) .topnav {
        top: 0.35rem;
        min-height: 52px;
        margin-bottom: 1rem;
        padding: 0.5rem 0.65rem;
        border-radius: 11px;
    }

    .site-v2 .topnav {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .site-v2 .topnav-brand {
        min-width: 0;
        flex: 1 1 100%;
    }

    .site-v2 .topnav-links {
        width: 100%;
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        overflow: visible;
    }

    .site-v2 .topnav-links a,
    .site-v2 .topnav-links button {
        min-width: 0;
        flex: 0 1 auto;
        min-height: 44px;
        padding: 0.42rem 0.55rem;
        overflow-wrap: anywhere;
    }

    .site-v2 .topnav-links .vk-link,
    .site-v2 .topnav-links .tiktok-link {
        min-width: 44px;
        padding: 0;
    }

    .site-v2 :is(input, textarea, select) {
        /* iOS zooms the viewport when a focused form control is below 16px. */
        font-size: 1rem;
    }

    .site-v2 .page-title {
        font-size: clamp(1.75rem, 9vw, 2.35rem);
    }

    .site-v2 .panel,
    .site-v2 .share-page {
        padding: 1rem;
        border-radius: 12px;
    }

    .site-v2 .stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-v2 .stat-tile {
        min-width: 0;
        padding: 0.9rem;
    }

    .site-v2 .stat-value {
        font-size: 1.55rem;
    }

    .site-v2 .leaderboard-list li {
        grid-template-columns: 1.3rem minmax(0, 1fr) auto auto;
        gap: 0.4rem;
    }

    .site-v2 .leaderboard-score {
        display: inline;
    }

    .site-v2 .profile-best li {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .site-v2 .profile-best .leaderboard-name {
        overflow-wrap: anywhere;
    }

    .site-v2 .legal-doc {
        line-height: 1.65;
    }

    .site-v2 .cookie-banner,
    .site-v2 .cookie-banner > *,
    .site-v2 .cookie-banner-actions {
        min-width: 0;
        max-width: 100%;
    }

    .site-v2 .cookie-banner-actions {
        width: 100%;
    }

    .site-v2 .cookie-banner .btn {
        flex: 1 1 0;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .page-home-v2 .hero-copy,
    .page-home-v2 .hero-pitch,
    .page-legal-v2 .legal-doc,
    .page-legal-v2 .legal-doc :is(p, li, a) {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .page-form-v2 .form-field > span,
    .page-form-v2 .form-check > span,
    .page-form-v2 .form-stack > .btn {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .page-form-v2 .form-check > span {
        flex: 1 1 auto;
    }
}

/* A separate utility control, usable with keyboard and without JavaScript. */
.site-v2 .learning-nav-badge { display: inline-flex; justify-content: center; align-items: center; min-width: 20px; height: 18px; margin-left: .35rem; padding: 0 .25rem; border: 1px solid #78b7ff33; border-radius: 5px; color: var(--v2-blue); background: #78b7ff0a; font: .6rem/1 monospace; }
.site-v2 .topnav { column-gap: 1rem; }
.site-v2 .topnav-links { margin-left: auto; }
.site-v2 .language-switch { position: relative; flex: none; margin-left: .25rem; }
.site-v2 .language-switch summary {
    display: flex; align-items: center; gap: .5rem; min-height: 40px;
    padding: .45rem .65rem; border: 1px solid var(--v2-line-strong); border-radius: 9px;
    color: var(--v2-text); background: var(--v2-panel-2); cursor: pointer; list-style: none;
    font: 500 .75rem/1.2 var(--font-mono, monospace);
}
.site-v2 .language-switch summary::-webkit-details-marker { display: none; }
.site-v2 .language-globe { width: 17px; height: 17px; color: var(--v2-muted); }
.site-v2 .language-chevron { width: 12px; height: 12px; color: var(--v2-muted); }
.site-v2 .language-switch[open] summary { border-color: var(--v2-green); }
.site-v2 .language-switch[open] .language-chevron { transform: rotate(180deg); }
.site-v2 .language-options {
    position: absolute; top: calc(100% + 8px); right: 0; width: 172px; padding: 5px;
    border: 1px solid var(--v2-line-strong); border-radius: 11px;
    background: var(--v2-panel); box-shadow: 0 12px 35px #0006; z-index: 110;
}
.site-v2 .language-options a {
    display: flex; align-items: center; justify-content: space-between; min-height: 44px;
    padding: .55rem .75rem; border-radius: 7px; color: var(--v2-text); font-size: .875rem; text-decoration: none;
}
.site-v2 .language-options a:hover { background: var(--v2-panel-3); }
.site-v2 .language-options a[aria-current="true"] { color: var(--v2-green); background: #78ff8b0d; }
.site-v2 .language-switch :is(a, summary):focus-visible { outline: 2px solid var(--v2-green); outline-offset: 3px; }
@media (max-width: 1100px) {
    .site-v2 .topnav { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; }
    .site-v2 .topnav-brand { grid-column: 1; grid-row: 1; width: auto; min-width: 0; }
    .site-v2 .language-switch { grid-column: 2; grid-row: 1; margin: 0; }
    .site-v2 .topnav-links { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; }
    .site-v2 .language-switch summary { min-height: 44px; }
    .holiday-menu-ready .holiday-mode .topnav { grid-template-columns: minmax(0,1fr) auto auto; }
    .holiday-menu-ready .holiday-mode .holiday-menu-toggle { grid-column: 2; grid-row: 1; }
    .holiday-menu-ready .holiday-mode .language-switch { grid-column: 3; }
}
.site-v2 #case-library { scroll-margin-top: var(--site-nav-clearance,200px); }

/* Release markers share the same small footprint in navigation and cards. */
.new-case-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: .12rem .38rem;
    border: 1px solid rgba(120, 255, 139, .24);
    border-radius: 5px;
    color: var(--v2-green, var(--accent));
    background: rgba(120, 255, 139, .065);
    font: 600 .58rem/1.35 var(--font-mono);
    letter-spacing: .025em;
    text-transform: uppercase;
    white-space: nowrap;
}
.nav-new-badge {
    margin: 0;
    padding: .08rem .2rem;
    border: 0;
    font-size: .5rem;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
}

.page-incident-v2 .terminal-panel:not(:fullscreen) .terminal-xterm {
    height: clamp(340px, calc(100dvh - 420px), 620px);
}
.page-incident-v2 .workspace-drawer { border: 1px solid var(--v2-line); }
.page-incident-v2 .workspace-drawer > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 1rem;
    color: var(--v2-text);
    font-size: .85rem;
    cursor: pointer;
}
.page-incident-v2 .workspace-drawer > summary small { color: var(--v2-muted); font-size: .7rem; }
.page-incident-v2 .workspace-drawer[open] > summary { border-bottom: 1px solid var(--v2-line); }
.page-incident-v2 .workspace-drawer > :is(.hints-panel, .timeline-panel) { height: auto; border: 0; background: transparent; }
.page-incident-v2 .workspace-drawer .hints-heading h2,
.page-incident-v2 .workspace-drawer .timeline-panel > h2 { display: none; }

/* One spacing scale for navigation links and utility buttons. */
.site-v2 .topnav { --nav-gap: .25rem; --nav-item-height: 36px; column-gap: var(--nav-gap); }
.site-v2 .topnav .topnav-links { column-gap: var(--nav-gap); row-gap: var(--nav-gap); }
.site-v2 .topnav .topnav-links > :is(a, button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: var(--nav-item-height);
    padding: .35rem .5rem;
    line-height: 1.25;
}
.site-v2 .topnav .language-switch { margin-left: 0; }
.site-v2 .topnav .language-switch summary { min-height: var(--nav-item-height); padding: .35rem .6rem; gap: .35rem; }
.site-v2 .topnav .topnav-links > :is(.vk-link, .tiktok-link) { min-width: var(--nav-item-height); padding: .35rem; }
.site-v2 .topnav .topnav-links > .topnav-cases { gap: .2rem; }
.page-incident-v2 .workspace-drawer > summary span::before { content: '▸'; color: var(--v2-green); margin-right: .5rem; }
.page-incident-v2 .workspace-drawer[open] > summary span::before { content: '▾'; }
@media (max-width: 1100px) { .site-v2 .topnav { --nav-item-height: 44px; } }
