/* Built by theme/build-tr.mjs: do not edit, edit the files named below instead. */
/* assets/css/tr/tokens.css */
/* ── Tome Raider design tokens ──
   The one place to change the look of every entry page (spells, feats, monsters...) and index table.
   Colours come from the live site: Ghost accent #278cb6, navy content band, gold for paid tiers.
   Sizes are in px: Source sets html{font-size:62.5%}, so 1rem = 10px. */
:root {
  --tr-brand: #278cb6;        /* site accent: fills, rules, focus */
  --tr-brand-ink: #1e6e91;    /* same hue, AA-safe for text and buttons (5.7:1 on white) */
  --tr-navy: #0e3142;         /* overview band, table headers, CTA */
  --tr-navy-deep: #091a29;
  --tr-gold: #d4a827;         /* paid tier */
  --tr-gold-ink: #8a6a12;
  --tr-lavender: #d8c5e8;     /* table zebra */

  --tr-bg: #ffffff;
  --tr-surface: #f8fafc;
  --tr-sunken: #f1f5f9;
  --tr-ink: #1a202c;
  --tr-ink-2: #4a5568;
  --tr-line: #e2e8f0;
  --tr-line-strong: #cbd5e0;
  --tr-zebra: color-mix(in srgb, var(--tr-lavender) 32%, transparent);
  --tr-tint: color-mix(in srgb, var(--tr-brand) 8%, transparent);
  --tr-focus: var(--tr-brand-ink);
  --tr-shadow: 0 1px 2px rgb(14 49 66 / .06), 0 6px 20px rgb(39 140 182 / .10);
  --tr-radius: 12px;

  --tr-font-ui: var(--gh-font-body, var(--font-sans, "Inter")), system-ui, -apple-system, "Segoe UI", sans-serif;
  --tr-font-display: var(--gh-font-heading, var(--font-sans, "Inter")), system-ui, sans-serif;
  --tr-font-fantasy: "Cinzel", "Trajan Pro", Georgia, serif;          /* section labels (loaded by the site's code injection) */
  --tr-font-flavor: "Crimson Pro", "Iowan Old Style", Georgia, serif;  /* flavor quotes */
  --tr-measure: 68ch;         /* max line length of body text */
  --tr-page: 760px;           /* entry page width */
  --tr-stats-cols: 4;         /* stat boxes per row on wider screens (2 on phones); a type can override */
}

/* assets/css/tr/entry.css */
/* ── Entry pages: one design for spells, feats, monsters... ──
   Template: partials/tr/entry.hbs (breadcrumb, title, paywall CTA, prev/next).
   Content:  written by the importer (lib/entry-markup.mjs): eyebrow, badges, meta chips, stats,
             overview, sections, callouts, tables, flavor quote.
   Per-type differences go in types/<type>.css, keyed on .tr-entry[data-type="..."].

   Order: the article is a flex column, so blocks from the post content can sit around the title
   that the template prints: breadcrumb (-3), eyebrow (-2), title (-1), everything else in post order,
   flavor quote last (99). */

.tr-page {
  background: var(--tr-bg); color: var(--tr-ink);
  font-family: var(--tr-font-ui); font-size: 16px; line-height: 1.6;
  padding: 24px 16px 72px; -webkit-font-smoothing: antialiased;
}
.tr-page *, .tr-page *::before, .tr-page *::after { box-sizing: border-box; }
.tr-page a { color: inherit; }
.tr-page :focus-visible { outline: 2px solid var(--tr-focus); outline-offset: 2px; border-radius: 4px; }
.tr-entry, .tr-after { max-width: var(--tr-page); margin: 0 auto; }
.tr-entry { display: flex; flex-direction: column; }
.tr-entry > * { min-width: 0; margin-top: 0; }

.tr-crumbs { order: -3; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--tr-ink-2); margin: 0 0 20px; }
.tr-crumbs a { text-decoration: none; padding: 6px 0; }
.tr-crumbs a:hover { color: var(--tr-brand-ink); }

/* ---------- header ---------- */
.tr-eyebrow {
  order: -2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tr-brand-ink);
}
.tr-eyebrow a { text-decoration: none; }
.tr-eyebrow a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tr-eyebrow::before {   /* the star sigil */
  content: ""; width: 16px; height: 16px; flex: none; background: var(--tr-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l2.6 6.3 6.8.5-5.2 4.4 1.6 6.7L12 15.8 6.2 19.4l1.6-6.7L2.6 8.3l6.8-.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l2.6 6.3 6.8.5-5.2 4.4 1.6 6.7L12 15.8 6.2 19.4l1.6-6.7L2.6 8.3l6.8-.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tr-title {
  order: -1; font-family: var(--tr-font-display); font-weight: 800;
  font-size: clamp(36px, 27.2px + 2.6vw, 52px); line-height: 1.05; letter-spacing: -.025em;
  margin: 0 0 14px; text-wrap: balance; color: var(--tr-ink);
}
/* badges + meta rows; the bottom rule closes the header (present even when empty) */
.tr-head { padding: 0 0 20px; margin: 0 0 24px; border-bottom: 1px solid var(--tr-line); }
.tr-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.tr-badges:last-child { margin-bottom: 0; }
.tr-badge {
  display: inline-flex; align-items: center; gap: 6px; line-height: 1;
  font-size: 13px; font-weight: 600; padding: 5px 10px 5px 5px; border-radius: 999px;
  background: var(--tr-tint); border: 1px solid color-mix(in srgb, var(--tr-brand) 35%, transparent); color: var(--tr-ink);
}
.tr-badge b {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--tr-brand-ink); color: #fff; font-size: 11px; font-weight: 800;
}
.tr-badge--tier {
  padding-left: 9px; background: color-mix(in srgb, var(--tr-gold) 12%, transparent);
  border-color: color-mix(in srgb, var(--tr-gold) 55%, transparent); color: var(--tr-gold-ink);
}
.tr-badge--tier::before {   /* lock icon */
  content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tr-meta { display: grid; gap: 10px; margin: 0; }
.tr-meta > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tr-meta dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tr-ink-2); min-width: 64px; }
.tr-meta dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tr-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px;
  border-radius: 999px; border: 1px solid var(--tr-line-strong); background: var(--tr-bg);
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--tr-ink);
  transition: border-color .15s, background-color .15s, color .15s;
}
a.tr-chip:hover { border-color: var(--tr-brand); background: var(--tr-tint); color: var(--tr-brand-ink); }
.tr-chip--muted { background: var(--tr-surface); border-color: var(--tr-line); color: var(--tr-ink-2); }

/* ---------- stats ---------- */
.tr-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 0 28px;
  background: var(--tr-line); border: 1px solid var(--tr-line); border-top: 4px solid var(--tr-brand);
  border-radius: var(--tr-radius); overflow: hidden; box-shadow: var(--tr-shadow);
}
@media (min-width: 640px) { .tr-stats { grid-template-columns: repeat(var(--tr-stats-cols), minmax(0, 1fr)); } }
.tr-stats > div { background: var(--tr-surface); padding: 12px 14px 14px; min-width: 0; }
.tr-stats dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tr-ink-2); margin: 0 0 4px; }
.tr-stats dd { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.tr-stats abbr { text-decoration: none; cursor: help; border-bottom: 1px dotted var(--tr-line-strong); }
.tr-stat-note { display: block; margin-top: 4px; font-weight: 400; font-size: 13px; line-height: 1.45; color: var(--tr-ink-2); }
.tr-stat-flag { display: block; font-size: 12px; font-weight: 600; color: var(--tr-brand-ink); margin-bottom: 1px; }

/* ---------- overview (the site's navy band) ---------- */
.tr-overview {
  margin: 0 0 36px; padding: 18px 20px; border-radius: var(--tr-radius);
  background: var(--tr-navy); color: #fff; border: 1px solid color-mix(in srgb, var(--tr-brand) 30%, transparent);
  font-size: 18px; line-height: 1.55; font-weight: 500; text-wrap: pretty;
}

/* ---------- body sections ---------- */
/* <section class="tr-section" data-label="Rules">: the label is drawn by CSS (no extra heading, so the
   site's auto table of contents stays off on short pages) */
.tr-section { max-width: var(--tr-measure); font-size: 17px; line-height: 1.7; }
.tr-section[data-label]::before {
  content: attr(data-label); display: flex; align-items: center; margin: 0 0 14px;
  font-family: var(--tr-font-fantasy); font-size: 14px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--tr-brand-ink);
  background: linear-gradient(var(--tr-line), var(--tr-line)) right center / calc(100% - 6.5em) 1px no-repeat;
}
.tr-section + .tr-section { margin-top: 32px; }
.tr-section p, .tr-callout p { margin: 0 0 1em; text-wrap: pretty; }
.tr-section strong { font-weight: 700; color: var(--tr-ink); }
.tr-section ul, .tr-callout ul { margin: 0 0 1em; padding-left: 1.25em; }
.tr-section li, .tr-callout li { margin: .25em 0; }
.tr-section li::marker, .tr-callout li::marker { color: var(--tr-brand); }

/* callout box, e.g. "At Higher Levels" */
.tr-callout {
  max-width: var(--tr-measure); margin: 28px 0 0; padding: 18px 20px 6px; font-size: 17px; line-height: 1.7;
  background: var(--tr-tint); border: 1px solid color-mix(in srgb, var(--tr-brand) 28%, transparent);
  border-left: 4px solid var(--tr-brand); border-radius: var(--tr-radius);
}
.tr-callout-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-family: var(--tr-font-fantasy); font-size: 16px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--tr-brand-ink);
}
.tr-callout-title::before {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tr-callout p:has(> strong:first-child) {
  padding: 10px 0 0; margin: 10px 0 .75em; border-top: 1px solid color-mix(in srgb, var(--tr-brand) 20%, transparent);
}

/* tables inside entries (roll tables...) */
.tr-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0 24px;
  font-size: 15px; line-height: 1.4; white-space: normal;
  border: 1px solid var(--tr-line); border-radius: var(--tr-radius); overflow: hidden; background: var(--tr-bg);
}
.tr-table caption {
  caption-side: top; text-align: left; padding: 0 0 8px;
  font-family: var(--tr-font-fantasy); font-weight: 600; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--tr-ink);
}
.tr-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--tr-navy); padding: 10px 14px; }
.tr-table td { padding: 9px 14px; border-top: 1px solid var(--tr-line); }
.tr-table tbody tr:first-child td { border-top: 0; }
.tr-table tbody tr:nth-child(even) td { background: var(--tr-zebra); }
.tr-table :is(td, th):first-child { width: 1%; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.tr-table th .tr-dice { color: #fff; background: none; border-color: rgb(255 255 255 / .6); }

/* dice: tr.js marks them; with the site's dice roller they become click-to-roll */
.tr-dice { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; color: var(--tr-brand-ink); padding: 0 3px; border-radius: 4px; border-bottom: 1px dashed currentColor; }
.tr-dice[role="button"] { cursor: pointer; transition: background-color .15s; }
.tr-dice[role="button"]:hover { background: var(--tr-tint); }

/* ---------- flavor quote: always the closing block ---------- */
.tr-flavor {
  order: 99; position: relative; margin: 48px 0 0; padding: 28px 0 0; border: 0;
  font-family: var(--tr-font-flavor); font-style: italic; font-size: 18px; line-height: 1.55; color: var(--tr-ink-2);
}
.tr-flavor::before {   /* hairline with a centred diamond */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--tr-line-strong) 20%, var(--tr-line-strong) 80%, transparent);
}
.tr-flavor::after {
  content: ""; position: absolute; top: -4px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px;
  transform: rotate(45deg); background: var(--tr-bg); border: 1px solid var(--tr-brand);
}
.tr-flavor p { margin: 0; max-width: var(--tr-measure); padding-left: 20px; border-left: 3px solid var(--tr-brand); }
@media (min-width: 640px) { .tr-flavor { font-size: 20px; } }

/* ---------- paywall CTA (template; Ghost's default box is hidden on entry pages) ---------- */
.tr-entry > .gh-post-upgrade-cta { display: none; }
.tr-cta { position: relative; margin-top: 4px; }
.tr-cta-ghost { position: relative; height: 140px; overflow: hidden; margin-bottom: -44px; }
.tr-cta-ghost span { display: block; height: 12px; margin: 0 0 14px; border-radius: 6px; background: var(--tr-line); }
.tr-cta-ghost span:nth-child(1) { width: 96%; } .tr-cta-ghost span:nth-child(2) { width: 88%; }
.tr-cta-ghost span:nth-child(3) { width: 93%; } .tr-cta-ghost span:nth-child(4) { width: 70%; }
.tr-cta-ghost span:nth-child(5) { width: 84%; }
.tr-cta-ghost::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, var(--tr-bg) 85%); }
.tr-cta-box {
  position: relative; text-align: center; padding: 30px 20px 26px; color: #fff;
  background: radial-gradient(120% 140% at 50% 0%, #144a63 0%, var(--tr-navy) 45%, var(--tr-navy-deep) 100%);
  border: 1px solid color-mix(in srgb, var(--tr-brand) 45%, transparent); border-radius: 16px; box-shadow: 0 10px 30px rgb(9 26 41 / .25);
}
.tr-cta-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; margin-bottom: 10px;
  color: var(--tr-gold); background: rgb(212 168 39 / .12); border: 1px solid rgb(212 168 39 / .45);
}
.tr-cta-icon svg { width: 22px; height: 22px; }
.tr-cta-title { font-family: var(--tr-font-fantasy); font-size: 24px; font-weight: 600; letter-spacing: .04em; line-height: 1.2; margin: 0 0 8px; color: #fff; }
.tr-cta p { margin: 0 auto 20px; max-width: 46ch; color: #cfe3ee; }
.tr-cta-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tr-page .tr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 26px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 16px/1 var(--tr-font-ui); background: #fff; color: var(--tr-navy); transition: box-shadow .2s, transform .15s;
}
.tr-page .tr-btn:hover { box-shadow: 0 0 0 4px rgb(39 140 182 / .45); }
.tr-page .tr-btn:active { transform: translateY(1px); }
.tr-cta :focus-visible { outline-color: #8fd3f0; }
.tr-cta-signin { font-size: 14px; color: #cfe3ee; }
.tr-page .tr-cta-signin a { color: #fff; padding: 4px 2px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- prev / next ---------- */
.tr-pager { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--tr-line); }
.tr-pager ul { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .tr-pager ul { grid-template-columns: 1fr 1fr; } }
.tr-pager-card {
  display: block; height: 100%; padding: 14px 16px; text-decoration: none;
  background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: var(--tr-radius); transition: border-color .15s, box-shadow .15s;
}
.tr-pager-card:hover { border-color: var(--tr-brand); box-shadow: var(--tr-shadow); }
.tr-pager small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tr-ink-2); }
.tr-pager strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0; }
.tr-pager span { font-size: 14px; color: var(--tr-ink-2); }
.tr-pager li.next { grid-column: 2; text-align: right; }
@media (max-width: 639px) { .tr-pager li.next { grid-column: auto; } }
.tr-page .tr-pager-all { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; padding: 6px 0; color: var(--tr-brand-ink); }
.tr-pager-all:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- index pages (/spells/ ...): heading above the searchable table ---------- */
.tr-index { max-width: 1040px; margin: 0 auto; }
.tr-index .tr-title { order: 0; }
.tr-index-lede { margin: 0 0 24px; max-width: 60ch; font-size: 18px; color: var(--tr-ink-2); }
.tr-index .data-search-container { margin: 0; }

@media (prefers-reduced-motion: reduce) { .tr-page * { transition: none !important; } }
@media print {
  .tr-crumbs, .tr-pager, .tr-cta { display: none; }
  .tr-page { background: #fff; color: #000; }
  .tr-overview { background: none; color: #000; border: 1px solid #000; }
}

/* assets/css/tr/table.css */
/* ── TR searchable tables: shared styles for every index table (spells, feats, monsters...) ──
   Builds on the site's "Premium Container" block above (the feats look) and only ADDS rules.
   Everything is scoped to .data-search-container[data-search-table], so a table must opt in with that
   marker; the current feats page (no marker) is never affected.
   Sizes in px: Source sets html{font-size:62.5%}, so 1rem = 10px.
   The .gh-content prefix is needed to outrank Source's own .gh-content .gh-table table rules.

   HOW TO CUSTOMISE
   1. Per table, simplest: change a variable. Either in the table config (lib/*-index.mjs `vars`, written
      into the table's style="" attribute) or in a per-type block at the bottom of this file:
        .data-search-container[data-type="monsters"] { --st-filters: 3; --st-max: 1200px; }
   2. Per column: the table config sets nowrap / wide / muted; anything else hooks on
        [data-type="spells"] td[data-col="school"] { ... }
   3. Site-wide look: edit the variables right below. */

.data-search-container[data-search-table] {
  --st-max: 1040px;          /* table width on desktop */
  --st-filters: 4;           /* filter dropdowns per row on desktop (2 on phones) */
  --st-accent: #278cb6;      /* site accent: borders, active filters */
  --st-link: #1e6e91;        /* accent for text: AA on white (the accent itself is 3.8:1) */
  --st-ink: #1a202c;
  --st-muted: #4a5568;
  --st-line: #e2e8f0;
  --st-line-strong: #cbd5e0;
  --st-surface: #f8fafc;     /* header row, zebra */
  --st-hover: #f0f7fa;
  --st-lock: #9a7612;        /* paid-tier lock icon */
  --st-focus: #8fd3f0;       /* focus ring on the navy filter band */
  max-width: var(--st-max);
}
.gh-content > .data-search-container[data-search-table] { grid-column: wide-start / wide-end; width: 100%; justify-self: center; }
.data-search-container .st-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tools stay hidden until the script runs (no JS = plain linked table) */
.data-search-container[data-search-table]:not(.is-ready) :is(.search-header-strip, .content-overview, .st-bar) { display: none; }

/* search */
.data-search-container[data-search-table] .search-header-strip { position: relative; }
.data-search-container[data-search-table] .search-input { min-height: 48px; padding: 10px 48px 10px 16px; font-size: 17px; -webkit-appearance: none; appearance: none; }
.data-search-container[data-search-table] .search-input:focus-visible { outline: 2px solid var(--st-focus); outline-offset: 2px; }
.data-search-container .st-kbd {
  position: absolute; right: 38px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 600 12px/1 var(--font-body, sans-serif); color: var(--st-muted); padding: 4px 7px; border: 1px solid var(--st-line-strong); border-radius: 5px; background: #fff;
}
.data-search-container .search-input:is(:focus, :not(:placeholder-shown)) ~ .st-kbd { display: none; }

/* filters */
.data-search-container[data-search-table] .content-overview { padding: 16px 24px 18px; }
.data-search-container[data-search-table] .filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .data-search-container[data-search-table] .filters-grid { grid-template-columns: repeat(var(--st-filters), minmax(0, 1fr)); } }
.data-search-container[data-search-table] .stat-label { font-size: 11px; letter-spacing: .08em; margin-bottom: 6px; }
.data-search-container[data-search-table] .filter-dropdown { min-height: 42px; padding: 8px 10px; font-size: 15px; }
.data-search-container[data-search-table] .filter-dropdown:focus-visible { outline: 2px solid var(--st-focus); outline-offset: 2px; }
.data-search-container[data-search-table] .filter-dropdown option:disabled { color: #a0aec0; }
.data-search-container[data-search-table] .stat-block.is-active .filter-dropdown { border-color: var(--st-accent); box-shadow: 0 0 0 2px var(--st-accent); }

/* toggle chips, clear, phone sort */
.data-search-container .st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 24px; border-bottom: 1px solid var(--st-line); background: #fff; }
.data-search-container .st-bar:not(:has(.st-toggle, .st-clear:not([hidden]))) { display: none; }
.data-search-container .st-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px 4px 5px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 var(--font-body, sans-serif); color: var(--st-ink); background: #fff; border: 1px solid var(--st-line-strong);
}
.data-search-container .st-toggle:not(:has(b)) { padding-left: 12px; }
.data-search-container .st-toggle b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; background: #edf2f7; color: var(--st-muted); }
.data-search-container .st-toggle[aria-pressed="true"] { border-color: var(--st-link); background: var(--st-hover); color: var(--st-link); }
.data-search-container .st-toggle[aria-pressed="true"] b { background: var(--st-link); color: #fff; }
.data-search-container :is(.st-clear, .search-clear) { font: 600 14px/1 var(--font-body, sans-serif); color: var(--st-link); background: none; border: 0; padding: 6px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.data-search-container :is(.st-toggle, .st-clear, .search-clear):focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.data-search-container .st-sort { display: none; margin-left: auto; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--st-muted); }
.data-search-container .st-sort select { min-height: 34px; padding: 4px 8px; font-size: 14px; border: 1px solid var(--st-line-strong); border-radius: 6px; background: #fff; color: var(--st-ink); }

.data-search-container[data-search-table] .results-info { font-size: 12px; color: var(--st-muted); padding: 12px 24px; }

/* table: undo Source's scroll box + nowrap, re-assert the shared look at the right specificity */
.gh-content .data-search-container[data-search-table] .gh-table { overflow-x: visible; }
.data-search-container[data-search-table] .data-table-wrapper { overflow: visible; }
.gh-content .data-search-container[data-search-table] .data-table { width: 100%; margin: 0; font-size: 15px; line-height: 1.45; white-space: normal; }
.gh-content .data-search-container[data-search-table] .data-table :is(th, td) { padding: 12px 16px; border-bottom: 1px solid var(--st-line); vertical-align: top; text-align: left; color: var(--st-ink); }
.gh-content .data-search-container[data-search-table] .data-table thead th {
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
  font-size: 12px; letter-spacing: .06em; color: var(--st-link); background: var(--st-surface); border-bottom: 2px solid var(--st-accent);
}
.gh-content .data-search-container[data-search-table] .data-table thead th[data-sort] { padding: 0; }
.data-search-container[data-search-table] th[data-sort] > button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 12px 16px; cursor: pointer; }
.data-search-container[data-search-table] th[data-sort] > button:focus-visible { outline: 2px solid var(--st-accent); outline-offset: -2px; border-radius: 3px; }
.data-search-container[data-search-table] .data-table tbody tr:nth-child(even) { background: none; }
.data-search-container[data-search-table] .data-table tbody tr.is-alt { background: var(--st-surface); }
.data-search-container[data-search-table] .data-table tbody tr:hover { background: var(--st-hover); }
.gh-content .data-search-container[data-search-table] .data-table td.st-nowrap { white-space: nowrap; overflow-wrap: normal; }
.gh-content .data-search-container[data-search-table] .data-table td.st-muted { font-size: 14px; color: var(--st-muted); }
.data-search-container[data-search-table] td.st-main { min-width: 240px; }
.gh-content .data-search-container[data-search-table] .item-link { font-size: 17px; font-weight: 700; color: var(--st-link); text-decoration: none; }
.gh-content .data-search-container[data-search-table] .item-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.data-search-container[data-search-table] .item-overview { font-size: 14px; margin-top: 4px; color: var(--st-muted); }
.data-search-container[data-search-table] .search-empty td { text-align: center; padding: 32px 16px; color: var(--st-muted); white-space: normal; }
.data-search-container .st-flag {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; vertical-align: 2px; border-radius: 50%;
  font-size: 10px; font-weight: 800; text-decoration: none; background: var(--st-link); color: #fff; cursor: help;
}
.data-search-container .st-lock {
  display: inline-block; width: 14px; height: 14px; margin-left: 6px; vertical-align: -1px; background: var(--st-lock);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* phones: rows become cards. Main cell on top, short cells on one line with "·", wide cells on their own line.
   Header sorting is replaced by the Sort select. */
@media (max-width: 759px) {
  .data-search-container[data-search-table] :is(.search-header-strip, .content-overview) { padding: 14px 16px; }
  .data-search-container[data-search-table] :is(.st-bar, .results-info) { padding-left: 16px; padding-right: 16px; }
  .data-search-container[data-search-table].is-ready .st-sort { display: inline-flex; }
  .data-search-container[data-search-table].is-ready .st-bar { display: flex; }
  .gh-content .data-search-container[data-search-table] .data-table thead { display: none; }
  .gh-content .data-search-container[data-search-table] :is(.data-table, .data-table tbody) { display: block; }
  .gh-content .data-search-container[data-search-table] .data-table tbody tr { display: flex; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--st-line); }
  .gh-content .data-search-container[data-search-table] .data-table tbody tr[hidden] { display: none; }
  .gh-content .data-search-container[data-search-table] .data-table :is(th, td) { display: block; padding: 0; border: 0; min-width: 0; font-size: 13px; color: var(--st-muted); }
  .gh-content .data-search-container[data-search-table] .data-table td.st-main { flex: 1 0 100%; margin-bottom: 6px; font-size: 15px; color: var(--st-ink); }
  .gh-content .data-search-container[data-search-table] .data-table td.st-main + td { font-weight: 700; color: var(--st-link); }
  .data-search-container[data-search-table] td:not(.st-main, .st-wide):not(:last-child):not(:has(+ .st-wide))::after { content: "·"; margin: 0 6px; color: #a0aec0; font-weight: 400; }
  .gh-content .data-search-container[data-search-table] .data-table td.st-wide { flex: 1 0 100%; margin-top: 2px; }
  .gh-content .data-search-container[data-search-table] .data-table tr.search-empty td { flex: 1 0 100%; padding: 24px 0; text-align: center; }
}

/* ── per-type overrides (keep these short; prefer variables) ── */
/* .data-search-container[data-type="spells"] { } */

/* assets/css/tr/types/feat.css */
/* ── Feats: only what feat pages do differently from the shared entry design (entry.css) ──
   Placeholder for when feats move to entry pages. Example: */
.tr-entry[data-type="feat"] {
  --tr-stats-cols: 3;        /* e.g. Prerequisite, Ability Score, Source */
}

/* assets/css/tr/types/spell.css */
/* ── Spells: only what spell pages do differently from the shared entry design (entry.css) ──
   Everything here is keyed on [data-type="spell"], so feats and other types can't be affected.
   Prefer changing a variable; add rules only for things other types don't have. */
.tr-entry[data-type="spell"] {
  --tr-stats-cols: 4;        /* Casting Time, Range, Components, Duration */
}

/* casting-time category, set by the importer (action, bonus-action, reaction, minutes, hours, other):
   reactions get their trigger on its own line, already styled as .tr-stat-note */
.tr-entry[data-type="spell"] [data-casting="reaction"] dd { color: var(--tr-brand-ink); }
