:root {
  /*
   * Neutrals: docs/design/sitedrive_ui_color_palette_guidelines.md
   *   text #111827, sub-text #6B7280, muted-bg #F3F4F6, border #E5E7EB, bg/surface #FFFFFF
   * Status hues: dashboard core.tsx StatCardTone labelClasses / BADGE_TONE.
   * All four are that file's own tone family — no new hues are introduced
   * (#640 §2.3), while the markup stays standalone (§6). Each is cited:
   *   --ok    emerald-800 #065f46  core.tsx labelClasses.success
   *   --warn  amber-800   #92400e  core.tsx labelClasses.warning
   *   --bad   red-700     #b91c1c  core.tsx labelClasses.critical
   *   --maint blue-700    #1d4ed8  core.tsx BADGE_TONE.low (text-blue-700)
   * Maintenance reuses the dashboard's informational blue so it stays
   * distinct from degraded amber without inventing a hue.
   * Contrast on --bg/--surface #FFFFFF is recorded in a11y-report.md.
   * --sub-text on --muted-bg is 4.39:1 (below AA). Never put --sub-text on --muted-bg.
   */
  --text: #111827;
  --sub-text: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --surface: #ffffff;
  --muted-bg: #f3f4f6;
  --ok: #065f46;
  --warn: #92400e;
  --maint: #1d4ed8;
  --bad: #b91c1c;
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  background: var(--surface);
  padding: 4px 8px;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

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

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.headline {
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

/* The headline carries an aria-hidden icon plus a text span, so it is never
   literally :empty; collapse on the text instead. */
.headline:has(#headline-text:empty) {
  margin: 0;
}

/* Third channel alongside colour and text (#640 §2.1, design §7). Inherits
   currentColor from the .headline-* class, so icon and text always agree. */
.headline-icon {
  vertical-align: -0.125em;
  margin-inline-end: 0.35em;
}
.headline-icon[hidden] {
  display: none;
}

.headline-error {
  color: var(--bad);
}

.headline-partial {
  color: var(--warn);
}

.headline-success {
  color: var(--ok);
}

/* Severity colours. Defined after .headline-{kind} so they win when present:
   the headline must agree with its own icon and with the component row it
   summarises. Keying colour off `kind` painted an outage amber. */
.headline-sev-operational {
  color: var(--ok);
}
.headline-sev-degraded {
  color: var(--warn);
}
.headline-sev-outage {
  color: var(--bad);
}
.headline-sev-maintenance {
  color: var(--maint);
}


.stale-note {
  color: var(--warn);
  font-size: 1rem;
  margin: 0 0 1rem;
}

.contact-note {
  color: var(--bad);
  font-size: 1rem;
  line-height: 1.5;
}

.skeleton div {
  height: 2.5rem;
  background: var(--muted-bg);
  margin-bottom: 0.5rem;
  border-radius: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 1rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sub-text);
  border-top: 0;
}

tbody th {
  font-weight: 500;
}

.status-icon {
  vertical-align: -0.15em;
  flex-shrink: 0;
}

td[data-status] {
  white-space: nowrap;
}

td[data-status='operational'] {
  color: var(--ok);
}

td[data-status='degraded'] {
  color: var(--warn);
}

td[data-status='maintenance'] {
  color: var(--maint);
}

td[data-status='outage'] {
  color: var(--bad);
}

#incidents {
  margin-top: 1.5rem;
}

#incidents h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.incident {
  list-style: none;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.75rem;
  margin: 0.5rem 0;
}

.incident-title {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}

/* edge-screens 08 §5 requires the customer be able to tell 何が影響を受けるか
   from 顧客は何をすればよいか, so each sentence carries its own <dt> label
   (「影響」/「回避方法」 — edge-backend 08's names for these two columns).
   The grid keeps label and sentence on one row where there is room and stacks
   them where there is not; a label must never end up beside the wrong
   sentence. No `color` here on purpose: the label inherits --text rather than
   taking the --sub-text treatment the table's column headers use, because it
   is content the customer has to read and not de-emphasised chrome. */
.incident-detail {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  margin: 0.35rem 0 0;
}

.incident-label {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  white-space: nowrap;
}

.incident-impact,
.incident-workaround {
  /* <dd> default is margin-inline-start: 40px; the grid supplies the gap. */
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 30rem) {
  /* One column: the label sits ABOVE its sentence, so the 0.15rem row-gap
     that separated rows now separates a label from its own sentence by the
     same distance as it separates the two pairs — and §5's requirement is
     that the customer can tell which sentence is which. Space goes between
     the pairs instead: no gap inside a pair, a clear gap before the second
     label. Measured at 320px: 2px within a pair, 2px between them, before. */
  .incident-detail {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }
  .incident-label + .incident-impact,
  .incident-label + .incident-workaround {
    margin-top: 0.1rem;
  }
  .incident-impact + .incident-label {
    margin-top: 0.6rem;
  }
}

#incident-list {
  margin: 0;
  padding: 0;
}

