:root {
  color-scheme: light;
  --bg: #fafbf8;
  --surface: #fff;
  --inset: #f2f5f4;
  --line: #dbe3e6;
  --text: #202c39;
  --muted: #506572;
  --dim: #607582;
  --accent: #194f84;
  --mist: #eaf0f4;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Baskervville", "Songti SC", "Noto Serif CJK SC", "STSong", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(19px, 4vw, 56px);
}
* { box-sizing: border-box; }
body { margin: 0; border-top: 2px solid var(--accent); background: var(--bg); color: var(--text); font: 16px/1.72 var(--sans); -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; color: inherit; border: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3, .brand { font-family: var(--serif); }
h2 { font-size: 1.2rem; font-weight: 700; line-height: 1.5; }
small { font-size: .8125rem; }
svg.icon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; z-index: 10; top: -120px; left: 12px; background: var(--accent); color: white; padding: 8px 16px; }
.skip:focus { top: 8px; }
.site-header, .workspace {
  width: min(100% - 2 * var(--gutter), 1030px); margin-inline: auto;
}
.site-header { display: flex; align-items: center; gap: clamp(25px,4.2vw,62px); padding: 25px 0 17px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 10px; }
.brand img { width: 37px; height: 37px; }
.brand strong { font-size: 1.46rem; font-weight: 700; line-height: 1.3; letter-spacing: -.035em; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(1rem, 2.3vw, 2.35rem); }
.site-header nav a { color: #52616a; font-size: .95rem; }
.site-header nav a:hover, .site-header nav a[aria-current=page] { color: var(--accent); }
.site-header nav a[aria-current=page] { font-weight: 650; }
.workspace main { width: min(100%, 868px); min-height: calc(100vh - 83px); padding: clamp(36px,4.6vw,72px) 0 28px; }
body[data-page=charts] main { width: 100%; }
.page-intro { margin-bottom: 30px; }
.eyebrow { display: flex; align-items: center; gap: .47rem; color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .075em; }
.eyebrow::before { content: ""; width: .52rem; height: .52rem; border-radius: 50%; border: 1px solid #7696ad; background: radial-gradient(circle, #7696ad 22%, transparent 28%); }
h1 { margin: 14px 0 10px; color: #202c39; font-size: clamp(2.05rem,3.55vw,2.92rem); font-weight: 680; letter-spacing: -.045em; line-height: 1.3; }
.page-intro p, .description { max-width: 46em; color: var(--muted); font-size: 1.01rem; line-height: 1.85; }
.asof { display: flex; align-items: center; gap: .42rem; margin-top: 10px; color: var(--dim); font-size: .8rem; }
.asof:empty { display: none; }
.asof .icon { width: 14px; height: 14px; }
.asof time, .range-limits, .history-score, .stat-card strong, .score-row, .trend-bottom b { font-variant-numeric: tabular-nums; }
.cards { display: grid; gap: 13px; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.panel-pad { padding: 21px 25px; }
.card-head, .card-title, .section-heading { display: flex; align-items: center; gap: .6rem; }
.card-head, .section-heading { justify-content: space-between; }
.card-title .icon { width: 17px; height: 17px; color: var(--accent); }
.info-btn { display: flex; padding: 5px; border-radius: 50%; color: var(--dim); }
.info-btn:hover { color: var(--accent); background: var(--mist); }
.info-btn .icon { width: 17px; height: 17px; }
.feature-center { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; max-width: 600px; margin: 5px auto 9px; }
.score-type { color: var(--muted); font-size: .92rem; }
.score-row { display: flex; align-items: baseline; gap: .55rem; margin: 3px 0 4px; }
.score-row strong { color: var(--accent); font: 600 clamp(3.7rem,5.5vw,4.8rem)/1.02 var(--serif); letter-spacing: -.065em; }
.score-row span { color: #72818d; font: 1.03rem var(--serif); }
.state-tag { display: inline-flex; align-items: center; gap: .4rem; color: var(--tone); font-size: .86rem; font-weight: 600; }
.state-tag::before { content: ""; width: .36rem; height: .36rem; border-radius: 50%; background: var(--tone); }
.gauge { display: block; width: 100%; max-width: 226px; margin: 0 auto; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.card-foot a, .source-link, dialog a { color: var(--accent); text-decoration: underline; text-decoration-color: #b9cdda; text-underline-offset: 3px; }
.card-foot a:hover, .source-link:hover { text-decoration-color: var(--accent); }
.hist { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px 24px; }
.hist .card-head { grid-column: 1/-1; margin-bottom: 1px; }
.history-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 8px; min-width: 0; border-left: 1px solid var(--line); padding-left: 20px; }
.history-row:nth-child(2) { padding-left: 0; border-left: 0; }
.history-key { color: var(--muted); font-size: .84rem; }
.spark { width: 49px; height: 20px; }
.history-score { font: 700 1.6rem/1.25 var(--serif); }
.history-state { color: var(--tone); font-size: .79rem; text-align: right; }
.trend { margin-top: 13px; }
.segments { display: flex; align-items: center; gap: 1px; border-bottom: 1px solid var(--line); }
.segments button { padding: 4px 8px; color: var(--muted); font-size: .82rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.segments button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.segments button:hover { background: var(--mist); }
.chart-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--dim); font-size: .8rem; }
.plot-wrap { position: relative; margin-top: 9px; }
.plot { display: block; width: 100%; height: clamp(145px,18vh,205px); touch-action: pan-y; }
.axis-labels { display: flex; justify-content: space-between; margin: 2px 12px 0 33px; color: var(--dim); font: .75rem var(--mono); }
.trend-bottom { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.trend-bottom b { margin-left: .35rem; color: var(--text); }
.plot-tip { position: absolute; top: 4px; background: #fff; border: 1px solid #b9cbd7; border-radius: 5px; padding: 4px 8px; color: var(--accent); pointer-events: none; font-size: .8rem; white-space: nowrap; }
.plot-tip[hidden] { display: none; }
.section-heading { margin: 25px 0 12px; }
.section-heading a, .action-link { color: var(--accent); font-size: .88rem; }
.section-heading a:hover, .action-link:hover { text-decoration: underline; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.stat-card { padding: 15px 17px; }
.stat-card small { color: var(--muted); font-size: .86rem; }
.stat-card strong { display: block; color: var(--text); font: 650 1.55rem/1.5 var(--serif); letter-spacing: -.035em; }
.stat-card p, .price-attribution { color: var(--dim); font-size: .76rem; }
.price-attribution { flex-wrap: wrap; }
.placeholder, .load-error { padding: 20px; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 14px; color: var(--dim); font-size: .78rem; }
footer b { font-weight: 400; margin: 0 4px; }
.range-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.range-card { padding: 22px; }
.range-card .sub { color: var(--muted); margin: 4px 0 16px; font-size: .9rem; }
.range-number { display: flex; gap: .55rem; align-items: baseline; }
.range-number strong { color: var(--accent); font: 650 2.7rem/1.15 var(--serif); letter-spacing: -.055em; }
.range-number span { color: var(--dim); font-size: .84rem; }
.range-track { position: relative; margin: 21px 0 8px; height: 6px; background: linear-gradient(90deg,#dfebf2,#80a8c4); border-radius: 6px; }
.range-track i { display: block; width: 13px; height: 13px; border: 2px solid #fff; background: var(--accent); box-shadow: 0 0 0 1px #84a0b4; border-radius: 50%; position: absolute; top: 50%; transform: translate(-50%,-50%); }
.range-limits { display: flex; justify-content: space-between; font-size: .82rem; color: var(--dim); }
.range-card .card-foot { margin-top: 16px; }
.note-block, .memo-guide { margin-top: 14px; }
.note-block p, .memo-guide p { color: var(--muted); margin-top: 9px; line-height: 1.9; font-size: .96rem; }
.memo-empty { padding: 28px; }
.memo-empty .square-icon { display: none; }
.memo-empty p, .memo-date { color: var(--dim); font-size: .88rem; }
.memo-empty p { margin-top: .5rem; }
.memo-list { list-style: none; padding: 0; }
.memo-list li { margin-bottom: 12px; }
.memo-list p { margin: 4px 0; color: var(--text); font: 600 1.18rem/1.7 var(--serif); }
.memo-guide summary { width: fit-content; cursor: pointer; color: var(--text); font-family: var(--serif); font-weight: 650; }
.memo-guide summary::marker { color: var(--accent); }
.square-icon { display: grid; place-items: center; width: 36px; height: 36px; background: var(--mist); border-radius: 50%; color: var(--accent); }
dialog { width: min(460px,90vw); border: 1px solid #c6d3da; border-radius: 12px; padding: 24px; background: var(--surface); color: var(--text); }
dialog::backdrop { background: #1b2f3d77; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dialog-top button { font-size: 1.6rem; color: var(--dim); }
dialog p { margin-top: 10px; color: var(--muted); font-size: .94rem; }
.stale-note { margin: 0 0 14px; color: #865927; font-size: .86rem; }
@media (max-width: 760px) {
  .site-header { padding-top: 18px; gap: 26px; }
  .brand img { height: 33px; width: 33px; }
  .site-header nav { gap: 15px; }
  .site-header nav a { font-size: .88rem; }
  .panel-pad, .range-card { padding: 17px 20px; }
  .feature-center { max-width: 490px; }
  .gauge { max-width: 197px; }
}
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; gap: 12px; padding: 17px 0 0; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 4px; }
  .site-header nav a { padding: 3px 0; }
  .workspace main { padding-top: 33px; }
  h1 { margin: 9px 0 8px; }
  .page-intro { margin-bottom: 20px; }
  .page-intro p { font-size: .94rem; }
  .asof { margin-top: 6px; }
  .feature-center { grid-template-columns: .9fr 1.1fr; gap: 6px; margin: 12px 0; }
  .score-row strong { font-size: 3.65rem; }
  .score-type, .score-row span { font-size: .82rem; }
  .hist { grid-template-columns: 1fr; gap: 0; }
  .hist .card-head { margin-bottom: 7px; }
  .history-row { grid-template-columns: 1fr 50px 32px 69px; gap: 8px; border-left: 0; padding: .38rem 0; border-bottom: 1px solid var(--line); }
  .history-row:last-child { border-bottom: 0; }
  .history-score { font-size: 1.3rem; text-align: right; }
  .range-grid, .stat-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .stat-card { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .stat-card p { grid-column: 1/-1; }
  .card-title { gap: .35rem; }
  .card-title h2 { font-size: 1.11rem; }
  .panel-pad, .range-card { padding: 16px; }
  .segments button { padding: 4px 5px; }
  .trend-bottom { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
