:root {
    /* Mesura local tokens (used by hand-rolled CSS) */
    --bg: #0b0d12;
    --fg: #e7eaf0;
    --muted: #8a93a6;
    --accent: #6ee7b7;
    --border: rgba(255, 255, 255, 0.08);
    --card: #11141b;
    color-scheme: dark;

    /* tan-compose-kit theme tokens (inherited into Shadow DOM) */
    --tc-color-bg: #0b0d12;
    --tc-color-accent: #6ee7b7;
    --tc-color-accent-hover: #5dd6a7;
    --tc-color-accent-soft: rgba(110, 231, 183, 0.12);
    --tc-color-ink: #e7eaf0;
    --tc-color-ink-soft: #c5cad6;
    --tc-color-ink-muted: #8a93a6;
    --tc-color-surface: #11141b;
    --tc-color-surface-alt: #0b0d12;
    --tc-color-rule: rgba(255, 255, 255, 0.08);
    --tc-color-rule-strong: rgba(255, 255, 255, 0.16);
    --tc-color-info: #38bdf8;
    --tc-color-info-bg: rgba(56, 189, 248, 0.1);
    --tc-color-info-fg: #7dd3fc;
    --tc-color-success: #6ee7b7;
    --tc-color-success-bg: rgba(110, 231, 183, 0.1);
    --tc-color-success-fg: #6ee7b7;
    --tc-color-warning: #fbbf24;
    --tc-color-warning-bg: rgba(251, 191, 36, 0.1);
    --tc-color-warning-fg: #fcd34d;
    --tc-color-danger: #fca5a5;
    --tc-color-danger-bg: rgba(239, 68, 68, 0.1);
    --tc-color-danger-fg: #fca5a5;
    --tc-radius-sm: 6px;
    --tc-radius-md: 10px;
    --tc-radius-lg: 14px;
    --tc-radius-pill: 999px;
    --tc-font-sans:
        ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --tc-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    --tc-focus-ring: 0 0 0 3px rgba(110, 231, 183, 0.35);
    --tc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --tc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --tc-shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    --tc-input-border: rgba(255, 255, 255, 0.08);
    --tc-table-row-hover: rgba(255, 255, 255, 0.03);
    --tc-space-1: 0.25rem;
    --tc-space-2: 0.5rem;
    --tc-space-3: 0.75rem;
    --tc-space-4: 1rem;
    --tc-space-5: 1.25rem;
    --tc-space-6: 1.5rem;
    --tc-space-7: 2rem;
    --tc-space-8: 2.5rem;

    /* tc-button dark-theme overrides */
    --tc-btn-primary-bg: var(--accent);
    --tc-btn-primary-fg: #06140d;
    --tc-btn-secondary-bg: transparent;
    --tc-btn-secondary-fg: var(--fg);
    --tc-btn-secondary-border: var(--border);
    --tc-btn-ghost-fg: var(--fg);
    --tc-btn-ghost-border: var(--border);
    --tc-btn-danger-bg: #ef4444;
    --tc-btn-danger-fg: #ffffff;
    --tc-btn-radius: 10px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        sans-serif;
    line-height: 1.55;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.92em;
}

/* Public marketing header — sticky, gutter-aligned, with backdrop blur.
 * Lifts a flat default nav into a primary navigation surface that holds
 * its own against the redesigned hero. */
.m-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 18, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition:
        border-color 180ms ease-out,
        background-color 180ms ease-out,
        box-shadow 180ms ease-out;
}
.m-header--scrolled {
    background: rgba(11, 13, 18, 0.88);
    border-bottom-color: var(--border);
    box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}
.m-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

/* Brand wordmark — bigger presence, glowing dot, version chip */
.m-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: -0.005em;
}
.m-brand:hover {
    text-decoration: none;
    color: var(--fg);
}
.m-brand__word {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}
.m-brand--lg .m-brand__word {
    font-size: 1.2rem;
}
.m-brand__chip {
    margin-left: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(110, 231, 183, 0.08);
    border: 1px solid rgba(110, 231, 183, 0.22);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    line-height: 1;
}

/* Center nav — quiet links until you hover or focus */
.m-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}
.m-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.5rem 0.9rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 8px;
    transition:
        color 140ms ease-out,
        background-color 140ms ease-out;
}
.m-nav a:hover,
.m-nav a:focus-visible {
    color: var(--fg);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}
.m-nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.m-nav__status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: m-hero-pulse 2.4s
        var(--hero-ease, cubic-bezier(0.23, 1, 0.32, 1)) infinite;
}

/* Right-side CTA wrapper */
.m-header__cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end;
}

/* Small variant of the .m-btn introduced for the hero */
.m-btn--sm {
    height: 38px;
    padding: 0 0.9rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Mobile menu button + drawer */
.m-header__menu {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.45rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 140ms ease-out;
}
.m-header__menu:hover {
    background: rgba(255, 255, 255, 0.04);
}
.m-header__drawer {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(11, 13, 18, 0.95);
}
.m-header__drawer[data-open="true"] {
    display: flex;
}
.m-header__drawer a {
    padding: 0.65rem 0.5rem;
    color: var(--fg);
    font-size: 0.95rem;
    border-radius: 8px;
}
.m-header__drawer a:hover {
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}
.m-header__drawer .m-btn--primary {
    margin-top: 0.5rem;
}

@media (max-width: 880px) {
    .m-header__inner {
        grid-template-columns: auto auto;
        padding: 0.75rem 1.25rem;
    }
    .m-nav,
    .m-header__cta {
        display: none;
    }
    .m-header__menu {
        display: inline-flex;
        justify-self: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .m-nav__status-dot {
        animation: none;
    }
}

.m-main {
    max-width: 920px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}
.m-main--full {
    max-width: none;
    margin: 0;
    padding: 0;
}

.m-hero h1 {
    font-size: clamp(1.8rem, 3vw + 1rem, 2.8rem);
    margin: 0 0 1rem 0;
    letter-spacing: -0.01em;
}
.m-lede {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 60ch;
}

.m-status {
    margin-top: 3rem;
    padding: 1.25rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.m-status h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.m-status ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.m-status li {
    padding: 0.25rem 0;
}

.m-footer {
    margin-top: 4rem;
    padding: 2rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.86rem;
}
.m-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.4fr;
    gap: 1.5rem;
    max-width: 1180px;
    margin: 0 auto;
    align-items: start;
}
.m-footer__col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.m-footer__brand .m-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--fg);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.m-footer__brand p {
    margin: 0.2rem 0 0;
    max-width: 30ch;
    font-size: 0.85rem;
}
.m-footer__heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.m-footer__col--links a {
    color: var(--tc-color-ink-soft, var(--fg));
    text-decoration: none;
    line-height: 1.8;
    font-size: 0.88rem;
}
.m-footer__col--links a:hover {
    color: var(--accent);
    text-decoration: none;
}
.m-footer__col--meta .m-mono {
    font-family: var(--tc-font-mono, ui-monospace, monospace);
    color: var(--tc-color-ink-soft, var(--fg));
    font-size: 0.82rem;
}
.m-footer__tagline {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 0.25rem;
}
.m-footer__rule {
    max-width: 1180px;
    margin: 1.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.74rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 720px) {
    .m-footer {
        padding: 1.5rem 1rem 1rem;
        margin-top: 2.5rem;
    }
    .m-footer__grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .m-footer__rule {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
}

.m-who {
    color: var(--muted);
    margin-right: 1rem;
}
.m-who small {
    color: var(--muted);
    opacity: 0.75;
}
.m-inline-form {
    display: inline;
    margin-left: 1rem;
}
.m-linkbtn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.m-linkbtn:hover {
    color: var(--fg);
    text-decoration: underline;
}

.m-card {
    max-width: 560px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.m-card--narrow {
    max-width: 400px;
}
.m-card h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.6rem;
}

.m-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}
.m-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.m-form input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font: inherit;
}
.m-form input:focus {
    outline: none;
    border-color: var(--accent);
}
.m-form small {
    color: var(--muted);
    opacity: 0.7;
    font-size: 0.78rem;
}

.m-btn {
    background: var(--accent);
    color: #06140d;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.m-btn:hover {
    filter: brightness(1.08);
}

.m-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Page head / filter bar / table for question bank */
.m-pagehead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.m-pagehead h1 {
    margin: 0 0 0.25rem 0;
}

.m-filterbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.m-filterbar input,
.m-filterbar select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    font: inherit;
}
.m-filterbar input[type="search"] {
    min-width: 220px;
}

.m-btn-ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    display: inline-block;
}
.m-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.m-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.m-table th,
.m-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 0.92rem;
}
.m-table th {
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
}
.m-table tr:last-child td {
    border-bottom: none;
}
.m-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.2rem;
    font-size: 0.9rem;
}
.m-pagination__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--fg);
    text-decoration: none;
    transition: border-color 0.15s;
}
.m-pagination__link:hover {
    border-color: var(--accent, #a16939);
    color: var(--accent, #a16939);
}
.m-pagination__link--disabled {
    opacity: 0.4;
    pointer-events: none;
}
.m-pagination__info {
    color: var(--muted);
}
.m-table .m-cell-prompt {
    max-width: 420px;
}
.m-table .m-cell-prompt a {
    color: var(--fg);
}
.m-empty {
    text-align: center;
    color: var(--muted);
    padding: 2rem !important;
}

/* ── Super-admin detail page ─────────────────────── */
.m-admin-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.m-admin-detail-head__info h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -0.01em;
}

.m-admin-detail-head__info .m-lede {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.m-admin-detail-head__title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.m-admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.m-admin-card-body {
    display: flex;
    flex-direction: column;
}

.m-admin-card-body__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg);
    margin-bottom: 0.25rem;
}

.m-admin-card-body__header strong {
    font-size: 0.95rem;
}

.m-admin-card-body__header tc-icon {
    color: var(--accent);
}

/* ── Form helpers ──────────────────────────────── */
.m-form-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.m-form-select {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font: inherit;
}

.m-form-select:focus {
    outline: none;
    border-color: var(--accent);
}

.m-mono-sm {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    color: var(--muted);
}

@media (max-width: 720px) {
    .m-admin-cards {
        grid-template-columns: 1fr;
    }
}

/* ── Lifecycle action rows ─────────────────────── */
.m-lifecycle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.25rem 0;
}

.m-lifecycle-row__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.m-lifecycle-row__info strong {
    font-size: 0.92rem;
    color: var(--fg);
}

.m-lifecycle-row__desc {
    font-size: 0.82rem;
    color: var(--muted);
}

.m-lifecycle-row__action {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.m-lifecycle-row__action tc-input {
    width: 120px;
}

.m-lifecycle-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.75rem 0;
}

@media (max-width: 640px) {
    .m-lifecycle-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .m-lifecycle-row__action tc-input {
        width: 100%;
    }
}

.m-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}
.m-pill--draft {
    background: rgba(255, 200, 0, 0.12);
    color: #fbbf24;
}
.m-pill--published {
    background: rgba(110, 231, 183, 0.12);
    color: var(--accent);
}
.m-pill--archived {
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.m-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.m-tile {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    color: var(--fg);
    text-decoration: none;
    transition: border-color 0.1s;
}
.m-tile:hover {
    border-color: var(--accent);
    text-decoration: none;
}
.m-tile--soon {
    opacity: 0.5;
    cursor: default;
}
.m-tile--soon:hover {
    border-color: var(--border);
}
.m-tile em {
    color: var(--muted);
    font-style: normal;
}

.m-kindgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.m-kindcard {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    color: var(--fg);
    text-decoration: none;
}
.m-kindcard:hover {
    border-color: var(--accent);
    text-decoration: none;
}
.m-kindcard code {
    color: var(--muted);
    font-size: 0.8rem;
    background: transparent;
    padding: 0;
}

.m-form--wide {
    max-width: 760px;
}
.m-form textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font: inherit;
    resize: vertical;
}
.m-form select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font: inherit;
}
.m-fieldset {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 0;
}
.m-fieldset legend {
    color: var(--muted);
    padding: 0 0.5rem;
    font-size: 0.85rem;
}
.m-option-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.4rem 0;
}
.m-option-row input[type="text"] {
    flex: 1;
}
.m-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}
.m-radio,
.m-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    color: var(--fg);
}
.m-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.m-danger {
    color: #fca5a5 !important;
}
.m-label-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.m-label-block input,
.m-label-block textarea,
.m-label-block select {
    color: var(--fg);
}

.m-preview-frame {
    margin-top: 1rem;
}
.m-explanation {
    margin-top: 1.5rem;
    color: var(--muted);
}

/* Icon + search field affordances */
.m-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.m-search-icon {
    position: absolute;
    left: 0.65rem;
    color: var(--muted);
    pointer-events: none;
}
.m-search-wrap input[type="search"] {
    padding-left: 2.1rem;
    min-width: 240px;
}

.m-row-actions {
    display: flex;
    gap: 0.5rem;
}
.m-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--muted);
    transition:
        color 0.15s,
        background 0.15s;
}
.m-row-action:hover {
    color: var(--accent);
    background: rgba(110, 231, 183, 0.08);
    text-decoration: none;
}

/* Card-wrap (setup/login pages) */
.m-card-wrap {
    max-width: 560px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.m-card-wrap--narrow {
    max-width: 420px;
}
.m-form-head {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}
.m-form-head h1 {
    margin: 0;
    color: var(--fg);
    font-size: 1.6rem;
}
.m-form-head .m-lede {
    color: var(--muted);
    margin: 0;
}

.m-hint {
    color: var(--muted);
    font-size: 0.78rem;
    margin: -0.4rem 0 0.5rem 0;
}

.m-kindcard__icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(110, 231, 183, 0.1);
    color: var(--accent);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}
.m-kindcard p {
    margin: 0.4rem 0 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}
.m-kindcard {
    gap: 0.3rem;
}

.m-tile tc-icon {
    color: var(--accent);
    margin-bottom: 0.4rem;
}

/* Inline tc-icons in nav and small badges */
.m-nav tc-icon,
.m-who tc-icon,
.m-linkbtn tc-icon {
    margin-right: 0.3rem;
    color: currentColor;
}

.m-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

/* Exam editor */
.m-h3 {
    font-size: 1.35rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}
.m-h4 {
    font-size: 1rem;
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.m-table--inline {
    margin: 0.5rem 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.m-table--inline th,
.m-table--inline td {
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
}

.m-add-item {
    margin: 0.75rem 0;
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
}
.m-add-item > summary {
    cursor: pointer;
    color: var(--muted);
    user-select: none;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.m-add-item > summary::-webkit-details-marker {
    display: none;
}
.m-add-item[open] > summary {
    color: var(--fg);
}
.m-add-item[open] {
    padding: 1rem 1.25rem;
    border-style: solid;
    border-color: var(--accent);
}
.m-add-item .m-form {
    margin-top: 0.85rem;
}

.m-section-delete {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* tc-card spacing within exam editor */
tc-card {
    display: block;
    margin-bottom: 1.5rem;
}

/* Preview stream */
.m-preview-stream {
    margin-top: 1.5rem;
}
.m-preview-q {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.85rem;
}
.m-preview-q header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.m-preview-q__num {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: rgba(110, 231, 183, 0.1);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    min-width: 1.6rem;
    text-align: center;
}
.m-preview-q__pts {
    margin-left: auto;
    color: var(--accent);
    font-weight: 600;
}
.m-preview-q p {
    margin: 0.4rem 0;
    color: var(--fg);
}

/* =====================================================================
   Attempt runner
   ===================================================================== */

.m-runner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem 1.5rem;
}
.m-runner__bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, var(--bg) 70%, transparent);
    border-bottom: 1px solid var(--border);
}
.m-runner__head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.m-runner__head strong {
    font-size: 1.1rem;
}
.m-runner__att {
    color: var(--muted);
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.m-runner__barright {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.m-runner__section {
    font-size: 1.1rem;
    margin: 2rem 0 0.75rem 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.m-runner__q {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.m-runner__q header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.m-runner__qnum {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: rgba(110, 231, 183, 0.1);
    color: var(--accent);
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-size: 0.8rem;
    min-width: 1.6rem;
    text-align: center;
}
.m-runner__qpts {
    margin-left: auto;
    color: var(--accent);
    font-weight: 600;
}
.m-runner__prompt {
    font-size: 1.05rem;
    margin: 0.5rem 0 1rem 0;
    color: var(--fg);
}
.m-runner__opts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.m-runner__opt {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition:
        border-color 0.12s,
        background 0.12s;
}
.m-runner__opt:hover {
    border-color: rgba(110, 231, 183, 0.3);
}
.m-runner__opt input {
    accent-color: var(--accent);
}
.m-runner__text {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font: inherit;
    width: 100%;
    max-width: 360px;
}

.m-runner__footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
}
.m-runner__saved {
    color: var(--accent);
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Result score card */
.m-result-score {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1.5rem;
}
.m-result-score__big {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--accent);
}
.m-result-score__max {
    font-size: 1.4rem;
    color: var(--muted);
    margin-left: 0.4rem;
}
.m-result-score__pct {
    font-size: 1.6rem;
    color: var(--fg);
}

/* Audit page */
.m-audit-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.m-audit-summary > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.m-audit-summary small {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.m-audit-summary strong {
    color: var(--fg);
    font-weight: 500;
    font-size: 0.95rem;
    word-break: break-all;
}

.m-audit-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.m-audit-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.m-audit-count code {
    background: transparent;
    padding: 0;
    font-size: 0.78rem;
    color: var(--muted);
}
.m-audit-count strong {
    color: var(--accent);
    font-weight: 600;
}

/* Risk-score card */
.m-audit-top {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 720px) {
    .m-audit-top {
        grid-template-columns: 1fr;
    }
}
.m-risk {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}
.m-risk__label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}
.m-risk__big {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1;
    color: var(--accent);
}
.m-risk__big[data-tier="warning"] {
    color: #fbbf24;
}
.m-risk__big[data-tier="critical"] {
    color: #fca5a5;
}
.m-risk__breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
    font-size: 0.78rem;
}
.m-sev {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}
.m-sev--info {
    color: var(--muted);
}
.m-sev--warning {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}
.m-sev--critical {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

/* Severity-colored timeline */
.m-audit-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem;
    overflow: hidden;
}
.m-audit-row {
    display: grid;
    grid-template-columns: 110px 90px 180px 1fr;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid transparent;
    border-radius: 8px;
    font-size: 0.88rem;
}
.m-audit-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.m-audit-row--info {
    border-left-color: rgba(255, 255, 255, 0.08);
}
.m-audit-row--warning {
    border-left-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.03);
}
.m-audit-row--critical {
    border-left-color: rgba(239, 68, 68, 0.7);
    background: rgba(239, 68, 68, 0.04);
}
.m-audit-row__time code {
    background: transparent;
    padding: 0;
    color: var(--muted);
    font-size: 0.8rem;
}
.m-audit-row__kind code {
    background: transparent;
    padding: 0;
    color: var(--fg);
}
.m-audit-row__payload small {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}
@media (max-width: 720px) {
    .m-audit-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* =====================================================================
   Landing page
   ===================================================================== */

.m-eyebrow {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(110, 231, 183, 0.08);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.m-display {
    font-size: clamp(2.4rem, 5vw + 0.5rem, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}
.m-accent-text {
    background: linear-gradient(135deg, #6ee7b7 0%, #38bdf8 60%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.m-h2 {
    font-size: clamp(1.8rem, 2.5vw + 0.8rem, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0.5rem 0 1rem 0;
    font-weight: 600;
}

.m-lede--lg {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 38ch;
    margin: 0 0 2rem 0;
}

.m-cta-row {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.m-btn--lg {
    font-size: 1rem;
    padding: 0.85rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.m-trustline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}
.m-trustline li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.m-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* Hero ---------------------------------------------------------------- */

.m-landing-hero {
    position: relative;
    overflow: hidden;
    padding: 5.5rem 2rem 6rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    --hero-ease: cubic-bezier(0.23, 1, 0.32, 1);
}
/* Subtle dot grid texture — adds depth without a gradient. */
.m-landing-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
    mask-image: radial-gradient(
        ellipse 80% 70% at 50% 35%,
        black 40%,
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(
        ellipse 80% 70% at 50% 35%,
        black 40%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}
.m-landing-hero__grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.m-landing-hero__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Custom eyebrow — avoids the tc-badge default green pill block */
.m-landing-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.85rem 0.4rem 0.7rem;
    border: 1px solid rgba(110, 231, 183, 0.32);
    background: rgba(110, 231, 183, 0.06);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    width: max-content;
    animation: m-hero-rise 600ms var(--hero-ease) both;
}
.m-landing-hero__pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.55);
    animation: m-hero-pulse 2.4s var(--hero-ease) infinite;
    flex-shrink: 0;
}

.m-landing-hero__title {
    font-size: clamp(2.4rem, 4.6vw + 0.4rem, 4rem);
    line-height: 1.04;
    letter-spacing: -0.028em;
    font-weight: 600;
    color: var(--fg);
    margin: 0;
    text-wrap: balance;
    animation: m-hero-rise 700ms 80ms var(--hero-ease) both;
}
/* Single confident accent — no rainbow gradient. */
.m-landing-hero__title-accent {
    display: block;
    color: var(--accent);
    font-weight: 600;
}

.m-landing-hero__lede {
    font-size: 1.08rem;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
    max-width: 56ch;
    text-wrap: pretty;
    animation: m-hero-rise 700ms 140ms var(--hero-ease) both;
}

.m-landing-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
    animation: m-hero-rise 700ms 200ms var(--hero-ease) both;
}

/* Hero proof strip — three condensed metrics in a quiet row */
.m-landing-hero__proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0.5rem 0 0;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--border);
    animation: m-hero-rise 700ms 260ms var(--hero-ease) both;
}
.m-landing-hero__proof > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.m-landing-hero__proof dt {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    margin: 0;
}
.m-landing-hero__proof dd {
    margin: 0;
    font-size: clamp(1.4rem, 1.4vw + 0.8rem, 1.85rem);
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.m-landing-hero__proof dd small {
    font-size: 0.55em;
    color: var(--muted);
    margin-left: 0.15em;
    font-weight: 500;
}

.m-landing-hero__trust {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    animation: m-hero-rise 700ms 320ms var(--hero-ease) both;
}
.m-landing-hero__trust li > tc-tooltip {
    display: inline-flex;
}
.m-landing-hero__trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: help;
}
.m-landing-hero__trust tc-icon {
    color: var(--accent);
}

/* Right column — image with a floating proof card */
.m-landing-hero__media {
    margin: 0;
    min-width: 0;
    position: relative;
    animation: m-hero-rise 800ms 180ms var(--hero-ease) both;
}
.m-landing-hero__frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--card);
    outline: 1px solid rgba(255, 255, 255, 0.05);
    outline-offset: -1px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 30px 60px -25px rgba(0, 0, 0, 0.55);
}
.m-landing-hero__frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Lift exposure slightly to match the dark surface */
    filter: brightness(1.02) saturate(0.92);
}
/* Vignette so the image fades into the page, plus a faint accent wash */
.m-landing-hero__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 50%, rgba(8, 9, 13, 0.55) 100%),
        linear-gradient(140deg, rgba(110, 231, 183, 0.08), transparent 40%);
    pointer-events: none;
}
.m-landing-hero__live {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(8, 9, 13, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--fg);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}
.m-landing-hero__live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
    animation: m-hero-pulse-red 1.6s var(--hero-ease) infinite;
}

/* The floating attempt card — gives the photo a job, not just decoration */
.m-landing-hero__card {
    position: absolute;
    right: -1rem;
    bottom: -1.5rem;
    width: min(280px, 70%);
    padding: 1rem 1.1rem;
    background: rgba(13, 15, 20, 0.88);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 12px 28px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    z-index: 3;
    animation: m-hero-rise 800ms 360ms var(--hero-ease) both;
}
.m-landing-hero__card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.m-landing-hero__card-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.m-landing-hero__card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.m-landing-hero__card-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: m-hero-pulse 1.8s var(--hero-ease) infinite;
}
.m-landing-hero__card-time {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.m-landing-hero__card-time-value {
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.m-landing-hero__card-time-suffix {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.3;
}
.m-landing-hero__card-track {
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.m-landing-hero__card-track > span {
    position: absolute;
    inset: 0;
    width: var(--p, 60%);
    background: linear-gradient(90deg, var(--accent), rgba(110, 231, 183, 0.6));
    border-radius: inherit;
}
.m-landing-hero__card footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--muted);
}
.m-landing-hero__card footer strong {
    color: var(--fg);
    font-weight: 600;
}

/* CTA buttons — confident primary, outlined ghost (was invisible before) */
.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.35rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        background-color 140ms var(--hero-ease),
        border-color 140ms var(--hero-ease),
        color 140ms var(--hero-ease),
        transform 80ms var(--hero-ease),
        box-shadow 160ms var(--hero-ease);
}
.m-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.m-btn:active {
    transform: scale(0.97);
}
.m-btn--primary {
    background: var(--accent);
    color: #07120d;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 6px 18px -8px rgba(110, 231, 183, 0.55);
}
.m-btn--primary:hover {
    background: #5dd6a6;
    color: #07120d;
    text-decoration: none;
}
.m-btn--ghost {
    background: transparent;
    color: var(--fg);
    border-color: var(--border);
}
.m-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(110, 231, 183, 0.35);
    color: var(--fg);
    text-decoration: none;
}

/* Glow used by lower CTA (kept) */
.m-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}
.m-glow--3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(167, 139, 250, 0.18),
        transparent 70%
    );
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes m-hero-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes m-hero-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.55);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(110, 231, 183, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(110, 231, 183, 0);
    }
}
@keyframes m-hero-pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .m-landing-hero__eyebrow,
    .m-landing-hero__title,
    .m-landing-hero__lede,
    .m-landing-hero__cta,
    .m-landing-hero__proof,
    .m-landing-hero__trust,
    .m-landing-hero__media,
    .m-landing-hero__card {
        animation: none;
    }
    .m-landing-hero__pulse,
    .m-landing-hero__live-dot,
    .m-landing-hero__card-pulse {
        animation: none;
    }
}

@media (max-width: 960px) {
    .m-landing-hero {
        padding: 4rem 1.25rem 4.5rem;
    }
    .m-landing-hero__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .m-landing-hero__title {
        font-size: clamp(2.1rem, 7vw + 0.4rem, 3rem);
    }
    .m-landing-hero__media {
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
    }
    .m-landing-hero__card {
        right: 0.75rem;
        bottom: -1rem;
    }
}

@media (max-width: 560px) {
    .m-landing-hero__proof {
        grid-template-columns: 1fr 1fr;
        row-gap: 1rem;
    }
    .m-landing-hero__proof > div:nth-child(3) {
        grid-column: 1 / -1;
    }
    .m-landing-hero__card {
        position: static;
        width: 100%;
        margin-top: 1rem;
    }
}

/* Features ------------------------------------------------------------ */

.m-features {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 2rem;
}
.m-section-head {
    max-width: 720px;
    margin-bottom: 3rem;
}
.m-section-head .m-eyebrow {
    margin-bottom: 1rem;
}
.m-section-head .m-lede {
    font-size: 1.05rem;
    max-width: 60ch;
}
/* Plain-text eyebrow used by the rewritten sales sections so the section
 * head doesn't carry the kit's badge surface (too heavy in repetition). */
.m-section-head__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}
.m-section-head__eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--accent);
    opacity: 0.7;
}

/* — Use-cases grid (replaces the old stats strip) ---------------------- */
.m-usecases {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border);
}
.m-usecases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.m-usecase {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 60%),
        var(--card);
    transition:
        transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
        border-color 200ms ease-out,
        box-shadow 200ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
    .m-usecase:hover {
        transform: translateY(-3px);
        border-color: rgba(110, 231, 183, 0.32);
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.2),
            0 16px 32px -16px rgba(0, 0, 0, 0.4);
    }
}
.m-usecase__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(110, 231, 183, 0.08);
    border: 1px solid rgba(110, 231, 183, 0.22);
    color: var(--accent);
    margin-bottom: 1rem;
}
.m-usecase h3 {
    margin: 0 0 0.55rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--fg);
    text-wrap: balance;
}
.m-usecase p {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.55;
    text-wrap: pretty;
}
.m-usecase__tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}
@media (max-width: 880px) {
    .m-usecases {
        padding: 3.5rem 1.25rem;
    }
}

.m-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.m-feature {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}
.m-feature:hover {
    transform: translateY(-3px);
    border-color: rgba(110, 231, 183, 0.3);
}
.m-feature__num {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}
.m-feature h3 {
    margin: 0 0 0.6rem 0;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.m-feature p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Testimonials -------------------------------------------------------- */

.m-testimonials {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem 2rem;
    border-top: 1px solid var(--border);
}
.m-quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.m-quote {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.025),
        rgba(255, 255, 255, 0.005)
    );
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    margin: 0;
    position: relative;
}
.m-quote::before {
    content: "“";
    position: absolute;
    top: -0.25rem;
    left: 1.25rem;
    font-size: 3.5rem;
    color: var(--accent);
    opacity: 0.5;
    font-family: Georgia, serif;
    line-height: 1;
}
.m-quote blockquote {
    margin: 1.5rem 0 1.25rem 0;
    color: var(--fg);
    font-size: 1.02rem;
    line-height: 1.6;
}
.m-quote figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.m-quote figcaption strong {
    color: var(--fg);
    font-weight: 600;
    font-size: 0.95rem;
}
.m-quote figcaption span {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Lower CTA ----------------------------------------------------------- */

.m-cta {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(110, 231, 183, 0.04), rgba(11, 13, 18, 0)),
        var(--bg);
    border-bottom: 1px solid var(--border);
}
.m-cta__inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.m-cta__inner .m-h2 {
    margin: 0;
    text-wrap: balance;
}
.m-cta__inner .m-lede {
    max-width: 52ch;
    margin: 0 auto;
}
.m-cta .m-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Big footer ---------------------------------------------------------- */

.m-bigfoot {
    background: #08090d;
    border-top: 1px solid var(--border);
}
.m-bigfoot__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4rem 2rem 2.5rem 2rem;
}
.m-bigfoot__cols {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 2.5rem;
}
.m-bigfoot__brand {
    max-width: 320px;
}
.m-bigfoot__brand .m-lede {
    font-size: 0.92rem;
    margin-top: 0.85rem;
}
.m-brand--lg {
    font-size: 1.25rem;
}
.m-bigfoot h4 {
    margin: 0 0 1rem 0;
    color: var(--fg);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.m-bigfoot ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.m-bigfoot ul a {
    color: var(--muted);
    font-size: 0.9rem;
    transition: color 0.15s;
}
.m-bigfoot ul a:hover {
    color: var(--fg);
    text-decoration: none;
}

.m-bigfoot__base {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted);
}

@media (max-width: 880px) {
    .m-bigfoot__inner {
        padding: 3rem 1.25rem 1.75rem 1.25rem;
    }
    .m-bigfoot__brand {
        max-width: none;
    }
    .m-features,
    .m-testimonials,
    .m-callout-band {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .m-cta__inner {
        padding: 4rem 1.25rem;
    }
}

/* Callout band between features and testimonials */
.m-callout-band {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
}

/* Quote marks + attribution inside tc-card slots */
.m-quote-mark {
    display: inline-block;
    font-size: 2.4rem;
    color: var(--accent);
    opacity: 0.6;
    font-family: Georgia, serif;
    line-height: 1;
    margin-bottom: -0.5rem;
}
.m-quote-body {
    margin: 0.5rem 0 0 0;
    color: var(--fg);
    font-size: 1rem;
    line-height: 1.6;
    font-style: normal;
    border-left: none;
    padding-left: 0;
}
.m-quote-by {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.75rem;
}
.m-quote-by strong {
    color: var(--fg);
    font-weight: 600;
    font-size: 0.92rem;
}
.m-quote-by span {
    color: var(--muted);
    font-size: 0.82rem;
}

/* Push the kit's tc-card a bit darker so it reads in our shell */
tc-card,
tc-stat,
tc-callout {
    display: block;
}

/* ================================================================
   HOME PAGE REDESIGN — new sections (appended, no existing edits)
   ================================================================ */

/* — Exam-flow section -------------------------------------------- */
.m-flow-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.m-flow-section tc-stepper {
    margin-bottom: 2.5rem;
}

.m-flow-section tc-tabs {
    margin-top: 1rem;
}

/* — Tabbed features ---------------------------------------------- */
.m-features-tabbed {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.m-features-tabbed tc-tabs {
    margin-top: 2rem;
}

/* — FAQ section -------------------------------------------------- */
.m-faq {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.m-faq tc-accordion {
    margin-top: 2rem;
    max-width: 820px;
}

/* tc-accordion ships ::slotted(details > summary) rules in its shadow
 * DOM, which is invalid (::slotted only accepts compound selectors, no
 * combinators) so every browser drops them. Result: native list-item
 * markers, no padding, no separators. We restyle the light-DOM details
 * directly here — the kit's JS (single-open, keyboard nav, caret append)
 * keeps working. */
.m-faq tc-accordion .tc-accordion-caret {
    /* hide kit's runtime-appended caret; we draw our own with ::after */
    display: none;
}
.m-faq tc-accordion details {
    border-top: 1px solid var(--border);
}
.m-faq tc-accordion details:first-of-type {
    border-top: 0;
}
.m-faq tc-accordion summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--fg);
    letter-spacing: -0.005em;
    transition:
        background 160ms ease,
        color 160ms ease;
}
.m-faq tc-accordion summary::-webkit-details-marker {
    display: none;
}
.m-faq tc-accordion summary::marker {
    content: "";
}
.m-faq tc-accordion summary::after {
    content: "";
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition:
        transform 220ms ease,
        opacity 160ms ease;
    opacity: 0.55;
}
@media (hover: hover) and (pointer: fine) {
    .m-faq tc-accordion summary:hover {
        background: rgba(110, 231, 183, 0.04);
        color: var(--accent);
    }
    .m-faq tc-accordion summary:hover::after {
        opacity: 0.95;
    }
}
.m-faq tc-accordion summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.m-faq tc-accordion details[open] summary {
    color: var(--accent);
}
.m-faq tc-accordion details[open] summary::after {
    transform: rotate(45deg);
    opacity: 1;
}
.m-faq tc-accordion details > p {
    margin: 0;
    padding: 0 1.4rem 1.4rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 68ch;
}

@media (max-width: 640px) {
    .m-faq tc-accordion summary {
        padding: 0.95rem 1.1rem;
        font-size: 0.94rem;
    }
    .m-faq tc-accordion details > p {
        padding: 0 1.1rem 1.15rem;
        font-size: 0.92rem;
    }
}

/* — Testimonial carousel ----------------------------------------- */
.m-testimonials-carousel {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.m-testimonials-carousel__deck {
    display: block;
    margin-top: 2.5rem;
    /* Re-theme the kit's tc-carousel for the dark surface — defaults
     * are tuned for the linen light theme, so the control pills and
     * indicator dots otherwise read white-on-dark. */
    --tc-carousel-radius: 16px;
    --tc-carousel-bg: transparent;
    --tc-carousel-control-bg: rgba(20, 23, 31, 0.72);
    --tc-carousel-control-bg-hover: rgba(110, 231, 183, 0.18);
    --tc-carousel-control-fg: var(--fg);
    --tc-carousel-control-size: 40px;
    --tc-carousel-indicator: rgba(255, 255, 255, 0.22);
    --tc-carousel-indicator-active: var(--accent);
    --tc-carousel-duration: 360ms;
}

.m-testimonial-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 3rem; /* clear room for the prev/next control pills */
    box-sizing: border-box;
    width: 100%;
    height: 100%;
}

.m-testimonial-slide tc-card {
    max-width: 680px;
    width: 100%;
    --tc-card-padding-x: 2.25rem;
    --tc-card-padding-y: 2rem;
    --tc-card-gap: 1.25rem;
    --tc-card-radius: 16px;
}

.m-testimonial-attr {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.m-testimonial-attr__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.m-testimonial-attr__text strong {
    color: var(--fg);
    font-size: 0.92rem;
}

.m-testimonial-attr__text span {
    color: var(--muted);
    font-size: 0.82rem;
}

/* — Trust line tooltips ------------------------------------------ */
.m-trustline tc-tooltip {
    display: inline-flex;
}

/* — Enhanced section head (reusable) ----------------------------- */
.m-section-head tc-badge {
    margin-bottom: 1rem;
}

/* — Responsive overrides for new sections ------------------------ */
@media (max-width: 880px) {
    .m-flow-section,
    .m-features-tabbed,
    .m-faq,
    .m-testimonials-carousel {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* — Kit component dark-theme nudges ------------------------------ */
tc-tabs {
    display: block;
}

tc-stepper {
    display: block;
}

tc-carousel {
    display: block;
}

tc-accordion {
    display: block;
}

tc-tooltip {
    display: inline-flex;
}

tc-avatar {
    display: inline-flex;
}

tc-progress {
    display: block;
}

/* ================================================================
   HOME PAGE REDESIGN v2 — flow steps + audit-replay product preview
   Additive only; no edits to existing classes.
   ================================================================ */

/* — Accent variant for the first use-case card ------------------- */
.m-usecase--accent {
    background:
        linear-gradient(
            180deg,
            rgba(110, 231, 183, 0.05),
            rgba(110, 231, 183, 0.01) 65%
        ),
        var(--card);
    border-color: rgba(110, 231, 183, 0.22);
}
.m-usecase--accent .m-usecase__icon {
    background: rgba(110, 231, 183, 0.14);
    border-color: rgba(110, 231, 183, 0.4);
}

/* — Five-stage flow (replaces the redundant stepper + tabs) ------ */
.m-flow-steps {
    list-style: none;
    margin: 0 0 4rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    counter-reset: m-flow;
}
.m-flow-step {
    position: relative;
    padding: 1.5rem 1.25rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 60%),
        var(--card);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition:
        transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
        border-color 200ms ease-out,
        box-shadow 200ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
    .m-flow-step:hover {
        transform: translateY(-3px);
        border-color: rgba(110, 231, 183, 0.28);
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.2),
            0 16px 32px -16px rgba(0, 0, 0, 0.4);
    }
}
.m-flow-step--active {
    border-color: rgba(110, 231, 183, 0.4);
    background:
        linear-gradient(180deg, rgba(110, 231, 183, 0.06), transparent 70%),
        var(--card);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(110, 231, 183, 0.12);
}
.m-flow-step__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.m-flow-step__num {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
}
.m-flow-step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(110, 231, 183, 0.08);
    border: 1px solid rgba(110, 231, 183, 0.22);
    color: var(--accent);
}
.m-flow-step__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.m-flow-step__desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
    text-wrap: pretty;
}

/* — Audit-replay product preview --------------------------------- */
.m-replay {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: center;
    padding: 2.5rem 0 0;
    border-top: 1px solid var(--border);
}
.m-replay__caption {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.m-replay__caption .m-section-head__eyebrow {
    margin-bottom: 0;
}
.m-replay__title {
    margin: 0;
    font-size: clamp(1.4rem, 1.4vw + 1rem, 1.85rem);
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-wrap: balance;
}
.m-replay__lede {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 46ch;
}
.m-replay__props {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.m-replay__props li {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--fg);
    font-size: 0.92rem;
}
.m-replay__props tc-icon {
    color: var(--accent);
    flex-shrink: 0;
}

/* The "browser frame" mock to give the timeline a product-y feel */
.m-replay__preview {
    margin: 0;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--card);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 12px 32px rgba(0, 0, 0, 0.35),
        0 40px 80px -32px rgba(0, 0, 0, 0.55);
}
.m-replay__chrome {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
}
.m-replay__chrome-dots {
    display: inline-flex;
    gap: 0.35rem;
}
.m-replay__chrome-dots > span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}
.m-replay__chrome-path {
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.76rem;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.m-replay__chrome-sig {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}

.m-replay__timeline {
    list-style: none;
    margin: 0;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
}
.m-replay__event {
    position: relative;
    display: grid;
    grid-template-columns: 92px 14px 1fr auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.88rem;
    transition: background 160ms ease-out;
}
.m-replay__event:hover {
    background: rgba(255, 255, 255, 0.025);
}
/* Vertical thread connecting the event dots */
.m-replay__event::after {
    content: "";
    position: absolute;
    left: calc(92px + 0.85rem + 6px);
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}
.m-replay__event:first-child::after {
    top: 50%;
}
.m-replay__event:last-child::after {
    bottom: 50%;
}

.m-replay__event-time {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.m-replay__event-dot {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.1);
}
.m-replay__event-dot[data-kind="focus"] {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}
.m-replay__event-dot[data-kind="submit"] {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.18);
}
.m-replay__event-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.m-replay__event-body strong {
    color: var(--fg);
    font-weight: 600;
    font-size: 0.9rem;
}
.m-replay__event-meta {
    color: var(--muted);
    font-size: 0.78rem;
}
.m-replay__event-sig {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    color: var(--muted);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}
.m-replay__event--ok .m-replay__event-sig {
    color: var(--accent);
    border-color: rgba(110, 231, 183, 0.28);
    background: rgba(110, 231, 183, 0.08);
}

.m-replay__foot {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.015);
}
.m-replay__foot strong {
    color: var(--fg);
    font-weight: 600;
}

/* — Why-teams-switch pillars (replaces the broken tc-tabs+tc-card) - */
.m-pillars-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border);
}
.m-pillars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.m-pillar {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 60%),
        var(--card);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition:
        transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
        border-color 200ms ease-out,
        box-shadow 200ms ease-out;
}
/* Subtle accent rail on the left edge tinted by group */
.m-pillar::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    border-radius: 14px 0 0 14px;
    background: var(--pillar-rail, rgba(110, 231, 183, 0.4));
    opacity: 0.6;
    transition: opacity 200ms ease;
}
.m-pillar[data-group="trust"] {
    --pillar-rail: rgba(110, 231, 183, 0.55);
}
.m-pillar[data-group="examday"] {
    --pillar-rail: rgba(56, 189, 248, 0.55);
}
.m-pillar[data-group="onboarding"] {
    --pillar-rail: rgba(251, 191, 36, 0.55);
}
@media (hover: hover) and (pointer: fine) {
    .m-pillar:hover {
        transform: translateY(-3px);
        border-color: rgba(110, 231, 183, 0.28);
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.2),
            0 16px 32px -16px rgba(0, 0, 0, 0.4);
    }
    .m-pillar:hover::before {
        opacity: 1;
    }
}
.m-pillar__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.m-pillar__tag-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--accent);
    letter-spacing: 0.04em;
}
.m-pillar__tag-group::before {
    content: "·";
    margin-right: 0.55rem;
    opacity: 0.5;
}
.m-pillar__title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--fg);
    line-height: 1.25;
    text-wrap: balance;
}
.m-pillar__desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.6;
    text-wrap: pretty;
}

/* — Responsive collapse ------------------------------------------ */
@media (max-width: 1080px) {
    .m-flow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .m-replay {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .m-replay__lede {
        max-width: none;
    }
    .m-pillars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .m-flow-steps {
        grid-template-columns: 1fr;
        margin-bottom: 3rem;
    }
    .m-replay__event {
        grid-template-columns: 70px 14px 1fr;
        gap: 0.6rem;
    }
    .m-replay__event::after {
        left: calc(70px + 0.6rem + 6px);
    }
    .m-replay__event-sig {
        display: none;
    }
    .m-pillars {
        grid-template-columns: 1fr;
    }
    .m-pillars-section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Live-watch action row (Phase 9) */
.m-live-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Candidate-side pause overlay (Phase 9). */
.m-pause-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 13, 18, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    text-align: center;
    color: #e7eaf0;
    font-family: ui-sans-serif, system-ui, sans-serif;
}
.m-pause-overlay--show {
    display: flex;
}
.m-pause-overlay__card {
    background: #11141b;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 14px;
    padding: 2.5rem 3rem;
    max-width: 480px;
}
.m-pause-overlay__title {
    color: #fbbf24;
    font-size: 1.6rem;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}
.m-pause-overlay__lede {
    color: #8a93a6;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.5;
}
.m-pause-overlay__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 12px #fbbf24;
    animation: pulse 1.4s ease-in-out infinite;
    margin-right: 0.5rem;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

/* =====================================================================
   Login page (full-bleed, native inputs to avoid Shadow-DOM focus churn)
   ===================================================================== */
.m-login {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse 60% 40% at 50% 0%,
            rgba(110, 231, 183, 0.1),
            transparent 60%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(56, 189, 248, 0.05),
            transparent 50%
        ),
        var(--bg);
}
.m-login__glow {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    z-index: 0;
}
.m-login__glow--1 {
    width: 480px;
    height: 480px;
    top: -180px;
    right: -100px;
    background: radial-gradient(
        circle,
        rgba(110, 231, 183, 0.3),
        transparent 70%
    );
}
.m-login__glow--2 {
    width: 380px;
    height: 380px;
    bottom: -120px;
    left: -100px;
    background: radial-gradient(
        circle,
        rgba(167, 139, 250, 0.2),
        transparent 70%
    );
}

.m-login__main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem;
    gap: 2rem;
}

.m-login__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--fg);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    font-size: 1.15rem;
}
.m-login__brand:hover {
    text-decoration: none;
}
.m-login__brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
}

.m-login__card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(
        180deg,
        rgba(20, 24, 33, 0.96),
        rgba(11, 13, 18, 0.96)
    );
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2.25rem 2.25rem 2rem;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
}
.m-login__head {
    text-align: center;
    margin-bottom: 1.5rem;
}
.m-login__head h1 {
    font-size: 1.5rem;
    margin: 0 0 0.4rem 0;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: var(--fg);
}
.m-login__head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.m-login__error {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.m-login__error-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(252, 165, 165, 0.18);
    color: #fca5a5;
    font-weight: 700;
}

.m-login__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.m-login__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.m-login__label {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.m-login__field input {
    /* Native input — no Shadow-DOM re-render storms. */
    box-sizing: border-box;
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--fg);
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease;
    /* Defensive: prevent ANY parent CSS from animating layout on focus. */
    transform: none !important;
    will-change: auto;
}
.m-login__field input:hover {
    border-color: rgba(255, 255, 255, 0.14);
}
.m-login__field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.18);
}
.m-login__field input:-webkit-autofill {
    -webkit-text-fill-color: var(--fg);
    /* Browser auto-fill yellow conflicts with the dark theme; pin our own bg. */
    box-shadow: 0 0 0 30px rgba(20, 24, 33, 1) inset;
    border: 1px solid var(--border);
}

.m-login__btn {
    margin-top: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: var(--accent);
    color: #06140d;
    border: none;
    padding: 0.95rem 1.1rem;
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        filter 0.12s ease,
        transform 0.05s ease;
}
.m-login__btn:hover {
    filter: brightness(1.08);
}
.m-login__btn:active {
    transform: translateY(1px);
}
.m-login__btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.m-login__btn-arrow {
    transition: transform 0.12s ease;
}
.m-login__btn:hover .m-login__btn-arrow {
    transform: translateX(3px);
}

.m-login__alt {
    margin: 1.5rem 0 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.55;
}
.m-login__alt a {
    color: var(--accent);
}

.m-login__footer {
    position: relative;
    z-index: 1;
    padding: 1.5rem 1.5rem 2rem;
    color: var(--muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
    background: rgba(8, 9, 13, 0.6);
    backdrop-filter: blur(4px);
}
.m-login__footer-row {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.m-login__footer-links {
    display: inline-flex;
    gap: 1.25rem;
}
.m-login__footer-links a {
    color: var(--muted);
    text-decoration: none;
}
.m-login__footer-links a:hover {
    color: var(--fg);
    text-decoration: none;
}
.m-login__footer-fineprint {
    max-width: 880px;
    margin: 0.5rem auto 0;
    color: var(--muted);
    opacity: 0.7;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

@media (max-width: 480px) {
    .m-login__card {
        padding: 1.75rem 1.5rem;
        border-radius: 14px;
    }
    .m-login__head h1 {
        font-size: 1.35rem;
    }
    .m-login__footer-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* ---------- Live dashboard (Phase 9.1) ----------------------------- */

.m-live-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.5rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: 0.05rem;
}
.m-live-status::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}
.m-live-status--connecting {
    color: #b08b00;
    background: rgba(176, 139, 0, 0.12);
}
.m-live-status--connected {
    color: #198754;
    background: rgba(25, 135, 84, 0.12);
    animation: m-live-pulse 1.6s ease-in-out infinite;
}
.m-live-status--disconnected {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.12);
}

@keyframes m-live-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.55;
    }
}

@keyframes m-row-flash-info {
    0% {
        background-color: rgba(59, 130, 246, 0.2);
    }
    100% {
        background-color: transparent;
    }
}
@keyframes m-row-flash-warning {
    0% {
        background-color: rgba(234, 179, 8, 0.28);
    }
    100% {
        background-color: transparent;
    }
}
@keyframes m-row-flash-critical {
    0% {
        background-color: rgba(220, 38, 38, 0.34);
    }
    100% {
        background-color: transparent;
    }
}
.m-row-flash--info {
    animation: m-row-flash-info 1.2s ease-out 1;
}
.m-row-flash--warning {
    animation: m-row-flash-warning 1.6s ease-out 1;
}
.m-row-flash--critical {
    animation: m-row-flash-critical 2.2s ease-out 1;
}

.m-evt {
    font-size: 0.78rem;
    padding: 0.05rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.01em;
}
.m-evt--info {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}
.m-evt--warning {
    background: rgba(234, 179, 8, 0.18);
    color: #92400e;
}
.m-evt--critical {
    background: rgba(220, 38, 38, 0.18);
    color: #991b1b;
}

.m-muted {
    color: var(--muted);
}

/* ---------- Candidate portal (Phase 11) ---------------------------- */

.m-section {
    margin: 2rem 0;
    padding: 0;
}
.m-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.75rem;
    flex-wrap: wrap;
}
.m-section__head h2 {
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: -0.005em;
}

.m-cta-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: rgba(234, 179, 8, 0.14);
    color: #92400e;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}
.m-cta-inline:hover {
    background: rgba(234, 179, 8, 0.22);
    text-decoration: none;
}

/* Card accent variants (warning / danger) layered on top of tc-card
 * via the kit's themable custom properties. Keeps the surface, ink,
 * radius, and shadow consistent with every other tc-card on the
 * page; only re-tints the border and adds a subtle left bar. */
.m-card-accent--warning {
    --tc-card-rule: var(--tc-color-warning, #fbbf24);
    box-shadow: inset 3px 0 0 var(--tc-color-warning, #fbbf24);
}
.m-card-accent--danger {
    --tc-card-rule: var(--tc-color-danger, #fca5a5);
    box-shadow: inset 3px 0 0 var(--tc-color-danger, #fca5a5);
}
.m-card-accent strong,
.m-card-accent--warning strong,
.m-card-accent--danger strong {
    display: block;
    color: var(--fg);
}
.m-card-accent p,
.m-card-accent--warning p,
.m-card-accent--danger p {
    margin: 0.25rem 0 0;
}

/* Inline two-up row used inside tc-card header/footer slots. */
.m-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.m-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--muted);
    font-size: 0.78rem;
}
.m-card-meta .m-lede {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
}

/* Exam-card grid (replaces .m-cards / .m-tile--exam). */
.m-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.m-exam-card {
    display: block;
}
.m-exam-card strong {
    font-size: 1rem;
    line-height: 1.25;
    color: var(--fg);
}

.m-meta-list {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--muted);
}
.m-meta-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.m-btn--primary {
    background: var(--accent, #111);
    color: #fff;
    border: 1px solid transparent;
}
.m-btn--primary:hover {
    opacity: 0.92;
}

.m-btn--disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.04);
    cursor: not-allowed;
    font-size: 0.85rem;
}

.m-pagehead__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.m-result-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.025);
    margin: 1rem 0 1.5rem;
    flex-wrap: wrap;
}
.m-result-hero__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 7.5rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
}
.m-result-hero__score strong {
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: -0.02em;
}
.m-result-hero__score .m-lede {
    font-size: 0.78rem;
    margin-top: 0.35rem;
}
.m-result-hero__score--pass {
    background: rgba(34, 197, 94, 0.16);
    color: #166534;
}
.m-result-hero__score--fail {
    background: rgba(220, 38, 38, 0.14);
    color: #991b1b;
}
.m-result-hero__score--neutral {
    background: rgba(0, 0, 0, 0.05);
    color: var(--fg);
}
.m-result-hero__verdict strong {
    font-size: 1.15rem;
}
.m-result-hero__verdict p {
    margin: 0.25rem 0 0;
}

/* ---------- /verify scorecard ------------------------------------ */

.m-verify {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 1rem;
}
.m-verify__card {
    width: 100%;
    max-width: 540px;
    padding: 1.5rem 1.75rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.06);
}
.m-verify__card--ok {
    border-top: 4px solid #198754;
}
.m-verify__card--bad {
    border-top: 4px solid #c0392b;
}
.m-verify__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.m-verify__head strong {
    font-size: 1.1rem;
}
.m-verify__head p {
    margin: 0.2rem 0 0;
}
.m-verify__card--ok .m-verify__head tc-icon {
    color: #198754;
}
.m-verify__card--bad .m-verify__head tc-icon {
    color: #c0392b;
}

.m-verify__grid {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 0.45rem 1rem;
    margin: 1rem 0 0.75rem;
    font-size: 0.9rem;
}
.m-verify__grid dt {
    color: var(--muted);
}
.m-verify__grid dd {
    margin: 0;
}

.m-verify__note {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

/* ---------- Bulk invites (Phase 10.1) ---------------------------- */

.m-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    margin: 1.25rem 0;
}
.m-form-row--full {
    grid-column: 1 / -1;
}

.m-label {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.m-input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font: inherit;
    background: #fff;
    box-sizing: border-box;
}
.m-input:focus {
    outline: none;
    border-color: var(--accent, #111);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.m-textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font: inherit;
    resize: vertical;
    box-sizing: border-box;
    background: #fff;
}
.m-textarea--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.45;
}

.m-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.m-cell-url {
    max-width: 380px;
    overflow: hidden;
}
.m-url {
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.15rem 0.45rem;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    font-size: 0.78rem;
}
.m-row-warn {
    background: rgba(220, 38, 38, 0.05);
}

@media (max-width: 720px) {
    .m-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Org shell: sidebar + main (Phase 12) --------------------
 * All colours derive from the dark Mesura token palette declared at
 * the top of this file (--bg / --fg / --card / --border / --muted /
 * --accent). Re-skinning the whole app to light/system is a matter of
 * rewriting those eight variables — nothing in this block hardcodes
 * #fff or rgba(0,0,0,...).
 */

.m-has-shell {
    padding: 0;
    margin: 0;
    background: var(--bg);
    color: var(--fg);
}
.m-shell {
    display: grid;
    grid-template-columns: 264px 1fr;
    min-height: 100vh;
    background: var(--bg);
    color: var(--fg);
}
.m-shell__main {
    padding: 1.75rem 2rem 3rem;
    width: 100%;
    min-width: 0; /* let children with overflow: hidden actually clip */
}
.m-shell__main--full {
    padding: 0;
}
.m-shell__menu {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 30;
    padding: 0.5rem 0.65rem;
    background: var(--card);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--tc-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.4));
    cursor: pointer;
}
.m-shell__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 18;
    backdrop-filter: blur(2px);
}
.m-shell__backdrop.m-active {
    display: block;
}

.m-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
    padding: 1.1rem 0.85rem 0.85rem;
    background: linear-gradient(180deg, var(--card), var(--bg));
    color: var(--fg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.m-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.4rem 0.25rem;
}
.m-sidebar .m-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    color: var(--fg);
    letter-spacing: -0.01em;
}
.m-brand__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    display: inline-block;
}
.m-sidebar__close {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--muted);
    border-radius: 6px;
}
.m-sidebar__close:hover {
    background: var(--tc-color-rule, var(--border));
    color: var(--fg);
}

.m-sidebar__org {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.7rem 0.7rem;
    margin: 0 0.1rem 0.25rem;
    border-radius: 8px;
    background: var(--tc-color-surface-alt, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
}
.m-sidebar__org strong {
    font-size: 0.92rem;
    color: var(--fg);
}
.m-sidebar__org .m-lede {
    font-size: 0.72rem;
    color: var(--muted);
    font-family: var(--tc-font-mono, ui-monospace, monospace);
}

.m-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.1rem;
}
.m-side-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.m-side-group__title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding: 0.65rem 0.7rem 0.25rem;
    font-weight: 600;
}
.m-side-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    color: var(--tc-color-ink-soft, var(--fg));
    text-decoration: none;
    font-size: 0.89rem;
    line-height: 1.2;
    border-left: 2px solid transparent;
    transition:
        background 0.12s ease-out,
        color 0.12s ease-out,
        border-color 0.12s ease-out;
}
.m-side-link tc-icon {
    color: var(--muted);
    flex-shrink: 0;
}
.m-side-link:hover {
    background: var(--tc-color-rule, rgba(255, 255, 255, 0.04));
    color: var(--fg);
    text-decoration: none;
}
.m-side-link:hover tc-icon {
    color: var(--fg);
}
.m-side-link--active {
    background: var(--tc-color-accent-soft, rgba(110, 231, 183, 0.1));
    color: var(--fg);
    font-weight: 600;
    border-left-color: var(--accent);
}
.m-side-link--active tc-icon {
    color: var(--accent);
}

.m-sidebar__foot {
    margin-top: auto;
    padding: 0.75rem 0.55rem 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.m-sidebar__foot .m-who {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--fg);
}
.m-sidebar__foot .m-who > tc-icon {
    color: var(--muted);
}
.m-sidebar__foot .m-who strong {
    display: block;
    line-height: 1.15;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.m-sidebar__foot .m-who .m-lede {
    font-size: 0.7rem;
    color: var(--muted);
}
.m-sidebar__foot .m-linkbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    width: fit-content;
}
.m-sidebar__foot .m-linkbtn:hover {
    color: var(--fg);
    border-color: var(--tc-color-rule-strong, var(--border));
}
/* Footer inside the shell uses the same .m-footer block but with a
 * tighter top margin so it sits naturally below the main content. */
.m-shell__main .m-footer {
    margin-top: 3rem;
}

@media (max-width: 900px) {
    .m-shell {
        grid-template-columns: 1fr;
    }
    .m-shell__menu {
        display: inline-flex;
    }
    .m-shell__main {
        padding: 3.5rem 1rem 2.5rem;
    }
    .m-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 84%;
        max-width: 320px;
        z-index: 20;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
        transform: translateX(-105%);
        transition: transform 0.2s ease-out;
        border-right: 1px solid var(--border);
    }
    .m-sidebar[data-open="true"] {
        transform: translateX(0);
    }
    .m-sidebar__close {
        display: inline-flex;
    }
}

/* ---------- Org home: hero banner -------------------------------- */
.m-hero-banner {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--tc-radius-lg, 14px);
    overflow: hidden;
}
.m-hero-banner__content {
    padding: 2rem 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.m-hero-banner__content h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}
.m-hero-banner__content .m-lede {
    color: var(--muted);
    margin: 0;
}
.m-hero-banner__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.m-hero-banner__photo {
    height: 100%;
    min-height: 180px;
    overflow: hidden;
}
.m-hero-banner__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 720px) {
    .m-hero-banner {
        grid-template-columns: 1fr;
    }
    .m-hero-banner__content {
        padding: 1.5rem;
    }
    .m-hero-banner__photo {
        min-height: 160px;
        max-height: 200px;
    }
}

/* ---------- Org overview (Phase 12f) --------------------------------
 * KPI cards are now <tc-stat> from tan-compose-kit; the kit themes
 * them off --tc-color-surface / --tc-color-rule / --tc-color-ink /
 * --tc-color-success|danger|ink-muted, all of which are declared at
 * the top of this file. We only need a grid wrapper + the wide span
 * for the headline pass-rate card.
 */

.m-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1.25rem 0 1.5rem;
}
.m-stats > tc-stat {
    width: 100%;
}
.m-stat--wide {
    grid-column: span 2;
}

/* Charts: tc-chart owns its own internals. We only style the surface
 * card that wraps each chart so the dashboard reads as a grid of
 * cards. The chart itself reads --tc-chart-* tokens from :root. */
.m-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0 0 1.75rem;
}
/* Chart cards are tc-card; only override the min-width so wide
 * charts can shrink under their parent grid track. */
.m-charts > tc-card {
    min-width: 0;
    display: block;
}
.m-charts tc-chart {
    display: block;
    width: 100%;
}

/* Activity table: tc-table owns the surface + chrome. The wrapper
 * gives it room to scroll horizontally on small screens while keeping
 * the dashboard padding consistent. Custom cell renderers (defined
 * inline in org_home.html) need a few small helpers. */
#m-activity-table {
    display: block;
    /* tc-table styles its host via internal CSS; this keeps the
     * outer surface tokens consistent with the rest of the dashboard. */
    --tc-table-surface: var(--card);
    --tc-table-ink: var(--fg);
    --tc-table-soft: var(--muted);
    --tc-table-rule: var(--border);
    --tc-table-head-bg: var(--tc-color-surface-alt, var(--bg));
    --tc-table-row-hover: rgba(110, 231, 183, 0.06);
    --tc-table-accent: var(--accent);
    --tc-table-radius: 12px;
}
.m-mono {
    font-family: var(--tc-font-mono, ui-monospace, monospace);
    font-size: 0.82rem;
    color: var(--muted);
}
.m-cell-truncate {
    display: inline-block;
    max-width: 30ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.m-row-open {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: var(--tc-color-rule, rgba(255, 255, 255, 0.05));
    color: var(--fg);
    text-decoration: none;
    font-size: 0.78rem;
    border: 1px solid var(--border);
}
.m-row-open:hover {
    background: var(--tc-color-accent-soft, rgba(110, 231, 183, 0.14));
    color: var(--accent);
    text-decoration: none;
}

/* Quick-action grid: each cell is a tc-card wrapping an <a>. The
 * card owns the surface + elevation; the anchor fills it and handles
 * navigation + focus / hover feedback. */
.m-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
    margin: 0.75rem 0 0;
}
.m-quick-card {
    display: block;
    height: 100%;
    transition:
        transform 0.14s ease-out,
        box-shadow 0.14s ease-out;
}
.m-quick-card:hover {
    transform: translateY(-2px);
    --tc-card-rule: var(--accent);
}
.m-quick-link {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
}
.m-quick-link:hover {
    text-decoration: none;
    color: inherit;
}
.m-quick-link:focus-visible {
    outline: none;
    box-shadow: var(--tc-focus-ring, 0 0 0 3px rgba(110, 231, 183, 0.35));
    border-radius: var(--tc-radius-lg, 12px);
}
.m-quick-link > tc-icon {
    color: var(--accent);
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.m-quick-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.m-quick-card__text strong {
    display: block;
    color: var(--fg);
    font-weight: 600;
}
.m-quick-card__text .m-lede {
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .m-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .m-stat--wide {
        grid-column: span 2;
    }
    .m-charts {
        grid-template-columns: 1fr;
    }
    .m-cell-truncate {
        max-width: 18ch;
    }
}
@media (max-width: 560px) {
    /* tc-table scrolls horizontally inside its own host on narrow
     * viewports; we just give the row-open button a tighter footprint
     * and shrink the truncated exam name further. */
    .m-cell-truncate {
        max-width: 12ch;
    }
    .m-row-open {
        padding: 0.15rem 0.4rem;
        font-size: 0.72rem;
    }
    .m-row-open tc-icon {
        display: none;
    }
}

/* ================================================================
   AUTH — split-screen login layout
   ================================================================ */
.m-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background: var(--bg);
}

/* ── Left: form column ────────────────────────────────── */
.m-auth__form-col {
    display: flex;
    flex-direction: column;
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

.m-auth__form-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    gap: 2rem;
}

.m-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--fg);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}
.m-auth__brand:hover {
    text-decoration: none;
}

.m-auth__brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
}

.m-auth__head h1 {
    font-size: 1.65rem;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--fg);
}

.m-auth__head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ── Form fields ────────────────────────────────────── */
.m-auth__field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.m-auth__field label {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.m-auth__field input {
    box-sizing: border-box;
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--tc-radius-md, 10px);
    color: var(--fg);
    font: inherit;
    font-size: 0.95rem;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.m-auth__field input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.m-auth__field input:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.m-auth__field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--tc-focus-ring, 0 0 0 3px rgba(110, 231, 183, 0.18));
}

.m-auth__field input:-webkit-autofill {
    -webkit-text-fill-color: var(--fg);
    box-shadow: 0 0 0 30px rgba(11, 13, 18, 1) inset;
    border: 1px solid var(--border);
}

.m-auth__hint {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0;
}

.m-auth__optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.78rem;
}

/* ── Password toggle ────────────────────────────────── */
.m-auth__pw-wrap {
    position: relative;
}

.m-auth__pw-wrap input {
    padding-right: 2.8rem;
}

.m-auth__pw-toggle {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: var(--tc-radius-sm, 6px);
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}

.m-auth__pw-toggle:hover {
    color: var(--fg);
}

.m-auth__pw-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Submit button ──────────────────────────────────── */
.m-auth__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    background: var(--accent);
    color: #06140d;
    border: none;
    padding: 0.85rem 1.1rem;
    border-radius: var(--tc-radius-md, 10px);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        filter 0.12s ease,
        transform 0.05s ease;
    margin-top: 0.25rem;
}

.m-auth__submit:hover {
    filter: brightness(1.08);
}

.m-auth__submit:active {
    transform: translateY(1px);
}

.m-auth__submit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.m-auth__submit-arrow {
    transition: transform 0.12s ease;
}

.m-auth__submit:hover .m-auth__submit-arrow {
    transform: translateX(3px);
}

/* ── Divider ────────────────────────────────────────── */
.m-auth__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.m-auth__divider::before,
.m-auth__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Alt text ───────────────────────────────────────── */
.m-auth__alt {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.55;
}

.m-auth__alt a {
    color: var(--accent);
}

/* ── Stepper indicator ──────────────────────────────── */
.m-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
}

.m-stepper__dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
    transition: color 200ms ease;
}

.m-stepper__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    transition: all 250ms ease;
}

.m-stepper__label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 200ms ease;
}

.m-stepper__dot--active .m-stepper__num {
    border-color: var(--accent);
    color: #06140d;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(110, 231, 183, 0.3);
}

.m-stepper__dot--active .m-stepper__label {
    color: var(--accent);
}

.m-stepper__dot--done .m-stepper__num {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(110, 231, 183, 0.12);
}

.m-stepper__dot--done .m-stepper__label {
    color: var(--fg);
}

.m-stepper__line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 0.75rem;
    margin-bottom: 1.2rem; /* offset for label height */
    border-radius: 1px;
    transition: background 250ms ease;
}

.m-stepper__line--done {
    background: var(--accent);
}

/* ── Step panels ────────────────────────────────────── */
.m-step {
    animation: m-step-in 280ms ease both;
}

.m-step[hidden] {
    display: none;
}

@keyframes m-step-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.m-step__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
}

.m-step__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--tc-radius-md, 10px);
    color: var(--fg);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    transition:
        border-color 180ms ease,
        background 180ms ease;
}

.m-step__back:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.m-step__back:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Footer ─────────────────────────────────────────── */
.m-auth__footer {
    padding: 1.25rem 0 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.78rem;
}

.m-auth__footer-links {
    display: inline-flex;
    gap: 1.25rem;
}

.m-auth__footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.m-auth__footer-links a:hover {
    color: var(--fg);
    text-decoration: none;
}

/* ── Right: visual column ─────────────────────────── */
.m-auth__visual-col {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: #0b0d12;
    border-left: 1px solid var(--border);
}

.m-auth__visual-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.m-auth__visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(11, 13, 18, 0.85) 0%,
        rgba(11, 13, 18, 0.4) 40%,
        rgba(11, 13, 18, 0.1) 100%
    );
    z-index: 1;
}

.m-auth__visual-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2.5rem;
    width: 100%;
}

.m-auth__visual-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.m-auth__visual-caption p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

/* ── Responsive: collapse to single column ──────────── */
@media (max-width: 880px) {
    .m-auth {
        grid-template-columns: 1fr;
    }

    .m-auth__visual-col {
        display: none;
    }

    .m-auth__form-col {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .m-auth__head h1 {
        font-size: 1.35rem;
    }

    .m-auth__form-inner {
        gap: 1.5rem;
    }
}

/* ---------- Identity capture (Phase 13c) ---------------------------- */

.m-id-shell {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.m-id-head h1 {
    font-size: 1.45rem;
    margin: 0 0 0.5rem;
}
.m-id-head .m-lede {
    font-size: 0.95rem;
    max-width: 56ch;
}
.m-id-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.m-id-card {
    display: block;
}
.m-file-drop {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    margin-top: 0.6rem;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--tc-color-surface-alt, rgba(255, 255, 255, 0.02));
    cursor: pointer;
    transition:
        border-color 0.14s ease-out,
        background 0.14s ease-out;
}
.m-file-drop:hover {
    border-color: var(--accent);
}
.m-file-drop input[type="file"] {
    /* keep accessible to assistive tech but visually neutral — the
       parent label handles the click + drag affordance */
    flex: 1;
    color: var(--muted);
    background: transparent;
    border: 0;
    font: inherit;
    min-width: 0;
}
.m-file-drop__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
    pointer-events: none;
}
.m-id-actions {
    padding-top: 0.5rem;
}
