@charset "UTF-8";

:root {
    color-scheme: dark;
    --bg: #090e16;
    --panel: #131b27;
    --line: #2c394b;
    --text: #edf2fa;
    --muted: #a3b0c3;
    --accent: #65d9f5;
    --success: #81dca8;
    --warning: #efc477;
    --unavailable: #ff9aa7;
    --unknown: #b1bccd;
    --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: radial-gradient(ellipse 850px 540px at 76% 0%, #102036 0%, var(--bg) 80%);
    background-repeat: no-repeat;
    background-color: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
    border-radius: 3px;
}
h1, h2, h3, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--text); background: #275477; }
.shell { width: min(1080px, 100% - 96px); margin: auto; }

/* The open arch repeats in the wordmark, the hero and the favicon. */
.site-header {
    height: 116px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.site-header::after {
    content: "";
    position: absolute;
    width: 62px;
    height: 1px;
    left: 0;
    bottom: -1px;
    background: var(--accent);
    box-shadow: 0 0 12px #65d9f52b;
}
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -.8px;
}
.brand-light { font-weight: 400; color: #c3d1e6; }
.brand-mark {
    width: 42px;
    height: 46px;
    background: #111d2c;
    border: 1px solid #395269;
    border-radius: 15px 15px 8px 8px;
    display: grid;
    place-content: center;
    box-shadow: inset 0 1px 0 #91d9ff10, 0 0 20px #65d9f508;
}
.brand-mark svg { width: 35px; height: 35px; }
.mark-gate { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.mark-v { stroke: var(--text); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.header-note {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-orbit {
    width: 12px;
    height: 15px;
    border: 1px solid #73b3d2;
    border-radius: 50%;
    transform: rotate(25deg);
}
.intro { position: relative; padding: 65px 0 53px; overflow: hidden; }
.eyebrow {
    font: 11px var(--mono);
    letter-spacing: 2.4px;
    color: var(--accent);
    margin-bottom: 19px;
}
.eyebrow span { color: #8098b9; margin-right: 8px; }
h1 {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.2;
    letter-spacing: -1.8px;
    font-weight: 550;
}
h1 span { color: #a8ddf1; }
.intro-description { font-size: 15px; line-height: 1.8; color: var(--muted); margin-top: 18px; }
.portal-art {
    position: absolute;
    right: 52px;
    top: 17px;
    width: 220px;
    height: 235px;
    pointer-events: none;
    animation: portal-arrive 1.2s ease-out both;
}
.orbit {
    position: absolute;
    width: 160px;
    height: 184px;
    left: 30px;
    top: 6px;
    border: 1px solid #386783;
    border-bottom-color: #213348;
    border-radius: 50%;
    transform: rotate(-15deg);
    box-shadow: inset 0 0 24px #43c9fa05, 0 0 28px #43c9fa05;
}
.orbit-two {
    width: 188px;
    height: 206px;
    top: -5px;
    left: 16px;
    border-color: #253d54;
    border-right-color: #3c7894;
    transform: rotate(15deg);
    box-shadow: none;
}
.art-core {
    position: absolute;
    top: 27px;
    left: 68px;
    width: 84px;
    height: 128px;
    border: 1px solid #70c9e6;
    border-bottom-color: #34546e;
    border-radius: 44px 44px 8px 8px;
    background: linear-gradient(180deg, #18364b 0%, #101c2b 80%);
    display: grid;
    place-content: center;
    font-size: 35px;
    font-weight: 450;
    color: #d0f3ff;
    box-shadow: 0 0 28px #52ccfa13, inset 0 0 18px #52ccfa06;
}
.art-core::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid #39556d;
    border-radius: 38px 38px 3px 3px;
}
.portal-horizon {
    position: absolute;
    left: 48px;
    top: 175px;
    width: 124px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6bcdec, transparent);
}
.art-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    font: 9px var(--mono);
    letter-spacing: 2px;
    color: #98b1c9;
}
@keyframes portal-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* The overall surface stays neutral in every state. Only the indicator is semantic. */
.overall-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 25px;
    border: 1px solid #34445a;
    border-radius: 10px;
    background: #121c29;
    box-shadow: inset 0 1px 0 #a1c8ee08, 0 6px 20px #00000012;
}
.overall-symbol {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 1px solid #3b4b61;
    border-radius: 50%;
    background: #0e1723;
    font: 22px/1 var(--mono);
    text-align: center;
}
.signal-operational { color: var(--success); }
.signal-degraded { color: var(--warning); }
.signal-unknown { color: var(--unknown); }
.overall-copy { flex: 1; min-width: 0; }
.overall-copy h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.overall-copy p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.refresh-link {
    color: #c2d6eb;
    font: 12px var(--mono);
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color .18s;
}
.refresh-link span { font-size: 20px; }
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 34px 0 17px;
    gap: 12px;
}
.section-heading h2 { font-size: 18px; font-weight: 550; letter-spacing: -.3px; }
.section-heading > span { font: 10px var(--mono); letter-spacing: 1.7px; color: #9aaec8; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.service-card {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 27px 28px 0;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 #ffffff04, 0 12px 30px #00000020;
    transition: border-color .2s, background .2s, transform .2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.mikeflix-card:is(:hover, :focus-within) { background: #162030; }
.mikeflix-card { border-color: #3b526a; }
.mikeflix-card:hover { transform: translateY(-2px); border-color: #6096b4; }
.mikeflix-card::before {
    content: "";
    height: 2px;
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    background: linear-gradient(90deg, var(--accent), #6699e1);
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 23px; }
.service-icon {
    display: grid;
    place-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: 1px solid #35536b;
    border-radius: 12px;
    font-size: 31px;
    background: #142b3d;
    color: #8de4fc;
    font-weight: 700;
    line-height: 1;
}
.service-icon.plex { color: #d1def0; background: #202c3e; border-color: #415068; font-size: 27px; }
.service-card h3 { font-size: 27px; letter-spacing: -.9px; font-weight: 550; }
.service-description { font-size: 14px; color: var(--muted); margin: 8px 0 27px; max-width: 360px; min-height: 46px; }
.service-link, .service-note {
    border-top: 1px solid var(--line);
    margin-top: auto;
    min-height: 65px;
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 550;
}
.service-link { justify-content: space-between; color: var(--accent); }
.service-link::after { content: ""; position: absolute; inset: 0; }
.service-link:focus-visible { outline-offset: 3px; }
.service-card:has(.service-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.service-link span {
    display: grid;
    place-content: center;
    width: 29px;
    height: 29px;
    border: 1px solid #3d6079;
    border-radius: 50%;
    font-size: 18px;
    transition: transform .2s, background .2s;
}
.mikeflix-card:hover .service-link span { transform: translate(1px, -1px); background: #19354a; }
.service-note { gap: 9px; color: var(--muted); font-weight: 400; }
.service-note span { font-size: 17px; }

/* Failed checks keep their existing API state. The UI label "Unavailable" is red;
   an aggregate degraded state uses amber. Unknown never implies a confirmed outage. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font: 11px var(--mono);
    letter-spacing: .1px;
    padding: 6px 9px;
    background: #182230;
    border: 1px solid #354357;
    border-radius: 6px;
    color: var(--unknown);
}
.badge.operational { color: var(--success); border-color: #344d46; background: #15242a; }
.badge.unavailable { color: var(--unavailable); border-color: #63414f; background: #271e2a; }
.badge.unknown, .badge.not-monitored { color: var(--unknown); background: #192230; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.unknown .status-dot, .not-monitored .status-dot { background: none; border: 1px solid currentColor; }
.unavailable .status-dot { border-radius: 1px; transform: rotate(45deg); }

.infrastructure-section { margin-top: 37px; }
.infrastructure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #101823;
}
.infrastructure-item {
    padding: 22px 24px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    column-gap: 13px;
    row-gap: 4px;
    align-items: center;
    min-width: 0;
}
.infrastructure-item:nth-child(odd) { border-right: 1px solid var(--line); }
.infrastructure-item:nth-child(n+3) { border-top: 1px solid var(--line); }
.infra-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    font-size: 23px;
    color: #91a9c5;
    width: 22px;
    text-align: center;
}
.infra-name { display: contents; }
.infra-name h3 { grid-column: 2; grid-row: 1; font-size: 13px; font-weight: 550; }
.infra-name p { grid-column: 2 / -1; grid-row: 2; font-size: 12px; color: var(--muted); }
.infrastructure-item > .expiry-pair, .infrastructure-item > .badge { grid-column: 3; grid-row: 1; justify-self: end; }
.infrastructure-item .badge { font-size: 10px; background: transparent; border: 0; padding: 0; }
.status-footnote {
    margin-top: 17px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #a5b3c6;
    font: 11px/1.7 var(--mono);
}
.status-footnote p:first-child { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.footnote-dot { width: 4px; height: 4px; background: #a5b3c6; border-radius: 50%; margin-right: 3px; }
.monitoring-note { font-size: 12px; color: #99a9bd; margin-top: 8px; }
.site-footer {
    margin-top: 54px;
    padding: 25px 0 35px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;
    color: #99a9bd;
}
.site-footer a { font: 11px var(--mono); align-self: center; }
.site-footer a span { margin-left: 8px; }
.skip-link { position: absolute; left: 16px; top: -80px; background: var(--accent); color: var(--bg); padding: 10px 16px; z-index: 10; }
.skip-link:focus { top: 16px; }
.skip-link:hover { color: var(--bg); }
.no-script { margin-top: 16px; color: var(--muted); font-size: 13px; }
.no-script a { text-decoration: underline; }

/* Existing expiry behaviour: these discrete visibility timers communicate stale
   results even without HTMX. They remain enabled with reduced-motion preferences. */
.expiry-pair { display: grid; }
.expiry-pair > .fresh, .expiry-pair > .expired { grid-area: 1 / 1; align-self: center; }
.fresh { animation: expire var(--fresh-for, 0s) step-end forwards; }
.expired { visibility: hidden; animation: reveal var(--fresh-for, 0s) step-end forwards; }
@keyframes expire { from { visibility: visible; } to { visibility: hidden; } }
@keyframes reveal { from { visibility: hidden; } to { visibility: visible; } }

@media (min-width: 1400px) {
    .shell { width: 1080px; }
    .intro { padding-top: 78px; padding-bottom: 65px; }
    .portal-art { top: 35px; }
    .site-header { height: 126px; }
}
@media (max-width: 900px) {
    .shell { width: calc(100% - 56px); }
    .portal-art { right: 0; opacity: .8; transform: scale(.9); animation: none; }
    .intro-description { max-width: 420px; }
    .infrastructure-item { padding: 20px 16px; column-gap: 10px; }
    .service-card { padding-left: 23px; padding-right: 23px; }
}
@media (max-width: 700px) {
    .shell { width: calc(100% - 40px); }
    .site-header { height: 86px; }
    .brand { font-size: 20px; gap: 11px; }
    .brand-mark { width: 34px; height: 38px; border-radius: 12px 12px 6px 6px; }
    .brand-mark svg { width: 29px; height: 29px; }
    .header-note { font-size: 10px; }
    .header-orbit { display: none; }
    .intro { padding: 40px 0 31px; }
    .eyebrow { font-size: 10px; letter-spacing: 2px; margin-bottom: 16px; }
    h1 { font-size: 34px; max-width: 330px; letter-spacing: -1.3px; }
    .intro-description { font-size: 14px; max-width: 340px; }
    .intro-description br { display: none; }
    .portal-art { display: none; }
    .overall-panel { padding: 18px 16px; gap: 11px; display: grid; grid-template-columns: 32px minmax(0, 1fr); }
    .overall-symbol { width: 32px; height: 32px; font-size: 18px; }
    .overall-copy h2 { font-size: 14px; }
    .overall-copy p { font-size: 12px; line-height: 1.6; }
    .refresh-link { grid-column: 2; justify-self: start; min-height: 44px; font-size: 11px; }
    .section-heading { margin-top: 28px; margin-bottom: 14px; }
    .section-heading h2 { font-size: 17px; }
    .section-heading > span { font-size: 9px; letter-spacing: 1.1px; }
    .service-grid { grid-template-columns: 1fr; gap: 15px; }
    .service-card { padding: 23px 23px 0; }
    .card-top { margin-bottom: 16px; }
    .service-card h3 { font-size: 26px; }
    .service-description { min-height: 0; max-width: none; margin-bottom: 22px; font-size: 14px; }
    .service-link, .service-note { min-height: 59px; }
    .infrastructure-section { margin-top: 29px; }
    .infrastructure-grid { grid-template-columns: 1fr; }
    .infrastructure-item { padding: 19px 17px; column-gap: 12px; }
    .infrastructure-item:nth-child(odd) { border-right: 0; }
    .infrastructure-item:nth-child(n+2) { border-top: 1px solid var(--line); }
    .status-footnote { flex-direction: column; gap: 3px; font-size: 10px; }
    .monitoring-note { font-size: 11px; margin-top: 10px; max-width: 340px; }
    .site-footer { margin-top: 35px; padding: 22px 0 27px; flex-direction: column; gap: 9px; font-size: 11px; }
    .site-footer a { align-self: start; }
}
@media (max-width: 360px) {
    .shell { width: calc(100% - 28px); }
    .header-note { max-width: 65px; line-height: 1.4; text-align: right; }
    h1 { font-size: 30px; }
    .section-heading > span { font-size: 8px; }
    .infrastructure-item { column-gap: 9px; padding: 18px 12px; }
    .infra-name h3 { font-size: 12px; }
    .infra-name p { font-size: 11px; }
    .infrastructure-item .badge { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-art { animation: none; }
    .service-card, .service-link span, .refresh-link { transition: none; }
    .mikeflix-card:hover, .mikeflix-card:hover .service-link span { transform: none; }
}
