/*
 * The style of the app (ontwerp §8n, style A "zakelijk en licht"; web/src/theme.ts): the house colour #1c5d99, light
 * grey workspace, white surfaces with a thin border and no shadow, Inter. Dark mode follows the browser, with the dark
 * values of the app. Keep these in step with theme.ts when the app's colours change.
 */

:root {
  color-scheme: light dark;

  --brand: #1c5d99;
  --brand-hover: #154d82;
  --brand-soft: #eaf2fb;
  --on-brand: #ffffff;
  --text: #161b26;
  --text-muted: #5f6878;
  --workspace: #f7f8fa;
  --surface: #ffffff;
  --line: #e3e6eb;
  --border: #c9cfd8;
  --anchor: #1c5d99;
  --ok: #1f6b3d;
  --ok-bg: #eaf5ee;
  --warn: #b13a0b;
  --warn-bg: #fdece4;

  --font:
    'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --content: 72rem;
  --prose: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3c79b8;
    --brand-hover: #5a8fcd;
    --brand-soft: #182638;
    --text: #e5e8ee;
    --text-muted: #97a0b0;
    --workspace: #0f1218;
    --surface: #141821;
    --line: #262c37;
    --border: #3a4250;
    --anchor: #8ab8ea;
    --ok: #8fd3a8;
    --ok-bg: #15291e;
    --warn: #f4a57f;
    --warn-bg: #3a1e12;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--workspace);
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
}

h2 {
  font-size: 1.375rem;
  margin-top: 1.75em;
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--anchor);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose {
  max-width: var(--prose);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  cursor: pointer;
  font-family: inherit;
}

.button:hover {
  text-decoration: none;
  border-color: var(--brand);
}

.button-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.button-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

th,
td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-weight: 600;
  color: var(--text-muted);
}

main {
  padding: 2.5rem 0 4rem;
}

/*
 * The status page (ontwerp §8zl). `npm run build:status` puts this after the site's own src/styles/global.css (colours,
 * type, .container, .card), with the Inter font of the site, in assets/status.css.
 */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/inter.woff2') format('woff2-variations');
}

:root {
  --down: #c92a2a;
  --down-bg: #fdeaea;
  --partial: #e8590c;
  --none: #dfe3e8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --down: #ff8787;
    --down-bg: #3a1616;
    --partial: #ffa94d;
    --none: #2c333f;
  }
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.languages {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.languages [aria-current] {
  color: var(--text);
  font-weight: 600;
}

.container {
  max-width: 52rem;
}

.status {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.overall {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 1.5rem 0;
}

.overall::before {
  content: '';
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: currentColor;
}

.overall-up {
  background: var(--ok-bg);
  color: var(--ok);
}

.overall-maintenance {
  background: var(--warn-bg);
  color: var(--warn);
}

.overall-down {
  background: var(--down-bg);
  color: var(--down);
}

.notices {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.notice h3 {
  margin-bottom: 0.25rem;
}

.notice-meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.notice-kind {
  font-weight: 600;
}

.notice-incident .notice-kind {
  color: var(--down);
}

.notice-maintenance .notice-kind,
.notice-service-end .notice-kind {
  color: var(--warn);
}

.notice p:last-child {
  margin-bottom: 0;
}

.components {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.component-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: 600;
}

.state-up {
  color: var(--ok);
}

.state-down {
  color: var(--down);
}

.state-unknown {
  color: var(--text-muted);
}

.days {
  display: flex;
  gap: 2px;
  height: 2rem;
  margin: 0.75rem 0 0.25rem;
}

.day {
  flex: 1;
  border-radius: 2px;
  background: var(--none);
}

.day-up {
  background: var(--ok);
}

.day-partial {
  background: var(--partial);
}

.day-down {
  background: var(--down);
}

.days-legend {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.muted {
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  font-size: 0.9375rem;
}

@media (max-width: 40rem) {
  .days {
    gap: 1px;
  }

  /* Only the uptime: "90 days ago" and "today" do not fit next to it. */
  .days-legend [aria-hidden] {
    display: none;
  }
}
