[hidden] { display: none !important; }

input[type="checkbox"] { width: auto; }

.first-screen { align-content: start; }

:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #5c564c;
  --paper: #ebe4d6;
  --card: #fffdf8;
  --line: #e0d6c6;
  --teal: #123c3c;
  --teal-2: #0c5c5c;
  --cream: #f6f1e6;
  --gold: #e2c27a;
  --sand: #f6f1e7;
  --notice: #fff4d6;
  --notice-line: #ead9a8;
  --c-cowork: #0c5c5c;
  --c-esim: #24548a;
  --c-insurance: #8d6420;
  --c-fx: #a33b24;
  --c-vpn: #2c6b45;
  --track: #e6dfd2;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 48px;
  background: var(--teal);
  color: var(--cream);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.topnav-inner,
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.topnav-inner {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}

.mark { width: 22px; height: 22px; display: block; flex: 0 0 auto; }
.mark-bg { fill: var(--gold); }
.mark-line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; }
.mark-dot { fill: var(--teal); }

h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  min-width: 0;
}

.lang-menu { position: relative; margin-left: auto; flex: 0 0 auto; }

.lang-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(226, 194, 122, 0.7);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--cream);
}

.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::marker { content: ""; }

.lang-menu:not([open]) nav { display: none; }

.lang-menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 148px;
  padding: 4px;
  display: grid;
  box-shadow: 0 8px 24px rgba(28, 25, 21, 0.12);
}

.lang-menu a {
  text-decoration: none;
  color: var(--ink);
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 14px;
}

.lang-menu a[aria-current="page"] {
  background: #e7f2f0;
  color: var(--teal-2);
  font-weight: 700;
}

.first-screen {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 8px 12px;
  align-items: start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 12px 4px;
}

.banner {
  grid-column: 1 / -1;
  margin: 0;
  padding: 5px 10px;
  background: var(--notice);
  border: 1px solid var(--notice-line);
  border-radius: 8px;
  color: #2a2112;
  font-size: 12px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 10px 6px;
  min-width: 0;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.2;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 8px;
  min-inline-size: 0;
  min-width: 0;
}

legend {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
}

.hint { margin: 0 0 6px; color: var(--muted); font-size: 11px; }

.presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.preset {
  min-width: 0;
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--sand);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.preset.is-active {
  background: var(--teal-2);
  border-color: var(--teal-2);
  color: var(--cream);
}

.split,
.cost-grid,
.kpis,
.compare-grid,
.checklist {
  display: grid;
  gap: 6px 8px;
}

.split,
.cost-grid,
.compare-grid,
.checklist { grid-template-columns: 1fr 1fr; }

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
}

.field > span,
.choice > span { color: var(--muted); }

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

input,
button { font: inherit; color: inherit; max-width: 100%; }

input[type="number"],
input[type="range"] { width: 100%; min-width: 0; }

input[type="number"] {
  border: 1px solid #d5cbb8;
  border-radius: 7px;
  padding: 4px 6px;
  background: #fff;
}

.slider-row input[type="number"] { width: 72px; flex: 0 0 72px; }

input[type="range"] {
  accent-color: var(--teal-2);
  height: 22px;
  margin: 0;
  background: transparent;
}

.choices { display: grid; gap: 4px; margin-bottom: 6px; }

.choice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.cap-row { display: flex; flex-wrap: wrap; gap: 8px 12px; }

.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; }

.kpi {
  background: var(--sand);
  border-radius: 8px;
  padding: 6px 8px;
  min-width: 0;
}

.kpi-label,
.section-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.kpi-value {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #142e2e;
}

.kpi-note { margin: 2px 0 0; color: var(--muted); font-size: 11px; }

.kpi-pair {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.kpi-tag { color: var(--muted); font-size: 10px; font-weight: 600; }

.chart-block { margin: 0 0 6px; }

.chart {
  width: 100%;
  height: 22px;
  display: block;
  margin-top: 4px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 11px;
}

.legend li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.swatch-cowork { background: var(--c-cowork); }
.swatch-esim { background: var(--c-esim); }
.swatch-insurance { background: var(--c-insurance); }
.swatch-fx { background: var(--c-fx); }
.swatch-vpn { background: var(--c-vpn); }

.legend-val { font-variant-numeric: tabular-nums; color: var(--muted); }

.csv-btn,
.partner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--teal-2);
  color: var(--cream);
  text-decoration: none;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.csv-btn { margin-bottom: 6px; }
.csv-btn:hover,
.partner-link:hover { background: #094846; }

.compare { margin: 0 0 6px; }

.compare h2 { font-size: 14px; }

.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  min-width: 0;
}

.plan-card.is-selected { border-color: var(--teal-2); box-shadow: inset 0 0 0 1px var(--teal-2); }

.plan-card h3 { margin: 0; font-size: 12px; }

.plan-price {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.plan-sub,
.subs-line,
.save-line,
.partner-math,
.partner-note { margin: 2px 0 0; font-size: 12px; }

.extra-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6d2c1c;
}

.partner {
  margin-top: 6px;
  padding: 8px;
  border-radius: 8px;
  background: #f4faf8;
  border: 1px solid #d5e6e2;
  border-left: 3px solid var(--gold);
}

.partner-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--teal-2);
}

.partner h3 { margin: 1px 0 0; font-size: 14px; }

.partner-link { margin-top: 6px; }

.disclosure {
  margin: 6px 0 0;
  padding: 5px 8px;
  background: var(--notice);
  color: #2a2112;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 3px 10px;
}

.checklist label {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.3;
}

.progress {
  margin: 0 0 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.footer {
  height: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  white-space: nowrap;
}

.not-found {
  max-width: 720px;
  margin: 24px auto;
  padding: 0 16px;
}

.not-found h2 { margin: 0 0 8px; font-size: 22px; }

.not-found ul { padding-left: 18px; }

:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 2px;
}

.topnav :focus-visible { outline-color: var(--gold); }

@media (max-width: 960px) {
  h1 { white-space: normal; font-size: 15px; line-height: 1.2; }
  .topnav,
  .topnav-inner { height: auto; min-height: 48px; }
  .topnav-inner { padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
  .first-screen,
  .checklist,
  .compare-grid,
  .kpis { grid-template-columns: 1fr; }
  .footer,
  .footer-inner { height: auto; white-space: normal; padding-top: 6px; padding-bottom: 6px; }
}
