/* Crowd Calendar — Daily Report — Direction B redesign (KA-98)
   See plans/2026-05-28-crowd-calendar-redesign-design.md §4
   Served externally, cached across all daily-report pages.
   Uses tokens from tokens.css. Generated pages carry NO inline styles:
   data-driven dimensions use the .bd-lvl-* / .bd-w-* class buckets below.
*/

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

html { scroll-behavior: smooth; }

body {
  background: #0a0805;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: absolute;
  inset: 0 0 70% 0;
  background: radial-gradient(60% 80% at 30% 0%, rgba(255,154,68,0.06), transparent 70%);
  pointer-events: none;
}

/* Band tint: one custom property set per page via body.bd-band-* */
.bd-band-quiet    { --bd-band: var(--crowd-quiet);    --bd-glow: rgba(75,174,79,0.07);  --bd-edge: rgba(75,174,79,0.35);  --bd-txt: #8be08e; }
.bd-band-light    { --bd-band: var(--crowd-light);    --bd-glow: rgba(75,174,79,0.06);  --bd-edge: rgba(75,174,79,0.3);   --bd-txt: #8be08e; }
.bd-band-moderate { --bd-band: var(--crowd-moderate); --bd-glow: rgba(212,160,23,0.08); --bd-edge: rgba(212,160,23,0.4);  --bd-txt: #f0c160; }
.bd-band-busy     { --bd-band: var(--crowd-busy);     --bd-glow: rgba(232,117,28,0.08); --bd-edge: rgba(232,117,28,0.4);  --bd-txt: #f4a35d; }
.bd-band-packed   { --bd-band: var(--crowd-packed);   --bd-glow: rgba(198,40,40,0.08);  --bd-edge: rgba(198,40,40,0.4);   --bd-txt: #ff8a8a; }

a { color: inherit; text-decoration: none; }

/* ---- Nav ---- */
.bd-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,8,5,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.bd-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bd-brand img { height: 36px; width: auto; display: block; }
.bd-nav-links {
  display: flex;
  gap: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  align-items: center;
}
.bd-nav-links a:not(.bd-cta-pill) { color: var(--text-dim); transition: color .15s; }
.bd-nav-links a:not(.bd-cta-pill):hover { color: var(--text); }
.bd-cta-pill {
  background: var(--sunset-gradient);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-cta);
}

/* ---- Main / chrome ---- */
.bd-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 64px;
  position: relative;
  z-index: 1;
}
.bd-crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bd-crumb a:hover { color: var(--text); }
.bd-crumb-sep { opacity: 0.4; }
.bd-crumb-cur { color: var(--text); }

.bd-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 14px;
}
.bd-pager a { color: var(--text-dim); padding: 8px 0; transition: color .15s; }
.bd-pager a:hover { color: var(--text); }
.bd-pager-up {
  color: var(--sunset-amber) !important;
  font-weight: 600;
  padding: 8px 12px !important;
  border: 1px solid rgba(255,154,68,0.3);
  border-radius: var(--radius-sm);
}

.bd-eye {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--bd-txt, var(--sunset-amber));
  margin-bottom: 12px;
}
.bd-eye::before { content: "— "; }

/* ---- Hero ---- */
.bd-hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  margin-bottom: 32px;
  align-items: flex-start;
}
.bd-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.5vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.bd-h1-em {
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bd-lede {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 0 24px;
  line-height: 1.55;
}

.bd-trip-callout {
  padding: 16px 20px;
  background: var(--bd-glow, rgba(255,154,68,0.06));
  border: 1px solid var(--bd-edge, rgba(255,154,68,0.3));
  border-radius: 14px;
  transition: background .2s, border-color .2s;
}
.bd-trip-l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--bd-txt, var(--sunset-amber));
  margin-bottom: 6px;
}
.bd-trip-l::before { content: "— "; }
.bd-trip-m { font-size: 15px; color: var(--text); line-height: 1.5; }
.bd-trip-m strong { font-weight: 800; color: var(--bd-txt, var(--sunset-amber)); }
.bd-link { color: var(--sunset-amber); font-weight: 700; }

/* Verdict column */
.bd-verdict { display: flex; flex-direction: column; gap: 16px; }
.bd-verdict-row { display: flex; gap: 14px; align-items: stretch; }
.bd-verdict-chip {
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--bd-band, var(--crowd-moderate));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 110px;
}
.bd-verdict-n {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.bd-verdict-l {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  margin-top: 4px;
  letter-spacing: 0.05em;
}
.bd-verdict-stats { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bd-vs {
  padding: 10px 14px;
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.bd-vs .l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  display: block;
}
.bd-vs .v { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.bd-vs .v i { font-style: normal; font-size: 11px; color: var(--text-dim); margin-left: 2px; }
.bd-vs .bd-vs-weather { font-size: 18px; }

.bd-infographic { margin: 0; }
.bd-infographic img {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: block;
}
.bd-infographic a { display: block; cursor: zoom-in; }
.bd-infographic-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: center;
  margin-top: 8px;
}
.bd-share-thumb { cursor: zoom-in; }

/* Full-size infographic modal (opened by enhance JS) */
.bd-zoom-dialog {
  background: transparent;
  border: 0;
  padding: 24px;
  max-width: min(92vw, 1080px);
  cursor: zoom-out;
}
.bd-zoom-dialog::backdrop {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.bd-zoom-dialog img {
  width: 100%;
  height: auto;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 16px 64px rgba(0,0,0,0.7);
  display: block;
}

/* ---- Cards ---- */
.bd-card {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.bd-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.bd-card-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.02em;
}
.bd-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}
.bd-empty { color: var(--text-mute); font-size: 14px; }

/* ---- Hourly chart ---- */
.bd-hourly {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  padding: 10px 4px 8px;
  align-items: end;
}
.bd-hour { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bd-hour-bar {
  width: 100%;
  border-radius: 4px 4px 2px 2px;
  min-height: 20px;
  transition: height .25s;
}
.bd-hour-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  margin-top: 4px;
}
.bd-hour-lbl { font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); }

/* Level buckets: height + color per crowd level (1-10) */
.bd-lvl-0  { height: 20px; background: var(--surface-2); }
.bd-lvl-1  { height: 36px;  background: var(--crowd-quiet); }
.bd-lvl-2  { height: 50px;  background: var(--crowd-quiet); }
.bd-lvl-3  { height: 64px;  background: var(--crowd-light); }
.bd-lvl-4  { height: 78px;  background: var(--crowd-light); }
.bd-lvl-5  { height: 92px;  background: var(--crowd-moderate); }
.bd-lvl-6  { height: 106px; background: var(--crowd-moderate); }
.bd-lvl-7  { height: 120px; background: var(--crowd-busy); }
.bd-lvl-8  { height: 134px; background: var(--crowd-busy); }
.bd-lvl-9  { height: 148px; background: var(--crowd-packed); }
.bd-lvl-10 { height: 162px; background: var(--crowd-packed); }

/* ---- Tactical cards ---- */
.bd-tactics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.bd-tactic {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.bd-tac-time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--bd-txt, var(--sunset-amber));
}
.bd-tac-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin: 8px 0 6px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.bd-tactic p { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; margin: 0; }

/* ---- Rides by land ---- */
.bd-lands { display: flex; flex-direction: column; gap: 14px; }
.bd-land-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bd-land-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.bd-land-n { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.bd-land-avg { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.bd-land-rides { display: flex; flex-direction: column; gap: 6px; padding-left: 20px; }
.bd-land-rides.bd-flat { padding-left: 0; }

.bd-r {
  display: grid;
  grid-template-columns: 240px 1fr 150px;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 10px;
}
.bd-r-n { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.bd-r-bars { display: flex; align-items: center; gap: 10px; }
.bd-r-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.bd-r-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--sunset-amber);
  transition: width .25s;
}
.bd-r-v { font-family: var(--font-mono); font-size: 12px; font-weight: 600; min-width: 64px; }
.bd-dim { color: var(--text-mute); font-weight: 400; }
.bd-r-peak {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  text-align: right;
}
.bd-r-closed { font-size: 12px; color: var(--wait-closed, #ef4444); font-weight: 600; }

/* Land accents: dots + bar fills only, never backgrounds */
.bd-accent-celestial { background: var(--land-celestial); }
.bd-accent-dark      { background: var(--land-dark); }
.bd-accent-dragon    { background: var(--land-dragon); }
.bd-accent-nintendo  { background: var(--land-nintendo); }
.bd-accent-wizarding { background: var(--land-wizarding); }
.bd-accent-elsewhere { background: var(--text-mute); }

/* Bar width buckets (5% steps) */
.bd-w-0 { width: 2%; } .bd-w-5 { width: 5%; } .bd-w-10 { width: 10%; }
.bd-w-15 { width: 15%; } .bd-w-20 { width: 20%; } .bd-w-25 { width: 25%; }
.bd-w-30 { width: 30%; } .bd-w-35 { width: 35%; } .bd-w-40 { width: 40%; }
.bd-w-45 { width: 45%; } .bd-w-50 { width: 50%; } .bd-w-55 { width: 55%; }
.bd-w-60 { width: 60%; } .bd-w-65 { width: 65%; } .bd-w-70 { width: 70%; }
.bd-w-75 { width: 75%; } .bd-w-80 { width: 80%; } .bd-w-85 { width: 85%; }
.bd-w-90 { width: 90%; } .bd-w-95 { width: 95%; } .bd-w-100 { width: 100%; }

/* Closed rides */
.bd-closed {
  margin-top: 18px;
  border: 1px solid #7f1d1d;
  background: #0f0707;
  border-radius: 12px;
  padding: 16px 20px;
}
.bd-closed-h { font-weight: 700; font-size: 14px; color: #fca5a5; margin-bottom: 10px; }
.bd-closed-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-closed-pill {
  display: inline-block;
  background: #1f1010;
  border: 1px solid #7f1d1d;
  color: #fca5a5;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
}

.bd-weather-line {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---- Share this report ---- */
.bd-share-section {
  background: linear-gradient(135deg, rgba(255,154,68,0.06) 0%, rgba(75,174,79,0.04) 100%);
  border: 1px solid rgba(255,154,68,0.3);
  border-radius: 22px;
  padding: 28px 32px;
  margin-bottom: 24px;
}
.bd-share-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
}
.bd-share-eye {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--sunset-amber);
  margin-bottom: 10px;
}
.bd-share-eye::before { content: "— "; }
.bd-share-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 10px;
}
.bd-share-s { font-size: 14px; color: var(--text-dim); line-height: 1.55; max-width: 540px; }
.bd-share-count {
  text-align: center;
  padding: 12px 18px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.bd-share-count span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}

.bd-share-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: flex-start;
}
/* Grid children default to min-width:auto, which lets the share image's
   intrinsic width blow the 1fr track out to 629px on a 375px phone.
   min-width:0 lets the track actually shrink; the img then fills it. */
.bd-share-body > * { min-width: 0; }
.bd-share-thumb img { width: 100%; height: auto; }
.bd-share-thumb img {
  max-width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 18px rgba(0,0,0,0.4);
}
.bd-share-url-l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  display: block;
  margin-bottom: 6px;
}
.bd-share-url-box {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.bd-share-url-v {
  flex: 1;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bd-share-copy {
  background: var(--sunset-gradient);
  color: #fff;
  border: 0;
  min-height: 44px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.bd-share-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.bd-share-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  transition: background .15s, border-color .15s;
}
.bd-share-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--sunset-amber); }

/* ---- Closer ---- */
.bd-conv {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  padding: 36px;
  background: linear-gradient(135deg, rgba(255,75,43,0.1), rgba(255,154,68,0.04));
  border: 1px solid rgba(255,75,43,0.3);
  border-radius: 24px;
  align-items: center;
}
.bd-conv-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.bd-conv-h em {
  font-style: normal;
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bd-conv-l p { color: var(--text-dim); font-size: 16px; max-width: 480px; margin: 0 0 22px; line-height: 1.55; }
.bd-conv-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bd-cta {
  background: var(--sunset-gradient);
  color: #fff;
  border: 0;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-cta);
  display: inline-block;
}
.bd-conv-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

.bd-pulse-card {
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  font-size: 13px;
}
.bd-pulse-l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #8be08e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bd-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crowd-quiet);
  box-shadow: 0 0 8px var(--crowd-quiet);
}
.bd-pulse-row { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.bd-pulse-row:last-of-type { border-bottom: 0; }
.bd-pulse-row b { font-family: var(--font-mono); font-weight: 700; margin-right: 8px; }
.bd-pulse-foot {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bd-hour-bar, .bd-r-bar-fill, .bd-trip-callout { transition: none; }
}

/* ---- Mobile (375px-first; mobile is the primary audience) ---- */
@media (max-width: 900px) {
  .bd-hero { grid-template-columns: 1fr; gap: 24px; }
  .bd-share-body { grid-template-columns: 1fr; }
  .bd-conv { grid-template-columns: 1fr; padding: 28px 24px; }
  .bd-tactics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .bd-main { padding: 20px 16px 60px; }
  .bd-nav-inner { padding: 10px 16px; }
  .bd-card { padding: 18px 16px; }
  .bd-share-section { padding: 20px 16px; }
  .bd-tactics { grid-template-columns: 1fr; }
  .bd-h1 { font-size: 30px; }
  .bd-conv-h { font-size: 30px; }
  .bd-verdict-stats { grid-template-columns: 1fr 1fr; }
  .bd-r { grid-template-columns: 1fr; gap: 6px; padding: 12px; }
  .bd-r-peak { text-align: left; }
  .bd-land-rides { padding-left: 8px; }
  .bd-share-head { flex-direction: column; gap: 12px; }
  .bd-hourly { gap: 3px; }
  .bd-hour-num { font-size: 11px; }
  .bd-hour-lbl { font-size: 8px; }
  /* Compress chart heights on small screens */
  .bd-lvl-1  { height: 26px; } .bd-lvl-2  { height: 34px; }
  .bd-lvl-3  { height: 42px; } .bd-lvl-4  { height: 50px; }
  .bd-lvl-5  { height: 58px; } .bd-lvl-6  { height: 66px; }
  .bd-lvl-7  { height: 74px; } .bd-lvl-8  { height: 82px; }
  .bd-lvl-9  { height: 90px; } .bd-lvl-10 { height: 98px; }
}
