:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1d2622;
  --muted: #5c6862;
  --line: #e1ded5;
  --soft: #eff0ea;
  --brand: #24543f;
  --brand-2: #2f7a5b;
  --accent: #b9532a;
  --s1: #2f7a5b;
  --s2: #c26a2c;
  --land: #8a6a2f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 38, 34, .06), 0 4px 14px rgba(29, 38, 34, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613; --surface: #18201c; --ink: #e5ebe7; --muted: #a3b0a9; --line: #2a3530; --soft: #1e2823;
    --brand: #8fd0ae; --brand-2: #9fdcbc; --accent: #f0a07a; --s1: #6cc497; --s2: #f0a46a; --land: #d6b56f;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111613; --surface: #18201c; --ink: #e5ebe7; --muted: #a3b0a9; --line: #2a3530; --soft: #1e2823;
  --brand: #8fd0ae; --brand-2: #9fdcbc; --accent: #f0a07a; --s1: #6cc497; --s2: #f0a46a; --land: #d6b56f;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px; line-height: 1.75; letter-spacing: .01em;
}
a { color: var(--brand-2); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; }
h1 { font-size: clamp(1.45rem, 4.6vw, 2.05rem); letter-spacing: .02em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-top: 1em; }
p { margin: 0 0 .8em; }
small { color: var(--muted); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* header */
.hd { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hd-in { display: flex; align-items: center; gap: 12px; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.logo-m { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; font-size: .95rem; }
.nv { display: flex; gap: 14px; font-size: .9rem; margin-left: auto; }
.nv a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.nv a:hover { color: var(--ink); }
.sb { position: relative; flex: 1 1 260px; max-width: 420px; }
.sb-i {
  width: 100%; font: inherit; font-size: 16px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--soft); color: var(--ink); outline: none;
}
.sb-i:focus { border-color: var(--brand-2); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 20%, transparent); }
.sb-r {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); overflow: hidden; z-index: 30; max-height: 70vh; overflow-y: auto;
}
.sb-r a { display: block; padding: 9px 14px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.sb-r a:first-child { border-top: 0; }
.sb-r a:hover, .sb-r a.on { background: var(--soft); }
.sb-r small { display: block; font-size: .78rem; }
.sb-r .sb-none { padding: 10px 14px; color: var(--muted); font-size: .9rem; }
@media (max-width: 720px) {
  .nv { order: 3; width: 100%; justify-content: space-between; margin: 0; gap: 8px; font-size: .85rem; }
  .sb { order: 2; flex-basis: 100%; max-width: none; }
  .hd { position: static; }
}

/* page */
main { padding: 18px 0 40px; }
.bc ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 12px; font-size: .8rem; color: var(--muted); }
.bc li + li::before { content: "›"; margin-right: 4px; }
.bc a { color: var(--muted); }
.ph { margin: 6px 0 16px; }
.eyebrow { color: var(--muted); font-size: .85rem; margin: 0 0 4px; }
.lead { color: var(--muted); font-size: .98rem; }
.lede { background: var(--surface); border-left: 4px solid var(--brand-2); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; margin: 0 0 16px; box-shadow: var(--shadow); }
.sec { margin: 28px 0; }
.note { color: var(--muted); font-size: .82rem; }
.sub { font-weight: 700; font-size: .9rem; margin: 14px 0 6px; }
.more { font-size: .92rem; }
.ul { padding-left: 1.2em; margin: 0 0 .6em; }
.ul li { margin: .25em 0; }
.updated, .src-l { color: var(--muted); font-size: .8rem; text-align: center; }

.def { border-left: 4px solid var(--s2); background: var(--surface); padding: 10px 14px; border-radius: 0 10px 10px 0; font-size: .9rem; margin: 0 0 16px; }

/* 相場のカード */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; margin: 0 0 6px; }
.kc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 10px; box-shadow: var(--shadow); border-top: 4px solid var(--brand-2); }
.kc-l { border-top-color: var(--land); }
.kc-k { border-top-color: var(--s2); }
.kc p { margin: 0 0 4px; }
.kc-t { font-weight: 700; font-size: .92rem; }
.kc-v { font-size: 1.9rem; font-weight: 800; line-height: 1.25; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.kc-v small { font-size: .9rem; font-weight: 600; margin-left: 2px; }
.kc-s { font-size: .86rem; color: var(--ink); }
.kc-n { font-size: .75rem; color: var(--muted); margin-top: 6px !important; }

/* 表 */
.tw { overflow-x: auto; margin: 6px 0 10px; }
.dt { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.dt caption { text-align: left; font-weight: 700; font-size: .88rem; padding: 4px 0 6px; }
.dt th, .dt td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
.dt thead th { font-size: .78rem; color: var(--muted); font-weight: 600; background: var(--soft); white-space: nowrap; }
.dt .r { text-align: right; white-space: nowrap; }
.dt td small { display: block; font-size: .72rem; }
.dt.sortable th { cursor: pointer; user-select: none; }
.dt.sortable th::after { content: "↕"; font-size: .7rem; margin-left: 3px; opacity: .45; }
.dt.sortable th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
.dt.sortable th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
.rt td:first-child { width: 3em; text-align: center; font-weight: 800; color: var(--muted); }
.rt tbody tr:nth-child(-n+3) td:first-child { color: var(--accent); }
.rt td:nth-child(2) a { font-weight: 600; text-decoration: none; }
.rt td:nth-child(2) small { display: block; font-size: .75rem; line-height: 1.4; }

/* グラフ */
.ch { margin: 4px 0 14px; }
.ch svg { width: 100%; height: auto; display: block; }
.ch-g line { stroke: var(--line); stroke-width: 1; }
.ch-g text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.ch polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch .s1 { stroke: var(--s1); }
.ch .s2 { stroke: var(--s2); stroke-dasharray: 6 4; }
.ch circle.s1 { fill: var(--s1); stroke: none; }
.ch circle.s2 { fill: var(--s2); stroke: none; }
.ch figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--s1); vertical-align: middle; margin-right: 5px; }
.lg.s2::before { border-top: 3px dashed var(--s2); }

/* リンクの並び */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 10px; }
.chips li { display: flex; flex-direction: column; padding: 5px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; line-height: 1.45; }
.chips a { text-decoration: none; font-weight: 600; }
.chips small { font-size: .72rem; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.grid a { display: block; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .92rem; text-align: center; }
.grid a:hover { border-color: var(--brand-2); }
.area { margin-bottom: 6px; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tile-h { display: block; font-weight: 800; text-decoration: none; margin-bottom: 6px; }
.tile ol { list-style: none; padding: 0; margin: 0; }
.tile li { display: grid; grid-template-columns: 1.6em 1fr auto; gap: 6px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; align-items: baseline; }
.tile li span { color: var(--muted); font-weight: 700; }
.tile li em { font-style: normal; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.tile li a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq h3 { margin-top: 14px; font-size: .98rem; }
.faq h3::before { content: "Q. "; color: var(--brand-2); }
.dl { margin: 0; }
.dl div { display: grid; grid-template-columns: 6em 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; word-break: break-all; }
.pg { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.pg a, .pg span { padding: 4px 11px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.pg span[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* top */
.hero { padding: 26px 0 10px; text-align: center; }
.hero-k { display: inline-block; font-size: .8rem; padding: 3px 12px; border-radius: 999px; background: color-mix(in srgb, var(--brand-2) 14%, var(--surface)); color: var(--brand); font-weight: 700; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.1rem, 8vw, 3.3rem); letter-spacing: .08em; margin-bottom: 10px; }
.hero h1 span { color: var(--brand-2); }
.hero-l { max-width: 640px; margin: 0 auto 18px; color: var(--muted); }
.hero-l b { color: var(--ink); }
.sb-big { max-width: 560px; margin: 0 auto; flex: none; text-align: left; }
.sb-big .sb-i { padding: 13px 20px; font-size: 1.05rem; background: var(--surface); box-shadow: var(--shadow); }
.sb-page { margin: 0 0 16px; }
.hero-ex { font-size: .85rem; color: var(--muted); margin-top: 14px; }
.hero-ex a { margin: 0 6px; white-space: nowrap; }
.why p { font-size: .95rem; }
.results ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.results a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface); }
.results a small { display: block; }

/* share */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 18px; }
.share-l { font-size: .85rem; color: var(--muted); margin-right: 4px; }
.sh { font: inherit; font-size: .85rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }
.sh-x { background: #111; color: #fff; border-color: #111; }
.sh-line { background: #06c755; color: #fff; border-color: #06c755; }
.sh-hb { background: #00a4de; color: #fff; border-color: #00a4de; }

/* footer */
.ft { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0 30px; font-size: .8rem; color: var(--muted); }
.ft a { color: var(--muted); }
.ft-nv { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0; }
.ft-c { margin-top: 8px; }

@media (max-width: 520px) {
  .card { padding: 14px 14px 10px; }
  .kc-v { font-size: 1.65rem; }
  .dt { font-size: .84rem; }
  .dt th, .dt td { padding: 6px 5px; }
  .rt td:first-child { width: 2.2em; }
}
