/* Platzeo status page. Tokens follow web/app/globals.css; the status and
   series colors come from the validated data-viz palette and always appear
   with an icon and a word, never as color alone. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --surface: #f7f9fb;
  --surface-raised: #ffffff;
  --surface-sunk: #e8ecef;
  --rule: #dde3e8;
  --text: #191c1e;
  --text-2: #3f484f;
  --text-muted: #5d676e;
  --primary: #14422b;
  --link: #14422b;
  --inverse: #1e2528;
  --inverse-text: #e8ecef;

  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --maintenance: #4a6572;
  --none: #dde3e8;
  --icon-ink: #ffffff;
  --icon-ink-dark: #3a2a00;

  --series: #4a6572;
  --ph-1: #2a78d6;
  --ph-2: #eb6834;
  --ph-3: #1baf7a;
  --ph-4: #eda100;
  --ph-5: #e87ba4;

  --pad: 1.25rem;
  --gap: 32px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #121517;
    --surface-raised: #1a1e21;
    --surface-sunk: #22282c;
    --rule: #2c3338;
    --text: #e8ecef;
    --text-2: #c3cad0;
    --text-muted: #9aa3aa;
    --primary: #8fd1a8;
    --link: #8fd1a8;
    --inverse: #e8ecef;
    --inverse-text: #191c1e;
    --none: #2c3338;
    --series: #8fb3c4;
    --ph-1: #3987e5;
    --ph-2: #d95926;
    --ph-3: #199e70;
    --ph-4: #c98500;
    --ph-5: #d55181;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #121517;
  --surface-raised: #1a1e21;
  --surface-sunk: #22282c;
  --rule: #2c3338;
  --text: #e8ecef;
  --text-2: #c3cad0;
  --text-muted: #9aa3aa;
  --primary: #8fd1a8;
  --link: #8fd1a8;
  --inverse: #e8ecef;
  --inverse-text: #191c1e;
  --none: #2c3338;
  --series: #8fb3c4;
  --ph-1: #3987e5;
  --ph-2: #d95926;
  --ph-3: #199e70;
  --ph-4: #c98500;
  --ph-5: #d55181;
}

@media (min-width: 768px) { :root { --pad: 2.5rem; } }
@media (min-width: 1024px) { :root { --pad: 4rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 16px/1.55 "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
}
h1, h2, h3 { font-family: "Manrope", "Inter", ui-sans-serif, sans-serif; color: var(--text); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); line-height: 1.15; font-weight: 800; }
h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
h3 { font-size: 1.05rem; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 2px; }
.muted { color: var(--text-muted); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9em; word-break: break-all; }

.page { max-width: calc(1200px + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 28px 0 8px; }
.logo img { display: block; height: 32px; width: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo img { filter: brightness(0) invert(0.92); } }
:root[data-theme="dark"] .logo img { filter: brightness(0) invert(0.92); }
.header-link { font-weight: 600; text-decoration: none; }
.header-link:hover { text-decoration: underline; }

main { display: flex; flex-direction: column; gap: 64px; padding: 48px 0 96px; }
@media (min-width: 1024px) { main { gap: 88px; padding-top: 72px; } }

/* status icons */
.icon { flex: none; display: block; }
.icon-up { color: var(--good); }
.icon-degraded { color: var(--warning); }
.icon-down { color: var(--critical); }
.icon-maintenance { color: var(--maintenance); }
.icon-unknown { color: var(--text-muted); }

/* hero */
.hero { display: flex; flex-direction: column; gap: 14px; max-width: 800px; }
.hero h1 { display: flex; align-items: center; gap: 16px; }
.hero h1 .icon { width: 1em; height: 1em; }
.hero-detail { font-size: 1.125rem; color: var(--text-2); }
.back { margin-bottom: -40px; font-weight: 600; }
.back a::before { content: "\2190\00a0"; }

/* notices */
.notices { display: flex; flex-direction: column; gap: 40px; max-width: 800px; }
.notice, .incident { display: flex; flex-direction: column; gap: 6px; }
.notice h3, .incident h3 { display: flex; gap: 10px; align-items: flex-start; }
.notice h3 .icon, .incident h3 .icon { margin-top: 2px; }
.meta { color: var(--text-muted); font-size: 0.9375rem; }
.prose { display: flex; flex-direction: column; gap: 10px; color: var(--text-2); }
.prose h3 { margin-top: 6px; font-size: 1rem; }
.prose ul { margin: 0; padding-left: 1.2em; }

/* groups: heading in the first third, rows in the other two */
.group, .history { display: grid; gap: 20px; }
@media (min-width: 1024px) {
  .group, .history, .site-footer { grid-template-columns: 1fr 2fr; column-gap: var(--gap); }
  .group-head { position: sticky; top: 24px; align-self: start; }
}
.group-head { display: flex; flex-direction: column; gap: 6px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; flex-direction: column; gap: 10px; padding: 20px 0; border-top: 1px solid var(--rule); }
.row:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 1024px) { .row:first-child { padding-top: 2px; } }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.row-name { font-weight: 600; color: var(--text); text-decoration: none; }
.row-name:hover { text-decoration: underline; }
.row-figures { display: flex; align-items: center; gap: 16px; }
.latency { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.row-message { color: var(--text-2); font-size: 0.9375rem; }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.day-strip { display: flex; flex-direction: column; gap: 10px; }
.row-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; }
.row-foot .span-short { display: none; }

/* 90 day bars; a phone shows the last 30 */
.bars { display: flex; gap: 2px; height: 34px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--none); cursor: default; }
.bar.s-up { background: var(--good); }
.bar.s-degraded { background: var(--warning); }
.bar.s-down { background: var(--critical); }
.bar:hover, .bar.is-active { opacity: 0.7; }
@media (max-width: 640px) {
  .bar:nth-child(-n + 60) { display: none; }
  .row-foot .span-long { display: none; }
  .row-foot .span-short { display: inline; }
  .chart-x span:nth-child(even) { display: none; }
  .chart { grid-template-columns: 52px 1fr; }
}

/* history */
.history-list { display: flex; flex-direction: column; gap: 28px; }

/* figures: a line of label/value pairs, no boxes */
.figures { display: flex; flex-wrap: wrap; gap: 20px 40px; margin: 0; }
.figures div { display: flex; flex-direction: column-reverse; gap: 2px; }
.figures dt { color: var(--text-muted); font-size: 0.875rem; }
.figures dd { margin: 0; font-family: "Manrope", "Inter", sans-serif; font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.figures-lead dd { font-size: 1.5rem; }
.facts { display: flex; flex-direction: column; gap: 18px; }
.facts h2, main > section > h2 { margin-bottom: 4px; }
main > section { display: flex; flex-direction: column; gap: 16px; }
main > section.group, main > section.history { display: grid; }

/* chart */
.chart-section { gap: 20px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; }
.ranges { display: flex; gap: 20px; font-weight: 600; }
.ranges span[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ranges a { text-decoration: none; color: var(--text-muted); }
.ranges a:hover { color: var(--text); }
.chart { margin: 0; display: grid; grid-template-columns: 64px 1fr; grid-template-rows: clamp(180px, 30vw, 260px) 24px auto; }
.chart-y { position: relative; grid-column: 1; grid-row: 1; }
.chart-y span, .chart-x span { position: absolute; font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-y span { right: 10px; transform: translateY(-50%); }
.chart-x { position: relative; grid-column: 2; grid-row: 2; }
.chart-x span { top: 6px; transform: translateX(-50%); }
.plot { position: relative; grid-column: 2; grid-row: 1; cursor: crosshair; touch-action: pan-y; }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot .grid { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plot .area { fill: var(--series); opacity: 0.1; }
.plot .band { fill: var(--series); opacity: 0.16; }
.plot .fail { position: absolute; bottom: 0; width: 3px; height: 10px; margin-left: -1.5px; border-radius: 1px; background: var(--critical); pointer-events: none; }
.plot .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text-muted); pointer-events: none; }
.plot .dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--series); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.chart figcaption { grid-column: 2; padding-top: 10px; font-size: 0.8125rem; display: flex; align-items: center; gap: 8px; }
.fail-key { display: inline-block; width: 3px; height: 10px; border-radius: 1px; background: var(--critical); }

/* phase breakdown */
.phases { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.phasebar { display: flex; gap: 2px; height: 24px; }
.phasebar .ph { min-width: 3px; border-radius: 3px; }
.ph-1 { background: var(--ph-1); } .ph-2 { background: var(--ph-2); } .ph-3 { background: var(--ph-3); } .ph-4 { background: var(--ph-4); } .ph-5 { background: var(--ph-5); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; padding: 9px 16px 9px 0; border-top: 1px solid var(--rule); vertical-align: top; }
thead th { border-top: 0; color: var(--text-muted); font-weight: 500; font-size: 0.8125rem; padding-top: 0; }
tbody th { font-weight: 500; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num-left { font-variant-numeric: tabular-nums; white-space: nowrap; }
.phase-table .muted { font-size: 0.8125rem; }
@media (max-width: 640px) { .phase-table .muted { display: none; } }

/* tooltip */
.tip { position: fixed; z-index: 10; max-width: 260px; padding: 8px 10px; border-radius: 6px; background: var(--inverse); color: var(--inverse-text); font-size: 0.8125rem; line-height: 1.45; white-space: pre-line; pointer-events: none; box-shadow: 0 6px 24px rgb(0 0 0 / 0.18); }
.tip strong { font-weight: 600; }

/* footer */
.site-footer { display: grid; gap: 32px; padding: 48px 0 64px; border-top: 1px solid var(--rule); color: var(--text-2); }
.site-footer > div { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

@media (forced-colors: active) {
  .bar, .ph, .fail, .fail-key, .swatch { forced-color-adjust: none; border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
