/**
 * Build Status Matrix — standalone page styles
 *
 * Aesthetic: a Victorian engineering manifest / quality-assurance ledger.
 * Heavy use of brass, ornate corner brackets, large stamped typography,
 * and a "field report" tone. Inherits all design tokens from
 * watchly-core.css (--brass, --bg-dark, --font-display, etc.).
 */

/* ========================================================================
   PAGE FRAME
   ======================================================================== */

.status-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 32px 96px;
    color: var(--text-primary);
    position: relative;
}

/* Faint corner ornaments on the page frame itself */
.status-page::before,
.status-page::after {
    content: '';
    position: absolute;
    top: 32px;
    width: 60px;
    height: 60px;
    pointer-events: none;
    opacity: 0.5;
}
.status-page::before {
    left: 0;
    border-top: 1px solid var(--border-brass);
    border-left: 1px solid var(--border-brass);
}
.status-page::after {
    right: 0;
    border-top: 1px solid var(--border-brass);
    border-right: 1px solid var(--border-brass);
}

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

.status-hero {
    text-align: center;
    padding: 56px 24px 40px;
    position: relative;
    border-top: 1px solid var(--border-brass);
    border-bottom: 1px solid var(--border-brass);
    background:
        radial-gradient(ellipse at center top, rgba(196, 154, 26, 0.06), transparent 60%),
        linear-gradient(180deg, rgba(28, 24, 18, 0.4), rgba(19, 16, 12, 0.0));
}

.status-hero::before,
.status-hero::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 1px solid var(--brass);
}
.status-hero::before {
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom: none;
    border-left: none;
    border-right: none;
    width: 80%;
    max-width: 540px;
    height: 0;
    border-top: 1px solid var(--brass);
    box-shadow: 0 0 12px rgba(196, 154, 26, 0.25);
}
.status-hero::after {
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 540px;
    height: 0;
    border: none;
    border-bottom: 1px solid var(--brass);
    box-shadow: 0 0 12px rgba(196, 154, 26, 0.25);
}

.status-eyebrow {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.55em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 18px;
    font-weight: 600;
    /* Decorative em-dashes flanking the label */
    display: inline-flex;
    align-items: center;
    gap: 18px;
}
.status-eyebrow::before,
.status-eyebrow::after {
    content: '';
    width: 36px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass));
}
.status-eyebrow::after {
    background: linear-gradient(90deg, var(--brass), transparent);
}

.status-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.2vw, 4.4rem);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin: 0 0 14px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 0 28px rgba(196, 154, 26, 0.18);
}

.status-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 auto;
    max-width: 640px;
}

/* ========================================================================
   VERDICT STAMP — the wax-seal-like big status indicator
   ======================================================================== */

.verdict-stamp {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    padding: 14px 38px;
    border: 2px solid currentColor;
    border-radius: 4px;
    position: relative;
    transform: rotate(-1.5deg);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
    box-shadow:
        0 0 0 4px rgba(0, 0, 0, 0.25),
        inset 0 0 24px rgba(0, 0, 0, 0.35);
}

.verdict-stamp::before,
.verdict-stamp::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}
.verdict-stamp::before { top: 4px; }
.verdict-stamp::after  { bottom: 4px; }

.verdict-stamp .verdict-label {
    font-size: 1.45rem;
    line-height: 1;
    padding: 4px 0 2px;
}
.verdict-stamp .verdict-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    opacity: 0.8;
}

.verdict-operational { color: var(--success); }
.verdict-degraded    { color: var(--warning); }
.verdict-failing     { color: var(--error); }
.verdict-awaiting    { color: var(--text-muted); transform: rotate(0); }

/* ========================================================================
   ARCHIVE RIBBON — past releases
   ======================================================================== */

.archive-section {
    margin-top: 56px;
}

.archive-heading {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.archive-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-brass), transparent);
}

.archive-ribbon {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 6px 2px 18px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-brass) transparent;
}
.archive-ribbon::-webkit-scrollbar { height: 6px; }
.archive-ribbon::-webkit-scrollbar-thumb {
    background: var(--border-brass);
    border-radius: 3px;
}

.archive-medallion {
    flex: 0 0 auto;
    min-width: 130px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-display);
    transition: var(--transition-base);
    position: relative;
    text-align: center;
}
.archive-medallion::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid transparent;
    border-radius: 2px;
    pointer-events: none;
    transition: var(--transition-base);
}
.archive-medallion:hover {
    border-color: var(--border-brass);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.archive-medallion:hover::before {
    border-color: rgba(196, 154, 26, 0.25);
}
.archive-medallion .v {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.archive-medallion .d {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.05em;
}
.archive-medallion.active {
    background: linear-gradient(180deg, rgba(196, 154, 26, 0.12), rgba(196, 154, 26, 0.02));
    border-color: var(--brass);
    color: var(--brass-light);
    box-shadow:
        0 0 0 1px rgba(196, 154, 26, 0.2),
        0 0 18px rgba(196, 154, 26, 0.18);
}

/* ========================================================================
   GAUGE CARDS — instrument dials
   ======================================================================== */

.gauge-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 40px;
}

.gauge {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 22px 22px 20px;
    border-radius: 4px;
    overflow: hidden;
}
.gauge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
    opacity: 0.8;
}

.gauge-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.gauge-value {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}
.gauge-value.gauge-pass    { color: var(--success); text-shadow: 0 0 22px rgba(111, 168, 52, 0.35); }
.gauge-value.gauge-fail    { color: var(--error);   text-shadow: 0 0 22px rgba(196, 48, 48, 0.35); }
.gauge-value.gauge-neutral { color: var(--brass-light); text-shadow: 0 0 22px rgba(196, 154, 26, 0.25); }

.gauge-sub {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* ========================================================================
   MATRIX TABLE
   ======================================================================== */

.matrix-section {
    margin-top: 56px;
}

.matrix-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-brass);
    padding-bottom: 14px;
}
.matrix-heading h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}
.matrix-heading .commit {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-body);
}

.matrix-table thead th {
    font-family: var(--font-display);
    font-size: 0.66rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-brass);
    font-weight: 600;
}

.matrix-table tbody td {
    padding: 18px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    background: var(--bg-card);
    transition: var(--transition-base);
}

.matrix-table tbody tr {
    position: relative;
}
.matrix-table tbody tr td:first-child {
    border-left: 3px solid transparent;
}

.matrix-table tbody tr:hover td {
    background: var(--bg-surface);
}

.matrix-table tr.row-failing td:first-child { border-left-color: var(--error); }
.matrix-table tr.row-failing td               { background: rgba(196, 48, 48, 0.04); }
.matrix-table tr.row-failing:hover td         { background: rgba(196, 48, 48, 0.07); }
.matrix-table tr.row-passing td:first-child { border-left-color: var(--success); }
.matrix-table tr.row-other   td:first-child { border-left-color: var(--warning); }

/* Status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 6px 12px;
    border: 1px solid currentColor;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}
.status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}
.status-pill.passing { color: var(--success); }
.status-pill.failing { color: var(--error); }
.status-pill.skipped { color: var(--text-muted); }
.status-pill.pending,
.status-pill.running { color: var(--warning); }

.matrix-table .col-target {
    font-family: var(--font-display);
    font-size: 1.0rem;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    font-weight: 600;
}
.matrix-table .col-target .arch {
    display: inline-block;
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    vertical-align: middle;
}

.matrix-table .col-kernel {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.matrix-table .col-kernel .series {
    display: inline-block;
    width: 32px;
    color: var(--brass);
    font-weight: 600;
}

.matrix-table .col-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.matrix-table .col-note {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
    max-width: 320px;
}
.matrix-table .col-note.empty { color: var(--text-muted); }

/* ========================================================================
   EMPTY STATE
   ======================================================================== */

.status-empty {
    margin-top: 80px;
    text-align: center;
    padding: 80px 40px;
    border: 1px dashed var(--border-brass);
    border-radius: 4px;
    background: rgba(28, 24, 18, 0.4);
}
.status-empty .seal {
    width: 86px;
    height: 86px;
    margin: 0 auto 24px;
    border: 2px solid var(--border-brass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
    padding: 6px;
}
.status-empty h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0 0 12px;
}
.status-empty p {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* ========================================================================
   FOOTER STRIP
   ======================================================================== */

.status-footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.status-footer .sep {
    color: var(--border-brass);
    margin: 0 12px;
}

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

@media (max-width: 880px) {
    .gauge-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .status-page {
        padding: 40px 16px 64px;
    }
    .matrix-table thead {
        display: none;
    }
    .matrix-table,
    .matrix-table tbody,
    .matrix-table tr,
    .matrix-table td {
        display: block;
        width: 100%;
    }
    .matrix-table tbody tr {
        margin-bottom: 14px;
        border: 1px solid var(--border);
        background: var(--bg-card);
    }
    .matrix-table tbody td {
        background: transparent;
        border-bottom: 1px dashed var(--border);
        padding: 10px 14px;
    }
    .matrix-table tbody td:last-child {
        border-bottom: none;
    }
    .matrix-table tbody tr td:first-child {
        border-left: none;
        border-top: 3px solid transparent;
    }
    .matrix-table tr.row-failing td:first-child { border-top-color: var(--error); border-left: none; }
    .matrix-table tr.row-passing td:first-child { border-top-color: var(--success); border-left: none; }
    .matrix-table tr.row-other   td:first-child { border-top-color: var(--warning); border-left: none; }
    .matrix-table .col-note { max-width: none; }
}

/* ========================================================================
   REDUCED MOTION
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
    .verdict-stamp { transform: none; }
    .archive-medallion { transition: none; }
    .matrix-table tbody td { transition: none; }
}
