/* ============ 60-DAY SNAPSHOT — page-specific styles (pairs with /30) ============ */
/* Inherits design tokens, fonts, topbar, panel, table, and chart-legend
   rules from ../style.css. Only page-unique bits live here. */

html, body { overflow-x: hidden; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-4); }
.back-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}
@media (hover: hover) { .back-link:hover { color: var(--color-text); background: var(--color-surface-offset); } }

.intro-body-static {
  padding: var(--space-4) var(--space-6) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 68ch;
}
.intro-body-static strong { color: var(--color-text); font-weight: 600; }

/* In-progress badge: brand tan, not red/green (those mean money). */
.live-status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  background: color-mix(in srgb, var(--brand-log-end-color, #d9a066) 18%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--brand-log-color, #a9713f) 45%, transparent);
}
.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-log-color, #a9713f);
}
.live-status.is-final .live-dot { background: var(--color-text-muted); }

.pct-cell { font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.pct-cell.positive { color: var(--color-success); }
.pct-cell.negative { color: var(--color-error); }

.index-summary { max-width: 68ch; }
.index-summary .positive { color: var(--color-success); }
.index-summary .negative { color: var(--color-error); }

/* ---------- River (drift-from-target visual) ---------- */
.river-wrap {
  margin-top: var(--space-4);
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 22px -10px rgba(10, 30, 45, 0.3);
}
.river-svg { width: 100%; height: auto; display: block; }

.river-water-bed { fill: url(#riverWaterLight); }
[data-theme='dark'] .river-water-bed { fill: url(#riverWaterDark); }

.river-ripple { stroke: #ffffff; }
[data-theme='dark'] .river-ripple { stroke: #d7ecf8; opacity: 0.16; }

.river-log-ripple { fill: rgba(255,255,255,0.28); }
[data-theme='dark'] .river-log-ripple { fill: rgba(255,255,255,0.08); }

.river-centerline { stroke: rgba(20,30,45,0.45); }
[data-theme='dark'] .river-centerline { stroke: rgba(238,242,248,0.55); }
.river-centerline-label { fill: rgba(20,30,45,0.6); }
[data-theme='dark'] .river-centerline-label { fill: rgba(238,242,248,0.7); }

.river-log-label { fill: #1a2333; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
[data-theme='dark'] .river-log-label { fill: #f3f6fb; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

.river-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-2);
}
.river-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  text-align: center;
}
.river-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  margin-bottom: 2px;
}
.river-stat-label { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 600; }
.river-stat-value { font-size: var(--text-lg); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.river-stat-value.positive { color: var(--color-success); }
.river-stat-value.negative { color: var(--color-error); }
.river-stat-sub { font-size: var(--text-xs); color: var(--color-text-faint); }

@media (max-width: 640px) {
  .river-readout { grid-template-columns: 1fr; }
}

/* Water bed the wood-plank quote cards float on — same treatment as the main
   app's .summary-water, theme-flipped (deep blue in light mode, pale blue in dark). */
.summary-water {
  position: relative;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #bcdcef;
  background-image:
    repeating-radial-gradient(ellipse 220px 14px at 20% 85%, rgba(255,255,255,0.35) 0px, transparent 3px, transparent 22px),
    repeating-radial-gradient(ellipse 260px 16px at 75% 15%, rgba(255,255,255,0.3) 0px, transparent 3px, transparent 26px),
    linear-gradient(160deg, #d3ecf9, #a8d3ea 55%, #8ec2de);
}
[data-theme='dark'] .summary-water {
  background-color: #16324a;
  background-image:
    repeating-radial-gradient(ellipse 220px 14px at 20% 85%, rgba(255,255,255,0.09) 0px, transparent 3px, transparent 22px),
    repeating-radial-gradient(ellipse 260px 16px at 75% 15%, rgba(255,255,255,0.07) 0px, transparent 3px, transparent 26px),
    linear-gradient(160deg, #6bb0da, #3a7ba8 55%, #235376);
}

.yogi-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.yogi-quote {
  position: relative;
  margin: 0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 18px -8px rgba(10, 30, 45, 0.35), inset 0 0 0 1px rgba(255,236,205,0.18), inset 0 -10px 16px -10px rgba(40,20,5,0.45), inset 0 8px 12px -10px rgba(255,240,215,0.35);
  background-color: #9c7850;
  background-size: cover;
  background-position: center;
}
.yogi-quote:nth-child(1) { background-image: url("assets/driftwood-quote1.jpg"); }
.yogi-quote:nth-child(2) { background-image: url("assets/driftwood-quote2.jpg"); }
.yogi-quote:nth-child(3) { background-image: url("assets/driftwood-quote3.jpg"); }
.yogi-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40,22,8,0.32), rgba(30,16,5,0.48));
  pointer-events: none;
}
.yogi-quote > * { position: relative; z-index: 1; }
.yogi-quote p {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  font-style: italic;
  color: #fffaf2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 0 8px rgba(30,15,5,0.45);
}
.yogi-quote cite {
  display: block;
  font-style: normal;
  font-size: var(--text-xs);
  color: #f3e6d2;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

@media (max-width: 860px) {
  .yogi-quotes { grid-template-columns: 1fr; }
  .summary-water { padding: var(--space-4) var(--space-3); }
}

/* ============ CLOSING BOOKEND ============ */
.closing-bookend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-2);
  color: var(--color-text-faint);
}
.closing-bookend-text {
  font-family: var(--font-display, inherit);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-faint);
  margin: 0;
}

.report-footer {
  padding: var(--space-6) 0 var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
}
.report-footer .footer-credit { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-text-faint); opacity: 0.7; }

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; gap: var(--space-2); }
  .back-link { padding: var(--space-1) var(--space-2); }
}

.river-stat-prior { font-weight: 600; color: var(--color-text-muted); }
@media (max-width: 640px) {
  .topbar-actions { gap: var(--space-2); }
}

/* V2.7 gut pass: on phones, keep the Holding column pinned while swiping across
   the price/change columns so every number stays tied to its ticker. */
@media (max-width: 640px) {
  .holdings-table th:first-child,
  .holdings-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--color-surface);
    box-shadow: 1px 0 0 var(--color-divider), 6px 0 8px -6px rgba(0,0,0,0.18);
  }
  .holdings-table th:first-child { background: var(--color-surface-offset); z-index: 3; }
  .holdings-table td:first-child { min-width: 132px; }
}

/* ============ 90-DAY ADDITIONS ============ */
/* 30 · 60 · 90 comparison column: since-creation % at each checkpoint, stacked. */
.holdings-table th.col-compare,
.holdings-table td.col-compare { text-align: right; white-space: nowrap; }
.cmp-stack { display: inline-flex; flex-direction: column; gap: 2px; align-items: stretch; min-width: 104px; }
.cmp-line { display: flex; justify-content: space-between; gap: var(--space-3); font-variant-numeric: tabular-nums; font-size: var(--text-xs); line-height: 1.35; }
.cmp-label { color: var(--color-text-faint); font-weight: 600; letter-spacing: 0.02em; }
.cmp-val { font-weight: 600; }
.cmp-val.positive { color: var(--color-success); }
.cmp-val.negative { color: var(--color-error); }

/* Hands-off comparison */
.handsoff-summary { margin-bottom: var(--space-4); }
.handsoff-lede { margin: 0; font-size: var(--text-sm); line-height: 1.6; color: var(--color-text); max-width: 72ch; }
.handsoff-lede .positive { color: var(--color-success); }
.handsoff-lede .negative { color: var(--color-error); }
.holdings-table tr.row-dryftwood td { background: color-mix(in srgb, var(--brand-log-end-color, #d9a066) 12%, var(--color-surface)); }
.holdings-table tr.row-dryftwood td.ticker-cell .ticker-symbol { color: var(--brand-log-color, #a9713f); }
[data-theme='dark'] .holdings-table tr.row-dryftwood td.ticker-cell .ticker-symbol { color: var(--brand-log-end-color, #d9a066); }

/* Index table sits under the prose */
#index-summary { margin-bottom: var(--space-4); }

/* Two pair pills + back link + theme toggle on one row on narrow phones. */
@media (max-width: 420px) {
  .topbar-actions { gap: 6px; }
  .topbar-actions .pair-link { padding-inline: var(--space-2); }
  .topbar-actions .back-link { padding-inline: var(--space-2); font-size: var(--text-xs); }
}
.col-gap { white-space: nowrap; }
.col-gap .gap-amt, .col-gap .gap-sub { display: block; }
.col-gap .gap-sub { font-size: var(--text-xs); color: var(--color-text-faint); font-weight: 500; }
#table-handsoff td.col-price, #table-handsoff td.col-drift { white-space: nowrap; }
