:root {
  color-scheme: light;
  --surface: #fff;
  --line: #dfe5ed;
  --accent: #247fa6;
  --hero-surface: #edf5fa;
  --card: #fff;
  --chart-grid: #e8eef3;
  --chart-area: #edf6fa;
}
body {
  background: var(--surface);
}
nav {
  gap: 22px;
}
nav .links {
  gap: 23px;
  margin-left: auto;
}
.preferences {
  display: flex;
  gap: 8px;
  align-items: center;
}
.select-wrap {
  position: relative;
}
.select-wrap:after {
  content: "";
  pointer-events: none;
  position: absolute;
  right: 13px;
  top: calc(50% - 4px);
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
select {
  appearance: none;
  font: inherit;
  font-size: 14px;
  max-width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 43px;
  padding: 9px 31px 9px 11px;
  cursor: pointer;
}
select:focus-visible {
  outline: 3px solid #30a5d7;
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
header {
  background: var(--surface);
  border-color: var(--line);
}
.visual {
  background: var(--hero-surface);
}
.visual:before,
.visual:after,
.step,
details,
.use-row > span,
footer {
  border-color: var(--line);
}
.float,
.history {
  background: var(--card);
}
.eyebrow {
  color: var(--accent);
}
.use-row > span {
  color: var(--muted);
}
.chart > path:first-child {
  stroke: var(--chart-grid);
}
#area {
  fill: var(--chart-area);
}
.store small {
  font-size: 12px;
}
html:is([lang^="zh"], [lang="ja"]) h1,
html:is([lang^="zh"], [lang="ja"]) h2,
html:is([lang^="zh"], [lang="ja"]) h3 {
  letter-spacing: 0;
  line-height: 1.3;
}
html:is([lang^="zh"], [lang="ja"]) .eyebrow {
  letter-spacing: 1px;
}
.history-top {
  flex-wrap: wrap;
}
.pill {
  white-space: nowrap;
}
.amount {
  overflow-wrap: anywhere;
}
.store {
  min-height: 60px;
}
.hero > *,
.demo-layout > * {
  min-width: 0;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #101321;
  --ink: #edf1fa;
  --muted: #b0bace;
  --pale: #171c2e;
  --line: #303a50;
  --accent: #79cff0;
  --hero-surface: #1b2540;
  --card: #222b41;
  --chart-grid: #39445c;
  --chart-area: #243c52;
}
[data-theme="dark"] .hero h1 em {
  color: #72c8ed;
}
[data-theme="dark"] .small-cta,
[data-theme="dark"] .store {
  background: #a7ddf4;
  color: #101a31;
}
[data-theme="dark"] .store:hover {
  background: #c9edfc;
}
[data-theme="dark"] .band,
[data-theme="dark"] .closing {
  background: #1b2440;
}
[data-theme="dark"] .float .price {
  color: #8bddb3;
}
[data-theme="dark"] .pill {
  background: #203e36;
  color: #a0e7bf;
}
[data-theme="dark"] .switcher button {
  background: #303b54;
  color: #e4edff;
}
[data-theme="dark"] .switcher button[aria-pressed="true"] {
  background: #a7ddf4;
  color: #101a31;
}
[data-theme="dark"] .symbol,
[data-theme="dark"] summary:after {
  color: #79cff0;
}
[data-theme="dark"] .closing .store {
  background: #e2f3fb;
  color: #171b50;
}
@media (max-width: 1150px) {
  nav {
    flex-wrap: wrap;
    height: auto;
    min-height: 92px;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    gap: 14px;
  }
  nav .links {
    gap: 17px;
  }
  .header-preferences {
    margin-left: auto;
  }
  nav .links > a:not(.small-cta) {
    display: none;
  }
}
@media (max-width: 650px) {
  nav {
    gap: 12px;
  }
  .header-preferences {
    flex-basis: auto;
    margin-left: auto;
    justify-content: flex-end;
  }
  .footer-preferences .select-wrap {
    flex: 1;
  }
  .footer-preferences select {
    width: 100%;
    min-height: 44px;
  }
  nav .links {
    margin-left: auto;
  }
  .brand {
    font-size: 19px;
  }
  .hero h1 {
    font-size: clamp(37px, 9.5vw, 54px);
  }
  html:is([lang^="zh"], [lang="ja"]) .hero h1 {
    font-size: clamp(34px, 9vw, 48px);
  }
  .float.top {
    left: 10px;
    max-width: calc(100% - 20px);
  }
  .float.bottom {
    right: 10px;
    max-width: calc(100% - 20px);
  }
  .float strong {
    font-size: 16px;
  }
  .history .amount {
    font-size: 37px;
  }
  .switcher {
    flex-wrap: wrap;
  }
  .band p {
    line-height: 1.5;
  }
  .closing h2 {
    font-size: clamp(28px, 7vw, 36px);
  }
}

/* Small native header pickers; larger, labeled pickers in the footer. */
.header-preferences {
  gap: 4px;
  flex-shrink: 0;
}
.compact-control {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
}
.compact-control svg {
  width: 21px;
  height: 21px;
  pointer-events: none;
}
.compact-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.compact-control:hover {
  background: var(--pale);
}
.compact-control:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
footer .footer-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
}
.footer-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-width: 240px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 14px;
}
.footer-links a {
  padding: 3px 0;
}
.footer-preferences {
  gap: 16px;
  margin: 0;
  align-items: flex-start;
}
.footer-preferences label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  color: var(--ink);
  min-width: 145px;
}
.footer-preferences .select-wrap {
  display: block;
}
.footer-preferences select {
  width: 100%;
}
@media (max-width: 650px) {
  header nav {
    flex-wrap: nowrap;
    min-height: 76px;
    gap: 8px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
  header nav .links {
    display: none;
  }
  .header-preferences {
    gap: 0;
  }
  .footer-preferences {
    width: 100%;
    flex-wrap: wrap;
    gap: 14px;
  }
  .footer-preferences label {
    flex: 1;
    min-width: 130px;
  }
  footer .footer-content {
    gap: 24px;
  }
  .brand {
    gap: 8px;
    white-space: nowrap;
  }
}

html[lang="fr"] .hero h1 {
  font-size: clamp(40px, 4.6vw, 62px);
  letter-spacing: -2px;
  line-height: 1.12;
}
html[lang="fr"] .float.top {
  max-width: calc(100% - 36px);
}
html[lang="fr"] .float strong {
  overflow-wrap: break-word;
}
@media (max-width: 650px) {
  html[lang="fr"] .hero h1 {
    font-size: clamp(36px, 9vw, 50px);
  }
}
