/* RollCall Operator Tools
 *
 * Dark by default. The audience checks these numbers late, in a dim room,
 * on a phone. Light mode follows the system and can be overridden by hand.
 *
 * No external fonts, no external anything: the Content-Security-Policy is
 * `default-src 'self'`, and a calculator that promises your numbers stay on
 * your device should not be making network requests to render itself.
 */

:root {
  --bg: #0b0b10;
  --surface: #14141c;
  --surface-2: #1d1d28;
  --surface-3: #262634;
  --text: #f2f2f5;
  --text-dim: #9a9aa8;
  --text-faint: #6d6d7c;
  --accent: #b14cff;
  --accent-soft: #c98bff;
  --accent-bg: rgba(177, 76, 255, 0.14);
  --money: #18c29c;
  --money-bg: rgba(24, 194, 156, 0.13);
  --warn: #ffb020;
  --warn-bg: rgba(255, 176, 32, 0.12);
  --alert: #ff4d6a;
  --alert-bg: rgba(255, 77, 106, 0.12);
  --line: rgba(242, 242, 245, 0.11);
  --line-strong: rgba(242, 242, 245, 0.2);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.32);

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 74rem;
  --radius: 10px;
  --radius-lg: 16px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --surface-3: #e9e6e0;
  --text: #12121a;
  --text-dim: #5c5c6a;
  --text-faint: #83838f;
  --accent: #7b1fd4;
  --accent-soft: #6417b8;
  --accent-bg: rgba(123, 31, 212, 0.09);
  --money: #0e7c63;
  --money-bg: rgba(14, 124, 99, 0.1);
  --warn: #9a6100;
  --warn-bg: rgba(154, 97, 0, 0.1);
  --alert: #c22a45;
  --alert-bg: rgba(194, 42, 69, 0.09);
  --line: rgba(18, 18, 26, 0.13);
  --line-strong: rgba(18, 18, 26, 0.26);
  --shadow: 0 1px 2px rgba(18, 18, 26, 0.06), 0 8px 24px rgba(18, 18, 26, 0.07);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbfaf7;
    --surface: #ffffff;
    --surface-2: #f4f2ee;
    --surface-3: #e9e6e0;
    --text: #12121a;
    --text-dim: #5c5c6a;
    --text-faint: #83838f;
    --accent: #7b1fd4;
    --accent-soft: #6417b8;
    --accent-bg: rgba(123, 31, 212, 0.09);
    --money: #0e7c63;
    --money-bg: rgba(14, 124, 99, 0.1);
    --warn: #9a6100;
    --warn-bg: rgba(154, 97, 0, 0.1);
    --alert: #c22a45;
    --alert-bg: rgba(194, 42, 69, 0.09);
    --line: rgba(18, 18, 26, 0.13);
    --line-strong: rgba(18, 18, 26, 0.26);
    --shadow: 0 1px 2px rgba(18, 18, 26, 0.06), 0 8px 24px rgba(18, 18, 26, 0.07);
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.014em;
  margin: 0;
}

a {
  color: var(--accent-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.6rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  transform: translateY(-220%);
  transition: transform 0.15s;
}
.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}

/* ---------------------------------------------------------------- Header */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.7rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.wordmark:hover {
  color: var(--text);
}
.wordmark b {
  font-family: var(--display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.wordmark span {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.masthead-spacer {
  flex: 1;
}

.icon-button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: var(--radius);
  width: 2.35rem;
  height: 2.35rem;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.icon-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

/* ---------------------------------------------------------------- Search */

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 22rem;
}

/* On a phone the wordmark and toggle leave the search box too narrow to be
 * anything but a confusing empty stub, so the header wraps to two rows and
 * search takes the full width underneath. */
@media (max-width: 40rem) {
  .masthead-inner {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }
  .masthead-spacer {
    display: none;
  }
  .wordmark {
    flex: 1;
  }
  .search-wrap {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.search-input::placeholder {
  color: var(--text-faint);
}
.search-input:focus {
  border-color: var(--accent);
  outline: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}
.search-results:empty,
.search-results[hidden] {
  display: none;
}
.search-results a {
  display: block;
  padding: 0.6rem 0.85rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.search-results a:last-child {
  border-bottom: 0;
}
.search-results a:hover,
.search-results a:focus {
  background: var(--accent-bg);
}
.search-results a small {
  display: block;
  color: var(--text-faint);
  font-size: 0.78rem;
}

/* ---------------------------------------------------------------- Layout */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.hero {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.15rem);
  margin: 0.5rem 0 0.85rem;
}
.hero p {
  font-size: clamp(1rem, 2.4vw, 1.14rem);
  color: var(--text-dim);
  margin: 0;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.trust-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  background: var(--surface);
}

.group {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.group-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.7rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.group-head h2 {
  font-size: 1.32rem;
}
.group-head p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.85rem;
}

.tool-card {
  display: block;
  padding: 1.05rem 1.1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.14s,
    transform 0.14s,
    background 0.14s;
}
.tool-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
  color: var(--text);
}
.tool-card h3 {
  font-size: 1.06rem;
  margin: 0.3rem 0 0.35rem;
}
.tool-card p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ------------------------------------------------------------ Calculator */

.calc-header {
  max-width: 44rem;
  margin-bottom: 1.9rem;
}
.calc-header h1 {
  font-size: clamp(1.75rem, 4.6vw, 2.5rem);
  margin: 0.45rem 0 0.7rem;
}
.calc-header .question {
  font-size: 1.1rem;
  color: var(--accent-soft);
  font-family: var(--display);
  font-style: italic;
  margin: 0 0 0.7rem;
}
.calc-header .intro {
  color: var(--text-dim);
  margin: 0;
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}
@media (min-width: 62rem) {
  .calc-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2rem;
  }
  .results-panel {
    position: sticky;
    top: 4.6rem;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem clamp(1rem, 2.5vw, 1.4rem) 1.35rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.panel-head h2 {
  font-size: 1.06rem;
}

.field {
  margin-bottom: 1.05rem;
}
.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.field-label label {
  font-weight: 600;
  font-size: 0.94rem;
}
.field-source {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: right;
  flex-shrink: 0;
}

.input-shell {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.input-affix {
  display: grid;
  place-items: center;
  padding: 0 0.6rem;
  background: var(--surface-2);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.8rem;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}
.input-affix.suffix {
  border-right: 0;
  border-left: 1px solid var(--line);
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.96rem;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  appearance: none;
}
select {
  cursor: pointer;
  font-family: var(--sans);
  padding-right: 1.8rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) calc(50% + 1px),
    calc(100% - 10px) calc(50% + 1px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select option {
  background: var(--surface);
  color: var(--text);
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.field-help {
  margin: 0.38rem 0 0;
  font-size: 0.81rem;
  color: var(--text-faint);
  line-height: 1.45;
}

/* ------------------------------------------------------------ Table input */

.table-input {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}
.table-input table {
  width: 100%;
  border-collapse: collapse;
  min-width: 30rem;
}
.table-input th {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table-input td {
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.table-input tr:last-child td {
  border-bottom: 0;
}
.table-input input {
  padding: 0.5rem 0.6rem;
  font-size: 0.88rem;
  border-radius: 0;
}
.table-input input:focus {
  background: var(--accent-bg);
}
.table-input td.col-text input {
  font-family: var(--sans);
}
.table-input td.row-remove {
  width: 2.2rem;
}
.row-remove button {
  appearance: none;
  background: none;
  border: 0;
  color: var(--text-faint);
  cursor: pointer;
  width: 100%;
  padding: 0.5rem 0.3rem;
  font-size: 1rem;
  line-height: 1;
}
.row-remove button:hover {
  color: var(--alert);
}

.table-actions {
  margin-top: 0.55rem;
}

.button {
  appearance: none;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.button:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}
.button.subtle {
  background: none;
  border-color: transparent;
  color: var(--text-faint);
  padding: 0.35rem 0.5rem;
}
.button.subtle:hover {
  color: var(--accent-soft);
}

/* ---------------------------------------------------------------- Results */

.headline {
  padding: 1.15rem 1.2rem 1.25rem;
  background: linear-gradient(140deg, var(--accent-bg), transparent 65%), var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
}
.headline .eyebrow {
  color: var(--accent-soft);
}
.headline-value {
  font-family: var(--display);
  font-size: clamp(2.3rem, 8vw, 3.3rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0.3rem 0 0.2rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.headline-caption {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.result-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.result-rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.result-rows li:last-child {
  border-bottom: 0;
}
.result-rows .row-label {
  font-size: 0.9rem;
  color: var(--text-dim);
  min-width: 0;
}
.result-rows li.is-emphasis .row-label {
  color: var(--text);
  font-weight: 600;
}
.result-rows .row-hint {
  display: block;
  font-size: 0.77rem;
  color: var(--text-faint);
  line-height: 1.45;
  margin-top: 0.15rem;
}
.result-rows .row-value {
  font-family: var(--mono);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.result-rows li.is-emphasis .row-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--money);
}
.result-rows li.is-negative .row-value {
  color: var(--alert);
}
.result-rows li.is-share {
  background: var(--money-bg);
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  border-radius: 6px;
  margin-bottom: 2px;
  border-bottom: 0;
}

.pending-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.note {
  display: flex;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.86rem;
  line-height: 1.5;
  margin-top: 0.7rem;
  border: 1px solid transparent;
}
.note::before {
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--mono);
}
.note.info {
  background: var(--surface-2);
  color: var(--text-dim);
  border-color: var(--line);
}
.note.info::before {
  content: "i";
  color: var(--text-faint);
}
.note.warn {
  background: var(--warn-bg);
  color: var(--text);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
}
.note.warn::before {
  content: "!";
  color: var(--warn);
}
.note.alert {
  background: var(--alert-bg);
  color: var(--text);
  border-color: color-mix(in srgb, var(--alert) 45%, transparent);
}
.note.alert::before {
  content: "!";
  color: var(--alert);
}

/* ------------------------------------------------------------- Benchmarks */

.benchmark {
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.benchmark-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.benchmark-head h3 {
  font-size: 0.98rem;
  font-family: var(--sans);
  font-weight: 600;
}
.tier-chip {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.tier-chip[data-tier="survey"] {
  color: var(--money);
  border-color: color-mix(in srgb, var(--money) 40%, transparent);
  background: var(--money-bg);
}
.tier-chip[data-tier="regulation"] {
  color: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-bg);
}
.tier-chip[data-tier="guidance"] {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
  background: var(--warn-bg);
}

.benchmark-bands {
  list-style: none;
  margin: 0 0 0.7rem;
  padding: 0;
}
.benchmark-bands li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.benchmark-bands .band-value {
  font-family: var(--mono);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.benchmark-note {
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.5;
  margin: 0.5rem 0 0;
}
.benchmark-source {
  font-size: 0.78rem;
  margin: 0.55rem 0 0;
  color: var(--text-faint);
  line-height: 1.5;
}

/* ------------------------------------------------------------- Disclosure */

.disclosure {
  margin-top: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.disclosure + .disclosure {
  margin-top: 0.6rem;
}
.disclosure summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.disclosure summary::-webkit-details-marker {
  display: none;
}
.disclosure summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--text-faint);
  font-size: 1.1rem;
}
.disclosure[open] summary::after {
  content: "\2212";
}
.disclosure-body {
  padding: 0 1rem 1rem;
  font-size: 0.87rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.disclosure-body ol,
.disclosure-body ul {
  margin: 0;
  padding-left: 1.15rem;
}
.disclosure-body li {
  margin-bottom: 0.45rem;
}
.disclosure-body li:last-child {
  margin-bottom: 0;
}
.formula {
  font-family: var(--mono);
  font-size: 0.83rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.4rem;
  overflow-x: auto;
  color: var(--text);
}

.legal-notice {
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--warn);
  background: var(--warn-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}

/* ---------------------------------------------------------------- Related */

.related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.related h2 {
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

/* --------------------------------------------------------------- Newsletter */

.subscribe {
  margin-top: 3rem;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, var(--accent-bg), transparent 70%), var(--surface);
}
.subscribe h2 {
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  margin-bottom: 0.55rem;
}
.subscribe p {
  color: var(--text-dim);
  margin: 0 0 1.1rem;
  max-width: 38rem;
}
.subscribe-titles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}
.subscribe-title {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.subscribe-title strong {
  display: block;
  font-family: var(--display);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}
.subscribe-title span {
  font-size: 0.82rem;
  color: var(--text-faint);
  line-height: 1.45;
}
.action-primary {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}
.action-primary:hover {
  background: var(--accent-soft);
  color: #fff;
}

/* ---------------------------------------------------------------- Footer */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 3rem;
  display: grid;
  gap: 1.2rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: 0.88rem;
}
.footer-fine {
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.6;
  margin: 0;
  max-width: 46rem;
}

.breadcrumb {
  font-size: 0.84rem;
  margin-bottom: 0.4rem;
}
.breadcrumb a {
  color: var(--text-faint);
}

/* ----------------------------------------------------------------- Print */

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --text: #000;
    --text-dim: #333;
    --text-faint: #555;
    --line: #ccc;
    --line-strong: #999;
  }
  .masthead,
  .subscribe,
  .related,
  .table-actions,
  .icon-button,
  .search-wrap,
  .button {
    display: none !important;
  }
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .disclosure {
    break-inside: avoid;
  }
  .disclosure-body {
    display: block !important;
  }
  body {
    font-size: 11pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------------------ *
 * Contextual newsletter call-to-action on calculator pages.
 *
 * Deliberately a link, not an embedded signup form. Calculator pages ship
 * `connect-src 'none'`, which is what makes "your numbers never leave your
 * browser" a property the browser enforces rather than a promise we make.
 * An inline form would need network access and would quietly downgrade it.
 * ------------------------------------------------------------------ */

.tool-cta {
  margin: 3rem 0 0;
  padding: 1.75rem clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.tool-cta h2 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  line-height: 1.25;
}

.tool-cta p {
  margin: 0 0 1.1rem;
  max-width: 60ch;
  color: var(--text-dim);
}

.tool-cta .action-primary {
  display: inline-block;
}

.tool-cta .cta-fine {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--text-faint);
  max-width: 60ch;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.cta-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0 0 0.25rem;
}

.cta-form input[type="email"] {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.cta-form input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.cta-form button {
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.cta-form button:disabled { opacity: 0.6; cursor: default; }

.cta-message {
  flex: 1 0 100%;
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.cta-message[data-state="error"] { color: var(--alert); }
.cta-message[data-state="ok"] { color: var(--money); }

/* Once confirmed, the input is redundant; keep the message. */
.tool-cta[data-state="done"] .cta-form input,
.tool-cta[data-state="done"] .cta-form button { display: none; }
