/* Texas School Growth Explorer. Everything is scoped under #tsg so the shared Webflow CSS is untouched. */
#tsg {
  --ink: #233044; --muted: #5d6577; --rule: #e1e6ee; --panel: #ffffff; --ground: #f5fbfc;
  --brand: #258185; --brand-deep: #1f6f73; --brand-soft: #e3f5f6; --coral: #ff8946; --dot: #8a94a6;
  --lv2: #1f5f8b; --lv2-t: #ffffff; --lv1: #bcdcf0; --lv1-t: #233044; --lv0: #eef1f5; --lv0-t: #233044;
  --lvm1: #f7e1b5; --lvm1-t: #233044; --lvm2: #8a4b14; --lvm2-t: #ffffff; --null-b: #c3cad6; --null-t: #5d6577;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); font-size: 16px; line-height: 1.55;
  max-width: 1100px; margin: 0 auto; padding: 40px 24px 56px; box-sizing: border-box; display: block;
}
#tsg *, #tsg *::before, #tsg *::after { box-sizing: border-box; }
#tsg h1, #tsg h2, #tsg h3, #tsg h4 { color: var(--ink); font-family: inherit; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
#tsg h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
#tsg h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.2; font-weight: 700; margin-bottom: 10px; }
#tsg h3 { font-size: 20px; line-height: 1.3; font-weight: 700; margin-bottom: 8px; }
#tsg h4 { font-size: 17px; line-height: 1.35; font-weight: 700; margin-bottom: 6px; }
#tsg p { margin: 0 0 10px; }
#tsg p, #tsg li, #tsg td, #tsg th, #tsg dd, #tsg dt, #tsg summary { color: inherit; font-size: inherit; line-height: inherit; font-family: inherit; }
#tsg ul, #tsg ol { margin: 0 0 12px; padding-left: 22px; }
#tsg a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
#tsg a:hover { color: var(--brand-deep); }
#tsg label, #tsg legend { font-weight: 600; font-size: 14px; color: var(--ink); margin: 0 0 4px; display: block; padding: 0; }
#tsg fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
#tsg select, #tsg input[type="text"], #tsg input[type="search"], #tsg input[type="number"] {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--panel); border: 1px solid #8f98a8; border-radius: 6px;
  padding: 8px 10px; min-height: 40px; max-width: 100%; margin: 0; height: auto; line-height: 1.3;
}
#tsg select { padding-right: 28px; }
#tsg :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
#tsg [tabindex="-1"]:focus { outline: none; }
#tsg .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#tsg [hidden] { display: none !important; }

/* Header */
#tsg .tsg-eyebrow { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600; margin-bottom: 10px; }
#tsg .tsg-lede { max-width: 66ch; color: var(--muted); font-size: 17px; margin-bottom: 20px; }
#tsg .tsg-search { max-width: 640px; margin-bottom: 24px; }

/* Combobox */
#tsg .tsg-combo { position: relative; }
#tsg .tsg-combo-box { position: relative; }
#tsg .tsg-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
#tsg .tsg-combo input { width: 100%; padding-left: 40px; min-height: 48px; font-size: 16px; border-radius: 8px; border-color: #8f98a8; }
#tsg .tsg-search .tsg-combo input { box-shadow: 0 1px 2px rgba(35, 48, 68, .06); }
#tsg .tsg-listbox { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 8px 24px rgba(35, 48, 68, .14); max-height: 360px; overflow-y: auto; }
#tsg .tsg-opt { color: var(--ink); font-size: 15px; line-height: 1.35; padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
#tsg .tsg-opt[aria-selected="true"], #tsg .tsg-opt:hover { background: var(--brand-soft); }
#tsg .tsg-opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--brand); }
#tsg .tsg-opt-name { font-weight: 600; }
#tsg .tsg-opt-meta { font-size: 13px; color: var(--muted); }
#tsg .tsg-opt-kind { font-weight: 600; color: var(--brand-deep); margin-right: 4px; }
#tsg .tsg-opt-empty { padding: 10px; color: var(--muted); font-size: 14px; }

/* Tabs */
#tsg .tsg-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
#tsg .tsg-tabs::-webkit-scrollbar { display: none; }
#tsg .tsg-tabs [role="tab"] { flex: none; display: inline-block; padding: 10px 14px 9px; font-weight: 600; font-size: 15px; color: var(--muted); text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 4px 4px 0 0; }
#tsg .tsg-tabs [role="tab"]:hover { color: var(--ink); background: var(--ground); }
#tsg .tsg-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
#tsg .tsg-tabs [role="tab"]:focus-visible { outline-offset: -3px; }

/* Buttons */
#tsg .tsg-btn { font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #8f98a8; background: var(--panel); color: var(--ink); border-radius: 6px; padding: 9px 14px; text-decoration: none; min-height: 40px; }
#tsg .tsg-btn:hover { border-color: var(--brand); color: var(--ink); background: var(--ground); }
#tsg .tsg-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
#tsg .tsg-btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
#tsg .tsg-btn-sm { padding: 6px 10px; min-height: 32px; font-size: 13px; }
#tsg .tsg-btn[disabled] { opacity: .45; cursor: default; }
#tsg .tsg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }

/* Generic blocks */
#tsg .tsg-intro { color: var(--muted); max-width: 72ch; }
#tsg .tsg-small { font-size: 13px; color: var(--muted); }
#tsg .tsg-note { background: var(--ground); border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: 4px; font-size: 15px; }
#tsg .tsg-empty { background: var(--ground); border: 1px dashed var(--null-b); border-radius: 6px; padding: 14px 16px; color: var(--muted); }
#tsg .tsg-section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rule); }
#tsg .tsg-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin: 12px 0 16px; }
#tsg .tsg-field { display: flex; flex-direction: column; min-width: 0; }
#tsg .tsg-field-grow { flex: 1 1 240px; }
#tsg .tsg-field-btns { flex-direction: row; gap: 8px; flex-wrap: wrap; }
#tsg .tsg-seg-row { display: inline-flex; border: 1px solid #8f98a8; border-radius: 6px; overflow: hidden; }
#tsg .tsg-seg-row label { margin: 0; font-weight: 500; position: relative; }
#tsg .tsg-seg-row input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
#tsg .tsg-seg-row span { display: block; padding: 9px 14px; font-size: 14px; min-height: 40px; }
#tsg .tsg-seg-row label + label span { border-left: 1px solid #8f98a8; }
#tsg .tsg-seg-row input:checked + span { background: var(--ink); color: #fff; }
#tsg .tsg-seg-row input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: -3px; }
#tsg .tsg-checks { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; padding-bottom: 8px; }
#tsg .tsg-checks label { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; margin: 0; }
#tsg .tsg-checks input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
#tsg .tsg-badge { display: inline-block; vertical-align: middle; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--brand-deep); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px; }

/* Entity header */
#tsg .tsg-ent-meta { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 2px 0; }
#tsg .tsg-ent-meta span + span::before { content: "\00b7"; padding: 0 8px; color: #8f98a8; }
#tsg .tsg-ribbon { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: #fff4ec; border: 1px solid #ffc9a8; border-radius: 6px; padding: 8px 12px; font-weight: 600; margin-top: 6px; }
#tsg .tsg-ribbon svg { color: #b8520f; flex: none; }
#tsg .tsg-ribbon a { font-weight: 500; }
#tsg .tsg-print-url { display: none; }

/* At a glance */
#tsg .tsg-glance { margin-top: 24px; }
#tsg .tsg-glance-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
#tsg .tsg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
#tsg .tsg-tile { background: var(--ground); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; }
#tsg .tsg-tile-k { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
#tsg .tsg-tile-q { font-weight: 400; color: var(--muted); }
#tsg .tsg-tile-v { font-size: 32px; font-weight: 700; line-height: 1.1; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
#tsg .tsg-tile-s { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
#tsg .tsg-tile-src { font-size: 12px; color: var(--muted); margin: 0; }

/* Levels */
#tsg .lv2 { background: var(--lv2); color: var(--lv2-t); }
#tsg .lv1 { background: var(--lv1); color: var(--lv1-t); }
#tsg .lv0 { background: var(--lv0); color: var(--lv0-t); }
#tsg .lvm1 { background: var(--lvm1); color: var(--lvm1-t); }
#tsg .lvm2 { background: var(--lvm2); color: var(--lvm2-t); }
#tsg .lv-null { background: #fff; color: var(--null-t); border: 1px dashed var(--null-b); }
#tsg .lv-plain { background: var(--ground); color: var(--ink); }
#tsg .tsg-glyph { flex: none; }
#tsg .tsg-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px 3px 7px; white-space: nowrap; }
#tsg .tsg-chip.lv-null { padding-left: 10px; font-weight: 500; }
#tsg .tsg-swatch { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 22px; border-radius: 4px; vertical-align: middle; }
#tsg .tsg-legend { margin-top: 16px; border: 1px solid var(--rule); border-radius: 8px; padding: 12px 16px; background: var(--panel); }
#tsg .tsg-legend-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
#tsg .tsg-legend ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
#tsg .tsg-legend li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
#tsg .tsg-legend-note { font-size: 13px; color: var(--muted); margin: 0; }
#tsg .tsg-terms { font-size: 14px; color: var(--muted); margin-top: 12px; }
#tsg .tsg-legend-more { margin-top: 8px; font-size: 14px; }
#tsg .tsg-legend-more summary { cursor: pointer; color: var(--brand-deep); font-weight: 600; font-size: 13px; }
#tsg .tsg-legend-more dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
#tsg .tsg-legend-more dt { font-weight: 600; color: var(--ink); }
#tsg .tsg-legend-more dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { #tsg .tsg-legend-more dl { grid-template-columns: 1fr; } #tsg .tsg-legend-more dd { margin-bottom: 6px; } }
#tsg .tsg-thanks { font-weight: 600; color: var(--ink); margin-top: 20px; }

/* Glossary */
#tsg .tsg-term { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; color: var(--ink); }
#tsg .tsg-info { font: 600 12px/1 Inter, system-ui, sans-serif; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--brand); background: var(--panel); color: var(--brand-deep); cursor: pointer; padding: 0; font-style: italic; }
#tsg .tsg-info[aria-expanded="true"] { background: var(--brand); color: #fff; }
#tsg .tsg-pop { position: absolute; z-index: 15; left: 0; top: calc(100% + 6px); width: min(320px, 80vw); background: var(--ink); color: #fff; font-size: 14px; line-height: 1.45; padding: 10px 12px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
#tsg .tsg-pop a { color: #bfeef0; }

/* Tables */
#tsg .tsg-scroll { position: relative; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; border-radius: 6px; }
#tsg .tsg-scroll:focus-visible { outline-offset: 0; }
#tsg table { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
#tsg .tsg-table th, #tsg .tsg-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); font-size: 14px; vertical-align: top; }
#tsg .tsg-table thead th { font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--rule); white-space: nowrap; }
#tsg .tsg-table tbody th { font-weight: 600; }
#tsg .tsg-table tr.is-sel th, #tsg .tsg-table tr.is-sel td { background: #f0fafa; }
#tsg .tsg-table tr.is-sel th { box-shadow: inset 3px 0 0 var(--brand); }
#tsg .tsg-table tr.tsg-medrow th { font-weight: 600; font-style: italic; }
/* Links on tinted backgrounds use the deeper teal so they clear 4.5:1 (brand teal is 4.41:1 on --ground). */
#tsg .tsg-tile a, #tsg .tsg-teaser a:not(.tsg-btn), #tsg .tsg-table tr.is-sel a, #tsg .tsg-tip a, #tsg .tsg-note a,
#tsg .tsg-howto-tile a, #tsg .tsg-legend a { color: var(--brand-deep); }
#tsg .tsg-ach td { text-align: right; }
#tsg .tsg-ach thead th:not(:first-child) { text-align: right; }
#tsg .tsg-null-cell { color: var(--null-t); font-style: italic; text-align: left !important; }

/* Growth grid */
#tsg .tsg-grid { border-spacing: 4px; margin: 0 -4px; width: calc(100% + 8px); min-width: 520px; }
#tsg .tsg-grid thead th { font-size: 13px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 4px 2px; white-space: nowrap; }
#tsg .tsg-grid thead th.tsg-rowh { text-align: left; }
#tsg .tsg-grid .tsg-poolh { color: var(--ink); }
#tsg .tsg-rowh { text-align: left; font-weight: 600; font-size: 14px; padding: 6px 8px 6px 2px; min-width: 120px; background: var(--panel); }
#tsg .tsg-rowh-sub { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
#tsg .tsg-row-all .tsg-rowh { border-top: 2px solid var(--rule); }
#tsg .tsg-c { border-radius: 6px; padding: 7px 6px; text-align: center; vertical-align: middle; min-width: 84px; }
#tsg .tsg-c-in { display: flex; flex-direction: column; align-items: center; gap: 1px; }
#tsg .tsg-c-v { display: inline-flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 700; line-height: 1.2; }
#tsg .tsg-c-n, #tsg .tsg-c-tx { font-size: 12px; line-height: 1.3; }
#tsg .tsg-c-tx { opacity: .92; }
#tsg .tsg-c-null { font-size: 12px; line-height: 1.25; display: block; }
#tsg .tsg-c-nt { background: transparent; color: var(--muted); font-size: 12px; border: 1px solid transparent; }
#tsg .tsg-grid td:last-child.tsg-c:not(.tsg-c-nt) { box-shadow: inset 0 0 0 2px rgba(35, 48, 68, .18); }
#tsg .tsg-grid.is-accel td:last-child.tsg-c { box-shadow: none; }
#tsg .tsg-mini { min-width: 0; }
#tsg .tsg-mini thead th { white-space: normal; min-width: 64px; vertical-align: bottom; font-size: 12px; }
#tsg .tsg-m { border-radius: 5px; padding: 6px 4px; text-align: center; font-weight: 700; font-size: 15px; white-space: nowrap; min-width: 64px; }
#tsg .tsg-m > span[aria-hidden] { display: inline-flex; align-items: center; gap: 3px; }
#tsg .tsg-m.lv-null { font-weight: 400; white-space: normal; }
#tsg .tsg-scroll-sticky .tsg-rowh { position: sticky; left: 0; z-index: 2; box-shadow: 6px 0 6px -6px rgba(35, 48, 68, .25); min-width: 150px; max-width: 220px; }
#tsg .tsg-scroll-sticky thead .tsg-rowh { z-index: 3; }
/* Long district school lists: the header row stays in view while the list scrolls. */
#tsg .tsg-scroll-tall { max-height: 75vh; overflow-y: auto; }
#tsg .tsg-scroll-tall thead th { position: sticky; top: 0; z-index: 2; background: var(--panel); box-shadow: 0 2px 0 var(--rule); }
#tsg .tsg-scroll-tall thead .tsg-rowh { z-index: 4; }
#tsg .tsg-narrow { display: none; }

/* Similar */
#tsg .tsg-similar { list-style: none; padding: 0; }
#tsg .tsg-similar li { padding: 10px 0; border-bottom: 1px solid var(--rule); max-width: 80ch; }
#tsg .tsg-sources p { font-size: 14px; color: var(--muted); }

/* Landing */
#tsg .tsg-howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0 28px; }
#tsg .tsg-howto-tile, #tsg .tsg-teaser { background: var(--ground); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; }
#tsg .tsg-howto-tile p:last-child, #tsg .tsg-teaser p { color: var(--muted); font-size: 15px; }
#tsg .tsg-swatches { display: flex; gap: 4px; margin-bottom: 8px; }
#tsg .tsg-try ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
#tsg .tsg-try a { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; text-decoration: none; color: var(--ink); background: var(--panel); }
#tsg .tsg-try a:hover { border-color: var(--brand); }
#tsg .tsg-try-name { font-weight: 700; color: var(--brand); }
#tsg .tsg-try-meta { font-size: 14px; color: var(--muted); }
#tsg .tsg-teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 28px; }
#tsg .tsg-teaser { background: var(--brand-soft); border-color: #c7e9eb; }
#tsg .tsg-teaser p { color: var(--ink); }

/* Know your numbers */
#tsg .tsg-back { font-size: 14px; }
#tsg .tsg-card { border: 1px solid var(--rule); border-radius: 10px; padding: 22px 24px; max-width: 720px; background: var(--panel); box-shadow: 0 2px 10px rgba(35, 48, 68, .06); }
#tsg .tsg-progress { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
#tsg .tsg-guess { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin: 16px 0; }
#tsg .tsg-guess-slider { flex: 1 1 280px; }
#tsg .tsg-slider-row { display: flex; align-items: center; gap: 10px; }
#tsg .tsg-slider-row input[type="range"] { flex: 1; accent-color: var(--brand); min-width: 0; height: 32px; }
#tsg .tsg-slider-row input[type="number"] { width: 76px; }
#tsg .tsg-choices { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
#tsg .tsg-choices legend { width: 100%; }
#tsg .tsg-choice { position: relative; margin: 0; font-weight: 500; }
#tsg .tsg-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
#tsg .tsg-choice span { display: block; border: 1px solid #8f98a8; border-radius: 6px; padding: 9px 14px; font-size: 15px; }
#tsg .tsg-choice input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
#tsg .tsg-choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
#tsg .tsg-reveal { border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 8px; }
#tsg .tsg-reveal h4 { font-size: 34px; line-height: 1.1; color: var(--brand-deep); margin-bottom: 6px; }
#tsg .tsg-reveal-guess { color: var(--muted); font-size: 14px; }
#tsg .tsg-reveal-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 600; }
#tsg .tsg-tip { background: var(--brand-soft); border-radius: 6px; padding: 10px 12px; }
#tsg .tsg-why { color: var(--ink); }
#tsg .tsg-card-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 16px; }
#tsg .tsg-summary ul li { margin-bottom: 8px; }

/* Bright Spots */
#tsg .tsg-count { font-weight: 600; }
#tsg .tsg-showing { font-size: 14px; color: var(--muted); }
#tsg .tsg-region-h { margin-top: 26px; padding-bottom: 6px; border-bottom: 2px solid var(--rule); }
#tsg .tsg-bs-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
#tsg .tsg-bs-card article { border: 1px solid var(--rule); border-radius: 8px; padding: 16px 18px; height: 100%; display: flex; flex-direction: column; background: var(--panel); }
#tsg .tsg-bs-card article > p:last-child { margin-top: auto; margin-bottom: 0; padding-top: 8px; }
#tsg .tsg-bs-card h4 a { color: var(--ink); text-decoration: none; }
#tsg .tsg-bs-card h4 a:hover { text-decoration: underline; color: var(--brand-deep); }
#tsg .tsg-bs-card .tsg-ent-meta { font-size: 14px; margin-bottom: 8px; }
#tsg .tsg-bs-cells { list-style: none; padding: 0; margin: 0 0 6px; }
#tsg .tsg-bs-cells li { border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 8px; font-size: 14px; }
#tsg .tsg-bs-cells li p { margin-bottom: 4px; }
#tsg .tsg-bs-cell { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
#tsg .tsg-bs-cell svg { color: #b8520f; }
#tsg .tsg-bs-stats { color: var(--muted); }

/* Compare */
#tsg .tsg-hl { margin-top: 0; }
#tsg .tsg-summary-line { font-weight: 600; min-height: 1.5em; }
#tsg .tsg-chart { position: relative; width: 100%; margin: 6px 0 8px; touch-action: manipulation; }
#tsg .tsg-svg { display: block; max-width: 100%; height: auto; }
#tsg .tsg-svg .g { stroke: var(--rule); stroke-width: 1; }
#tsg .tsg-svg .tk { font-size: 12px; fill: var(--muted); }
#tsg .tsg-svg .ax { font-size: 13px; fill: var(--ink); font-weight: 600; }
#tsg .tsg-svg .st { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 4; }
#tsg .tsg-svg .stl { font-size: 12px; fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
#tsg .dot-n { fill: var(--dot); fill-opacity: .42; stroke: none; }
#tsg .dot-mem { fill: var(--brand); stroke: #fff; stroke-width: 1.6; }
#tsg .dot-sim { fill: #bfe6e8; stroke: var(--brand-deep); stroke-width: 1.8; }
#tsg .dot-sel { fill: var(--brand); stroke: #fff; stroke-width: 2.4; filter: drop-shadow(0 0 1.5px rgba(35, 48, 68, .7)); }
#tsg .tsg-svg .lbl { font-size: 13px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
#tsg .tsg-dot-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
#tsg .tsg-dot-legend li { display: inline-flex; align-items: center; gap: 4px; }
#tsg .tsg-dot-legend .dot-n { fill-opacity: .6; }
#tsg .tsg-tooltip { position: absolute; z-index: 10; min-width: 160px; max-width: 260px; background: var(--ink); color: #fff; border-radius: 6px; padding: 8px 10px; font-size: 13px; line-height: 1.45; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
#tsg .tsg-tooltip.is-pinned { pointer-events: auto; }
#tsg .tsg-tooltip p { margin: 0 0 4px; }
#tsg .tsg-tooltip .tt-name { font-weight: 700; }
#tsg .tsg-tooltip .tt-sub { color: #d5dbe4; }
#tsg .tsg-tooltip a { color: #bfeef0; }
#tsg .tsg-tooltip .tsg-btn { background: transparent; color: #fff; border-color: #c3cad6; margin-left: 8px; }

/* About */
#tsg .tsg-about-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
#tsg .tsg-toc { position: sticky; top: 16px; border-left: 3px solid var(--rule); padding-left: 14px; }
#tsg .tsg-toc h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
#tsg .tsg-toc ol { list-style: none; padding: 0; font-size: 14px; }
#tsg .tsg-toc li { margin-bottom: 6px; }
#tsg .tsg-about-sec { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); max-width: 74ch; scroll-margin-top: 16px; }
#tsg .tsg-about-sec li { margin-bottom: 6px; }
#tsg details { border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; margin: 8px 0; background: var(--panel); }
#tsg summary { cursor: pointer; font-weight: 600; }
#tsg details[open] summary { margin-bottom: 8px; }
#tsg .tsg-src-list li { margin-bottom: 8px; }

/* Footer strip */
#tsg .tsg-foot { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
#tsg .tsg-foot p { margin-bottom: 6px; max-width: 100ch; font-size: 13px; line-height: 1.5; }

/* Loading and errors */
#tsg .tsg-skeleton { display: grid; gap: 12px; }
#tsg .sk { background: linear-gradient(90deg, #eef1f5 0%, #f7f9fb 50%, #eef1f5 100%); background-size: 200% 100%; border-radius: 6px; animation: tsg-sk 1.2s ease-in-out infinite; }
#tsg .sk-h { height: 34px; width: 55%; }
#tsg .sk-l { height: 16px; width: 80%; }
#tsg .sk-l.short { width: 45%; }
#tsg .sk-box { height: 260px; }
@keyframes tsg-sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { #tsg .sk { animation: none; } }
#tsg .tsg-error, #tsg .tsg-notfound { padding: 20px 0; }
#tsg .tsg-nf-search { max-width: 560px; margin-top: 12px; }
#tsg .tsg-loading { color: var(--muted); }

/* The site navbar is position:absolute below Webflow's 992px breakpoint, so leave room for it. */
@media (max-width: 991px) { #tsg { padding-top: 112px; } }

/* Phone */
@media (max-width: 760px) {
  #tsg { padding: 108px 16px 44px; }
  #tsg .tsg-about-layout { grid-template-columns: 1fr; gap: 12px; }
  #tsg .tsg-toc { position: static; }
  #tsg .tsg-tile-v { font-size: 28px; }
  #tsg .tsg-card { padding: 18px 16px; }
  #tsg .tsg-bs-list { grid-template-columns: 1fr; }
  #tsg .tsg-grid { min-width: 0; margin: 0; width: 100%; }
  #tsg .tsg-tabs { gap: 0; }
  #tsg .tsg-tabs [role="tab"] { padding: 10px 10px 9px; }
  #tsg .tsg-rowh { min-width: 78px; font-size: 13px; }
  #tsg .tsg-grid-section .tsg-rowh { width: 78px; max-width: 84px; overflow-wrap: anywhere; }
  #tsg .tsg-grid thead th { white-space: normal; font-size: 12px; }
  #tsg .tsg-grid thead th:not(.tsg-rowh):not(.tsg-poolh) { white-space: nowrap; }
  #tsg .tsg-c { min-width: 58px; padding: 6px 2px; }
  #tsg .tsg-c-v { font-size: 16px; gap: 2px; }
  #tsg .tsg-c-n, #tsg .tsg-c-tx { font-size: 12px; }
  #tsg .tsg-c-tx { opacity: 1; }
  #tsg .tsg-wide { display: none; }
  #tsg .tsg-narrow { display: inline; }
  #tsg .tsg-grid-section .tsg-scroll { position: relative; }
  #tsg .tsg-grid-section .tsg-rowh { position: sticky; left: 0; z-index: 2; }
  #tsg .tsg-controls { gap: 10px 14px; }
  #tsg .tsg-filters .tsg-field:not(.tsg-seg):not(.tsg-field-btns) { flex: 1 1 140px; }
  #tsg .tsg-filters select, #tsg .tsg-filters input { width: 100%; }
  #tsg .tsg-field select { max-width: 100%; }
}

/* Print: keep header, at-a-glance, grid, legend, achievement, sources and build date. */
@media print {
  .navbar, .footer, #tsg .tsg-tabs, #tsg .tsg-search, #tsg .tsg-actions, #tsg .tsg-controls, #tsg .tsg-terms, #tsg .tsg-info,
  #tsg .tsg-card-nav, #tsg .tsg-back, #tsg [data-slot="similar"] a, #tsg .tsg-legend-more, #tsg .tsg-skeleton, #tsg .tsg-guess, #tsg .tsg-ribbon a { display: none !important; }
  #tsg { max-width: none; padding: 0; font-size: 11pt; }
  #tsg .tsg-print-url { display: block; font-size: 9pt; color: #333; }
  #tsg .tsg-scroll { overflow: visible; }
  #tsg .tsg-grid, #tsg .tsg-mini { min-width: 0; width: 100%; }
  #tsg .tsg-section { break-inside: avoid-page; margin-top: 18px; padding-top: 10px; }
  #tsg .tsg-grid-section { break-inside: auto; }
  #tsg tr { break-inside: avoid; }
  #tsg .tsg-c, #tsg .tsg-m, #tsg .tsg-swatch, #tsg .tsg-chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; border: 1px solid #555; }
  #tsg .lv-null { border-style: dashed; }
  #tsg .tsg-foot { margin-top: 18px; }
  #tsg a { color: inherit; text-decoration: none; }
  #tsg .tsg-sources a::after { content: " (" attr(href) ")"; font-size: 8pt; word-break: break-all; }
  #tsg .tsg-tile { break-inside: avoid; }
}
