:root {
    color-scheme: light;
    --ink: #10252b;
    --muted: #61747a;
    --line: #d8e4e5;
    --paper: #ffffff;
    --wash: #f7fafb;
    --brand: #104c53;
    --brand-deep: #0b4148;
    --aqua: #85dedf;
    --aqua-soft: #e7f7f7;
    --good: #16794b;
    --warn: #9b5a05;
    --bad: #b42318;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--wash);
    color: var(--ink);
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand);
    font-weight: 650;
}

.site-header {
    position: relative;
    z-index: 10;
    background: var(--brand-deep);
    color: #fff;
}

.wrap {
    width: min(1120px, 100%);
    margin-inline: auto;
    padding: 2rem 1.5rem;
}

.header-inner {
    display: flex;
    min-height: 94px;
    align-items: center;
    gap: 1.5rem;
    padding-block: 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: min(330px, 58vw);
    height: auto;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.admin-nav a,
.link-button {
    color: #fff;
}

.admin-nav form {
    margin: 0;
}

.link-button {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .2em;
    cursor: pointer;
}

.card {
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    padding: clamp(1.2rem, 4vw, 2rem);
    box-shadow: 0 10px 30px rgba(16, 37, 43, .04);
}

.narrow-card {
    max-width: 480px;
    margin-inline: auto;
}

.eyebrow {
    margin: 0 0 .65rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 760;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1 {
    margin: .25rem 0 1rem;
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

h2 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    border-radius: 999px;
    padding: .55rem 1rem;
    font-weight: 750;
}

.status-pill::before {
    width: .68rem;
    height: .68rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.operational {
    background: #e9f8f0;
    color: var(--good);
}

.degraded,
.maintenance {
    background: #fff3df;
    color: var(--warn);
}

.outage {
    background: #ffebe9;
    color: var(--bad);
}

.unknown {
    background: var(--aqua-soft);
    color: #236c73;
}

.status-message {
    font-size: 1.1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-grid span {
    display: block;
    color: var(--muted);
}

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

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.4rem;
}

.button,
button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    padding: .75rem 1rem;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--brand-deep);
}

.button:focus-visible,
.link-button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--aqua);
    outline-offset: 3px;
}

.button.secondary {
    background: #e6edef;
    color: var(--brand);
}

label {
    display: block;
    margin: .9rem 0 .3rem;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid #aeb9c3;
    border-radius: 7px;
    padding: .72rem;
    font: inherit;
}

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

.check-field {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1rem;
}

.check-field input {
    width: auto;
}

.check-field label {
    display: inline;
    margin: 0;
}

.notice {
    margin: 0 0 1rem;
    border-left: 4px solid var(--brand);
    background: #edf6f7;
    padding: .8rem 1rem;
}

.notice.success {
    border-left-color: var(--good);
    background: #e9f8f0;
}

.notice.warning {
    border-left-color: var(--warn);
    background: #fff7e9;
}

.notice.error {
    border-left-color: var(--bad);
    background: #fff0ef;
}

.notice ul {
    margin-bottom: 0;
}

.item {
    border-top: 1px solid var(--line);
    padding: 1rem 0;
}

.item:first-of-type {
    border-top: 0;
}

.item p {
    margin: .25rem 0;
}

.item-actions,
.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.title-row h1 {
    margin-bottom: 0;
}

.item-list {
    margin-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.list-link {
    display: block;
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: .8rem;
    text-align: left;
    vertical-align: top;
}

.diagnostics {
    margin: 0;
}

.diagnostics div {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) 2fr;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: .6rem 0;
}

dt {
    font-weight: 700;
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Client-facing status page */

.client-status-page {
    background: #fbfdfd;
}

.status-wrap {
    width: min(1280px, 100%);
    padding-top: 0;
    padding-bottom: 0;
}

.status-hero {
    position: relative;
    display: flex;
    min-height: 700px;
    align-items: center;
    overflow: hidden;
    padding: 5.5rem 0 5rem;
}

.status-content {
    position: relative;
    z-index: 2;
    width: min(830px, 72%);
}

.status-content .eyebrow {
    margin-bottom: 1.25rem;
    color: #526a71;
    font-size: .92rem;
    letter-spacing: .18em;
}

.status-content h1 {
    max-width: 820px;
    margin: 0 0 1.6rem;
    font-size: clamp(3.25rem, 5.6vw, 5rem);
    font-weight: 760;
    letter-spacing: -.055em;
    line-height: .98;
}

.status-content .status-message {
    max-width: 690px;
    margin: 1.8rem 0 0;
    color: #30464c;
    font-size: 1.2rem;
    overflow-wrap: anywhere;
}

.brand-orb {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -190px;
    width: 610px;
    height: 610px;
    overflow: hidden;
    opacity: .13;
    transform: translateY(-50%);
    pointer-events: none;
}

.brand-orb img {
    display: block;
    width: auto;
    max-width: none;
    height: 100%;
}

.status-summary {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 2.7rem 0 0;
}

.status-summary div {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: 0 2.2rem;
}

.status-summary div:first-child {
    padding-left: 0;
}

.status-summary div + div {
    border-left: 1px solid #b9c9cc;
}

.status-summary dt {
    white-space: nowrap;
}

.status-summary dd {
    color: var(--muted);
}

.status-actions {
    align-items: center;
    margin-top: 2.8rem;
    gap: 2rem;
}

.status-actions .button {
    max-width: 100%;
    min-width: 220px;
    padding: 1rem 1.35rem;
    text-align: center;
}

.status-actions .button.quiet {
    min-width: 0;
    border-radius: 0;
    border-bottom: 2px solid currentColor;
    background: transparent;
    color: var(--brand);
    padding: .25rem 0;
}

.status-actions .button.quiet:hover {
    color: var(--ink);
}

.maintenance-band {
    display: grid;
    grid-template-columns: minmax(210px, .7fr) minmax(0, 1.8fr);
    gap: 3rem;
    border-top: 1px solid var(--line);
    padding: 2.6rem 0 3rem;
}

.maintenance-heading .eyebrow {
    margin-bottom: .35rem;
}

.maintenance-heading h2 {
    margin: 0;
    font-size: 1.2rem;
}

.maintenance-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 2rem;
}

.maintenance-content > p {
    margin: 0;
}

.maintenance-item {
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
}

.maintenance-item + .maintenance-item {
    margin-top: 1rem;
}

.maintenance-item p {
    margin: .25rem 0;
}

.time-note {
    color: var(--muted);
    font-size: .9rem;
    white-space: nowrap;
}

@media (max-width: 840px) {
    .status-hero {
        min-height: auto;
        padding: 4rem 0 4.5rem;
    }

    .status-content {
        width: 100%;
    }

    .status-content h1 {
        max-width: 650px;
        font-size: clamp(2.8rem, 10vw, 4.5rem);
    }

    .brand-orb {
        top: 1.5rem;
        right: -190px;
        width: 400px;
        height: 400px;
        transform: none;
    }

    .status-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .status-summary div {
        display: grid;
        grid-template-columns: minmax(150px, 190px) 1fr;
        padding: 0;
    }

    .status-summary div + div {
        border-left: 0;
    }

    .maintenance-band,
    .maintenance-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .time-note {
        white-space: normal;
    }
}

@media (max-width: 620px) {
    .wrap {
        padding-inline: 1.25rem;
        padding-top: 1.25rem;
    }

    .header-inner {
        min-height: 80px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-block: 1rem;
    }

    .brand-logo {
        width: min(260px, 78vw);
    }

    .admin-nav {
        width: 100%;
        margin-left: 0;
    }

    .title-row,
    .item-actions {
        display: block;
    }

    .title-row .button,
    .item-actions form {
        margin-top: 1rem;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        display: block;
        border-bottom: 1px solid var(--line);
        padding: 1rem 0;
    }

    td {
        border: 0;
        padding: .2rem 0;
    }

    .diagnostics div {
        display: block;
    }

    .diagnostics dd {
        margin-top: .2rem;
    }

    .status-wrap {
        padding-top: 0;
        padding-bottom: 0;
    }

    .status-hero {
        padding: 3.5rem 0;
    }

    .status-content .eyebrow {
        font-size: .8rem;
    }

    .status-content h1 {
        max-width: 540px;
        font-size: clamp(2.5rem, 13vw, 3.6rem);
        line-height: 1.02;
    }

    .status-content .status-message {
        font-size: 1.05rem;
    }

    .brand-orb {
        top: 2.25rem;
        right: -185px;
        width: 330px;
        height: 330px;
        opacity: .09;
    }

    .status-summary {
        margin-top: 2.25rem;
    }

    .status-summary div {
        display: block;
    }

    .status-summary dd {
        margin-top: .15rem;
    }

    .status-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2.4rem;
    }

    .status-actions .button {
        width: 100%;
        min-width: 0;
    }

    .status-actions .button.quiet {
        width: fit-content;
    }

    .maintenance-band {
        padding: 2rem 0 2.5rem;
    }
}
