:root {
  --surface: #f6f4ee;
  --paper: #ffffff;
  --wash: #eef7f4;
  --ink: #24313d;
  --muted: #5e6b73;
  --line: #d7e0dc;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --amber: #d97706;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --success-soft: #e8f6f1;
  --shadow: 0 18px 48px rgba(36, 49, 61, 0.09);
  --shadow-small: 0 8px 24px rgba(36, 49, 61, 0.08);
  --focus-ring: 0 0 0 4px rgba(15, 118, 110, 0.16);
  --radius-large: 24px;
  --radius-medium: 16px;
  --radius-small: 10px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 85% 3%, rgba(15, 118, 110, 0.06), transparent 28rem),
    radial-gradient(circle at 4% 35%, rgba(217, 119, 6, 0.045), transparent 24rem);
  content: "";
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 13px;
}

input::placeholder {
  color: #87939a;
}

input:focus,
select:focus {
  border-color: var(--teal);
  outline: 0;
  box-shadow: var(--focus-ring);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
}

select {
  appearance: auto;
}

.hidden,
[hidden] {
  display: none !important;
}

.wrap {
  width: min(var(--max-width), calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.narrow-content {
  width: min(820px, calc(100% - 40px));
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: var(--radius-small);
  background: var(--teal-dark);
  color: var(--paper);
  padding: 9px 13px;
  text-decoration: none;
  transition: transform 160ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(215, 224, 220, 0.9);
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--teal-dark);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.brand-copy {
  display: grid;
  font-size: 0.98rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.primary-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.primary-nav a:hover {
  background: var(--wash);
  color: var(--teal-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--ink);
}

.mobile-menu-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.language-menu {
  position: relative;
}

.language-menu summary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 650;
  list-style: none;
}

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

.language-menu summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.language-current-short {
  display: none;
}

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

.language-option {
  display: block;
  width: 100%;
  border-radius: 7px;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 0.82rem;
  text-decoration: none;
}

.language-option:hover,
.language-option.is-current {
  background: var(--wash);
  color: var(--teal-dark);
}

.hero-section {
  padding: 80px 0 36px;
  text-align: center;
}

.hero-inner {
  max-width: 860px;
}

.eyebrow,
.section-label,
.panel-kicker {
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 8px 13px;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 11px 0 0 var(--teal);
  content: "";
}

.hero-section h1 {
  max-width: 780px;
  margin: 20px auto 16px;
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 820;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-lead {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.8vw, 1.18rem);
}

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

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 7px 11px;
  font-size: 0.82rem;
  font-weight: 650;
}

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

.trust-list li:nth-child(2) .trust-dot {
  background: var(--amber);
}

.trust-list li:nth-child(3) .trust-dot {
  background: #5b8def;
}

.trust-list li:nth-child(4) .trust-dot {
  background: #8b6fc7;
}

.tool-section {
  padding: 20px 0 72px;
}

.tool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.tool-input-panel,
.tool-result-panel {
  min-width: 0;
  padding: clamp(26px, 4vw, 42px);
}

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

.tool-result-panel {
  background: var(--wash);
}

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

.step-index {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff5df;
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.panel-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(1.38rem, 2vw, 1.8rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.calculator-form {
  display: grid;
  gap: 22px;
}

.mode-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

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

.field-label {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

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

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

.mode-button {
  display: grid;
  min-height: 67px;
  align-content: center;
  justify-items: start;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--muted);
  padding: 10px 12px;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.mode-button:hover {
  border-color: rgba(15, 118, 110, 0.4);
  color: var(--teal-dark);
  transform: translateY(-1px);
}

.mode-button.is-selected,
.mode-button[aria-selected="true"] {
  border-color: var(--teal);
  background: var(--success-soft);
  color: var(--teal-dark);
}

.mode-button span {
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.3;
}

.mode-button small {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.3;
}

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

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

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

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

.input-with-unit {
  display: flex;
  align-items: stretch;
}

.input-with-unit input {
  min-width: 0;
  border-radius: var(--radius-small) 0 0 var(--radius-small);
}

.input-unit {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.77rem;
  white-space: nowrap;
}

.field-group.has-error .input-unit {
  border-color: var(--danger);
}

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

.inline-note {
  margin: -7px 0 0;
  border-radius: var(--radius-small);
  background: var(--success-soft);
  color: var(--teal-dark);
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.action-stack {
  display: grid;
  gap: 12px;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-small);
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--paper);
  box-shadow: 0 7px 16px rgba(15, 118, 110, 0.18);
}

.primary-button:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.2);
}

.primary-button svg,
.secondary-button svg,
.privacy-note svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.secondary-button:hover {
  border-color: var(--teal);
  background: var(--success-soft);
  color: var(--teal-dark);
  transform: translateY(-1px);
}

.text-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--teal-dark);
}

.text-button:hover {
  background: var(--success-soft);
  color: var(--teal-dark);
}

.required-note {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.result-live {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius-medium);
  background: var(--paper);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-small);
}

.result-live[data-state="error"] {
  border-color: rgba(180, 35, 24, 0.34);
  background: var(--danger-soft);
}

.result-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 750;
}

.result-live[data-state="error"] .result-status {
  color: var(--danger);
}

.status-icon {
  display: inline-flex;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success-soft);
}

.status-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.result-live[data-state="error"] .status-icon {
  background: #fde0dd;
}

.result-number {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 10px;
  margin: 22px 0 8px;
}

.result-number strong {
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 820;
  letter-spacing: -0.07em;
  line-height: 1;
}

.result-number > span {
  color: var(--teal-dark);
  font-size: 0.94rem;
  font-weight: 720;
}

.result-summary {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 0;
}

.result-details > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  padding: 10px;
}

.result-details dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.35;
}

.result-details dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}

.formula-box {
  display: grid;
  gap: 5px;
  margin-top: 15px;
  border-radius: var(--radius-small);
  background: var(--surface);
  padding: 11px 12px;
}

.formula-box span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.formula-box code,
.large-formula,
.example-equation {
  color: var(--teal-dark);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.formula-box code {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
}

.result-actions .secondary-button {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.copy-status {
  color: var(--teal-dark);
  font-size: 0.75rem;
  line-height: 1.4;
}

.result-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.6);
  padding: 24px;
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff5df;
  color: var(--amber);
  font-weight: 800;
}

.result-empty h3 {
  margin: 12px 0 4px;
  font-size: 1.05rem;
}

.result-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.privacy-note svg {
  color: var(--teal);
}

.content-section {
  padding: 82px 0;
  border-top: 1px solid rgba(215, 224, 220, 0.85);
}

.tinted-section,
.faq-section {
  background: rgba(238, 247, 244, 0.55);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 9px 0 10px;
  color: var(--ink);
  font-size: clamp(1.85rem, 3.8vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.chart-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 12px;
}

.chart-controls label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.chart-controls select {
  width: auto;
  min-width: 140px;
  min-height: 42px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 0.82rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.chart-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  text-align: left;
}

.chart-table caption {
  padding: 15px 17px 4px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: left;
}

.chart-table th,
.chart-table td {
  border-bottom: 1px solid rgba(215, 224, 220, 0.78);
  padding: 12px 17px;
  font-size: 0.86rem;
}

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

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

.chart-table tbody td {
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 730;
}

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

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

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

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

.step-card,
.detail-card,
.stage-card,
.privacy-card,
.roadmap-card,
.formula-card,
.example-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--paper);
  padding: 23px;
}

.step-card,
.detail-card,
.stage-card {
  box-shadow: var(--shadow-small);
}

.step-card:hover,
.detail-card:hover,
.stage-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card-number {
  display: inline-flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff5df;
  color: var(--amber);
  font-size: 0.77rem;
  font-weight: 800;
}

.step-card h3,
.detail-card h3,
.stage-card h3,
.example-card h3,
.privacy-card h2,
.roadmap-card h2,
.formula-card h3 {
  margin: 15px 0 8px;
  color: var(--ink);
  font-size: 1.13rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.step-card p,
.detail-card p,
.stage-card p,
.example-card p,
.privacy-card p,
.roadmap-card p,
.formula-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.formula-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
}

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

.large-formula {
  margin: 18px 0 15px !important;
  color: var(--teal-dark) !important;
  font-size: clamp(1rem, 2vw, 1.25rem) !important;
  font-weight: 700;
  line-height: 1.55 !important;
}

.example-card {
  background: #fffaf0;
}

.comparison-tag {
  display: inline-flex;
  border: 1px solid #f0d3a4;
  border-radius: 999px;
  color: var(--amber);
  padding: 5px 9px;
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.example-equation {
  display: block;
  margin: 15px 0;
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stage-card {
  padding: 20px;
}

.stage-card h3 {
  margin-top: 0;
}

.stage-age {
  margin-bottom: 9px !important;
  color: var(--teal-dark) !important;
  font-size: 0.77rem !important;
  font-weight: 730;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: clamp(28px, 6vw, 86px);
}

.split-section .section-heading {
  margin-bottom: 0;
}

.check-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 3px 0 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  color: var(--muted);
  font-size: 0.92rem;
}

.check-list li > span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.privacy-card,
.roadmap-card {
  box-shadow: var(--shadow-small);
}

.privacy-card {
  background: var(--paper);
}

.roadmap-card {
  background: #fffaf0;
}

.privacy-card h2,
.roadmap-card h2 {
  margin-top: 9px;
  font-size: clamp(1.35rem, 2.7vw, 1.85rem);
  letter-spacing: -0.045em;
}

.inline-link {
  display: inline-flex;
  margin-top: 16px;
  font-size: 0.86rem;
  font-weight: 720;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

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

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

.faq-chevron {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: var(--success-soft);
}

.faq-chevron::before,
.faq-chevron::after {
  position: absolute;
  top: 11px;
  left: 7px;
  width: 10px;
  height: 1.5px;
  background: var(--teal-dark);
  content: "";
  transition: transform 160ms ease;
}

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

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

.faq-answer {
  border-top: 1px solid var(--line);
  padding: 0 17px 17px;
}

.faq-answer p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.89rem;
}

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

.closing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--teal-dark);
  color: var(--paper);
  padding: clamp(25px, 5vw, 42px);
  box-shadow: var(--shadow);
}

.closing-card .section-label,
.closing-card h2,
.closing-card p {
  color: var(--paper);
}

.closing-card h2 {
  margin: 9px 0 8px;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.closing-card p:last-child {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.closing-button {
  flex: 0 0 auto;
  border-color: #f2d39d;
  background: #fff5df;
  color: var(--teal-dark);
  box-shadow: none;
}

.closing-button:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--teal-dark);
}

.noscript-wrap {
  padding-bottom: 35px;
}

.noscript-note {
  display: block;
  border: 1px solid #f0d3a4;
  border-radius: var(--radius-small);
  background: #fffaf0;
  color: #7a4a05;
  padding: 12px 14px;
  font-size: 0.84rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #f0eee7;
  color: var(--muted);
}

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

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

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
  text-decoration: none;
}

.footer-logo img {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.footer-brand p {
  margin: 14px 0 12px;
  font-size: 0.84rem;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal-dark);
  font-size: 0.83rem;
  font-weight: 650;
}

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

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

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

.footer-group p {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

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

.footer-nav a:hover {
  color: var(--teal-dark);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 14px 0 18px;
}

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

.legal-page {
  padding: 72px 0 90px;
}

.legal-hero {
  max-width: 800px;
  margin-bottom: 30px;
}

.section-kicker {
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: clamp(2.25rem, 5.5vw, 4.2rem);
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.legal-panel {
  max-width: 900px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--paper);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow-small);
}

.legal-panel > p,
.legal-panel li {
  color: var(--muted);
  font-size: 0.94rem;
}

.legal-panel h2 {
  margin: 31px 0 10px;
  color: var(--ink);
  font-size: 1.35rem;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

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

.legal-panel ul {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding-left: 21px;
}

.legal-panel li::marker {
  color: var(--teal);
}

.legal-meta {
  display: inline-flex;
  border-radius: 999px;
  background: var(--wash);
  color: var(--teal-dark) !important;
  padding: 7px 11px;
  font-size: 0.76rem !important;
  font-weight: 700;
}

.legal-panel a {
  color: var(--teal-dark);
}

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

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

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    margin-left: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-medium);
    background: var(--paper);
    padding: 7px;
    box-shadow: var(--shadow);
  }

  .primary-nav.is-mobile-open {
    display: flex;
  }

  .primary-nav a {
    justify-content: flex-start;
    border-radius: 9px;
    padding: 11px 12px;
    font-size: 0.88rem;
  }

  .tool-card,
  .formula-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

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

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

  .split-section {
    gap: 28px;
  }
}

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

  .header-inner {
    gap: 10px;
  }

  .brand-copy small {
    display: none;
  }

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

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

  .header-actions {
    margin-left: auto;
  }

  .hero-section {
    padding: 59px 0 28px;
  }

  .hero-section h1 {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }

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

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

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

  .tool-section {
    padding-top: 13px;
    padding-bottom: 54px;
  }

  .tool-input-panel,
  .tool-result-panel {
    padding: 24px 19px;
  }

  .panel-heading {
    gap: 10px;
    margin-bottom: 23px;
  }

  .step-index {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 0.69rem;
  }

  .mode-grid,
  .field-grid.two-columns,
  .card-grid.two-columns,
  .callout-grid {
    grid-template-columns: 1fr;
  }

  .field-grid.two-columns {
    gap: 14px;
  }

  .result-details {
    grid-template-columns: 1fr;
  }

  .result-number strong {
    font-size: 2.55rem;
  }

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

  .section-heading {
    margin-bottom: 24px;
  }

  .chart-controls {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .chart-controls select {
    width: 100%;
  }

  .chart-table {
    min-width: 0;
  }

  .chart-table caption {
    padding-right: 13px;
    padding-left: 13px;
  }

  .chart-table th,
  .chart-table td {
    padding: 11px 13px;
  }

  .chart-table[data-active-size="small"] [data-chart-column="medium"],
  .chart-table[data-active-size="small"] [data-chart-column="large"],
  .chart-table[data-active-size="small"] [data-chart-column="giant"],
  .chart-table[data-active-size="medium"] [data-chart-column="small"],
  .chart-table[data-active-size="medium"] [data-chart-column="large"],
  .chart-table[data-active-size="medium"] [data-chart-column="giant"],
  .chart-table[data-active-size="large"] [data-chart-column="small"],
  .chart-table[data-active-size="large"] [data-chart-column="medium"],
  .chart-table[data-active-size="large"] [data-chart-column="giant"],
  .chart-table[data-active-size="giant"] [data-chart-column="small"],
  .chart-table[data-active-size="giant"] [data-chart-column="medium"],
  .chart-table[data-active-size="giant"] [data-chart-column="large"] {
    display: none;
  }

  .stage-grid {
    grid-template-columns: 1fr;
  }

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

  .closing-button {
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 27px;
    padding-top: 35px;
  }

  .footer-nav {
    gap: 14px;
  }

  .legal-page {
    padding-top: 53px;
    padding-bottom: 62px;
  }

  .legal-panel {
    padding: 23px 18px;
  }
}

@media (max-width: 390px) {
  .language-current-full {
    display: none;
  }

  .language-current-short {
    display: inline;
  }

  .language-menu summary {
    padding-right: 9px;
    padding-left: 9px;
  }

  .mode-button {
    min-height: 62px;
  }

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

  .secondary-actions > * {
    width: 100%;
  }
}

@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;
  }
}

/* Reference-inspired visual system: paper surfaces, playful accents, and calm ink outlines. */
:root {
  --surface: #fff7fb;
  --paper: #fffdf8;
  --wash: #fff3e5;
  --surface-blue: #f5edff;
  --ink: #372733;
  --muted: #78626f;
  --muted-light: #967f8d;
  --line: rgba(55, 39, 51, 0.16);
  --teal: #4edfa6;
  --teal-dark: #6f55df;
  --amber: #ffd45f;
  --primary: #9a80ff;
  --primary-hover: #6f55df;
  --primary-soft: #eadfff;
  --accent: #4edfa6;
  --accent-soft: #e9fff6;
  --warning: #b66b35;
  --warning-soft: #fff0b8;
  --danger: #b34767;
  --danger-soft: #ffe2eb;
  --success-soft: #e9fff6;
  --shadow: 4px 4px 0 rgba(55, 39, 51, 0.09);
  --shadow-small: 3px 3px 0 rgba(55, 39, 51, 0.08);
  --shadow-focus: 0 0 0 4px rgba(154, 128, 255, 0.28);
  --focus-ring: 0 0 0 4px rgba(154, 128, 255, 0.28);
  --radius-large: 24px;
  --radius-medium: 16px;
  --radius-small: 10px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --max-width: 1180px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --violet: #9a80ff;
  --cream: #fff0b8;
  --lavender: #eadfff;
  --mint: #4edfa6;
  --sun: #ffd45f;
  --peach: #ff9f82;
  --lime: #c8ef73;
  --bounce: cubic-bezier(.2, 1.35, .47, .76);
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.1;
  background:
    linear-gradient(135deg, rgba(255, 212, 95, 0.11) 0 12%, transparent 12% 100%),
    linear-gradient(45deg, transparent 0 49%, rgba(154, 128, 255, 0.08) 49% 51%, transparent 51%),
    radial-gradient(var(--line) 0.6px, transparent 0.9px);
  background-size: 260px 260px, 72px 72px, 28px 28px;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background:
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(255, 143, 202, 0.08) 70px 72px),
    repeating-linear-gradient(0deg, transparent 0 80px, rgba(78, 223, 166, 0.08) 80px 82px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
}

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

img,
svg {
  display: block;
}

.wrap {
  width: min(var(--max-width), calc(100% - 32px));
}

.narrow-content {
  width: min(820px, calc(100% - 32px));
}

.skip-link {
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 3px 3px 0 rgba(55, 39, 51, 0.14);
}

.site-header {
  border-bottom: 0;
  background: transparent;
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 74px;
  padding: 16px 0 10px;
}

.header-inner::before {
  position: absolute;
  inset: 0 -18px 0;
  z-index: -1;
  border: 1px solid rgba(55, 39, 51, 0.08);
  border-right: 0;
  border-left: 0;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.76), rgba(255, 253, 248, 0.46));
  box-shadow: 0 10px 24px rgba(55, 39, 51, 0.045);
  content: "";
}

.brand {
  font-weight: 950;
  letter-spacing: 0;
  transition: transform 0.28s var(--bounce);
}

.brand:hover {
  color: var(--ink);
  transform: rotate(-1deg) translateY(-1px);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: none;
  filter: drop-shadow(4px 4px 0 var(--ink));
  animation: dog-theme-mark-bob 4.6s ease-in-out infinite;
}

.brand-copy {
  font-weight: 950;
  letter-spacing: 0;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 850;
}

.primary-nav {
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(55, 39, 51, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 22px rgba(55, 39, 51, 0.04);
}

.primary-nav a {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-nav a:hover {
  transform: translateY(-1px);
  border-color: rgba(55, 39, 51, 0.1);
  background: var(--wash);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(55, 39, 51, 0.08);
}

.primary-nav a:nth-child(1):hover {
  background: rgba(255, 212, 95, 0.56);
}

.primary-nav a:nth-child(2):hover {
  background: rgba(154, 128, 255, 0.18);
}

.primary-nav a:nth-child(3):hover {
  background: rgba(78, 223, 166, 0.22);
}

.primary-nav a:nth-child(4):hover {
  background: rgba(255, 143, 202, 0.22);
}

.primary-nav .nav-privacy {
  border-color: transparent;
  background: transparent;
}

.mobile-menu-toggle {
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(55, 39, 51, 0.12);
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle[aria-expanded="true"] {
  border-color: var(--ink);
  background: var(--cream);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(55, 39, 51, 0.14);
}

.language-menu summary {
  min-height: 42px;
  border: 1.5px solid rgba(55, 39, 51, 0.16);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 8px 20px rgba(55, 39, 51, 0.08);
  color: var(--ink);
  font-weight: 850;
}

.language-menu summary::after {
  border-top-color: currentColor;
}

.language-menu summary:hover,
.language-menu[open] summary {
  border-color: rgba(55, 39, 51, 0.3);
  background: #fff;
  box-shadow: 0 12px 24px rgba(55, 39, 51, 0.12);
}

.language-menu summary svg {
  stroke: var(--primary-hover);
}

.language-options {
  border: 1px solid rgba(55, 39, 51, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(55, 39, 51, 0.16);
}

.language-option:hover,
.language-options a:hover {
  background: var(--wash);
  color: var(--ink);
}

.language-option.is-current {
  background: var(--cream);
  color: var(--ink);
}

.hero-section {
  padding: 56px 0 24px;
}

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

.eyebrow,
.section-label,
.panel-kicker {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 950;
}

.eyebrow {
  gap: 8px;
  padding: 7px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.12);
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  margin-right: 27px;
  background: var(--mint);
  box-shadow: 14px 0 0 var(--sun), 28px 0 0 var(--violet);
}

.hero-section h1 {
  max-width: 900px;
  margin: 20px auto 17px;
  font-size: clamp(3rem, 6vw, 4.8rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 0.96;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-lead {
  max-width: 760px;
  font-weight: 650;
}

.trust-list {
  gap: 9px;
  margin-top: 20px;
}

.trust-list li,
.trust-list li:nth-child(1),
.trust-list li:nth-child(2),
.trust-list li:nth-child(3),
.trust-list li:nth-child(4) {
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid rgba(55, 39, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: none;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 850;
  transform: none;
}

.trust-list li:nth-child(1) .trust-dot {
  background: var(--sun);
}

.trust-list li:nth-child(2) .trust-dot {
  background: var(--mint);
}

.trust-list li:nth-child(3) .trust-dot {
  background: var(--violet);
}

.trust-list li:nth-child(4) .trust-dot {
  background: var(--peach);
}

.trust-dot {
  background: var(--ink);
}

.tool-section {
  padding: 8px 0 54px;
}

.tool-card {
  max-width: 1080px;
  margin: 0 auto;
  border: 1.5px solid var(--ink);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(55, 39, 51, 0.09);
}

.tool-input-panel,
.tool-result-panel {
  padding: clamp(20px, 3vw, 32px);
}

.tool-input-panel {
  border-right: 1.5px solid rgba(55, 39, 51, 0.13);
  background: rgba(255, 253, 248, 0.74);
}

.tool-result-panel {
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(245, 237, 255, 0.98));
}

.panel-heading {
  gap: 11px;
  margin-bottom: 22px;
}

.panel-heading h2 {
  font-weight: 950;
  letter-spacing: -0.035em;
}

.step-index {
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.12);
}

.step-index-accent {
  background: var(--mint);
  color: #10281c;
}

.panel-kicker,
.section-label {
  color: var(--primary-hover);
}

.calculator-form {
  margin-top: 20px;
}

.mode-button {
  min-height: 64px;
  border: 1.5px solid rgba(55, 39, 51, 0.22);
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
  color: var(--muted);
  font-weight: 900;
  transition: transform 0.18s var(--bounce), box-shadow 0.18s var(--bounce), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mode-button:hover {
  border-color: var(--ink);
  background: var(--wash);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.08);
}

.mode-button.is-selected,
.mode-button[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.1);
}

.mode-button.is-selected small,
.mode-button[aria-selected="true"] small {
  color: var(--muted);
}

.input-with-unit input,
.input-unit {
  border-color: var(--ink);
  border-width: 1.5px;
  background: #fff;
  color: var(--ink);
}

.input-unit {
  background: var(--wash);
  color: var(--muted);
}

.input-with-unit input:focus,
input:focus,
select:focus {
  border-color: var(--primary-hover);
  box-shadow: var(--focus-ring);
}

.field-group.has-error .input-unit {
  border-color: var(--danger);
}

.inline-note {
  border: 1px solid rgba(55, 39, 51, 0.12);
  background: var(--accent-soft);
  color: #187a55;
}

.primary-button,
.secondary-button,
.text-button {
  border-width: 1.5px;
  border-radius: 18px;
  font-weight: 950;
  transition: transform 0.24s var(--bounce), box-shadow 0.24s var(--bounce), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.primary-button {
  border-color: var(--ink);
  background: var(--mint);
  color: #10281c;
  box-shadow: 2px 3px 0 rgba(55, 39, 51, 0.1);
}

.primary-button:hover {
  border-color: var(--ink);
  background: var(--lime);
  color: #10281c;
  transform: translateY(-1px);
  box-shadow: 3px 4px 0 rgba(55, 39, 51, 0.12);
}

.secondary-button {
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 2px 3px 0 rgba(55, 39, 51, 0.1);
}

.secondary-button:hover {
  border-color: var(--ink);
  background: var(--cream);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 3px 4px 0 rgba(55, 39, 51, 0.11);
}

.text-button {
  border-color: transparent;
  background: transparent;
  color: var(--primary-hover);
  box-shadow: none;
}

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

.result-live {
  border: 1.5px solid var(--ink);
  border-radius: 24px;
  background: rgba(234, 223, 255, 0.58);
  box-shadow: 3px 3px 0 rgba(55, 39, 51, 0.08);
}

.result-live[data-state="error"] {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.result-status {
  color: #187a55;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.result-live[data-state="error"] .result-status {
  color: var(--danger);
}

.status-icon {
  border: 1.5px solid var(--ink);
  background: var(--mint);
  color: var(--ink);
}

.result-live[data-state="error"] .status-icon {
  background: var(--peach);
}

.result-number strong {
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.72);
}

.result-number > span,
.formula-box code,
.large-formula,
.example-equation {
  color: var(--primary-hover);
}

.result-number > span {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-details > div {
  border-color: rgba(55, 39, 51, 0.16);
  background: rgba(255, 253, 248, 0.74);
}

.formula-box {
  border: 1px solid rgba(55, 39, 51, 0.18);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: none;
}

.formula-box code {
  color: var(--ink);
  font-family: var(--mono);
}

.copy-status {
  color: #187a55;
}

.result-empty {
  border: 1.5px dashed rgba(55, 39, 51, 0.38);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.7);
}

.empty-icon {
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.1);
}

.privacy-note svg {
  color: #187a55;
}

.content-section {
  padding: 78px 0;
  border-top: 2px dashed rgba(55, 39, 51, 0.13);
}

.tinted-section,
.faq-section {
  background: rgba(255, 253, 248, 0.56);
}

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

.section-heading h2 {
  margin: 8px 0 10px;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.section-heading > p:last-child {
  color: var(--muted);
  line-height: 1.72;
}

.chart-controls label,
.field-helper,
.required-note {
  color: var(--muted);
}

.chart-controls select {
  border: 1.5px solid var(--ink);
  background: var(--paper);
}

.table-wrap {
  border: 1.5px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.chart-table th,
.chart-table td {
  border-bottom-color: rgba(55, 39, 51, 0.16);
}

.chart-table thead th {
  background: var(--cream);
  color: var(--ink);
}

.chart-table tbody td {
  color: var(--primary-hover);
}

.step-card,
.detail-card,
.stage-card,
.privacy-card,
.roadmap-card,
.formula-card,
.example-card {
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.28s var(--bounce), box-shadow 0.28s var(--bounce);
}

.step-card:hover,
.detail-card:hover,
.stage-card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 rgba(55, 39, 51, 0.12);
}

.card-number {
  border: 1.5px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.08);
}

.stage-age {
  color: var(--primary-hover) !important;
}

.formula-card,
.example-card,
.privacy-card,
.roadmap-card {
  box-shadow: var(--shadow);
}

.example-card,
.roadmap-card {
  background: var(--paper);
}

.large-formula,
.example-equation {
  font-family: var(--mono);
}

.example-equation {
  border: 1px solid rgba(55, 39, 51, 0.18);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: none;
}

.check-list li > span {
  border: 1.5px solid var(--ink);
  background: var(--mint);
  color: #10281c;
}

.privacy-card h2,
.roadmap-card h2 {
  font-weight: 950;
}

.faq-item {
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.08);
}

.faq-item summary {
  color: var(--ink);
  font-weight: 900;
}

.faq-chevron {
  border: 1.5px solid var(--ink);
  background: var(--cream);
}

.faq-chevron::before,
.faq-chevron::after {
  background: var(--ink);
}

.faq-answer {
  border-top-color: rgba(55, 39, 51, 0.16);
}

.closing-section {
  padding: 38px 0 78px;
  background: rgba(255, 253, 248, 0.56);
}

.closing-card {
  border: 1.5px solid var(--ink);
  border-radius: 28px;
  background: var(--lavender);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.closing-card .section-label,
.closing-card h2,
.closing-card p {
  color: var(--ink);
}

.closing-card p:last-child {
  color: var(--muted);
}

.closing-button {
  border-color: var(--ink);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 2px 3px 0 rgba(55, 39, 51, 0.1);
}

.closing-button:hover {
  border-color: var(--ink);
  background: var(--cream);
  color: var(--ink);
}

.noscript-note {
  border: 1.5px solid var(--warning);
  border-radius: 16px;
  background: var(--warning-soft);
  box-shadow: 2px 2px 0 rgba(55, 39, 51, 0.08);
  color: #713f12;
}

.site-footer {
  margin-top: 18px;
  border-top: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.footer-logo {
  color: var(--ink);
  font-weight: 950;
}

.footer-logo img {
  border: 0;
  filter: drop-shadow(3px 3px 0 var(--ink));
}

.footer-email,
.footer-nav a {
  color: var(--muted);
}

.footer-email:hover,
.footer-nav a:hover {
  color: var(--ink);
}

.legal-panel,
.info,
.card,
.api-keys-table-container,
.credits-table-container {
  border-color: var(--ink);
  border-width: 1.5px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.legal-panel h2,
.legal-panel h3,
.info h2,
.info h3 {
  font-weight: 950;
}

.legal-panel a {
  color: var(--ink);
  text-decoration-color: var(--violet);
}

@keyframes dog-theme-mark-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-2px) rotate(-1.5deg);
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 74px;
    padding: 12px 0 10px;
  }

  .header-inner::before {
    inset: 0 -14px 0;
  }

  .primary-nav.is-mobile-open {
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 5px 5px 0 rgba(55, 39, 51, 0.12);
  }

  .primary-nav.is-mobile-open a {
    border-radius: 12px;
  }

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

  .tool-card {
    border-radius: 22px;
    box-shadow: 3px 3px 0 rgba(55, 39, 51, 0.09);
  }

  .tool-input-panel {
    border-right: 0;
    border-bottom: 1.5px solid rgba(55, 39, 51, 0.13);
  }

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

@media (max-width: 620px) {
  .hero-section h1 {
    font-size: clamp(2.75rem, 12vw, 4.4rem);
  }

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

  .tool-card {
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .tool-input-panel,
  .tool-result-panel {
    padding: 18px 14px;
  }

  .step-card:nth-child(n),
  .detail-card:nth-child(n),
  .stage-card:nth-child(n) {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark {
    animation: none;
  }
}
