:root {
  --page: #f7f4ec;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #fffef9;
  --border: rgba(92, 84, 48, 0.14);
  --ink: #24311f;
  --muted: #596152;
  --accent: #5f7d42;
  --accent-soft: rgba(95, 125, 66, 0.12);
  --accent-blue: #4f8eb5;
  --accent-blue-soft: rgba(79, 142, 181, 0.12);
  --accent-amber: #c88915;
  --accent-amber-soft: rgba(200, 137, 21, 0.12);
  --shadow: 0 22px 55px rgba(66, 60, 34, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(163, 186, 138, 0.18), transparent 24rem),
    radial-gradient(circle at top right, rgba(230, 199, 136, 0.18), transparent 24rem),
    linear-gradient(180deg, #fcfbf7 0%, var(--page) 100%);
}

main {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

h1,
h2,
h3,
strong {
  letter-spacing: -0.02em;
}

p,
li,
summary,
button,
input,
table,
span,
label {
  font-family: "Inter", "Segoe UI", sans-serif;
}

section {
  margin-bottom: 1rem;
}

.hero,
.tool-shell,
.method-section,
.examples-section,
.faq-section,
.footer-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  padding: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.85rem, 6vw, 4.7rem);
  line-height: 0.94;
}

.lead {
  margin: 0.9rem 0 0;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  color: #3f4938;
  max-width: 44rem;
}

.support-copy {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 43rem;
}

.review-note {
  align-self: start;
  padding: 1.25rem 1.35rem;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 1px solid rgba(200, 137, 21, 0.22);
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(255, 252, 244, 0.96));
}

.review-note h2 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  color: #9b5d05;
}

.review-note p {
  margin: 0;
  line-height: 1.65;
  color: #5f5237;
}

.tool-shell {
  padding: 1.4rem;
}

.console-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.control-group {
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(92, 84, 48, 0.1);
  border-radius: var(--radius-lg);
}

.control-group h2 {
  margin: 0 0 0.9rem;
  font-size: 1.1rem;
}

.age-entry {
  display: flex;
  gap: 0.8rem;
  align-items: stretch;
}

.field-card {
  flex: 1;
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.field-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

input {
  border: none;
  background: transparent;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  padding: 0;
  outline: none;
}

.field-hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.toggle-group {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.toggle,
.size-chip,
.example-chip,
.secondary-action,
.primary-action {
  border-radius: var(--radius-md);
  border: 1px solid rgba(92, 84, 48, 0.14);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.toggle {
  min-width: 6.2rem;
  padding: 0.85rem 1rem;
  font-weight: 700;
}

.toggle.active,
.size-chip.active,
.comparison-card.active {
  background: linear-gradient(180deg, rgba(103, 134, 70, 0.14), rgba(103, 134, 70, 0.08));
  border-color: rgba(95, 125, 66, 0.58);
  box-shadow: 0 12px 24px rgba(95, 125, 66, 0.12);
}

.size-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.size-chip {
  text-align: left;
  padding: 0.9rem 1rem;
}

.size-chip strong,
.size-chip span {
  display: block;
}

.size-chip span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.method-group .toggle {
  min-width: 8rem;
}

.action-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.7rem;
  justify-content: flex-start;
  align-items: center;
}

.primary-action,
.secondary-action {
  padding: 0.95rem 1.25rem;
  font-weight: 700;
}

.primary-action {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 14px 28px rgba(95, 125, 66, 0.22);
}

.toggle:hover,
.size-chip:hover,
.example-chip:hover,
.secondary-action:hover,
.primary-action:hover {
  transform: translateY(-1px);
}

.results-shell {
  margin-top: 1.15rem;
}

.status-row {
  margin-bottom: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.status-row .error {
  color: #a03b24;
}

.result-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-card {
  min-height: 13rem;
  padding: 1.3rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(92, 84, 48, 0.1);
  border-radius: var(--radius-lg);
}

.accent-blue {
  background: linear-gradient(180deg, rgba(79, 142, 181, 0.1), rgba(255, 255, 255, 0.78));
}

.accent-amber {
  background: linear-gradient(180deg, rgba(200, 137, 21, 0.1), rgba(255, 255, 255, 0.78));
}

.card-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-card strong {
  display: block;
  margin-top: 0.7rem;
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  line-height: 1.04;
}

.result-card p:last-child {
  margin: 0.8rem 0 0;
  color: #3f473a;
  line-height: 1.6;
}

.comparison-strip,
.timeline-panel {
  margin-top: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(92, 84, 48, 0.1);
  border-radius: var(--radius-lg);
}

.comparison-strip {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(150px, 0.7fr)) minmax(220px, 1fr);
  align-items: stretch;
}

.comparison-strip h2,
.timeline-panel h2,
.examples-section h2,
.faq-section h2,
.footer-note h2 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
}

.comparison-strip p,
.comparison-strip span {
  margin: 0;
}

.comparison-card {
  padding: 1rem;
  border: 1px solid rgba(92, 84, 48, 0.12);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.comparison-card p {
  color: var(--muted);
}

.comparison-card strong {
  display: block;
  margin: 0.55rem 0 0.35rem;
  font-size: 1.5rem;
}

.comparison-card span,
.comparison-note p {
  color: #4c5547;
  line-height: 1.55;
}

.comparison-note {
  align-self: center;
}

.timeline-header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.timeline-footnote {
  max-width: 22rem;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-line {
  height: 4px;
  margin: 1.4rem 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6b8b47 0%, #d2b227 45%, #d7651d 78%, #ca3d34 100%);
}

.timeline-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0.7rem;
}

.timeline-stop {
  position: relative;
  padding-top: 1rem;
}

.timeline-stop::before {
  content: "";
  position: absolute;
  top: -1.1rem;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid currentColor;
}

.timeline-stop strong {
  display: block;
  font-size: 1.05rem;
}

.timeline-stop span,
.timeline-stop small {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  line-height: 1.45;
}

.timeline-stop[data-stage-key="puppy"] {
  color: #6b8b47;
}

.timeline-stop[data-stage-key="young-adult"] {
  color: #6f8637;
}

.timeline-stop[data-stage-key="adult"] {
  color: #9b8b16;
}

.timeline-stop[data-stage-key="mature"] {
  color: #c46e17;
}

.timeline-stop[data-stage-key="senior"] {
  color: #cf561f;
}

.timeline-stop[data-stage-key="geriatric"] {
  color: #ca3d34;
}

.timeline-stop.active::before {
  box-shadow: 0 0 0 8px rgba(95, 125, 66, 0.08);
}

.timeline-stop.active strong {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.2em;
}

.example-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.example-chip {
  padding: 0.85rem 1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.8);
}

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

.content-grid article,
.method-section,
.examples-section,
.faq-section,
.footer-note {
  padding: 1.5rem;
}

.content-grid article {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(92, 84, 48, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.content-grid p,
.method-section p,
.examples-note,
.faq-list p,
.footer-note p,
.check-list li {
  color: #424b3d;
  line-height: 1.72;
}

.method-section {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
}

.check-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
}

.check-list li + li {
  margin-top: 0.6rem;
}

.examples-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: 0.95rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(92, 84, 48, 0.11);
}

th {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.examples-note {
  margin: 1rem 0 0;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

details {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(92, 84, 48, 0.11);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
}

summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

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

details[open] {
  background: rgba(95, 125, 66, 0.06);
  border-color: rgba(95, 125, 66, 0.22);
}

details p {
  margin: 0.8rem 0 0;
}

@media (max-width: 980px) {
  .hero,
  .console-grid,
  .result-card-grid,
  .content-grid,
  .method-section,
  .comparison-strip {
    grid-template-columns: 1fr;
  }

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

  .timeline-line {
    display: none;
  }
}

@media (max-width: 720px) {
  main {
    width: min(100vw - 1rem, 100%);
    padding: 0.5rem 0 2rem;
  }

  .hero,
  .tool-shell,
  .method-section,
  .examples-section,
  .faq-section,
  .footer-note,
  .content-grid article {
    border-radius: 22px;
  }

  .hero,
  .tool-shell,
  .method-section,
  .examples-section,
  .faq-section,
  .footer-note,
  .content-grid article {
    padding: 1.15rem;
  }

  .age-entry,
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .result-card strong {
    font-size: 1.9rem;
  }
}
