:root {
    --bg: #071126;
    --panel: rgba(255, 255, 255, 0.97);
    --line: #d6dff0;
    --text: #12254a;
    --muted: #5f7294;
    --accent: #1f76ff;
    --accent-2: #6d35d5;
    --success: #0b8b63;
    --danger: #cc4a4a;
    --focus: #ffbf47;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Aptos", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(31, 118, 255, 0.18), transparent 24%),
        linear-gradient(180deg, #071126 0%, #0b1835 100%);
    color: #f5f8ff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 1000;
    padding: 12px 16px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
}

.shell {
    max-width: 1460px;
    margin: 0 auto;
    padding: 24px;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.brand-link {
    color: #f5f8ff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero,
.panel,
.metric-card,
.stage-card,
.info-card,
.timeline-step {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.hero {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 18px;
    padding: 24px;
    margin-bottom: 20px;
    color: var(--text);
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.lede,
.meta {
    color: var(--muted);
}

.helper-text {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric-card {
    padding: 18px;
    color: var(--text);
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
}

.metric-small {
    font-size: 22px;
    line-height: 1.2;
}

.layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.left-column,
.right-column {
    display: grid;
    gap: 20px;
    align-content: start;
}

.panel {
    padding: 20px;
    color: var(--text);
}

.panel-heading {
    margin-bottom: 14px;
}

.stage-stack,
.info-stack,
.timeline {
    display: grid;
    gap: 12px;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.stage-card,
.info-card,
.timeline-step {
    padding: 16px;
}

.security-card {
    border-width: 1px;
    border-style: solid;
}

.security-card-healthy {
    background: #eefcf5;
    border-color: #b8e7d0;
}

.security-card-watch {
    background: #fff9e8;
    border-color: #efd798;
}

.security-card-attention {
    background: #fff3f3;
    border-color: #efc1c1;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.action-row.compact {
    margin-top: 10px;
}

.pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf4ff;
    border: 1px solid #d9e5fb;
    color: var(--text);
    font-size: 12px;
}

.tool-form {
    display: grid;
    gap: 14px;
}

.inline-tool {
    margin-top: 16px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

input,
select,
textarea,
button {
    font: inherit;
    border-radius: 12px;
}

a,
button,
input,
select,
textarea {
    transition: box-shadow 120ms ease, transform 120ms ease, background 120ms ease;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fbfdff;
    color: var(--text);
}

textarea {
    min-height: 96px;
    resize: vertical;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 191, 71, 0.2);
}

.button {
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.button.secondary {
    background: linear-gradient(135deg, #263f7b, #12254a);
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.button-link.ghost {
    background: #edf4ff;
    color: var(--text);
    border: 1px solid #d9e5fb;
}

.button:hover,
.button-link:hover {
    transform: translateY(-1px);
}

.banner,
.json-box {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
}

.banner {
    border: 1px solid var(--line);
}

.banner.neutral {
    background: #f4f8ff;
    color: #35507a;
}

.banner.success {
    background: #eafff8;
    border-color: #bbe8d8;
    color: var(--success);
}

.banner.danger {
    background: #fff2f2;
    border-color: #efc9c9;
    color: var(--danger);
}

.json-box {
    background: #0f1d3d;
    color: #f5f8ff;
    white-space: pre-wrap;
    overflow: auto;
    min-height: 72px;
}

.summary-card {
    padding: 18px;
    border-radius: 18px;
    background: #f6f9ff;
    border: 1px solid #dbe7fb;
}

.card-topline,
.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.status-dot.success {
    background: var(--success);
}

.status-dot.danger {
    background: var(--danger);
}

.timeline-tag {
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf4ff;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.tone-healthy {
    background: #eafff8;
    color: var(--success);
}

.tone-watch {
    background: #fff7de;
    color: #8d6500;
}

.tone-attention {
    background: #fff2f2;
    color: var(--danger);
}

.operator-callout {
    box-shadow: inset 0 0 0 1px rgba(150, 38, 38, 0.06);
}

.issue-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--text);
}

.action-card {
    border-left: 5px solid #d9e5fb;
}

.action-card.priority-high {
    border-left-color: var(--danger);
}

.action-card.priority-medium {
    border-left-color: #d49a13;
}

.action-card.priority-normal {
    border-left-color: var(--success);
}

.current-version {
    border-color: #94c0ff;
    box-shadow: 0 10px 30px rgba(31, 118, 255, 0.12);
}

.control-card {
    border-left: 5px solid #d9e5fb;
}

.control-card-healthy {
    border-left-color: var(--success);
}

.control-card-watch {
    border-left-color: #d49a13;
}

.control-card-attention {
    border-left-color: var(--danger);
}

@media (max-width: 1100px) {
    .top-nav,
    .hero,
    .layout {
        grid-template-columns: 1fr;
    }

    .top-nav {
        display: grid;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }
}
