/* Building Spells local styles. Fonts are bundled in the adjacent brand folder; system fallbacks work if this component is copied alone. */
@font-face { font-family: "Open Sans"; src: url("/fonts/OpenSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/fonts/OpenSans-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/fonts/OpenSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  color-scheme: light;
  --bs-paper: #F8F6F1;
  --bs-surface: #ffffff;
  --bs-ink: #282530;
  --bs-muted: #5D5666;
  --bs-accent: #6948C8;
  --bs-line: #D8D0E5;
  --bs-soft: #EEE8FA;
  --bs-error: #A32B2B;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  color: var(--bs-ink);
  background: var(--bs-paper);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--bs-accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #6948C8; outline-offset: 3px; }
.page { max-width: 1040px; margin: 0 auto; padding: 32px 24px 56px; }
.brand { margin: 0 0 8px; color: var(--bs-accent); font-weight: 700; letter-spacing: .03em; }
h1, h2, h3 { line-height: 1.2; color: #241A34; }
h1 { max-width: 20ch; margin: 0 0 16px; font-size: clamp(2rem, 6vw, 3.1rem); letter-spacing: -.035em; }
h2 { margin: 0 0 18px; font-size: 1.35rem; }
p { margin: 0 0 16px; }
.intro { max-width: 74ch; color: var(--bs-muted); }
.notice, .card, .assumptions { margin-top: 24px; padding: 24px; border: 1px solid var(--bs-line); border-radius: 16px; background: var(--bs-surface); }
.notice { background: var(--bs-soft); }
.notice p:last-child, .assumptions p:last-child { margin-bottom: 0; }
.section { margin-top: 32px; }
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin-bottom: 20px; }
.field { min-width: 0; }
label { display: block; margin-bottom: 6px; font-weight: 600; }
input, select, button { font: inherit; }
input, select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #8A8095;
  border-radius: 10px;
  color: var(--bs-ink);
  background: var(--bs-surface);
  font-variant-numeric: tabular-nums;
}
input[aria-invalid="true"] { border: 2px solid var(--bs-error); }
.hint { margin: 7px 0 0; color: var(--bs-muted); font-size: .88rem; }
.result { margin: 20px 0; padding: 18px 20px; border-radius: 8px; background: var(--bs-soft); }
.result p { margin: 0; }
output, td { font-variant-numeric: tabular-nums; }
details { margin: 24px 0; padding-top: 18px; border-top: 1px solid var(--bs-line); }
summary { cursor: pointer; padding: 4px 0; font-weight: 600; }
details[open] summary { margin-bottom: 20px; }
.errors { margin: 20px 0; padding: 16px 20px; border: 2px solid var(--bs-error); border-radius: 8px; }
.errors p { font-weight: 700; margin-bottom: 8px; }
.errors a { color: var(--bs-error); }
.errors ul { margin: 0; padding-left: 22px; }
[hidden] { display: none !important; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--bs-line); border-radius: 8px; }
table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: .94rem; }
caption { padding: 14px 16px; text-align: left; font-weight: 600; background: var(--bs-soft); }
th, td { padding: 12px 16px; text-align: right; border-top: 1px solid var(--bs-line); vertical-align: top; }
th:first-child { text-align: left; width: 43%; }
thead th { background: #EEE8FA; }
tbody th { font-weight: 600; }
td[data-value] { white-space: nowrap; }
tr.total { background: var(--bs-soft); font-weight: 700; }
.provider-note { max-width: 18ch; font-size: .84rem; color: var(--bs-muted); }
.difference { font-size: 1.15rem; font-weight: 700; }
button { min-height: 46px; padding: 10px 16px; border: 1px solid var(--bs-accent); border-radius: 10px; color: var(--bs-surface); background: var(--bs-accent); cursor: pointer; }
button:hover { background: #5636AE; }
.assumptions ul { padding-left: 22px; }
.assumptions li { margin-bottom: 10px; }
.formula { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .86rem; overflow-wrap: anywhere; }
footer { margin-top: 24px; color: var(--bs-muted); font-size: .88rem; }
.skip-link { position: absolute; top: -100px; left: 12px; padding: 10px; background: white; }
.skip-link:focus { top: 8px; z-index: 1; }
@media (max-width: 639px) {
  .page { padding: 24px 16px 40px; }
  .notice, .card, .assumptions { padding: 18px 16px; }
  .controls { grid-template-columns: 1fr; gap: 16px; }
  th, td { padding: 10px 12px; }
  .result { padding: 14px 16px; }
}
@media print {
  body { background: white; }
  .page { max-width: none; padding: 0; }
  .skip-link, button { display: none; }
  .card, .notice, .assumptions { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
}
