/* The Graphics hub (public/js/graphics-hub.js): its sub-menu, Leaderboards, Graphs and the methods page. Site tokens only, so
   light and dark follow the theme. */

/* The sub-menu: a row of tabs; on a phone it scrolls sideways, every section one tap away. */
.hub-bar { padding-top: 10px; }
.hub-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.hub-tabs a { flex: 0 0 auto; padding: 10px 12px; color: var(--text-2, var(--text)); font-size: .86rem; font-weight: 600; border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; }
.hub-tabs a:hover { color: var(--text); background: var(--row-hover, var(--surface-2)); text-decoration: none; }
.hub-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
.hub-tabs .hub-home { font-weight: 700; }
.hub-tabs .hub-methods { margin-left: auto; font-weight: 500; color: var(--muted); }

/* Cards on the landing views. */
.lb-page .page-head { margin-bottom: 8px; }
.lb-h2 { font-size: 1.1rem; margin: 18px 0 8px; }
.lb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
.lb-cards-tight { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 12px; }
.lb-card { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.lb-card:hover { border-color: var(--brand); text-decoration: none; }
.lb-card h2, .lb-card h3 { margin: 0; font-size: 1rem; }
.lb-card p { margin: 0; color: var(--text-2, var(--text)); font-size: .88rem; }
.lb-cards-tight .lb-card { padding: 10px 12px; }
.lb-card-kind { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.lb-card-meta { margin-top: auto; font-size: .78rem; color: var(--muted); }
.lb-own { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }

/* Controls. */
.lb-controls { padding: 12px; margin-bottom: 10px; }
.lb-control-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.lb-pick { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--muted); min-width: 0; }
.lb-pick span { font-weight: 600; }
.lb-pick select, .lb-pick input { max-width: 100%; min-height: 36px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: .88rem; }
.lb-pick select[multiple] { min-height: 80px; }
.lb-min input { width: 110px; }
.lb-flag { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; min-height: 36px; }
.lb-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.lb-seg .btn[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }

/* The filter panel: public/css/filter-bar.css (the compact bar of chips, 2026-11-14). */

/* The board. */
.lb-board { padding: 14px 14px 22px; overflow: hidden; }
.lb-title { margin: 0 0 4px; font-size: 1.25rem; }
.lb-window { margin: 0 0 6px; font-weight: 600; font-size: .9rem; color: var(--text-2, var(--text)); }
.lb-board > p { margin: 4px 0; }
.lb-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .03em; border: 1px solid var(--border-strong); color: var(--text); background: var(--surface-2); }
.lb-not { color: var(--text-2, var(--text)); font-style: italic; }
.lb-refused { margin-top: 8px; }
.lb-scroll { overflow-x: auto; margin: 10px 0; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 6px; }
/* As wide as its columns, never stretched across the board (the owner, 2026-11-14: compact, side by side). */
.lb-table { border-collapse: separate; border-spacing: 0; width: auto; max-width: 100%; font-size: .84rem; }
.lb-table th, .lb-table td { padding: 4px 6px; border-bottom: 1px solid var(--grid, var(--border)); text-align: center; }
.lb-table thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; font-size: .78rem; vertical-align: bottom; }
.lb-table thead th small { display: block; font-weight: 500; color: var(--muted); }
.lb-table .lb-rk { width: 38px; min-width: 38px; max-width: 38px; box-sizing: border-box; padding-left: 4px; padding-right: 2px; white-space: nowrap; font-size: .74rem; color: var(--muted); position: sticky; left: 0; background: var(--surface); z-index: 1; }
.lb-table thead .lb-rk { z-index: 3; background: var(--surface-2); }
.lb-table .lb-name { text-align: left; white-space: nowrap; position: sticky; left: 38px; background: var(--surface); z-index: 1; min-width: 140px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; box-shadow: 1px 0 0 var(--border); }
.lb-table thead .lb-name { z-index: 3; background: var(--surface-2); }
.lb-table .lb-name a { color: var(--text); display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.lb-table .lb-name a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lb-table td.lb-name a { display: inline-flex; vertical-align: middle; max-width: calc(100% - 16px); }
.lb-table .lb-cell { min-width: 70px; line-height: 1.15; }
.lb-table .lb-cell b { display: block; font-size: .9rem; }
.lb-table .lb-cell small { display: block; font-size: .68rem; opacity: .88; white-space: nowrap; }
.lb-table .lb-cell sup { font-size: .66rem; margin-left: 2px; opacity: .85; }
.lb-ranktable .lb-cell b { display: inline; }
.lb-table .empty { color: var(--muted); }
.lb-table .lb-overall { border-left: 2px solid var(--border-strong); }
.lb-table tr.lb-below td { opacity: .62; }
.lb-mark { color: var(--brand-ink, var(--brand)); font-weight: 700; margin-left: 2px; }
.lb-sort { background: none; border: 0; padding: 2px 0; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.lb-sort:hover { text-decoration: underline; }
.lb-colctl { display: flex; justify-content: center; gap: 2px; margin-top: 3px; }
.lb-colctl button { font: inherit; font-size: .68rem; line-height: 1; padding: 4px 5px; min-height: 24px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 4px; cursor: pointer; }
.lb-colctl button:disabled { opacity: .35; cursor: default; }
.lb-dir { font-weight: 700; }
.lb-weight { display: block; font-size: .7rem; font-weight: 500; margin-top: 3px; }
.lb-weight input { width: 46px; font-size: .74rem; }
.lb-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 18px; padding: 0 3px; border-radius: 3px; font-size: .64rem; font-weight: 800; letter-spacing: .02em; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .45); }
.lb-notes { margin: 6px 0; padding-left: 18px; }
.lb-notes li { margin: 2px 0; }
.lb-methods { margin: 8px 0; border-top: 1px solid var(--border); padding-top: 6px; }
.lb-methods summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.lb-methods p { margin: 6px 0; }
.lb-credit { margin: 6px 0; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.hub-ready-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.hub-ready-grid h3 { margin: 4px 0; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hub-ready-grid ul { margin: 0; padding-left: 18px; }
.hub-ready-grid li { margin: 6px 0; }

/* Graphs. */
.gr-chart { margin: 10px 0; }
.gr-chart svg { display: block; width: 100%; height: auto; }

/* The methods page. */
.lb-method-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lb-method { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.lb-method > summary { cursor: pointer; list-style-position: inside; }
.lb-method-formula { display: block; margin-top: 4px; color: var(--text-2, var(--text)); }
.lb-method-cards { align-items: start; }
.lb-method p { margin: 4px 0; overflow-wrap: anywhere; }
.lb-methods-table td { text-align: left; vertical-align: top; min-width: 120px; }
.lb-methods-table td p { margin: 0 0 4px; }
.lb-methods-page ul li { margin: 3px 0; }

@media (max-width: 600px) {
  .lb-board { padding: 10px; }
  .lb-control-row { gap: 8px; }
  .lb-control-row > .lb-pick { flex: 1 1 140px; }
  .lb-pick select, .lb-pick input { width: 100%; }
  .lb-table .lb-name { min-width: 116px; max-width: 140px; }
  .lb-table .lb-cell { min-width: 62px; }
  .hub-tabs .hub-methods { margin-left: 0; }
}

/* Ask on a board. */
.lb-ask { padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.lb-ask-row { display: flex; gap: 8px; }
.lb-ask-row input { flex: 1 1 auto; min-width: 0; min-height: 40px; font: inherit; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); }
.lb-ask-msg { margin: 6px 0 0; }
.lb-ask-msg:empty { display: none; }
.lb-ask-msg.refused { color: var(--wrong, var(--brand)); }
/* Cards (/graphic): the filter bar in the maker's side column; its picker may run past the column over the preview. */
.gfx-filters .fbar { margin-bottom: 0; }
