html {
  scroll-behavior: smooth;
}

:root {
  color-scheme: light;
  --page: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --ink: #0f172a;
  --ink-strong: #020617;
  --muted: #64748b;
  --copy: #334155;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #0d9488;
  --brand-hover: #0f766e;
}

[data-theme="dark"], html.dark {
  color-scheme: dark;
  --page: #000000;
  --surface: #0a0a0a;
  --surface-muted: #111111;
  --ink: #f8fafc;
  --ink-strong: #ffffff;
  --muted: #a1a1aa;
  --copy: #d4d4d8;
  --line: #27272a;
  --line-strong: #3f3f46;
  --brand: #10b981;
  --brand-hover: #34d399;
}

html.dark body, [data-theme="dark"] body {
  background-color: #000000 !important;
  color: #f8fafc !important;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--page);
  color: var(--ink);
  transition: background-color .2s, color .2s;
  -webkit-font-smoothing: antialiased;
}

main {
  margin: 0 auto;
}

.wrap {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}

.calc-page {
  padding-block: 2rem 3.5rem;
}

.page-head {
  max-width: 52rem;
  margin-bottom: 1.75rem;
}

.kicker {
  margin: 0 0 .5rem;
  color: #0d9488;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

[data-theme="dark"] .kicker {
  color: #2dd4bf;
}

.page-head h1 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.lede {
  max-width: 44rem;
  margin: .85rem 0 0;
  color: var(--copy);
  font-size: 1rem;
  line-height: 1.6;
}

.calc-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.panel,
.results,
.table-wrap,
.prose {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

.panel {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
}

.form-section {
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.form-section:first-child {
  border-top: none;
  padding-top: 0;
}

.form-section-title {
  margin: 0;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.field-note {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
}

.advanced-fields {
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}

.advanced-fields summary {
  color: var(--ink);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  user-select: none;
}

.advanced-fields label { margin-bottom: 1rem; }

.panel label,
.offer-grid label {
  display: grid;
  gap: .4rem;
  color: var(--copy);
  font-size: .85rem;
  font-weight: 600;
}

.panel input,
.panel select,
.offer-grid input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--line);
  border-radius: .75rem;
  background: var(--surface-muted);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  padding: .65rem .85rem;
  outline: none;
  transition: all .15s ease-in-out;
}

.panel input:focus,
.panel select:focus,
.offer-grid input:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.panel input:focus-visible,
.panel select:focus-visible,
.offer-grid input:focus-visible,
.btn:focus-visible,
.seg button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Range input styling for interactive financial sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  outline: none;
  margin-top: .5rem;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform .15s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform .15s cubic-bezier(0.4, 0, 0.2, 1);
}
input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.25);
}

.tip {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: .65rem;
}

.form-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-top: .5rem;
}

.btn {
  display: inline-flex;
  min-height: 2.65rem;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border-radius: .75rem;
  padding: .65rem 1.25rem;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.solid {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn.solid:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgba(16, 185, 129, 0.3);
}

.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover {
  background: var(--surface-muted);
  border-color: var(--line-strong);
}

.results {
  padding: 1.5rem;
}

.result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.result-state {
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-muted);
  border-radius: .5rem;
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .6rem;
}

.result-caption {
  margin: -.5rem 0 1.25rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
}

.payment-breakdown {
  display: grid;
  gap: .75rem;
  margin: 0 0 1.25rem;
  border-block: 1px solid var(--line);
  padding-block: 1rem;
}

.payment-breakdown div {
  display: grid;
  grid-template-columns: .75rem 1fr auto;
  align-items: center;
  gap: .65rem;
  color: var(--copy);
  font-size: .875rem;
}

.payment-breakdown strong { color: var(--ink-strong); font-weight: 700; }

.breakdown-dot { width: .65rem; height: .65rem; border-radius: 999px; }
.dot-pi  { background: #0d9488; }
.dot-tax { background: #3b82f6; }
.dot-ins { background: #f59e0b; }
.dot-other { background: #8b5cf6; }

.giant {
  margin: .25rem 0 1rem;
  color: var(--ink-strong);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  overflow-wrap: anywhere;
}


.stats {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.stats div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: .75rem 0;
}

.stats span,
.stats strong {
  margin: 0;
  font-size: .875rem;
}

.stats span { color: var(--muted); font-weight: 500; }
.stats strong { color: var(--ink-strong); font-weight: 700; text-align: right; }

.charts {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.charts canvas {
  max-width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.table-wrap,
.prose {
  margin-top: 1.5rem;
  padding: 1.5rem;
}

.table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.table-head h2,
.table-wrap h2,
.prose h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.seg {
  display: inline-flex;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}

.seg button {
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: .35rem .9rem;
  font-size: .75rem;
  font-weight: 700;
  transition: all .15s ease-in-out;
}

.seg button.on {
  background: #0d9488;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.3);
}

.scroll { overflow-x: auto; }

.ledger {
  width: 100%;
  min-width: 38rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .85rem;
}

.ledger th,
.ledger td {
  border-bottom: 1px solid var(--line);
  padding: .75rem .75rem;
  text-align: right;
  white-space: nowrap;
}

.ledger th:first-child,
.ledger td:first-child { text-align: left; }
.ledger th {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--surface-muted);
  position: sticky;
  top: 0;
}

.ledger td { color: var(--copy); font-weight: 500; }
.ledger tbody tr:hover td { background: var(--surface-muted); }
.ledger tr.is-best td { background: rgba(13, 148, 136, 0.08); color: #0f766e; font-weight: 700; }

html.dark .ledger th, [data-theme="dark"] .ledger th {
  background-color: #0f172a !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}

html.dark .ledger td, [data-theme="dark"] .ledger td {
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html.dark .ledger tbody tr:hover td, [data-theme="dark"] .ledger tbody tr:hover td {
  background-color: #1e293b !important;
}

html.dark .ledger tr.is-best td, [data-theme="dark"] .ledger tr.is-best td {
  background: rgba(20, 184, 166, 0.2) !important;
  color: #2dd4bf !important;
  font-weight: 800;
}


.offer-grid {
  display: grid;
  gap: 1rem;
}

.offer-grid fieldset {
  display: grid;
  gap: .85rem;
  border: 1px solid #e5e7eb;
  padding: 1rem;
}

.offer-grid legend,
.form-h {
  color: #000;
  font-size: 1rem;
  font-weight: 600;
}

.form-h {
  margin: .5rem 0 0;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .5rem !important;
}

.check input { width: 1rem; }

.verdict {
  margin-top: 1.25rem;
  border-left: 3px solid #111827;
  background: #f3f4f6;
  padding: 1rem;
}

.verdict-ok  { border-left-color: #166534; background: #f0fdf4; }
.verdict-warn { border-left-color: #92400e; background: #fffbeb; }
.verdict-label { margin: 0; color: #000; font-size: 1.2rem; font-weight: 600; }
.verdict p:last-child { margin-bottom: 0; }
.ok   { color: #14532d; font-weight: 600; }
.warn { color: #78350f; font-weight: 600; }

/* Error alert */
.alert-error {
  border-left: 3px solid #dc2626;
  background: #fef2f2;
  color: #991b1b;
  padding: 1rem 1.25rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}

.alert-error strong { color: #7f1d1d; }

/* Empty / placeholder state in results panel */
.result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  color: #9ca3af;
  font-size: .875rem;
  text-align: center;
  gap: .5rem;
}

.result-empty-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: .25rem;
}

/* Recent calculations list in footer */
.recent {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recent li { margin-top: .35rem; }

.recent a {
  display: block;
  color: #4b5563;
  font-size: .85rem;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent a:hover { color: #000; }

.prose {
  color: #4b5563;
  line-height: 1.7;
}

.prose h2 { margin-bottom: .75rem; }
.prose h3 { color: #111827; margin-top: 1.5rem; }
.prose a { color: #000; font-weight: 600; }
.formula { border-left: 2px solid #9ca3af; padding-left: 1rem; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: .85rem; }
.faq { border-top: 1px solid #e5e7eb; padding: .9rem 0; }
.faq summary { color: #111827; cursor: pointer; font-weight: 600; }

.hint,
.muted,
.fineprint { color: #6b7280; font-size: .8rem; }

.site-foot {
  border-top: 1px solid #d1d5db;
  background: #e5e7eb;
  padding: 2.5rem 0;
}

.foot-grid {
  display: grid;
  gap: 2rem;
}

.site-foot a {
  display: block;
  margin-top: .5rem;
  color: #4b5563;
  font-size: .85rem;
  text-decoration: none;
}

.site-foot a:hover { color: #000; }
.foot-h { margin: 0 0 .75rem; color: #111827; font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; }
.foot-mark { color: #000; font-weight: 600; }

@media (min-width: 640px) {
  .calculator-menu:hover > .calculator-dropdown,
  .calculator-menu:focus-within > .calculator-dropdown {
    display: grid;
  }
}

@media (min-width: 700px) {
  .calc-page { padding-block: 4rem 6rem; }
  .panel, .results, .table-wrap, .prose { padding: 1.5rem; }
  .page-head h1, .giant { font-size: 4rem; }
  .calc-grid { grid-template-columns: minmax(18rem, .8fr) minmax(0, 1.2fr); gap: 1.5rem; }
  .payment-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1.5fr repeat(3, 1fr); }
}

@media (max-width: 699px) {
  .calc-page { padding-block: 2rem 3rem; }
  .page-head h1 { font-size: 2.25rem; line-height: 1; }
  .giant { font-size: 2.25rem; }
  .form-actions .btn { flex: 1 1 9rem; }
  .toolbar .hint { flex-basis: 100%; margin: .1rem 0 0; }
}

[data-theme="dark"] header,
[data-theme="dark"] .site-foot {
  border-color: var(--line);
  background: var(--surface);
}

[data-theme="dark"] .prose,
[data-theme="dark"] .verdict,
[data-theme="dark"] .result-empty {
  color: var(--copy);
}

[data-theme="dark"] .verdict {
  background: #273449;
}

[data-theme="dark"] .verdict-ok, html.dark .verdict-ok { background: #123326; }
[data-theme="dark"] .verdict-warn, html.dark .verdict-warn { background: #3b2f16; }
[data-theme="dark"] .panel input::placeholder, html.dark .panel input::placeholder { color: #9ca3af; }

@media (min-width: 1100px) {
  .offer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ticker-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.admin-inline-form { display: inline; }

/* Final visual tokens: keep the calculator calm, readable, and legible in both themes. */
:root {
  --page: #eef1f4;
  --surface: #ffffff;
  --surface-muted: #f7f8fa;
  --ink: #17202a;
  --ink-strong: #0b1117;
  --muted: #66717d;
  --copy: #3f4b57;
  --line: #d9dfe5;
  --line-strong: #b9c2cc;
  --accent: #155eef;
  --accent-soft: #e8f0ff;
  --success: #087443;
  --warning: #9a4d00;
  font-size: 16px;
}

[data-theme="dark"] {
  --page: #101419;
  --surface: #191f27;
  --surface-muted: #141a21;
  --ink: #edf2f7;
  --ink-strong: #ffffff;
  --muted: #a5b0bc;
  --copy: #d0d8e1;
  --line: #303a46;
  --line-strong: #536171;
  --accent: #83b4ff;
  --accent-soft: #1b304f;
  --success: #76d7a7;
  --warning: #ffc477;
}

body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.wrap { width: min(100% - 2.5rem, 72rem); }
.calc-page { padding-block: 3rem 5rem; }
.page-head { margin-bottom: 2.25rem; }
.page-head h1,
.table-head h2,
.table-wrap h2,
.prose h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  line-height: 1.08;
}
.page-head h1 { font-size: 3.5rem; }
.lede { margin-top: 1rem; line-height: 1.65; }
.panel,
.results,
.table-wrap,
.prose { border-radius: .35rem; }
.panel,
.results,
.table-wrap,
.prose { padding: 1.5rem; }
.panel { gap: 1.15rem; }
.panel label,
.offer-grid label { color: var(--copy); font-size: .875rem; line-height: 1.35; }
.panel input,
.panel select,
.offer-grid input { min-height: 2.75rem; padding: .7rem .8rem; }
.panel input:focus,
.panel select:focus,
.offer-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { min-height: 2.75rem; padding: .7rem 1rem; }
.giant { font-size: 3.5rem; letter-spacing: 0; line-height: 1; }
.stats div { padding: .8rem 0; }
.table-wrap { overflow-x: auto; }
.prose { line-height: 1.75; }
.kicker,
.form-section-title,
.foot-h { letter-spacing: .14em; }

/* Tailwind utility surfaces are part of the templates, so map them to the theme too. */
[data-theme="dark"] body.bg-gray-100,
[data-theme="dark"] .bg-gray-100 { background: var(--page) !important; color: var(--ink) !important; }
[data-theme="dark"] header,
[data-theme="dark"] header.bg-white,
[data-theme="dark"] .bg-white,
[data-theme="dark"] .panel,
[data-theme="dark"] .results,
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .prose { background: var(--surface) !important; color: var(--ink); }
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-50\/75 { background: var(--surface-muted) !important; }
[data-theme="dark"] .text-black,
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-400 { color: var(--copy) !important; }
[data-theme="dark"] .text-black,
[data-theme="dark"] .font-semibold.text-black { color: var(--ink-strong) !important; }
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-300 { border-color: var(--line) !important; }
[data-theme="dark"] .border-gray-900 { border-color: var(--line-strong) !important; }
[data-theme="dark"] .hover\:bg-gray-100:hover { background: #242c36 !important; }
[data-theme="dark"] .hover\:text-black:hover { color: var(--ink-strong) !important; }
[data-theme="dark"] .hover\:border-black:hover { border-color: var(--ink-strong) !important; }
[data-theme="dark"] .panel input,
[data-theme="dark"] .panel select,
[data-theme="dark"] .offer-grid input { background: var(--surface-muted); color: var(--ink); border-color: var(--line-strong); }
[data-theme="dark"] .site-foot { background: #0b0f14; }
[data-theme="dark"] .verdict-ok { background: #123326; border-left-color: #76d7a7; }
[data-theme="dark"] .verdict-warn { background: #3b2f16; border-left-color: #ffc477; }
[data-theme="dark"] .alert-error { background: #3a1c20; color: #ffb4b4; border-left-color: #ff7474; }
[data-theme="dark"] .alert-error strong { color: #ffd1d1; }

@media (max-width: 699px) {
  .wrap { width: min(100% - 1.5rem, 72rem); }
  .calc-page { padding-block: 2rem 3rem; }
  .panel,
  .results,
  .table-wrap,
  .prose { padding: 1.1rem; }
  .page-head { margin-bottom: 1.5rem; }
  .page-head h1 { font-size: 2.25rem; }
}

/* Salary calculator specific */
.input-with-period {
  display: flex;
  gap: 0;
}
.input-with-period .field-input {
  border-radius: var(--radius, 4px) 0 0 var(--radius, 4px);
  flex: 1;
}
.field-period {
  border: 1px solid var(--line, #e5e7eb);
  border-left: none;
  border-radius: 0 var(--radius, 4px) var(--radius, 4px) 0;
  padding: 0 0.75rem;
  background: var(--surface-muted, #f9fafb);
  color: var(--ink-muted, #4b5563);
  font-size: 0.875rem;
  cursor: pointer;
}
.result-hero {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface-muted, #f9fafb);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--radius, 4px);
  margin-bottom: 1.5rem;
}
.result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted, #6b7280);
  margin-bottom: 0.25rem;
}
.result-sub {
  font-size: 0.85rem;
  color: var(--ink-muted, #4b5563);
  margin-top: 0.25rem;
}
.result-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-strong, #111827);
  margin: 1.25rem 0 0.6rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line, #f3f4f6);
}
.stat-total {
  font-weight: 600;
  border-top: 2px solid var(--line, #e5e7eb);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}
.deduct { color: var(--danger, #dc2626); }
.checkbox-section label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}
.advanced-section {
  border-top: 1px dashed var(--line, #e5e7eb);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.advanced-section summary {
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-muted, #4b5563);
}
.faq-section {
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}
.faq-item {
  border-bottom: 1px solid var(--line, #e5e7eb);
  padding: 0.75rem 0;
}
.faq-item summary {
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-strong, #111827);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+ "; color: var(--ink-muted, #6b7280); }
.faq-item[open] summary::before { content: "− "; }
.faq-item p {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-muted, #4b5563);
  line-height: 1.6;
}

/* Button Foundation */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  box-sizing: border-box;
}
.btn.solid {
  background-color: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
}
.btn.solid:hover {
  background-color: #1e293b;
  color: #ffffff;
}
[data-theme="dark"] .btn.solid, html.dark .btn.solid {
  background-color: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}
[data-theme="dark"] .btn.solid:hover, html.dark .btn.solid:hover {
  background-color: #14b8a6;
  border-color: #14b8a6;
}
.btn.ghost {
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover {
  border-color: var(--ink);
  color: var(--ink-strong);
}

/* Mobile First Layout & Responsiveness */
@media (max-width: 1023px) {
  .calc-grid {
    grid-template-columns: 1fr !important;
  }
  .mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid #e2e8f0;
    padding: 0.65rem 1rem;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
  }
  [data-theme="dark"] .mobile-sticky-bar, html.dark .mobile-sticky-bar {
    background: rgba(11, 15, 25, 0.97);
    border-top-color: #1e293b;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
  }
  .calc-page {
    padding-bottom: 5.5rem;
  }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (min-width: 1024px) {
  .mobile-sticky-bar {
    display: none !important;
  }
  .calc-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Quick Mobile Section Pills */
.mobile-jump-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.35rem 0 0.85rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-jump-nav::-webkit-scrollbar {
  display: none;
}
.mobile-jump-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: all 0.15s;
}
.mobile-jump-pill:hover,
.mobile-jump-pill:active {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

