/* ===========================================================================
   dashboard.css — the public page.
   =========================================================================== */

/* ============================================================ scoreboard == */
/* Its own plane: dark green, amber numerals, hairline grid. Nothing else on
   the page uses amber, so this strip reads as a separate physical object. */

.scoreboard {
  margin: 18px 0 6px;
  border-radius: var(--r-xl);
  background:
    linear-gradient(180deg, var(--board-bg-2) 0%, var(--board-bg) 100%);
  border: 1px solid rgba(255, 176, 32, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 176, 32, .14),
    inset 0 0 90px rgba(0, 0, 0, .55),
    var(--shadow-2);
  overflow: hidden;
}

.board-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--board-grid);
  background: rgba(0, 0, 0, .28);
  flex-wrap: wrap;
}

.board-top-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--board-amber);
  opacity: .85;
}

.board-status {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 650;
}

.board-venue {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38);
  font-weight: 600;
}

/* pre-game: first pitch countdown replaces the empty linescore */
.first-pitch {
  padding: 26px 18px;
  text-align: center;
}

.first-pitch-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  color: rgba(255, 176, 32, .6);
}

.first-pitch-time {
  margin-top: 8px;
  font-size: clamp(22px, 4.4vw, 32px);
  font-weight: 780;
  color: var(--board-amber);
  letter-spacing: -0.01em;
  text-shadow: 0 0 20px rgba(255, 176, 32, .4);
  font-variant-numeric: tabular-nums;
}

.first-pitch-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.board-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
}

@media (max-width: 820px) {
  .board-main { grid-template-columns: 1fr; }
}

/* -- linescore grid -- */

.linescore {
  padding: 12px 8px 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.linescore table {
  border-collapse: collapse;
  width: 100%;
  min-width: 430px;
  font-variant-numeric: tabular-nums;
}

.linescore th,
.linescore td {
  padding: 5px 0;
  text-align: center;
  font-size: 14px;
  min-width: 26px;
}

.linescore thead th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(255, 176, 32, .62);
  border-bottom: 1px solid var(--board-grid);
  padding-bottom: 6px;
}

.linescore .team-cell {
  text-align: left;
  padding-right: 14px;
  min-width: 118px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
  letter-spacing: .02em;
  white-space: nowrap;
}

.linescore tbody td {
  color: var(--board-amber);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 176, 32, .45);
}

.linescore tbody td.empty {
  color: var(--board-amber-dim);
  text-shadow: none;
}

.linescore .sep {
  border-left: 1px solid var(--board-grid);
}

.linescore .total {
  font-size: 15px;
}

.linescore tbody tr + tr td,
.linescore tbody tr + tr .team-cell {
  border-top: 1px solid rgba(255, 176, 32, .09);
}

/* our side */
.linescore .team-cell.rooting {
  color: var(--stripers-green);
  font-weight: 750;
}

.linescore .batting::before {
  content: "\25B8";
  color: var(--board-amber);
  margin-right: 5px;
  font-size: 11px;
}

.linescore .not-batting::before {
  content: "\25B8";
  color: transparent;
  margin-right: 5px;
  font-size: 11px;
}

/* -- situation panel -- */

.board-situation {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 20px;
  border-left: 1px solid var(--board-grid);
  background: rgba(0, 0, 0, .2);
}

@media (max-width: 820px) {
  .board-situation {
    border-left: 0;
    border-top: 1px solid var(--board-grid);
    justify-content: space-around;
    gap: 12px;
  }
}

.sit-block { text-align: center; }

.sit-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(255, 176, 32, .55);
  margin-bottom: 5px;
}

.sit-inning {
  font-size: 30px;
  font-weight: 750;
  color: var(--board-amber);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255, 176, 32, .5);
}

.sit-half {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
}

.lamps {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 176, 32, .13);
  border: 1px solid rgba(255, 176, 32, .3);
}

.lamp.on {
  background: var(--board-amber);
  box-shadow: 0 0 10px rgba(255, 176, 32, .75);
}

.count-val {
  font-size: 19px;
  font-weight: 750;
  color: var(--board-amber);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 176, 32, .4);
}

/* ========================================================== hero block === */

.hero {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 20px 16px;
  }
}

/* left column: crest above the completion ring */
.hero-left {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.hero-crest {
  width: 100%;
  max-width: 168px;
  aspect-ratio: 1.1;
  font-size: 120px;
}

/* Crest + ring stack on a phone, so trim both to keep the headline above
   the fold rather than pushing it off-screen. */
@media (max-width: 720px) {
  .hero-crest { max-width: 132px; font-size: 96px; }
  .hero-ring  { max-width: 180px; }
  .hero { gap: 14px; }
}

.hero-ring { width: 100%; max-width: 230px; }

.hero-copy { min-width: 0; }

.hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-headline {
  font-size: clamp(26px, 5.2vw, 40px);
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 7px 0 10px;
}

.hero-headline .nine { color: var(--series-dog); }
.hero-headline .nine + .nine { color: var(--series-beer); }
.hero-headline .nine ~ .nine ~ .nine { color: var(--board-amber); }

.hero-line {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin-bottom: 14px;
  max-width: 52ch;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 720px) {
  .hero-tags { justify-content: center; }
}

/* ========================================================= meter cards === */

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

.meter-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 12px;
}

.meter-icon { font-size: 21px; line-height: 1; }

.meter-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.meter-count {
  margin-left: auto;
  font-size: 26px;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.meter-count .of {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 600;
}

.meter-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================== layout === */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.stack > * + * { margin-top: 14px; }

/* ============================================================== feed ===== */

.feed {
  max-height: 340px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  overscroll-behavior: contain;   /* don't chain a bounce to the page */
}

/* A nested scroller is a trap on a touchscreen — you flick to scroll the page
   and the feed eats it. It's the last section anyway, so let it run long. */
@media (max-width: 720px) {
  .feed { max-height: none; overflow-y: visible; }
}

.feed-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.feed-item:last-child { border-bottom: 0; }

.feed-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  margin-top: 1px;
}

.feed-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;   /* text on top, timestamp beneath */
}

.feed-text {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.4;
}

.feed-text strong { font-weight: 700; }

.feed-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.feed-empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ====================================================== orders panel ===== */
/* Olive field-manual styling, tied to the Weekend Warriors crest. It is
   deliberately not a "card" — it should read as a dispatch pinned to the
   dashboard rather than another metric. */

.orders {
  position: relative;
  margin-top: 20px;
  padding: 20px 22px 18px 26px;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(169, 184, 76, .12), rgba(169, 184, 76, .04));
  border: 1px solid rgba(169, 184, 76, .34);
  border-left: 4px solid var(--team-olive);
  overflow: hidden;
}

.orders::after {
  content: "★ ★ ★";
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(169, 184, 76, .38);
}

.orders-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 11px;
}

.orders-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--team-olive);
}

.orders-inning {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.orders-quote {
  margin: 0;
  font-size: clamp(15.5px, 2.4vw, 19px);
  line-height: 1.5;
  font-style: italic;
  color: var(--text-primary);
  max-width: 68ch;
}

.orders-quote::before { content: "\201C"; }
.orders-quote::after  { content: "\201D"; }

.orders-who {
  display: block;
  margin-top: 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--team-olive);
}

.orders-who::before { content: "— "; }

@media (max-width: 520px) {
  .orders { padding: 17px 16px 15px 18px; }
  .orders::after { display: none; }
}

/* ============================================================ hot take === */

.note-card {
  border-left: 3px solid var(--board-amber);
  background: linear-gradient(90deg, rgba(255,176,32,.07), transparent 55%);
}

.note-text {
  font-size: 16px;
  line-height: 1.5;
  font-style: italic;
  color: var(--text-primary);
}

/* ============================================================== footer === */

.page-foot {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ======================================================= config warning == */

.setup-banner {
  margin: 16px 0 0;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: rgba(250, 178, 25, .09);
  border: 1px solid rgba(250, 178, 25, .38);
  color: #ffd479;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.setup-banner strong { color: #ffe6ad; }

/* ============================================================== table ==== */
/* The accompanying table view — identity never rests on colour alone. */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.data-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-2);
}

.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table td:first-child { color: var(--text-primary); font-weight: 600; }
.data-table tr:last-child td { border-bottom: 0; }

.table-toggle {
  background: none;
  border: 0;
  color: var(--seq-350);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  touch-action: manipulation;
}

@media (pointer: coarse), (max-width: 520px) {
  .table-toggle { min-height: 44px; padding: 0 4px; font-size: 13px; }
}

[hidden] { display: none !important; }
