/* calculator/style.css — linked after tokens.css; declares no token of its own. */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.hero { padding: 48px 20px 8px; position: relative; }
.hero .theme-toggle { position: absolute; top: 24px; right: 20px; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 6px 0 12px;
}
.hero .lede { max-width: 62ch; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow a { color: var(--accent); text-decoration: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.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;
}
.skip:focus { left: 8px; top: 8px; position: fixed; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* ── Layout ───────────────────────────────────────────────────────── */
.grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(300px, 5fr) minmax(340px, 7fr); align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 20px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px;
}
.panel h2 {
  font-family: var(--display); font-size: 16px; font-weight: 600;
  margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px;
}
.panel-tag { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-3); }

/* ── Fields ───────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 14px; }
.field-name { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.field-name output { font-family: var(--mono); font-weight: 400; }
.field input[type="number"], .field input[type="url"], .field input[type="text"],
.field input[type="password"], .field select, .field textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px;
}
.field textarea { resize: vertical; font-family: var(--mono); font-size: 12.5px; }
.field-note { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }

/* Tooltips: opt-in depth on hover or keyboard focus. */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 6;
  width: min(320px, 72vw); box-sizing: border-box;
  background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left;
  padding: 8px 10px; border-radius: var(--radius); white-space: normal;
}
.chip {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
}
.chip:hover { border-color: var(--accent); }
.chip.active { color: var(--paper); background: var(--accent); border-color: var(--accent); }

/* The locked baseline: the typical-deployment constants, shown read-only
   so the estimate stays auditable without inviting tuning. */
.baseline { display: grid; gap: 4px; }
.baseline div {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 13px; border-bottom: 1px dashed var(--line); padding: 4px 0;
}
.baseline .mono { color: var(--ink-2); text-align: right; }

.btn {
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  color: var(--paper); background: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 9px 18px;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--accent); background: transparent; border-color: var(--line-strong); }

/* ── Summary ──────────────────────────────────────────────────────── */
.summary { border-color: var(--accent); }
.sum-figure { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 2px; }
.sum-edge { font-family: var(--mono); font-size: 17px; font-weight: 600; color: var(--ink-3); }
.sum-word { font-family: var(--body); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 2px; }
.sum-point { font-family: var(--display); font-size: clamp(34px, 4vw, 48px); font-weight: 800; letter-spacing: -0.01em; display: inline-flex; align-items: baseline; gap: 6px; }
.sum-unit { font-size: 14px; font-weight: 400; color: var(--ink-3); }
.sum-sub { margin: 2px 0 0; font-size: 14px; }

/* ── Assumptions ──────────────────────────────────────────────────── */
.assumptions { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.constants { display: grid; gap: 4px; margin-top: 14px; }
.constants div { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.constants code { font-family: var(--mono); font-size: 12px; }

/* ── Filters + table ──────────────────────────────────────────────── */
.table-panel { margin-top: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-bottom: 14px; font-size: 13px; }
.filters label { display: grid; gap: 4px; font-weight: 600; color: var(--ink-2); }
.filters select {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 8px; min-width: 120px;
}
.table-scroll { overflow-x: auto; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cost-table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-3); border-bottom: 1px solid var(--line-strong); padding: 6px 10px;
}
.cost-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: middle; }
.cost-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cost-table .num.grow { width: 34%; }
.cost-table th.grow { text-align: left; }
.cost-table tbody tr { cursor: pointer; }
.cost-table tbody tr:hover { background: var(--accent-soft); }
.cost-table tbody tr.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.cost-table td.cost-cell { white-space: nowrap; }
.cost-cell .cost-bar { display: inline-block; vertical-align: middle; width: 62%; margin-right: 10px; }
.model-name { font-family: var(--mono); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.model-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; border: 1px solid var(--line-strong); border-radius: 3px; padding: 1px 5px; color: var(--ink-3); }
.tag.scope-platform { color: var(--ok); border-color: var(--ok); }
.tag.scope-list { color: var(--accent); border-color: var(--accent); }
.axis-note { font-weight: 400; text-transform: none; letter-spacing: 0; }
.cost-bar { position: relative; height: 18px; min-width: 160px; }
.cost-bar .band { position: absolute; top: 4px; bottom: 4px; border-radius: 3px; background: var(--accent-soft); border: 1px solid var(--line); }
.cost-bar .point { position: absolute; top: 1px; bottom: 1px; width: 3px; border-radius: 2px; background: var(--accent); }
.cost-figure { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.axis-note { display: inline; }

/* ── Methodology ──────────────────────────────────────────────────── */
.methodology { margin-top: 24px; }
.methodology summary { cursor: pointer; }
.methodology summary h2 { margin: 0; display: inline; }
.method-body { margin-top: 14px; max-width: 76ch; }
.method-body p, .method-body li { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.footnote { font-size: 12.5px; color: var(--ink-3); margin: 18px 0 48px; }
