/* ==========================================================================
   Animal lifespan timeline
   Light, airy palette: warm white, pale sky blue and muted sage.
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-soft: #f6f2ea;
  --line: #e8e2d7;
  --line-soft: #f0ebe2;

  --ink: #1e2a2f;
  --ink-2: #47555a;
  --ink-3: #5f6c70;

  --sky-50: #f1f7fb;
  --sky-100: #e1eff8;
  --sky-200: #c6e0f0;
  --sky-300: #a7cfe6;
  --sky-500: #5d9cc4;
  --sky-700: #2f6a8f;

  --sage-50: #f2f6f0;
  --sage-100: #e2ecdf;
  --sage-200: #cadcc5;
  --sage-300: #a9c4a3;
  --sage-500: #6f9672;
  --sage-700: #44684a;

  --sand: #dcc391;
  --sand-deep: #c7a66a;

  --danger: #a5463b;
  --danger-bg: #fbefec;

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(30, 42, 47, .04);
  --shadow: 0 1px 2px rgba(30, 42, 47, .04), 0 10px 30px -12px rgba(30, 42, 47, .12);
  --shadow-lift: 0 2px 4px rgba(30, 42, 47, .05), 0 18px 40px -16px rgba(47, 106, 143, .25);

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --portrait: 52px;
  --gutter: 16px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--sky-700); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--sky-300);
  outline-offset: 2px;
  border-radius: 8px;
}

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

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 50;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Page frame ---------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

.intro { max-width: 34rem; margin: 0 0 22px; }
.intro h1 { font-size: clamp(1.6rem, 6.4vw, 2.5rem); }
.intro__lede { margin-top: 10px; color: var(--ink-2); font-size: 1rem; }

.layout { display: grid; gap: 18px; }
.panel { display: grid; gap: 16px; align-content: start; min-width: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}

/* ---------- Age form ---------- */

.age-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.age-form legend { padding: 0; margin-bottom: 12px; }

.age-fields { display: flex; flex-wrap: wrap; gap: 10px 18px; }

.age-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: text;
}

.age-field input {
  width: 4.6rem;
  height: 54px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  font: 600 1.5rem/1 var(--font-serif);
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.age-field input::placeholder { color: #b9b2a6; font-weight: 400; }
.age-field input:hover { border-color: var(--sky-200); }
.age-field input:focus {
  outline: none;
  border-color: var(--sky-500);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--sky-100);
}
.age-field input[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.age-field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px #f5dcd7; }

.age-field__unit { color: var(--ink-2); font-size: 1rem; line-height: 1.2; }
.age-field__optional { display: block; font-size: .75rem; color: var(--ink-3); }

.age-hint { margin-top: 12px; font-size: .875rem; color: var(--ink-3); }

.age-error {
  font-size: .9rem;
  color: var(--danger);
  font-weight: 500;
}
.age-error:not(:empty) { margin-top: 8px; }
.age-error--soft { color: var(--sky-700); font-weight: 400; }

/* ---------- Summary ---------- */

.summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.summary__empty { color: var(--ink-3); font-size: .95rem; }

.summary__row { display: flex; align-items: baseline; gap: 12px; }
.summary__count {
  font: 600 2.75rem/1 var(--font-serif);
  color: var(--sage-700);
  font-variant-numeric: tabular-nums;
  min-width: 1.2ch;
}
.summary__count.is-updated { animation: pop .45s var(--ease); }
.summary__label { color: var(--ink-2); line-height: 1.35; }
.summary__label strong { color: var(--ink); font-weight: 600; }
.summary__note { margin-top: 10px; font-size: .875rem; color: var(--ink-3); }

@keyframes pop {
  0% { transform: translateY(4px); opacity: .3; }
  100% { transform: none; opacity: 1; }
}

.jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  background: var(--sky-50);
  color: var(--sky-700);
  font-weight: 600;
  font-size: .925rem;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.jump:hover { background: var(--sky-100); border-color: var(--sky-300); }
.jump:active { transform: translateY(1px); }
.jump[hidden] { display: none; }

/* ---------- Next milestone card ---------- */

.next-card { position: relative; overflow: hidden; }
.next-card::before {
  /* soft sky wash behind the featured animal */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 150px;
  background: radial-gradient(120% 100% at 50% 0%, var(--sky-50) 0%, rgba(241, 247, 251, 0) 75%);
  pointer-events: none;
}
.next-card > * { position: relative; }

.next-card__placeholder { margin-top: 10px; color: var(--ink-3); }

.next-card__content { animation: fade-in .5s var(--ease); }

.feature {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.feature .portrait { --size: 92px; flex: none; }
.feature__name { font-size: clamp(1.45rem, 6vw, 1.8rem); }
.feature__meta { margin-top: 6px; color: var(--ink-2); font-size: .95rem; }
.feature__meta .chip { margin-top: 8px; }
.t-details__note strong { color: var(--ink); font-weight: 600; }
.feature__credit {
  margin-top: 10px;
  font-size: .72rem;
  line-height: 1.4;
  color: var(--ink-3);
}
.feature__credit a { color: inherit; text-decoration-color: var(--line); }
.feature__credit a:hover { color: var(--sky-700); }

.countdown {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.countdown__time {
  font: 600 1.3rem/1.25 var(--font-serif);
  color: var(--ink);
}
.countdown__when { margin-top: 4px; color: var(--ink-2); font-size: .925rem; }

.progress { margin-top: 14px; }
.progress__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--sky-100);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage-300), var(--sky-300));
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  transition: transform .9s var(--ease);
}
.progress__text { margin-top: 8px; font-size: .85rem; color: var(--ink-2); line-height: 1.4; }

.next-card__then { margin-top: 14px; font-size: .9rem; color: var(--ink-2); }
.next-card__then strong { color: var(--ink); font-weight: 600; }

.approx {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: .825rem;
  color: var(--ink-3);
  line-height: 1.45;
}
.approx svg { flex: none; margin-top: 1px; color: var(--sky-500); }

.done-note { margin-top: 14px; color: var(--ink-2); }

/* ---------- Hourglass ---------- */

.hourglass { width: 76px; height: auto; display: block; overflow: visible; }
.hourglass__frame { fill: var(--sage-300); }
.hourglass__post { stroke: var(--sage-300); stroke-width: 2.5; stroke-linecap: round; }
.hourglass__glass { fill: rgba(255, 255, 255, .7); stroke: var(--sky-300); stroke-width: 1.6; }
.hourglass__shine { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .9; }
.hourglass__sand { fill: var(--sand); }
.hourglass__sand-top,
.hourglass__sand-bottom {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform 1.1s var(--ease);
}
.hourglass__stream {
  stroke: var(--sand-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1.5 4.5;
  animation: sand-fall 1.1s linear infinite;
}
.hourglass.is-idle .hourglass__stream { display: none; }
.hourglass__grain { fill: var(--sand-deep); }

@keyframes sand-fall { to { stroke-dashoffset: -12; } }

/* ---------- Chips ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  background: var(--surface-soft);
  color: var(--ink-2);
}
.chip--captive { background: var(--sky-50); color: var(--sky-700); }
.chip--wild { background: var(--sage-50); color: var(--sage-700); }

/* ---------- Portraits (photo with lettered fallback) ---------- */

.portrait {
  --size: var(--portrait);
  --tint-a: var(--sky-100);
  --tint-b: var(--sky-200);
  --tint-ink: var(--sky-700);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, 0) 55%),
    linear-gradient(145deg, var(--tint-a), var(--tint-b));
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--ring, var(--line)), var(--shadow-sm);
  flex: none;
  isolation: isolate;
}
.portrait--sage {
  --tint-a: var(--sage-100);
  --tint-b: var(--sage-200);
  --tint-ink: var(--sage-700);
}
.portrait::before {
  content: attr(data-initial);
  font: 600 calc(var(--size) * .42)/1 var(--font-serif);
  color: var(--tint-ink);
  opacity: .85;
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease), filter .5s var(--ease);
}
.portrait img.is-loaded { opacity: 1; }
.portrait__badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--sage-500);
  color: #fff;
  box-shadow: 0 0 0 2px var(--surface);
  z-index: 1;
}

/* ---------- Timeline ---------- */

.timeline-section { min-width: 0; }

.timeline-head { padding: 6px 4px 14px; }
.timeline-head h2 { font-size: 1.5rem; }
.timeline-head h2:focus { outline: none; }
.timeline-head__sub { margin-top: 6px; color: var(--ink-2); font-size: .925rem; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: .8rem;
  color: var(--ink-3);
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend__dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend__dot--passed { background: var(--sage-500); }
.legend__dot--you { background: var(--surface); box-shadow: inset 0 0 0 3px var(--sky-700); }
.legend__dot--next { background: var(--sky-300); box-shadow: 0 0 0 3px var(--sky-100); }
.legend__dot--ahead { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--sky-300); }

.timeline-body {
  position: relative;
  padding: 8px 6px 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .35));
  border: 1px solid var(--line-soft);
}

.timeline-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.timeline-path path { fill: none; stroke-width: 2; stroke-linecap: round; }
.timeline-path .seg--done { stroke: var(--sage-500); }
.timeline-path .seg--ahead { stroke: var(--sky-300); }
.timeline-path .seg--gap { stroke-dasharray: .1 7; stroke-width: 2.6; }

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.t-item { position: relative; }
.t-item + .t-item { margin-top: 6px; }
.t-item.has-gap { padding-top: var(--gap-space, 0px); }

.t-gap {
  position: absolute;
  top: calc(var(--gap-space, 0px) / 2 - 11px);
  left: calc(var(--portrait) + 30px);
  font-size: .75rem;
  font-style: italic;
  color: var(--ink-3);
  line-height: 22px;
  white-space: nowrap;
}

.t-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 6px 10px 6px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color .25s var(--ease);
}
.t-row:hover { background: rgba(225, 239, 248, .45); }
.t-row:focus-visible { outline-offset: -2px; }

.t-row__text { flex: 1; min-width: 0; }
.t-row__name {
  display: block;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.t-row__meta {
  display: block;
  margin-top: 2px;
  font-size: .85rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.t-row__status {
  flex: none;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  display: none;
}

.t-row__chevron {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  transition: transform .3s var(--ease), background-color .2s var(--ease);
}
.t-row[aria-expanded="true"] .t-row__chevron { transform: rotate(180deg); background: var(--sky-50); }

.t-details {
  margin: 2px 10px 10px calc(var(--portrait) + 34px);
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  font-size: .9rem;
  color: var(--ink-2);
  animation: fade-in .35s var(--ease);
}
.t-details[hidden] { display: none; }
.t-details__sci { font-style: italic; color: var(--ink-3); }
.t-details__status { margin-top: 8px; color: var(--ink); }
.t-details__note { margin-top: 8px; }
.t-details__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 10px;
  font-size: .85rem;
}
.t-details__links a { display: inline-flex; align-items: center; min-height: 44px; }
.t-details__credit { color: var(--ink-3); font-size: .8rem; }
a.t-details__credit { color: var(--ink-3); text-decoration-color: var(--line); }
a.t-details__credit:hover { color: var(--sky-700); }

/* Birth start point */
.t-start .t-row { cursor: default; }
.t-start .t-row:hover { background: transparent; }
.t-dot {
  width: var(--portrait);
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
}
.t-dot::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sage-500);
  box-shadow: 0 0 0 4px var(--surface);
}
.timeline:not(.has-age) .t-dot::before { background: var(--sky-300); }
.t-start .t-row { min-height: 44px; }

/* States */
.t-item.is-passed .portrait { --ring: var(--sage-300); }
.t-item.is-passed .portrait img { filter: saturate(.75); }
.t-item.is-passed .portrait::before { opacity: .6; }
.t-item.is-passed .portrait__badge { display: grid; }
.t-item.is-passed .t-row__name { color: var(--ink-2); }
.t-item.is-passed .t-row__status { display: inline-block; background: var(--sage-50); color: var(--sage-700); }

.t-item.is-ahead .portrait { --ring: var(--sky-200); }

.t-item.is-next .portrait {
  --ring: var(--sky-500);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ring), 0 6px 18px -6px rgba(47, 106, 143, .45);
}
.t-item.is-next .portrait::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid var(--sky-200);
  animation: halo 2.8s var(--ease) infinite;
  z-index: -1;
}
.t-item.is-next .t-row { background: var(--sky-50); }
.t-item.is-next .t-row:hover { background: var(--sky-100); }
.t-item.is-next .t-row__status { display: inline-block; background: var(--sky-100); color: var(--sky-700); }

@keyframes halo {
  0% { transform: scale(.92); opacity: 0; }
  35% { opacity: .9; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* "You are here" row */
.t-you {
  margin-top: var(--you-above, 10px) !important;
  margin-bottom: var(--you-below, 10px);
}
.t-you + .t-item { margin-top: 0; }
.t-you__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  min-height: 36px;
}
.t-you__dot {
  width: var(--portrait);
  display: grid;
  place-items: center;
  flex: none;
}
.t-you__dot::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 4px var(--sky-700), 0 0 0 4px var(--surface), 0 0 0 9px rgba(167, 207, 230, .45);
  animation: breathe 3.2s ease-in-out infinite;
}
.t-you__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sky-700);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
  scroll-margin: 40vh 0;
}
.t-you__label span { font-weight: 400; opacity: .9; }

@keyframes breathe {
  0%, 100% { box-shadow: inset 0 0 0 4px var(--sky-700), 0 0 0 4px var(--surface), 0 0 0 9px rgba(167, 207, 230, .45); }
  50% { box-shadow: inset 0 0 0 4px var(--sky-700), 0 0 0 4px var(--surface), 0 0 0 13px rgba(167, 207, 230, .2); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- About ---------- */

.about { margin-top: 32px; max-width: 820px; margin-left: auto; margin-right: auto; }
.about__details {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.about__details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: var(--radius-lg);
}
.about__details summary::-webkit-details-marker { display: none; }
.about__details summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .3s var(--ease);
  opacity: .6;
}
.about__details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.about__body { padding: 0 20px 22px; color: var(--ink-2); font-size: .925rem; max-width: 46rem; }
.about__body h3 { font-size: 1.05rem; color: var(--ink); margin: 18px 0 6px; }
.about__body h3:first-child { margin-top: 4px; }
.about__body p + p { margin-top: 8px; }

.footer { margin-top: 24px; text-align: center; font-size: .825rem; color: var(--ink-3); }

.noscript { max-width: 30rem; margin: 0 auto 40px; padding: 0 16px; color: var(--ink-2); }

/* ---------- Mini bar (small screens) ---------- */

.mini-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right), calc((100% - 1120px) / 2 + var(--gutter))) 8px max(var(--gutter), env(safe-area-inset-left), calc((100% - 1120px) / 2 + var(--gutter)));
  background: rgba(251, 248, 243, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transform: translateY(-110%);
  transition: transform .35s var(--ease);
}
.mini-bar.is-visible { transform: none; }
.mini-bar[hidden] { display: none; }
.mini-bar__text {
  min-width: 0;
  font-size: .875rem;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-bar__text strong { color: var(--ink); }
.mini-bar__edit {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  background: var(--surface);
  color: var(--sky-700);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
}

/* ---------- Larger screens ---------- */

@media (max-width: 599px) {
  /* the check badge already marks passed animals on small screens */
  .t-item.is-passed .t-row__status { display: none; }
}

@media (max-width: 359px) {
  .card { padding: 18px 16px; }
  .age-fields { gap: 10px 12px; }
  .age-field { gap: 8px; }
  .age-field input { width: 3.9rem; }
  .feature .portrait { --size: 76px; }
}

@media (min-width: 600px) {
  :root { --portrait: 58px; --gutter: 28px; }
  .card { padding: 24px; }
  .feature .portrait { --size: 108px; }
  .hourglass { width: 84px; }
  .t-row { min-height: 72px; }
}

@media (min-width: 960px) {
  :root { --portrait: 60px; --gutter: 40px; }
  .page { padding-top: 56px; }
  .intro { margin-bottom: 36px; }
  .layout { gap: 56px; }
  .panel {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 24px;
    align-items: start;
  }
  .card { padding: 28px; }
  .timeline-section { width: 100%; max-width: 820px; margin: 0 auto; }
  .timeline-head { padding-top: 0; }
  .timeline-body { padding: 14px 14px 18px; }
  .t-row { padding: 8px 16px; gap: 18px; }
  .t-gap { left: calc(var(--portrait) + 50px); }
  .t-details { margin-left: calc(var(--portrait) + 50px); margin-right: 16px; }
  .t-you__row { padding: 0 16px; gap: 18px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .t-item.is-next .portrait::after { display: none; }
  .hourglass__stream { stroke-dasharray: none; opacity: .7; }
}
