/* ==========================================================================
   FBTTracker — public site styles
   Premium sports-analytics look: black hero, gold accents, white data cards,
   restrained colour. Positive/negative never rely on colour alone (signs,
   icons and labels carry the meaning too).
   ========================================================================== */

:root {
  /* FBTTracker identity, taken from the logo: black roundel, gold crown,
     white lettering. Every value below is contrast-checked — gold on black
     and black on gold are both 11.5:1; --gold-deep is the only gold used for
     text on white (4.9:1) because the brand gold itself is 1.7:1 there. */
  --black: #0b0b0b;
  --black-2: #17170f;
  --gold: #e8c24a;
  --gold-bright: #f2d468;
  --gold-deep: #8a6d0f;     /* gold for text/links on light surfaces (AA) */
  --gold-chart: #a87900;    /* gold for chart marks on white (3.9:1) */
  --ink: #101010;
  --muted: #5a5a5a;
  --faint: #6b6b6b;
  --line: #e5e3dc;
  --bg: #f7f7f5;
  --card: #ffffff;
  --pos: #067647;
  --pos-bg: #e7f6ef;
  --neg: #b42318;
  --neg-bg: #fdecea;
  --pending-bg: #eeeeea;
  --void-bg: #f2f0e9;
  --void-ink: #6b6540;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px; /* keep anchored sections clear of the sticky nav */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }

a { color: var(--gold-deep); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px; top: -48px;
  z-index: 100;
  background: var(--black);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

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

/* --------------------------------------------------------------------------
   Header / navigation (sticky on desktop)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 11, 0.97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__mark { flex: 0 0 auto; display: block; }

.brand__name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand__accent { color: var(--gold); }

.site-nav__list {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: #e6e3d8;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 18px; height: 2px;
  background: #fff;
  border-radius: 2px;
  content: "";
  transition: transform 0.15s ease;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before { position: absolute; top: -6px; }
.nav-toggle__bar::after { position: absolute; top: 6px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--black);
    padding: 8px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .site-nav__list.is-open { display: flex; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(232, 194, 74, 0.16), transparent 60%),
    linear-gradient(180deg, var(--black) 0%, var(--black-2) 100%);
  color: #fff;
  padding: 72px 0 80px;
  text-align: center;
}

.hero__kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9c4b0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 20px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0 auto 16px;
  max-width: 18ch;
}

.hero__lede {
  max-width: 58ch;
  margin: 0 auto 36px;
  color: #d8d5cb;
  font-size: 1.06rem;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 32px;
  padding: 0;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 16px 26px;
  min-width: 160px;
}

.hero-stat dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9c4b0;
  margin-bottom: 4px;
}

.hero-stat__value {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-stat__value--pos { color: #5fd39a; }
.hero-stat__value--neg { color: #ff9d94; }

.hero__note {
  margin: 22px auto 0;
  font-size: 0.85rem;
  color: #a9a496;
}

/* Buttons */
.button {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

/* Gold field with black lettering — the logo's own pairing, and 11.5:1.
   The brand gold is never used for text on white (only 1.7:1); --gold-deep
   exists for that. */
.button--primary {
  background: var(--gold);
  color: var(--black);
  box-shadow: 0 4px 14px rgba(232, 194, 74, 0.35);
}
.button--primary:hover { background: var(--gold-bright); transform: translateY(-1px); }

.button--ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}
.button--ghost:hover { border-color: var(--faint); }

.button--small { padding: 8px 16px; font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */
.filters {
  margin-top: -34px; /* overlap the hero for the floating-panel effect */
}

.filters__panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: flex-start;
}

.filter-group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.filter-group legend,
.filter-group > label > span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover { border-color: var(--faint); }

.chip.is-active {
  background: var(--black);
  border-color: var(--black);
  color: var(--gold);
}

.chip:disabled { opacity: 0.55; cursor: wait; }

.custom-range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.custom-range label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.custom-range input[type="date"],
#result-filter {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 40px;
}

#result-filter { min-width: 170px; }

.active-range {
  margin: 12px 4px 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Data-load failure notice — its own element so re-rendering the table
   cannot wipe the message. */
.load-error {
  margin: 10px 4px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--neg-bg);
  border: 1px solid #f2c3be;
  color: var(--neg);
  font-size: 0.92rem;
}
.load-error[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Sections & summary stats
   -------------------------------------------------------------------------- */
main > section { padding: 44px 0; }
main > .filters { padding: 0; }
main > .summary { padding-top: 36px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.stat:hover { transform: translateY(-2px); }

.stat__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--pending-bg);
  font-size: 0.85rem;
  color: var(--muted);
}

.stat__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat__value {
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat__value--pos { color: var(--pos); }
.stat__value--neg { color: var(--neg); }

.stat__sub {
  font-size: 0.8rem;
  color: var(--faint);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Results table
   -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head h2 { margin: 0; }

.results-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search input[type="search"] {
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 10px 14px;
  min-width: 260px;
  min-height: 42px;
}

/* Sorting control for narrow screens, where the column headers (and their
   sort buttons) are replaced by the card layout. */
.mobile-sort { display: none; }

.mobile-sort select {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 42px;
}

@media (max-width: 720px) {
  .mobile-sort { display: block; }
  .search input[type="search"] { min-width: 0; width: 100%; }
  .results-controls { width: 100%; }
}

.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.results-table th,
.results-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.results-table thead th {
  position: sticky;
  top: 0;
  background: #fbfaf6;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table tbody tr:hover { background: #faf9f5; }

.th-sort {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-transform: inherit;
  letter-spacing: inherit;
}

th[aria-sort] .th-sort::after { content: " ↓"; color: var(--gold-deep); }
th[aria-sort="ascending"] .th-sort::after { content: " ↑"; }

.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.results-table td.num { text-align: right; }

.row-date { font-weight: 600; white-space: nowrap; }
.row-time {
  display: block;
  font-size: 0.8rem;
  color: var(--faint);
}

.cell-event { font-weight: 500; min-width: 200px; }

.cell-tips { min-width: 180px; }

.tip {
  display: inline-block;
  background: #fbf3dc;
  color: #6f5709;
  border: 1px solid #ecd9a0;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 3px 10px;
  margin: 2px 4px 2px 0;
}

.money { font-variant-numeric: tabular-nums; }
.money--pos { color: var(--pos); font-weight: 600; }
.money--neg { color: var(--neg); font-weight: 600; }
.money--zero { color: var(--muted); }
.money--pending { color: var(--faint); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.badge__icon { font-size: 0.75rem; }

.badge--win { background: var(--pos-bg); color: var(--pos); }
.badge--loss { background: var(--neg-bg); color: var(--neg); }
.badge--pending { background: var(--pending-bg); color: var(--muted); }
.badge--void { background: var(--void-bg); color: var(--void-ink); }
.badge--cancelled { background: #ece9f4; color: #574f79; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.table-count { margin: 0; font-size: 0.88rem; color: var(--muted); }

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state p { margin: 4px 0; }

/* Mobile: table rows become result cards */
@media (max-width: 720px) {
  .results-table thead { display: none; }
  .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; }

  .results-table tr {
    border-bottom: 6px solid var(--bg);
    padding: 8px 4px;
  }
  .results-table tr:last-child { border-bottom: 0; }

  .results-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    border-bottom: 0;
    padding: 6px 12px;
    text-align: right;
  }

  .results-table td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--faint);
    text-align: left;
    flex: 0 0 auto;
  }

  .cell-event, .cell-tips { min-width: 0; }
  .cell-tips { flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   Chart
   -------------------------------------------------------------------------- */
.chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.chart-holder {
  position: relative;
  height: 380px;
}

@media (max-width: 720px) {
  .chart-holder { height: 280px; }
}

.chart-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.chart-picker { display: flex; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------------------
   Insights
   -------------------------------------------------------------------------- */
.insights__list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.insights__list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.98rem;
}

.disclaimer {
  background: #fff8eb;
  border: 1px solid #f5e0b8;
  border-radius: 10px;
  padding: 16px 18px;
  color: #7a5410;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--black);
  color: #c2beb0;
  padding: 40px 0 48px;
  margin-top: 24px;
  font-size: 0.9rem;
}

.site-footer a { color: #e6e3d8; }

.site-footer__age {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  color: #f2efe4;
  margin: 0 0 18px;
}

.age-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid #e6b23c;
  color: #e6b23c;
  font-weight: 700;
  font-size: 0.85rem;
}

.site-footer__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0 0 18px;
  padding: 0;
}

.site-footer__help { margin: 0 0 14px; }

.site-footer__small { margin: 0; color: #96927f; font-size: 0.82rem; }

/* Legal / information pages */
.legal-page {
  max-width: 820px;
  padding-top: 40px;
  padding-bottom: 60px;
}
.legal-page h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.legal-page h2 { margin-top: 1.6em; font-size: 1.2rem; }
.legal-table {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Loading state */
body.is-loading .stat-grid,
body.is-loading .table-wrap,
body.is-loading .chart-card,
body.is-loading .insights__list {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

/* --------------------------------------------------------------------------
   404 — same black/gold language as the tracker, but a dead simple layout
   -------------------------------------------------------------------------- */
.fbt-404 {
  background:
    radial-gradient(1200px 420px at 70% -10%, rgba(232, 194, 74, 0.16), transparent 60%),
    linear-gradient(180deg, var(--black) 0%, var(--black-2) 100%);
  color: #fff;
  min-height: 68vh;
  display: flex;
  align-items: center;
  padding: 72px 0 88px;
  text-align: center;
}

.fbt-404__inner { width: 100%; }

.fbt-404__code {
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
  color: var(--gold);
  opacity: 0.9;
}

.fbt-404 h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin: 0 auto 14px;
  max-width: 20ch;
}

.fbt-404__lede {
  max-width: 52ch;
  margin: 0 auto 30px;
  color: #d8d5cb;
  font-size: 1.03rem;
}

.fbt-404__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.fbt-404__actions .button--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.fbt-404__actions .button--ghost:hover { border-color: var(--gold); color: var(--gold); }

.fbt-404__search {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.fbt-404__search input[type="search"] {
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-radius: 10px;
  padding: 11px 15px;
  min-width: 260px;
  min-height: 44px;
}
.fbt-404__search input[type="search"]::placeholder { color: #a9a496; }

.fbt-404__search .button--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.fbt-404__search .button--ghost:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 560px) {
  .fbt-404__search input[type="search"] { min-width: 0; width: 100%; }
}

/* The 404 is a black page end to end — stop the light page background
   showing through between the hero and the footer. */
body.fbt-404-page { background: var(--black); }
body.fbt-404-page .fbt-root { display: flex; flex-direction: column; min-height: 100vh; }
body.fbt-404-page .fbt-404 { flex: 1 0 auto; }

/* --------------------------------------------------------------------------
   Inner pages (anything that is not the tracker itself)

   The tracker is a full-bleed dashboard; ordinary pages are reading material,
   so they get a measured content column on the light surface with the same
   black/gold chrome above and below.
   -------------------------------------------------------------------------- */
body.fbt-inner { background: var(--bg); }

.fbt-content {
  padding: 48px 0 72px;
  min-height: 50vh;
}

.fbt-content__inner { max-width: 820px; }

.fbt-article__head {
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 3px solid var(--gold);
}

.fbt-article__title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  margin: 0;
  color: var(--ink);
}

.fbt-article__meta {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Readable long-form content */
.fbt-prose {
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--ink);
}

.fbt-prose > * + * { margin-top: 1.1em; }

.fbt-prose h2,
.fbt-prose h3,
.fbt-prose h4 {
  margin-top: 1.9em;
  margin-bottom: 0.45em;
  line-height: 1.25;
  color: var(--ink);
}
.fbt-prose h2 { font-size: 1.55rem; }
.fbt-prose h3 { font-size: 1.25rem; }
.fbt-prose h4 { font-size: 1.06rem; }

.fbt-prose a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 2px; }
.fbt-prose a:hover { color: var(--ink); }

.fbt-prose ul,
.fbt-prose ol { padding-left: 1.35em; }
.fbt-prose li + li { margin-top: 0.45em; }

.fbt-prose img,
.fbt-prose iframe,
.fbt-prose video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.fbt-prose blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.fbt-prose code {
  background: #f0efe9;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.fbt-prose pre {
  background: var(--black);
  color: #f2efe4;
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
}
.fbt-prose pre code { background: none; border: 0; color: inherit; padding: 0; }

.fbt-prose table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fbt-prose th,
.fbt-prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.fbt-prose th { background: #fbfaf6; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fbt-prose tr:last-child td { border-bottom: 0; }

.fbt-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Post / archive listings */
.fbt-postlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.fbt-postlist__item {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.fbt-postlist__link {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.fbt-postlist__link:hover { color: var(--gold-deep); }

.fbt-postlist__date { display: block; font-size: 0.82rem; color: var(--faint); margin-top: 3px; }
.fbt-postlist__excerpt { margin: 8px 0 0; color: var(--muted); }

.fbt-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.fbt-pagination .page-numbers {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}
.fbt-pagination .page-numbers:hover { border-color: var(--gold); }
.fbt-pagination .page-numbers.current {
  background: var(--black);
  border-color: var(--black);
  color: var(--gold);
  font-weight: 600;
}

.fbt-noresults {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.fbt-noresults p { margin: 4px 0; }

.fbt-backlink { margin-top: 40px; font-size: 0.95rem; }
.fbt-backlink a { color: var(--gold-deep); text-decoration: none; font-weight: 600; }
.fbt-backlink a:hover { text-decoration: underline; }

/* WordPress alignment helpers, so editor layouts behave */
.fbt-prose .alignleft { float: left; margin: 0.4em 1.4em 1em 0; }
.fbt-prose .alignright { float: right; margin: 0.4em 0 1em 1.4em; }
.fbt-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.fbt-prose .alignwide,
.fbt-prose .alignfull { max-width: 100%; }
.fbt-prose::after { content: ""; display: table; clear: both; }

/* Short pages should still push the footer to the bottom of the viewport,
   rather than leaving it floating halfway up. */
body.fbt-inner .fbt-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.fbt-inner .fbt-content { flex: 1 0 auto; }
