/* 色はここだけ（sata-aesthetic ライト基調: 文字 Deep Ink・面 Mist・アクセント 1 色＝リンクと合計だけ）。グラデ・影・発光なし */
/* 明朝は OS ごとの名前を並べる（Windows＝Yu Mincho・Linux＝Noto Serif CJK JP。名前が無いと Linux の Chrome は和文だけの見出しをゴシックで出す・2026-10-07 実測） */
:root { --ink: #1B2A3A; --sub: #55657A; --line: #CFDDE9; --bg: #FFFFFF; --surface: #F2F8FD; --accent: #1F6AA5;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.8 system-ui, "Hiragino Sans", "Noto Sans JP", sans-serif; }
header, main, footer { max-width: 760px; margin: 0 auto; padding: 0 20px; }
header { padding-top: 32px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
header > a { color: var(--ink); text-decoration: none; font-family: var(--serif); }
nav { margin-top: 4px; }
nav a { margin-right: 16px; color: var(--sub); font-size: 14px; }
nav a[aria-current] { color: var(--ink); text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.4; }
h1 { font-size: clamp(26px, 18px + 2vw, 34px); margin: 32px 0 8px; }
h2 { font-size: 20px; margin: 44px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
h3 { font-size: 17px; margin: 28px 0 4px; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.note { color: var(--sub); font-size: 14px; }
.facts { background: var(--surface); border: 1px solid var(--line); padding: 10px 14px; font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
th { color: var(--sub); font-weight: 600; word-break: auto-phrase; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { white-space: nowrap; }
/* 値が長いセル（→ や ・ で続く値）は、数字と単位の組（span）の間でだけ折り返す */
td.num.multi { white-space: normal; }
td.num.multi > span { white-space: nowrap; }
table.wide { min-width: 600px; }
table.wide th, table.wide td { vertical-align: baseline; }
table.wide td:first-child { min-width: 12em; }
table.wide td:first-child a { word-break: auto-phrase; }
/* 比較の主役＝メモリ（h1 の問いの答え）。数字の大きさだけで一点を立てる（色は足さない） */
table.wide td:nth-child(3) { font-size: 18px; font-weight: 600; }
.tool { display: block; color: var(--sub); font-size: 13px; }
tfoot td { font-weight: 600; border-top: 2px solid var(--ink); }
tfoot td.num { color: var(--accent); font-size: 16px; white-space: normal; }
label { cursor: pointer; }
input[type="checkbox"] { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; accent-color: var(--accent); }
code { font-size: 13px; }
footer { margin-top: 56px; padding-bottom: 40px; color: var(--sub); font-size: 13px; border-top: 1px solid var(--line); padding-top: 16px; }

/* 幅 640px 未満: 表を横にスクロールさせず、1 行を縦に積む（見出しは各セルの data-label か thead の段） */
@media (max-width: 639px) {
  table.wide { min-width: 0; }
  table.wide, table.wide tbody, #calc, #calc thead, #calc tbody, #calc tfoot { display: block; }
  table.wide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table.wide tr { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.wide td { border: 0; padding: 0; min-width: 0; }
  table.wide td:first-child { grid-column: 1 / -1; min-width: 0; }
  table.wide td:nth-child(3) { grid-column: 1 / -1; order: 1; margin: 8px 0 6px; font-size: 22px; line-height: 1.3; }
  table.wide td:nth-child(n+4), table.wide td:nth-child(2) { order: 2; }
  table.wide td.num { text-align: left; white-space: normal; }
  table.wide td.num::before { content: attr(data-label); display: block; color: var(--sub); font-size: 12px; font-weight: 400; line-height: 1.5; }
  #calc tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  #calc th, #calc td { border: 0; padding: 0 2px; }
  #calc tr > :first-child { grid-column: 1 / -1; }
  #calc thead tr { padding: 4px 0; }
  #calc thead th:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #calc tbody td.num { margin-top: 4px; }
  #calc tfoot tr { grid-template-columns: 1fr; border-top: 2px solid var(--ink); border-bottom: 0; }
  #calc tfoot td { border-top: 0; }
  #calc tfoot td.num { font-size: 18px; margin-top: 4px; }
  #calc tfoot td.num::before { content: attr(data-label); float: left; color: var(--sub); font-size: 13px; font-weight: 400; line-height: 2.2; }
}
