:root {
  --bg: #f7f5f0;
  --panel: #ffffff;
  --fg: #1c1b19;
  --muted: #66635c;
  --faint: #8c887f;
  --line: #e2ded5;
  --grid: #ece9e2;
  --axis: #b3aea3;
  --ref: #7d786e;
  --hover: #f1eee7;
  --chip: #ffffff;
  --chip-on: #1c1b19;
  --chip-on-fg: #ffffff;
  --tip: #ffffff;
  --shadow: 0 6px 24px rgba(28, 27, 25, .12);
  --up: #9a3b2a;
  --down: #2c5f86;
  --warn: #9a5b00;
  --ok: #2f6b4a;
  --bad: #a0302a;
  --c0: #1f4e79;
  --c1: #c2553b;
  --c2: #2f7d5b;
  --c3: #b07f12;
  --c4: #6a4c93;
  --c5: #2a8f8a;
  --c6: #8a5a44;
  --c7: #b5487a;
  --muted-series: #a8a397;
  --serif: "Noto Serif JP", "Noto Serif CJK JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --sans: "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --radius: 10px;
  --fs-cap: 12.5px;
  --fs-body: 15px;
  --gap: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312;
    --panel: #1b1b19;
    --fg: #ecebe6;
    --muted: #a8a59d;
    --faint: #85827a;
    --line: #34332f;
    --grid: #282724;
    --axis: #5d5a53;
    --ref: #9c988e;
    --hover: #24231f;
    --chip: #1b1b19;
    --chip-on: #ecebe6;
    --chip-on-fg: #131312;
    --tip: #23221f;
    --shadow: 0 6px 24px rgba(0, 0, 0, .5);
    --up: #e08a74;
    --down: #7fb2dc;
    --warn: #e0a64a;
    --ok: #7cc39b;
    --bad: #ef7f77;
    --c0: #79a9dc;
    --c1: #ea8a6e;
    --c2: #6cc49b;
    --c3: #e0b552;
    --c4: #b49ae0;
    --c5: #5fc7c0;
    --c6: #d39b80;
    --c7: #e586b2;
    --muted-series: #6f6c64;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131312;
  --panel: #1b1b19;
  --fg: #ecebe6;
  --muted: #a8a59d;
  --faint: #85827a;
  --line: #34332f;
  --grid: #282724;
  --axis: #5d5a53;
  --ref: #9c988e;
  --hover: #24231f;
  --chip: #1b1b19;
  --chip-on: #ecebe6;
  --chip-on-fg: #131312;
  --tip: #23221f;
  --shadow: 0 6px 24px rgba(0, 0, 0, .5);
  --up: #e08a74;
  --down: #7fb2dc;
  --warn: #e0a64a;
  --ok: #7cc39b;
  --bad: #ef7f77;
  --c0: #79a9dc;
  --c1: #ea8a6e;
  --c2: #6cc49b;
  --c3: #e0b552;
  --c4: #b49ae0;
  --c5: #5fc7c0;
  --c6: #d39b80;
  --c7: #e586b2;
  --muted-series: #6f6c64;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
b, strong { font-weight: 650; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { font-family: var(--serif); font-size: 16px; white-space: nowrap; text-decoration: none; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav a:hover, .nav a.on { color: var(--fg); background: var(--hover); }
.theme {
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  flex: none;
  font-size: 14px;
  line-height: 1;
}

/* ---------- page */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 64px; }
.tape {
  height: 14px;
  color: var(--faint);
  opacity: .7;
  margin-top: 28px;
  background:
    linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px) left bottom / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 40px) left bottom / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 80px) left bottom / 100% 14px no-repeat;
}
.kicker { margin: 18px 0 0; font-size: var(--fs-cap); color: var(--muted); letter-spacing: .08em; }
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
  margin: 6px 0 12px;
  letter-spacing: .02em;
}
.lede { max-width: 44em; margin: 0 0 10px; font-size: 16px; }
.fresh { font-size: var(--fs-cap); color: var(--muted); margin: 0 0 8px; }
.fresh b { color: var(--fg); font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--ok); }
.dot.late { background: var(--warn); }
.dot.bad { background: var(--bad); }

section.sec { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.sec-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.qno {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 7px;
  line-height: 1.6;
}
h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.35; margin: 0; }
.share-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
}
.share-link:hover { color: var(--fg); border-color: var(--faint); }
h3 { font-size: 16px; font-weight: 600; margin: 0; line-height: 1.45; }

/* ---------- verdict block */
.verdict {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px 22px;
  margin: 8px 0 18px;
  align-items: start;
}
.verdict .v { padding-left: 12px; border-left: 3px solid var(--line); }
.verdict .v.robust { border-color: var(--fg); }
.verdict .v.split { border-color: var(--c1); }
.verdict .v.why { border-color: var(--faint); border-left-style: dashed; }
.verdict .vh { font-size: 12px; color: var(--muted); letter-spacing: .05em; margin-bottom: 2px; }
.verdict p { margin: 0 0 4px; }

/* ---------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: var(--gap); }
.grid + .grid, .grid + .card, .card + .grid { margin-top: var(--gap); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  min-width: 0;
  position: relative;
}
.card-h { display: flex; align-items: flex-start; gap: 10px; }
.card-h h3 { flex: 1; }
.tools { display: flex; gap: 4px; flex: none; }
.tool {
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 1px 7px;
  cursor: pointer;
  line-height: 1.6;
}
.tool:hover { color: var(--fg); border-color: var(--faint); }
.cap { font-size: var(--fs-cap); color: var(--muted); margin: 4px 0 10px; line-height: 1.65; }
.cap b { color: var(--fg); font-weight: 600; }
.foot { font-size: 11.5px; color: var(--faint); margin: 8px 0 0; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0 0 10px; }
.chips .lab { font-size: 12px; color: var(--muted); margin-right: 3px; }
.chip {
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 2px 11px;
  cursor: pointer;
  line-height: 1.6;
}
.chip:hover { border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-fg); border-color: var(--chip-on); }
.chip:disabled { opacity: .4; cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin: 0 0 6px; min-height: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 16px; height: 3px; border-radius: 2px; flex: none; }
.sw.dash { height: 0; border-top: 2px dashed; background: none !important; border-radius: 0; }
.sw.dot { width: 9px; height: 9px; border-radius: 50%; }
.sw.hollow { width: 9px; height: 9px; border-radius: 50%; background: none !important; border: 2px solid; }
.sw.box { width: 11px; height: 11px; border-radius: 2px; }
.sw.band { height: 9px; opacity: .35; }
.chart { position: relative; width: 100%; min-height: 220px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg text { font-family: var(--sans); font-size: 11.5px; fill: var(--muted); }
.chart svg .nm { fill: var(--fg); }
.chart svg .val { fill: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart svg .grp { fill: var(--muted); font-size: 11px; letter-spacing: .04em; }
.chart .empty, .chart .err { display: flex; align-items: center; justify-content: center; min-height: inherit; color: var(--muted); font-size: 13px; }
.tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--tip);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1.55;
  max-width: min(20rem, 100%);
}
.tip .th { color: var(--muted); margin-bottom: 2px; }
.tip .tr { display: flex; align-items: center; gap: 6px; }
.tip .tv { margin-left: auto; padding-left: 10px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tip .sw { width: 10px; }

/* ---------- updates and watch */
.two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
.upd { display: grid; gap: 10px; }
.u {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 15px;
}
.u-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.u-h a { font-weight: 600; text-decoration: none; }
.u-h a:hover { text-decoration: underline; }
.u-h .when { font-size: 12px; color: var(--muted); }
.tag { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); }
.tag.p { color: var(--warn); border-color: currentColor; }
.u ul { margin: 0; padding-left: 1.1em; }
.u li { margin: 2px 0; font-size: 14px; }
.u li.rev { color: var(--muted); font-size: 13px; list-style: "↻ "; }
.up { color: var(--up); }
.down { color: var(--down); }
.watch { display: grid; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.w { padding: 11px 15px; border-top: 1px solid var(--line); }
.w:first-child { border-top: 0; }
.w-when { font-size: 12px; color: var(--muted); }
.w-when b { color: var(--fg); }
.w-what { font-weight: 600; font-size: 14px; }
.w p { margin: 3px 0 0; font-size: 13.5px; }
.subh { font-size: 13px; color: var(--muted); letter-spacing: .06em; margin: 0 0 8px; }

/* ---------- question cards */
.qcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin: 20px 0 6px; }
.qcard {
  display: block;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px 12px;
  position: relative;
  overflow: hidden;
}
.qcard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  color: var(--faint);
  opacity: .5;
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px) left top / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 40px) left top / 100% 7px no-repeat;
}
.qcard:hover { border-color: var(--faint); }
.qcard .q { font-size: 12px; color: var(--muted); margin-top: 4px; }
.qcard .t { font-family: var(--serif); font-size: 17px; line-height: 1.4; margin: 2px 0 6px; }
.qcard .r { font-size: 13px; line-height: 1.6; margin: 0; }
.qcard .r + .r { margin-top: 4px; }
.qcard .k { font-size: 11px; color: var(--muted); margin-right: 4px; }

/* ---------- tables */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th, table.t td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; vertical-align: top; }
table.t th:first-child, table.t td:first-child { text-align: left; white-space: normal; }
table.t th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.t th.grp-h { text-align: center; border-bottom: 1px solid var(--line); color: var(--fg); }
table.t th[rowspan] { vertical-align: bottom; }
table.t.left th, table.t.left td { text-align: left; white-space: normal; }
#breaks td:nth-child(2) { white-space: nowrap; }

/* ---------- scenario */
.scn { display: grid; gap: 8px; }
.scn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.scn input[type=range] { flex: 1; min-width: 160px; accent-color: var(--c3); }
.scn .out { font-size: 15px; }
.scn .out b { font-size: 18px; }

/* ---------- status */
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.s { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px; font-size: 13px; }
.s .n { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.s .row { display: flex; gap: 8px; color: var(--muted); }
.s .row b { color: var(--fg); font-weight: 500; }
.s .k { flex: none; min-width: 2.6em; }
.s .st { margin-top: 5px; }
.s .st.late { color: var(--warn); }
.s .st.bad { color: var(--bad); }

/* ---------- latest and next release strip */
.pulse { display: grid; gap: 4px; margin: 4px 0 2px; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; line-height: 1.6; }
.pulse p { margin: 0; }
.pulse .lab { display: inline-block; min-width: 3.2em; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.pulse a { text-decoration: none; }
.pulse a:hover { text-decoration: underline; }
.pulse .more-link { font-size: 12px; color: var(--muted); }

/* ---------- period label on summary cards */
.qcard .per { margin-left: 8px; font-size: 11.5px; color: var(--faint); }

/* ---------- two-line conclusion above the charts */
.concl { margin: 6px 0 16px; padding: 10px 14px; border-left: 3px solid var(--fg); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; }
.concl .per { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.concl p { margin: 2px 0; font-size: 15px; }
.concl .k, .qcard .k { display: inline-block; font-size: 11px; color: var(--muted); margin-right: 6px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; line-height: 1.5; vertical-align: 1px; }

/* ---------- expandable detail */
details.more { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 8px; }
details.more > summary, details.notes > summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; padding: 4px 0; }
details.more > summary::-webkit-details-marker, details.notes > summary::-webkit-details-marker { display: none; }
details.more > summary::before, details.notes > summary::before { content: "＋"; display: inline-block; width: 1.4em; color: var(--faint); }
details.more[open] > summary::before, details.notes[open] > summary::before { content: "−"; }
details.more > summary:hover, details.notes > summary:hover { color: var(--fg); }
details.more .verdict { grid-template-columns: minmax(0, 1fr); max-width: 52em; gap: 12px; margin: 8px 0 4px; }
.src { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
details.notes { font-size: 12px; color: var(--muted); max-width: 64em; line-height: 1.75; }
details.notes p { margin: 2px 0 6px; }

/* ---------- scenario inputs */
.scn-n { display: inline-flex; align-items: center; gap: 3px; }
.scn-n input { width: 5.6em; font: inherit; font-variant-numeric: tabular-nums; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--chip); color: var(--fg); }
#scn-zero { font-size: 12px; padding: 2px 9px; }
.s .st.unk { color: var(--warn); }
.dot.unk { background: var(--faint); }

.notes { font-size: 12px; color: var(--muted); max-width: 64em; margin-top: 14px; line-height: 1.75; }
.notes p { margin: 0 0 5px; }
.method p { max-width: 48em; }
.method h3 { margin: 18px 0 6px; }
.method ul { padding-left: 1.2em; max-width: 52em; }
.method li { margin: 3px 0; }
footer { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
/* room below the last line for the badge the host pins to the bottom-right corner */
footer { padding-bottom: 80px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px; /* above the host's corner badge */
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 50;
  box-shadow: var(--shadow);
}
.skel { color: transparent !important; background: var(--grid); border-radius: 4px; }
@media (max-width: 520px) {
  :root { --fs-body: 14.5px; }
  .card { padding: 13px 13px 12px; }
  .tool { padding: 1px 5px; }
}
@media print {
  .topbar, .tools, .share-link, .theme { display: none !important; }
  section.sec { break-inside: avoid-page; }
}
