/* ExtraInnings design system — "modern ballpark".
   Navy + white like a home uniform, one red accent (logo stitches, calendar month), amber = activity.
   Meaning is never carried by red vs green: about 1 in 12 men can't tell them apart.
   Text colors are checked to WCAG AA (4.5:1) on the surfaces they sit on. */
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
:root {
  --bg: #f5f7fa;          /* page */
  --surface: #ffffff;     /* cards */
  --surface-2: #eef2f7;   /* chips, date blocks, subtle fills */
  --ink: #0f172a;         /* main text */
  --muted: #526071;       /* secondary text */
  --line: #dde3ea;        /* borders */
  --brand: #0b2545;       /* navy: header, primary buttons */
  --brand-2: #13315c;     /* navy hover */
  --link: #1d4ed8;
  --on-brand: #ffffff;
  --accent: #c8102e;      /* baseball red */
  --active-bg: #fff4d6;   /* "looking" pill */
  --active-ink: #8a4b00;
  --active: #d97706;      /* activity stripe / dot */
  --danger: #b42318;
  --ok-bg: #e8f5ee;
  --ok-ink: #11643a;
  --warn-bg: #fff1e6;
  --warn-ink: #9a3412;
  --warn-line: #f0a36b;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 2px 8px rgb(15 23 42 / .04);
  --display: "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #121b2d; --surface-2: #1a2540; --ink: #e8edf5; --muted: #9aa8bd; --line: #24314d;
    --link: #8ab4ff; --accent: #ff8a9a;
    --active-bg: #3a2604; --active-ink: #ffd27a; --active: #f59e0b;
    --danger: #ff8a80; --ok-bg: #0f2a1c; --ok-ink: #8fe0b0; --warn-bg: #3a1d0b; --warn-ink: #ffb68a; --warn-line: #b8602a;
    --shadow: none; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 2px; }
img, svg { max-width: 100%; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 56px; min-height: 70vh; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; font-weight: 800; overflow-wrap: anywhere; }
/* Ballpark lettering: condensed caps for page and section headings. */
h1, h2 { font-family: var(--display); text-transform: uppercase; }
h1 { font-size: clamp(2.1rem, 7vw, 3rem); line-height: 1; letter-spacing: .005em; margin: .2em 0 .4em; }
h2 { font-size: 1.55rem; letter-spacing: .02em; margin: 1.6em 0 .6em; }
h3 { font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.fine { font-size: .82rem; color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow { max-width: 620px; margin: 0 auto; }
.prose p, .prose li { max-width: 65ch; }

/* ---------- Header ---------- */
.site-header { background: var(--brand); color: var(--on-brand); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--on-brand); text-decoration: none; font-family: var(--display); font-size: 1.45rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.ball { display: block; }
.brand-ball { flex: none; width: 28px; height: 28px; color: #ffffff; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .brand-ball { transform: rotate(360deg); }
.nav { display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: .95rem; }
.nav a { color: var(--on-brand); text-decoration: none; opacity: .9; white-space: nowrap; }
.nav a:hover { opacity: 1; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #ffd27a; color: #3a2604; font-weight: 800; font-size: .75rem; line-height: 20px; text-align: center; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; background: var(--surface); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 20px 16px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--brand); color: var(--on-brand); font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: background .12s, transform .12s; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
@media (prefers-color-scheme: dark) { .btn { background: #e8edf5; color: #0b2545; } .btn:hover { background: #ffffff; } }
:root { --focus: #1d4ed8; }
@media (prefers-color-scheme: dark) { :root { --focus: #ffd27a; } }
.site-header, .hero { --focus: #ffd27a; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-ghost, .btn-ghost:hover { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.site-header .btn-small { background: #ffffff; color: #0b2545; }
.btn-big { min-height: 52px; padding: 0 26px; font-size: 1.05rem; }
.btn-danger { background: var(--danger); color: #fff; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--link); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.text-link { font-weight: 600; }

/* ---------- Home ---------- */
.hero { padding: 16px 0 8px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; }
.lede { font-size: 1.08rem; max-width: 60ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 20px 0 26px; }
@media (max-width: 560px) { .btn-big { width: 100%; } .hero-actions { flex-direction: column; align-items: stretch; text-align: center; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { margin-bottom: .5em; }
.section-head a { font-weight: 600; }

.how { margin-top: 36px; }
.steps { list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .95rem; }
@media (prefers-color-scheme: dark) { .step-n { background: #e8edf5; color: #0b2545; } }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

/* ---------- Tournament cards ---------- */
.t-list { display: grid; gap: 10px; }
.t-card { display: grid; grid-template-columns: 60px 1fr; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.t-card:hover { border-color: #9fb0c6; transform: translateY(-1px); }
@media (prefers-color-scheme: dark) { .t-card:hover { border-color: #3a4d72; } }
/* Only tournaments with people looking get an accent, so activity is what stands out. */
.t-card.is-active { box-shadow: inset 4px 0 0 var(--active), var(--shadow); }
.t-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.t-month { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.t-day { font-size: 1.5rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.t-when { font-size: 1rem; font-weight: 700; color: var(--ink); }
.t-when .t-days { font-weight: 500; color: var(--muted); }
.t-meta { color: var(--muted); font-size: .92rem; }
.t-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
.t-divs { font-size: .82rem; color: var(--muted); }
.org-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); }

/* "N looking": the most useful signal on the site, visible on every screen size. */
.looking { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; padding: 2px 10px 2px 8px; border-radius: 999px; background: var(--active-bg); color: var(--active-ink); font-size: .8rem; font-weight: 700; }
.looking-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--active); box-shadow: 0 0 0 0 rgb(217 119 6 / .55); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgb(217 119 6 / 0); } 100% { box-shadow: 0 0 0 0 rgb(217 119 6 / 0); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: .8rem; font-weight: 600; }
.chip-warn { background: var(--warn-bg); color: var(--warn-ink); }
/* Month headings: big ballpark lettering with a red stitch line running out to the edge. */
.month { display: flex; align-items: center; gap: 14px; margin: 1.9em 0 .75em; font-family: var(--display); font-size: 1.55rem; font-weight: 800; line-height: 1; color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }
.month::after { content: ""; flex: 1; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 6'%3E%3Cpath d='M0 3h20' stroke='%23c8102e' stroke-width='1.5'/%3E%3Cpath d='M7 0l3 6' stroke='%23c8102e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 20px 6px; }
@media (prefers-color-scheme: dark) { .month::after { filter: brightness(1.6); } }
.result-count { color: var(--muted); font-size: .9rem; }

/* Calendar filters: tappable chips for region and league, a "your age" box, the rest under "More filters". */
.filter-panel { display: grid; gap: 12px; margin: 16px 0 8px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.frow { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; }
.flabel { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.fchip:hover { border-color: #9fb0c6; }
.fchip[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .fchip[aria-current="true"] { background: #e8edf5; border-color: #e8edf5; color: #0b2545; } .fchip:hover { border-color: #3a4d72; } }
.fage { grid-template-columns: 76px 96px auto auto 1fr; }
.fage input { min-height: 38px; padding: 6px 10px; }
.fage .fhelp { grid-column: 2 / -1; margin: -4px 0 0; }
.more summary { cursor: pointer; font-weight: 700; color: var(--link); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " ▾"; }
.more[open] summary::after { content: " ▴"; }
.filters { display: grid; grid-template-columns: 2fr 1fr auto; gap: 8px; margin-top: 10px; }
@media (max-width: 560px) {
  .frow { grid-template-columns: 1fr; gap: 6px; }
  .fage { grid-template-columns: 96px auto 1fr; }
  .fage .btn { justify-self: start; }
  .fage .flabel { grid-column: 1 / -1; }
  .fage .fhelp { grid-column: 1 / -1; margin: 0; }
  .filters { grid-template-columns: 1fr auto; }
  .filters input { grid-column: 1 / -1; }
}
/* Caution (orange): "Age not listed". Must stand out against the cards, so it gets a fill, border and icon. */
.age-unknown { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); font-size: .78rem; font-weight: 700; }
.age-unknown .caution-icon { width: 14px; height: 14px; flex: none; }
/* How it works (/help) */
.nav-wide { display: none; }
@media (min-width: 720px) { .nav-wide { display: inline; } }
.help .lede { margin-bottom: 18px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.help-toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 600; }
.help-toc a:hover { border-color: var(--muted); }
.help-sec { margin-top: 34px; scroll-margin-top: 16px; }
.help-sec h2 { position: relative; padding-bottom: 10px; font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; letter-spacing: .03em; }
.help-sec h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 6'%3E%3Cpath d='M0 3h64' stroke='%23c8102e' stroke-width='1.5'/%3E%3Cpath d='M3 0l3 6M13 0l3 6M23 0l3 6M33 0l3 6M43 0l3 6M53 0l3 6' stroke='%23c8102e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat; }
@media (prefers-color-scheme: dark) { .help-sec h2::after { filter: brightness(1.6); } }
@media (min-width: 760px) { .steps.steps-stack { grid-template-columns: 1fr; } }
.help-sec h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.help-list { padding-left: 1.1em; display: grid; gap: 10px; }
.faq dt { margin-top: 14px; font-weight: 700; }
.faq dd { margin: 4px 0 0; color: var(--muted); }
.help-cta { margin: 36px 0 8px; }
.board-help { margin: -4px 0 12px; }

/* Honeypot field for the contact form: off-screen for people, still filled in by bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice-warn { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-left-width: 5px; font-size: .92rem; line-height: 1.45; }
.notice-warn .caution-icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.region-links { margin: -2px 0 12px; }
input[type=search], input[type=email], input[type=text], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 16px var(--font);
}
input::placeholder, textarea::placeholder { color: #6b7789; }
@media (prefers-color-scheme: dark) { input::placeholder, textarea::placeholder { color: #8b97ab; } }
textarea { resize: vertical; }
label { font-weight: 600; }

/* ---------- Tournament detail ---------- */
.crumbs { margin-bottom: 10px; font-size: .92rem; }
.crumbs a { text-decoration: none; font-weight: 600; }
.t-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.t-detail h1 { margin-top: .3em; }
.board-jump { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 600; text-decoration: none; }
.board-jump .jump-text { text-decoration: underline; }
.facts { display: grid; gap: 14px 20px; margin: 16px 0; }
.facts-compact { grid-template-columns: 1fr 1fr; }
.facts-compact .span-2 { grid-column: 1 / -1; }
@media (min-width: 760px) { .facts-compact { grid-template-columns: repeat(4, 1fr); } }
.facts dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Pickup board ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: var(--surface-2); border-radius: 12px; }
.tab { flex: 1; padding: 9px 12px; border-radius: 9px; text-align: center; text-decoration: none; color: var(--muted); font-weight: 800; white-space: nowrap; }
.count { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; text-align: center; }
.tab .count { background: var(--surface); }
.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.post:target { animation: glow 1.6s ease-out; }
@keyframes glow { from { box-shadow: 0 0 0 5px rgb(245 158 11 / .35); } to { box-shadow: var(--shadow); } }
.post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-author { font-weight: 800; }
.post-age { margin-left: auto; font-size: .82rem; }
.post-note { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.post-actions form { margin: 0; }
.pos { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 2px 9px; border: 1.5px solid var(--ink); border-radius: 7px; color: var(--ink); font-size: .8rem; font-weight: 800; }

/* ---------- Empty & status states ---------- */
.empty { text-align: center; padding: 28px 16px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty p { margin: 4px 0; }
.empty .btn { margin-top: 12px; }
.empty-art { display: flex; flex-direction: column; align-items: center; margin: 4px auto 10px; color: var(--brand); }
@media (prefers-color-scheme: dark) { .empty-art { color: #e8edf5; } }
.empty-art .ball { width: 46px; height: 46px; }
.ball-bounce { animation: bounce 1.6s cubic-bezier(.5, 0, .5, 1) infinite; }
.ball-shadow { width: 32px; height: 6px; margin-top: 4px; border-radius: 50%; background: rgb(15 23 42 / .12); animation: shadow 1.6s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(140deg); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.6); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .ball-bounce, .ball-shadow, .post:target, .brand-ball, .looking-dot, .t-card { animation: none; transition: none; } .t-card:hover { transform: none; } }
@media (prefers-color-scheme: dark) { .ball-shadow { background: rgb(255 255 255 / .14); } }
.big-emoji { font-size: 2.4rem; margin: 0; }

/* ---------- Forms & cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.stack { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); }
@media (prefers-color-scheme: dark) { .check input { accent-color: #8ab4ff; } }
form[action="/logout"] { margin-top: 20px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: 6px; }
.pos-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-picker legend { width: 100%; }
.pos-opt input, .kind-opt input { position: absolute; opacity: 0; }
.pos-opt span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 800; cursor: pointer; transition: background .12s, border-color .12s; }
.pos-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .pos-opt input:checked + span { background: #e8edf5; border-color: #e8edf5; color: #0b2545; } }
.pos-opt input:focus-visible + span, .kind-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.kind-pick { display: grid; gap: 8px; }
.kind-opt span { display: block; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; }
.kind-opt input:checked + span { border-color: var(--brand); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--brand); }
@media (prefers-color-scheme: dark) { .kind-opt input:checked + span { border-color: #e8edf5; box-shadow: inset 0 0 0 1px #e8edf5; } }

.flash { padding: 10px 14px; border-radius: 10px; margin: 10px 0; font-weight: 600; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--warn-bg); color: var(--warn-ink); }

/* ---------- Messages ---------- */
.inbox { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.convo { position: relative; display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.convo.unread { box-shadow: inset 4px 0 0 var(--active); }
.convo .badge { position: absolute; right: 12px; bottom: 12px; }
.convo-top { display: flex; justify-content: space-between; }
.convo-body { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 32px; }
.thread { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { display: block; margin-top: 2px; font-size: .72rem; }
.bubble.mine { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble.mine time { color: rgb(255 255 255 / .75); }
.bubble.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
@media (prefers-color-scheme: dark) { .bubble.mine { background: #2a4a7a; } }
.mail pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .header-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
  .nav { gap: 16px; }
  .t-card { grid-template-columns: 52px 1fr; gap: 12px; }
  .t-date { height: 54px; }
  .row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .brand { font-size: 1.1rem; gap: 7px; }
  .brand-ball { width: 26px; height: 26px; }
  .nav { gap: 12px; }
  .site-header .btn-small { padding: 0 12px; }
}
@media (max-width: 360px) { .tab { padding: 9px 6px; font-size: .86rem; } .count { margin-left: 2px; } }

/* =========================================================
   Baseball layer: ballpark lettering, the diamond, the line score,
   ticket stubs and stitches. Same navy / white / red palette.
   ========================================================= */
.brand-name span { font-weight: 600; opacity: .9; }

/* Red stitches under section headings, used sparingly. */
.section-head h2, .how h2 { position: relative; padding-bottom: 10px; }
.section-head h2::after, .how h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 6'%3E%3Cpath d='M0 3h64' stroke='%23c8102e' stroke-width='1.5'/%3E%3Cpath d='M3 0l3 6M13 0l3 6M23 0l3 6M33 0l3 6M43 0l3 6M53 0l3 6' stroke='%23c8102e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
}
@media (prefers-color-scheme: dark) {
  .section-head h2::after, .how h2::after { filter: brightness(1.6); }
}

/* Hero: night game. Navy field, stadium-light glow, the infield in chalk. */
.hero { position: relative; overflow: hidden; margin-top: 4px; padding: 28px 22px 22px; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 90% at 85% 0%, #1d4f8f 0%, rgb(29 79 143 / 0) 60%), linear-gradient(180deg, #0d2b52, #0b2545); }
.diamond-art { position: absolute; right: -70px; bottom: -40px; width: 380px; height: 380px; opacity: .9; pointer-events: none; }
.hero-copy { position: relative; max-width: 560px; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 11vw, 4.2rem); margin: 0 0 .12em; }
.hero .eyebrow { color: #ff9aa8; }
.hero-sub { margin: 0 0 12px; color: #ffd27a; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(1.25rem, 5vw, 1.6rem); }
.hero .lede { color: #c9d4e5; }
.hero .text-link { color: #fff; }
.btn-light, .btn-light:hover { background: #fff; color: #0b2545; }
.btn-light:hover { background: #e8edf5; }
/* Below 900px the drawing would sit behind the text, so it is hidden; the line score carries the theme. */
@media (max-width: 900px) { .diamond-art { display: none; } }
@media (max-width: 560px) { .hero { padding: 24px 18px 18px; } }

/* Line score: 9 scoreless innings, decided in the 10th. Stats where R / H / E go. */
.linescore { position: relative; margin-top: 22px; padding: 10px 12px; border-radius: 12px; background: #061528; border: 1px solid rgb(255 255 255 / .12); font-family: var(--display); }
.ls-row { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(10, minmax(0, 1fr)) repeat(3, minmax(0, 1.2fr)); align-items: center; gap: 2px; }
.ls-row + .ls-row { margin-top: 4px; }
.ls-head { color: #9fb0c6; font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.ls-team { font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; color: #fff; white-space: nowrap; }
.ls-inn, .ls-stat { text-align: center; }
.ls-row:not(.ls-head) .ls-inn { color: #c9d4e5; font-weight: 600; font-size: 1.15rem; }
.ls-row .ls-x { border-radius: 6px; background: #c8102e; color: #fff; font-weight: 800; }
.ls-row:not(.ls-head) .ls-x { font-size: 1.25rem; }
.ls-stat { border-left: 1px solid rgb(255 255 255 / .12); }
.ls-val { color: #ffd27a; font-weight: 800; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .ls-early { display: none; }
  .linescore { padding: 10px 8px; }
  .ls-row { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .8fr)) repeat(3, minmax(0, 1.25fr)); }
  .ls-team { font-size: .82rem; white-space: normal; line-height: 1.05; }
  .ls-head { font-size: .7rem; letter-spacing: .03em; }
  .ls-val { font-size: 1.35rem; }
}

/* Ticket-stub dates: red header strip, notched sides. */
.t-date.ticket { position: relative; justify-content: flex-start; padding: 0; overflow: hidden; background: #ffffff; border: 1.5px solid var(--line);
  -webkit-mask: radial-gradient(circle 5px at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 5px at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat; }
.ticket .t-month { display: block; width: 100%; padding: 4px 0 3px; line-height: 1; background: #c8102e; color: #fff; text-align: center; font-family: var(--display); font-size: .82rem; letter-spacing: .1em; }
.ticket .t-day { margin: auto 0; line-height: 1; font-family: var(--display); font-size: 1.8rem; color: #0f172a; }
@media (prefers-color-scheme: dark) { .t-date.ticket { background: #e8edf5; border-color: #e8edf5; } }

/* Board and card names in ballpark lettering too (mixed case stays readable). */
.t-name { margin: 0 0 2px; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: .01em; overflow-wrap: anywhere; }
.post-author { font-family: var(--display); font-size: 1.15rem; letter-spacing: .01em; }
.step-n { font-family: var(--display); font-size: 1.1rem; }
.tab { font-family: var(--display); font-size: 1.08rem; text-transform: uppercase; letter-spacing: .03em; }
.facts dd { font-size: 1.02rem; }

/* Accessibility helpers */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: 8px; background: #fff; color: #0b2545; font-weight: 700; }
.skip-link:focus { top: 8px; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs a[aria-current="page"] .count { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .tabs a[aria-current="page"] .count { background: #e8edf5; color: #0b2545; } }
