/* status-page: server-rendered, no JavaScript; dark always, in five colours. */

/* Archivo (OFL, archivo-OFL.txt), the latin subset: the wordmark, headings and headline. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("archivo-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 {
  color-scheme: dark;

  /* Midnight Violet, Royal Gold, Honeydew, Ash Grey, Ink Black, and two alarm reds. No other colour is drawn. */
  --violet: #160c28;
  --gold: #efcb68;
  --honeydew: #e1efe6;
  --ash: #aeb7b3;
  --ink-black: #000411;
  --alarm: #ef6b6b;
  --alarm-ink: #ffc2c2;

  --bg: var(--ink-black);
  --surface: var(--violet);
  --surface-2: var(--ink-black);
  --ink: var(--honeydew);
  --muted: var(--ash);
  --line: var(--ash);
  --link: var(--honeydew);
  --ok-bg: var(--honeydew);
  --ok-line: var(--honeydew);
  --ok-ink: var(--violet);
  --amber-bg: var(--gold);
  --amber-line: var(--gold);
  --amber-ink: var(--ink-black);
  --red-bg: var(--alarm);
  --red-line: var(--alarm);
  --red-ink: var(--ink-black);
  --blue-bg: var(--ink-black);
  --blue-line: var(--ash);
  --blue-ink: var(--honeydew);
  --focus: var(--gold);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo", var(--font);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px;
}
code { font-family: var(--mono); font-size: 0.92em; }
time { white-space: nowrap; }
h1, h2, h3 { line-height: 1.25; margin: 0; font-family: var(--display); font-weight: 700; font-stretch: 112%; }
h1 { font-size: 1.85rem; margin-bottom: 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.75rem; }

header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-inner, main, footer.site { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.site-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { margin: 0; font-family: var(--display); font-weight: 700; font-stretch: 112%; font-size: 1.35rem; }
.brand a { color: var(--gold); text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
nav a { color: var(--muted); }
nav a[aria-current="page"] { font-weight: 700; color: var(--ink); text-decoration: underline 2px var(--gold); text-underline-offset: 6px; }
main { padding-top: 1.5rem; padding-bottom: 2rem; }
footer.site { color: var(--muted); font-size: 0.9rem; padding-bottom: 2rem; }
footer.site::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 1rem; }
/* The demo note is a remark, not a state: a gold outline and gold words. */
footer .demo { color: var(--gold); background: transparent; border: 1px solid var(--gold); border-radius: var(--radius); padding: 0.4rem 0.75rem; display: inline-block; }

.headline { font-family: var(--display); font-size: 1.2rem; font-weight: 700; padding: 0.75rem 1rem; border-radius: var(--radius); border: 1px solid; }
.headline.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.headline.affected { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }

.services { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.service { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; padding: 0.75rem 1rem; border-top: 1px solid var(--line); align-items: baseline; }
.service:first-child { border-top: 0; }
.service .name { grid-column: 1; grid-row: 1; font-weight: 600; }
.service .state { grid-column: 2; grid-row: 1 / span 2; font-weight: 600; white-space: nowrap; }
.service .description { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 0.92rem; }
.state-operational .state { color: var(--ok-line); }
.state-under_maintenance .state { color: var(--blue-line); }
.state-degraded_performance .state, .state-partial_outage .state { color: var(--amber-line); }
.state-major_outage .state { color: var(--red-line); }

/* The panel's own edge is a default at no specificity: an impact's or maintenance's edge colour wins. */
:where(article.incident, article.maintenance) { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
article .meta { color: var(--muted); font-size: 0.92rem; margin: 0.25rem 0 0.75rem; }
.impact-minor { border-left-color: var(--amber-line); }
.impact-major { border-left-color: var(--red-line); }
/* Critical: the light alarm, a step past major's; --red-ink is the black on the alarm's fill. */
.impact-critical { border-left-color: var(--alarm-ink); }
.maintenance { border-left-color: var(--blue-line); }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { padding: 0.5rem 0; border-top: 1px solid var(--line); }
.updates li p { margin: 0.2rem 0 0; }
.updates .status { font-weight: 600; }
.updates .when { color: var(--muted); font-size: 0.92rem; margin-left: 0.5rem; }
.past { list-style: none; margin: 0; padding: 0; }
.past li { padding: 0.5rem 0; border-top: 1px solid var(--line); }
.past .title { font-weight: 600; }
.empty { color: var(--muted); }

form.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; display: grid; gap: 0.75rem; }
form.panel h2, form.panel h3 { margin: 0; }
label { display: grid; gap: 0.25rem; font-weight: 600; }
label span.hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input, select, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0.45rem 0.6rem; max-width: 100%; }
textarea { min-height: 5rem; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 0.75rem; margin: 0; }
fieldset label { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; }
button { font: inherit; font-weight: 600; color: var(--ink-black); background: var(--gold); border: 0; border-radius: 6px; padding: 0.5rem 1rem; cursor: pointer; justify-self: start; }
button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.notice { border-radius: var(--radius); padding: 0.6rem 1rem; border: 1px solid; margin-bottom: 1rem; }
.notice.error { background: var(--red-bg); border-color: var(--red-line); color: var(--red-ink); }
.notice.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.inline label { display: contents; }
table { border-collapse: separate; border-spacing: 0; overflow: hidden; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); border-top: 0; }
tbody th { font-weight: 600; }
th .hint { display: inline-block; font-weight: 400; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 480px) {
  .service { grid-template-columns: 1fr; }
  .service .state { grid-column: 1; grid-row: 2; }
  .service .description { grid-row: 3; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table, tbody, tr, th, td { display: block; }
  th, td { border-top: 0; }
  tbody tr + tr { border-top: 1px solid var(--line); }
  tbody th { padding-bottom: 0; }
}
