/* FullTape — Ink Boxscore Desk
   Bright newsprint / box-score / broadcast lower-third.
   Deliberately unlike dark-glass labs (cagespar, snowlab, aerotail, ninoprep). */

:root {
  --paper: #f4efe3;
  --paper-deep: #ebe3d2;
  --ink: #1a1a1a;
  --ink-soft: #3d3a34;
  --rule: #1a1a1a;
  --viral: #e8571a;
  --viral-wash: #fde8dc;
  --full: #0d6e6e;
  --full-wash: #d8efef;
  --league: #5a4a2e;
  --stamp-red: #c41e1e;
  --fair: #2f6b3a;
  --skew: #c47a12;
  --extreme: #a31616;
  --white: #fffdf6;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Libre Franklin", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --display: "Archivo Black", Impact, sans-serif;
  --max: 1080px;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  position: relative;
}

.paper-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(26, 26, 26, 0.015) 2px,
      rgba(26, 26, 26, 0.015) 3px
    ),
    radial-gradient(ellipse at 20% 0%, rgba(232, 87, 26, 0.06), transparent 50%),
    radial-gradient(ellipse at 90% 40%, rgba(13, 110, 110, 0.05), transparent 45%);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Masthead (newspaper) —— */
.masthead {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 0.75rem;
}

.mast-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.mast-brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.mast-brand:hover { color: var(--viral); }

.mast-rule {
  height: 0;
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0.55rem 0;
}
.mast-rule.thick {
  border-top-width: 3px;
  border-bottom: 1px solid var(--rule);
  height: 4px;
  margin: 0.4rem 0 0.85rem;
}

.mast-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tagline {
  margin: 0;
  max-width: 16rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: right;
}

.lede-strip {
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--viral);
  font-family: var(--serif);
  font-size: 1.02rem;
}

/* —— Ticker (broadcast lower-third) —— */
.ticker {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  max-width: var(--max);
  margin: 0.75rem auto 0;
  background: var(--ink);
  color: var(--paper);
  min-height: 2.4rem;
  overflow: hidden;
}

.ticker-bug {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  background: var(--viral);
  color: #fff;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.ticker-track {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— Desk / sheets —— */
.desk {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.sheet {
  background: var(--white);
  border: 2px solid var(--rule);
  box-shadow: 4px 4px 0 rgba(26, 26, 26, 0.08);
  padding: 1rem 1.15rem 1.2rem;
}

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px double var(--rule);
}

.sheet-head.tight {
  margin-bottom: 0.6rem;
}

.sheet-head h2,
.ref-sheet > h2,
.guide-sheet > h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tiny {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
  max-width: 22rem;
}

/* Buttons */
.ink-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border: 1.5px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius);
}
.ink-btn:hover { background: var(--paper-deep); }
.ink-btn.active {
  background: var(--ink);
  color: var(--paper);
}
.ink-btn.solid {
  background: var(--viral);
  border-color: var(--viral);
  color: #fff;
}
.ink-btn.solid:hover { filter: brightness(1.05); }

.preset-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.slug-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 0.85rem;
}

@media (max-width: 640px) {
  .slug-grid { grid-template-columns: 1fr; }
  .tagline { text-align: left; max-width: none; }
}

.ink-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.ink-field input,
.stat-inputs input,
.ref-pick select,
.ab-picks select {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius);
  width: 100%;
}

.ink-field input:focus,
.stat-inputs input:focus,
.ref-pick select:focus,
.ab-picks select:focus {
  outline: 2px solid var(--viral);
  outline-offset: 1px;
}

.cite-line {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.cite-line a { color: var(--full); }

/* Dual box scores */
.dual-score {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 720px) {
  .dual-score { grid-template-columns: 1fr; }
}

.boxscore {
  border: 2px solid var(--rule);
  background: var(--paper);
  padding: 0.75rem 0.85rem 0.9rem;
}

.boxscore.viral { border-top: 5px solid var(--viral); }
.boxscore.full { border-top: 5px solid var(--full); }

.box-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.65rem;
}

.box-stamp {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.45rem;
  background: var(--viral);
  color: #fff;
}
.box-stamp.teal { background: var(--full); }

.box-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  text-transform: uppercase;
}

.stat-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.stat-inputs label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.box-note {
  margin: 0.55rem 0 0.45rem;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-soft);
}

.mini-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rule);
}

.mini-line div {
  display: flex;
  flex-direction: column;
}

.mini-line dt {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.mini-line dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
}

.boxscore.viral .mini-line dd { color: var(--viral); }
.boxscore.full .mini-line dd { color: var(--full); }

/* Readout */
.ref-pick {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.ref-pick select { width: auto; min-width: 12rem; }

.readout-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
}

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

.panel-kicker {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bar-rows { display: flex; flex-direction: column; gap: 0.7rem; }

.bar-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 3.2rem;
  align-items: center;
  gap: 0.5rem;
}

.bar-lab {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.bar-track {
  height: 1.35rem;
  background: var(--paper-deep);
  border: 1.5px solid var(--rule);
  position: relative;
}

.bar-fill {
  height: 100%;
  min-width: 0;
  transition: width 0.35s ease;
}
.bar-fill.viral { background: var(--viral); }
.bar-fill.full { background: var(--full); }
.bar-fill.league {
  background: repeating-linear-gradient(
    -45deg,
    var(--league),
    var(--league) 4px,
    #8a7858 4px,
    #8a7858 8px
  );
}

.bar-val {
  font-family: var(--display);
  font-size: 0.95rem;
  text-align: right;
}

/* Bias meter */
.bias-panel {
  border: 2px solid var(--rule);
  padding: 0.75rem 0.85rem;
  background: linear-gradient(180deg, var(--white), var(--viral-wash));
}

.bias-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  color: var(--ink-soft);
}

.bias-track {
  position: relative;
  height: 1.1rem;
  border: 1.5px solid var(--rule);
  background: linear-gradient(90deg, var(--fair), var(--skew), var(--extreme));
}

.bias-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.bias-needle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  background: var(--ink);
  left: 0%;
  transform: translateX(-50%);
  transition: left 0.35s ease;
  box-shadow: 0 0 0 1px var(--white);
}

.bias-score {
  margin: 0.65rem 0 0.15rem;
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--stamp-red);
}
.bias-score small {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-left: 0.15rem;
}

.bias-label {
  margin: 0 0 0.65rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
}

.bias-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}
.bias-facts li {
  padding: 0.3rem 0;
  border-top: 1px dotted rgba(26, 26, 26, 0.25);
}
.bias-facts strong { font-family: var(--mono); }

.bias-explain {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* Viz */
.viz-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

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

.court-frame {
  border: 2px solid var(--rule);
  background: #1e4d2b;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.court-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.court-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.leg::before {
  content: "";
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.35rem;
  vertical-align: -0.05rem;
  border: 1px solid var(--rule);
}
.leg.make::before { background: #f5c518; border-radius: 50%; }
.leg.miss::before { background: #e8571a; border-radius: 50%; }
.leg.viral-tag::before { background: var(--viral-wash); }
.leg.full-tag::before { background: var(--full-wash); }

.lib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.toast {
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--full-wash);
  border: 1px solid var(--full);
}

.case-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  max-height: 11rem;
  overflow: auto;
  border: 1.5px solid var(--rule);
  background: var(--paper);
}

.case-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(26, 26, 26, 0.12);
  font-size: 0.82rem;
}

.case-list li:last-child { border-bottom: 0; }

.case-list .case-meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ink-soft);
}

.case-list .case-btns {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.case-list button {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--rule);
  background: var(--white);
  cursor: pointer;
}

.ab-box {
  border: 2px dashed var(--rule);
  padding: 0.7rem 0.75rem;
  background: var(--paper);
}

.ab-box h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.ab-picks {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.ab-picks label {
  display: grid;
  gap: 0.2rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.ab-out {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.ab-out table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.ab-out th, .ab-out td {
  border: 1px solid var(--rule);
  padding: 0.3rem 0.4rem;
  text-align: left;
}
.ab-out th { background: var(--paper-deep); }

/* Reference table */
.ref-intro {
  margin: 0 0 0.65rem;
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.table-scroll { overflow-x: auto; }

.ink-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ink-table th,
.ink-table td {
  border: 1.5px solid var(--rule);
  padding: 0.4rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.ink-table th {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
}

.ink-table tbody tr:nth-child(even) { background: var(--paper); }

.ink-table a { color: var(--full); }

.source-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
}
.source-list a { color: var(--full); }

/* Guide */
.guide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .guide-cols { grid-template-columns: 1fr; }
}

.guide-sheet h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--viral);
}

.guide-sheet article > h3:not(:first-child) { margin-top: 1rem; }

.guide-sheet p,
.guide-sheet li {
  font-family: var(--serif);
  font-size: 0.92rem;
}

.guide-sheet ol,
.guide-sheet ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.guide-sheet li { margin-bottom: 0.35rem; }

/* Footer — Technology 83 only */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  text-align: center;
  border-top: 3px double var(--rule);
  padding-top: 1rem;
}

.site-footer p { margin: 0; }

.site-footer a {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.site-footer a:hover { color: var(--viral); }

@media (prefers-reduced-motion: reduce) {
  .bar-fill, .bias-needle { transition: none; }
}

.mast-hero{display:block;width:100%;max-height:220px;object-fit:cover;border-bottom:3px double #111;margin:0;}
