:root {
  color-scheme: light;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  background: #f4f6f8;
  color: #1a293b;
  --ink: #1a293b;
  --muted: #4f6073;
  --gold: #876326;
  --line: #d8e1e9;
  --panel: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: inherit; text-underline-offset: .19em; }
a:focus-visible, button:focus-visible, input:focus-visible, .type input:focus-visible + span {
  outline: 3px solid #126772;
  outline-offset: 3px;
}
.wrap { width: min(1320px, calc(100% - 80px)); margin: 0 auto; }
.skip, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { z-index: 2; width: auto; height: auto; clip-path: none; padding: .7rem; background: #fff; }
.site-header { background: #fff; border-top: 3px solid #b69558; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; }
.brand img { width: 89px; height: auto; display: block; }
.brand > span { padding-left: 16px; border-left: 1px solid var(--line); font-size: .86rem; font-weight: 750; letter-spacing: .1em; }
.brand small { display: block; color: var(--muted); margin-top: 2px; font-size: .73rem; letter-spacing: .12em; }
.hub-link { color: var(--gold); font-size: .91rem; font-weight: 700; }
.crumb { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 21px; color: var(--muted); font-size: .81rem; }
.crumb a { text-decoration-color: #a7b3c0; }
.intro { margin: 18px 0 23px; }
h1 { margin: 0; font-size: clamp(2.5rem, 5.2vw, 4.6rem); line-height: 1; font-weight: 725; letter-spacing: -.061em; }
h1 em { font-style: normal; color: var(--gold); }
.intro p { margin: 11px 0 0; color: var(--muted); font-size: clamp(.98rem, 1.6vw, 1.12rem); line-height: 1.45; }
.lab { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(294px, 1fr); gap: 18px; align-items: stretch; }
.chart { min-width: 0; border-radius: 15px; overflow: hidden; background: #121c2d; color: #eef3fa; border: 1px solid #233754; box-shadow: 0 15px 34px #20334b1a; }
.chart-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 20px 23px 6px; }
.chart-kicker { margin: 0 0 5px; font-size: .71rem; letter-spacing: .11em; color: #eac68a; font-weight: 750; }
.chart-head h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.68rem); line-height: 1.05; letter-spacing: -.035em; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: #d4dce7; font-size: .72rem; }
.chart-legend i { width: 66px; height: 7px; border-radius: 8px; background: linear-gradient(90deg,#32799a,#3e9e99,#e0b56c); }
.plot { height: clamp(375px, 34vw, 490px); }
#surface { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#surface:active { cursor: grabbing; }
.chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px 12px; flex-wrap: wrap; min-height: 57px; padding: 9px 18px 10px; border-top: 1px solid #314158; background: #162238; }
.chart-footer p { margin: 0; color: #d9e5f3; font-size: .79rem; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #fff2c9; }
.gesture { color: #b9c7d9; }
.rotate { display: flex; gap: 6px; }
.rotate button { background: #25364e; color: #f6f3ea; padding: 0 9px; min-height: 34px; min-width: 37px; border: 1px solid #546884; border-radius: 7px; cursor: pointer; font-size: .8rem; font-weight: 680; }
.rotate button[data-turn] { font-size: 1.25rem; line-height: 1; }
.rotate button:hover { background: #364d6b; }
.rotate button:focus-visible { outline-color: #f3ce89; }
.scenario { align-self: stretch; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: clamp(16px, 2vw, 24px); }
.scenario h2 { margin: 0 0 14px; font-size: 1.3rem; letter-spacing: -.03em; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.type { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: #eef2f5; border: 1px solid #e0e7ee; padding: 3px; border-radius: 8px; }
.type label { position: relative; }
.type input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.type span { display: block; padding: 8px; text-align: center; font-size: .92rem; font-weight: 720; border-radius: 5px; color: #44566b; }
.type input:checked + span { background: #1d3148; color: white; }
.reading { margin: 15px 0 18px; padding: 15px; border-radius: 9px; background: #f7f0e2; border: 1px solid #e4d6bc; color: #302822; }
.reading-label { font-size: .81rem; font-weight: 690; }
.reading strong { display: inline-block; font-size: clamp(2.05rem, 4vw, 3rem); line-height: 1.18; font-variant-numeric: tabular-nums; letter-spacing: -.05em; margin: 1px 7px 0 0; overflow-wrap: anywhere; }
.reading-unit { color: #65533f; font-size: .79rem; }
.reading p { color: #584731; font-size: .81rem; margin: 4px 0 0; }
.range { display: block; margin-bottom: 15px; }
.range > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: .86rem; font-weight: 680; }
.range output { border-radius: 5px; background: #eaf0f5; color: #26415c; padding: 3px 7px; font-variant-numeric: tabular-nums; }
.range input { display: block; width: 100%; height: 26px; margin: 3px 0 0; accent-color: #366179; cursor: pointer; }
.assumptions { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 10px; }
.assumptions legend { padding: 0 7px 0 0; font-weight: 720; font-size: .86rem; }
.input-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.input-grid label { min-width: 0; font-size: .74rem; color: var(--muted); font-weight: 650; line-height: 1.15; }
.input-grid input { display: block; width: 100%; min-width: 0; margin-top: 5px; min-height: 40px; padding: 5px 6px; border: 1px solid #bfcbd7; border-radius: 5px; color: var(--ink); background: #fbfcfe; font-size: .88rem; }
.input-grid input:invalid { border-color: #9c3737; }
.note { margin: 22px 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 21px; }
.note > div { border-top: 1px solid var(--line); padding: 14px 0 0; }
.note h2 { margin: 0 0 6px; font-size: 1rem; }
.note p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.48; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: .82rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 18px 0; }
@media (max-width: 1000px) { .wrap { width: calc(100% - 46px); } }
@media (max-width: 800px) {
  .lab { grid-template-columns: 1fr; gap: 12px; }
  .plot { height: clamp(320px, 80vw, 440px); }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 26px); }
  .header-inner { min-height: 61px; gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 70px; }
  .brand > span { font-size: .71rem; padding-left: 8px; }
  .brand small { font-size: .63rem; }
  .hub-link { font-size: .76rem; white-space: nowrap; }
  .crumb { padding-top: 14px; }
  .intro { margin: 13px 0 16px; }
  .chart-head { padding: 14px 13px 3px; }
  .chart-footer { padding: 8px 10px; }
  .chart-footer p { font-size: .73rem; }
  .gesture { display: none; }
  .rotate button { min-height: 42px; }
  .note { grid-template-columns: 1fr; gap: 12px; }
}

.expiry-key { color: #d9e5f3; } .expiry-key > span { color: #e0b56c; }
