/* PawAge — MemoAI-inspired UI */

:root {
  --ink: #0c0a1d;
  --ink-2: #4a4762;
  --muted: #767390;
  --bg: #ffffff;
  --bg-soft: #f8f7ff;
  --bg-lav: #f1efff;
  --line: #e9e7f5;
  --line-strong: #dcd8f3;
  --purple: #5b4cf5;
  --purple-2: #7c3aed;
  --purple-3: #a855f7;
  --purple-ink: #332a86;
  --grad: linear-gradient(115deg, #4f46e5 0%, #6d3bed 52%, #9333ea 100%);
  --grad-soft: linear-gradient(180deg, #f7f5ff 0%, #fbfaff 100%);
  --green: #1fae7a;
  --sans: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --radius: 20px;
  --shadow-sm: 0 12px 30px -22px rgba(35, 23, 120, 0.28);
  --shadow-md: 0 26px 60px -34px rgba(35, 23, 120, 0.32);
  --shadow-lg: 0 50px 120px -50px rgba(55, 30, 190, 0.42);
  --wrap: 1160px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

h1,
h2,
h3 {
  font-family: var(--sans);
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(840px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--grad);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(233, 231, 245, 0.9);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 13px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 8px;
  box-shadow: 0 12px 24px -12px rgba(91, 76, 245, 0.8);
}

.brand-text {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}

.brand-text small {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
}

.site-nav > a,
.nav-drop-btn {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.site-nav > a:hover,
.site-nav > a:focus-visible,
.nav-drop-btn:hover,
.nav-drop-btn:focus-visible,
.nav-drop.is-open .nav-drop-btn {
  color: var(--purple);
  background: var(--bg-lav);
  outline: none;
}

.site-nav > a[aria-current="page"],
.nav-drop[data-current="true"] .nav-drop-btn {
  color: var(--purple);
  background: var(--bg-lav);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--grad);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 750;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 28px -16px rgba(91, 76, 245, 0.85);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px -18px rgba(91, 76, 245, 0.9);
  filter: saturate(1.08);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--purple-3);
  outline-offset: 3px;
}

.header-cta {
  justify-self: end;
  padding: 9px 18px;
  font-size: 0.82rem;
  border-radius: 10px;
  white-space: nowrap;
}

.btn-reset {
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 6px 2px;
  transition: color 0.18s ease;
}

.btn-reset:hover {
  color: var(--purple);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 74px) 0 clamp(18px, 3vw, 30px);
  text-align: center;
  background:
    radial-gradient(820px 440px at 50% -12%, #eae6ff 0%, rgba(234, 230, 255, 0) 66%),
    radial-gradient(460px 300px at 8% 16%, rgba(168, 85, 247, 0.08), transparent 70%),
    #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(91, 76, 245, 0.06) 1px, transparent 1px);
  background-size: 112px 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 14px 6px 11px;
  border: 1px solid #ded9ff;
  border-radius: 999px;
  background: #f2efff;
  color: var(--purple);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 900px;
  font-size: clamp(2.05rem, 4vw, 3.1rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.hero h1 .grad-text {
  display: block;
  margin-top: 4px;
  color: var(--purple);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero h1 .grad-text {
    background: linear-gradient(100deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.lede {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 22px auto 0;
  padding: 0;
}

.hero-pills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-2);
  box-shadow: 0 8px 20px -18px rgba(35, 23, 120, 0.35);
}

.hero-pills li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
}

.hero-note {
  margin: 16px auto 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-expect {
  max-width: 680px;
  margin: 22px auto 0;
  padding: 14px 18px;
  background: #f3f1ff;
  border: 1px solid #ded9ff;
  border-radius: 16px;
  color: var(--purple-ink);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.55;
}

.hero--chart {
  text-align: left;
  padding-bottom: clamp(28px, 4vw, 44px);
}

.hero--chart h1 {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  font-size: clamp(2.05rem, 4.6vw, 3.35rem);
}

.hero--chart .lede {
  margin-left: 0;
  max-width: 720px;
}

.hero--chart .hero-pills {
  justify-content: flex-start;
}

.hero--chart .hero-note {
  margin-left: 0;
}

.chart-first {
  margin-top: 20px;
  text-align: left;
}

.chart-first h2 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Calculator */

.calc {
  position: relative;
  max-width: 900px;
  margin: 30px auto 0;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3.2vw, 30px);
  scroll-margin-top: 92px;
}

.calc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--grad);
  opacity: 0.7;
}

.calc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.calc-kicker {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f3f1ff;
  border-radius: 999px;
}

.segmented button {
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--muted);
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segmented button[aria-pressed="true"] {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(91, 76, 245, 0.75);
}

.segmented button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.age-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.age-field {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfaff;
  padding: 13px 16px 10px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.age-field label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.age-field input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 2px 0 0;
  font-family: var(--sans);
  font-size: clamp(2rem, 4.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
  appearance: textfield;
  -moz-appearance: textfield;
  outline: none;
}

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

.age-field:focus-within {
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 76, 245, 0.12);
}

.field-block {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
  min-width: 0;
}

.field-block legend {
  padding: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-hint {
  margin: 5px 0 10px;
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.45;
}

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

.size-option {
  position: relative;
  display: block;
}

.size-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.size-option > span {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}

.size-name {
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.25;
}

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

.size-option input:checked + span {
  border-color: var(--purple);
  background: #f4f2ff;
  box-shadow: 0 12px 26px -20px rgba(91, 76, 245, 0.9);
}

.size-option input:checked + span::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}

.size-option input:focus-visible + span {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.select-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.select-field select {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fbfaff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 38px 12px 14px;
  width: 100%;
  max-width: 340px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235B4CF5' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

.select-field select:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.calc-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.calc--compact {
  max-width: none;
  margin-top: 22px;
  padding: 16px 18px 18px;
  border-radius: 20px;
}

.calc--compact .compact-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.calc--compact .age-field {
  flex: 0 1 160px;
  min-width: 132px;
}

.calc--compact .age-field input {
  font-size: 1.7rem;
}

.calc--compact .select-field {
  flex: 1 1 220px;
  min-width: 180px;
}

.calc--compact .select-field select {
  max-width: none;
}

.calc--compact .calc-actions {
  margin-top: 0;
  padding-bottom: 4px;
}

.compact-link {
  color: var(--purple);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.compact-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compact-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-2);
}

.compact-result #result-label {
  width: 100%;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.compact-result #human-age {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}

.compact-result-meta {
  color: var(--ink-2);
  font-weight: 650;
}

/* Result */

.result {
  position: relative;
  margin-top: 20px;
  border-radius: 20px;
  padding: clamp(20px, 3.2vw, 28px);
  background: linear-gradient(130deg, #4338ca 0%, #6828d9 52%, #9333ea 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 70px -34px rgba(83, 45, 210, 0.8);
}

.result::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -130px;
  top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 66%);
  z-index: -1;
}

.result::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(120deg, transparent 32%, #000 100%);
  mask-image: linear-gradient(120deg, transparent 32%, #000 100%);
  opacity: 0.55;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}

.result-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.result-number {
  font-family: var(--sans);
  font-size: clamp(3.3rem, 8vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: #fff;
  display: inline-block;
}

.result-unit {
  display: block;
  margin-top: 3px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.result-meta {
  display: grid;
  gap: 0;
  align-content: start;
}

.result-meta > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.result-meta > div:first-child {
  padding-top: 2px;
}

.result-meta > div:last-child {
  border-bottom: 0;
}

.result-meta span {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
}

.result-meta strong {
  font-size: 0.89rem;
  font-weight: 750;
  color: #fff;
  text-align: right;
}

.pace-note {
  margin: 16px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.46);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.85rem;
  line-height: 1.55;
}

.timeline {
  display: flex;
  gap: 5px;
  margin-top: 16px;
}

.timeline span {
  flex: 1;
  text-align: center;
  font-size: 0.61rem;
  font-weight: 650;
  line-height: 1.25;
  padding: 7px 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.2s ease, color 0.2s ease;
}

.timeline span.is-active {
  background: #fff;
  color: var(--purple-ink);
  font-weight: 800;
  box-shadow: 0 8px 18px -10px rgba(20, 10, 70, 0.5);
}

.result-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.result-extras > div {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
}

.result-extras span {
  display: block;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 5px;
}

.result-extras p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #fff;
}

@keyframes result-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.result-number.is-popping {
  animation: result-pop 0.38s ease;
}

/* Sections */

.section {
  padding: clamp(52px, 7vw, 86px) 0;
  border-top: 1px solid var(--line);
}

.section-tint {
  background: var(--grad-soft);
}

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

.eyebrow {
  display: block;
  margin: 0 0 10px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  font-weight: 800;
}

.section-head p:last-child {
  color: var(--ink-2);
  font-size: 0.96rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.8vw, 28px);
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  margin: 0 0 6px;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.panel > p {
  color: var(--ink-2);
  font-size: 0.92rem;
}

.rule-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rule-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.89rem;
  color: var(--ink-2);
}

.rule-list b {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-lav);
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.rule-list strong {
  color: var(--ink);
  font-weight: 750;
}

.note {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.table-wrap--narrow {
  max-width: 620px;
}

.table-wrap--text th,
.table-wrap--text td {
  white-space: normal;
  vertical-align: top;
}

table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 0.89rem;
}

th,
td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  background: #f7f6ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5a5776;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.is-current {
  background: #f3f1ff;
}

tbody tr.is-current td:first-child {
  box-shadow: inset 3px 0 0 var(--purple);
  font-weight: 750;
}

tbody td:first-child {
  font-weight: 650;
}

.panel .table-wrap {
  box-shadow: none;
}

.chart-block + .chart-block {
  margin-top: 30px;
}

.chart-block h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
  font-weight: 800;
}

.chart-note {
  margin-top: 10px;
  font-size: 0.77rem;
  color: var(--muted);
}

/* Feature prose */

.prose-block {
  max-width: 800px;
}

.prose-block p {
  color: var(--ink-2);
}

.prose-block h2 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  font-weight: 800;
}

.prose-block h3 {
  margin: 28px 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
}

.pullquote {
  margin: 26px 0;
  padding: 20px 24px;
  background: var(--bg-lav);
  border-left: 3px solid var(--purple);
  border-radius: 0 16px 16px 0;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
}

.stage-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.stage-list li {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-2);
}

.stage-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.stage-list b {
  color: var(--purple);
  font-weight: 750;
}

/* FAQ */

.faq {
  max-width: 860px;
  margin: 0 auto;
  padding: 4px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq details:last-of-type {
  border-bottom: 0;
}

.faq details:first-of-type {
  border-top: 0;
}

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

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

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 500;
  color: var(--purple);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details[open] summary {
  color: var(--purple);
}

.faq details p {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 0.89rem;
  max-width: 730px;
}

/* Calculator chooser */

.chooser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 920px;
  margin: 36px auto 0;
  text-align: left;
}

.chooser-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1100px;
}

.chooser-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 30px;
  background: linear-gradient(180deg, #fbfaff 0%, #ffffff 42%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.chooser-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--grad);
}

.chooser-card:hover {
  transform: translateY(-4px);
  border-color: #bdb4ff;
  box-shadow: var(--shadow-md);
}

.chooser-tag {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-lav);
  color: var(--purple);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chooser-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  line-height: 1.15;
  font-weight: 800;
}

.chooser-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9rem;
}

.chooser-more {
  margin-top: auto;
  padding-top: 12px;
  color: var(--purple);
  font-size: 0.86rem;
  font-weight: 800;
}

/* Guide cards */

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: #cfc8ff;
  box-shadow: var(--shadow-md);
}

.guide-tag {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-lav);
  color: var(--purple);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
  font-weight: 800;
}

.guide-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.guide-card .more {
  margin-top: 10px;
  font-size: 0.83rem;
  font-weight: 750;
  color: var(--purple);
}

/* Article pages */

.article-hero {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: clamp(28px, 4vw, 46px);
  background:
    radial-gradient(520px 260px at 88% 0%, #eee8ff 0%, rgba(238, 232, 255, 0) 70%),
    linear-gradient(160deg, #f7f5ff 0%, #fbfaff 64%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 26px;
}

.article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(91, 76, 245, 0.06) 1px, transparent 1px);
  background-size: 96px 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
}

.article-hero > * {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--purple);
}

.breadcrumb span {
  color: #b8b3cf;
}

.article-hero h1 {
  margin: 0 0 16px;
  max-width: 780px;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.article-hero .lede {
  margin: 0;
  max-width: 700px;
  font-size: 1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 0.74rem;
  color: var(--muted);
}

.article-body {
  padding: 28px 0 68px;
}

.prose {
  max-width: 800px;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: clamp(1.55rem, 2.9vw, 2rem);
  line-height: 1.16;
  font-weight: 800;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 1.16rem;
  font-weight: 800;
}

.prose p,
.prose li {
  color: var(--ink-2);
  font-size: 0.97rem;
}

.prose a {
  color: var(--purple);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 76, 245, 0.28);
}

.prose a:hover {
  border-bottom-color: var(--purple);
}

.prose ul,
.prose ol {
  padding-left: 20px;
  margin: 12px 0 18px;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--purple);
}

.prose table {
  min-width: 0;
  margin: 18px 0;
}

.prose table th,
.prose table td {
  white-space: normal;
  vertical-align: top;
}

.prose .table-wrap {
  margin: 18px 0;
}

.callout {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--bg-lav);
  border-left: 3px solid var(--purple);
  border-radius: 0 16px 16px 0;
}

.callout p {
  margin: 0;
  font-size: 0.91rem;
}

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

.calc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 40px 0;
  padding: clamp(24px, 3.4vw, 32px);
  background: var(--grad);
  border-radius: 22px;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.calc-cta h2 {
  margin: 0 0 4px;
  font-size: 1.32rem;
  font-weight: 800;
  color: #fff;
}

.calc-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.87rem;
}

.calc-cta .btn {
  flex: none;
  background: #fff;
  color: var(--purple);
  border-color: #fff;
  box-shadow: 0 14px 30px -18px rgba(10, 5, 40, 0.6);
}

.calc-cta .btn:hover {
  background: #fff;
  filter: brightness(0.98);
}

.faq-heading {
  margin: 40px 0 8px;
}

.related-link {
  margin-top: 30px;
  font-size: 0.92rem;
}

.related-link a {
  color: var(--purple);
  font-weight: 750;
  text-decoration: none;
}

.related-link a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */

.site-footer {
  position: relative;
  overflow: hidden;
  background: #0b0a1c;
  color: #b6b2cf;
  padding: 52px 0 30px;
}

.site-footer::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 320px;
  left: 50%;
  top: -220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.34), transparent 68%);
  pointer-events: none;
}

.site-footer > .wrap {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.footer-brand .brand-mark {
  width: 32px;
  height: 32px;
  padding: 7px;
  box-shadow: none;
}

.footer-blurb {
  max-width: 340px;
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #9d99bb;
}

.footer-col h3 {
  margin: 2px 0 10px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #817ca3;
}

.footer-col a {
  display: block;
  width: fit-content;
  margin: 7px 0;
  font-size: 0.85rem;
  color: #d8d5ea;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 20px;
  font-size: 0.73rem;
  color: #817ca3;
}

.footer-bottom p {
  margin: 0;
  max-width: 660px;
}

/* Responsive */

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand cta"
      "nav nav";
    gap: 8px 14px;
    padding: 10px 0;
  }

  .brand {
    grid-area: brand;
  }

  .header-cta {
    grid-area: cta;
  }

  .site-nav {
    grid-area: nav;
    justify-content: flex-start;
    gap: 2px;
  }

  .site-nav > a,
  .nav-drop-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .result-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .result-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 6px;
  }

  .result-meta > div:first-child {
    padding-top: 9px;
  }

  .split,
  .guide-grid,
  .chooser-grid--three {
    grid-template-columns: 1fr;
  }

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

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .wrap,
  .wrap-narrow {
    width: calc(100% - 32px);
  }

  .brand-text small {
    display: none;
  }

  .header-cta {
    padding: 8px 14px;
    font-size: 0.76rem;
  }

  .site-nav {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .site-nav > a,
  .nav-drop-btn {
    padding: 7px 9px;
    font-size: 0.74rem;
  }

  .chooser-grid,
  .chooser-grid--three {
    grid-template-columns: 1fr;
    margin-top: 26px;
  }

  .calc--compact .compact-row {
    align-items: stretch;
  }

  .calc--compact .age-field,
  .calc--compact .select-field {
    flex: 1 1 100%;
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7.6vw, 2.2rem);
  }

  .hero-pills li {
    font-size: 0.71rem;
  }

  .calc {
    border-radius: 22px;
  }

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

  .age-row {
    gap: 9px;
  }

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

  .timeline span:last-child {
    grid-column: 1 / -1;
  }

  .result-number {
    font-size: 3.2rem;
  }

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

  .stage-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .stage-list b {
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .faq {
    padding: 2px 18px;
  }

  .article-hero {
    margin-top: 20px;
    border-radius: 20px;
  }

  .calc-cta {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

/* ------------------------------------------------------------------
   Homepage v2 — hero becomes the tool
   Scoped under .home so the other nine pages keep their current layout.
   ------------------------------------------------------------------ */

.home .hero {
  text-align: left;
  padding: clamp(28px, 4vw, 52px) 0 clamp(30px, 4vw, 46px);
}

.home .hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(26px, 3.4vw, 52px);
  align-items: start;
}

.home .hero-badge {
  margin-bottom: 14px;
  font-size: 0.62rem;
}

/* 76px -> ~41px: the headline stops competing with the tool */
.home .hero h1 {
  margin: 0 0 14px;
  max-width: 16em;
  font-size: clamp(1.95rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.038em;
}

.home .hero h1 .grad-text {
  margin-top: 3px;
  font-size: 0.72em;
  letter-spacing: -0.028em;
  line-height: 1.2;
}

.home .hero .lede {
  margin: 0;
  max-width: 30em;
  font-size: 1rem;
  line-height: 1.6;
}

.home .hero-pills {
  justify-content: flex-start;
  margin-top: 18px;
}

.home .hero-note {
  margin-top: 14px;
  text-align: left;
}

/* --- calculator card in the hero --- */

.home .hero-calc {
  max-width: none;
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  box-shadow: 0 26px 60px -38px rgba(35, 23, 120, 0.5), 0 1px 2px rgba(35, 23, 120, 0.06);
}

.home .hero-calc .calc-top {
  margin-bottom: 14px;
  gap: 12px;
}

.home .hero-calc .segmented {
  display: flex;
  flex: 1 1 100%;
  justify-content: stretch;
}

.home .hero-calc .segmented button {
  flex: 1 1 0;
  padding: 8px 0;
  font-size: 0.84rem;
  text-align: center;
}

.home .hero-calc .age-row {
  gap: 10px;
}

.home .hero-calc .field-block {
  margin-top: 14px;
}

.home .hero-calc .size-grid {
  gap: 6px;
}

.home .hero-calc .size-option > span {
  padding: 9px 4px;
  align-items: center;
  border-radius: 11px;
}

.home .hero-calc .size-name {
  font-size: 0.8rem;
}

.home .hero-calc .size-option input:checked + span::after {
  display: none;
}

.home .hero-calc .calc-actions {
  margin-top: 14px;
}

/* result panel: stacked so the number never overflows a 500px column */
.home .hero-calc .result {
  margin-top: 16px;
  padding: 16px 16px 14px;
  border-radius: 15px;
}

.home .hero-calc .result-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.home .hero-calc .result-number {
  font-size: clamp(2.6rem, 5.4vw, 3.15rem);
}

.home .hero-calc .result-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home .hero-calc .result-meta > div,
.home .hero-calc .result-meta > div:first-child {
  display: block;
  padding: 0;
  border-bottom: 0;
}

.home .hero-calc .result-meta span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home .hero-calc .result-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  line-height: 1.3;
  text-align: left;
}

.home .hero-calc .pace-note {
  margin-top: 12px;
  padding-left: 10px;
  font-size: 0.78rem;
  line-height: 1.5;
}

/* kitten mode only needs one field */
.calc[data-pet="kitten"] .field-years {
  display: none;
}

/* --- dedicated calculator cards --- */

.home-chooser {
  padding-top: clamp(26px, 3.4vw, 42px);
}

.home-chooser .chooser-grid {
  margin-top: 24px;
}

.home-chooser .chooser-card {
  padding: 22px;
  gap: 8px;
}

.home-chooser .chooser-card h2 {
  font-size: 1.15rem;
  line-height: 1.25;
}

.home-chooser .chooser-card p {
  font-size: 0.875rem;
  line-height: 1.55;
}

.home-chooser .chooser-more {
  padding-top: 10px;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .home .hero-split {
    grid-template-columns: 1fr;
  }

  .home .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .home .hero-calc {
    padding: 15px;
  }

  .home .hero-calc .calc-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .home .hero-calc .segmented {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* ------------------------------------------------------------------
   Header: Tools dropdown
   ------------------------------------------------------------------ */

.nav-drop {
  position: relative;
}

.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  font-family: var(--sans);
  cursor: pointer;
}

.nav-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.18s ease;
}

.nav-drop.is-open .nav-chevron {
  transform: rotate(180deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 90;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  width: 560px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 70px -30px rgba(35, 23, 120, 0.38), 0 2px 6px rgba(35, 23, 120, 0.05);
  transform: translateX(-50%);
  text-align: left;
}

/* invisible bridge so the menu stays open while the pointer crosses the gap */
.nav-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-drop.is-open .nav-menu {
  display: grid;
}

@media (hover: hover) and (pointer: fine) {
  .nav-drop:hover .nav-menu {
    display: grid;
  }

  .nav-drop:hover .nav-chevron {
    transform: rotate(180deg);
  }
}

.nav-menu-group {
  display: grid;
  align-content: start;
  gap: 2px;
}

.nav-menu-label {
  margin: 2px 10px 6px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-menu a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: var(--bg-soft);
  outline: none;
}

.nav-menu a[aria-current="page"] {
  background: var(--bg-lav);
}

.nav-menu-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-lav);
  color: var(--purple);
}

.nav-menu-icon svg {
  width: 17px;
  height: 17px;
}

.nav-menu a[aria-current="page"] .nav-menu-icon {
  background: var(--grad);
  color: #fff;
}

.nav-menu-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.nav-menu-desc {
  display: block;
  margin-top: 1px;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Tool pages: switcher tabs + workspace hero
   ------------------------------------------------------------------ */

.tool-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 26px -20px rgba(35, 23, 120, 0.4);
  overflow-x: auto;
  scrollbar-width: none;
}

.tool-tabs::-webkit-scrollbar {
  display: none;
}

.tool-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.tool-tabs a svg {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.tool-tabs a:hover,
.tool-tabs a:focus-visible {
  background: var(--bg-soft);
  color: var(--purple);
  outline: none;
}

.tool-tabs a[aria-current="page"] {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(91, 76, 245, 0.8);
}

.tool-tabs a[aria-current="page"] svg {
  opacity: 1;
}

.tool-tabs-divider {
  flex: none;
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--line-strong);
}

.hero--tool {
  text-align: left;
  padding-top: clamp(22px, 3vw, 34px);
}

.hero--tool h1,
.hero--chart.hero--tool h1 {
  margin: 0 0 10px;
  max-width: 860px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero--tool h1 .grad-text {
  display: inline;
  margin: 0;
}

.hero--tool .lede {
  margin: 0;
  max-width: 720px;
  font-size: 0.98rem;
}

.hero--tool .hero-note {
  margin-left: 0;
}

.hero--tool .calc {
  max-width: none;
  margin-top: 24px;
}

.hero--tool .calc--compact {
  margin-top: 20px;
}

/* full calculators: inputs left, result right */
@media (min-width: 961px) {
  .hero--tool .calc:not(.calc--compact) {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    column-gap: clamp(22px, 3vw, 34px);
    align-items: start;
  }

  .hero--tool .calc:not(.calc--compact) > .calc-top {
    grid-column: 1 / -1;
  }

  .hero--tool .calc:not(.calc--compact) > form {
    grid-column: 1;
  }

  .hero--tool .calc:not(.calc--compact) > .result {
    grid-column: 2;
    margin-top: 0;
  }

  .hero--tool .calc:not(.calc--compact) .result-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

/* switchable calculator (/tools/) */
.kitten-hint {
  display: none;
  margin-top: 10px;
}

.calc[data-pet="kitten"] .kitten-hint {
  display: block;
}

.calc[data-pet="kitten"] .age-row {
  grid-template-columns: 1fr;
}

.calc:not([data-species]):not([data-pet="kitten"]) .result-extras {
  display: none;
}

@media (max-width: 960px) {
  /* anchor the menu to the sticky header so it spans the page width */
  .nav-drop {
    position: static;
  }

  .nav-menu {
    top: calc(100% - 2px);
    left: 24px;
    transform: none;
    width: min(560px, calc(100vw - 48px));
  }

  .nav-menu::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-menu {
    left: 16px;
    grid-template-columns: 1fr;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }

  .tool-tabs {
    width: auto;
    margin-left: -2px;
    margin-right: -2px;
  }

  .tool-tabs a {
    padding: 7px 11px;
    font-size: 0.8rem;
  }
}
