:root {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-blue: #eff6ff;
  --ink: #0f172a;
  --muted: #475569;
  --muted-light: #64748b;
  --border: #cbd5e1;
  --border-strong: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --success: #15803d;
  --success-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-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 {
  min-width: 320px;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select: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: #fff;
  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: 72px;
}

.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: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.brand-copy {
  display: block;
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

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

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

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.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: 800;
  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;
  z-index: 50;
}

.language-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  white-space: nowrap;
}

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

.language-menu summary::after {
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
  opacity: 0.58;
  transition: transform 180ms ease;
}

.language-menu[open] summary::after {
  transform: rotate(180deg);
}

.language-menu summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 3px;
  min-width: 160px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.language-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

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

main {
  min-height: 60vh;
}

.hero-section {
  padding: 31px 0 17px;
}

.hero-inner {
  max-width: 820px;
  text-align: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--surface-blue);
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
  content: "";
}

.hero-section h1 {
  max-width: 760px;
  margin: 12px auto 9px;
  color: var(--ink);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.hero-lead {
  max-width: 700px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.62;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.calculator-section {
  padding: 2px 0 48px;
  scroll-margin-top: 80px;
}

.tool-card {
  display: grid;
  max-width: 1040px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.tool-panel {
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
}

.input-panel {
  border-right: 1px solid var(--border);
}

.result-panel {
  background: #f8fbff;
}

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

.step-index,
.step-number,
.exercise-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  font-family: var(--mono);
  font-weight: 850;
}

.step-index {
  width: 36px;
  height: 36px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 0.74rem;
}

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

.panel-kicker {
  margin-bottom: 3px;
  color: var(--muted-light);
  font-size: 0.64rem;
}

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

.field-group {
  min-width: 0;
  margin-bottom: 17px;
}

.field-group label,
.compact-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.form-control {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

select.form-control {
  cursor: pointer;
}

.form-control:hover {
  border-color: #64748b;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: var(--shadow-focus);
}

.field-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 116px;
}

.field-help {
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 0.78rem;
  line-height: 1.45;
}

.field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.field-invalid .form-control {
  border-color: var(--danger);
  background: #fffafa;
}

.advanced-options {
  margin: 4px 0 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.advanced-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 800;
  list-style: none;
}

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

.summary-chevron,
.faq-chevron {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.summary-chevron::before,
.summary-chevron::after,
.faq-chevron::before,
.faq-chevron::after {
  position: absolute;
  top: 8px;
  left: 3px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition: transform 180ms ease;
}

.summary-chevron::after,
.faq-chevron::after {
  transform: rotate(90deg);
}

.advanced-options[open] .summary-chevron::after,
.faq-item[open] .faq-chevron::after {
  transform: rotate(0deg);
}

.advanced-grid {
  display: grid;
  gap: 15px;
  padding: 0 0 17px;
  grid-template-columns: minmax(0, 1fr) 150px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 44px;
  padding-top: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.compact-field {
  margin: 0;
}

.compact-field label {
  font-size: 0.78rem;
}

.compact-field .form-control {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.form-error-summary {
  margin: -3px 0 16px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 750;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.primary-button svg,
.secondary-button svg,
.privacy-note svg,
.result-note svg,
.confidence-note svg,
.footer-email svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

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

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.primary-button[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

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

.secondary-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted-light);
  font-size: 0.76rem;
  line-height: 1.5;
}

.privacy-note svg {
  flex: 0 0 auto;
  color: var(--accent);
  margin-top: 2px;
}

.result-heading {
  align-items: center;
  margin-bottom: 15px;
}

.result-heading > div {
  min-width: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.status-badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.result-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font-size: clamp(3.4rem, 8vw, 5.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.98;
}

.result-number span:last-child {
  color: var(--primary-hover);
  font-size: 0.34em;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.result-caption {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-summary {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.formula-label {
  margin: 3px 0 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 750;
}

.result-note,
.confidence-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.5;
}

.result-note {
  margin-top: 14px;
  border: 1px solid #bfdbfe;
  background: var(--surface-blue);
  color: #1e40af;
}

.result-note svg,
.confidence-note svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.comparison-result {
  display: grid;
  gap: 10px;
  margin-top: 17px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comparison-result div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.comparison-result div + div {
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.comparison-result span {
  color: var(--muted-light);
  font-size: 0.72rem;
  line-height: 1.3;
}

.comparison-result strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.percentage-preview {
  margin-top: 18px;
}

.subheading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.subheading-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.subheading-row a {
  color: var(--primary-hover);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.subheading-row a:hover {
  text-decoration: underline;
}

.preview-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.preview-stat {
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.preview-stat span,
.preview-stat strong {
  display: block;
}

.preview-stat span {
  color: var(--muted-light);
  font-size: 0.68rem;
  font-weight: 800;
}

.preview-stat strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.confidence-note {
  margin-top: 17px;
  border: 1px solid #fde68a;
  background: var(--warning-soft);
  color: #713f12;
}

.safety-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.52;
}

.tool-disclaimer {
  max-width: 920px;
  margin: 11px auto 0;
  color: var(--muted-light);
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: center;
}

.content-section {
  padding: 72px 0;
  border-top: 1px solid rgba(203, 213, 225, 0.74);
}

.content-section-tinted {
  background: #f1f5f9;
}

.section-intro {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-intro-left {
  margin-left: 0;
  text-align: left;
}

.section-intro h2 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.7vw, 2.7rem);
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.section-intro p:not(.section-label) {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.steps-grid,
.formula-grid,
.exercise-grid,
.two-column-layout,
.responsibility-layout,
.factor-list {
  display: grid;
  gap: 14px;
}

.steps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-column-layout,
.responsibility-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

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

.exercise-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-card,
.formula-card,
.exercise-card,
.callout-card,
.responsibility-card,
.factor-row {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-card,
.formula-card,
.exercise-card,
.callout-card,
.responsibility-card {
  padding: 21px;
}

.step-card {
  position: relative;
  padding-top: 62px;
}

.step-number {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 30px;
  height: 30px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 0.76rem;
}

.step-card h3,
.formula-card h3,
.exercise-card h3,
.callout-card h3,
.factor-row h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.step-card p,
.formula-card p,
.exercise-card p,
.callout-card p,
.factor-row p,
.responsibility-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.callout-card {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.callout-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.callout-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.formula-card {
  position: relative;
  padding-top: 20px;
}

.formula-card-primary {
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.formula-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.formula-tag,
.recommended-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.formula-tag {
  background: var(--surface-muted);
  color: var(--muted);
}

.recommended-badge {
  background: var(--primary-soft);
  color: var(--primary-hover);
  letter-spacing: 0;
  text-transform: none;
}

.formula-card code {
  display: block;
  margin: 13px 0 14px;
  padding: 11px 12px;
  overflow-x: auto;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  background: #f8fbff;
  color: #1e3a8a;
  font-family: var(--mono);
  font-size: 0.79rem;
  line-height: 1.5;
}

.source-note,
.table-note {
  max-width: 780px;
  margin: 19px auto 0;
  color: var(--muted-light);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

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

.percentage-table-wrap,
.limits-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.percentage-table,
.limits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.percentage-table caption,
.limits-table caption {
  padding: 16px 18px 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  text-align: left;
}

.percentage-table th,
.percentage-table td,
.limits-table th,
.limits-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.percentage-table thead th,
.limits-table thead th {
  padding-top: 12px;
  padding-bottom: 10px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

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

.percentage-table tbody th,
.limits-table tbody th {
  color: var(--ink);
  font-weight: 850;
}

.percentage-table td:nth-child(2) {
  width: 190px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.percentage-table td strong {
  font-size: 1rem;
}

.table-unit {
  color: var(--muted);
}

.bar-track {
  width: min(100%, 360px);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 220ms ease;
}

.exercise-card {
  position: relative;
  padding-top: 57px;
}

.exercise-number {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 34px;
  height: 25px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.67rem;
}

.factor-list {
  gap: 10px;
}

.factor-row {
  display: flex;
  gap: 11px;
  padding: 16px;
  box-shadow: none;
}

.factor-row h3 {
  margin-bottom: 3px;
  font-size: 0.92rem;
}

.factor-row p {
  font-size: 0.82rem;
  line-height: 1.55;
}

.factor-icon,
.check-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.factor-icon svg,
.check-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.responsibility-card {
  display: grid;
  gap: 17px;
  border-color: #bae6fd;
  background: #f0f9ff;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.check-row strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 0.9rem;
}

.check-row p {
  font-size: 0.82rem;
  line-height: 1.55;
}

.faq-section {
  scroll-margin-top: 80px;
}

.faq-list {
  max-width: 900px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

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

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

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

.faq-item p {
  max-width: 780px;
  margin: -1px 38px 19px 2px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.75;
}

.closing-section {
  padding: 56px 0 66px;
}

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

.closing-card h2 {
  margin: 7px 0 8px;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.closing-card p:not(.section-label) {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.closing-button {
  flex: 0 0 auto;
  background: var(--surface);
}

.noscript-note {
  margin-bottom: 40px;
  padding: 13px 15px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: #713f12;
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #eef2f7;
}

.footer-inner {
  display: grid;
  gap: 40px;
  padding: 40px 0 32px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.footer-brand p {
  max-width: 470px;
  margin: 14px 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.footer-logo img {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.footer-logo span {
  font-size: 1rem;
  font-weight: 850;
}

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

.footer-email:hover {
  text-decoration: underline;
}

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

.footer-group {
  display: grid;
  align-content: start;
  gap: 8px;
}

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

.footer-group a {
  width: fit-content;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

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

.footer-bottom {
  padding: 15px 0 22px;
  border-top: 1px solid rgba(203, 213, 225, 0.8);
}

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

.legal-page {
  padding: 55px 0 78px;
}

.legal-hero {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-kicker {
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 10px 0;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.legal-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.legal-meta {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 750;
}

.legal-panel h2 {
  margin: 28px 0 9px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

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

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

.legal-panel ul {
  display: grid;
  gap: 8px;
  margin: 0 0 13px;
  padding-left: 22px;
}

.legal-panel a {
  font-weight: 750;
}

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

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

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

@media (max-width: 980px) {
  .primary-nav a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.8rem;
  }

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

  .steps-grid,
  .exercise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .header-inner {
    min-height: 66px;
  }

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

  .brand-copy {
    font-size: 1rem;
  }

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

  .primary-nav {
    display: none;
  }

  .hero-section {
    padding: 27px 0 15px;
  }

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

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

  .calculator-section {
    padding-bottom: 38px;
  }

  .tool-card,
  .two-column-layout,
  .responsibility-layout,
  .formula-grid {
    grid-template-columns: 1fr;
  }

  .input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .tool-panel {
    padding: 21px 19px;
  }

  .result-number {
    font-size: clamp(3.5rem, 18vw, 5.2rem);
  }

  .content-section {
    padding: 56px 0;
  }

  .section-intro {
    margin-bottom: 22px;
  }

  .section-intro h2 {
    font-size: 2rem;
  }

  .section-intro-left {
    text-align: left;
  }

  .closing-card,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .closing-card {
    display: grid;
    gap: 20px;
    padding: 23px 20px;
  }

  .closing-button {
    width: fit-content;
  }

  .footer-inner {
    display: grid;
    gap: 28px;
  }
}

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

  .brand-copy small {
    display: none;
  }

  .trust-list {
    justify-content: flex-start;
  }

  .trust-list li {
    font-size: 0.78rem;
  }

  .field-row,
  .advanced-grid,
  .comparison-result,
  .preview-grid,
  .steps-grid,
  .exercise-grid,
  .footer-nav {
    grid-template-columns: 1fr;
  }

  .comparison-result div + div {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

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

  .preview-stat:last-child {
    grid-column: 1 / -1;
  }

  .subheading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .percentage-table,
  .limits-table {
    min-width: 620px;
  }

  .legal-page {
    padding-top: 40px;
  }
}

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

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