/* The Edge: fit and access layer. Loaded last.
   Each block answers a finding in the Nov 12, 2026 production readiness review: the header and tab row at every width,
   rows that scroll sideways, the opened game on tablets, short and wide screens, tap sizes, small text, contrast and print. */

/* ---------- header: every sport stays in reach from 320 px up ---------- */
.brand { min-height: 44px; }
nav.sports a.off { opacity: 1; font-weight: 500; }   /* out of season: lighter weight, full contrast */
@media (min-width: 641px) and (max-width: 1060px) { #fresh, .brand small { display: none; } .bar { gap: 14px; } }
@media (min-width: 641px) and (max-width: 780px) { .me span, .acct .adm { display: none; } nav.sports a { padding: 3px 9px 0; } }

/* ---------- a row or table that scrolls sideways fades at the edge that has more ---------- */
.cut-l, .cut-r { --fl: #000; --fr: #000; -webkit-mask-image: linear-gradient(90deg, var(--fl) 0, #000 30px, #000 calc(100% - 30px), var(--fr) 100%); mask-image: linear-gradient(90deg, var(--fl) 0, #000 30px, #000 calc(100% - 30px), var(--fr) 100%); }
.cut-l { --fl: transparent; }
.cut-r { --fr: transparent; }
.scroll:focus-visible, .x:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* ---------- tab row: a short label and a lock in place of the package name on phones ---------- */
.tabs a .ts { display: none; }
.tabs a small.tk { font-size: 11px; }
@media (max-width: 480px) {
  .tabs a .tl { display: none; }
  .tabs a .ts { display: inline; }
  .tabs a small.tk { display: inline-block; width: 9px; height: 11px; padding: 0; margin-left: 4px; font-size: 0; overflow: hidden; box-shadow: none; border-radius: 0; vertical-align: -1px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 11'%3E%3Cpath d='M1 5h7v6H1zM2.5 5V3a2 2 0 0 1 4 0v2h-1.2V3a.8.8 0 0 0-1.6 0v2z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 11'%3E%3Cpath d='M1 5h7v6H1zM2.5 5V3a2 2 0 0 1 4 0v2h-1.2V3a.8.8 0 0 0-1.6 0v2z'/%3E%3C/svg%3E") center / contain no-repeat; }
}

/* ---------- an opened game takes the full row instead of half of it ---------- */
@media (max-width: 1239px) { .grid > .game:has(> .detail) { grid-column: 1 / -1; } }
/* the wide board: room for the full team name, and the spread line gets the width its two numbers need */
@media (min-width: 1240px) and (max-width: 1499px) {
  .game { grid-template-columns: minmax(0, 1fr) 136px; }
  .game > button { grid-template-columns: 70px min(340px, calc(280px + (100vw - 1240px) * .6)) minmax(0, 1fr); gap: 0 14px; }
  .game .vz:has(> div:nth-child(3)) { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1.15fr) minmax(0, .8fr); gap: 0 22px; }
  .gap { padding-left: 4px; padding-right: 14px; }
}
@media (min-width: 1280px) { .wrap { max-width: 1440px; } }
@media (min-width: 1500px) { .game > button { grid-template-columns: 88px 330px minmax(0, 1fr); } }

/* ---------- a long team name drops under its abbreviation instead of being cut ---------- */
.team { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 7px; overflow: visible; }
.team img.lg, .team .rk { align-self: center; margin-right: 0; }
.team small { min-width: 0; max-width: 100%; margin-left: 0; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
/* on a phone every card reads the same way: abbreviation and chance on one line, record, last five and full name under it */
@media (max-width: 480px) { .team small { flex-basis: 100%; margin-bottom: 3px; } }
/* last-five rows: in a narrow column the cover note takes its own line under the score */
div:has(> .rg) { container-type: inline-size; }
@container (max-width: 305px) {
  .rg { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .rg span:last-child { grid-column: 2 / -1; overflow: visible; padding-bottom: 3px; }
}

/* ---------- small phones ---------- */
/* ten squares need their own width; beside a sentence on a narrow card they collided with it */
.l10:has(> .pips.big) { grid-template-columns: auto minmax(0, 1fr); }
@media (max-width: 420px) {
  .l10:has(> .pips.big) { grid-template-columns: minmax(0, 1fr); }
  /* admin lists: the buttons drop under the row instead of covering the code or the email */
  .rw { grid-template-columns: minmax(0, 1fr); }
  .ra { max-width: none; justify-content: flex-start; margin-top: 12px; }
}
@media (max-width: 374px) {
  .fresh { display: none; }
  .brand img { width: 84px; }
  .prow { gap: 5px; }
  .prow .pjump { padding-inline: 10px; }
  .pcur b { font-size: 20px; }
  nav.sports a { padding: 3px 2px 0; font-size: 16px; }
  .tabs { gap: 9px; }
}

/* ---------- a phone held sideways: nothing stays pinned, so the board gets the whole screen ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  header.top, .pnav { position: static; }
  main.wrap { padding-top: 12px; }
  h1 { font-size: 34px; }
  .tabs { margin: 8px 0 10px; }
  .pnav { padding-top: 4px; padding-bottom: 6px; margin-bottom: 10px; }
  .pstrip { margin-top: 4px; }
  .game { scroll-margin-top: 8px; }
  .gate-logo { width: 190px; margin-bottom: 10px; }
}

/* ---------- tap sizes: nothing a finger has to hit is under 24 px, and the main controls are 40 px or more on touch screens ---------- */
.tbl th button { display: inline-block; min-width: 24px; padding: 9px 5px; margin: -9px -5px; }
.detail .links a, .opp .ft a, a.back, .alt a, .tbl td a.row, a.tag, .also button, .rm summary, .worked > a, .upnote a { display: inline-block; padding-block: 4px; margin-block: -4px; }
.acct .lnk { padding-block: 12px; }
.faq summary { padding-block: 5px; margin-block: -5px; }
.check input { width: 24px; height: 24px; margin-top: 0; }
@media (pointer: coarse) {
  .seg button, .seg a { padding: 11px 14px; }
  .chips button { padding: 10px 14px; }
  input.search, select.pick { padding: 12px 15px; }
  .frow button, .banner button, .links button { padding: 9px 16px; }
  .btn.sm, .ra .btn.sm { min-height: 40px; }
  .pjump { padding: 11px 14px; }
}
@media (pointer: coarse) and (min-width: 390px) {
  .pbtn, label.pdate { width: 44px; height: 44px; }
  .iconbtn { width: 40px; height: 40px; }
  .me b { width: 38px; height: 38px; }
}

/* ---------- small text and contrast ---------- */
.team .rk, .tbl .rk { font-size: 11px; }
svg.gauge { width: 140px; }
.gauge .gsm { font-size: 11px; }
.gauge .gend { font-size: 10.5px; }
.field > span i { opacity: 1; }
.worked .wh { margin: 0 0 12px; max-width: none; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.worked .wh span { color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.wgap .wh4 { margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); max-width: none; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.wgap .verdict .wh4 { margin-top: 20px; padding-top: 16px; }
.wgap .wh { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin-bottom: 10px; font-size: 13px; color: var(--ink-2); }

/* ---------- back to top, on the long pages ---------- */
.totop { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-size: 19px; line-height: 1; cursor: pointer; }
.totop:hover { border-color: var(--ink-3); }
body.past .totop { bottom: calc(86px + env(safe-area-inset-bottom)); }

/* ---------- privacy, terms, contact and not-found pages ---------- */
.doc { max-width: 74ch; }
.doc h1 { font-size: clamp(34px, 6vw, 48px); margin-bottom: 6px; }
.doc h2 { font-size: 22px; margin: 30px 0 8px; }
.doc p, .doc li { font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: none; }
.doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin-bottom: 4px; }
.doc .when { font-size: 13px; color: var(--ink-3); margin: 0 0 18px; }
.doc form { max-width: 520px; margin-top: 16px; }
.flinks { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0 0 10px; max-width: none; }
.flinks a { display: inline-block; padding-block: 8px; color: var(--ink-2); font-weight: 600; text-decoration-color: var(--line-2); }
.flinks a:hover { color: var(--ink); text-decoration-color: var(--red); }
.nojs { max-width: 60ch; margin: 0 auto; padding: 48px 16px; font-size: 16px; color: var(--ink-2); }
.nojs b { color: var(--ink); }
.danger { border: 1px solid var(--line-2); background: transparent; margin-top: 12px; }
.danger h2 { font-style: normal; }

/* ---------- admin: health and inbox ---------- */
.hstate { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-stretch: 100%; font-style: normal; font-size: 13.5px; font-weight: 600; letter-spacing: 0; white-space: nowrap; color: var(--ink); }
.hstate i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.hstate.bad i { background: var(--red); }
.hstate.warn i { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.hgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.hgrid .card h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hgrid dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.hgrid dt { color: var(--ink-3); }
.hgrid dd { margin: 0; text-align: right; color: var(--ink); font-weight: 600; }
.hgrid .small { margin: 12px 0 0; overflow-wrap: anywhere; }
.inbox > div { grid-template-columns: 132px minmax(0, 1fr) auto; align-items: start; }
.inbox p { margin: 4px 0 0; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: none; }
.inbox .done b, .inbox .done p { color: var(--ink-3); font-weight: 400; }
@media (max-width: 640px) { .inbox > div { grid-template-columns: minmax(0, 1fr); } }

/* ---------- print: dark screens become plain pages ---------- */
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #fff; --hover: #fff; --line: #bbb; --line-2: #999; --ink: #000; --ink-2: #222; --ink-3: #555; color-scheme: light; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  header.top, .pnav, .controls, .chips, .tabs, .frow, .flogo, .flinks, .keys, .totop, .toast, .stick, .skip, .more, .iconbtn, .links button { display: none !important; }
  .cut-l, .cut-r { -webkit-mask-image: none; mask-image: none; }
  .scroll, .x { overflow: visible; }
  .game, .opp, .card, .pl, .scroll { border: 1px solid var(--line); break-inside: avoid; }
  main.wrap { padding-top: 0; }
  a { text-decoration: none; }
}
