/* Puplr puppy timeline: /puppy-timeline and the try first preview on /my-dog.
 * Tokens come from styles.css, so light and dark both work without a second
 * set of rules here. Phone first; the wide rules only add columns. */

.tl-form { margin-top: 1rem; }
.tl-form .seg label { padding: 0.34rem 0.5rem; }
.tl-country { margin: 0 0 0.2rem; }
.tl-go { margin: 1rem 0 0; }
.tl-output:empty { display: none; }
.tl-empty-panel { margin-top: 1rem; }

/* The age and the progress line */
.tl-hero { margin-top: 1.4rem; }
.tl-hero .eyebrow { margin-bottom: 0.5rem; }
.tl-age {
  margin: 0 0 0.35rem; font-size: clamp(1.6rem, 1.25rem + 1.8vw, 2.3rem);
  letter-spacing: -0.025em; line-height: 1.12;
}
.tl-age:focus { outline: none; }
.tl-age:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
.tl-meta { margin: 0 0 1rem; color: var(--ink-soft); font-size: 0.93rem; }

.tl-progress { margin: 0.4rem 0 0.2rem; }
.tl-bar {
  position: relative; height: 14px; border-radius: 999px; overflow: hidden;
  background: var(--surface-alt); border: 1px solid var(--line);
}
.tl-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: var(--brand);
}
.tl-bar-band {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(135deg, var(--brand-soft) 0 6px, var(--brand-line) 6px 9px);
}
.tl-bar-labels {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.4rem;
  font-size: 0.82rem; color: var(--ink-soft);
}
.tl-bar-labels span:first-child { white-space: nowrap; }
.tl-bar-labels span:last-child { text-align: right; }
.tl-bar-note { margin: 0.4rem 0 0; }
.tl-actions { margin: 1.1rem 0 0; }
.tl-actions .btn { flex: 1 1 auto; }
/* The share kit row: a real box (not display: contents), so it wraps inside the hero on a phone. */
.tl-share-slot { display: flex; flex: 1 1 100%; min-width: 0; max-width: 100%; }
.tl-share-slot .ps-row { width: 100%; }
@media (min-width: 620px) { .tl-actions .btn { flex: 0 0 auto; } }

/* Sections */
.tl-sec { margin: 2rem 0 0; }
.tl-sec > h2 { margin: 0 0 0.2rem; }
.tl-sub { margin: 0 0 0.9rem; }
.tl-h3, .tl-month { font-size: 1rem; margin: 1.3rem 0 0.5rem; color: var(--ink-soft); }
.tl-empty { margin: 0.4rem 0; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--surface-alt); }
.tl-link {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--brand-strong); text-decoration: underline; text-underline-offset: 2px;
  min-height: 24px;
}

/* Happening now */
.tl-chips { list-style: none; padding: 0; margin: 0 0 0.8rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tl-chips li {
  display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
  padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.88rem; font-weight: 620;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-line);
}
.tl-chip-until { font-weight: 500; }

/* Dated rows */
.tl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.tl-ev {
  display: grid; grid-template-columns: 3.1rem 1.6rem minmax(0, 1fr); gap: 0.55rem; align-items: start;
  padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.tl-ev.is-now { border-color: var(--brand-line); background: var(--brand-soft); }
.tl-ev.is-past { background: var(--surface-alt); border-style: dashed; }
.tl-ev.is-past .tl-ev-title { color: var(--ink-soft); }
.tl-ev-date {
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  padding: 0.3rem 0; border-radius: 8px; background: var(--surface-alt); color: var(--ink);
}
.tl-ev-date b { font-size: 1.15rem; font-weight: 750; }
.tl-ev-date span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-top: 0.15rem; }
.tl-ev-icon { font-size: 1.15rem; line-height: 1.6; text-align: center; }
.tl-ev-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.tl-ev-title { font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.tl-ev-sub { font-size: 0.83rem; color: var(--ink-soft); line-height: 1.45; overflow-wrap: anywhere; }
.tl-ev .pill { font-size: 0.72rem; vertical-align: 1px; }

/* When can my puppy... */
.tl-q {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  margin: 0 0 0.6rem; overflow: hidden;
}
.tl-q > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 2rem minmax(0, 1fr) 1rem;
  gap: 0.6rem; align-items: start; padding: 0.85rem 0.9rem; min-height: 44px;
}
.tl-q > summary::-webkit-details-marker { display: none; }
.tl-q > summary::after {
  content: ""; width: 0.55rem; height: 0.55rem; margin-top: 0.45rem;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
}
.tl-q[open] > summary::after { transform: rotate(225deg); margin-top: 0.7rem; }
.tl-q > summary:hover { background: var(--surface-alt); }
.tl-q > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tl-q-icon { font-size: 1.35rem; line-height: 1.3; text-align: center; }
.tl-q-head { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.tl-q-title { font-weight: 700; line-height: 1.3; }
.tl-q-when { display: flex; flex-wrap: wrap; gap: 0.2rem 0.45rem; align-items: baseline; font-size: 0.9rem; margin: 0; }
.tl-q-pos { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; align-items: baseline; width: 100%; }
.tl-q-label { color: var(--ink-soft); }
.tl-q-date { font-weight: 700; color: var(--brand-ink); }
.tl-q-rel { color: var(--ink-soft); font-size: 0.85rem; }
.tl-q-body { padding: 0 0.95rem 0.95rem; border-top: 1px solid var(--line); font-size: 0.94rem; }
.tl-q-body > :first-child { margin-top: 0.85rem; }
.tl-q-body p { margin: 0 0 0.7rem; }
.tl-quote q { font-style: italic; }
.tl-pos { padding: 0.2rem 0 0.6rem; }
.tl-pos + .tl-pos { border-top: 1px dashed var(--line); padding-top: 0.8rem; }
.tl-pos h4 { margin: 0 0 0.35rem; font-size: 0.98rem; }
.tl-pos .tl-q-when { margin-bottom: 0.5rem; }
.tl-src { font-size: 0.83rem; color: var(--ink-soft); }
.tl-src-k { font-weight: 650; }
.tl-q-more { margin: 0.4rem 0 0; font-weight: 650; }
.tl-stages { margin: 0 0 0.7rem; padding-left: 1.2rem; }
.tl-stages li { margin-bottom: 0.5rem; }
.tl-stages p { margin: 0 0 0.25rem; }
.tl-stage-when .muted { font-size: 0.85rem; }

.tl-size-table { width: 100%; border-collapse: collapse; margin: 0.2rem 0 0.8rem; font-size: 0.9rem; }
.tl-size-table th, .tl-size-table td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tl-size-table th { font-weight: 650; width: 42%; }
.tl-size-table tr.is-mine { background: var(--brand-soft); }

/* The weekly card */
.tl-card-wrap {
  max-width: 22rem; margin: 0 auto 0.4rem; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--brand); aspect-ratio: 1080 / 1350;
}
.tl-card-img { display: block; width: 100%; height: auto; }
.tl-cardsec .btn-row { justify-content: center; }

.tl-save { margin-top: 2rem; }
.tl-save h2 { margin-top: 0; }

@media (prefers-reduced-motion: no-preference) {
  .tl-bar-fill { transition: width var(--dur-3) var(--ease); }
  .tl-q > summary::after { transition: transform var(--dur-1) var(--ease); }
}

@media print {
  .tl-actions, .tl-cardsec, .tl-save, .tl-form { display: none !important; }
  .tl-q-body { display: block !important; }
}

/* ------------------------------------------------------------------
 * /my-dog, try first. The preview sits where the account form used to
 * be; the account card moves under it as "Save it and get reminders".
 * ------------------------------------------------------------------ */
.md-try { margin: 0; }
.md-try h2 { margin: 0 0 0.3rem; font-size: 1.25rem; }
.md-try .field-grid { margin-bottom: 0.6rem; }
.md-try .btn-row { margin: 0.8rem 0 0.7rem; }
.md-try-out:empty { display: none; }
.md-try-out .tl-hero { margin-top: 1.2rem; }
.md-plan { margin: 2rem 0 0; }
.md-plan > h2 { margin: 0 0 0.2rem; }
.md-plan-more { margin: 0.9rem 0 0; font-weight: 650; }
.md-save { margin: 2rem 0 1.4rem; display: grid; gap: 1.2rem; }
@media (min-width: 900px) { .md-save { grid-template-columns: 1fr 1fr; align-items: start; gap: 3rem; } }
.md-save-copy h2 { margin: 0 0 0.4rem; }
.md-save-copy p { color: var(--ink-soft); }

/* The share kit row joins the hero buttons in line. */
.tl-share-slot .ps-mounted { margin: 0; }
@media (min-width: 620px) { .tl-share-slot { flex: 0 1 auto; } .tl-share-slot .ps-row { width: auto; } }
