/* Day pages at /daily/. Palette and header treatment mirror Roadto$100k/style.css —
   change it there first, then mirror here. Bump CSS_VERSION in export_daily_pages.py
   after editing this file, or published pages will serve a cached copy. */

/* Tokens from C:\StreamScripts\DESIGN.md (sections 2 and 3). Change them there first.
   The older names below are aliases so the rest of this sheet reads the same. */
:root {
  --canvas: #0d0d0d;
  --surface-1: #151412;
  --surface-2: #1c1a17;
  --surface-3: #24221e;
  --hairline: #2a2722;
  --hairline-strong: #3b372f;
  --ink: #e8e2d6;
  --ink-muted: #bdb7aa;
  --ink-subtle: #8c867b;
  --ink-faint: #5f5a52;
  --gold: #c9a84c;
  --gold-hover: #ddc06c;
  --gold-dim: #7a5e28;
  --gold-wash: rgba(201, 168, 76, 0.10);
  --on-gold: #14110a;
  --up: #5fb67c;
  --down: #e0675c;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-figure: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  --bg: var(--canvas);
  --card-bg: var(--surface-1);
  --surface2: var(--surface-2);
  --text: var(--ink);
  --text-secondary: var(--ink-muted);
  --text-muted: var(--ink-subtle);
  --border: var(--hairline);
  --gridline: var(--hairline);
  --gold-light: var(--gold-hover);
  --gold-track: var(--gold-wash);
  --positive: var(--up);
  --negative: var(--down);
  --card-border: var(--hairline);
}

* { box-sizing: border-box; }

/* Flat canvas (DESIGN.md section 6). The gold glow that was here went on 2026-11-11. */
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
}

body.lb-open { overflow: hidden; }

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 18px 72px;
}

/* ---------- header (mirrors the other sub-sites) ---------- */

.site-header { text-align: center; margin-bottom: 26px; }

.brand-name {
  display: inline-block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand-name span { color: var(--gold); }

.brand-rule {
  height: 1px;
  margin: 10px auto 14px;
  max-width: 420px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Coloured brand tiles, matching the site's home page exactly — these used to be
   faded white glyphs, which read as disabled links. */
.social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 22%;
  opacity: 0.9;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.social-icon:hover {
  opacity: 1;
}

.social-icon.instagram { background: #e1306c; }
.social-icon.x { background: #000000; }
.social-icon.youtube { background: #ff0000; }
.social-icon.facebook { background: #0866ff; }
.social-icon.twitch { background: #9146ff; }
.social-icon.kick { background: #53fc19; }
.social-icon.discord { background: #5865f2; }

.social-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

/* Heading (DESIGN.md section 3): cream, not gold. Gold is kept for what's clickable. */
/* An <h1> since 2026-11-16 (search engines want one); the margin is set in full
   so it lays out exactly as the <div> it replaced. */
.page-title {
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}

/* ---------- prev / next ---------- */

/* Three columns rather than space-between, so Calendar sits dead centre even on the
   newest day, where there is no "Later" link to balance the "Earlier" one. The
   generator emits an empty <span> for a missing neighbour to hold the cell. */
.day-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 30px 0 0;
}

.day-nav > :first-child { justify-self: start; }
.day-nav > :last-child { justify-self: end; }

/* Grid items default to min-width:auto, so a long un-wrappable label would push its
   column wider than the track and overlap the Calendar button instead of truncating. */
.day-nav > * { min-width: 0; }

.nav-short { display: none; }

/* Secondary buttons (DESIGN.md section 4); hover changes the border only. */
.day-nav-link,
.day-nav-home {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s ease-out;
}

.day-nav-link:hover,
.day-nav-home:hover { border-color: var(--gold-dim); }

/* ---------- cards ---------- */

/* A panel (DESIGN.md section 4): flat, one step above the canvas, a hairline edge.
   The gold stripe along the top went with the gradient on 2026-11-11. */
.card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 24px;
  overflow: hidden;
}

.card + .card, section + section { margin-top: 24px; }

/* The section label: one per card (DESIGN.md section 3). */
.card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.muted { color: var(--text-muted); font-size: 13px; margin: 0; }

.positive { color: var(--positive); }
.negative { color: var(--negative); }
.neutral { color: var(--text-secondary); }

/* ---------- day figures ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

/* Centred: left-aligned, a wide value under a short label read as misaligned. */
.stat { text-align: center; }

/* Sentence case: a second uppercase label in the same card competed with the first. */
.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-subtle);
  margin-bottom: 4px;
}

/* Condensed scoreboard figures, as on the home page. */
.stat-value {
  font-family: var(--font-figure);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* The day's own result is the headline (Figure L); the rest are supporting figures.
   No glow: its colour alone says up or down. */
/* The day's profit / loss is the anchor: centred on top at headline size, one
   figure per currency side by side. Everything under it is one size
   (2026-11-16, by request; year to date came off the day pages then). */
.day-anchor {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 48px;
  margin-bottom: 24px;
}
.day-anchor .stat-value { font-size: 48px; line-height: 1.05; }
.day-anchor + .stat-row { padding-top: 24px; border-top: 1px solid var(--hairline); }

/* The counts (Tournaments, Cashes, Still running) head the Tournaments card,
   above its list, rather than sitting under profit / loss (2026-11-16, by
   request). Used by daily/tournaments.js and the today page. */
.trn-stats {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.site-breakdown {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gridline);
}

.site-row {
  display: grid;
  grid-template-columns: 96px 1fr 96px;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
}

.site-name {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Diverging bars. The track is split at its centre by a thin zero line; a win grows
   right from it in green, a loss grows left in red. The generator sets each fill's
   width as a share of the whole track (the biggest result in either direction gets
   50%), and the sign class decides which side it's anchored to. */
.site-bar {
  position: relative;
  display: block;
  height: 10px;
  background: var(--surface2);
  border-radius: 999px;
}

.site-bar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--gridline);
  transform: translateX(-0.5px);
}

.site-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
}

/* Rounded only at the outer end; the end touching the zero line stays square. Each bar
   grows out from the zero line on load, so transform-origin is that line's side. */
.site-bar-fill.positive {
  left: 50%;
  background: var(--positive);
  border-radius: 0 999px 999px 0;
  transform-origin: left center;
}

.site-bar-fill.negative {
  right: 50%;
  background: var(--negative);
  border-radius: 999px 0 0 999px;
  transform-origin: right center;
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
}

.site-bar-fill {
  animation: bar-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s backwards;
}

.site-bar-fill.neutral { display: none; }

.site-value {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---------- photos ---------- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.shot { margin: 0; }

.shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--surface2);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color 0.15s ease-out;
}

.shot-btn:hover { border-color: var(--gold); }
.shot-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Square rather than 4:3: the grid mixes landscape screenshots with portrait phone
   photos, and a landscape thumb crops a portrait shot down to a middle strip. The
   lightbox shows the uncropped image either way. */
.shot-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.shot figcaption {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ---------- clips ---------- */

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.clip { margin: 0; }

/* 16:9 box so the iframe reserves its space before the platform's player loads. */
.clip-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}

.clip-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.clip figcaption {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Reels and shorts are portrait. A 9:16 frame in a full-width grid cell would be
   taller than the screen, so the cell is capped rather than the aspect ratio faked. */
.clip.vertical { max-width: 330px; }
.clip-frame.vertical { aspect-ratio: 9 / 16; }

/* Facebook and friends render their own "Video unavailable" panel for anything they
   will not serve to a logged-out visitor, so every player keeps a way out to the post. */
.clip-out {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.clip-out:hover { color: var(--gold); }

.clip-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.15s ease-out;
}

.clip-card:hover { border-color: var(--gold-dim); }

/* A tag (DESIGN.md section 4), matching the home page's. */
.clip-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  padding: 3px 8px;
}

.clip-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.clip-go { font-size: 12px; color: var(--text-muted); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 56px;
  background: rgba(6, 6, 5, 0.9);
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.lb-caption {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 8px 14px;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--gold-light); }

.lb-close { top: 10px; right: 14px; font-size: 32px; }
.lb-prev { left: 6px; font-size: 52px; }
.lb-next { right: 6px; font-size: 52px; }


/* ---------- entrance (mirrors the root style.css) ---------- */

/* Sections fade in one after another; opacity only, nothing moves (DESIGN.md
   section 7). Fill mode stays backwards. The site bars still grow: data may animate. */
@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page > :not(.site-header) {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.page > :nth-child(2) { animation-delay: 0.05s; }
.page > :nth-child(3) { animation-delay: 0.12s; }
.page > :nth-child(4) { animation-delay: 0.2s; }
.page > :nth-child(5) { animation-delay: 0.28s; }
.page > :nth-child(6) { animation-delay: 0.36s; }

/* Same selector as the entrance rule: a plain .page > * is less specific and loses. */
@media (prefers-reduced-motion: reduce) {
  .page > :not(.site-header),
  .site-bar-fill { animation: none; }
}

@media (max-width: 560px) {
  /* At 34px with 14px gaps the tiles need more than the ~320px a phone has inside the page
     padding, so the row wrapped. Smaller tiles on one line, and they shrink further
     (staying square) rather than wrap on the narrowest screens. */
  .social-row { flex-wrap: nowrap; gap: 8px; }
  .social-icon { flex: 0 1 30px; width: 30px; height: auto; aspect-ratio: 1; min-width: 0; }
  .social-icon img { width: 16px; height: 16px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .brand-name { font-size: 30px; }
  .page-title { font-size: 24px; }
  .day-anchor .stat-value { font-size: 40px; }
  .stat-value { font-size: 24px; }
  .card { padding: 18px; }
  .site-row { grid-template-columns: 78px 1fr 80px; gap: 8px; }
  .lightbox { padding: 48px 12px; }
  .lb-prev, .lb-next { font-size: 38px; }
}

/* ---------- cross-page view transitions ---------- */

/* Mirrors the block in Roadto$100k/style.css — a cross-document transition only runs if
   both documents opt in, so these two have to stay in step like the header rules do. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

.brand-name { view-transition-name: brand-name; }
.brand-rule { view-transition-name: brand-rule; }
.social-row { view-transition-name: social-row; }

/* The calendar cell that was clicked lands here. Named in CSS rather than in the
   generated HTML, so this needs no regeneration and no BuildBankroll.bat: "Profit /
   loss" is always stats[0] in export_daily_pages.py, which is the same assumption the
   560px rule above already makes. */
.day-anchor .stat:first-child .stat-value { view-transition-name: day-figure; }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

::view-transition-old(root) { animation: vt-out 0.24s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-fade-in 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

::view-transition-group(day-figure) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* The transition pseudo-elements are styled by the document being navigated *to*, so
   these govern the calendar -> day direction and the matching pair in
   Roadto$100k/style.css governs the way back. The cell is a small coloured block and the
   figure is large text, so a straight cross-fade spends most of the flight as a
   stretched green rectangle; dropping the old one early reads instead as the colour
   resolving into the number. */
@keyframes vt-fade-out { to { opacity: 0; } }

::view-transition-old(day-figure) { animation: vt-fade-out 0.16s linear both; }
::view-transition-new(day-figure) { animation: vt-fade-in 0.3s linear 0.16s both; }
