:root {
    color-scheme: light;
    --navy: #071f35;
    --navy-soft: #123650;
    --copper: #b76b43;
    --green: #16845b;
    --green-soft: #e7f5ef;
    --amber: #aa6a13;
    --amber-soft: #fff4df;
    --red: #b43a3a;
    --red-soft: #fdecec;
    --ink: #172532;
    --muted: #5d6b77;
    --line: #dbe3e9;
    --surface: #ffffff;
    --background: #f3f6f8;
    --max-width: 1180px;
}

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

html {
    background: var(--background);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--background);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
}

.shell {
    width: min(calc(100% - 32px), var(--max-width));
    margin-inline: auto;
}

.site-header {
    color: #ffffff;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-header__inner {
    display: flex;
    min-height: 76px;
    width: min(calc(100% - 32px), var(--max-width));
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}

.brand img {
    width: 68px;
    height: 48px;
    object-fit: contain;
}

.brand span {
    min-width: 0;
}

.brand strong,
.brand small {
    display: block;
    letter-spacing: 0;
}

.brand strong {
    font-family: Montserrat, Inter, sans-serif;
    font-size: 14px;
}

.brand small {
    margin-top: 2px;
    color: #bac8d3;
    font-size: 11px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.monitor-label {
    color: #d4dee6;
    font-size: 13px;
    font-weight: 600;
}

.icon-button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
    color: var(--navy);
    background: #ffffff;
    outline: none;
}

.refresh-glyph {
    display: block;
    font-size: 24px;
    line-height: 1;
}

.icon-button.is-loading .refresh-glyph {
    animation: rotate 0.8s linear infinite;
}

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

.overview {
    color: #ffffff;
    background: var(--navy-soft);
    border-bottom: 4px solid var(--copper);
}

.overview__inner {
    display: grid;
    min-height: 286px;
    padding-block: 52px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 48px;
}

.overview__copy {
    max-width: 720px;
}

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

.overview .eyebrow {
    color: #e0a580;
}

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1,
h2 {
    margin: 0;
    font-family: Montserrat, Inter, sans-serif;
    letter-spacing: 0;
}

h1 {
    font-size: 44px;
    line-height: 1.12;
}

h2 {
    font-size: 25px;
    line-height: 1.25;
}

.overview__summary {
    max-width: 660px;
    margin: 18px 0 0;
    color: #e2eaf0;
    font-size: 18px;
}

.overview__updated {
    margin: 14px 0 0;
    color: #acbdca;
    font-size: 13px;
}

.status-block {
    display: flex;
    min-width: 230px;
    padding: 20px;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
}

.status-block small,
.status-block strong {
    display: block;
}

.status-block small {
    color: #bac8d3;
    font-size: 12px;
}

.status-block strong {
    margin-top: 3px;
    font-size: 17px;
}

.status-indicator {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background: #9ca8b2;
    border: 3px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
}

body[data-state="operational"] .status-indicator,
body[data-state="running"] .status-indicator {
    background: #39c68b;
}

body[data-state="attention"] .status-indicator {
    background: #f1a238;
}

.metrics {
    padding-block: 28px;
    background: var(--background);
}

.metrics__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric {
    display: grid;
    min-height: 132px;
    padding: 20px;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    column-gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric-icon {
    grid-row: 1 / 3;
    color: var(--copper);
    font-size: 22px;
    font-weight: 700;
}

.metric span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.metric strong {
    margin-top: 10px;
    align-self: end;
    font-size: 18px;
}

.content-band {
    padding-block: 48px;
    background: var(--background);
    border-top: 1px solid var(--line);
}

.content-band--white {
    background: var(--surface);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
}

.section-heading > p {
    max-width: 540px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.section-heading--compact {
    display: block;
}

.schedule-grid {
    display: grid;
    margin-top: 26px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.schedule-slot {
    display: grid;
    min-height: 126px;
    padding: 18px;
    align-content: start;
    background: #f7f9fa;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.schedule-slot strong {
    color: var(--navy);
    font-size: 24px;
}

.schedule-slot span {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.schedule-slot small {
    margin-top: 12px;
    color: var(--copper);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.schedule-slot--next {
    background: var(--green-soft);
    border-color: #77bda3;
}

.schedule-slot--next small {
    color: var(--green);
}

.run-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 42px;
    align-items: start;
}

.run-details {
    display: grid;
    margin: 24px 0 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.run-details div {
    min-height: 94px;
    padding: 16px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.run-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.run-details dd {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 700;
}

.process-note {
    display: flex;
    padding: 24px;
    gap: 16px;
    color: #ffffff;
    background: var(--navy);
    border-radius: 8px;
}

.process-icon {
    margin-top: 3px;
    color: #e0a580;
    font-size: 24px;
    font-weight: 700;
}

.process-note h2 {
    font-size: 19px;
}

.process-note p {
    margin: 12px 0 0;
    color: #c5d1db;
    font-size: 13px;
}

.history-wrap {
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--muted);
    background: #f1f4f6;
    font-size: 12px;
    font-weight: 700;
}

td {
    font-size: 13px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.run-result {
    font-weight: 700;
}

.run-result--success {
    color: var(--green);
}

.run-result--error {
    color: var(--red);
}

.empty-state {
    margin: 0;
    padding: 28px 18px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.site-footer {
    padding-block: 32px;
    color: #d7e0e7;
    background: var(--navy);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-footer p {
    margin: 0;
    font-size: 13px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.site-footer a {
    color: #d7e0e7;
    font-size: 13px;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .overview__inner {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .status-block {
        width: 100%;
    }

    .metrics__grid,
    .schedule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .run-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .shell,
    .site-header__inner {
        width: min(calc(100% - 24px), var(--max-width));
    }

    .site-header__inner {
        min-height: 68px;
    }

    .brand img {
        width: 58px;
        height: 42px;
    }

    .brand small,
    .monitor-label {
        display: none;
    }

    .brand strong {
        max-width: 150px;
        font-size: 12px;
        line-height: 1.25;
    }

    .overview__inner {
        min-height: 0;
        padding-block: 38px;
    }

    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 22px;
    }

    .overview__summary {
        font-size: 16px;
    }

    .metrics__grid,
    .schedule-grid,
    .run-details {
        grid-template-columns: 1fr;
    }

    .metric {
        min-height: 112px;
    }

    .section-heading,
    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .content-band {
        padding-block: 38px;
    }

    .history-wrap {
        overflow: visible;
        border: 0;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    tbody tr {
        margin-bottom: 12px;
        padding: 8px 14px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    tbody tr:last-child {
        margin-bottom: 0;
    }

    td,
    tbody tr:last-child td {
        display: grid;
        padding: 9px 0;
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 10px;
        border-bottom: 1px solid var(--line);
    }

    td:last-child,
    tbody tr:last-child td:last-child {
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
