/* Wave Status: shared look for the status page and the history page
   (2026-10-05 redesign, owner: "professional, SaaS level, like the Claude status page"). */
html { forced-color-adjust: none; }   /* the same page on every computer, High Contrast too (owner 2026-09-30) */
:root {
  --ok: #76AD2A;
  --partial: #F0883E;
  --major: #E5484D;
  --maint: #3B82F6;
  --nodata: #DEDCD4;
  --unk: #8B8A84;
  --text: #191917;
  --muted: #6B6A64;
  --faint: #9A9890;
  --line: #E7E5DE;
  --line-strong: #D9D7CF;
  --bg: #F8F7F3;
  --card: #FFFFFF;
  --soft: #F3F2ED;
  --link: #2563EB;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(25,25,23,.04), 0 1px 1px rgba(25,25,23,.03);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
header.top { padding: 28px 0 26px; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { text-decoration: none; opacity: .9; }
.brand img { width: 34px; height: 34px; object-fit: contain; display: block; }
.brand .name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.brand .sub { font-size: 12.5px; color: var(--muted); }
nav.links { display: flex; gap: 6px; align-items: center; }
nav.links a {
  font-size: 13.5px; color: var(--muted); padding: 7px 12px; border-radius: 8px;
  border: 1px solid transparent; font-weight: 500; white-space: nowrap;
}
nav.links a:hover { color: var(--text); background: var(--card); border-color: var(--line); text-decoration: none; }
nav.links a.btn { background: var(--text); color: #fff; border-color: var(--text); }
nav.links a.btn:hover { background: #33332f; color: #fff; }

main { padding-bottom: 56px; }

/* ── Banner ── */
.status-summary {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--radius); padding: 18px 22px; color: #fff;
  font-size: 19px; font-weight: 650; letter-spacing: -.005em;
  margin-bottom: 34px; box-shadow: var(--shadow);
}
.status-summary .sum-ico svg { display: block; }
.status-summary .sum-ico svg circle, .status-summary .sum-ico svg path:first-child { fill: rgba(255,255,255,.25); }
.status-summary .sum-text { flex: 1 1 auto; }
.status-summary .sum-time { font-size: 13px; font-weight: 500; opacity: .85; white-space: nowrap; }
.status-summary.s-operational { background: var(--ok); }
.status-summary.s-partial { background: var(--partial); }
.status-summary.s-major { background: var(--major); }
.status-summary.s-maintenance { background: var(--maint); }
.status-summary.s-unknown { background: var(--unk); }

/* ── Active incidents and maintenance (top of the page) ── */
.notice {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 22px; overflow: hidden; box-shadow: var(--shadow);
}
.notice .incident { padding: 18px 22px 6px; margin: 0; border: 0; }
.notice .incident .inc-title {
  margin: -18px -22px 14px; padding: 13px 22px; color: #fff; font-size: 16px;
}
.notice .imp-minor .inc-title, .notice .imp-none .inc-title { background: #E8A92B; }
.notice .imp-major .inc-title { background: var(--partial); }
.notice .imp-critical .inc-title { background: var(--major); }
.notice .imp-maint .inc-title { background: var(--maint); }

/* ── Components card ── */
.card-note { display: flex; justify-content: flex-end; font-size: 12.5px; color: var(--muted); margin: 0 2px 8px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.comp { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.comp:last-child { border-bottom: 0; }
.comp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.comp-name { font-weight: 600; font-size: 15.5px; }
.badge { font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.s-operational { color: var(--ok); }
.badge.s-partial { color: var(--partial); }
.badge.s-major { color: var(--major); }
.badge.s-maintenance { color: var(--maint); }
.badge.s-unknown { color: var(--unk); }
svg.bars { display: block; width: 100%; height: 34px; margin: 13px 0 9px; }
svg.bars rect { cursor: pointer; transition: opacity .12s; }
svg.bars:hover rect { opacity: .55; }
svg.bars rect.hover, svg.bars:hover rect.hover { opacity: 1; }
.axis { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--faint); }
.axis i { flex: 1 1 auto; height: 1px; background: var(--line); }
.pad { padding: 22px; margin: 0; }

.legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  font-size: 12.5px; color: var(--muted); margin: 14px 2px 44px;
}
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.linkish {
  font: inherit; font-size: 12.5px; color: var(--link); background: none; border: 0;
  padding: 0; cursor: pointer;
}
.linkish:hover { text-decoration: underline; text-underline-offset: 2px; }
.legend .linkish { margin-left: auto; }

/* ── Past incidents (Claude-style day list) ── */
h2.section { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 18px; }
.day-block { margin-bottom: 26px; }
.day-block h3 {
  font-size: 15px; font-weight: 650; margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
}
.empty { color: var(--muted); font-size: 14px; margin: 0; }
.incident { margin: 0 0 18px; }
.inc-title { font-size: 16px; font-weight: 650; margin: 0 0 6px; line-height: 1.35; }
.imp-minor > .inc-title, .imp-none > .inc-title { color: #C98A12; }
.imp-major > .inc-title { color: #E06A1E; }
.imp-critical > .inc-title { color: var(--major); }
.imp-maint > .inc-title { color: var(--maint); }
.inc-meta { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.inc-note { font-size: 14px; margin: 0 0 8px; }
.upd { margin: 0 0 12px; }
.upd p { margin: 0; font-size: 14.5px; }
.upd p strong { font-weight: 650; }
.upd time { display: block; font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.history-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; margin-top: 6px; }

footer.bottom { padding: 0 0 40px; color: var(--faint); font-size: 12px; }
footer.bottom .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── Tooltip ── */
.tip {
  position: fixed; z-index: 20; pointer-events: none;
  background: #fff; color: var(--text); font-size: 13px;
  padding: 14px 14px 12px; border-radius: 10px;
  width: 280px; max-width: calc(100vw - 16px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(25,25,23,.16);
  display: none;
}
.tip::before, .tip::after {
  content: ""; position: absolute; left: var(--caret, 50%); transform: translateX(-50%);
  border: 7px solid transparent;
}
.tip::before { top: -7px; border-bottom-color: var(--line); border-top-width: 0; }
.tip::after { top: -6px; border-bottom-color: #fff; border-top-width: 0; }
.tip.above::before { top: auto; bottom: -7px; border-bottom-color: transparent; border-top-color: var(--line); border-bottom-width: 0; border-top-width: 7px; }
.tip.above::after { top: auto; bottom: -6px; border-bottom-color: transparent; border-top-color: #fff; border-bottom-width: 0; border-top-width: 6px; }
.tip-date { font-weight: 650; font-size: 14px; margin-bottom: 10px; }
.tip-row {
  display: flex; align-items: center; gap: 9px;
  background: var(--soft); border-radius: 7px; padding: 8px 10px; margin-top: 6px;
}
.tip-row span { flex: 1 1 auto; font-weight: 550; }
.tip-row b { font-weight: 550; color: var(--muted); white-space: nowrap; font-size: 12.5px; }
.ico { flex: 0 0 auto; display: block; }
.tip-none { color: var(--muted); font-size: 13px; margin: 0; }
.tip-rel-h { font-size: 10.5px; letter-spacing: .09em; color: var(--faint); font-weight: 650; margin: 12px 0 4px; }
.tip-rel { font-size: 13px; padding: 2px 0; line-height: 1.35; }
.tip-more { color: var(--faint); font-size: 11.5px; margin-top: 10px; }

/* ── Panel (help, a day's details) ── */
dialog.panel {
  border: 1px solid var(--line); border-radius: 14px; padding: 0;
  background: var(--card); color: var(--text);
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  box-shadow: 0 20px 48px rgba(25,25,23,.2);
}
dialog.panel::backdrop { background: rgba(25,25,23,.38); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-sub { color: var(--muted); font-size: 13px; font-weight: 400; }
.panel-x {
  font: inherit; font-size: 20px; line-height: 1; color: var(--muted);
  background: none; border: 0; cursor: pointer; padding: 3px 7px; border-radius: 7px;
}
.panel-x:hover { color: var(--text); background: var(--soft); }
.panel-body { padding: 16px 20px 20px; font-size: 14px; }
.panel-body h3 { font-size: 10.5px; letter-spacing: .09em; color: var(--faint); font-weight: 650; margin: 18px 0 8px; }
.panel-body h3:first-child { margin-top: 0; }
.panel-body .tip-date { display: none; }
.key-row { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 9px; }
.key-row .sw { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; margin: 5px 0 0; }
.key-row p { margin: 0; }
.check-row { margin: 0 0 8px; }
.shade-scale { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.shade-scale i { width: 18px; height: 14px; border-radius: 3px; display: inline-block; }
.shade-scale span:first-child { margin-right: 4px; }
.shade-scale span:last-child { margin-left: 4px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.stat { background: var(--soft); border-radius: 8px; padding: 9px 11px; flex: 1 1 90px; }
.stat b { display: block; font-size: 15px; }
.stat span { color: var(--muted); font-size: 12px; }
.day-inc { border-top: 1px solid var(--line); padding: 10px 0 0; margin: 10px 0 0; }
.panel-body h3 + .day-inc { border-top: 0; padding-top: 0; margin-top: 0; }
.day-inc-title { font-weight: 600; }
.day-inc-when { color: var(--muted); font-size: 13px; margin: 2px 0 4px; }

/* ── History page ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-bottom: 22px; }
.tabs a {
  padding: 10px 16px; font-size: 14.5px; font-weight: 550; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--text); }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.pager { display: flex; align-items: center; gap: 10px; }
.pager button {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--text); cursor: pointer; font-size: 16px; line-height: 1;
}
.pager button:hover:not(:disabled) { background: var(--soft); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .span { font-size: 15px; font-weight: 600; min-width: 210px; text-align: center; }
select.pick {
  font: inherit; font-size: 14px; padding: 8px 32px 8px 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text); cursor: pointer;
}
.month { margin-bottom: 34px; }
.month h3 { font-size: 18px; font-weight: 650; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
.incident.compact { border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin: 0 0 10px; }
.incident.compact summary { list-style: none; cursor: pointer; padding: 13px 16px; display: block; }
.incident.compact summary::-webkit-details-marker { display: none; }
.incident.compact summary:hover { background: #FBFBF9; border-radius: 10px; }
.incident.compact .inc-title { display: block; font-size: 15px; margin: 0 0 3px; }
.imp-minor .inc-title, .imp-none .inc-title { color: #C98A12; }
.imp-major .inc-title { color: #E06A1E; }
.imp-critical .inc-title { color: var(--major); }
.imp-maint .inc-title { color: var(--maint); }
.inc-last { display: block; font-size: 14px; color: var(--text); }
.inc-range { display: block; font-size: 12.5px; color: var(--faint); margin-top: 3px; }
.incident.compact .inc-body { padding: 4px 16px 6px; border-top: 1px solid var(--line); }
.incident.compact .inc-body .inc-meta { margin-top: 10px; }
.more-btn {
  font: inherit; font-size: 13.5px; font-weight: 550; color: var(--link); background: none; border: 0;
  padding: 4px 0; cursor: pointer;
}
.more-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.cal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 18px; box-shadow: var(--shadow); }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cal-head b { font-size: 15px; }
.cal-head span { font-size: 12.5px; color: var(--muted); }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; font-size: 10.5px; color: var(--faint); text-align: center; margin-bottom: 5px; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-days span { aspect-ratio: 1; border-radius: 4px; }
.cal-days span.day { cursor: pointer; }
.cal-days span.day:hover { outline: 2px solid rgba(25,25,23,.35); outline-offset: 1px; }
.loading { color: var(--muted); font-size: 14px; padding: 20px 0; }

@media (max-width: 720px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal { max-width: 360px; }
}
@media (max-width: 560px) {
  header.top { padding: 20px 0 18px; }
  .brand .sub { display: none; }
  nav.links a { padding: 6px 9px; font-size: 13px; }
  .status-summary { font-size: 16.5px; padding: 15px 16px; margin-bottom: 26px; }
  .status-summary .sum-time { display: none; }
  .comp { padding: 16px 16px 12px; }
  .notice .incident { padding: 16px 16px 4px; }
  .notice .incident .inc-title { margin: -16px -16px 12px; padding: 12px 16px; }
  .legend .linkish { margin-left: 0; }
  .pager .span { min-width: 0; font-size: 14px; }
  .controls { flex-direction: column; align-items: stretch; }
  .pager { justify-content: space-between; }
}
