/* The public status page. One family (Bricolage Grotesque, self-hosted beside this file), two themes that follow the device unless the visitor chose one, and a sky painted
   (not drawn) for each state. Colour is for state: on a calm page only the mark and the bars are teal; amber and ember only for a state that is. Every state is also a shape and a
   word, and a bar's height says what its colour says. No inline style, no data: URI, no remote file: the page's content policy allows this host alone. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/_page/bricolage-grotesque-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: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/_page/bricolage-grotesque-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;
}

:root {
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1rem, 4vw, 2rem);
  --measure: 64rem;
  color-scheme: dark;
  --ground: #061013;
  --sheet: #0b191d;
  --sheet-hi: #17313a;
  --line: #1c3239;
  --line-2: #587a84;
  --ink: #eaf3f1;
  --ink-2: #b6c9c5;
  --ink-3: #8fa6a3;
  --lamp: #62e0c4;
  --amber: #f5b83d;
  --ember: #ff7461;
  --amber-wash: rgba(245, 184, 61, 0.12);
  --ember-wash: rgba(255, 116, 97, 0.14);
  --focus: #9af0dc;
  --veil-a: rgba(6, 16, 19, 0.42);
  --veil-b: rgba(6, 16, 19, 0.62);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ground: #e4edec; --sheet: #f4f8f7; --sheet-hi: #e9f1f0; --line: #cbdad8; --line-2: #6f8785;
    --ink: #0c1c21; --ink-2: #374f52; --ink-3: #546c6e;
    --lamp: #07705f; --amber: #8a5600; --ember: #b3261e;
    --amber-wash: rgba(200, 130, 0, 0.12); --ember-wash: rgba(179, 38, 30, 0.09);
    --focus: #064f46;
    --veil-a: rgba(228, 237, 236, 0.72); --veil-b: rgba(228, 237, 236, 0.86);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #e4edec; --sheet: #f4f8f7; --sheet-hi: #e9f1f0; --line: #cbdad8; --line-2: #6f8785;
  --ink: #0c1c21; --ink-2: #374f52; --ink-3: #546c6e;
  --lamp: #07705f; --amber: #8a5600; --ember: #b3261e;
  --amber-wash: rgba(200, 130, 0, 0.12); --ember-wash: rgba(179, 38, 30, 0.09);
  --focus: #064f46;
  --veil-a: rgba(228, 237, 236, 0.72); --veil-b: rgba(228, 237, 236, 0.86);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.5 var(--font); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
h1, h2, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
a { color: var(--ink); text-underline-offset: 0.25em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 0.3rem; }
[hidden] { display: none !important; }

/* the content's column: centred, never narrower than the gutter */
.top, .hero, main, .foot { padding-inline: max(var(--gutter), calc((100% - var(--measure)) / 2)); }

/* ---- The band: a painted sky for the state, and the answer ---------------------------------------------------------------------- */

.band {
  background: linear-gradient(to bottom, var(--veil-a) 0%, var(--veil-b) 78%, var(--ground) 100%), var(--sky, none) center 38% / cover no-repeat, var(--ground);
  border-bottom: 1px solid var(--line);
}
html[data-state="up"] .band { --sky: url("/_page/sky-up.webp"); }
html[data-state="slow"] .band { --sky: url("/_page/sky-slow.webp"); }
html[data-state="down"] .band { --sky: url("/_page/sky-down.webp"); }
html[data-state="unknown"] .band { --sky: url("/_page/sky-unknown.webp"); }
html[data-state="unknown"] { --veil-a: rgba(6, 16, 19, 0.66); --veil-b: rgba(6, 16, 19, 0.74); } /* the fog is the brightest sky: a heavier veil in the dark theme (the light theme's own veil is already heavy) */ /* while loading there is no sky: a sky for a state we do not know yet would be fetched for nothing */
@media (prefers-color-scheme: light) { html[data-state="up"]:not([data-theme="dark"]) .band { --sky: url("/_page/sky-up-light.webp"); } }
html[data-theme="light"][data-state="up"] .band { --sky: url("/_page/sky-up-light.webp"); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.eyebrow { color: var(--ink); font-size: 0.9375rem; font-weight: 560; letter-spacing: 0.01em; white-space: nowrap; }
.tools { display: flex; align-items: center; gap: 0.5rem; }
.seg { display: inline-flex; padding: 0.2rem; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--ground) 55%, transparent); }
.seg button { min-width: 2.6rem; min-height: 2rem; padding: 0 0.6rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.tool { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; padding: 0 0.85rem; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--ground) 55%, transparent); color: var(--ink); font-size: 0.875rem; font-weight: 520; cursor: pointer; }
.tool:hover, .seg button:hover { color: var(--ink); background: var(--sheet-hi); }
.seg button[aria-pressed="true"]:hover { background: var(--ink); color: var(--ground); }
.glyph-theme { width: 0.95em; height: 0.95em; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

.hero { padding-block: clamp(1.6rem, 6vw, 4.2rem) clamp(1.8rem, 5vw, 3.6rem); display: grid; gap: 0.5rem; }
.site { color: var(--ink); font-size: clamp(1.05rem, 2.4vw, 1.375rem); font-weight: 520; overflow-wrap: anywhere; }
.state { display: flex; align-items: baseline; gap: clamp(0.6rem, 1.6vw, 1rem); font-size: clamp(2.3rem, 7.2vw, 4.4rem); line-height: 1.04; font-weight: 400; letter-spacing: -0.025em; font-variation-settings: "wdth" 90; text-wrap: balance; }
.sub { max-width: 46rem; color: var(--ink); font-size: clamp(1rem, 2.2vw, 1.1875rem); text-wrap: pretty; }

/* the marks: a shape for each state, so that colour never carries it alone */
.mk { flex: none; display: inline-block; width: 0.5em; height: 0.5em; transform: translateY(-0.08em); background: var(--ink-3); border-radius: 50%; }
.mk--up { background: var(--lamp); box-shadow: 0 0 0.7em color-mix(in srgb, var(--lamp) 70%, transparent); }
.mk--slow { background: var(--amber); border-radius: 0; clip-path: polygon(50% 4%, 98% 94%, 2% 94%); }
.mk--down { background: var(--ember); border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.mk--unknown, .mk--loading, .mk--ended { background: transparent; box-shadow: inset 0 0 0 0.14em var(--ink-2); }
.mk--ended { width: 0.7em; height: 0.7em; transform: none; }
.inc .mk { width: 0.78em; height: 0.78em; transform: translateY(0.02em); }
.inc .mk--down { width: 0.85em; height: 0.85em; }

/* on a phone the theme button is its glyph alone (it still says its name to a screen reader) */
@media (max-width: 30rem) { .tool { padding: 0; width: 2.5rem; justify-content: center; } .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }

/* ---- The body: the numbers, the days, the incidents --------------------------------------------------------------------------- */

main { display: grid; gap: 1.2rem; padding-block: 1.6rem 2rem; }
.fail { padding: 0.7rem 1rem; border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent); border-radius: 0.8rem; background: var(--amber-wash); font-weight: 550; text-wrap: pretty; }
.card { padding: 1.2rem 1.35rem 1.35rem; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--sheet); min-width: 0; }
.card h2 { margin-bottom: 0.2rem; font-size: 1.1875rem; font-weight: 580; letter-spacing: -0.012em; font-variation-settings: "wdth" 94; }
.card-sub { margin-bottom: 0.9rem; color: var(--ink-2); font-size: 0.9375rem; }
.nojs a { text-decoration-thickness: 2px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.stat { display: grid; gap: 0.15rem; align-content: start; padding: 1rem 1.2rem 1.1rem; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--sheet); min-width: 0; }
.stat-l { color: var(--ink-2); font-size: 0.9375rem; font-weight: 560; }
.stat-v { font-size: clamp(2rem, 5.4vw, 2.9rem); line-height: 1.08; font-weight: 450; letter-spacing: -0.03em; font-variation-settings: "wdth" 90; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-s { color: var(--ink-2); font-size: 0.875rem; }
.stat[data-dim] { border-style: dashed; background: transparent; }
.stat[data-dim] .stat-v { color: var(--ink-2); font-weight: 380; }
@media (max-width: 36rem) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .stat-main { grid-column: 1 / -1; }
  .stat { padding: 0.9rem 1rem 1rem; }
}

/* the days: a bar for each, its height and its colour both saying what the day was; ninety in a row on a wide screen, thirty by three on a phone */
.strip { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 3px; margin-top: 0.9rem; }
.day { display: flex; align-items: flex-end; height: 2.6rem; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; min-width: 0; }
.day i { display: block; width: 100%; border-radius: 3px; }
.day[data-k="ok"] i { height: 100%; background: var(--lamp); opacity: 0.88; }
.day[data-k="p"] i { height: 68%; background: var(--amber); }
.day[data-k="d"] i { height: 42%; background: var(--ember); }
.day[data-k="u"] i { height: 28%; background: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--line-2); opacity: 0.8; }
.day:hover i, .day[data-hover] i { filter: brightness(1.18); }
.day[aria-current] { outline: 2px solid var(--ink); outline-offset: 2px; }
.day:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 40rem) {
  .strip { grid-template-columns: repeat(30, minmax(0, 1fr)); row-gap: 8px; gap: 2px; }
  .day { height: 2.2rem; }
}
.axis { display: flex; justify-content: space-between; margin-top: 0.4rem; color: var(--ink-2); font-size: 0.8125rem; }
@media (max-width: 40rem) { .axis { display: none; } }
.day-info { margin-top: 0.8rem; min-height: 3.2em; padding-left: 0.9rem; border-left: 3px solid var(--line-2); font-size: 0.9375rem; text-wrap: pretty; }
.day-info[data-k="p"] { border-left-color: var(--amber); }
.day-info[data-k="d"] { border-left-color: var(--ember); }
.day-info[data-k="ok"] { border-left-color: var(--lamp); }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; margin-top: 0.8rem; color: var(--ink-2); font-size: 0.8125rem; }
.legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.sw { display: inline-block; width: 0.55rem; height: 1rem; border-radius: 2px; }
.sw[data-k="ok"] { background: var(--lamp); opacity: 0.88; }
.sw[data-k="p"] { height: 0.7rem; background: var(--amber); }
.sw[data-k="d"] { height: 0.45rem; background: var(--ember); }
.sw[data-k="u"] { height: 0.3rem; background: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--line-2); }

.incs { display: grid; gap: 0.7rem; }
.inc { padding: 0.85rem 1rem 0.95rem; border: 1px solid var(--line); border-radius: 1rem; }
.inc[data-ongoing] { border-color: color-mix(in srgb, var(--ember) 55%, var(--line-2)); background: var(--ember-wash); }
.inc-h { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; }
.inc-when { font-weight: 620; font-variant-numeric: tabular-nums; }
.inc-dur { color: var(--ink-2); font-size: 0.9375rem; }
.tag { display: inline-block; padding: 0.05em 0.7em; border: 1px solid var(--ember); border-radius: 999px; font-size: 0.8125rem; font-weight: 650; }
.inc-note { display: grid; gap: 0.1rem; margin-top: 0.6rem; padding-left: 0.85rem; border-left: 3px solid var(--line-2); }
.inc-note-l { color: var(--ink-2); font-size: 0.8125rem; font-weight: 560; }
.inc-note-t { overflow-wrap: anywhere; text-wrap: pretty; }
.inc-none { color: var(--ink-2); }
.more { margin-top: 0.9rem; min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; font-weight: 560; cursor: pointer; }
.more:hover { background: var(--sheet-hi); }

.foot { padding-block: 0.4rem 2.4rem; color: var(--ink-2); font-size: 0.875rem; text-wrap: pretty; }

@media (forced-colors: active) {
  .day[data-k="ok"] i { background: CanvasText; }
  .day[data-k="p"] i, .day[data-k="d"] i { background: Highlight; }
  .mk--up, .mk--slow, .mk--down { background: CanvasText; forced-color-adjust: none; }
}
