:root {
    --bg: #07111f;
    --bg-deep: #040a12;
    --surface: rgba(13, 28, 47, 0.82);
    --surface-solid: #0d1c2f;
    --surface-light: #132740;
    --line: rgba(151, 184, 226, 0.15);
    --line-strong: rgba(151, 184, 226, 0.24);
    --text: #f5f8ff;
    --muted: #9eadc1;
    --muted-bright: #cbd5e2;
    --blue: #5c8dff;
    --green: #4bd59a;
    --green-bg: rgba(42, 202, 137, 0.12);
    --yellow: #f6bf5f;
    --yellow-bg: rgba(246, 191, 95, 0.12);
    --red: #ff7182;
    --red-bg: rgba(255, 91, 113, 0.12);
    --gray: #8798ae;
    --gray-bg: rgba(135, 152, 174, 0.12);
    --shell: min(920px, calc(100vw - 40px));
    --radius-lg: 26px;
    --radius-md: 18px;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html {
    min-width: 320px;
    color-scheme: dark;
    background: var(--bg-deep);
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -10%, rgba(65, 113, 233, 0.17), transparent 36rem),
        radial-gradient(circle at 10% 40%, rgba(112, 73, 220, 0.08), transparent 30rem),
        linear-gradient(180deg, var(--bg), var(--bg-deep));
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.14;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

.shell {
    width: var(--shell);
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 9px 13px;
    color: #07111f;
    background: #fff;
    border-radius: 9px;
    transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
    outline: 3px solid rgba(105, 151, 255, 0.9);
    outline-offset: 3px;
}

.site-header {
    height: 76px;
    background: rgba(5, 13, 23, 0.76);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 760;
    letter-spacing: -0.035em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: linear-gradient(140deg, #2f70ff, #824eff);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 11px;
    box-shadow: 0 8px 28px rgba(56, 105, 255, 0.3), inset 0 1px rgba(255, 255, 255, 0.15);
}

.brand-mark svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-name {
    padding-left: 18px;
    color: var(--muted);
    border-left: 1px solid var(--line-strong);
    font-size: 14px;
    font-weight: 620;
}

.back-link {
    margin-left: auto;
    color: var(--muted-bright);
    font-size: 13px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.back-link:hover { color: #fff; }

.hero { padding: 76px 0 34px; }

.eyebrow,
.section-kicker {
    color: var(--blue);
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 22px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(75, 213, 154, 0.1), 0 0 16px rgba(75, 213, 154, 0.35);
}

.overall {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-height: 150px;
    padding: 32px 42px;
    background: linear-gradient(135deg, rgba(14, 31, 52, 0.9), rgba(10, 23, 40, 0.78));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.025);
}

.overall-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 62px;
    height: 62px;
    color: var(--gray);
    background: var(--gray-bg);
    border: 1px solid currentColor;
    border-radius: 50%;
}

.overall-icon span {
    width: 20px;
    height: 10px;
    border-left: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: translateY(-2px) rotate(-45deg);
}

.overall.status--degraded .overall-icon span,
.overall.status--outage .overall-icon span,
.overall.status--unknown .overall-icon span {
    width: 4px;
    height: 22px;
    border: 0;
    background: currentColor;
    border-radius: 3px;
    transform: none;
    box-shadow: 0 29px 0 -1px currentColor;
}

.overall.status--operational .overall-icon { color: var(--green); background: var(--green-bg); }
.overall.status--degraded .overall-icon { color: var(--yellow); background: var(--yellow-bg); }
.overall.status--outage .overall-icon { color: var(--red); background: var(--red-bg); }

.overall h1 {
    margin: 0 0 5px;
    font-size: clamp(26px, 4.2vw, 38px);
    line-height: 1.16;
    letter-spacing: -0.045em;
}

.overall p {
    max-width: 610px;
    margin: 0;
    color: var(--muted);
}

.last-updated {
    margin: 17px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.last-updated span { margin: 0 6px; color: #53667f; }

.panel {
    margin-top: 22px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(16px);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 23px;
}

.section-kicker { margin: 0 0 3px; }

.section-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.component-count,
.history-key {
    color: var(--muted);
    font-size: 12px;
    font-weight: 620;
}

.history-key {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.history-key i {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
}

.component-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.component {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-height: 83px;
    padding: 17px 20px;
    background: rgba(10, 23, 40, 0.52);
}

.component + .component { border-top: 1px solid var(--line); }

.component-dot {
    width: 9px;
    height: 9px;
    background: var(--gray);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--gray-bg);
}

.component.status--operational .component-dot,
.component-dot.status--operational { background: var(--green); box-shadow: 0 0 0 5px var(--green-bg); }
.component.status--degraded .component-dot,
.component-dot.status--degraded { background: var(--yellow); box-shadow: 0 0 0 5px var(--yellow-bg); }
.component.status--outage .component-dot,
.component-dot.status--outage { background: var(--red); box-shadow: 0 0 0 5px var(--red-bg); }

.component-copy { min-width: 0; }

.component-copy h3 {
    margin: 0 0 2px;
    font-size: 15px;
    letter-spacing: -0.015em;
}

.component-copy p {
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.component-meta {
    display: flex;
    align-items: flex-end;
    min-width: 92px;
    flex-direction: column;
}

.component-meta strong { color: var(--gray); font-size: 12px; }
.status--operational .component-meta strong { color: var(--green); }
.status--degraded .component-meta strong { color: var(--yellow); }
.status--outage .component-meta strong { color: var(--red); }
.component-meta span { color: #70829a; font-size: 11px; font-variant-numeric: tabular-nums; }

.history-bars {
    display: grid;
    grid-template-columns: repeat(30, minmax(4px, 1fr));
    gap: 5px;
    height: 56px;
}

.history-bar {
    position: relative;
    display: block;
    height: 100%;
    background: var(--gray-bg);
    border: 1px solid rgba(135, 152, 174, 0.18);
    border-radius: 5px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.history-bar:hover,
.history-bar:focus { z-index: 2; opacity: 0.82; transform: scaleY(1.08); }
.history-bar.status--operational { background: linear-gradient(180deg, #5adea5, #31b77f); border-color: rgba(75, 213, 154, 0.32); }
.history-bar.status--degraded { background: linear-gradient(180deg, #ffd57f, #dea13a); border-color: rgba(246, 191, 95, 0.38); }
.history-bar.status--outage { background: linear-gradient(180deg, #ff8997, #d94d61); border-color: rgba(255, 113, 130, 0.4); }

.history-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: #70829a;
    font-size: 11px;
}

.history-note,
.empty-history {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.empty-history {
    padding: 25px;
    background: rgba(7, 17, 31, 0.36);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    text-align: center;
}

.incident-clear,
.incident-active article {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(7, 17, 31, 0.38);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.incident-clear > span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--green);
    background: var(--green-bg);
    border-radius: 50%;
    font-weight: 800;
}

.incident-clear strong,
.incident-active strong { font-size: 14px; }
.incident-clear p,
.incident-active p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.incident-active { display: grid; gap: 10px; }

.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin: 24px 0 72px;
    padding: 17px 20px;
    color: var(--muted);
    background: rgba(10, 23, 40, 0.42);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    font-size: 12px;
}

.privacy-note > span { color: var(--blue); font-size: 18px; line-height: 1.35; }
.privacy-note p { margin: 0; }
.privacy-note strong { color: var(--muted-bright); }

.site-footer {
    padding: 26px 0 34px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 22px; }
.footer-inner a:hover { color: #fff; }

@media (max-width: 680px) {
    :root { --shell: min(100% - 28px, 920px); }
    .site-header { height: 68px; }
    .page-name { display: none; }
    .hero { padding-top: 48px; }
    .overall { align-items: flex-start; padding: 26px 22px; gap: 16px; }
    .overall-icon { width: 48px; height: 48px; }
    .overall-icon span { transform: translateY(-2px) rotate(-45deg) scale(0.8); }
    .overall.status--degraded .overall-icon span,
    .overall.status--outage .overall-icon span,
    .overall.status--unknown .overall-icon span { transform: scale(0.75); }
    .panel { padding: 22px 16px; }
    .section-heading { align-items: flex-start; }
    .component { grid-template-columns: 10px minmax(0, 1fr); padding: 16px; }
    .component-meta { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 8px; min-width: 0; }
    .component-copy p { white-space: normal; }
    .history-bars { gap: 3px; height: 48px; }
    .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
    .back-link { font-size: 0; }
    .back-link span { font-size: 17px; }
    .overall { flex-direction: column; }
    .overall h1 { font-size: 27px; }
    .section-heading { flex-direction: column; gap: 8px; }
    .history-key { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
