/* ============================================================
   Tiana's Bayou Adventure refurbishment (Desk feature)
   Page uses _Layout (site.css Nightfall tokens: --paper, --paper-2, --ink, --ink-soft,
   --muted, --hair, --gold, --red, --display, --text, --space-*). Scoped under .tba; page
   links use `.tba :where(a)` so classed controls (the CTA, day bars, tips) keep their ink.
   Built on the house guide pattern: a real photo with a hanging tag, a stat row, and one
   tap-to-pick instrument. Signature: a bar per day left to ride, tap one for the answer.
   ============================================================ */

.tba {
  --tba-calm: oklch(78% 0.12 150);       /* bayou green, calm days */
  --tba-mid: oklch(80% 0.07 85);         /* candle cream, typical days */
  --tba-busy: oklch(70% 0.17 25);        /* busy days, downtime */
  --tba-party: oklch(76% 0.16 305);      /* party nights, violet like the castle */
  --tba-ease: cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--space-md) 20px var(--space-3xl);
}
.tba :where(a) { color: var(--gold); text-decoration: none; border-bottom: 1px solid oklch(84% 0.13 86 / 0.35); }
.tba :where(a:hover) { border-bottom-color: var(--gold); }
.tba :where(a:focus-visible), .tba :where(summary:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

/* ---- hero -------------------------------------------------------------- */
.tba-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(8px, 3vw, 40px) 0 clamp(32px, 5vw, 64px);
}
.tba-kicker { margin: 0; font-family: var(--text); font-size: 14px; font-weight: 600; color: var(--gold); }
.tba-h1 {
  margin: var(--space-md) 0 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(40px, 5.6vw, 70px); line-height: 1; letter-spacing: -0.025em;
  color: var(--ink); text-wrap: balance;
}
.tba-answer { margin: var(--space-lg) 0 0; max-width: 58ch; font-family: var(--text); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; color: var(--ink-soft); }
.tba-answer b { color: var(--ink); }
.tba-facts { display: flex; flex-wrap: wrap; gap: var(--space-sm) 0; margin: var(--space-xl) 0 0; padding: 0; }
.tba-facts > div { padding: 0 18px; border-left: 1px solid var(--hair); }
.tba-facts > div:first-child { padding-left: 0; border-left: 0; }
.tba-facts dt { font-family: var(--text); font-size: 13px; color: var(--muted); }
.tba-facts dd { margin: 2px 0 0; font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.tba-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); margin-top: var(--space-xl); }
.tba .tba-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px;
  border: 0; border-radius: 999px; background: var(--gold); color: var(--paper);
  font-family: var(--text); font-size: 16px; font-weight: 700;
  transition: transform 0.25s var(--tba-ease), background-color 0.2s;
}
.tba .tba-cta:hover { background: oklch(88% 0.12 88); transform: translateY(-2px); }
.tba .tba-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.tba .tba-cta span { transition: transform 0.3s var(--tba-ease); }
.tba .tba-cta:hover span { transform: translateY(3px); }
.tba-hero-note { font-size: 14px; color: var(--muted); }
.tba-byline { margin: var(--space-lg) 0 0; font-size: 14px; color: var(--muted); }

.tba-hero-fig { position: relative; margin: 0; padding: 0 0 0 clamp(12px, 3vw, 36px); }
.tba-hero-fig::before {
  content: ""; position: absolute; inset: -8% -6% 4% 2%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, oklch(62% 0.12 180 / 0.3), transparent 72%);
}
.tba-photo {
  position: relative; z-index: 1; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  transform: rotate(1.5deg);
  box-shadow: 0 10px 0 -2px oklch(18% 0.045 276), 0 3px 8px oklch(10% 0.03 278 / 0.55);
}
.tba-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
/* The refurbishment tag, hung on the photo like a maintenance tag on a rope. */
.tba-tag {
  position: absolute; z-index: 2; left: -6px; bottom: 14%;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 12px 18px 13px 34px;
  background: var(--gold); color: var(--paper);
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%);
  -webkit-mask: radial-gradient(circle 5px at 17px 50%, #0000 98%, #000);
          mask: radial-gradient(circle 5px at 17px 50%, #0000 98%, #000);
  transform-origin: 17px 50%; transform: rotate(-6deg);
  filter: drop-shadow(0 4px 4px oklch(10% 0.03 278 / 0.5));
}
.tba-tag-top, .tba-tag-foot { font-family: var(--text); font-size: 13px; font-weight: 700; line-height: 1.2; }
.tba-tag-big { font-family: var(--display); font-size: clamp(44px, 5vw, 60px); font-weight: 800; line-height: 0.95; letter-spacing: -0.02em; }
.tba-hero-fig figcaption { position: relative; z-index: 1; margin-top: 18px; text-align: right; font-size: 12.5px; color: var(--muted); }
.tba-hero-fig figcaption a { color: var(--muted); }

/* ---- the day picker ---------------------------------------------------- */
.tba-panel {
  scroll-margin-top: 80px;
  margin-top: var(--space-lg);
  padding: clamp(28px, 4vw, 52px) clamp(18px, 4vw, 52px);
  border-radius: 24px; border: 1px solid var(--hair);
  background: linear-gradient(180deg, var(--paper-2), oklch(22% 0.045 276));
  text-align: center;
}
.tba-panel h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.tba-panel-sub { margin: var(--space-sm) auto 0; max-width: 58ch; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }

.tba-days {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(18px, 1fr);
  gap: 5px; align-items: end;
  margin: var(--space-xl) 0 0; padding: 26px 2px 4px;
  overflow-x: auto; scrollbar-width: thin;
}
.tba .tba-day {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; grid-template-rows: 150px auto 14px; justify-items: center; gap: 6px;
  min-width: 18px; border-radius: 8px; padding: 0 1px;
  -webkit-tap-highlight-color: transparent;
}
.tba-day-bar { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.tba-day-bar i {
  width: 100%; max-width: 26px; height: max(10%, var(--h)); border-radius: 6px 6px 3px 3px;
  background: var(--c, var(--tba-mid)); opacity: 0.55;
  transition: opacity 0.2s, transform 0.3s var(--tba-ease), box-shadow 0.3s;
  transform-origin: bottom;
}
.tba-day.is-calm { --c: var(--tba-calm); }
.tba-day.is-mid { --c: var(--tba-mid); }
.tba-day.is-busy { --c: var(--tba-busy); }
/* Party nights wear a violet cap, the park closes early to day guests. */
.tba-day.is-party .tba-day-bar i { box-shadow: inset 0 5px 0 var(--tba-party); }
.tba-day-bar i { position: relative; }
.tba-day.is-last .tba-day-bar i::after {
  content: "Last"; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  font-family: var(--text); font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold);
}
.tba-day-n { font-family: var(--text); font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1; }
.tba-day-m { font-family: var(--text); font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1; opacity: 0.8; }
.tba .tba-day:hover .tba-day-bar i { opacity: 0.85; }
.tba .tba-day.is-on .tba-day-bar i { opacity: 1; transform: scaleY(1.04); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--c), 0 0 22px var(--c); }
.tba .tba-day.is-on.is-party .tba-day-bar i { box-shadow: inset 0 5px 0 var(--tba-party), 0 0 0 2px var(--paper), 0 0 0 4px var(--c), 0 0 22px var(--c); }
.tba .tba-day.is-on .tba-day-n { color: var(--ink); }
.tba .tba-day:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.tba-legend { list-style: none; padding: 0; margin: var(--space-md) 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.tba-legend li { display: inline-flex; align-items: center; gap: 7px; }
.tba-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tba-mid); }
.tba-legend i.is-calm { background: var(--tba-calm); }
.tba-legend i.is-busy { background: var(--tba-busy); }
.tba-legend i.is-party { background: var(--tba-party); }

.tba-detail { margin: var(--space-2xl) auto 0; max-width: 640px; }
.tba-detail-date { margin: 0; font-size: 15px; color: var(--ink-soft); }
.tba-detail-verdict { margin: 6px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1; letter-spacing: -0.02em; color: var(--gold); }
.tba-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: var(--space-md); }
.tba-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hair); background: oklch(100% 0 0 / 0.03); font-size: 13.5px; color: var(--ink-soft); }
.tba-chip b { color: var(--ink); margin-left: 4px; }
.tba-chip.is-party { border-color: oklch(76% 0.16 305 / 0.6); color: var(--tba-party); font-weight: 700; }
.tba-chip.is-best { border-color: oklch(78% 0.12 150 / 0.6); color: var(--tba-calm); font-weight: 700; }
.tba-chip[hidden] { display: none; }
.tba-detail-advice { margin: var(--space-md) auto 0; max-width: 56ch; font-size: 16px; line-height: 1.65; color: var(--ink-soft); }

/* ---- body -------------------------------------------------------------- */
.tba-body { max-width: 820px; margin: 0 auto; }
.tba-sec { margin-top: clamp(64px, 9vw, 104px); }
.tba-eyebrow { margin: 0; font-family: var(--text); font-size: 14px; font-weight: 600; color: var(--gold); }
.tba-sec h2 { margin: var(--space-xs) 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.tba-sec > p, .tba-foot { font-size: 17.5px; line-height: 1.7; color: var(--ink-soft); max-width: 66ch; margin-top: var(--space-md); }
.tba-note { font-size: 13.5px !important; color: var(--muted) !important; margin-top: var(--space-sm) !important; }

/* hours: one column per clock hour, height is the share running */
.tba-hours {
  list-style: none; padding: 20px 16px 14px; margin: var(--space-xl) 0 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px;
  border-radius: 18px; background: var(--paper-2); border: 1px solid var(--hair);
}
.tba-hours li { display: grid; grid-template-rows: 18px 150px 16px; justify-items: center; align-items: end; gap: 6px; }
.tba-hour-bar { width: 100%; max-width: 30px; height: calc(var(--r) * 100%); border-radius: 6px 6px 3px 3px; background: oklch(80% 0.07 85 / 0.45); }
.tba-hours li.is-best .tba-hour-bar { background: var(--tba-calm); }
.tba-hours li.is-worst .tba-hour-bar { background: var(--tba-busy); }
.tba-hour-val { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tba-hours li.is-best .tba-hour-val { color: var(--tba-calm); }
.tba-hours li.is-worst .tba-hour-val { color: var(--tba-busy); }
.tba-hour-t { font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* reliability ranking */
.tba-rank { list-style: none; padding: 0; margin: var(--space-xl) 0 0; display: grid; gap: 10px; }
.tba-rank li { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) 3.4rem 7.6rem; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; }
.tba-rank li.is-tiana { background: oklch(70% 0.17 25 / 0.1); border: 1px solid oklch(70% 0.17 25 / 0.35); }
.tba-rank-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.tba-rank-track { height: 10px; border-radius: 99px; background: oklch(100% 0 0 / 0.06); overflow: hidden; }
.tba-rank-track span { display: block; height: 100%; border-radius: inherit; background: oklch(80% 0.07 85 / 0.6); }
.tba-rank li.is-tiana .tba-rank-track span { background: var(--tba-busy); }
.tba-rank-up { font-family: var(--display); font-size: 19px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.tba-rank-meta { font-size: 13px; color: var(--muted); }

/* 90 day strip */
.tba-strip { margin: var(--space-2xl) 0 0; padding: 20px 18px 16px; border-radius: 18px; background: var(--paper-2); border: 1px solid var(--hair); }
.tba-strip-bars { display: flex; align-items: flex-end; gap: 2px; height: 90px; }
.tba-strip-bars i { flex: 1; height: max(3px, calc(var(--d) * 100%)); border-radius: 2px 2px 1px 1px; background: oklch(70% 0.17 25 / 0.65); }
.tba-strip-bars i.is-zero { background: var(--tba-calm); height: 3px; }
.tba-strip-bars i.is-none { background: oklch(100% 0 0 / 0.08); height: 2px; }
.tba-strip-bars i.is-worst { background: var(--tba-busy); box-shadow: 0 0 12px oklch(70% 0.17 25 / 0.7); }
.tba-strip-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tba-strip figcaption { margin-top: 12px; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.tba-strip figcaption b { color: var(--ink); }

/* dates */
.tba-line { list-style: none; padding: 0; margin: var(--space-xl) 0 var(--space-md); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.tba-line::before { content: ""; position: absolute; left: 8px; right: 0; top: 7px; height: 2px; background: var(--hair); }
.tba-line li { position: relative; padding: 28px 12px 0 0; display: grid; gap: 4px; }
.tba-line li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--muted); }
.tba-line li.is-hot::before { border-color: var(--gold); background: var(--gold); }
.tba-line time { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink); }
.tba-line li.is-hot time { color: var(--gold); }
.tba-line span { font-size: 14px; color: var(--ink-soft); }

/* tips */
.tba-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: var(--space-xl) 0 var(--space-md); }
.tba .tba-tip { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: 18px; background: var(--paper-2); border: 1px solid var(--hair); color: var(--ink); transition: transform 0.25s var(--tba-ease), border-color 0.25s; }
.tba .tba-tip:hover { transform: translateY(-3px); border-color: oklch(84% 0.13 86 / 0.5); }
.tba .tba-tip:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.tba-tip b { font-size: 17px; }
.tba-tip span { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.tba-tip em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--gold); margin-top: 4px; }

/* faq */
.tba-faq h2 { margin-bottom: var(--space-lg); }
.tba-faq-item { border-top: 1px solid var(--hair); }
.tba-faq-item:last-of-type { border-bottom: 1px solid var(--hair); }
.tba-faq-item summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 17px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.tba-faq-item summary::-webkit-details-marker { display: none; }
.tba-faq-item summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.tba-faq-item[open] summary::after { content: "\2212"; }
.tba-faq-item p { margin: 0 0 18px; font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.tba-foot { margin: var(--space-2xl) 0 0; }

/* ---- motion ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .tba-photo { animation: tba-settle 1.1s var(--tba-ease) both; }
  .tba-tag { animation: tba-swing 1.4s 0.35s var(--tba-ease) both; }
  .tba.is-ready .tba-days.is-in .tba-day-bar i { animation: tba-grow 0.8s var(--tba-ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
  .tba-detail.is-swap .tba-detail-verdict { animation: tba-pop 0.45s var(--tba-ease); }
}
@keyframes tba-settle { from { transform: rotate(4deg) scale(1.04) translateY(10px); } to { transform: rotate(1.5deg); } }
@keyframes tba-swing { 0% { transform: rotate(-24deg); } 60% { transform: rotate(2deg); } 100% { transform: rotate(-6deg); } }
@keyframes tba-grow { from { transform: scaleY(0.05); } }
@keyframes tba-pop { from { opacity: 0.2; transform: translateY(6px); } }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 860px) {
  .tba-hero { grid-template-columns: 1fr; }
  .tba-hero-fig { padding: 0; max-width: 560px; }
  .tba-panel { border-radius: 18px; }
  .tba-days { grid-auto-columns: 22px; justify-content: start; }
  .tba .tba-day { grid-template-rows: 120px auto 14px; }
  .tba-tips { grid-template-columns: 1fr; }
  .tba-line { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .tba-line::before { display: none; }
  .tba-rank li { grid-template-columns: minmax(0, 1fr) 3.2rem; row-gap: 6px; }
  .tba-rank-track { grid-column: 1 / -1; grid-row: 2; }
  .tba-rank-meta { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 520px) {
  .tba { padding-inline: 16px; }
  .tba-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .tba-facts > div, .tba-facts > div:first-child { padding: 0; border: 0; }
  .tba-days { -webkit-mask: linear-gradient(90deg, #000 85%, #0000); mask: linear-gradient(90deg, #000 85%, #0000); padding-right: 40px; }
  .tba-hours { padding: 16px 8px 12px; gap: 3px; }
  .tba-hours li { grid-template-rows: 16px 120px 14px; }
  .tba-hour-val { font-size: 9.5px; }
  .tba-hour-t { font-size: 10px; }
}
