/* The college Graphics hub (public/js/cfb/graphics.js), on graphics-hub.css and the college theme (cfb.css). Site tokens only, so
   light and dark follow the theme. Controls stay compact (owner, 2026-11-14): active filters as chips, "+ Filter" opens one
   sheet (a popover on a wide screen, a bottom sheet on a phone), never a wall of checkboxes; the board shows without scrolling. */

:root[data-league="cfb"] .hub-tabs a[aria-current="page"] { border-bottom-color: var(--brand); }
:root[data-league="cfb"] .lb-card-kind { color: var(--brand-ink); }

/* The filter row: season, chips, + Filter. */
.cg-filters { position: relative; margin: 0 0 10px; }
.cg-chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cg-season select { font: inherit; font-weight: 700; padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); }
.cg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--brand); border-radius: 999px; background: var(--cfb-tint, var(--surface-2)); color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; min-height: 32px; }
.cg-chip .cfb-badge { width: 18px; height: 18px; font-size: .42rem; }
.cg-chip:hover { border-color: var(--brand-ink); }
.cg-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .95rem; line-height: 1; color: var(--muted); }
.cg-chip:hover .cg-x { background: var(--border); color: var(--text); }
.cg-add { padding: 5px 12px; border: 1px dashed var(--brand); border-radius: 999px; background: transparent; color: var(--brand-ink); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; min-height: 32px; }
.cg-add[aria-expanded="true"] { background: var(--brand-btn); color: #fff; border-style: solid; }
.cg-clear { font-size: .82rem; }
.cg-off { margin: 6px 0 0; padding-left: 18px; }

.cg-sheet { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 620px); overflow: auto; padding: 10px 14px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
.cg-sheet[hidden] { display: none; }
.cg-sheet-head { position: sticky; top: -10px; display: flex; justify-content: space-between; align-items: center; padding: 6px 0; background: var(--surface); }
.cg-sheet h3 { margin: 10px 0 4px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.cg-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 3px 0; }
.cg-row-name { font-size: .8rem; color: var(--muted); }
.cg-row-body { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.cg-row-body select, .cg-find input { font: inherit; font-size: .86rem; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); max-width: 100%; }
.cg-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.cg-seg button { padding: 5px 10px; min-height: 32px; border: 0; border-right: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; }
.cg-seg button:last-child { border-right: 0; }
.cg-seg button[aria-pressed="true"] { background: var(--brand-btn); color: #fff; font-weight: 700; }
.cg-seg button:disabled { opacity: .45; cursor: not-allowed; }
.cg-find { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cg-find-wide input { min-width: min(320px, 100%); }
.cg-hits { display: flex; flex-wrap: wrap; gap: 4px; }
.cg-hit { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; min-height: 32px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; text-align: left; }
.cg-hit:hover { border-color: var(--brand); }
.cg-hit .cfb-badge { width: 18px; height: 18px; font-size: .42rem; }
.cg-hit small { color: var(--muted); }
.cg-picked { margin-top: 8px; }

/* The minimum folds into one line. */
.cg-more { align-self: center; }
.cg-more summary { cursor: pointer; font-size: .82rem; color: var(--brand-ink); padding: 6px 0; white-space: nowrap; }
.cg-more[open] { flex-basis: 100%; }

/* Quadrant corner labels fold away. */
.cg-labels summary { cursor: pointer; font-size: .8rem; color: var(--brand-ink); padding: 6px 0; }
.cg-labels-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 6px 10px; margin: 4px 0; }
.gr-reset:empty { display: none; }

/* Badges inside board tables. */
.lb-table .lb-name .cfb-badge { width: 22px; height: 22px; font-size: .5rem; margin-right: 6px; }
.lb-table .lb-name a { display: inline-flex; align-items: center; }

/* The comparison card on the page: content width, the subject columns side by side, the reference first. */
.cg-cardtable { border-collapse: collapse; width: auto; min-width: min(100%, 420px); max-width: 900px; font-variant-numeric: tabular-nums; }
.cg-cardtable th, .cg-cardtable td { padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: right; }
.cg-cardtable thead th { vertical-align: bottom; font-size: .86rem; }
.cg-cardtable thead th .cfb-badge { display: block; margin: 0 0 4px auto; }
.cg-cardtable tbody th { text-align: left; font-weight: 600; font-size: .86rem; white-space: nowrap; }
.cg-cardtable td b { display: block; font-size: 1rem; }
.cg-cardtable td small { color: var(--muted); font-size: .74rem; }
.cg-cardtable td.cg-best { background: rgba(201, 162, 39, .2); box-shadow: inset 0 0 0 1.5px #c9a227; }
.cg-est { margin-left: 4px; font-size: .62rem; }

/* The methods page. */
.cg-methods .box { margin-bottom: 12px; }
.cg-metric { padding: 8px 0; border-top: 1px solid var(--border); }
.cg-metric h3 { margin: 0 0 2px; font-size: .95rem; }
.cg-metric p { margin: 2px 0; }

.cg-toast { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 8px; background: var(--header-bg, #0c3a24); color: #fff; font-size: .88rem; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }

@media (max-width: 640px) {
  /* The page's own head is short on a phone: the hub tabs already say where you are. */
  .lb-page > .page-head h1 { font-size: 1.45rem; margin-bottom: 2px; }
  .lb-page > .page-head > p:not(.small) { display: none; }
  .lb-controls { padding: 8px 10px; }
  .lb-controls .lb-control-row { gap: 6px 8px; }
  .lb-controls .lb-pick { flex: 1 1 140px; }
  /* The filter sheet as a bottom sheet. */
  .cg-sheet { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 78vh; border-radius: 14px 14px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .cg-row { grid-template-columns: 86px minmax(0, 1fr); gap: 2px 8px; }
  .cg-row-name { font-size: .74rem; }
  .cg-labels-grid { grid-template-columns: 1fr; }
  .cg-cardtable { min-width: 0; width: 100%; table-layout: fixed; }
  .cg-cardtable th, .cg-cardtable td { padding: 5px 4px; }
  .cg-cardtable thead th { font-size: .72rem; overflow-wrap: anywhere; }
  .cg-cardtable tbody th { white-space: normal; font-size: .76rem; width: 34%; }
  .cg-cardtable td b { font-size: .9rem; }
  .cg-cardtable td small { font-size: .66rem; }
}

/* The site's screenshot mark: on a board it names the college side; controls and filter boxes carry none. */
:root[data-league="cfb"] .lb-board::after { content: "pigskinlab.com/cfb"; }
:root[data-league="cfb"] .lb-controls::after, :root[data-league="cfb"] .lb-page .page-head + .box::after { content: none; }
/* Creator cards keep a card's width on a wide screen. */
.cg-creator .gr-chart svg { max-width: 640px; height: auto; }
/* The Cards maker (card-maker.js, 2026-11-16): compact rows of chips over the card; the canvas is the preview and the PNG. */
.cm-controls { display: grid; gap: 10px; }
.cm-look { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; }
.cm-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cm-label { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cg-seg button[aria-pressed="true"] { background: var(--brand-btn, #0c3a24); color: #fff; }
.cg-seg button:disabled { opacity: .45; cursor: not-allowed; }
.cm-toggle { padding: 4px 10px; min-height: 32px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; }
.cm-toggle[aria-pressed="true"] { border-color: var(--brand); background: var(--cfb-tint, var(--surface-2)); font-weight: 700; }
.cm-toggle[aria-pressed="true"]::before { content: "✓ "; }
.cm-pick { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border: 1px solid var(--brand); border-radius: 999px; background: var(--cfb-tint, var(--surface-2)); font-size: .84rem; min-height: 32px; }
.cm-pick .cfb-badge { width: 18px; height: 18px; font-size: .42rem; margin-right: 4px; }
.cm-mini { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; min-width: 24px; min-height: 26px; border-radius: 999px; cursor: pointer; }
.cm-mini:hover:not(:disabled) { background: var(--border); color: var(--text); }
.cm-mini:disabled { opacity: .3; cursor: default; }
.cm-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cm-addwrap { position: relative; }
.cm-statsheet { width: min(440px, calc(100vw - 32px)); }
.cm-statsheet input { width: 100%; margin: 4px 0 8px; }
.cm-statlist { display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.cm-words { flex-basis: 100%; }
.cm-stage { margin: 12px 0; }
.cm-frame { width: 100%; max-width: 1100px; max-height: 78vh; margin: 0 auto; display: flex; justify-content: center; }
.cm-canvas { width: auto; height: auto; max-width: 100%; max-height: 78vh; display: block; border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, .18); }
.cm-notesbox > * + * { margin-top: 6px; }
.cm-ready summary, .cm-words summary { cursor: pointer; font-weight: 700; }
@media (max-width: 640px) { .cm-look { gap: 8px; } .cm-frame { max-height: none; } .cm-canvas { max-height: none; } }
.cg-toolgrid { margin: 0 0 14px; }
.cg-toolgrid > summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }
:root[data-league="cfb"] .hub-ready .hub-ready-grid a { display: inline; line-height: 1.5; }
.cm-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.cm-side { position: sticky; top: 8px; display: grid; gap: 10px; }
.cm-side .cm-look { flex-direction: column; }
.cm-main .cm-stage { margin-top: 0; }
@media (max-width: 1000px) { .cm-layout { grid-template-columns: minmax(0, 1fr); } .cm-main { order: -1; } .cm-side { position: static; } }
.cm-side .cm-words { flex-basis: auto; }
.cm-side .cg-find-wide { flex: 1 1 160px; min-width: 0; }
.cm-side .cg-find-wide input { width: 100%; }
.cm-side .cm-look { align-items: stretch; }
.cm-side .cm-words summary { text-align: left; }
