/* AI Watcher —— 设计系统与页面样式。
   配色、字号、动效的依据见 DESIGN.md；对比度由 scripts/contrast.mjs 实测。 */

/* ============================================================== 1. tokens */

:root {
  /* 中性色：色相 250，低彩度冷向微调，不是中性灰也不是纯黑 */
  --bg: oklch(0.168 0.012 250);
  --surface: oklch(0.212 0.013 250);
  --surface-2: oklch(0.252 0.014 250);
  --line: oklch(0.315 0.016 250);

  --ink: oklch(0.965 0.004 250);
  --ink-2: oklch(0.795 0.011 250);
  --ink-3: oklch(0.672 0.013 250);

  /* 状态色：只表达状态，从不用于装饰 */
  --st-none: oklch(0.768 0.165 152);
  --st-minor: oklch(0.815 0.145 86);
  --st-major: oklch(0.735 0.168 55);
  --st-critical: oklch(0.672 0.196 25);
  --st-maintenance: oklch(0.735 0.125 243);
  --st-unknown: oklch(0.648 0.018 250);

  /* 交互色：刻意避开状态色相，紫色只意味着“可操作” */
  --accent: oklch(0.715 0.148 292);
  --accent-soft: oklch(0.715 0.148 292 / 0.14);

  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-15: 0.9375rem;
  --fs-17: 1.0625rem;
  --fs-21: 1.3125rem;
  --fs-26: 1.625rem;
  --fs-34: 2.125rem;
  --fs-46: 2.875rem;

  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  /* 末尾的中文字体不是装饰：字体回退是逐字形的，拉丁字母和数字走等宽，
     汉字走 PingFang/Noto，避免落到等宽字体那套被撑开的全角 CJK 字形上。 */
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono',
    'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', monospace;

  --r-panel: 6px;
  --r-chip: 4px;
  --r-seg: 2px;

  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --t-fast: 160ms;
  --t-base: 200ms;

  --z-sticky: 100;
  --z-dropdown: 200;
  --z-toast: 400;

  --shell: 1440px;
  --gutter: 24px;
}

/* indicator → 当前状态色。挂在任意祖先上，子元素用 var(--st) 取色 */
[data-indicator='none'] { --st: var(--st-none); }
[data-indicator='minor'] { --st: var(--st-minor); }
[data-indicator='major'] { --st: var(--st-major); }
[data-indicator='critical'] { --st: var(--st-critical); }
[data-indicator='maintenance'] { --st: var(--st-maintenance); }
[data-indicator='unknown'] { --st: var(--st-unknown); }
/* 推断正常不是已确认的绿，用次级文字色。 */
[data-indicator='inferred'] { --st: var(--ink-2); }

/* ================================================================ 2. base */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-15);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ============================================================== 3. header */

.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
  .masthead { backdrop-filter: blur(8px); }
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  font-family: var(--mono);
  font-size: var(--fs-15);
  line-height: 1;
  color: var(--st, var(--st-unknown));
  transition: color var(--t-base) var(--ease);
}

.brand-name {
  font-size: var(--fs-15);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 2px;
  margin-inline-start: 8px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--r-chip);
  font-size: var(--fs-13);
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.nav-item:hover { color: var(--ink); background: var(--surface); }
.nav-item[aria-current='page'] { color: var(--accent); background: var(--surface-2); }
.nav-item[aria-current='page'] .pip { color: var(--st, var(--st-unknown)); }

.nav-item .pip {
  font-family: var(--mono);
  font-size: var(--fs-12);
  line-height: 1;
  color: var(--st, var(--st-unknown));
  flex: none;
  transition: color var(--t-base) var(--ease);
}

.masthead-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-12);
  color: var(--ink-3);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ============================================================ 4. controls */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding-inline: 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-12);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.btn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-3); }
.btn:active:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn[data-busy='true'] .btn-icon { animation: pulse 200ms var(--ease) infinite; }

.btn-icon { width: 13px; height: 13px; flex: none; }
.btn-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-11);
  color: var(--ink-3);
  min-width: 2.4ch;
  text-align: end;
}

@keyframes pulse { 50% { opacity: 0.35; } }

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  overflow: hidden;
}

.lang button {
  border: 0;
  background: var(--surface);
  color: var(--ink-3);
  font: inherit;
  font-size: var(--fs-11);
  padding: 0 9px;
  height: 28px;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.lang button:hover { color: var(--ink); }
.lang button[aria-pressed='true'] { background: var(--surface-2); color: var(--ink); }
.lang button + button { border-inline-start: 1px solid var(--line); }

.textlink {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 45%, transparent);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.textlink:hover { border-bottom-color: var(--accent); }

/* ========================================================= 5. status atoms */

/* 符号 + 文字 + 颜色三重编码：黑白截图或色觉障碍下都不丢信息 */
.glyph {
  font-family: var(--mono);
  color: var(--st, var(--st-unknown));
  flex: none;
  line-height: 1;
  transition: color var(--t-base) var(--ease);
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--st, var(--st-unknown));
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding-inline: 7px;
  border-radius: var(--r-chip);
  border: 1px solid color-mix(in oklch, var(--st, var(--line)) 38%, transparent);
  background: color-mix(in oklch, var(--st, var(--surface)) 12%, transparent);
  color: var(--st, var(--ink-2));
  font-family: var(--mono);
  font-size: var(--fs-11);
  white-space: nowrap;
}

.chip-plain {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
}

/* 可用性条：一个组件一格，是组件地图不是进度条 */
.availability {
  display: flex;
  gap: 2px;
  height: 8px;
  border-radius: var(--r-seg);
  overflow: hidden;
}

.availability-seg {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: var(--r-seg);
  background: var(--st, var(--st-unknown));
  opacity: 0.85;
  /* 带 tooltip 的元素统一用 help 光标，和时间线、相对时间保持一致 */
  cursor: help;
  transition: opacity var(--t-fast) var(--ease), background var(--t-base) var(--ease);
}

.availability-seg[data-indicator='none'] { opacity: 0.55; }
.availability:hover .availability-seg { opacity: 1; }

/* ============================================================ 6. sections */

main { flex: 1; padding-block: 28px 40px; }

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--sans);
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--ink);
}

.section-meta {
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-3);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
}

/* ============================================================= 7. overview */

.headline {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

/* 用 inline 而不是 flex：状态文字换行时，符号要跟着第一行走，
   flex 的居中对齐会让它停在两行文字的中间，看起来像是掉了出来。 */
.headline-status {
  display: inline;
  font-size: var(--fs-34);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--st, var(--st-unknown));
  transition: color var(--t-base) var(--ease);
}

.headline-status .glyph {
  font-size: var(--fs-26);
  margin-inline-end: 12px;
}

.headline-statuses {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
}

.headline-status-extra {
  display: inline;
  font-size: var(--fs-21);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--st, var(--ink-2));
}

.headline-status-extra .glyph {
  font-size: var(--fs-17);
  margin-inline-end: 8px;
}

.headline-sub { font-size: var(--fs-15); color: var(--ink-2); }

.status-note {
  font-size: var(--fs-13);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 70ch;
}

/* 列数由服务数量决定，不是被宽度被动决定：auto-fit 不知道总共几张卡，
   4 张卡在宽屏下会被排成 3+1，第四张孤零零占一行。--board-cols 由
   overview.js 按实际服务数写入，宽度只负责往下收。 */
.board {
  display: grid;
  grid-template-columns: repeat(var(--board-cols, 2), minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.provider {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
  overflow: hidden;
}

.provider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 14px;
}

.provider-name {
  font-size: var(--fs-26);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.provider-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.provider-status .status-line { font-size: var(--fs-15); }
.provider-status .status-note { max-width: 36ch; text-align: end; }

.provider-status-note {
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-3);
}

.provider-bar { padding: 0 18px 14px; }

.provider-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0 18px 16px;
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--ink-3);
}

.provider-stats b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.provider-body { border-top: 1px solid var(--line); }

.provider-history {
  border-top: 1px solid var(--line);
  padding-bottom: 14px;
}

.panel-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 0;
}

.provider-history .timeline { padding-top: 10px; height: 26px; }

.provider-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in oklch, var(--surface-2) 50%, transparent);
  font-size: var(--fs-12);
}

.provider-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.provider-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================== 8. data rows */

.rows { display: flex; flex-direction: column; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 18px;
  font-size: var(--fs-13);
  min-height: 38px;
}

.row + .row { border-top: 1px solid var(--line); }

.row-name {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--ink-2);
}

.row-name::after {
  content: '';
  flex: 1 1 auto;
  align-self: center;
  border-bottom: 1px dotted var(--line);
  min-width: 12px;
}

.row-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row[data-indicator]:not([data-indicator='none']) .row-name { color: var(--ink); }

.row-group {
  flex: none;
  color: var(--ink-3);
  font-size: var(--fs-11);
  font-family: var(--mono);
}

.row-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--st, var(--ink-3));
}

.disclosure {
  border-top: 1px solid var(--line);
}

.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: var(--fs-12);
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
  transition: color var(--t-fast) var(--ease);
}

.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { color: var(--ink); }

.disclosure > summary::before {
  content: '';
  width: 0;
  height: 0;
  border-inline-start: 4px solid currentColor;
  border-block: 4px solid transparent;
  transition: transform var(--t-fast) var(--ease);
}

.disclosure[open] > summary::before { transform: rotate(90deg); }
.disclosure[open] > summary { color: var(--ink-2); }

/* ============================================================ 9. incidents */

.incident {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.incident:first-child { border-top: 0; }

.incident-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.incident-title {
  font-size: var(--fs-15);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: pretty;
}

.incident-title a { color: inherit; text-decoration: none; }
.incident-title a:hover { color: var(--accent); }

.incident-time {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-3);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.incident-time time { cursor: help; }

.time-abs { margin-inline-start: 0.4em; color: var(--ink-2); }

.update {
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: var(--r-chip);
  background: var(--surface-2);
  font-size: var(--fs-13);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 70ch;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.update-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-3);
}

.update-head b { color: var(--st, var(--ink-2)); font-weight: 600; }

.empty {
  padding: 20px 18px;
  color: var(--ink-2);
  font-size: var(--fs-13);
}

.empty-hint { margin-top: 4px; color: var(--ink-3); font-size: var(--fs-12); }

/* =========================================================== 10. timeline */

.timeline {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 34px;
  padding: 14px 18px 0;
}

.tl-day {
  appearance: none;
  flex: 1 1 0;
  min-width: 3px;
  height: 100%;
  border: 0;
  padding: 0;
  border-radius: var(--r-seg);
  background: var(--surface-2);
  color: transparent;
  line-height: 0;
  min-height: 0;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.tl-day[data-indicator]:not([data-indicator='none']) { background: var(--st); }
.tl-day:hover { transform: scaleY(1.12); }
.tl-day.is-selected { box-shadow: inset 0 0 0 1.5px var(--ink); }

.timeline-caption {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 18px 0;
  font-size: var(--fs-13);
  line-height: 1.45;
  color: var(--st, var(--ink-2));
}

.timeline-empty {
  margin: 8px 18px 0;
  font-size: var(--fs-13);
  color: var(--ink-2);
}

.timeline-axis {
  display: flex;
  justify-content: space-between;
  padding: 7px 18px 0;
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-3);
}

/* ============================================================== 11. error */

.error-panel {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in oklch, var(--st, var(--st-unknown)) 10%, transparent);
}

.error-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--st, var(--st-unknown));
}

.error-help {
  margin-top: 6px;
  font-size: var(--fs-13);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 70ch;
  text-wrap: pretty;
}

.error-detail { margin-top: 10px; }

.error-detail > summary {
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
}
.error-detail > summary::-webkit-details-marker { display: none; }
.error-detail > summary:hover { color: var(--ink-2); }

.error-detail pre {
  margin: 7px 0 0;
  padding: 9px 11px;
  border-radius: var(--r-chip);
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 18px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-13);
  line-height: 1.45;
  color: var(--st, var(--st-unknown));
  background: color-mix(in oklch, var(--st, var(--st-unknown)) 12%, transparent);
}

[data-stale='true'] .availability { opacity: 0.45; }

/* 数据来源说明：必要但不该抢戏，压到次级字号和弱化色 */
.notes {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
  font-size: var(--fs-13);
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.notes p { max-width: 70ch; }

.notes p + p { margin-top: 6px; }

/* ========================================================== 12. skeleton */

.skeleton {
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
  min-height: 210px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    color-mix(in oklch, var(--surface-2) 70%, transparent) 50%,
    transparent 80%
  );
  background-size: 250% 100%;
  animation: sweep 1.4s linear infinite;
}

@keyframes sweep { to { background-position: -250% 0; } }

/* ============================================================ 13. detail */

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-title { display: flex; flex-direction: column; gap: 8px; }

.detail-title h1 {
  font-size: var(--fs-34);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.detail-status {
  display: block;
  font-size: var(--fs-21);
  font-weight: 600;
  line-height: 1.35;
  color: var(--st, var(--st-unknown));
}

.detail-status .status-line { font-size: inherit; }

.detail-facts {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.fact { display: flex; flex-direction: column; gap: 3px; }

.fact-label {
  font-family: var(--mono);
  font-size: var(--fs-11);
  color: var(--ink-3);
  letter-spacing: 0.03em;
}

.fact-value,
.fact time {
  font-family: var(--mono);
  font-size: var(--fs-17);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.fact .time-abs { font-size: var(--fs-13); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* ============================================================= 14. footer */

.foot {
  border-top: 1px solid var(--line);
  padding-block: 16px 24px;
  margin-top: 40px;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--fs-11);
  font-family: var(--mono);
  color: var(--ink-3);
}

.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

[data-checked]:not(:empty)::before { content: ' · '; }

/* ========================================================= 15. responsive */

/* 三列需要的宽度不够时先收到两列，再收到单列 */
@media (max-width: 1240px) {
  .board { grid-template-columns: repeat(min(var(--board-cols, 2), 2), minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --gutter: 16px; }

  .board { grid-template-columns: minmax(0, 1fr); }
  .headline-status { font-size: var(--fs-26); }
  .headline-status-extra { font-size: var(--fs-17); }
  .detail-title h1 { font-size: var(--fs-26); }
  [data-shortcuts] { display: none; }

  .masthead-inner { height: auto; padding-block: 10px; flex-wrap: wrap; gap: 10px 14px; }
  .nav { order: 3; width: 100%; margin-inline-start: 0; overflow-x: auto; }
  .masthead-tools { margin-inline-start: auto; }
  .clock { display: none; }
}

@media (max-width: 560px) {
  .provider-stats { flex-direction: column; gap: 4px; }
  .row { flex-wrap: wrap; gap: 4px 12px; min-height: 0; }
  .row-label { white-space: normal; }
  .provider-head { flex-wrap: wrap; gap: 8px; }
  .provider-status { align-items: flex-start; }
  .detail-facts { gap: 18px; }
  .btn-count { display: none; }
  .btn[data-busy='true'] .btn-count { display: inline; }
}

/* ====================================================== 16. reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .skeleton::after { animation: none; opacity: 0.35; }
  .tl-day:hover { transform: none; }
}
