/* ============================================================
   Free Knowledge Map — style
   ============================================================ */

:root {
  --bg: #0b1220;
  --bg2: #0e1729;
  --card: #121d33;
  --card-hover: #16233d;
  --border: #22304d;
  --text: #dbe4f3;
  --muted: #8fa1bd;
  --accent: #f5b942;
  --accent2: #4cc9f0;
  --link: #6cb2ff;

  --core: #f5b942;        --core-bg: rgba(245,185,66,.14);
  --optional: #9aa9c4;    --optional-bg: rgba(154,169,196,.14);
  --reference: #60a5fa;   --reference-bg: rgba(96,165,250,.14);
  --specialized: #c084fc; --specialized-bg: rgba(192,132,252,.14);
  --recommended: #4ade80; --recommended-bg: rgba(74,222,128,.14);
  --advanced: #f87171;    --advanced-bg: rgba(248,113,113,.14);

  --shadow: 0 6px 24px rgba(0,0,0,.35);
  --radius: 14px;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg2: #ffffff;
  --card: #ffffff;
  --card-hover: #fdfdff;
  --border: #dde4f0;
  --text: #1c2740;
  --muted: #5c6b87;
  --accent: #b07d0e;
  --accent2: #0e7490;
  --link: #1d6fd1;
  --shadow: 0 6px 20px rgba(30,50,90,.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", "Noto Sans", "Sukhumvit Set", "TH Sarabun New", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- Topbar ---------------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  font-weight: 800; font-size: 1.05rem; color: var(--text); white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.brand:hover { text-decoration: none; }
.brand span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.searchbox {
  flex: 1; max-width: 560px; position: relative;
}
.searchbox .s-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .6; font-size: .9rem; }
#q {
  width: 100%; padding: 9px 14px 9px 36px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); font-size: .95rem; font-family: inherit;
}
#q:focus { outline: 2px solid var(--accent2); outline-offset: 1px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.stats { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.iconbtn {
  background: var(--bg2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem;
}
.iconbtn:hover { border-color: var(--accent); }

/* ---------------- Layout ---------------- */

.layout {
  max-width: 1400px; margin: 0 auto; padding: 24px 20px 60px;
  display: grid; grid-template-columns: 250px 1fr; gap: 28px;
  align-items: start;
}
.layout > * { min-width: 0; } /* let grid children shrink below Thai min-content */

.sidebar { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; padding-right: 4px; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: .88rem;
  border-left: 3px solid transparent;
}
.nav a:hover { background: var(--bg2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--bg2); color: var(--text); border-left-color: var(--accent); font-weight: 600; }
.nav a .cnt { margin-left: auto; font-size: .72rem; opacity: .7; }
.nav .navtrack { display: flex; flex-direction: column; }

.side-block {
  border-top: 1px solid var(--border); padding-top: 14px;
}
.side-block h4 { margin: 0 0 8px; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.side-block .hint { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }

.tagfilters { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip {
  border: 1px solid var(--border); background: var(--bg2); color: var(--muted);
  border-radius: 999px; padding: 4px 11px; font-size: .78rem; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.tagchip:hover { color: var(--text); border-color: var(--muted); }
.tagchip.on { color: #0b1220; font-weight: 700; }
.tagchip.on[data-tag="core"] { background: var(--core); border-color: var(--core); }
.tagchip.on[data-tag="optional"] { background: var(--optional); border-color: var(--optional); color: #0b1220; }
.tagchip.on[data-tag="reference"] { background: var(--reference); border-color: var(--reference); color: #0b1220; }
.tagchip.on[data-tag="specialized"] { background: var(--specialized); border-color: var(--specialized); color: #0b1220; }
.tagchip.on[data-tag="recommended"] { background: var(--recommended); border-color: var(--recommended); color: #0b1220; }
.tagchip.on[data-tag="advanced"] { background: var(--advanced); border-color: var(--advanced); color: #0b1220; }

.clearbtn {
  margin-top: 10px; width: 100%;
  background: none; border: 1px dashed var(--border); color: var(--muted);
  border-radius: 10px; padding: 7px; cursor: pointer; font-size: .8rem; font-family: inherit;
}
.clearbtn:hover { color: var(--text); border-color: var(--muted); }

/* ---------------- Hero ---------------- */

.hero { margin-bottom: 30px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 8px 0 4px; letter-spacing: -.02em; }
.hero .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--muted); margin: 0 0 10px; font-size: .95rem; overflow-wrap: anywhere; }
.hero .tagline { margin: 0 0 16px; max-width: 900px; overflow-wrap: anywhere; }

.metachips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.metachip {
  font-size: .78rem; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg2); color: var(--muted);
}
.metachip b { color: var(--text); font-weight: 600; }

.access {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px;
}
.access-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; font-size: .85rem;
}
.access-card a { font-weight: 700; }
.access-card p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }

/* ---------------- Sections & cards ---------------- */

.section { margin: 34px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: 8px; margin-bottom: 6px; }
.section-head .icon { font-size: 1.5rem; }
.section-title { font-size: 1.35rem; font-weight: 800; margin: 0; }
.section-title .trackid { color: var(--muted); font-weight: 500; }
.section-th { color: var(--muted); font-size: .88rem; margin: 4px 0 0; width: 100%; }
.section-intro { color: var(--muted); font-size: .88rem; font-style: italic; margin: 8px 0 4px; }

.group { margin: 22px 0 8px; }
.group-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.group-h h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.group-h .gcount { font-size: .72rem; color: var(--muted); background: var(--bg2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; }
.group-h::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.group-intro, .group-outro {
  color: var(--muted); font-size: .84rem; font-style: italic;
  border-left: 3px solid var(--border); padding: 2px 0 2px 12px; margin: 0 0 12px;
  max-width: 980px;
}

.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px;
}

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--track, var(--accent)); opacity: .85;
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--track, var(--accent)) 55%, var(--border)); background: var(--card-hover); box-shadow: var(--shadow); }

.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-title { font-weight: 700; font-size: .96rem; line-height: 1.45; flex: 1; overflow-wrap: anywhere; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--link); }
.typechip { font-size: .72rem; white-space: nowrap; color: var(--muted); background: var(--bg2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; margin-top: 2px; }

.card-author { font-size: .8rem; color: var(--muted); margin-top: -4px; }
.card-desc { font-size: .86rem; color: var(--text); opacity: .92; }
.card-note {
  font-size: .8rem; color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: 10px;
}
.card-note::before { content: "หมายเหตุ: "; font-weight: 700; }

.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.badge { font-size: .7rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; letter-spacing: .02em; }
.badge.core { color: var(--core); background: var(--core-bg); border-color: color-mix(in srgb, var(--core) 45%, transparent); }
.badge.optional { color: var(--optional); background: var(--optional-bg); border-color: color-mix(in srgb, var(--optional) 45%, transparent); }
.badge.reference { color: var(--reference); background: var(--reference-bg); border-color: color-mix(in srgb, var(--reference) 45%, transparent); }
.badge.specialized { color: var(--specialized); background: var(--specialized-bg); border-color: color-mix(in srgb, var(--specialized) 45%, transparent); }
.badge.recommended { color: var(--recommended); background: var(--recommended-bg); border-color: color-mix(in srgb, var(--recommended) 45%, transparent); }
.badge.advanced { color: var(--advanced); background: var(--advanced-bg); border-color: color-mix(in srgb, var(--advanced) 45%, transparent); }
.badge.role { color: var(--accent2); background: rgba(76,201,240,.12); border-color: color-mix(in srgb, var(--accent2) 45%, transparent); font-weight: 600; }
.badge.provider { color: var(--muted); background: var(--bg2); border-color: var(--border); font-weight: 500; }

.card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.card-links a {
  font-size: .78rem; padding: 4px 12px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--link); background: var(--bg2);
}
.card-links a:hover { border-color: var(--link); text-decoration: none; }
.card-links a.primary { font-weight: 700; color: #0b1220; background: var(--accent); border-color: var(--accent); }
.card-links a.primary:hover { filter: brightness(1.08); }

/* quick links (data section) */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.quick a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; color: var(--text); font-size: .88rem; font-weight: 600;
}
.quick a:hover { border-color: color-mix(in srgb, var(--track, var(--accent)) 55%, var(--border)); text-decoration: none; background: var(--card-hover); }
.quick a .go { color: var(--muted); font-weight: 400; font-size: .78rem; }

.empty { color: var(--muted); font-style: italic; padding: 30px 0; text-align: center; }

/* ---------------- Paths ---------------- */

.panel { margin: 46px 0; }
.section-h { font-size: 1.3rem; margin: 0 0 2px; display: flex; align-items: center; gap: 10px; }
.section-h .icon { font-size: 1.4rem; }
.section-sub { color: var(--muted); margin: 2px 0 18px; font-size: .9rem; }

.paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.path {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; position: relative; overflow: hidden;
}
.path::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--accent), var(--accent2)); }
.path h3 { margin: 0 0 10px; font-size: .98rem; display: flex; gap: 8px; align-items: center; }
.path ol { margin: 0; padding-left: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 6px; }
.path ol li {
  counter-increment: step; font-size: .85rem; position: relative; padding-left: 30px;
}
.path ol li::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border); color: var(--accent);
  font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.path ol li:not(:last-child)::after {
  content: "↓"; position: absolute; left: 6px; top: 20px; color: var(--muted); font-size: .6rem; opacity: .6;
}
.path .path-note { margin: 10px 0 0; font-size: .78rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 10px; }

/* ---------------- Methodology ---------------- */

#methodPanel .lead { font-size: 1.02rem; font-weight: 600; margin: 6px 0 18px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.method-col h3 { margin: 0 0 10px; font-size: .95rem; color: var(--accent); }
.asked { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.asked li {
  font-size: .8rem; background: var(--bg2); border: 1px solid var(--border);
  padding: 3px 11px; border-radius: 999px; color: var(--text);
}
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { font-size: .87rem; margin-bottom: 10px; padding-left: 26px; position: relative; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 3px;
}

.progress { height: 8px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--border); overflow: hidden; margin-bottom: 6px; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .25s; }
.progress-label { font-size: .75rem; color: var(--muted); margin: 0 0 10px; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.checklist li label {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  font-size: .86rem; padding: 6px 10px; border-radius: 10px;
}
.checklist li label:hover { background: var(--bg2); }
.checklist input { accent-color: var(--accent); margin-top: 4px; width: 15px; height: 15px; flex-shrink: 0; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }

.principles { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.principle {
  background: var(--bg2); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 12px 16px; font-size: .9rem;
}

/* ---------------- Not covered / footer ---------------- */

.notcovered { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px; padding: 0; margin: 0 0 10px; }
.notcovered li {
  background: var(--bg2); border: 1px dashed var(--border); border-radius: 10px;
  padding: 8px 12px; font-size: .85rem; color: var(--muted);
}
.notcovered-note { color: var(--muted); font-size: .82rem; font-style: italic; }

.footer { margin-top: 50px; border-top: 1px solid var(--border); padding-top: 18px; }
.footer p { font-size: .78rem; color: var(--muted); margin: 4px 0; }
.foot-meta { opacity: .8; }

.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: #0b1220; font-weight: 800; font-size: 1.1rem;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.totop.show { display: flex; }
.totop:hover { text-decoration: none; filter: brightness(1.1); }

/* ---------------- Responsive ---------------- */

/* Tablet & below: single column — sidebar turns into horizontal chip bars */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 16px; padding: 16px 16px 50px; }
  .sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; }

  .nav {
    flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    margin-bottom: 10px; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    border-left: none; border: 1px solid var(--border); background: var(--bg2);
    white-space: nowrap; flex-shrink: 0; padding: 7px 12px;
  }
  .nav a.active { border-color: var(--accent); }

  .side-block { border-top: none; padding-top: 0; }
  .tagfilters {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 4px;
  }
  .tagfilters::-webkit-scrollbar { display: none; }
  .tagchip { white-space: nowrap; flex-shrink: 0; }
  .clearbtn { width: auto; align-self: flex-start; padding: 5px 14px; }

  .method-grid { grid-template-columns: 1fr; }
  .stats { display: none; }
}

/* Phones */
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 8px 12px; }
  .searchbox { order: 3; min-width: 100%; max-width: none; }
  #q { font-size: 16px; } /* ≥16px prevents iOS Safari auto-zoom on focus */

  .layout { padding: 14px 12px 60px; gap: 14px; }
  .hero h1 { font-size: clamp(1.5rem, 6.5vw, 2rem); }
  .hero .sub { font-size: .84rem; }
  .metachips { gap: 6px; }

  .section { margin: 26px 0; }
  .section-title { font-size: 1.12rem; }
  .panel { margin: 34px 0; }
  .section-h { font-size: 1.12rem; }

  .cards { grid-template-columns: 1fr; }
  .totop { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  .index-table { min-width: 720px; }
  .attribution { font-size: .8rem; padding: 9px 11px; }
}

/* Small phones */
@media (max-width: 400px) {
  .layout { padding: 12px 10px 60px; }
  .metachip { font-size: .72rem; }
  .card { padding: 13px 12px 12px; }
}

/* Touch devices: bigger tap targets */
@media (pointer: coarse) {
  .nav a { padding: 10px 14px; }
  .tagchip { padding: 7px 14px; font-size: .82rem; }
  .card-links a { padding: 7px 14px; }
  .quick a { padding: 14px; }
  .iconbtn { width: 42px; height: 42px; }
  .checklist li label { padding: 9px 10px; }
  .checklist input { width: 17px; height: 17px; margin-top: 3px; }
}

/* ---------------- SVG icon system ---------------- */

.ic {
  width: 1em; height: 1em; flex-shrink: 0;
  vertical-align: -0.125em; display: inline-block;
}

.brand .ic { width: 1.3em; height: 1.3em; color: var(--accent); }
.searchbox .s-icon .ic { width: 1em; height: 1em; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; }
.iconbtn .ic { width: 1.15em; height: 1.15em; }

.metachip { display: inline-flex; align-items: flex-start; gap: .5em; max-width: 100%; }
.metachip > .ic { margin-top: .22em; color: var(--accent); }
.metachip > span { min-width: 0; overflow-wrap: anywhere; } /* Thai text wraps inside chips */

.typechip { display: inline-flex; align-items: center; gap: 5px; }
.typechip .ic { width: .95em; height: .95em; }

.card-links a { display: inline-flex; align-items: center; gap: 6px; }
.card-links a .ic { width: .8em; height: .8em; }
.quick a .go { display: inline-flex; align-items: center; gap: 5px; }
.quick a .go .ic { width: .8em; height: .8em; }

.access-card a { display: inline-flex; align-items: center; gap: 6px; }
.access-card a .ic { width: .8em; height: .8em; }
.access h3 { display: flex; align-items: center; gap: 8px; }
.access h3 .ic { color: var(--accent); }

.section-h .icon { display: inline-flex; align-items: center; }
.section-h .icon .ic { width: 1.35em; height: 1.35em; color: var(--accent); }

.nav a { align-items: center; }
.nav a .nav-label { display: inline-flex; align-items: center; gap: 8px; }
.nav a .nav-label .ic { width: 1em; height: 1em; opacity: .85; }

.path h3 .path-ic { display: inline-flex; align-items: center; color: var(--accent); }
.path h3 .path-ic .ic { width: 1.1em; height: 1.1em; }

.notcovered li { display: flex; align-items: center; gap: 9px; }
.notcovered li .ic { width: .95em; height: .95em; flex-shrink: 0; }

#footCopyright { display: flex; align-items: flex-start; gap: 7px; }
#footCopyright .ic { width: .95em; height: .95em; margin-top: .18em; flex-shrink: 0; }
.totop .ic { width: 1.05em; height: 1.05em; }

/* ---------------- Attribution ---------------- */

.attribution {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 16px; max-width: 980px;
  background: var(--bg2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 14px;
  font-size: .84rem; line-height: 1.6;
}
.attribution > .ic { color: var(--accent); margin-top: .25em; width: 1.05em; height: 1.05em; flex-shrink: 0; }
.attribution > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.attribution a { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.attribution a .ic { width: .75em; height: .75em; }
.attribution .attr-note {
  flex-basis: 100%; color: var(--muted); font-size: .78rem;
}

/* ---------------- Index table ---------------- */

.index-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card);
}
.index-table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 820px; }
.index-table th {
  text-align: left; padding: 10px 14px; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  border-bottom: 1px solid var(--border); background: var(--bg2);
  white-space: nowrap; position: sticky; top: 0;
}
.index-table td { padding: 8px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.index-table tbody tr:last-child td { border-bottom: none; }
.index-table tbody tr:hover { background: var(--card-hover); }
.index-table .dim { color: var(--muted); }
.index-table .idx-num { white-space: nowrap; }
.index-table .idx-title a { color: var(--text); font-weight: 600; }
.index-table .idx-title a:hover { color: var(--link); }
.index-table .idx-cat { white-space: nowrap; }
.idx-track {
  display: inline-block; font-size: .66rem; font-weight: 700;
  padding: 0 7px; border-radius: 999px; line-height: 1.7;
  color: var(--track, var(--accent));
  border: 1px solid color-mix(in srgb, var(--track, var(--accent)) 55%, transparent);
  background: color-mix(in srgb, var(--track, var(--accent)) 12%, transparent);
}

