:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1c2333;
  --muted: #5d6676;
  --line: #e3dfd6;
  --soft: #f1eee7;
  --brand: #1f3f73;
  --brand-2: #2f5ea8;
  --accent: #c0392b;
  --g5: #16794a;
  --g4: #3f8f5a;
  --g3: #6f7a86;
  --g2: #b7741c;
  --g1: #c2452f;
  --g0: #b9bec6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 35, 51, .06), 0 4px 14px rgba(28, 35, 51, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151d; --surface: #181e29; --ink: #e7eaf0; --muted: #a2abba; --line: #2a3242; --soft: #1e2532;
    --brand: #8fb3ee; --brand-2: #a9c4f2; --accent: #f08a7a;
    --g5: #2f9e66; --g4: #4c9c68; --g3: #6c7786; --g2: #c4852c; --g1: #d0573f; --g0: #3a4252;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11151d; --surface: #181e29; --ink: #e7eaf0; --muted: #a2abba; --line: #2a3242; --soft: #1e2532;
  --brand: #8fb3ee; --brand-2: #a9c4f2; --accent: #f08a7a;
  --g5: #2f9e66; --g4: #4c9c68; --g3: #6c7786; --g2: #c4852c; --g1: #d0573f; --g0: #3a4252;
  --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: 1.02rem; }
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 18px; }
.eyebrow { color: var(--muted); font-size: .85rem; margin: 0 0 4px; }
.lead { color: var(--muted); font-size: .98rem; }
.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: 26px 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; }
.quote { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.quote span { display: block; font-size: .78rem; color: var(--muted); }
.updated { color: var(--muted); font-size: .8rem; text-align: center; }

/* grade chip */
.g { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #fff; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; line-height: 1; }
.g5 { background: var(--g5); } .g4 { background: var(--g4); } .g3 { background: var(--g3); } .g2 { background: var(--g2); } .g1 { background: var(--g1); }
.g0 { background: transparent; color: var(--g0); border: 1px dashed var(--g0); }

/* report card */
.rc { padding-bottom: 8px; }
.rc-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.rc-h h2 { margin: 0; letter-spacing: .3em; }
.rc-avg { display: flex; align-items: baseline; gap: 6px; }
.rc-avg span { font-size: .85rem; color: var(--muted); }
.rc-avg b { font-size: 1.9rem; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.rc-avg small { font-size: .75rem; }
.rc-r { display: grid; grid-template-columns: 1fr auto 70px; grid-template-areas: "k v g" "bar bar bar"; gap: 2px 12px; align-items: center; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.rc-k { grid-area: k; min-width: 0; }
.rc-k b { display: block; font-size: .98rem; }
.rc-k small { display: block; font-size: .75rem; line-height: 1.4; }
.rc-v { grid-area: v; text-align: right; font-variant-numeric: tabular-nums; }
.rc-v b { font-size: 1.15rem; }
.rc-v small { display: block; font-size: .72rem; }
.rc-g { grid-area: g; text-align: center; }
.rc-g small { display: block; font-size: .7rem; line-height: 1.5; margin-top: 2px; }
.rc-na .rc-v { color: var(--muted); font-size: .9rem; }
.rc-bar { grid-area: bar; position: relative; height: 6px; margin-top: 4px; }
.rc-bar::before { content: ""; position: absolute; inset: 0; border-radius: 6px; opacity: .32;
  background: linear-gradient(90deg, var(--g1) 0 7%, var(--g2) 7% 31%, var(--g3) 31% 69%, var(--g4) 69% 93%, var(--g5) 93% 100%); }
.rc-bar i { position: absolute; top: -4px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.rc .note { margin-top: 10px; }

/* detail tables */
.tw { overflow-x: auto; margin: 6px 0 12px; }
.dt, .rt { 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); }
.dt td { text-align: right; white-space: nowrap; }
.kv { list-style: none; padding: 0; margin: 0 0 8px; }
.kv li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.dl { margin: 0; }
.dl div { display: grid; grid-template-columns: 7.5em 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; }
.gaiyo { font-size: .92rem; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.links a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 8px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--soft); font-size: .85rem; }
.tag-c { background: color-mix(in srgb, var(--g5) 14%, var(--surface)); color: var(--ink); font-weight: 600; }
.faq h3 { margin-top: 14px; font-size: .98rem; }
.faq h3::before { content: "Q. "; color: var(--brand-2); }
.badges { list-style: none; padding: 0; margin: 0; }
.badges li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.badges b { color: var(--accent); white-space: nowrap; }

/* ranking table */
.rt th, .rt td { border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: middle; }
.rt thead th { font-size: .78rem; color: var(--muted); text-align: left; background: var(--soft); font-weight: 600; }
.rt-n { width: 3em; text-align: center; font-weight: 800; color: var(--muted); }
.rt tbody tr:nth-child(-n+3) .rt-n { color: var(--accent); }
.rt-c a { font-weight: 600; text-decoration: none; }
.rt-c small { display: block; font-size: .75rem; line-height: 1.4; }
.rt-v { text-align: right; white-space: nowrap; }
.rt-v small { display: block; font-size: .7rem; }
.rt-g { width: 46px; text-align: center; }
.rt-avg { font-weight: 800; font-size: 1.15rem; color: var(--brand); }
.rt-avg small { font-weight: 400; }
.mg { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.mg i { font-style: normal; font-size: .7rem; line-height: 1; padding: 3px 4px; border-radius: 4px; color: #fff; font-weight: 700; }
.mg .g5 { background: var(--g5); } .mg .g4 { background: var(--g4); } .mg .g3 { background: var(--g3); } .mg .g2 { background: var(--g2); } .mg .g1 { background: var(--g1); }
.cn { font-size: .82rem; color: var(--muted); background: var(--soft); border-radius: 8px; padding: 6px 10px; margin: -4px 0 12px; }
.cn span { font-weight: 700; margin-right: 6px; }
.def { border-left: 4px solid var(--brand-2); background: var(--surface); padding: 10px 14px; border-radius: 0 10px 10px 0; font-size: .9rem; margin: 0 0 16px; }
.rt .g { width: 28px; height: 28px; font-size: .95rem; border-radius: 7px; }

/* lists & grids */
.cl { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cl a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface); height: 100%; }
.cl a:hover { border-color: var(--brand-2); }
.cl-n { display: block; font-weight: 600; line-height: 1.45; }
.cl-m { display: block; font-size: .75rem; color: var(--muted); }
.cl-a { display: block; font-size: .8rem; color: var(--muted); }
.cl-a b { color: var(--brand); font-size: 1rem; }
.cl-s a { font-weight: 600; line-height: 1.45; }
.cl-s small { display: block; font-weight: 400; font-size: .75rem; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.grid-w { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid a { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .92rem; }
.grid a:hover { border-color: var(--brand-2); }
.grid small { font-size: .72rem; }
.links-l { list-style: none; padding: 0; margin: 0; }
.links-l li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.links-l a { font-weight: 700; }
.links-l small { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chips a, .chips span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; text-decoration: none; background: var(--surface); }
.chips span { background: var(--brand); color: #fff; border-color: var(--brand); }
.jump { display: flex; gap: 8px; flex-wrap: wrap; font-size: .9rem; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.mini h3 { font-size: .95rem; }
.mini ol, .tile ol { list-style: none; padding: 0; margin: 0; }
.mini li, .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; }
.mini li span, .tile li span { color: var(--muted); font-weight: 700; }
.mini li em, .tile li em { font-style: normal; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.mini a, .tile li a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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(--g5) 14%, var(--surface)); color: var(--g5); 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); }
.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; }
.sample-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.sample-g div { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: var(--soft); text-align: center; }
.sample-g span { font-size: .8rem; font-weight: 600; }
.sample-g small { font-size: .78rem; }
.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; }
.why p { font-size: .95rem; }

/* 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; }
.results .cl { margin-top: 8px; }

/* 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; }
.src p { font-size: .85rem; color: var(--muted); }

@media (max-width: 520px) {
  .card { padding: 14px 14px 10px; }
  .rc-r { grid-template-columns: 1fr auto 56px; gap: 2px 8px; }
  .rc-k b { font-size: .92rem; }
  .dl div { grid-template-columns: 6em 1fr; }
  .rt { font-size: .86rem; }
  .rt-n { width: 2.2em; }
}
