:root {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-blue: #eff6ff;
  --surface-green: #f0fdf4;
  --ink: #0f172a;
  --muted: #475569;
  --muted-light: #64748b;
  --border: #cbd5e1;
  --border-strong: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #15803d;
  --accent-soft: #dcfce7;
  --warning: #a16207;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.12);
  --shadow-focus: 0 0 0 4px rgba(37, 99, 235, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--primary-soft);
  color: var(--ink);
}

a {
  color: var(--primary-hover);
}

button,
input,
select {
  font: inherit;
}

button,
a,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  box-shadow: var(--shadow-focus);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(203, 213, 225, 0.82);
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand {
  flex: 0 0 auto;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.brand-copy {
  display: block;
  max-width: 220px;
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}

.primary-nav a:hover {
  background: var(--surface-blue);
  color: var(--primary-hover);
}

.language-menu {
  position: relative;
  flex: 0 0 auto;
}

.language-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 750;
  list-style: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.language-option {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
}

.language-option:hover,
.language-option.is-current {
  background: var(--surface-blue);
  color: var(--primary-hover);
}

.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
  background:
    radial-gradient(circle at 83% 20%, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero-section::after {
  position: absolute;
  right: 7%;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(48px, 5vw, 70px);
  padding-bottom: clamp(34px, 4vw, 52px);
}

.eyebrow,
.section-label,
.section-kicker,
.scenario-label {
  margin: 0;
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-section h1 {
  max-width: 760px;
  margin: 14px 0 16px;
  color: var(--ink);
  font-size: clamp(2.45rem, 6vw, 5rem);
  font-weight: 850;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.55;
}

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.tool-section {
  padding: clamp(38px, 4.5vw, 56px) 0 30px;
}

.section-intro {
  max-width: 780px;
}

.section-intro h2,
.closing-card h2,
.legal-hero h1 {
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.section-intro > p,
.closing-card p,
.legal-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.tool-card {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(360px, 0.93fr);
  align-items: start;
  gap: 22px;
}

.tool-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.input-panel {
  padding: clamp(22px, 4vw, 34px);
}

.result-panel {
  position: sticky;
  top: 100px;
  padding: clamp(22px, 3.5vw, 30px);
  box-shadow: var(--shadow-lg);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 26px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: var(--surface-blue);
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 800;
}

.step-index-accent {
  border-color: #bbf7d0;
  background: var(--accent-soft);
  color: var(--accent);
}

.panel-kicker {
  margin: 1px 0 3px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.form-fieldset {
  min-width: 0;
  padding: 0;
  margin: 0 0 26px;
  border: 0;
}

.form-fieldset legend {
  width: 100%;
  padding: 0;
  margin-bottom: 13px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-group {
  min-width: 0;
}

.field-group > label,
.check-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.input-shell,
.field-group select {
  width: 100%;
  min-height: 48px;
  margin-top: 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.input-shell {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.input-shell:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.field-group select {
  appearance: none;
  padding: 10px 40px 10px 12px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 21px,
    calc(100% - 12px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  cursor: pointer;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 9px 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.input-shell input::-webkit-outer-spin-button,
.input-shell input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.input-shell input[type="number"] {
  appearance: textfield;
}

.input-prefix,
.input-suffix,
.input-currency {
  flex: 0 0 auto;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 800;
}

.input-prefix {
  padding-left: 12px;
}

.input-suffix,
.input-currency {
  padding-right: 12px;
}

.field-help {
  min-height: 21px;
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 0.76rem;
  line-height: 1.42;
}

.field-error {
  min-height: 0;
  padding: 0;
  margin: 5px 0 0;
  color: var(--danger);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.4;
}

.field-group input[aria-invalid="true"],
.field-group input[aria-invalid="true"] ~ .input-currency,
.field-group:has(input[aria-invalid="true"]) .input-shell {
  border-color: var(--danger);
}

.field-group:has(input[aria-invalid="true"]) .input-shell {
  background: #fffafa;
}

.rate-context,
.result-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 10px 12px;
  margin: 15px 0 0;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: var(--surface-blue);
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 750;
  line-height: 1.45;
}

.rate-context .status-dot,
.result-context .status-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.14);
}

.advanced-options {
  margin: 6px 0 24px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.advanced-options summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  list-style: none;
}

.advanced-options summary::-webkit-details-marker {
  display: none;
}

.summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1;
}

.advanced-options[open] .summary-icon {
  transform: rotate(45deg);
}

.summary-hint {
  margin-left: auto;
  color: var(--muted-light);
  font-size: 0.73rem;
  font-weight: 600;
}

.summary-chevron,
.faq-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.advanced-options[open] .summary-chevron,
.faq-item[open] .faq-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.advanced-content {
  padding: 4px 0 21px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.check-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 54px;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  background: #fbfdff;
  cursor: pointer;
}

.check-row:hover {
  border-color: #93c5fd;
  background: var(--surface-blue);
}

.check-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
}

.check-row input:checked + .custom-check {
  border-color: var(--primary);
  background: var(--primary);
}

.check-row input:checked + .custom-check::after {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: rotate(-45deg) translate(1px, -1px);
}

.check-row input:focus-visible + .custom-check {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.check-row input:disabled + .custom-check,
.check-row:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.check-row strong {
  font-size: 0.78rem;
}

.check-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted-light);
  font-size: 0.7rem;
  line-height: 1.4;
}

.tax-mode-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 8px;
}

.tax-mode-row select {
  min-width: 0;
  min-height: 32px;
  padding: 5px 26px 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.72rem;
}

.tax-mode-row .field-help {
  min-height: 0;
  margin-top: 5px;
}

.error-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  margin: 0 0 17px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.79rem;
  font-weight: 750;
  line-height: 1.45;
}

.error-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--danger);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--primary);
  background: var(--surface-blue);
  color: var(--primary-hover);
  transform: translateY(-1px);
}

.button-icon {
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1;
}

.form-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted-light);
  font-size: 0.76rem;
}

.tool-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 13px;
  margin: 15px 0 0;
  border-top: 1px solid #e2e8f0;
  color: var(--muted-light);
  font-size: 0.72rem;
  line-height: 1.5;
}

.tool-note .note-icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: var(--primary);
}

.result-heading {
  margin-bottom: 19px;
}

.result-context {
  border-color: #bbf7d0;
  background: var(--surface-green);
}

.estimated-badge {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.result-lead {
  padding: 21px 0 20px;
  border-bottom: 1px solid #e2e8f0;
}

.result-lead p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.result-lead strong {
  display: block;
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: clamp(2.45rem, 5vw, 3.8rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.065em;
  line-height: 1;
}

.result-lead span {
  color: var(--muted-light);
  font-size: 0.75rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 17px 0;
}

.summary-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  background: #fbfdff;
}

.payout-card {
  border-color: #bfdbfe;
  background: var(--surface-blue);
}

.profit-card {
  border-color: #bbf7d0;
  background: var(--surface-green);
}

.result-panel[data-state="loss"] .profit-card {
  border-color: #fecaca;
  background: var(--danger-soft);
}

.result-panel[data-state="loss"] .profit-card strong {
  color: var(--danger);
}

.result-panel[data-state="invalid"] .result-lead strong,
.result-panel[data-state="invalid"] .summary-card strong {
  color: var(--muted-light);
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.summary-card strong {
  display: block;
  margin: 4px 0 5px;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.summary-card small {
  display: block;
  color: var(--muted-light);
  font-size: 0.69rem;
  line-height: 1.4;
}

.profit-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.profit-state.is-negative {
  color: var(--danger);
}

.state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  color: #ffffff;
  font-size: 0.65rem;
  line-height: 1;
}

.metric-list {
  margin: 0;
  border-top: 1px solid #e2e8f0;
}

.metric-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.metric-list dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-list dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.81rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.metric-list .break-even-row {
  padding-top: 13px;
  border-bottom: 0;
}

.metric-list .break-even-row dt,
.metric-list .break-even-row dd {
  color: var(--primary-hover);
  font-weight: 850;
}

.breakdown-block {
  padding-top: 22px;
  margin-top: 6px;
  border-top: 1px solid #e2e8f0;
}

.breakdown-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.breakdown-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.breakdown-heading span {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-align: right;
}

.breakdown-table,
.support-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.breakdown-table th,
.breakdown-table td {
  padding: 8px 5px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.breakdown-table thead th {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.breakdown-table th:first-child,
.breakdown-table td:first-child {
  width: 32%;
}

.breakdown-table th:nth-child(2),
.breakdown-table td:nth-child(2) {
  width: 45%;
}

.breakdown-table th:last-child,
.breakdown-table td:last-child {
  width: 23%;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 800;
  text-align: right;
}

.breakdown-table tbody th {
  color: var(--ink);
  font-weight: 750;
  text-align: left;
}

.result-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  margin-top: 17px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
}

.note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--warning);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 900;
}

.result-note p,
.source-line,
.source-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.5;
}

.source-line {
  margin-top: 12px;
}

.tool-disclaimer {
  padding-top: 12px;
  margin: 12px 0 0;
  border-top: 1px solid #e2e8f0;
  color: var(--muted-light);
  font-size: 0.68rem;
  line-height: 1.5;
}

.source-line a,
.source-note a {
  font-weight: 800;
}

.content-section {
  padding: clamp(58px, 8vw, 96px) 0;
}

.content-section-tinted {
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f1f5f9;
}

.steps-grid,
.three-column-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.step-card,
.detail-card,
.formula-card,
.scenario-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-number,
.detail-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
}

.step-card h3,
.detail-card h3,
.formula-card h3,
.scenario-card h3,
.limitations-box h3 {
  margin: 17px 0 8px;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.step-card p,
.detail-card p,
.scenario-card p,
.limitations-box li {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.support-table-wrap {
  overflow-x: auto;
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.support-table {
  min-width: 680px;
}

.support-table th,
.support-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.support-table thead th {
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.support-table tbody tr:last-child th,
.support-table tbody tr:last-child td {
  border-bottom: 0;
}

.support-table tbody th {
  width: 21%;
  color: var(--ink);
  font-weight: 800;
}

.source-note {
  margin-top: 14px;
}

.profit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.formula-card {
  background: var(--ink);
}

.formula-card h3,
.formula-card .formula-line,
.formula-card .formula-total {
  color: #ffffff;
}

.formula-line,
.formula-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
}

.formula-line span,
.formula-total span {
  color: #cbd5e1;
}

.formula-line strong,
.formula-total strong {
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-align: right;
}

.formula-total {
  padding-bottom: 0;
  border-bottom: 0;
}

.formula-total strong {
  color: #86efac;
}

.scenario-label {
  color: var(--accent);
}

.scenario-list {
  margin: 18px 0 0;
}

.scenario-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.scenario-list > div:last-child {
  border-bottom: 0;
}

.scenario-list dt,
.scenario-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.scenario-list dd {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.scenario-list .positive {
  color: var(--accent);
}

.limitations-box {
  padding: 21px 23px;
  margin-top: 19px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  background: #fffbeb;
}

.limitations-box h3 {
  margin-top: 0;
}

.limitations-box ul {
  padding-left: 20px;
  margin: 0;
}

.limitations-box li + li {
  margin-top: 7px;
}

.faq-list {
  max-width: 860px;
  margin-top: 28px;
}

.faq-item {
  border-top: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 800;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  max-width: 770px;
  padding: 0 35px 20px 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.closing-section {
  padding: 0 0 82px;
}

.closing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-xl);
  background: var(--surface-blue);
}

.closing-card h2 {
  margin-bottom: 8px;
}

.closing-button {
  flex: 0 0 auto;
}

.noscript-note {
  padding-bottom: 35px;
  color: var(--danger);
  font-weight: 750;
}

.site-footer {
  border-top: 1px solid #dbe3ed;
  background: #eaf0f7;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 58px;
  padding: 52px 0 38px;
}

.footer-logo {
  font-weight: 850;
}

.footer-logo img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.footer-brand > p {
  max-width: 490px;
  margin: 16px 0 13px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.65;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-hover);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.footer-email svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}

.footer-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.footer-group p {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-group a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-group a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-light);
  font-size: 0.71rem;
}

.legal-page {
  padding-top: clamp(54px, 8vw, 84px);
  padding-bottom: clamp(68px, 9vw, 110px);
}

.legal-hero {
  max-width: 800px;
  padding-bottom: 28px;
}

.legal-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.legal-panel,
.info {
  max-width: 860px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.legal-panel h2 {
  padding-top: 15px;
  margin: 30px 0 9px;
  border-top: 1px solid #e2e8f0;
  color: var(--ink);
  font-size: 1.22rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.legal-panel p,
.legal-panel li {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

.legal-panel p {
  margin: 0 0 15px;
}

.legal-panel ul {
  padding-left: 22px;
  margin: 0 0 15px;
}

.legal-panel li + li {
  margin-top: 8px;
}

.legal-panel h2:first-of-type {
  margin-top: 13px;
}

.legal-meta {
  color: var(--muted-light) !important;
  font-family: var(--mono);
  font-size: 0.73rem !important;
  font-weight: 800;
}

.text-center {
  text-align: center;
}

.text-center .primary-button {
  margin-top: 10px;
}

.lead {
  font-size: 1.1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

/* 在桌面短视口中保留首屏工具可发现性，同时不改变移动端长页面节奏。 */
@media (min-width: 1021px) and (max-height: 800px) {
  .hero-inner {
    padding-top: 42px;
    padding-bottom: 34px;
  }

  .hero-section h1 {
    margin-top: 10px;
    margin-bottom: 12px;
  }

  .hero-lead {
    line-height: 1.48;
  }

  .tool-section {
    padding-top: 34px;
    padding-bottom: 28px;
  }

}

@media (max-width: 1020px) {
  .header-inner {
    gap: 14px;
  }

  .primary-nav a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.81rem;
  }

  .tool-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(100% - 28px, 680px);
  }

  .header-inner {
    flex-wrap: wrap;
    align-content: center;
    padding: 12px 0;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .primary-nav {
    justify-content: flex-start;
    width: max-content;
  }

  .primary-nav a {
    padding-right: 10px;
    padding-left: 10px;
  }

  .field-grid.two-up,
  .field-grid.three-up,
  .check-grid,
  .steps-grid,
  .three-column-grid,
  .profit-layout {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 7px;
  }

  .closing-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .wrap {
    width: min(100% - 24px, 420px);
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-copy {
    max-width: 195px;
    font-size: 0.93rem;
  }

  .brand-copy small {
    font-size: 0.55rem;
  }

  .hero-inner {
    padding-top: 48px;
    padding-bottom: 42px;
  }

  .hero-section h1 {
    font-size: clamp(2.35rem, 14vw, 3.4rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .tool-section,
  .content-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .input-panel,
  .result-panel {
    padding: 19px 15px;
    border-radius: var(--radius-lg);
  }

  .panel-heading {
    margin-bottom: 21px;
  }

  .panel-heading h3 {
    font-size: 1.23rem;
  }

  .form-fieldset {
    margin-bottom: 23px;
  }

  .field-grid.two-up,
  .field-grid.three-up {
    gap: 13px;
  }

  .tax-mode-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .summary-grid {
    gap: 8px;
  }

  .summary-card {
    padding: 11px;
  }

  .summary-card strong {
    font-size: 1.25rem;
  }

  .breakdown-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .breakdown-heading span {
    text-align: left;
  }

  .breakdown-table th,
  .breakdown-table td {
    padding: 7px 3px;
    font-size: 0.64rem;
  }

  .breakdown-table thead th {
    font-size: 0.55rem;
  }

  .breakdown-table th:first-child,
  .breakdown-table td:first-child {
    width: 31%;
  }

  .breakdown-table th:nth-child(2),
  .breakdown-table td:nth-child(2) {
    width: 45%;
  }

  .breakdown-table th:last-child,
  .breakdown-table td:last-child {
    width: 24%;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.8rem;
  }

  .summary-hint {
    max-width: 115px;
    text-align: right;
  }

  .footer-nav {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px) {
  .wrap {
    width: calc(100% - 20px);
  }

  .brand-copy {
    max-width: 174px;
  }

  .primary-nav a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.76rem;
  }

  .result-context {
    align-items: flex-start;
  }

  .estimated-badge {
    margin-left: 0;
  }

  .form-actions {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
