/* status.blitz.cloud - DESIGN.md tokens (Geist). One bold thing: the system map. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #fafafa; --surface: #ffffff; --surface2: #f2f2f2; --border: #eaeaea; --border2: #d4d4d4;
  --fg: #171717; --muted: #666666; --faint: #717171; --blue: #0070f3; --link: #0068d6;
  --success: #45a557; --success-fg: #0f7b3e; --warn: #a35200; --warn-dot: #ff9300; --error: #cb2a2f;
  --partial: #e5484d; --maint: #0070f3; --nodata: #e4e4e4; --shadow: 0 1px 2px rgba(0,0,0,.04);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --surface: #0a0a0a; --surface2: #1a1a1a; --border: #2e2e2e; --border2: #454545;
    --fg: #ededed; --muted: #a1a1a1; --faint: #858585; --blue: #52a8ff; --link: #52a8ff;
    --success: #62c073; --success-fg: #62c073; --warn: #ff990a; --warn-dot: #ff990a; --error: #ff6166;
    --partial: #ff8a8e; --maint: #52a8ff; --nodata: #242424; --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.6 "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px;
}
code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; background: var(--surface2); padding: 1px 5px; border-radius: 5px; }
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.25; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
h3 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 26px 0 8px; letter-spacing: -0.01em; }
.aside { color: var(--muted); font-size: 13px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; border-radius: 8px; z-index: 5; }

.top, main, .foot { max-width: 960px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand-sub { font-weight: 400; color: var(--muted); }
.top nav { display: flex; gap: 18px; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--fg); }

main > section { margin: 0 0 56px; }

/* state glyphs: shape and word, never colour alone */
.glyph { width: 16px; height: 16px; flex: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glyph circle, .glyph rect, .glyph path { stroke: currentColor; fill: none; }
.g-operational { color: var(--success); }
.g-operational circle { fill: var(--success); stroke: var(--success); }
.g-operational path { stroke: #fff; }
.g-degraded { color: var(--warn-dot); }
.g-degraded path:first-child { fill: var(--warn-dot); }
.g-degraded path + path { stroke: #000; }
.g-partial { color: var(--partial); }
.g-partial .fill { fill: var(--partial); stroke: none; }
.g-major { color: var(--error); }
.g-major rect { fill: var(--error); }
.g-major path { stroke: #fff; }
.g-maintenance { color: var(--maint); }
.g-unknown { color: var(--faint); }

/* the sentence on top */
.hero { padding: 40px 0 8px; }
.hero h1 { display: flex; gap: 14px; align-items: flex-start; font-size: clamp(28px, 5.2vw, 44px); font-weight: 600; letter-spacing: -0.035em; margin: 0; max-width: 22ch; line-height: 1.12; text-wrap: balance; }
.hero h1 .glyph { width: 0.72em; height: 0.72em; margin-top: 0.2em; stroke-width: 1.8; }
.hero .checked { color: var(--muted); font-size: 14px; margin: 14px 0 0; font-variant-numeric: tabular-nums; }
.hero .aside { max-width: 60ch; }

.notice { border: 1px solid var(--border); border-left: 3px solid var(--warn-dot); background: var(--surface); border-radius: 10px; padding: 16px 18px; margin: -24px 0 40px !important; }
.notice.maint { border-left-color: var(--maint); }
.notice.i-major { border-left-color: var(--error); }
.notice.i-partial { border-left-color: var(--partial); }
.notice h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 6px; }
.notice p { margin: 4px 0; }

/* the system map */
.map-wrap h2 { margin-bottom: 18px; }
.map-scroll { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.map { display: block; width: 100%; min-width: 660px; height: auto; }
.map .edge { fill: none; stroke: var(--border2); stroke-width: 1.4; }
.map .edge.e-degraded { stroke: var(--warn-dot); stroke-width: 2; stroke-dasharray: 5 4; }
.map .edge.e-partial { stroke: var(--partial); stroke-width: 2.2; stroke-dasharray: 6 3; }
.map .edge.e-major { stroke: var(--error); stroke-width: 2.4; }
.map .node rect { fill: var(--surface); stroke: var(--border2); stroke-width: 1; transition: stroke .2s var(--ease-out); }
.map .node text { fill: var(--fg); font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.map .node .dot { fill: var(--success); }
.map .node.s-degraded .dot { fill: var(--warn-dot); }
.map .node.s-partial .dot { fill: var(--partial); }
.map .node.s-major .dot { fill: var(--error); }
.map .node.s-maintenance .dot { fill: var(--maint); }
.map .node.s-unknown .dot { fill: none; stroke: var(--faint); stroke-dasharray: 2 2; }
.map .node.s-degraded rect { stroke: var(--warn-dot); }
.map .node.s-partial rect { stroke: var(--partial); stroke-width: 1.6; }
.map .node.s-major rect { stroke: var(--error); stroke-width: 2; fill: color-mix(in srgb, var(--error) 8%, var(--surface)); }
.map .node.affected rect { stroke-dasharray: 4 3; }
.map .node:hover rect { stroke: var(--fg); }
.map .node:focus-visible { outline: none; }
.map .node:focus-visible rect { stroke: var(--blue); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .map .node.s-major .dot, .map .node.s-partial .dot { animation: pulse 1.6s ease-in-out infinite; }
  .map .edge.e-major, .map .edge.e-partial { animation: flow 1.2s linear infinite; stroke-dasharray: 6 4; }
}
@keyframes pulse { 50% { opacity: .35; } }
@keyframes flow { to { stroke-dashoffset: -20; } }

/* proof of life */
.proof dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--border); }
.proof dl > div { padding: 14px 16px 12px 0; border-bottom: 1px solid var(--border); }
.proof dd { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; order: -1; }
.proof dd.small { font-size: 18px; padding-top: 8px; }
.proof dt { color: var(--muted); font-size: 13px; }
.proof dl > div { display: flex; flex-direction: column; }

/* components */
.comp { border-bottom: 1px solid var(--border); }
.comp summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 2px; padding: 14px 0 12px; }
.comp summary::-webkit-details-marker { display: none; }
.comp-name { font-weight: 600; letter-spacing: -0.01em; }
.comp-name::before { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); margin: 0 10px 2px 0; transition: transform .2s var(--ease-out); }
.comp[open] .comp-name::before { transform: rotate(45deg); }
.comp-state { display: flex; gap: 6px; align-items: center; font-size: 14px; justify-self: end; }
.comp-desc { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin-left: 17px; }
.bars { grid-column: 1 / -1; display: flex; gap: 2px; height: 30px; margin-top: 10px; }
.bars i { flex: 1; min-width: 0; border-radius: 2px; background: linear-gradient(to top, var(--c) 0 var(--bad), var(--success) var(--bad) 100%); }
.bars i.b-degraded { --c: var(--warn-dot); }
.bars i.b-partial { --c: var(--partial); }
.bars i.b-major { --c: var(--error); }
.bars i.b-operational { --c: var(--success); }
.bars i.b-maintenance { background: var(--maint); opacity: .55; }
.bars i.b-unknown { background: repeating-linear-gradient(45deg, var(--nodata) 0 3px, transparent 3px 6px); }
.bars i.b-nodata { background: var(--nodata); }
.bars i:hover { opacity: .7; }
.axis { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.axis span:nth-child(2) { color: var(--muted); }
.day-detail { font-size: 13px; color: var(--fg); margin: 6px 0 0; min-height: 1.4em; }
.comp-body { padding: 0 0 18px 17px; font-size: 14px; }
.comp-body h4 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 12px 0 6px; }
.latency { display: flex; align-items: center; gap: 10px; margin: 0; }
.spark { width: 120px; height: 28px; }
.spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.verdicts { list-style: none; padding: 0; margin: 0; }
.verdicts li { padding: 3px 0 3px 14px; position: relative; }
.verdicts li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.verdicts li.k-failing::before { background: var(--error); }
.verdicts li.k-slow::before, .verdicts li.k-disputed::before { background: var(--warn-dot); }
.verdicts li.k-unknown::before { background: none; border: 1px dashed var(--faint); }
.providers .comp .bars { height: 18px; }

/* where */
.where-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.eu { position: relative; }
.eu-inner { position: relative; aspect-ratio: 73 / 68; }
.eu-dots { position: absolute; inset: 0; background: var(--faint); opacity: .5; -webkit-mask: url(/static/europe-dots.svg) center / 100% 100% no-repeat; mask: url(/static/europe-dots.svg) center / 100% 100% no-repeat; }
.pin { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid var(--blue); }
.pin.live { background: var(--blue); }
.pin.probe { background: var(--bg); border-color: var(--fg); }
@media (prefers-reduced-motion: no-preference) {
  .eu .pin.live::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--blue); animation: ping 2.4s var(--ease-out) infinite; }
}
@keyframes ping { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }
.legend { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.legend .pin { position: static; transform: none; display: inline-block; }

/* incidents */
.incident-list { list-style: none; padding: 0; margin: 0; }
.incident-list li { display: grid; grid-template-columns: 16px 1fr; column-gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: start; }
.incident-list li .glyph { margin-top: 4px; }
.incident-list .aside { grid-column: 2; }
.back { margin: 24px 0 0; font-size: 14px; }
.article h1, .page-title { display: flex; gap: 12px; align-items: flex-start; font-size: 32px; font-weight: 600; letter-spacing: -0.03em; margin: 18px 0 8px; }
.article h1 .glyph { width: 22px; height: 22px; margin-top: 8px; }
.ladder { list-style: none; padding: 0; margin: 28px 0; border-left: 2px solid var(--border); }
.ladder li { padding: 0 0 20px 20px; position: relative; }
.ladder li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--warn-dot); }
.ladder li.l-resolved::before { border-color: var(--success); background: var(--success); }
.ladder li.l-monitoring::before { border-color: var(--blue); }
.ladder h2 { font-size: 15px; margin: 0; }
.ladder p { margin: 2px 0; max-width: 68ch; }
.postmortem { border-top: 1px solid var(--border); padding-top: 18px; max-width: 68ch; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 32px; font-size: 18px; }
.months { display: flex; gap: 18px; margin: 0 0 18px; font-size: 14px; }
.checks-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.checks-table th, .checks-table td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.checks-table th { color: var(--muted); font-weight: 500; }

/* forms (subscribe, manage) */
.form { display: grid; gap: 12px; max-width: 480px; margin: 18px 0 32px; }
.form label { font-size: 14px; font-weight: 500; display: grid; gap: 6px; }
.form input, .form select, .form textarea { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; padding: 9px 11px; }
.form textarea { min-height: 90px; resize: vertical; }
.btn { font: inherit; font-weight: 500; font-size: 14px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg); cursor: pointer; justify-self: start; }
.btn:hover { opacity: .85; }
.btn.secondary { background: var(--surface); color: var(--fg); border-color: var(--border2); }
.btn.danger { background: var(--surface); color: var(--error); border-color: var(--error); }
.flash { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.flash.error { border-color: var(--error); color: var(--error); }

.foot { border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 40px; font-size: 13px; }
.foot p { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--fg); }

@media (max-width: 640px) {
  .top, main, .foot { padding-left: 16px; padding-right: 16px; }
  .map-scroll { margin: 0 -16px; padding: 0 16px; }
  .where-grid { grid-template-columns: 1fr; }
  .bars { gap: 1px; height: 26px; }
  .comp-state { font-size: 13px; }
  .hero { padding-top: 24px; }
  .top nav { gap: 12px; font-size: 13px; }
  .top nav a { white-space: nowrap; }
  .axis { flex-wrap: wrap; }
  .axis span:nth-child(2) { order: 3; flex-basis: 100%; }
}

/* /manage */
.manage-top { display: flex; justify-content: space-between; align-items: center; }
.manage h2 { margin-top: 36px; }
.manage-incident { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.manage-incident h3 { color: var(--fg); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.manage-incident pre { white-space: pre-wrap; margin: 6px 0; }
.parts { border: 1px solid var(--border); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; }
.parts legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.form label.check { display: flex; flex-direction: row; gap: 6px; align-items: center; font-weight: 400; }
