@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg:            #08080a;
    --surface:       #101013;
    --surface-2:     #16161a;
    --surface-3:     #1b1b20;
    --border:        #1e1e23;
    --border-strong: #2b2b33;

    --text:       #ededf0;
    --text-mid:   #a1a1ab;
    --text-dim:   #74747e;
    --text-faint: #55555e;

    --accent:      #10b981;
    --accent-soft: #34d399;
    --warn:        #f59e0b;
    --danger:      #ef4444;

    --nav-h: 60px;
    --radius: 12px;
    --radius-sm: 9px;

    --mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, 'Courier New', monospace;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-mid);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

::selection {
    background: rgba(16, 185, 129, 0.25);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   TOP NAV
   ============================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    border-bottom: 1px solid var(--border);
    background: rgba(8, 8, 10, 0.94);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    flex-shrink: 0;
}

.site-nav .shell {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* The mark is now /logo.svg, which carries its own tile and border. No
   background here, or it would paint a box behind the artwork. */
.nav-mark {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: block;
    border-radius: 8px;
}

.nav-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.nav-name span {
    color: var(--text-faint);
    font-weight: 400;
    margin-left: 7px;
    font-size: 12.5px;
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-ver {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

/* ============================================================
   SHELL / LAYOUT
   ============================================================ */

.shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
}

.main {
    flex: 1 0 auto;
    padding: 56px 0 72px;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 60px;
    align-items: start;
}

.col-side {
    position: sticky;
    top: calc(var(--nav-h) + 28px);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    margin-bottom: 44px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-dim);
    margin-bottom: 18px;
}

h1 {
    font-size: 34px;
    line-height: 1.18;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.9px;
    margin-bottom: 14px;
}

.lede {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-dim);
    max-width: 56ch;
}

/* Legacy subtitle (used by test.html / admin.html and inside cards) */
.subtitle {
    color: var(--text-dim);
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 22px;
}

/* ============================================================
   SECTIONS
   ============================================================ */

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

.section:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.section-head {
    margin-bottom: 20px;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.section-sub {
    font-size: 13px;
    color: var(--text-dim);
}

.section-sub code,
.flow-desc code {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-mid);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}

/* ============================================================
   FLOW LIST (how it works)
   ============================================================ */

.flow {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flow-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.flow-item:last-child {
    border-bottom: none;
}

.flow-num {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text-mid);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--mono);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flow-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.flow-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.flow-desc strong {
    color: var(--text-mid);
    font-weight: 600;
}

/* ============================================================
   SPEC TABLE
   ============================================================ */

.spec {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-key {
    font-size: 12.5px;
    color: var(--text-dim);
}

.spec-val {
    font-size: 12.5px;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

/* ============================================================
   CHIPS
   ============================================================ */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-mid);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 5px 11px;
}

/* ============================================================
   CODE BLOCK
   ============================================================ */

.code-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.code-file {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-dim);
}

.code-copy {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-mid);
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    padding: 4px 9px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.code-copy:hover {
    color: var(--text);
    border-color: #3a3a44;
}

.code-block pre {
    margin: 0;
    padding: 14px 16px;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--text-mid);
    white-space: pre;
}

.code-block .c-cmt {
    color: var(--text-faint);
}

.code-block .c-str {
    color: var(--accent-soft);
}

.code-block .c-var {
    color: #e4e4e8;
}

/* ============================================================
   NOTES
   ============================================================ */

.notes {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.note {
    display: grid;
    grid-template-columns: 5px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.note::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--border-strong);
    margin-top: 8px;
}

.note-text {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.note-text strong {
    color: var(--text-mid);
    font-weight: 600;
}

/* ============================================================
   CARD (action card + legacy card for admin/test)
   ============================================================ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
}

.card-head {
    margin-bottom: 20px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.card-sub {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.55;
}

.side-note {
    margin-top: 14px;
    font-size: 11.5px;
    color: var(--text-faint);
    text-align: center;
    line-height: 1.55;
}

/* Legacy in-card brand (admin.html, test.html) */
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 24px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: block;
    flex-shrink: 0;
}

.brand-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
}

.brand-text span {
    color: var(--text-faint);
    font-weight: 400;
    margin-left: 7px;
    font-size: 12px;
}

/* ============================================================
   PROGRESS RAIL
   ============================================================ */

.steps {
    display: flex;
    align-items: flex-start;
    margin-bottom: 22px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    width: 62px;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-faint);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.step.active .step-dot {
    background: #fff;
    border-color: #fff;
    color: #08080a;
}

.step.done .step-dot {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.45);
    color: var(--accent-soft);
}

/* Inline SVG tick — avoids missing-glyph boxes from &#10003; on systems
   whose fonts do not cover U+2713. */
.step-dot svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 3;
    fill: none;
}

.step-label {
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.step.active .step-label {
    color: var(--text-mid);
}

.step.done .step-label {
    color: var(--accent-soft);
}

.step-connector {
    flex: 1 1 auto;
    height: 1px;
    background: var(--border-strong);
    margin-top: 14px;
}

.step-connector.done {
    background: rgba(16, 185, 129, 0.4);
}

/* ============================================================
   BUTTON
   ============================================================ */

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    background: #fff;
    color: #08080a;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.1px;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.btn:hover:not(:disabled) {
    opacity: 0.88;
}

.btn:disabled {
    background: var(--surface-3);
    color: var(--text-faint);
    border-color: var(--border-strong);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--accent);
    color: #04120c;
}

.btn-secondary:disabled {
    background: var(--surface-3);
    color: var(--text-faint);
}

.btn-ghost {
    background: transparent;
    color: var(--text-mid);
    border-color: var(--border-strong);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text);
    opacity: 1;
    background: var(--surface-2);
}

/* ============================================================
   DETAIL ROWS (in-card)
   ============================================================ */

.details {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 12px;
    color: var(--text-dim);
}

.detail-value {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

/* ============================================================
   COUNTDOWN
   ============================================================ */

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-mid);
    font-size: 12.5px;
    font-weight: 500;
    margin-bottom: 12px;
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.countdown span {
    font-family: var(--mono);
    color: var(--warn);
    font-weight: 600;
}

/* ============================================================
   KEY DISPLAY
   ============================================================ */

.key-display {
    margin-top: 4px;
}

.key-label {
    font-size: 10.5px;
    color: var(--text-faint);
    margin-bottom: 9px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    font-weight: 600;
}

.key-box {
    background: var(--surface-2);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    padding: 15px 12px;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-soft);
    word-break: break-all;
    user-select: all;
    text-align: center;
}

.key-details {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}

.key-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
}

.key-detail-row:last-child {
    border-bottom: none;
}

.key-detail-label {
    font-size: 11.5px;
    color: var(--text-dim);
}

.key-detail-value {
    font-size: 11.5px;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

.copy-btn {
    margin-top: 10px;
}

/* ============================================================
   STATUS BADGE
   ============================================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    color: var(--text-mid);
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-soft);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.active::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

/* ============================================================
   ERROR
   ============================================================ */

.error {
    margin-top: 12px;
    padding: 11px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 12.5px;
    font-weight: 500;
}

/* ============================================================
   SUCCESS ICON
   ============================================================ */

.success-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.success-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-soft);
    stroke-width: 2.5;
    fill: none;
}

/* ============================================================
   SPINNER
   ============================================================ */

.spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(8, 8, 10, 0.25);
    border-top-color: #08080a;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.btn:disabled .spinner {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: var(--text-mid);
}

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

/* ============================================================
   SITE FOOTER
   ============================================================ */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
    padding: 40px 0 32px;
}

.footer-brand-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.footer-blurb {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.65;
    max-width: 40ch;
}

.footer-col-title {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-faint);
    margin-bottom: 12px;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-list li {
    font-size: 12.5px;
    color: var(--text-dim);
}

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

.footer-bar {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy,
.footer-legal {
    font-size: 11.5px;
    color: var(--text-faint);
}

/* Legacy small footer text used inside cards (admin.html / test.html) */
.footer {
    margin-top: 18px;
    text-align: center;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 500;
}

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

/* ============================================================
   NARROW SINGLE COLUMN (success.html)
   ============================================================ */

.col-narrow {
    max-width: 540px;
    margin: 0 auto;
}

.stack-actions {
    margin-top: 28px;
}

/* ============================================================
   LEGACY CONTAINER (test.html, admin.html)
   ============================================================ */

.container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .col-side {
        position: static;
        order: -1;
    }

    .main {
        padding: 36px 0 56px;
    }

    h1 {
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .shell {
        padding: 0 18px;
    }

    .main {
        padding: 28px 0 44px;
    }

    h1 {
        font-size: 24px;
        letter-spacing: -0.6px;
    }

    .lede {
        font-size: 14px;
    }

    .card {
        padding: 20px 17px;
    }

    .nav-name span {
        display: none;
    }

    .step {
        width: 54px;
    }

    .step-label {
        font-size: 9px;
        letter-spacing: 0.4px;
    }

    .key-box {
        font-size: 12px;
        padding: 13px 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 32px 0 24px;
    }

    .spec-row,
    .detail-row {
        padding-left: 13px;
        padding-right: 13px;
    }
}


/* ============================================================
   SUPPORT WIDGET
   ============================================================ */

.support-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    color: var(--text-mid);
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.support-fab:hover {
    color: var(--text);
    background: var(--surface-3);
    border-color: #3a3a44;
}

.support-fab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.support-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 4, 6, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.support-overlay.is-open {
    display: flex;
}

.support-modal {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
}

.support-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
}

.support-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
}

.support-sub {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: 3px;
}

.support-close {
    background: transparent;
    border: none;
    color: var(--text-faint);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.support-close:hover {
    color: var(--text);
}

.support-body {
    padding: 16px 20px;
    overflow-y: auto;
}

.support-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-faint);
    margin: 14px 0 6px;
}

.support-body .support-label:first-of-type {
    margin-top: 0;
}

.support-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.support-input:focus {
    outline: none;
    border-color: #3f4a6b;
}

.support-textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.55;
}

.support-counter {
    text-align: right;
    font-size: 10.5px;
    color: var(--text-faint);
    margin-top: 5px;
}

.support-note {
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--text-faint);
    line-height: 1.5;
}

.support-errbox {
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    margin-bottom: 16px;
}

.support-errlabel {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fca5a5;
    margin-bottom: 5px;
}

.support-errtext {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-mid);
    word-break: break-word;
}

.support-alert {
    margin-top: 12px;
    padding: 10px 13px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 12.5px;
}

.support-success {
    margin-top: 12px;
    padding: 10px 13px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-soft);
    font-size: 12.5px;
    font-weight: 500;
}

.support-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

/* Inline "Get help with this" link rendered beside an error message. */
.support-inline {
    display: inline-block;
    margin-top: 9px;
    background: transparent;
    border: none;
    padding: 0;
    color: #fca5a5;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.support-inline:hover {
    color: #fff;
}

@media (max-width: 560px) {
    .support-fab {
        right: 14px;
        bottom: 14px;
        padding: 9px 14px;
        font-size: 12px;
    }

    .support-modal {
        max-width: 100%;
    }
}


/* ============================================================
   PRE-STEP EXPECTATIONS + RESUME
   ============================================================ */

.prestep {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 13px 14px;
    margin-bottom: 14px;
}

.prestep-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-mid);
    line-height: 1.45;
    margin-bottom: 9px;
}

.prestep-row:last-of-type {
    margin-bottom: 0;
}

.prestep-num {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.prestep-time {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--text-faint);
}

.resume-box {
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-sm);
    padding: 15px 14px;
}

.resume-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent-soft);
    margin-bottom: 4px;
}

.resume-sub {
    font-size: 12.5px;
    color: var(--text-mid);
    line-height: 1.5;
    margin-bottom: 13px;
}

.resume-restart {
    display: block;
    width: 100%;
    margin-top: 9px;
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-faint);
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.resume-restart:hover {
    color: var(--text-mid);
}


/* ============================================================
   NAV LINKS
   ============================================================ */

.nav-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-dim);
    padding: 5px 2px;
    transition: color 0.15s ease;
}

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

.nav-link.is-active {
    color: var(--text);
    font-weight: 600;
}

.inline-link {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.inline-link:hover {
    color: var(--accent-soft);
}

/* ============================================================
   SCRIPT CATALOGUE
   ============================================================ */

.catalogue-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.catalogue-search {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.catalogue-search:focus {
    outline: none;
    border-color: #3f4a6b;
}

.catalogue-search::placeholder {
    color: var(--text-faint);
}

.catalogue-count {
    font-size: 12px;
    color: var(--text-faint);
    white-space: nowrap;
}

.catalogue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 14px;
}

.catalogue-empty {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-faint);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}

.script-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: border-color 0.15s ease;
}

.script-card:hover {
    border-color: var(--border-strong);
}

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

.script-mark {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.script-titles {
    min-width: 0;
}

.script-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
    line-height: 1.3;
    margin: 0;
}

.script-game {
    font-size: 11.5px;
    color: var(--text-faint);
    margin-top: 2px;
}

.script-desc {
    flex: 1;
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.55;
    margin: 0 0 15px;
}

.script-actions .btn {
    padding: 9px 14px;
    font-size: 12.5px;
}

.script-slug {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--text-faint);
}

@media (max-width: 560px) {
    .catalogue-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   SUPPORT: DISCORD BLOCK
   ============================================================ */

.support-discord {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 4px;
    background: rgba(88, 101, 242, 0.09);
    border: 1px solid rgba(88, 101, 242, 0.38);
    border-radius: var(--radius-sm);
}

.support-discord-main {
    flex: 1;
    min-width: 0;
}

.support-discord-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.support-discord-tag {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #c7ccff;
    background: rgba(88, 101, 242, 0.28);
    border: 1px solid rgba(88, 101, 242, 0.45);
    border-radius: 20px;
    padding: 2px 7px;
}

.support-discord-sub {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.45;
    margin-top: 3px;
}

.support-discord-btn {
    width: auto;
    flex-shrink: 0;
    padding: 9px 15px;
    font-size: 12.5px;
    background: #5865f2;
    color: #fff;
    text-decoration: none;
}

.support-discord-btn:hover {
    opacity: 0.9;
}

/* Divider between the recommended route and the fallback form. */
.support-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 4px;
}

.support-or::before,
.support-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.support-or span {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-faint);
}

@media (max-width: 460px) {
    .support-discord {
        flex-direction: column;
        align-items: stretch;
    }

    .support-discord-btn {
        width: 100%;
        text-align: center;
    }
}
