: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: #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-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);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
a,
summary,
input,
select,
[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(1160px, 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: 76px;
}

.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;
  object-fit: contain;
  border-radius: 12px;
}

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

.brand-copy small {
  display: block;
  margin-top: 5px;
  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;
}

.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 12px;
  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);
}

.mobile-nav {
  display: none;
  position: relative;
  flex: 0 0 auto;
}

.mobile-nav summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary:hover,
.mobile-nav[open] summary {
  border-color: var(--primary);
  background: var(--surface-blue);
  color: var(--primary-hover);
}

.mobile-nav summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.mobile-nav-chevron {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.mobile-nav[open] .mobile-nav-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.mobile-nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 228px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.mobile-nav-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

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

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

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

.language-switcher summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}

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

.language-switcher summary:hover,
.language-switcher[open] summary {
  border-color: var(--primary);
  background: var(--surface-blue);
  color: var(--primary-hover);
}

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

.language-current {
  color: var(--ink);
}

.language-code {
  display: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.language-chevron {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.language-switcher[open] .language-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.language-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 188px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.language-switcher-menu p {
  margin: 3px 8px 6px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-switcher-menu a {
  display: block;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

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

.hero-section {
  padding: 34px 0 18px;
}

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

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.eyebrow,
.section-label,
.panel-kicker {
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 0.71rem;
  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(21, 128, 61, 0.12);
  content: "";
}

.update-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

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

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

.hero-notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  color: var(--muted-light);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-notes span + span::before {
  margin-right: 18px;
  color: var(--border-strong);
  content: "•";
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-dot-success {
  background: var(--accent);
}

.status-dot-neutral {
  background: var(--border-strong);
}

.tool-section {
  padding: 4px 0 52px;
}

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

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

.section-intro .section-label {
  display: block;
  margin: 0;
}

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

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

.tool-card {
  display: grid;
  max-width: 1120px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.93fr) minmax(0, 1.07fr);
  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, 2.4vw, 30px);
}

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

.result-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.step-index {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
}

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

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

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

.panel-help {
  margin: 0 0 18px 47px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.6;
}

.field-group {
  min-width: 0;
  padding: 0;
  margin: 0 0 22px;
  border: 0;
}

.field-group legend {
  width: 100%;
  padding: 0;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.form-grid {
  display: grid;
  gap: 13px 12px;
}

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

.field-span-two {
  grid-column: span 2;
}

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

.field-wrap label,
.checkbox-label {
  display: block;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.field-wrap input,
.field-wrap select {
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.2;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field-wrap input {
  padding: 9px 11px;
}

.field-wrap select {
  padding: 9px 31px 9px 11px;
}

.field-wrap input:hover,
.field-wrap select:hover {
  border-color: var(--primary);
}

.field-wrap input:focus,
.field-wrap select:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
  outline: 0;
}

.field-wrap small,
.checkbox-label small {
  display: block;
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 0.69rem;
  line-height: 1.45;
}

.input-with-prefix,
.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.input-with-prefix > span,
.input-with-suffix > span {
  position: absolute;
  z-index: 1;
  color: var(--muted-light);
  font-size: 0.9rem;
  font-weight: 800;
  pointer-events: none;
}

.input-with-prefix > span {
  left: 11px;
}

.input-with-suffix > span {
  right: 11px;
}

.input-with-prefix input {
  padding-left: 25px;
  margin-top: 0;
}

.input-with-suffix input {
  padding-right: 27px;
  margin-top: 0;
}

.checkbox-wrap {
  padding-top: 2px;
}

.checkbox-label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  cursor: pointer;
}

.checkbox-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkbox-ui {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 1px;
  border: 2px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
}

.checkbox-ui::after {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-label input:checked + .checkbox-ui {
  border-color: var(--primary);
  background: var(--primary);
}

.checkbox-label input:checked + .checkbox-ui::after {
  opacity: 1;
}

.checkbox-label input:focus-visible + .checkbox-ui {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  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,
.secondary-button {
  padding: 10px 16px;
}

.primary-button svg,
.secondary-button svg,
.text-button svg,
.icon-button svg,
.local-processing-note svg,
.rules-note svg,
.source-card 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);
}

.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);
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  margin: 0 0 16px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
}

.message > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.message strong {
  display: block;
  font-size: 0.79rem;
}

.message p {
  margin: 3px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
}

.field-error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  color: var(--danger);
  font-size: 0.68rem;
  line-height: 1.35;
}

.field-wrap.has-error input,
.field-wrap.has-error select {
  border-color: var(--danger);
  background: #fffafa;
}

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

.local-processing-note svg {
  flex: 0 0 auto;
  color: var(--accent);
}

.result-region {
  display: grid;
  gap: 14px;
}

.limit-result,
.balance-result,
.chart-card,
.table-disclosure,
.comparison-result {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.limit-result {
  padding: 15px 16px 13px;
  border-color: #bfdbfe;
  background: var(--surface-blue);
}

.result-label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.result-label {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: right;
}

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

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

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

.status-icon {
  font-size: 0.8rem;
  line-height: 1;
}

.limit-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.limit-amount strong {
  color: var(--ink);
  font-size: clamp(1.8rem, 4.3vw, 2.65rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.limit-amount span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.result-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.52;
}

.balance-result {
  padding: 16px;
  background: linear-gradient(135deg, #0f2749 0%, #164e63 100%);
  border-color: #12355b;
  color: #fff;
}

.balance-result .result-label {
  color: #cbd5e1;
}

.balance-result .status-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.balance-amount {
  margin-top: 11px;
  color: #fff;
  font-size: clamp(2.2rem, 5.4vw, 3.65rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 1;
}

.balance-subtitle {
  margin: 7px 0 0;
  color: #cbd5e1;
  font-size: 0.83rem;
  font-weight: 750;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.metric-card-wide {
  grid-column: span 2;
  min-height: 65px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.metric-card span {
  color: var(--muted-light);
  font-size: 0.69rem;
  font-weight: 750;
  line-height: 1.35;
}

.metric-card strong {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.comparison-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.comparison-result p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.comparison-result > strong {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1.13rem;
  font-weight: 900;
  white-space: nowrap;
}

.chart-card {
  padding: 15px 16px 13px;
}

.chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.chart-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.3;
}

.chart-heading p {
  max-width: 460px;
  margin: 4px 0 0;
  color: var(--muted-light);
  font-size: 0.69rem;
  line-height: 1.45;
}

.chart-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--muted-light);
  font-size: 0.65rem;
  font-weight: 750;
  white-space: nowrap;
}

.chart-key-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.growth-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 132px;
  padding: 15px 8px 0;
  margin-top: 10px;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(to bottom, transparent 24%, rgba(203, 213, 225, 0.45) 25%, transparent 26%, transparent 49%, rgba(203, 213, 225, 0.45) 50%, transparent 51%, transparent 74%, rgba(203, 213, 225, 0.45) 75%, transparent 76%);
}

.chart-bar-group {
  display: flex;
  min-width: 0;
  height: 100%;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.chart-bar {
  width: min(30px, 75%);
  min-height: 4px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #60a5fa 0%, var(--primary) 100%);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.18);
  transition: height 220ms ease;
}

.chart-bar-group span {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted-light);
  font-size: 0.64rem;
  font-weight: 700;
}

.table-disclosure {
  overflow: hidden;
}

.table-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 11px 14px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 850;
  list-style: none;
}

.table-disclosure summary::-webkit-details-marker {
  display: none;
}

.summary-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.table-disclosure[open] .summary-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.table-disclosure table,
.rules-table {
  width: 100%;
  border-collapse: collapse;
}

.table-disclosure table {
  min-width: 540px;
}

.table-disclosure caption,
.rules-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-disclosure th,
.table-disclosure td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.table-disclosure th:first-child,
.table-disclosure td:first-child {
  text-align: left;
}

.table-disclosure thead th {
  background: var(--surface-muted);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

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

.result-footnote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  color: var(--muted-light);
  font-size: 0.72rem;
  line-height: 1.5;
}

.info-mark {
  display: inline-grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 0.72rem;
  font-weight: 800;
}

.tool-disclaimer {
  max-width: 960px;
  margin: 11px auto 0;
  color: var(--muted-light);
  font-size: 0.75rem;
  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,
.faq-section,
.closing-section {
  background: #f1f5f9;
}

.steps-grid,
.meaning-grid,
.assumptions-grid,
.example-facts {
  display: grid;
  gap: 14px;
}

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

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

.step-card,
.meaning-card,
.assumption-card,
.fact-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.step-number {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
}

.step-card h3,
.meaning-card h3,
.assumption-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.step-card p,
.meaning-card p,
.assumption-card p,
.fact-card span,
.example-section .section-intro p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.72;
}

.step-card p,
.meaning-card p,
.assumption-card p {
  margin: 0;
}

.meaning-card {
  padding-top: 18px;
}

.meaning-tag {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.meaning-card h3 {
  margin-top: 12px;
}

.rules-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.68fr);
  align-items: start;
  gap: 18px;
}

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

.rules-table {
  min-width: 720px;
}

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

.rules-table thead th {
  background: var(--surface-muted);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.rules-table tbody th {
  min-width: 195px;
  color: var(--ink);
  font-weight: 850;
}

.source-card {
  padding: 20px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  background: var(--surface-blue);
  box-shadow: var(--shadow-sm);
}

.source-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.93rem;
}

.source-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
}

.source-icon svg {
  width: 20px;
  height: 20px;
}

.source-card > p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.68;
}

.source-updated {
  padding-top: 12px;
  border-top: 1px solid #bfdbfe;
}

.source-updated strong {
  color: var(--ink);
}

.source-links {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.source-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--primary-hover);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.source-links a:hover {
  text-decoration: underline;
}

.rules-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  padding: 13px 15px;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  background: var(--warning-soft);
}

.rules-note svg {
  flex: 0 0 auto;
  color: var(--warning);
}

.rules-note p {
  margin: 0;
  color: #713f12;
  font-size: 0.8rem;
  line-height: 1.6;
}

.example-section {
  background: var(--surface);
}

.example-section .section-intro {
  max-width: 900px;
  margin-bottom: 24px;
}

.example-section .section-intro p + p {
  margin-top: 12px;
}

.example-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 930px;
  margin: 0 auto;
}

.fact-card {
  display: flex;
  min-height: 94px;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.fact-card span {
  font-size: 0.76rem;
  line-height: 1.35;
}

.fact-card strong {
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.assumption-card {
  border-left: 3px solid var(--primary);
}

.assumptions-closing {
  max-width: 850px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
  text-align: center;
}

.faq-list {
  display: grid;
  gap: 9px;
  max-width: 920px;
  margin: 0 auto;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 15px 17px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.91rem;
  font-weight: 850;
  list-style: none;
}

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

.faq-chevron {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.faq-chevron::before,
.faq-chevron::after {
  position: absolute;
  top: 8px;
  left: 4px;
  width: 8px;
  height: 1.5px;
  background: var(--muted);
  content: "";
  transition: transform 180ms ease;
}

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

.faq-item[open] .faq-chevron::after {
  transform: rotate(0);
}

.faq-item p {
  margin: 0;
  padding: 0 17px 17px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.72;
}

.closing-section {
  padding: 32px 0 72px;
}

.closing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  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.4rem, 3vw, 2rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.closing-card p:not(.section-label) {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.noscript-note {
  margin-bottom: 32px;
  padding: 14px 16px;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  background: var(--warning-soft);
  color: #713f12;
  font-size: 0.88rem;
}

.site-footer {
  padding: 48px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 42px;
}

.footer-brand {
  max-width: 510px;
}

.footer-logo {
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.footer-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
}

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

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}

.footer-email:hover {
  color: var(--primary-hover);
}

.footer-email svg {
  width: 16px;
  height: 16px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, auto));
  gap: 36px;
}

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

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

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

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.67rem;
  line-height: 1.6;
}

.legal-page {
  padding: 64px 0 84px;
}

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

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

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

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

.legal-panel {
  max-width: 920px;
  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.74rem;
}

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

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

.legal-panel a {
  color: var(--primary-hover);
  font-weight: 750;
}

.legal-panel ul {
  padding-left: 20px;
}

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

@media (min-width: 821px) and (max-height: 800px) {
  .hero-section {
    padding-top: 20px;
    padding-bottom: 0;
  }

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

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

  .hero-notes {
    margin-top: 8px;
  }

}

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

  .primary-nav a {
    padding-inline: 9px;
    font-size: 0.79rem;
  }

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

  .rules-layout {
    grid-template-columns: 1fr;
  }
}

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

  .primary-nav {
    display: none;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 8px;
  }

  .mobile-nav {
    display: block;
  }

  .tool-card {
    grid-template-columns: 1fr;
  }

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

  .meaning-grid,
  .assumptions-grid,
  .example-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .closing-button {
    width: 100%;
  }
}

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

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

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-copy {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    align-items: center;
    gap: 7px;
  }

  .language-switcher summary {
    padding-inline: 9px;
  }

  .language-switcher summary > span:first-of-type,
  .language-current {
    display: none;
  }

  .language-code {
    display: inline;
  }

  .hero-section {
    padding-top: 30px;
  }

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

  .hero-notes {
    align-items: center;
    flex-direction: column;
    gap: 4px;
  }

  .hero-notes span + span::before {
    display: none;
  }

  .tool-panel {
    padding: 20px 15px;
  }

  .panel-help {
    margin-left: 0;
  }

  .form-grid-two,
  .meaning-grid,
  .assumptions-grid,
  .example-facts {
    grid-template-columns: 1fr;
  }

  .field-span-two,
  .metric-card-wide {
    grid-column: auto;
  }

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

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .primary-button,
  .form-actions .secondary-button {
    width: 100%;
  }

  .result-label-row,
  .chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-badge {
    text-align: left;
  }

  .chart-key {
    order: -1;
  }

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

  .footer-nav {
    width: 100%;
    justify-content: space-between;
    gap: 22px;
  }

  .legal-page {
    padding: 46px 0 62px;
  }
}

@media (max-width: 400px) {
  .brand-copy {
    font-size: 0.95rem;
  }

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

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

  .mobile-nav summary {
    width: 44px;
    justify-content: center;
    padding-inline: 0;
  }

  .mobile-nav summary > span:not(.mobile-nav-chevron) {
    display: none;
  }

  .mobile-nav-chevron {
    display: none;
  }

  .growth-chart {
    gap: 4px;
    padding-inline: 2px;
  }

  .chart-bar {
    width: 78%;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
