/* Layout & components. Uses tokens from theme.css only -- no raw colors here. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }

/* The hidden attribute must win over component display rules (.stack, .grid...). */
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- Site header (mirrors f3southcary.com) ----------------------------- */

.site-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--chrome) 96%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--chrome-line);
}
.site-header .site-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: var(--chrome-strong); text-decoration: none; }
.site-brand img { width: 42px; height: 42px; border-radius: 50%; }
.site-brand span { font: 600 1.25rem/1 var(--font-head); letter-spacing: 0.04em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--chrome-text); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 10px 14px; border-radius: 8px; }
.site-nav a:hover { color: var(--chrome-strong); background: var(--chrome-hover); }
.site-nav a[aria-current="page"] { color: var(--chrome-strong); }
.site-nav .site-btn {
  margin-left: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 600;
  background: var(--chrome-accent); color: var(--chrome-strong);
}
.site-nav .site-btn:hover { background: var(--chrome-accent-dark); }
/* Workouts dropdown (matches the website's) */
.nav-group { position: relative; }
.nav-drop { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: var(--chrome-text); font: inherit; font-size: 0.95rem; font-weight: 500; line-height: 1.6; padding: 10px 14px; border-radius: 8px; }
.nav-drop:hover, .nav-drop[aria-expanded="true"] { color: var(--chrome-strong); background: var(--chrome-hover); }
.nav-drop svg { width: 12px; height: 12px; transition: transform .15s; }
.nav-drop[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 180px; flex-direction: column; gap: 2px; padding: 8px; background: var(--chrome); border: 1px solid var(--chrome-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-drop[aria-expanded="true"] + .nav-menu { display: flex; }
@media (hover: hover) and (min-width: 1121px) { .nav-group:hover .nav-menu { display: flex; } .nav-group:hover .nav-drop svg { transform: rotate(180deg); } }
.site-nav-toggle { display: none; background: none; border: 0; color: var(--chrome-strong); padding: 8px; cursor: pointer; }
.site-nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1120px) {
  .site-nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--chrome); padding: 8px 16px 20px; gap: 2px;
    border-bottom: 1px solid var(--chrome-line);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 12px; font-size: 1.05rem; }
  .site-nav .site-btn { margin: 10px 0 0; padding: 16px; text-align: center; }
  .nav-drop { width: 100%; padding: 14px 12px 6px; font-size: 1.05rem; cursor: default; pointer-events: none; background: none; }
  .nav-drop svg { display: none; }
  .nav-menu { display: flex; position: static; min-width: 0; padding: 0 0 0 14px; background: none; border: 0; box-shadow: none; }
  .nav-menu::before { display: none; }
}

/* ---- Stats tabs (sticky under the site header) ------------------------- */

.tabs-bar {
  position: sticky;
  top: 68px;
  z-index: 10;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.tabs-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tabs { display: flex; gap: 4px; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---- Page -------------------------------------------------------------- */

main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.page-title {
  margin: 4px 0 2px;
  font: 600 32px/1.1 var(--font-head);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.page-sub { margin: 0 0 16px; color: var(--text-2); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stack { display: grid; gap: 16px; }

/* ---- Segmented control (date presets) ---------------------------------- */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 999px;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.custom-range { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); }

.input {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  min-width: 0;
}
.input::placeholder { color: var(--muted); }
input[type="date"].input { padding: 0 10px; }
.pax-search { width: min(100%, 280px); }

/* ---- Cards & stat tiles ------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 12px;
  min-width: 0;
}
.card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.card-title { margin: 0; font-size: 15px; font-weight: 650; }
.card-sub { margin: 0; color: var(--muted); font-size: 13px; }
.card-head .spacer { flex: 1; }
.card-head { flex-wrap: wrap; }
.chart-title { margin: 4px 0 4px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }

.link-btn {
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  white-space: nowrap;
}
.link-btn:hover { color: var(--text); background: var(--surface-2); }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}
.stat-label { color: var(--text-2); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.stat-value.small { font-size: 18px; line-height: 1.55; }
.stat-of { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.section-title { margin: 12px 0 -4px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }

/* ---- Charts ------------------------------------------------------------ */

.chart { position: relative; min-height: 120px; }
.chart svg { display: block; overflow: visible; }
/* Plot declares --plot-background: white on each svg (zero specificity); this wins. */
.chart svg { --plot-background: var(--surface); }
/* Axis & label ink inherit from here (Plot draws them in currentColor). */
.chart { color: var(--muted); font-size: 12px; }
.chart [aria-label="tip"] { color: var(--text); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 8px; }
.legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: none;
  color: var(--text-2);
  font-size: 12.5px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  cursor: pointer;
}
.legend button:hover { background: var(--surface-2); color: var(--text); }
.legend button[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; }
.legend button[aria-pressed="false"] .swatch { opacity: 0.25; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-box { margin: 0 0 8px; }
.legend-box .legend { margin: 6px 0 0; }
.legend-summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  color: var(--text-2); font-size: 12.5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2);
}
.legend-summary::-webkit-details-marker { display: none; }
.legend-summary::before { content: "▸"; font-size: 10px; transition: transform 0.15s; }
.legend-box[open] > .legend-summary::before { transform: rotate(90deg); }
.legend-summary:hover { color: var(--text); }
.legend .note { color: var(--muted); font-size: 12px; padding: 3px 4px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.data-table th, .data-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--grid); }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { color: var(--text-2); font-weight: 600; }
.data-table td { font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* Typed tables (js/table.js): text left, numbers right, sortable sticky header. */
.data-table.typed th, .data-table.typed td { text-align: left; }
.data-table.typed .num { text-align: right; }
.table-sticky { overflow: auto; }
.table-sticky thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.data-table.typed td { white-space: nowrap; }
.sort-btn {
  border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer;
  display: inline-flex; gap: 4px; align-items: center;
}
.sort-btn:hover { color: var(--text); }
.sort-mark { font-size: 9px; color: var(--muted); min-width: 8px; }
.table-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.post-filters { margin-bottom: 10px; }
.post-filters .select { flex: 0 1 auto; }
.table-search { width: min(100%, 240px); }
.table-count { color: var(--muted); font-size: 12.5px; }

/* Line-chart key: a short stroke, solid or dashed, in the series color. */
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; padding: 2px 8px 2px 0; }
.line-swatch { width: 18px; border-top: 2px solid currentColor; flex: none; }
.line-swatch.dashed { border-top-style: dashed; }

/* Heat ramp key (heatmap & calendar). */
.heat-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; color: var(--text-2); font-size: 12.5px; }
.heat-key span { display: inline-flex; align-items: center; gap: 5px; }
.heat-key .ramp { width: 72px; height: 10px; border-radius: 3px; }

.select {
  height: 34px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  min-width: 0;
  max-width: 100%;
}

/* Streaker chips (112 Tracker). */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; flex-direction: column; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.chip b { font-weight: 650; }
.chip small { color: var(--text-2); }

.show-more { margin-top: 8px; }
.tabs a.nav-hidden:not([aria-current]) { display: none; }

/* ---- States ------------------------------------------------------------ */

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--page) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.empty, .error {
  padding: 28px 12px;
  text-align: center;
  color: var(--text-2);
}
.error { color: var(--text); }

main .stack { transition: opacity 0.2s; }
main.is-loading .stack { opacity: 0.55; }

/* ---- Footer: data freshness line, then the site footer ----------------- */

.footer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.footer b { color: var(--text-2); font-weight: 600; }

.site-footer { background: var(--chrome); color: var(--chrome-muted); padding: 56px 0 28px; font-size: 0.95rem; line-height: 1.6; }
.site-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--chrome-strong); font: 600 0.95rem/1.1 var(--font-head); letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--chrome-text); text-decoration: none; }
.site-footer a:hover { color: var(--chrome-strong); text-decoration: underline; }
.site-footer .site-brand { color: var(--chrome-strong); }
.site-footer-brand p { max-width: 320px; margin: 14px 0 0; }
.site-footer-bottom {
  border-top: 1px solid var(--chrome-line); margin-top: 40px; padding-top: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: 0.85rem; color: var(--chrome-faint);
}
@media (max-width: 860px) { .site-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer-grid { grid-template-columns: 1fr; } }

@media (max-width: 640px) {
  /* Presets become one swipeable row instead of wrapping. */
  .segmented { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .pax-search, .select { width: 100%; }
  .tabs a { padding: 6px 11px; }
  .page-title { font-size: 26px; }
  .stat-value { font-size: 24px; }
}

/* ---- FNG page ------------------------------------------------------------ */

.pill {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; background: var(--neutral-bg); color: var(--neutral);
}
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.tag-mini { margin-left: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.spark { display: block; }
.spark rect { fill: var(--accent); }
.spark rect.zero { fill: var(--grid); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 18px; border-left: 1px solid var(--border); padding-left: 12px; }
.tree li { margin: 4px 0; }
.tree summary { cursor: pointer; font-weight: 600; }
.tree .who { font-weight: 550; }
.tree .meta { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.tree-roots { columns: 2 320px; column-gap: 28px; }
.tree-roots > li { break-inside: avoid; }
.stat-cmp { margin-top: 4px; font-size: 12px; color: var(--muted); }
.stat-note { margin-top: 4px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.stat-cmp .good { color: var(--good); font-weight: 600; }
.stat-cmp .bad { color: var(--bad); font-weight: 600; }

/* EH family tree diagram (charts/ehtree.js) */
.eh-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.eh-legend span { display: inline-flex; align-items: center; gap: 5px; }
.eh-scroll { overflow-x: auto; }
.eh-tree { display: block; }
.eh-tree a text:hover { text-decoration: underline; }

/* Region history timeline (charts/timeline.js) */
.timeline { display: block; }
.timeline-list { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--border); }
.timeline-item { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px -21px; }
.timeline-item .timeline-dot { flex: none; margin-top: 1px; }
.timeline-item strong { display: block; font-weight: 600; }
.timeline-item.star strong { font-size: 1.1em; font-weight: 700; }
.timeline-meta { color: var(--muted); font-size: 12.5px; }
.timeline-era { color: var(--text-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 10px; }

/* PAX page 112 tracker (charts/tracker112.js): tiles on wide screens, chain on phones */
.t112, .t112-page { --t112-hit: var(--good); --t112-post: var(--heat-2); --t112-q: var(--series-2); --t112-miss: var(--axis); }
.t112 { display: grid; gap: 14px; }
.t112-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.t112-kpi { background: var(--surface-2); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.t112-kpi-l { font-size: 12px; color: var(--text-2); }
.t112-kpi-v { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.t112-kpi-n { font-size: 11.5px; color: var(--muted); }
.t112-year { display: grid; gap: 4px; min-width: 0; }
.t112-year + .t112-year { margin-top: 8px; }
.t112-year-l { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .04em; }
.t112-row { display: grid; column-gap: 6px; }
.t112-tiles { overflow-x: auto; display: grid; }
.t112-tiles .t112-row { min-width: 0; }
.t112-cell { display: grid; gap: 4px; min-width: 0; }
.t112-tile { min-width: 0; border-radius: 9px; padding: 7px 8px 8px; display: grid; gap: 4px; border: 1px solid transparent; background: color-mix(in srgb, var(--t112-miss) 22%, var(--surface)); }
.t112-tile.hit { background: color-mix(in srgb, var(--t112-hit) 16%, var(--surface)); }
.t112-tile.post { background: color-mix(in srgb, var(--t112-post) 16%, var(--surface)); }
.t112-tile.q { background: color-mix(in srgb, var(--t112-q) 16%, var(--surface)); }
.t112-tile.now { background: transparent; border: 1.5px dashed var(--axis); }
.t112-m { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
.t112-big { font-size: 14px; font-weight: 700; line-height: 1.1; }
.t112-tile.hit .t112-big { color: var(--t112-hit); }
.t112-tile.post .t112-big { color: var(--t112-post); }
.t112-tile.q .t112-big { color: var(--t112-q); }
.t112-tile.miss .t112-big { color: var(--muted); }
.t112-bar { height: 5px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.t112-bar i { display: block; height: 100%; border-radius: 3px; background: var(--t112-post); }
.t112-tile.hit .t112-bar i { background: var(--t112-hit); }
.t112-nums { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.t112-link { height: 3px; border-radius: 2px; }
.t112-link.on { background: var(--t112-hit); }
.t112-link.join { margin-right: -6px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.t112-chain { display: none; gap: 6px; }
.t112-link-cell { position: relative; display: grid; justify-items: center; gap: 3px; }
.t112-link-cell.join::after { content: ""; position: absolute; top: 7px; left: 50%; width: 100%; height: 4px; background: var(--t112-hit); z-index: 0; }
.t112-pill { position: relative; z-index: 1; width: 100%; max-width: 26px; height: 18px; border-radius: 9px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: var(--t112-miss); }
.t112-pill.miss { color: var(--text-2); }
.t112-pill.hit { background: var(--t112-hit); }
.t112-pill.post { background: var(--t112-post); }
.t112-pill.q { background: var(--t112-q); }
.t112-pill.now { background: transparent; border: 1.5px dashed var(--axis); }
.t112-pill-l { font-size: 10.5px; color: var(--muted); }
.t112-chain-note { font-size: 11.5px; color: var(--muted); }
.t112-key .t112-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.t112-sw.hit { background: var(--good); } .t112-sw.post { background: var(--heat-2); } .t112-sw.q { background: var(--series-2); }
.t112-sw.miss { background: var(--axis); } .t112-sw.now { border: 1.5px dashed var(--axis); }
.t112-key { display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 640px) {
  .t112-tiles { display: none; }
  .t112-chain { display: grid; }
}

/* 112 tab (pages/tracker.js): month tiles, month report, close list, 112 board */
.t112-mtiles { display: grid; gap: 6px; grid-template-columns: repeat(var(--t112-cols, 12), minmax(62px, 1fr)); }
.t112-mt { font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; display: grid; gap: 5px; align-content: start;
  border-radius: 10px; padding: 9px 9px 10px; border: 1.5px solid transparent; background: color-mix(in srgb, var(--t112-hit) 14%, var(--surface)); }
.t112-mt:hover { border-color: var(--axis); }
.t112-mt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.t112-mt.best { border-color: color-mix(in srgb, var(--t112-hit) 60%, transparent); }
.t112-mt.now { background: transparent; border: 1.5px dashed var(--axis); }
.t112-mt[aria-pressed="true"] { border: 2px solid var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.t112-mt .t112-m { gap: 6px; }
.t112-mt-big { font-size: 24px; font-weight: 700; line-height: 1; color: var(--t112-hit); font-variant-numeric: tabular-nums; }
.t112-mt.now .t112-mt-big { color: var(--text); }
.t112-mt-of { font-size: 11.5px; color: var(--text-2); }
.t112-stack { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--grid); }
.t112-stack i { display: block; height: 100%; }
.t112-stack .hit { background: var(--t112-hit); } .t112-stack .post { background: var(--t112-post); }
.t112-stack .q { background: var(--t112-q); } .t112-stack .miss { background: var(--t112-miss); }
.t112-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--t112-miss) 25%, var(--surface)); color: var(--text-2); }
.t112-tag.hit { background: color-mix(in srgb, var(--t112-hit) 18%, var(--surface)); color: var(--t112-hit); }
.t112-tag.post { background: color-mix(in srgb, var(--t112-post) 18%, var(--surface)); color: var(--t112-post); }
.t112-tag.q { background: color-mix(in srgb, var(--t112-q) 18%, var(--surface)); color: var(--t112-q); }
.t112-copybox { width: 100%; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.t112-close { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 45%), 1fr)); gap: 8px; }
.t112-cl { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; min-width: 0; }
.t112-cl a { font-weight: 600; }
.t112-cl-n { font-size: 12.5px; color: var(--text-2); }
.t112-cl-n strong { color: var(--text); }
.t112-qtag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; color: var(--muted); border: 1px dashed var(--axis); }
.t112-qtag.ok { color: var(--t112-q); border: 0; background: color-mix(in srgb, var(--t112-q) 16%, var(--surface)); }
.t112-board { display: grid; }
.t112-brow { display: grid; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--grid); }
.t112-brow.head { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); border-bottom: 0; }
.t112-brow .c { text-align: center; }
.t112-brow .r { text-align: right; }
.t112-brow .who { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; }
.t112-brow .who small { color: var(--muted); font-weight: 500; }
.t112-brow .streak { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.t112-brow.perfect .streak { color: var(--t112-hit); }
.t112-pill.none { background: transparent; border: 1px solid var(--grid); }
.t112-page .card-title { font: 600 20px/1.15 var(--font-head); letter-spacing: .02em; text-transform: uppercase; }
.t112-page .card-head { margin-bottom: 12px; }
@media (max-width: 640px) {
  .t112-mtiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .t112-mt { padding: 7px 7px 8px; }
  .t112-mt-big { font-size: 20px; }
  .t112-board .t112-pill { max-width: 20px; height: 16px; font-size: 9.5px; }
  .t112-brow.head { font-size: 9.5px; letter-spacing: 0; }
  .t112-board .t112-link-cell.join::after { top: 6px; }
}

/* PAX page F3 journey (charts/journey.js): career log / climb toggle, badge shelf */
.jr-seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.jr-seg button { font: 600 12.5px/1 inherit; font-family: inherit; color: var(--text-2); background: transparent; border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.jr-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.jr-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.jr-log.cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.jr-col { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--grid); display: grid; gap: 10px; align-content: start; }
.jr-yr { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin: 4px 0 0 -15px; background: var(--surface); width: max-content; padding-right: 6px; }
.jr-ev { display: grid; grid-template-columns: 22px 52px minmax(0, 1fr); gap: 8px; align-items: start; margin-left: -26px; }
.jr-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; background: var(--c); border: 3px solid var(--surface); }
.jr-dot.first { color: var(--surface); }
.jr-dot.hit, .jr-dot.eh, .jr-dot.ao { font-size: 7.5px; }
.jr-d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.jr-t b { font-weight: 600; font-size: 14px; }
.jr-ev.major .jr-t b { font-size: 15px; }
.jr-t span { display: block; font-size: 12px; color: var(--text-2); }
.jr-more { justify-self: start; margin-top: 6px; }
.jr-shelf { display: grid; gap: 10px; border-top: 1px solid var(--grid); padding-top: 14px; margin-top: 14px; }
.jr-shelf.wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.jr-h { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.jr-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.jr-badge { display: grid; gap: 3px; align-content: start; padding: 10px; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.jr-ring { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--font-head); color: #fff; background: var(--c); }
.jr-ring.first { color: var(--surface); }
.jr-ring.next { background: transparent; color: var(--muted); border: 2px dashed var(--axis); grid-row: span 2; }
.jr-n { display: block; font-weight: 600; font-size: 12.5px; line-height: 1.25; }
.jr-bd { display: block; font-size: 11.5px; color: var(--muted); }
.jr-next { display: grid; gap: 8px; }
.jr-nx { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 4px 10px; align-items: center; background: var(--surface-2); border: 1px dashed var(--axis); border-radius: 12px; padding: 10px; }
.jr-bar { grid-column: 2; height: 5px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.jr-bar i { display: block; height: 100%; background: var(--heat-2); }
@media (max-width: 640px) {
  .jr-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.jr-side { display: grid; gap: 0; align-content: start; }
.jr-ehd { margin-top: 12px; }
.jr-ehd p { margin: 0; font-size: 13px; line-height: 1.6; }

/* Section bar (ui.js sectionBar): splits a busy page into sections */
.section-bar { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin: 4px 0 2px; }
.section-bar::-webkit-scrollbar { display: none; }
.section-btn { font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 9px 12px 8px; cursor: pointer; white-space: nowrap; }
.section-btn:hover { color: var(--text); }
.section-btn[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
.section-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }

/* PAX page AO passport (charts/passport.js) */
.pp { display: grid; gap: 10px; }
.pp-sum { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.pp-sum b { font-size: 22px; font-weight: 700; }
.pp-sum span { color: var(--text-2); font-size: 13px; }
.pp-nudge { margin: 0; background: var(--surface-2); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--text-2); }
.pp-nudge b { color: var(--text); }
.pp-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pp-stamp { position: relative; display: grid; gap: 2px; align-content: start; min-width: 0; padding: 9px 10px 10px; border-radius: 12px;
  border: 2px solid var(--heat-2); background: color-mix(in srgb, var(--heat-2) 7%, var(--surface)); }
.pp-days { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.pp-ao { font-size: 13px; font-weight: 600; line-height: 1.2; padding-right: 34px; }
.pp-num { font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--heat-2); font-variant-numeric: tabular-nums; }
.pp-since { font-size: 11px; color: var(--muted); }
.pp-q { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff; background: var(--series-2); transform: rotate(-12deg); box-shadow: 0 0 0 2px var(--surface); }
.pp-stamp.no { border: 2px dashed var(--axis); background: transparent; }
.pp-stamp.no .pp-num { font-size: 14px; font-weight: 600; color: var(--muted); }
.pp-stamp.pick { border-color: var(--series-2); }
.pp-stamp.pick .pp-num { color: var(--series-2); }
@media (max-width: 640px) {
  .pp-stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pp-new { position: absolute; bottom: 9px; right: 9px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--good); background: color-mix(in srgb, var(--good) 15%, var(--surface)); border-radius: 999px; padding: 2px 7px; }
