:root {
  color-scheme: dark;
  --background: #171717;
  --foreground: #e5e5e5;
  --muted-foreground: #a3a3a3;
  --border: #2e2e2e;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); font-size: 16px; line-height: 1.2; }
main { max-width: 822px; margin: 0 auto; padding: 24px 16px 60px; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--foreground); outline-offset: 4px; border-radius: 8px; }
svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
p, h1, h2, h3 { margin: 0; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; margin-bottom: 48px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; min-height: 32px; flex-shrink: 0; }
.brand img { display: block; width: 122px; height: auto; }
nav { display: flex; align-items: center; gap: 8px; }
.nav-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; color: #c9c9c9; font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap; }
.nav-link:hover { background: #262626; color: #fff; }
.incident {
  --incident-surface: #191e25;
  --incident-header: #1d2c3f;
  --incident-border: #283444;
  --incident-accent: #72adfa;
  --incident-text: #b2c2d8;
  --incident-muted: #9cacc2;
  background: var(--incident-surface);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--incident-border);
  scroll-margin-top: 24px;
}
.incident[data-severity='degraded'] { --incident-surface: #252319; --incident-header: #3d381c; --incident-border: #383523; --incident-accent: #ffbe3d; --incident-text: #d3c49b; --incident-muted: #b4a67f; }
.incident[data-severity='partial'] { --incident-surface: #251f19; --incident-header: #3d2d1c; --incident-border: #443628; --incident-accent: #ff9e3d; --incident-text: #d9bda3; --incident-muted: #bfa288; }
.incident[data-severity='major'] { --incident-surface: #25191b; --incident-header: #291519; --incident-border: #382327; --incident-accent: #ff575a; --incident-text: #d6a5a5; --incident-muted: #be9292; }
.incident[data-severity='resolved'] { --incident-surface: var(--background); --incident-header: #1d3425; --incident-border: var(--border); --incident-accent: #7cdda1; --incident-text: #c4decc; --incident-muted: #a4c1ae; }
.incident[data-severity='resolved'] .timeline-item ~ .timeline-item { --incident-accent: var(--muted-foreground); --incident-text: var(--foreground); --incident-muted: var(--muted-foreground); --incident-line: var(--border); }
summary { display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 52px; border-radius: 12px; background: var(--incident-header); color: var(--incident-heading, #e5e5e5); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ''; }
.chevron { width: 16px; height: 16px; color: inherit; }
.incident[open] .chevron { transform: rotate(90deg); }
h1 { font-size: 16px; font-weight: 550; line-height: 20px; }
.severity { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--incident-heading-accent, var(--incident-accent)); font-size: 14px; white-space: nowrap; }
.severity-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.components { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 16px 0; }
.components span { padding: 3px 8px; border: 1px solid #414141; border-radius: 8px; color: #bcbcbc; background: #292929; font-size: 14px; line-height: 18px; }
.timeline { display: flex; flex-direction: column; gap: 16px; padding: 16px 16px 20px 24px; margin: 0; list-style: none; }
.timeline-item article { padding: 4px 0 4px 12px; border-left: 2px solid var(--incident-line, var(--incident-accent)); overflow-wrap: anywhere; }
.notice-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
h3 { font-size: 16px; font-weight: 500; line-height: 20px; }
.notice-label { color: var(--incident-muted); font-size: 12px; line-height: 16px; }
.notice-label.latest { border: 1px solid var(--incident-accent); border-radius: 6px; padding: 1px 6px; color: var(--incident-accent); font-size: 11px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; }
.notice-copy { display: flex; flex-direction: column; gap: 16px; color: var(--incident-text); font-weight: 450; line-height: 1.35; }
time { display: block; margin-top: 8px; color: var(--incident-muted); font-size: 14px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.earlier-heading { display: flex; align-items: center; gap: 12px; margin: 4px -8px 16px; color: var(--incident-muted); font-size: 11px; font-weight: 500; letter-spacing: .025em; line-height: 16px; text-transform: uppercase; }
.earlier-heading::after { content: ''; height: 1px; flex: 1; background: var(--incident-border); }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; color: var(--muted-foreground); font-size: 12px; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  main { padding-top: 16px; }
  .masthead { flex-wrap: wrap; gap: 12px; padding-bottom: 16px; margin-bottom: 28px; }
  .brand img { width: 106px; }
  nav { margin-left: auto; }
  .nav-link { min-height: 40px; }
  .brand { min-height: 40px; }
  summary { flex-wrap: wrap; gap: 8px; }
  h1 { flex: 1; min-width: 0; }
  .severity { margin-left: 24px; width: calc(100% - 24px); }
  .components { gap: 6px; }
  .timeline { padding-left: 20px; }
  .notice-copy { font-size: 15px; line-height: 1.45; }
  time { font-size: 12px; }
}

@media (prefers-color-scheme: light) {
  :root { color-scheme: light; --background: #fff; --foreground: #14111d; --muted-foreground: #65656e; --border: #e1e1e3; }
  .nav-link { color: #50505a; }
  .nav-link:hover { background: #f7f7f7; color: #14111d; }
  .components span { color: #50505a; background: #fff; border-color: #d5d5d8; }
  .incident {
    --incident-surface: #e5effb;
    --incident-header: #2878e1;
    --incident-border: #b4cbeb;
    --incident-accent: #205da9;
    --incident-text: #345777;
    --incident-muted: #50647d;
    --incident-heading: #fff;
    --incident-heading-accent: #fff;
  }
  .incident[data-severity='degraded'] { --incident-surface: #fffcf3; --incident-header: #fff3c9; --incident-border: #d5bc76; --incident-accent: #856000; --incident-line: #dcb650; --incident-text: #6d613e; --incident-muted: #776b45; --incident-heading: #332500; --incident-heading-accent: #785600; box-shadow: 0 0 0 1px var(--incident-border), 0 4px 12px -8px #45320b40; }
  .incident[data-severity='partial'] { --incident-surface: #fff5ec; --incident-header: #ffc48a; --incident-border: #e4c9b0; --incident-accent: #914900; --incident-line: #ff9e3d; --incident-text: #73583f; --incident-muted: #7a644f; --incident-heading: #331a00; --incident-heading-accent: #663300; }
  .incident[data-severity='major'] { --incident-surface: #fbe5e5; --incident-header: #e1282a; --incident-border: #e6b2b3; --incident-accent: #b82022; --incident-text: #7c3434; --incident-muted: #875050; }
  .incident[data-severity='resolved'] { --incident-surface: var(--background); --incident-header: #e2f3e8; --incident-border: var(--border); --incident-accent: #287346; --incident-text: #375b43; --incident-muted: #506d5a; --incident-heading: #153c24; --incident-heading-accent: #25663c; }
}

@media (max-width: 360px) {
  nav { width: 100%; }
  .nav-link { flex: 1; }
}
