/* Gryffs Billboards. Loaded after tylerd.me's /assets/css/style.css and
   reuses its tokens (--bg, --card-bg, --ink, --muted, --faint, --accent...). */

.gryffs {
  --series-1: #bd5fff;   /* boards (the site accent) */
  --series-2: #199e70;   /* comments */
  --line: rgba(255, 255, 255, 0.08);
  --baseline: rgba(255, 255, 255, 0.16);
  --field: rgba(255, 255, 255, 0.04);
  --plot-h: 220px;
  line-height: 1.5;
}

.gryffs a:focus-visible,
.gryffs button:focus-visible,
.gryffs input:focus-visible,
.gryffs select:focus-visible,
.gryffs [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; }

.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }

/* ---- archive bar ---------------------------------------------------- */

.archive-bar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  align-items: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.archive-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink-strong);
}
.archive-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
}
.archive-links { display: flex; gap: 20px; flex-wrap: wrap; }
.archive-link { font-size: 14px; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.archive-link:hover { color: var(--accent); }
.archive-link[aria-current="page"] { color: var(--ink-strong); border-bottom-color: var(--accent); }
.archive-search { margin-left: auto; }
.archive-search .input { width: 220px; }

/* ---- form controls ---------------------------------------------------- */

.input,
.select {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.input::placeholder { color: var(--faint); }
.input:hover, .select:hover { border-color: var(--border-hover); }
.input:focus, .select:focus { border-color: var(--accent); outline: none; }
.input--lg { font-size: 16px; padding: 13px 16px; flex: 1; min-width: 0; }
.input--sm { font-size: 13px; padding: 7px 12px; }
.input--tag { width: 90px; text-transform: uppercase; }
.select { padding: 7px 10px; font-size: 13px; }
.select option { background: #1d1c21; }
.gryffs button.btn { border: 0; cursor: pointer; font-family: inherit; }
.gryffs button.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.16); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--faint); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--accent); }

.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 20px; }
.inline-form label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inline-form .check { cursor: pointer; }
.inline-form input[type="checkbox"] { accent-color: var(--accent); }

/* ---- hero, headings, sections ---------------------------------------- */

.gryffs .hero--page { padding-top: 40px; padding-bottom: 24px; }
.gryffs .hero--page h1 { margin-top: 0; }
.hero--archive h1 { font-size: 52px; }
.hero--board h1 { font-size: 34px; line-height: 1.2; margin-bottom: 12px; overflow-wrap: anywhere; }
.hero-search { display: flex; gap: 10px; max-width: 640px; margin-top: 28px; }
.gryffs .section .section-title { font-size: 22px; margin: 0 0 16px; }
.gryffs .section .section-title--sm { font-size: 17px; }
.gryffs .section-sub { margin: -8px 0 16px; }
.gryffs .section.section--tight { padding-bottom: 40px; }
.more-link { margin: 4px 0 0; }
.empty-note { color: var(--faint); padding: 16px 0; margin: 0; }
.source-note { font-size: 13px; color: var(--faint); margin-top: 24px; }
.source-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.gryffs .prose h2 { font-size: 22px; margin: 36px 0 12px; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }

/* ---- stat tiles --------------------------------------------------------- */

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}
.stat-label { font-size: 13px; color: var(--faint); }
.stat-value { font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 600; color: var(--ink-strong); line-height: 1.1; }
.stat-value--sm { font-size: 18px; }

/* ---- chips, tags, tabs -------------------------------------------------- */

.gryffs .chip { display: inline-flex; align-items: center; gap: 6px; }
.chips--sm { gap: 6px; margin-bottom: 12px; }
.chips--sm .chip { padding: 5px 12px; font-size: 13px; }
.chip--link:hover { border-color: var(--accent); color: var(--ink-strong); }
.chip--active { border-color: var(--accent); background: rgba(189, 95, 255, 0.12); color: var(--ink-strong); }
.chip-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tag-list { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 8px; vertical-align: 2px; }
.tag--link { font-size: 11px; padding: 2px 9px; }
.tag--link:hover { color: var(--accent); }
.hero .tag-list { margin-left: 0; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; }

.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs-row .inline-form { margin: 0; }
.tabs { display: flex; gap: 6px; }
.tab { display: inline-flex; gap: 8px; align-items: center; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.tab:hover { color: var(--ink-strong); border-color: var(--border-hover); }
.tab[aria-current="page"] { color: var(--ink-strong); border-color: var(--accent); background: rgba(189, 95, 255, 0.12); }

/* ---- lists ------------------------------------------------------------ */

.board-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.board-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.board-row-title { font-size: 16px; font-weight: 500; color: var(--ink-strong); overflow-wrap: anywhere; }
.board-row-title:hover { color: var(--accent); }
.board-row-meta { margin-top: 3px; font-size: 13px; color: var(--faint); }
.deleted-title { font-style: italic; color: var(--faint); }
.board-row-title:hover .deleted-title { color: var(--accent); }
.author { color: var(--ink); font-weight: 500; }
a.author:hover { color: var(--accent); }
.author--unknown { color: var(--faint); font-style: italic; font-weight: 400; }

.leader-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.leader-list li { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.leader-rank { width: 20px; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.leader-count { margin-left: auto; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th { text-align: left; font-weight: 500; }
.data-table thead th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--baseline); }
.data-table td, .data-table tbody th { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody th a { color: var(--ink-strong); }
.data-table tbody th a:hover { color: var(--accent); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pager { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 28px; font-size: 14px; }
.pager-link { color: var(--accent); font-weight: 600; }
.pager-link.is-disabled { color: var(--faint); opacity: 0.5; font-weight: 400; }
.pager-status { color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---- posts ------------------------------------------------------------ */

.board-nav {
  max-width: 1040px;
  margin: 20px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.board-nav-link { color: var(--muted); }
.board-nav-link:hover { color: var(--accent); }
.board-nav-id { color: var(--faint); }
.board-summary { color: var(--muted); font-size: 15px; margin: 0 0 12px; }

.thread > * { max-width: 820px; }
.thread-heading { font-size: 17px !important; margin: 28px 0 12px !important; color: var(--muted) !important; }
.post {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  padding: 16px 20px 18px;
  margin-bottom: 10px;
  scroll-margin-top: 24px;
}
.post--original { border-color: rgba(189, 95, 255, 0.35); }
.post--gone { border-style: dashed; background: transparent; color: var(--muted); }
.post--gone p { margin: 0; }
.post:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; font-size: 13px; }
.post-who { font-size: 14px; }
.date { color: var(--faint); }
time.date { cursor: help; text-decoration: underline dotted rgba(255, 255, 255, 0.2); text-underline-offset: 3px; }
.post-anchor { margin-left: auto; color: var(--faint); font-family: ui-monospace, Menlo, Consolas, monospace; }
.post-anchor:hover { color: var(--accent); }
.post-context { margin-left: auto; color: var(--faint); max-width: 100%; overflow-wrap: anywhere; }
.post-context span { color: var(--muted); }
.post-context:hover span { color: var(--accent); }
.post-body { font-size: 15px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.post-body p { margin: 0 0 10px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body a { color: var(--accent); }
.post-body a:hover { text-decoration: underline; }
.post-body a[href*="gryff.php?id="] {
  display: inline-block;
  padding: 0 8px;
  margin: 1px 0;
  border-radius: 999px;
  background: rgba(189, 95, 255, 0.1);
  font-size: 13px;
}
.post-body blockquote { margin: 8px 0; padding-left: 14px; border-left: 2px solid var(--border-hover); color: var(--muted); }
.post-body ul, .post-body ol { padding-left: 22px; margin: 6px 0; }
.post-body pre { white-space: pre-wrap; }
.hit-title { font-weight: 600; color: var(--ink-strong); }
mark { background: rgba(189, 95, 255, 0.3); color: var(--ink-strong); border-radius: 3px; padding: 0 2px; }

.player-hit { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 20px; margin-bottom: 16px; }
.player-hit .eyebrow { margin: 0; }
.player-hit-name { font-family: "Space Grotesk", sans-serif; font-size: 18px; font-weight: 600; color: var(--ink-strong); }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.results-head p { margin: 0; color: var(--muted); }
.results-head .chips { margin: 0; }

.search-form { max-width: 720px; }
.search-main { display: flex; gap: 10px; }
.search-options { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.search-options label { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }

/* ---- charts ----------------------------------------------------------- */

.chart {
  margin: 0;
  padding: 18px 20px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
}
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-title { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 16px; font-weight: 600; color: var(--ink-strong); }
.chart-sub { margin: 2px 0 0; font-size: 13px; color: var(--faint); }
.legend { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.key { width: 10px; height: 10px; border-radius: 3px; }
.key--1 { background: var(--series-1); }
.key--2 { background: var(--series-2); }

.chart-body { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
.chart-y { position: relative; height: var(--plot-h); }
.chart-y span {
  position: absolute;
  right: 8px;
  bottom: var(--at);
  transform: translateY(50%);
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.chart-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; }
.chart-plot { position: relative; height: calc(var(--plot-h) + 24px); min-width: calc(var(--n) * 4px); }
.chart-grid { position: absolute; inset: 0 0 auto 0; height: var(--plot-h); pointer-events: none; }
.chart-grid i { position: absolute; left: 0; right: 0; bottom: var(--at); border-top: 1px solid var(--line); }
.chart-cols {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--plot-h);
  display: flex;
  border-bottom: 1px solid var(--baseline);
}
.chart-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  justify-content: center;
  padding: 0 1px;
}
.chart-col:hover, .chart-col:focus-visible, .chart-col.is-active { background: rgba(255, 255, 255, 0.05); }
.chart-col:focus-visible { outline-offset: -2px; }
.bar { width: 100%; max-width: 24px; height: 100%; display: flex; flex-direction: column-reverse; gap: 2px; }
.seg { display: block; height: var(--v); flex: none; }
.bar .seg:last-child { border-radius: 3px 3px 0 0; }
.seg--1 { background: var(--series-1); }
.seg--2 { background: var(--series-2); }
.chart-x { position: absolute; left: 0; right: 0; top: calc(var(--plot-h) + 6px); height: 18px; pointer-events: none; }
.chart-x span { position: absolute; left: var(--at); transform: translateX(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

.chart-tip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  padding: 8px 12px;
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  background: #211f26;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  color: var(--muted);
  max-width: 260px;
}
.chart-tip strong { display: block; color: var(--ink-strong); font-weight: 600; margin-bottom: 2px; }
.chart-tip[hidden] { display: none; }

/* ---- login + footer ----------------------------------------------------- */

.login-card { max-width: 480px; padding: 24px; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.login-row { display: flex; gap: 10px; }
.login-row .input { flex: 1; min-width: 0; }
.form-error { color: #ff9b9b; font-size: 14px; margin: 12px 0 0; }
.login-card .muted { margin: 16px 0 0; }

.archive-footer {
  max-width: 1040px;
  margin: 24px auto 0;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--faint);
}
.archive-footer p { margin: 0; }
.archive-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.archive-footer a:hover { color: var(--accent); }

/* ---- small screens ------------------------------------------------------ */

@media (max-width: 760px) {
  .archive-bar { padding-bottom: 14px; }
  .archive-search { margin-left: 0; width: 100%; }
  .archive-search .input { width: 100%; }
  .gryffs .hero--page h1, .hero--archive h1 { font-size: 34px; }
  .hero--board h1 { font-size: 26px; }
  .hero-search, .search-main, .login-row { flex-direction: column; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 24px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .post { padding: 14px 16px 16px; }
  .gryffs { --plot-h: 180px; }
  .chart { padding: 16px 12px 10px; }
  .chart-body { grid-template-columns: 34px minmax(0, 1fr); }
}
