:root {
  --bg: #0b1020;
  --bg-deep: #070b17;
  --card: #141b33;
  --card-soft: #18213d;
  --nested: #11182f;
  --line: #283251;
  --line-strong: #35405f;
  --muted: #a8b3cf;
  --muted-strong: #c7d2ee;
  --text: #f2f5ff;
  --accent: #8bd3ff;
  --blue: #2d70d6;
  --warn: #ffd166;
  --good: #8cffb7;
  --bad: #ff8b8b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #27304d;
  background: var(--bg-deep);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 1.28rem;
  font-weight: 850;
  color: #fff;
  letter-spacing: -0.01em;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.tagline {
  color: var(--muted);
  font-size: .93rem;
  margin-top: .2rem;
}

nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
nav a { margin-left: 0; }
.nav-theme-toggle {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: .92rem;
  font-weight: 800;
  padding: .28rem .6rem;
  cursor: pointer;
}
.nav-theme-toggle:hover { text-decoration: none; filter: brightness(1.07); }


.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.5rem;
}

h1, h2, h3 { line-height: 1.18; }
h1 { margin: 0 0 .65rem; font-size: clamp(1.75rem, 2.6vw, 2.15rem); }
h2 { margin: 0 0 .85rem; font-size: 1.32rem; letter-spacing: .01em; }
h3 { margin: .65rem 0 .7rem; font-size: 1.08rem; }

.hero { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.75rem; }
.hero-dashboard .card { margin-bottom: 0; }
.hero-title-row { display: flex; justify-content: space-between; gap: 1.25rem; align-items: flex-start; }
.rules-link {
  white-space: nowrap;
  border: 1px solid rgba(139, 211, 255, .35);
  border-radius: 999px;
  padding: .42rem .75rem;
  background: rgba(139, 211, 255, .08);
  font-weight: 700;
  font-size: .93rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px #0003;
}

.dashboard-intro { padding: 1.25rem; }
.badge-row, .action-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .75rem; }
.action-row { gap: .65rem; }

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

.watch {
  border-left: 5px solid var(--accent);
  padding-left: 1.25rem;
}
.watch.perfect { border-left-color: var(--good); }
.watch.nohit { border-left-color: var(--warn); }
.watch.ended { opacity: .82; border-left-color: #7c8aac; }
.active-watch {
  box-shadow: 0 0 0 1px rgba(255, 209, 102, .12), 0 12px 30px rgba(0, 0, 0, .28);
}
.active-watch.nohit { background: linear-gradient(90deg, rgba(255, 209, 102, .075), rgba(20, 27, 51, 1) 34%); }
.active-watch.perfect { background: linear-gradient(90deg, rgba(140, 255, 183, .075), rgba(20, 27, 51, 1) 34%); }
.watch-card-top { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: .24rem .62rem;
  font-size: .82rem;
  background: #26345e;
  color: #dce7ff;
  font-weight: 700;
}
.badge.good { background: #17452a; color: #bfffd4; }
.badge.warn { background: #4c3c13; color: #ffe29c; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .78rem;
  font-weight: 850;
  color: #ffe29c;
  background: rgba(255, 209, 102, .11);
  border: 1px solid rgba(255, 209, 102, .28);
}
.live-dot {
  display: inline-block;
  width: .58rem;
  height: .58rem;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(255, 209, 102, .6);
  animation: pgwPulse 1.8s infinite;
}
.small-dot { width: .46rem; height: .46rem; margin-right: .35rem; vertical-align: middle; }
@keyframes pgwPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 209, 102, .55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 209, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

.muted { color: var(--muted); }
.stat-line { color: var(--muted-strong); }
.small { font-size: .92rem; }

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .55rem;
  margin-top: 1rem;
}
.status-strip div {
  background: var(--nested);
  border: 1px solid rgba(40, 50, 81, .9);
  border-radius: 10px;
  padding: .62rem .7rem;
  min-width: 0;
}
.status-strip span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: .18rem;
}
.status-strip strong {
  display: block;
  color: var(--text);
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-strip .refresh-countdown-value {
  white-space: nowrap;
  display: inline-block;
}

table { width: 100%; border-collapse: collapse; }
td, th { padding: .55rem; border-bottom: 1px solid var(--line); text-align: left; }
th { color: #f8fbff; }

input, select, button {
  width: 100%;
  padding: .7rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #0d1327;
  color: var(--text);
  margin: .25rem 0 .8rem;
}
button { background: var(--blue); border: 0; font-weight: 700; cursor: pointer; }

.footer { padding: 2rem; text-align: center; color: var(--muted); }

.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: #26345e;
  color: #fff;
  font-weight: 850;
  margin-right: .38rem;
  font-size: .84rem;
  vertical-align: middle;
}
.mini-box {
  background: var(--nested);
  border: 1px solid rgba(40, 50, 81, .85);
  border-radius: 10px;
  overflow: hidden;
  margin: .75rem 0;
}
.mini-box th, .mini-box td { text-align: center; padding: .46rem .5rem; }
.mini-box th:first-child, .mini-box td:first-child { text-align: left; font-weight: 800; }

.watch-team { margin-top: -4px; color: #cbd5e1; }

.button-link {
  display: inline-block;
  border-radius: 10px;
  padding: .58rem .85rem;
  background: var(--blue);
  color: #fff;
  font-weight: 750;
  margin-right: .2rem;
}
.button-link:hover { text-decoration: none; filter: brightness(1.08); }

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, .9fr);
  gap: 1.35rem;
  align-items: start;
}
.dashboard-column { min-width: 0; }
.dashboard-column > h2 {
  padding-bottom: .35rem;
  border-bottom: 1px solid rgba(139, 211, 255, .18);
}
.watch-list { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.empty-state { padding: 1.15rem; }

.scoreboard-list { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.score-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .8rem;
}
.score-status { font-size: .9rem; color: var(--muted); margin-bottom: .35rem; }
.score-table th, .score-table td { padding: .34rem .45rem; text-align: right; }
.score-table th:first-child, .score-table td:first-child { text-align: left; font-weight: 850; }
.score-table td:not(:first-child) { font-weight: 750; font-size: 1.02rem; }
.score-table tr:nth-child(2) td, .score-table tr:nth-child(3) td { border-bottom: 1px solid var(--line); }
.score-table tr.leading-team td { background: rgba(139, 211, 255, .08); }
.score-table tr.leading-team td:first-child { color: #fff; }

.version-badge {
  margin-top: 3px;
  display: inline-block;
  font-size: 0.78rem;
  color: #93c5fd;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.35);
  border-radius: 999px;
  padding: 2px 8px;
}
.version-inline { font-size: 0.9rem; color: #93c5fd; font-weight: 650; }

.rules-page .card { max-width: 840px; }
.rules-page h2 { margin-top: 1.6rem; }
.rules-list { padding-left: 1.2rem; color: var(--muted-strong); }
.rules-list li { margin: .45rem 0; }

@media (min-width: 981px) and (min-height: 820px) {
  .dashboard-column {
    max-height: calc(100vh - 18rem);
    overflow-y: auto;
    padding-right: .25rem;
    scrollbar-width: thin;
    scrollbar-color: #35405f transparent;
  }
  .dashboard-column::-webkit-scrollbar { width: 8px; }
  .dashboard-column::-webkit-scrollbar-thumb { background: #35405f; border-radius: 999px; }
}

@media (max-width: 980px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .container { padding: 1rem; }
  .hero-title-row { display: block; }
  .rules-link { display: inline-block; margin-top: .55rem; }
  .status-strip { grid-template-columns: 1fr; }
  .site-header { display: block; }
  nav { margin-top: .75rem; }
  nav a { margin-left: 0; margin-right: 1rem; }
}

.inline-form { margin: .75rem 0 0; }
.inline-form button:disabled { opacity: .45; cursor: not-allowed; }
.success-message {
  color: #bbf7d0;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .35);
  padding: .75rem .9rem;
  border-radius: 10px;
}
.error-message {
  color: #fecaca;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .35);
  padding: .75rem .9rem;
  border-radius: 10px;
}
.log-view {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #090e1d;
  color: #dbeafe;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: .9rem;
  font-size: .82rem;
  line-height: 1.45;
}
.footer a { color: inherit; text-decoration: underline; }
code {
  color: #dbeafe;
  background: rgba(148, 163, 184, .10);
  padding: .08rem .25rem;
  border-radius: 5px;
}

/* v0.2.0 account/preferences layout */
.account-hero { margin-bottom: 1rem; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr); gap: 1rem; align-items: start; }
.account-section h2 { border-bottom: 1px solid var(--line); padding-bottom: .55rem; }
.form-grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.preference-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: .75rem 0 1rem; }
.preference-card { background: var(--nested); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.preference-card h3 { margin-top: 0; }
.muted-panel { opacity: .9; }
.inline-form { margin-bottom: 1rem; }
.inline-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; align-items: start; }
.inline-controls button { width: auto; min-width: 6rem; }
.favorite-team-list { display: grid; gap: .55rem; }
.favorite-team-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: var(--nested); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .75rem; }
.favorite-team-row form { margin: 0; }
.secondary-button { width: auto; margin: 0; padding: .48rem .7rem; background: #26345e; color: var(--text); }
@media (max-width: 820px) {
  .account-layout, .form-grid.two, .preference-card-grid { grid-template-columns: 1fr; }
  .inline-controls { grid-template-columns: 1fr; }
  .inline-controls button { width: 100%; }
  .favorite-team-row { align-items: flex-start; flex-direction: column; }
}

/* v0.2.3 account cleanup */
.check-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: .35rem 0 .45rem;
  line-height: 1.35;
}
.check-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
}
.preference-line .small,
.preference-card .small,
.muted-panel .small { margin-top: .35rem; }
.account-hero .inline-form { max-width: 720px; }
.account-hero .small { margin-bottom: 0; }

/* v0.2.4 Pushover/admin users */
.pushover-card h2 { margin-top: 0; border-bottom: 1px solid var(--line); padding-bottom: .55rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.button-row button { width: auto; margin: .25rem 0 .6rem; }
.table-scroll { overflow-x: auto; }
.admin-users-card table { min-width: 980px; }
.admin-users-card td { vertical-align: top; }


/* v0.2.5 admin/Pushover polish */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}
.search-form {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .85rem;
}
.search-form input { min-width: 260px; margin: 0; }
.search-form button, .search-form .secondary-button { width: auto; margin: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.admin-actions {
  min-width: 190px;
}
.admin-actions form { margin: 0 0 .45rem; }
.admin-actions .secondary-button { width: 100%; text-align: center; }
.pushover-intro,
.pushover-setup-hero {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.pushover-intro img,
.pushover-setup-hero img {
  max-width: 190px;
  width: 32%;
  min-width: 140px;
  height: auto;
  border-radius: 12px;
  background: #fff;
  padding: .45rem;
}
.pushover-intro h2 { margin-bottom: .45rem; }
.pushover-settings-form { margin-top: 1rem; }
.prominent-check {
  background: rgba(139, 211, 255, .07);
  border: 1px solid rgba(139, 211, 255, .18);
  border-radius: 10px;
  padding: .65rem .75rem;
}
@media (max-width: 760px) {
  .pushover-intro,
  .pushover-setup-hero { display: block; }
  .pushover-intro img,
  .pushover-setup-hero img { width: 100%; max-width: 240px; margin-bottom: .85rem; }
  .search-form { width: 100%; flex-wrap: wrap; }
  .search-form input { min-width: 0; width: 100%; }
}

/* v0.3.1 fan-facing public dashboard refresh */
.page-dashboard {
  --bg: #f7f2e8;
  --bg-deep: #ffffff;
  --card: #fffdfa;
  --card-soft: #fff7ec;
  --nested: #f2eadc;
  --line: #e2d4bf;
  --line-strong: #cbb99d;
  --muted: #667085;
  --muted-strong: #475467;
  --text: #172033;
  --accent: #0f766e;
  --blue: #0f766e;
  --warn: #b7791f;
  --good: #15803d;
  --bad: #b42318;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, .14), transparent 34rem),
    linear-gradient(180deg, #fff9ef 0%, #f7f2e8 55%, #f2eadc 100%);
}
.page-dashboard.dashboard-dark {
  --bg: #0b1020;
  --bg-deep: #070b17;
  --card: #141b33;
  --card-soft: #18213d;
  --nested: #11182f;
  --line: #283251;
  --line-strong: #35405f;
  --muted: #a8b3cf;
  --muted-strong: #c7d2ee;
  --text: #f2f5ff;
  --accent: #8bd3ff;
  --blue: #2d70d6;
  --warn: #ffd166;
  --good: #8cffb7;
  --bad: #ff8b8b;
  background: var(--bg);
}
.page-dashboard .site-header {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(203, 185, 157, .72);
}
.page-dashboard.dashboard-dark .site-header {
  background: rgba(7, 11, 23, .92);
  border-bottom-color: #27304d;
}
.page-dashboard .brand { color: #102033; }
.page-dashboard.dashboard-dark .brand { color: #fff; }
.page-dashboard .version-badge {
  color: #0f766e;
  background: rgba(15, 118, 110, .09);
  border-color: rgba(15, 118, 110, .25);
}
.page-dashboard.dashboard-dark .version-badge {
  color: #93c5fd;
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.35);
}
.page-dashboard .container { max-width: 1220px; }
.page-dashboard .card {
  box-shadow: 0 12px 30px rgba(47, 35, 20, .08);
}
.page-dashboard.dashboard-dark .card {
  box-shadow: 0 8px 24px #0003;
}
.fan-hero { margin-bottom: 1.25rem; }
.fan-hero-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(203, 185, 157, .82);
  padding: 1.05rem 1.15rem;
  background:
    radial-gradient(circle at 83% 12%, rgba(15, 118, 110, .18), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,249,239,.96));
}
.dashboard-dark .fan-hero-card {
  border-color: var(--line);
  background:
    radial-gradient(circle at 83% 12%, rgba(139, 211, 255, .18), transparent 18rem),
    linear-gradient(135deg, #141b33, #0d1327);
}
.fan-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(150px, .42fr);
  gap: 1rem;
  align-items: center;
}
.eyebrow,
.section-kicker {
  margin: 0 0 .35rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  font-weight: 900;
  color: var(--accent);
}
.fan-hero h1 {
  max-width: 720px;
  font-size: clamp(2rem, 3.85vw, 3.45rem);
  line-height: 1;
  letter-spacing: -.045em;
  margin-bottom: .6rem;
}
.hero-lede {
  max-width: 690px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  margin: 0;
}
.fan-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: .9rem;
}
.alert-channel-line {
  margin: .8rem 0 0;
  color: var(--muted-strong);
  font-size: .98rem;
}
.alert-channel-line a { font-weight: 800; }
.primary-action {
  background: #0f766e;
  border: 1px solid rgba(15, 118, 110, .25);
  color: #fff;
}
.secondary-action {
  background: rgba(255,255,255,.58);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.dashboard-dark .secondary-action {
  background: #26345e;
  color: var(--text);
}
.page-dashboard .nav-theme-toggle {
  border-color: rgba(15,118,110,.25);
  background: rgba(15,118,110,.08);
  color: #0f766e;
}
.page-dashboard.dashboard-dark .nav-theme-toggle {
  border-color: rgba(139,211,255,.24);
  background: rgba(139,211,255,.08);
  color: #dce7ff;
}
.fan-feature {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 999px;
  padding: .34rem .7rem;
  background: rgba(15, 118, 110, .07);
  color: var(--text);
  font-weight: 750;
  font-size: .88rem;
}
.dashboard-dark .fan-feature {
  border-color: rgba(139, 211, 255, .2);
  background: rgba(139, 211, 255, .07);
  color: var(--muted-strong);
}
.fan-hero-visual {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: .55rem;
  min-height: 150px;
  overflow: hidden;
}
.diamond {
  position: relative;
  width: min(14vw, 145px);
  min-width: 118px;
  aspect-ratio: 1;
  transform: rotate(45deg);
  border: 5px solid rgba(15, 118, 110, .75);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(21,128,61,.13), rgba(183,121,31,.12)),
    #fff7e6;
  box-shadow: inset 0 0 0 14px rgba(255,255,255,.42), 0 14px 28px rgba(47,35,20,.08);
}
.dashboard-dark .diamond {
  background: linear-gradient(135deg, rgba(140,255,183,.10), rgba(255,209,102,.10)), #11182f;
  border-color: rgba(139, 211, 255, .65);
}
.base,
.mound {
  position: absolute;
  display: block;
  background: #fff;
  border: 2px solid rgba(183,121,31,.7);
  box-shadow: 0 2px 8px rgba(47,35,20,.13);
}
.base {
  width: 13px;
  height: 13px;
}
.base-home { left: 50%; bottom: -10px; transform: translateX(-50%); }
.base-first { right: -10px; top: 50%; transform: translateY(-50%); }
.base-second { left: 50%; top: -10px; transform: translateX(-50%); }
.base-third { left: -10px; top: 50%; transform: translateY(-50%); }
.mound {
  width: 25px;
  height: 25px;
  border-radius: 999px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(183,121,31,.2);
}
.scoreboard-chip {
  border-radius: 999px;
  background: #172033;
  color: #fff;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .76rem;
  padding: .38rem .72rem;
}
.dashboard-dark .scoreboard-chip { background: #26345e; }
.watcher-details {
  margin-top: .85rem;
  border-top: 1px solid var(--line);
  padding-top: .7rem;
}
.watcher-details summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 800;
}
.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: .85rem;
}
.section-heading-row h2 { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.dashboard-column > h2 { border-bottom: 0; }
.section-count {
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.5);
  color: var(--muted-strong);
  font-weight: 800;
  padding: .25rem .65rem;
  white-space: nowrap;
}
.dashboard-dark .section-count { background: rgba(139, 211, 255, .07); }
.spaced-section { margin-top: 1.35rem; }
.fan-empty-state {
  display: flex;
  align-items: center;
  gap: .95rem;
  border-style: dashed;
}
.fan-empty-state h3 { margin-top: 0; }
.empty-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 118, 110, .10);
  font-size: 1.35rem;
  flex: 0 0 auto;
}
.compact-empty { display: block; }
.team-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  border-radius: 999px;
  padding: .24rem .55rem;
  background: #172033;
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  font-size: .86rem;
}
.dashboard-dark .team-code-pill { background: #26345e; }
.team-code-pill.mini { min-width: 2.35rem; padding: .16rem .42rem; font-size: .76rem; }
.matchup-row {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .75rem;
}
.small-matchup { margin-top: .6rem; }
.at-symbol {
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  font-weight: 800;
}
.fan-watch-card {
  border-left-width: 7px;
  border-radius: 18px;
}
.fan-ended-card { border-radius: 16px; }
.page-dashboard .active-watch.nohit {
  background: linear-gradient(105deg, rgba(183,121,31,.13), var(--card) 34%);
}
.page-dashboard .active-watch.perfect {
  background: linear-gradient(105deg, rgba(21,128,61,.13), var(--card) 34%);
}
.dashboard-dark .active-watch.nohit { background: linear-gradient(90deg, rgba(255, 209, 102, .075), rgba(20, 27, 51, 1) 34%); }
.dashboard-dark .active-watch.perfect { background: linear-gradient(90deg, rgba(140, 255, 183, .075), rgba(20, 27, 51, 1) 34%); }
.watch-headline {
  font-size: 1.06rem;
  color: var(--text);
}
.pitcher-line { color: var(--muted-strong); }
.page-dashboard .badge {
  background: rgba(23, 32, 51, .08);
  color: var(--text);
  border: 1px solid rgba(23, 32, 51, .12);
}
.page-dashboard .badge.good {
  background: rgba(21, 128, 61, .12);
  color: #166534;
  border-color: rgba(21,128,61,.22);
}
.page-dashboard .badge.warn {
  background: rgba(183, 121, 31, .13);
  color: #92400e;
  border-color: rgba(183,121,31,.24);
}
.dashboard-dark .badge { background: #26345e; color: #dce7ff; border-color: transparent; }
.dashboard-dark .badge.good { background: #17452a; color: #bfffd4; }
.dashboard-dark .badge.warn { background: #4c3c13; color: #ffe29c; }
.page-dashboard .mini-box,
.page-dashboard .score-card {
  background: rgba(255,255,255,.58);
  border-color: rgba(203, 185, 157, .72);
}
.dashboard-dark .mini-box,
.dashboard-dark .score-card { background: var(--card); border-color: var(--line); }
.fan-score-card { border-radius: 16px; }
.page-dashboard th { color: var(--text); }
.page-dashboard .score-table tr.leading-team td { background: rgba(15, 118, 110, .08); }
.page-dashboard .score-table tr.leading-team td:first-child { color: var(--text); }
.dashboard-dark .score-table tr.leading-team td { background: rgba(139, 211, 255, .08); }
.dashboard-dark .score-table tr.leading-team td:first-child { color: #fff; }

@media (max-width: 980px) {
  .fan-hero-content { grid-template-columns: 1fr; }
  .fan-hero-visual { display: none; }
}
@media (max-width: 760px) {
  .fan-hero h1 { font-size: 2.15rem; }
  .fan-cta-row .button-link { width: 100%; text-align: center; }
  .fan-empty-state { align-items: flex-start; }
  .section-heading-row { align-items: flex-start; }
}

/* v0.3.2 hero/header polish */
.site-header {
  display: block;
  padding: .72rem 1.25rem .62rem;
}
.header-primary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.05rem;
  flex-wrap: wrap;
  margin-top: .48rem;
}
.header-nav a {
  font-size: .94rem;
  font-weight: 650;
}
.theme-switch {
  width: auto;
  margin: 0;
  padding: .18rem .34rem;
  border-radius: 999px;
  border: 1px solid rgba(15,118,110,.26);
  background: rgba(15,118,110,.08);
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.theme-switch .theme-icon {
  font-size: .82rem;
  line-height: 1;
  opacity: .9;
}
.switch-track {
  width: 2.12rem;
  height: 1.08rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, .18);
  border: 1px solid rgba(15, 118, 110, .35);
  position: relative;
  display: inline-block;
}
.switch-knob {
  position: absolute;
  width: .82rem;
  height: .82rem;
  border-radius: 999px;
  background: #0f766e;
  left: .12rem;
  top: 50%;
  transform: translateY(-50%);
  transition: left .16s ease, background .16s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.theme-switch.is-dark .switch-knob { left: 1.04rem; background: #dce7ff; }
.page-dashboard.dashboard-dark .theme-switch {
  border-color: rgba(139,211,255,.26);
  background: rgba(139,211,255,.09);
  color: #dce7ff;
}
.page-dashboard.dashboard-dark .switch-track {
  background: rgba(139,211,255,.14);
  border-color: rgba(139,211,255,.32);
}
.fan-hero-content {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .92fr);
  gap: 1.05rem;
}
.fan-hero-card { padding: 1rem; }
.fan-hero-media {
  align-self: stretch;
  min-height: 218px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(203,185,157,.72);
  box-shadow: 0 12px 28px rgba(47,35,20,.13);
  background: #172033;
}
.dashboard-dark .fan-hero-media { border-color: rgba(139,211,255,.2); box-shadow: 0 12px 30px rgba(0,0,0,.24); }
.fan-hero-media picture,
.fan-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
}
.fan-hero-media img {
  object-fit: cover;
  object-position: center center;
}
/* The v0.3.0/v0.3.1 diamond is retained in CSS for rollback safety but no longer rendered. */
@media (max-width: 980px) {
  .fan-hero-content { grid-template-columns: 1fr; }
  .fan-hero-media { min-height: 220px; }
}
@media (max-width: 760px) {
  .site-header { padding: .65rem 1rem .58rem; }
  .header-primary { align-items: flex-start; }
  .brand { font-size: 1.12rem; }
  .tagline { font-size: .84rem; }
  .header-nav { gap: .85rem; }
  .fan-hero-media { min-height: 170px; }
  .fan-hero-media img { object-position: 38% center; }
}


/* v0.3.3 header/card polish */
.header-nav {
  justify-content: flex-end;
  text-align: right;
}
.page-dashboard:not(.dashboard-dark) .watch-team {
  color: #334155;
}
.page-dashboard:not(.dashboard-dark) .fan-ended-card .watch-team,
.page-dashboard:not(.dashboard-dark) .fan-watch-card .watch-team {
  color: #334155;
}
.page-dashboard:not(.dashboard-dark) .fan-ended-card .watch-team .team-badge,
.page-dashboard:not(.dashboard-dark) .fan-watch-card .watch-team .team-badge {
  color: #f8fafc;
}
@media (max-width: 760px) {
  .header-nav {
    justify-content: flex-start;
    text-align: left;
  }
}

/* v0.3.4 simulator/source-hygiene polish */
.watch-team .watch-team-code {
  margin-right: .38rem;
  vertical-align: middle;
  transform: translateY(-1px);
}
.page-dashboard:not(.dashboard-dark) .fan-ended-card .watch-team .watch-team-code,
.page-dashboard:not(.dashboard-dark) .fan-watch-card .watch-team .watch-team-code {
  color: #fff;
}
.simulation-banner {
  border: 2px solid rgba(183, 121, 31, .45);
  background: linear-gradient(105deg, rgba(183,121,31,.12), var(--card) 40%);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.simulation-warning {
  margin-bottom: 0;
  color: #92400e;
}
.dashboard-dark .simulation-warning { color: #ffe29c; }
.simulation-actions {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.simulation-picker form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: .75rem;
  align-items: end;
}
.simulation-picker label {
  grid-column: 1 / -1;
  margin-bottom: -.45rem;
}
.simulation-picker select,
.simulation-picker button {
  margin-bottom: 0;
}
.sim-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.sim-scenario-link {
  display: block;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--nested);
  color: var(--text);
}
.sim-scenario-link strong,
.sim-scenario-link span {
  display: block;
}
.sim-scenario-link span {
  color: var(--muted);
  font-size: .9rem;
  margin-top: .25rem;
}
.page-sim-dashboard .site-header {
  background: rgba(255, 251, 235, .96);
}
@media (max-width: 760px) {
  .simulation-banner,
  .simulation-actions {
    display: block;
  }
  .simulation-actions .button-link {
    margin-top: .45rem;
  }
  .simulation-picker form {
    grid-template-columns: 1fr;
  }
}

/* v0.3.5 team-color system and root-domain polish */
.team-code-pill.team-color {
  background: var(--team-primary, #172033);
  color: var(--team-contrast, #fff);
  border: 1px solid var(--team-secondary, rgba(255,255,255,.28));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 1px 2px rgba(15,23,42,.16);
}
.dashboard-dark .team-code-pill.team-color {
  background: var(--team-primary, #26345e);
  color: var(--team-contrast, #fff);
}
.team-code-pill.team-color.mini {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.watch.team-accent {
  border-left-color: var(--team-primary, var(--accent));
}
.page-dashboard .fan-watch-card.team-accent,
.page-dashboard .fan-ended-card.team-accent {
  border-left-color: var(--team-primary, var(--accent));
}
.page-dashboard .fan-watch-card.team-accent {
  background: linear-gradient(105deg, rgba(var(--team-primary-rgb, 23,32,51), .13), var(--card) 36%);
}
.page-dashboard .fan-ended-card.team-accent {
  background: linear-gradient(105deg, rgba(var(--team-primary-rgb, 23,32,51), .08), var(--card) 34%);
}
.dashboard-dark.page-dashboard .fan-watch-card.team-accent {
  background: linear-gradient(90deg, rgba(var(--team-primary-rgb, 23,32,51), .16), rgba(20, 27, 51, 1) 36%);
}
.dashboard-dark.page-dashboard .fan-ended-card.team-accent {
  background: linear-gradient(90deg, rgba(var(--team-primary-rgb, 23,32,51), .12), rgba(20, 27, 51, 1) 34%);
}
.page-dashboard:not(.dashboard-dark) .fan-ended-card .watch-team .watch-team-code.team-color,
.page-dashboard:not(.dashboard-dark) .fan-watch-card .watch-team .watch-team-code.team-color {
  color: var(--team-contrast, #fff);
}

/* v0.3.6 theme and team-pill polish */
.page-light {
  --bg: #f7f2e8;
  --bg-deep: #ffffff;
  --card: #fffdfa;
  --card-soft: #fff7ec;
  --nested: #f2eadc;
  --line: #e2d4bf;
  --line-strong: #cbb99d;
  --muted: #667085;
  --muted-strong: #475467;
  --text: #172033;
  --accent: #0f766e;
  --blue: #0f766e;
  --warn: #b7791f;
  --good: #15803d;
  --bad: #b42318;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, .08), transparent 32rem),
    linear-gradient(180deg, #fffdf8 0%, #f7f2e8 70%, #f2eadc 100%);
}
.page-light .site-header {
  background: rgba(255,255,255,.92);
  border-bottom-color: rgba(203,185,157,.72);
  backdrop-filter: blur(10px);
}
.page-light .brand { color: #102033; }
.page-light .version-badge {
  color: #0f766e;
  background: rgba(15, 118, 110, .09);
  border-color: rgba(15, 118, 110, .25);
}
.page-light .card,
.page-light .preference-card,
.page-light .favorite-team-row,
.page-light .sim-scenario-link {
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 10px 24px rgba(47,35,20,.06);
}
.page-light input,
.page-light select,
.page-light textarea {
  background: #fffdf8;
  color: var(--text);
  border-color: var(--line-strong);
}
.page-light button { color: #fff; }
.page-light .secondary-button {
  background: rgba(255,255,255,.72);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.page-light th { color: var(--text); }
.page-light code {
  color: #172033;
  background: rgba(15,118,110,.08);
}
.page-light .success-message { color: #166534; background: rgba(34,197,94,.12); }
.page-light .error-message { color: #991b1b; background: rgba(239,68,68,.10); }
.page-light .prominent-check {
  background: rgba(15,118,110,.07);
  border-color: rgba(15,118,110,.18);
}

/* Dashboard and dashboard simulation are the only theme-aware pages. */
.page-dashboard .theme-switch { display: inline-flex; }
.page-light .theme-switch { display: none; }

/* Larger, more visible team pills on watch/bid surfaces; compact scoreboard pills stay smaller. */
.team-code-pill {
  min-width: 3.05rem;
  padding: .28rem .68rem;
  font-size: .9rem;
  border-radius: 999px;
  line-height: 1.05;
}
.team-code-pill.team-color {
  border: 2px solid var(--team-secondary, rgba(255,255,255,.38));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 1px 2px rgba(15,23,42,.18);
}
.team-code-pill.team-color.mini {
  min-width: 2.48rem;
  padding: .18rem .46rem;
  font-size: .77rem;
  border-width: 1.5px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.watch-team .watch-team-code {
  margin-right: .48rem;
}
.matchup-row {
  gap: .52rem;
}

/* Give the live/simulated watch surface more presence in light mode. */
.page-dashboard:not(.dashboard-dark) .fan-empty-state {
  background: linear-gradient(105deg, rgba(15,118,110,.075), rgba(255,255,255,.76));
  border-color: rgba(15,118,110,.24);
}
.page-dashboard:not(.dashboard-dark) .empty-icon {
  background: rgba(15,118,110,.15);
  box-shadow: inset 0 0 0 1px rgba(15,118,110,.18);
}
.page-dashboard:not(.dashboard-dark) .fan-watch-card.team-accent {
  border-left-width: 9px;
  background:
    linear-gradient(105deg, rgba(var(--team-primary-rgb, 23,32,51), .20), rgba(255,255,255,.82) 44%),
    var(--card);
  box-shadow: 0 14px 34px rgba(47,35,20,.12), inset 0 0 0 1px rgba(var(--team-primary-rgb, 23,32,51), .08);
}
.page-dashboard:not(.dashboard-dark) .fan-ended-card.team-accent {
  border-left-width: 7px;
  background:
    linear-gradient(105deg, rgba(var(--team-primary-rgb, 23,32,51), .105), rgba(255,255,255,.72) 38%),
    var(--card);
}
.page-dashboard:not(.dashboard-dark) .live-pill {
  color: #7c2d12;
  background: rgba(245,158,11,.14);
  border-color: rgba(245,158,11,.34);
}
.page-dashboard:not(.dashboard-dark) .simulation-banner {
  background: linear-gradient(105deg, rgba(183,121,31,.14), rgba(255,255,255,.82) 42%);
}
.page-sim-dashboard.dashboard-dark .site-header,
.page-dashboard.dashboard-dark.page-sim-dashboard .site-header {
  background: rgba(7, 11, 23, .92);
  border-bottom-color: #27304d;
}
.page-sim-dashboard.dashboard-dark .simulation-banner,
.page-dashboard.dashboard-dark.page-sim-dashboard .simulation-banner {
  background: linear-gradient(105deg, rgba(255,209,102,.10), var(--card) 42%);
}

/* v0.3.7 admin polish */
.admin-inline-details {
  margin-top: .25rem;
  font-size: .78rem;
}
.admin-inline-details summary {
  cursor: pointer;
  color: var(--muted-strong, var(--muted));
  font-weight: 700;
}
.admin-inline-details code {
  display: block;
  margin-top: .25rem;
  white-space: normal;
  word-break: break-word;
}
.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}
.admin-status-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .8rem;
  background: rgba(255,255,255,.38);
}
.admin-status-item .label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-status-item .value {
  margin-top: .25rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.admin-status-item .detail {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .84rem;
  overflow-wrap: anywhere;
}

/* v0.3.8 SEO / trust / public-launch polish */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem 1rem;
  margin-bottom: .8rem;
  font-weight: 750;
}
.footer-nav a { color: inherit; text-decoration: underline; }
.seo-intro {
  margin: .75rem 0 0;
  color: var(--muted-strong);
  max-width: 64ch;
}
.how-it-works-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: -0.5rem 0 1.35rem;
}
.info-chip {
  border: 1px solid rgba(15,118,110,.18);
  border-radius: 14px;
  padding: .82rem .95rem;
  background: rgba(255,255,255,.58);
  box-shadow: 0 8px 20px rgba(47,35,20,.05);
}
.info-chip strong {
  display: block;
  color: var(--text);
  margin-bottom: .22rem;
}
.info-chip span { color: var(--muted); font-size: .92rem; }
.dashboard-dark .seo-intro { color: var(--muted-strong); }
.dashboard-dark .info-chip {
  background: rgba(20,27,51,.88);
  border-color: rgba(139,211,255,.16);
}
.public-info-page .card > p:first-child { margin-top: 0; }
.public-info-page h2 { margin-top: 1.6rem; }
@media (max-width: 800px) {
  .how-it-works-strip { grid-template-columns: 1fr; }
}

/* v0.3.10 dashboard layout hotfix */
.header-action-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .34rem;
  flex: 1 1 auto;
  min-width: 0;
}
.header-action-stack .theme-switch {
  align-self: flex-end;
}
.header-action-stack .header-nav,
.header-action-stack .header-subnav {
  justify-content: flex-end;
  text-align: right;
  margin-top: 0;
}

/* v0.3.9 public copy / navigation / trust polish */
.header-subnav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .95rem;
  flex-wrap: wrap;
  margin-top: 0;
  font-size: .86rem;
}
.header-subnav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.header-subnav a:hover { color: var(--teal); text-decoration: underline; }
#refresh-countdown {
  display: inline-block;
  margin: 0;
  color: inherit;
  font-size: inherit;
  white-space: nowrap;
}
.hero-bullet-card {
  margin-top: .82rem;
  color: var(--muted-strong);
  max-width: 66ch;
}
.hero-bullet-card p {
  margin: 0 0 .45rem;
}
.hero-bullet-card ul {
  margin: 0;
  padding-left: 1.15rem;
}
.hero-bullet-card li {
  margin: .22rem 0;
}
.dashboard-dark .hero-bullet-card { color: var(--muted-strong); }
.pushover-section-stack {
  display: grid;
  gap: 1rem;
}
.pushover-info-section {
  max-width: 100%;
}
.pushover-info-section h2 {
  margin-top: 0;
}
.pushover-info-section p:last-child,
.pushover-info-section ol:last-child,
.pushover-info-section ul:last-child {
  margin-bottom: 0;
}
.setup-steps-list {
  columns: 2;
  column-gap: 2rem;
}
.setup-steps-list li {
  break-inside: avoid;
  margin-bottom: .45rem;
}
.manage-settings-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.manage-settings-card .action-row {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin: .15rem 0 0;
}
@media (max-width: 760px) {
  .header-action-stack {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
  }
  .header-action-stack .theme-switch {
    align-self: flex-start;
  }
  .header-action-stack .header-nav,
  .header-action-stack .header-subnav,
  .header-subnav {
    justify-content: flex-start;
    text-align: left;
    gap: .55rem .85rem;
  }
  .setup-steps-list {
    columns: 1;
  }
  .manage-settings-card {
    display: block;
  }
  .manage-settings-card .action-row {
    justify-content: flex-start;
    margin-top: .75rem;
  }
}


/* v0.3.11 dashboard layout hotfix */
.watcher-details .status-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .36rem;
  margin-top: .82rem;
}
.watcher-details .status-strip > div {
  padding: .48rem .42rem;
  border-radius: 9px;
}
.watcher-details .status-strip span {
  font-size: .7rem;
  line-height: 1.15;
  margin-bottom: .16rem;
}
.watcher-details .status-strip strong {
  font-size: .76rem;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watcher-details .status-strip .refresh-countdown-value,
.watcher-details .status-strip #refresh-countdown {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  overflow: visible;
  text-overflow: clip;
}
.fan-hero-media {
  background: #101827;
}
.fan-hero-media picture {
  background: #101827;
}
.fan-hero-media img {
  object-fit: contain;
  object-position: center center;
  background: #101827;
}
@media (max-width: 980px) {
  .watcher-details .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .watcher-details .status-strip { grid-template-columns: 1fr; }
}


/* v0.3.12 hero image fit polish */
.fan-hero-media {
  align-self: center;
  min-height: 0;
  background: transparent;
}
.fan-hero-media picture {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
}
.fan-hero-media img {
  width: 100%;
  height: auto;
  object-fit: initial;
  object-position: center center;
  background: transparent;
}
@media (max-width: 980px) {
  .fan-hero-media { min-height: 0; }
}
@media (max-width: 760px) {
  .fan-hero-media { min-height: 0; }
  .fan-hero-media img { height: auto; object-position: center center; }
}

/* v0.4.1 admin users / diagnostics polish */
.status-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  align-items: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .12rem .42rem;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
  background: rgba(15, 23, 42, .06);
  color: var(--text);
  white-space: nowrap;
}
.status-pill.good {
  color: #065f46;
  border-color: rgba(5, 150, 105, .28);
  background: rgba(16, 185, 129, .12);
}
.status-pill.warn {
  color: #7c2d12;
  border-color: rgba(245, 158, 11, .32);
  background: rgba(245, 158, 11, .14);
}
.admin-status-note { margin-top: .35rem; }
.admin-action-list {
  display: flex;
  flex-direction: column;
  gap: .38rem;
  min-width: 170px;
}
.admin-action-list form { margin: 0; }
.admin-action-list .secondary-button,
.confirm-action-row .secondary-button {
  text-align: center;
}
.admin-action-list .secondary-button {
  width: 100%;
}
.confirm-action-card {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.confirm-target-box {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.45);
  border-radius: 12px;
  padding: .8rem .9rem;
  margin: 1rem 0;
}
.confirm-status-pills { margin-top: .45rem; }
.confirm-action-form {
  margin-top: 1rem;
}
.confirm-action-form label {
  display: block;
  margin: .75rem 0 .25rem;
  font-weight: 800;
}
.confirm-action-form input {
  width: 100%;
}
.confirm-action-row {
  margin-top: 1rem;
  justify-content: flex-end;
}
.diag-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .85rem;
}
.diag-health-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .9rem;
  background: rgba(255,255,255,.44);
  min-width: 0;
}
.diag-health-item h3 {
  margin: 0 0 .25rem;
  font-size: 1rem;
}
.diag-kv-list {
  margin: .65rem 0 0;
}
.diag-kv-list div {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  border-top: 1px solid var(--line);
  padding: .4rem 0;
}
.diag-kv-list dt {
  font-weight: 800;
  color: var(--muted-strong, var(--muted));
}
.diag-kv-list dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.diag-raw code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 760px) {
  .confirm-action-row { justify-content: stretch; }
  .confirm-action-row .secondary-button,
  .confirm-action-row button { width: 100%; }
}

/* v0.4.2 mobile header / dashboard polish */
@media (max-width: 760px) {
  .site-header {
    padding: .58rem .86rem .5rem;
  }
  .header-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem .75rem;
    align-items: start;
  }
  .header-brand-block {
    min-width: 0;
  }
  .brand-row {
    gap: .36rem .5rem;
  }
  .brand {
    font-size: 1.02rem;
    line-height: 1.15;
    letter-spacing: -.02em;
  }
  .version-badge {
    font-size: .72rem;
    padding: 1px 7px;
    margin-top: 0;
  }
  .tagline {
    max-width: 16.5rem;
    font-size: .80rem;
    line-height: 1.22;
    margin-top: .22rem;
  }
  .header-action-stack {
    width: auto;
    align-items: flex-end;
    gap: .36rem;
  }
  .header-action-stack .theme-switch {
    align-self: flex-end;
    transform: scale(.92);
    transform-origin: right center;
  }
  .header-action-stack .header-nav {
    justify-content: flex-end;
    text-align: right;
    gap: .28rem .78rem;
    max-width: 11.5rem;
  }
  .header-action-stack .header-nav a {
    font-size: .91rem;
    line-height: 1.18;
    font-weight: 780;
  }
  .header-action-stack .header-subnav,
  .header-subnav {
    display: none;
  }
  .page-dashboard .container {
    padding-top: .78rem;
  }
  .fan-hero {
    margin-bottom: 1rem;
  }
  .fan-hero-card {
    padding: .86rem;
    border-radius: 18px;
  }
  .fan-hero h1 {
    font-size: clamp(1.86rem, 9vw, 2.05rem);
    line-height: 1.04;
    letter-spacing: -.04em;
    margin-bottom: .55rem;
  }
  .hero-lede {
    font-size: .98rem;
    line-height: 1.42;
  }
  .hero-bullet-card {
    margin-top: .72rem;
  }
  .hero-bullet-card li {
    margin: .18rem 0;
  }
  .alert-channel-line {
    margin-top: .7rem;
  }
  .fan-cta-row {
    margin-top: .75rem;
  }
}

@media (max-width: 420px) {
  .header-action-stack .header-nav {
    max-width: 9.8rem;
    gap: .28rem .62rem;
  }
  .header-action-stack .header-nav a {
    font-size: .88rem;
  }
  .tagline {
    max-width: 13rem;
  }
}


/* v0.5.1 browser push setup polish */
.push-setup-card h2 { margin-top: 0; }
.platform-steps { margin: .65rem 0 0; padding-left: 1.35rem; }
.platform-steps li { margin: .45rem 0; }
.web-push-card #pgw-push-help { max-width: 72ch; }
@media (max-width: 760px) {
  .push-setup-card { padding: 1.05rem; }
  .platform-steps { padding-left: 1.15rem; }
}

/* v0.5.2 account alert/browser push polish */
.alert-top-grid { align-items: start; }
.email-preference-line {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 1.62rem;
}
.email-preference-line .check-row { margin-top: 0; }
.browser-push-preference-form {
  margin: .8rem 0 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.browser-device-controls {
  padding: .25rem 0 .8rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .9rem;
}
.browser-device-list h3,
.browser-device-controls h3 { margin-bottom: .25rem; }
.inline-mini-form { margin: 0; }
.inline-mini-form button { margin: 0; }
.browser-device-list form:last-child { margin-top: .75rem; }
@media (max-width: 820px) {
  .email-preference-line { padding-top: 0; }
}


/* v0.5.3 hero copy and Home Screen icon polish */
.app-icon-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.app-icon-preview {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(15, 35, 55, 0.18);
  flex: 0 0 auto;
}
@media (max-width: 640px) {
  .app-icon-preview-row {
    align-items: flex-start;
  }
  .app-icon-preview {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
}


/* v0.5.4 mobile hero order polish */
.fan-hero-media-mobile { display: none; }
@media (max-width: 760px) {
  .fan-hero-media-mobile {
    display: block;
    margin: .7rem 0 .75rem;
  }
  .fan-hero-media-desktop {
    display: none;
  }
}

/* v0.5.8 registration honeypot: available to simple form bots, off-screen for people. */
.registration-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* v0.6.0 admin and mobile usability polish */
.page-admin .container {
  width: min(1180px, calc(100% - 2rem));
}
.admin-home-card {
  padding-bottom: 1.15rem;
}
.admin-launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin-top: 1rem;
  max-width: 760px;
}
.admin-launch-grid .button-link {
  display: flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-align: center;
  line-height: 1.2;
}
.page-admin .card > h1,
.page-admin .card > h2 {
  margin-bottom: .45rem;
}
.page-admin .card > .muted:first-of-type {
  margin-top: 0;
}
.page-admin .button-row {
  gap: .55rem;
}
.page-admin .table-scroll {
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
.page-admin table th,
.page-admin table td {
  vertical-align: top;
}
.page-admin code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.page-admin .admin-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}
.page-admin .admin-status-item {
  padding: .72rem .78rem;
}
.page-admin .admin-status-item .value {
  line-height: 1.25;
}
.page-admin .diag-health-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.page-admin .diag-health-item {
  padding: .8rem;
}
.page-admin .diag-health-item .small {
  margin: .1rem 0 .45rem;
}
.page-admin .diag-kv-list {
  margin-top: .45rem;
}
.page-admin .diag-kv-list div {
  align-items: flex-start;
  padding: .34rem 0;
}
.page-admin .admin-inline-details {
  margin-top: .55rem;
}
.page-admin .admin-inline-details code {
  max-height: 14rem;
  overflow: auto;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, .04);
}

@media (max-width: 760px) {
  .page-admin .container {
    width: min(100% - 1rem, 1180px);
  }
  .page-admin .card {
    padding: 1rem;
    border-radius: 16px;
  }
  .page-admin .card + .card {
    margin-top: .85rem;
  }
  .page-admin h1 {
    font-size: 1.85rem;
  }
  .page-admin h2 {
    font-size: 1.35rem;
  }
  .admin-launch-grid {
    gap: .55rem;
  }
  .admin-launch-grid .button-link {
    min-height: 3rem;
    padding: .7rem .55rem;
    font-size: .98rem;
  }
  .page-admin .admin-status-grid,
  .page-admin .diag-health-grid {
    grid-template-columns: 1fr;
    gap: .65rem;
  }
  .page-admin .admin-status-item {
    padding: .72rem;
  }
  .page-admin .admin-status-item .label {
    font-size: .72rem;
  }
  .page-admin .admin-status-item .detail {
    margin-top: .15rem;
  }
  .page-admin .diag-health-item {
    padding: .75rem;
  }
  .page-admin .diag-kv-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .55rem;
  }
  .page-admin .diag-kv-list dd {
    min-width: 0;
  }
  .page-admin .button-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .page-admin .button-row button,
  .page-admin .button-row .button-link,
  .page-admin .button-row .secondary-button {
    width: 100%;
    margin: 0;
    text-align: center;
  }
  .page-admin .badge-row {
    gap: .4rem;
  }
  .page-admin .badge-row .badge {
    margin: 0;
  }
  .page-admin .table-scroll {
    margin-left: -.2rem;
    margin-right: -.2rem;
  }
  .page-admin table {
    font-size: .88rem;
  }
  .page-admin table th,
  .page-admin table td {
    padding: .55rem .5rem;
  }
}

@media (max-width: 380px) {
  .admin-launch-grid {
    grid-template-columns: 1fr;
  }
}
