/* Walk of Grit / The Field: shared header wordmark and site menu.
   Wordmark style taken from the Walk Of Grit Substack header:
   heavy all-caps sans (Archivo Black), #004aad with a light-blue (#b2c8e6) offset shadow. */

h1.wog-wordmark,
#header h1.wog-wordmark,
header h1.wog-wordmark,
.wog-wordmark {
  font-family: "Archivo Black", "Arial Black", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  color: #004aad !important;
  text-shadow: 0.045em 0.03em 0 #b2c8e6 !important;
  line-height: 1 !important;
  font-size: clamp(1.55rem, 3.6vw, 2.6rem) !important;
  white-space: nowrap;
  margin: 0 !important;
  padding: 0 !important;
}
.wog-wordmark img {
  display: block;
  height: 0.76em;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
a.wog-wordmark-link,
a.wog-wordmark-link:hover { text-decoration: none; display: inline-flex; align-items: center; }

/* Site menu (pages with the tab-button menu) */
nav[aria-label="Site"] .site-tabs {
  flex-wrap: wrap !important;
  gap: 0.45rem 0.4rem !important;
  justify-content: center;
}
nav[aria-label="Site"] .site-tabs .nav-link {
  min-width: 0 !important;
  padding: 0.5rem 0.72rem !important;
  font-size: 0.85rem !important;
  white-space: nowrap !important;
}
nav[aria-label="Site"] .site-tabs .nav-link i { margin-right: 0.3rem; }
@media (min-width: 1200px) {
  nav[aria-label="Site"] .site-tabs { flex-wrap: nowrap !important; }
}
@media (max-width: 575.98px) {
  nav[aria-label="Site"] { overflow: visible !important; }
  nav[aria-label="Site"] .site-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding: 0.35rem 0.25rem 0.6rem !important;
  }
  nav[aria-label="Site"] .site-tabs .nav-link {
    width: 100%;
    min-height: 2.6rem;
    white-space: normal !important;
    text-align: center;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.84rem !important;
  }
  nav[aria-label="Site"] .site-tabs .wog-tab-wide { grid-column: 1 / -1; }
}

/* Older page templates: same colour rule on their own menus */
.wog-menu a.tab-cross-site {
  background: #e8f1ff !important;
  color: #004aad !important;
  border-radius: 8px;
}
.wog-menu a.active,
.wog-menu a[aria-current="page"] {
  color: #004aad !important;
  font-weight: 800 !important;
}

/* Older blog/project templates: menu sits on its own row under the wordmark on desktop */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-collapse:has(.wog-menu) { flex-basis: 100% !important; order: 5 !important; margin-top: 0.35rem; }
  .navbar .wog-menu { flex-wrap: wrap; justify-content: center; row-gap: 0.25rem; }
  .navbar .wog-menu .nav-link {
    white-space: nowrap;
    text-transform: none;
    font-size: 0.86rem;
    padding: 0.45rem 0.7rem !important;
  }
}
.wog-menu .nav-link, .wog-menu a { text-transform: none; }

/* Wordmark size inside the older templates' brand slot */
h1.sitename.wog-wordmark, h1.section-title.wog-wordmark, .wog-wordmark-link .wog-wordmark { font-size: 2rem !important; }
@media (max-width: 575.98px) {
  h1.sitename.wog-wordmark, h1.section-title.wog-wordmark, .wog-wordmark-link .wog-wordmark { font-size: 1.6rem !important; }
}

/* Tabs: same size and shape on every page and in every state.
   Only the color changes: navy selected, light blue for every other tab.
   Add at the end of assets/brand/brand.css (all 21 pages load it).
   "html body #header" beats the inline overrides in walk-of-grit.html and blog.html. */
html { scrollbar-gutter: stable; }
html body #header.header { padding: 0.5rem 0 !important; }
html body #header hr { margin: 0.35rem 0 !important; }
html body #header .container-fluid.mt-1 { margin-top: 0 !important; }
html body #header nav[aria-label="Site"] .site-tabs { gap: 0.4rem !important; padding: 0.25rem !important; }
html body #header nav[aria-label="Site"] .site-tabs .nav-link,
html body #header nav[aria-label="Site"] .site-tabs .nav-link.tab-cross-site {
  box-sizing: border-box; min-width: 0 !important; min-height: 2.1rem;
  padding: 0.4rem 0.75rem !important; margin: 0 !important;
  font-size: 0.84rem !important; font-weight: 600 !important; line-height: 1.2 !important; letter-spacing: 0 !important;
  border: 1.5px solid #DCEAF7 !important; border-radius: 9px !important;
  box-shadow: none !important; transform: none !important; outline-offset: 2px;
  background: #DCEAF7 !important; color: #1F3A5F !important;
  transition: background-color .12s, color .12s, border-color .12s;
}
html body #header nav[aria-label="Site"] .site-tabs .nav-link:hover,
html body #header nav[aria-label="Site"] .site-tabs .nav-link:focus-visible { border-color: #1F3A5F !important; }
html body #header nav[aria-label="Site"] .site-tabs .nav-link.active,
html body #header nav[aria-label="Site"] .site-tabs .nav-link[aria-current="page"] {
  background: #1F3A5F !important; border-color: #1F3A5F !important; color: #FFFFFF !important;
}
/* Sub-tabs: company tabs, league tabs, Who is Kareem Powell tabs, SQL tabs */
html body .rf-pills, html body .who-pills { gap: 0.4rem !important; margin: 0 auto !important; padding: 0 0.25rem 0.35rem !important; }
html body .rf-pills a, html body .who-pills a,
html body #view-intuitive .sql-tabs button, html body #view-intuitive .sql-groups button {
  box-sizing: border-box; padding: 0.3rem 0.7rem !important; margin: 0 !important;
  font-size: 0.84rem !important; font-weight: 600 !important; line-height: 1.2 !important;
  border: 1.5px solid #DCEAF7 !important; border-radius: 999px !important;
  box-shadow: none !important; transform: none !important;
  background: #DCEAF7 !important; color: #1F3A5F !important;
}
html body .rf-pills a:hover, html body .who-pills a:hover,
html body #view-intuitive .sql-tabs button:hover, html body #view-intuitive .sql-groups button:hover { border-color: #1F3A5F !important; }
html body .rf-pills a[aria-current="page"], html body .who-pills a[aria-current="page"],
html body #view-intuitive .sql-tabs button[aria-selected="true"],
html body #view-intuitive .sql-groups button[aria-selected="true"] {
  background: #1F3A5F !important; border-color: #1F3A5F !important; color: #FFFFFF !important;
}
/* Gap from the tab bar to the content, same as Home */
html body #rf-root, html body #ff-root { margin-top: 0.9rem !important; }
@media (max-width: 575.98px) {
  html body #header nav[aria-label="Site"] .site-tabs { gap: 0.3rem !important; padding: 0.15rem 0.25rem 0.25rem !important; }
  html body #header nav[aria-label="Site"] .site-tabs .nav-link { min-height: 1.95rem; padding: 0.2rem 0.35rem !important; font-size: 0.76rem !important; line-height: 1.15 !important; }
}

/* moved from walk-of-grit.html (visual_upgrades.md item 2) */
.wog-stat { display: block; padding: 1.35rem 1.4rem 1.25rem; border-top: 5px solid #004aad; text-decoration: none; color: #212529; transition: transform .15s ease, box-shadow .15s ease; }
.wog-stat:hover, .wog-post:hover, .wog-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(18, 38, 70, 0.13); }
.wog-stat b { display: block; font-family: var(--heading-font, "Nunito", sans-serif); font-size: clamp(2.3rem, 4vw, 3rem); font-weight: 900; color: #004aad; line-height: 1; }
.wog-stat strong { display: block; font-family: var(--heading-font, "Nunito", sans-serif); color: #2d465e; font-size: 1.08rem; margin: 0.45rem 0 0.2rem; }
.wog-stat small { color: #5b6777; font-size: 0.9rem; }
.wog-post { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: #212529; background: #fff; border: 1px solid #e3e8f1; border-radius: 14px; box-shadow: 0 6px 18px rgba(18, 38, 70, 0.07); transition: transform .15s ease, box-shadow .15s ease; }
.wog-post-img { display: block; aspect-ratio: 16 / 9; background: #e8f1ff; overflow: hidden; }
.wog-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wog-post-body { padding: 0.95rem 1.1rem 1.15rem; }
.wog-post time, .wog-note time { display: block; font-family: var(--nav-font, "Poppins", sans-serif); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #004aad; margin-bottom: 0.35rem; }
.wog-post strong { font-family: var(--heading-font, "Nunito", sans-serif); font-size: 1.08rem; color: #2d465e; line-height: 1.3; }
.wog-tile { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1.05rem 1.1rem; text-decoration: none; color: #212529; background: #fff; border: 1px solid #e3e8f1; border-left: 4px solid #004aad; border-radius: 12px; box-shadow: 0 4px 14px rgba(18, 38, 70, 0.06); transition: transform .15s ease, box-shadow .15s ease; }
.wog-tile.is-field { border-left-color: #8bb4ea; background: #f5f9ff; }
.wog-tile > i { font-size: 1.35rem; color: #004aad; line-height: 1; margin-top: 0.1rem; }
.wog-tile strong { display: block; font-family: var(--heading-font, "Nunito", sans-serif); color: #2d465e; font-size: 1.02rem; }
.wog-tile small { display: block; color: #5b6777; font-size: 0.88rem; margin-top: 0.15rem; }

/* ===== Visual upgrades (visual_upgrades.md, approved 9:24 AM ET). Tab CSS is not touched here. ===== */
:root { --wog-navy: #1F3A5F; --wog-light: #DCEAF7; --wog-blue: #004aad; --wog-gold: #ffd166; }
.wog-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 2. Home card style on every card */
.wog-card, #rf-root .card, #ff-root .card, #rf-root .kpi, #ff-root .kpi,
.feed-article .article, .fp-grid > *, .wog-step, .wog-explore-card {
  background: #fff; border: 1px solid #e3e8f1 !important; border-radius: 14px !important;
  box-shadow: 0 6px 18px rgba(18, 38, 70, 0.07) !important; transition: transform .15s ease, box-shadow .15s ease;
}
#rf-root .card:hover, #ff-root .card:hover, #rf-root .kpi:hover, #ff-root .kpi:hover,
.feed-article .article:hover, .fp-grid > *:hover, .wog-step:hover, .wog-explore-card:hover {
  transform: translateY(-3px); box-shadow: 0 12px 26px rgba(18, 38, 70, 0.13) !important;
}

/* 3. Keep exploring strip */
.wog-explore { background: var(--wog-light); padding: 1.6rem 0 1.8rem; margin-top: 2.2rem; }
.wog-explore-in { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; }
.wog-explore h2 { font-family: var(--heading-font, "Nunito", sans-serif); font-weight: 800; color: var(--wog-navy); font-size: 1.3rem; margin: 0 0 0.9rem; }
.wog-explore-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.wog-explore-card { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.1rem; text-decoration: none; color: var(--wog-navy); min-width: 0; }
.wog-explore-card i { font-size: 1.4rem; color: var(--wog-blue); flex: none; }
.wog-explore-card strong { font-family: var(--heading-font, "Nunito", sans-serif); font-size: 1rem; color: var(--wog-navy); min-width: 0; overflow-wrap: anywhere; }
.wog-explore-card:hover { color: var(--wog-navy); }
@media (max-width: 767.98px) { .wog-explore-grid { grid-template-columns: 1fr; } }

/* 4. Slim Home banner on every tab */
html body .wog-view-head:not([data-title-for="home"]), html body #rf-root .rf-title, html body #ff-root .rf-title, html body article.method > h1 {
  background: linear-gradient(135deg, #004aad, #12366f 55%, #2d465e); color: #fff; border-radius: 18px; padding: 1rem 1.25rem; box-sizing: border-box;
}
html body .wog-view-head:not([data-title-for="home"]) .wog-view-title, html body #rf-root .rf-title h1, html body #ff-root .rf-title h1, html body article.method > h1 { color: #fff !important; }
html body .wog-view-head .wog-view-title::after { background: rgba(255, 255, 255, 0.75); }
html body #rf-root .rf-title .rf-sub, html body #ff-root .rf-title .rf-sub { color: rgba(255, 255, 255, 0.88) !important; }

/* 5. Shimmer skeletons */
@keyframes wog-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.wog-skel, #rf-root .kpis:empty, #ff-root .kpis:empty, #rf-root .chart:empty, #ff-root .chart:empty, #rf-root .table-scroll:empty, #ff-root .table-scroll:empty {
  background: linear-gradient(90deg, #DCEAF7 25%, #eef3ff 50%, #DCEAF7 75%); background-size: 200% 100%; animation: wog-shimmer 1.2s linear infinite;
}
.wog-skel { display: inline-block; width: min(16rem, 70%); height: 0.95em; border-radius: 6px; vertical-align: middle; }
.wog-skel-lg { width: min(22rem, 90%); height: 1.1em; }
#rf-root .kpis:empty, #ff-root .kpis:empty { min-height: 5.5rem; border-radius: 14px; }
#rf-root .table-scroll:empty, #ff-root .table-scroll:empty { min-height: 6rem; border-radius: 10px; }
#rf-root .chart:empty, #ff-root .chart:empty { border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .wog-skel, #rf-root .kpis:empty, #ff-root .kpis:empty, #rf-root .chart:empty, #ff-root .chart:empty, #rf-root .table-scroll:empty, #ff-root .table-scroll:empty { animation: none; } }

/* 6. One 40px avatar */
html body .author-img, html body .blog-details .article-content .content-header .author-info .author-details .author-img { width: 40px !important; height: 40px !important; border-radius: 50% !important; object-fit: cover; }
picture { display: contents; }
picture > source { display: none; }

/* 7. AOS off under reduced motion */
@media (prefers-reduced-motion: reduce) { [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* Home: gold New tag */
.wog-post-img { position: relative; }
.wog-new { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 1; background: var(--wog-gold); color: var(--wog-navy); font: 800 0.72rem/1 var(--nav-font, "Poppins", sans-serif); letter-spacing: 0.06em; text-transform: uppercase; padding: 0.3rem 0.55rem; border-radius: 999px; }

/* Walk of Grit Blog: 16:9 covers, category tag, hover lift (lift above) */
html body .feed-article .hero-img img, html body .blog-details .hero-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
html body .meta-categories a.category, html body a.category { background: var(--wog-light) !important; color: var(--wog-navy) !important; border-radius: 999px; padding: 0.15rem 0.6rem; font-weight: 600; text-decoration: none; }

/* blog.html: X share links as icon buttons */
html body .share-section .social-links a { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--wog-light); color: var(--wog-navy); border: 1px solid var(--wog-light); transition: background-color .15s, color .15s; }
html body .share-section .social-links a:hover, html body .share-section .social-links a:focus-visible { background: var(--wog-navy); color: #fff; border-color: var(--wog-navy); }

/* Who is Kareem Powell: timeline + tool chips */
html body #view-experience .exp-item { position: relative; margin: 0 0 1rem 1.6rem; padding: 1rem 1.1rem; border: 1px solid #e3e8f1; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(18, 38, 70, 0.07); }
html body #view-experience .exp-item::before { content: ""; position: absolute; left: -1.6rem; top: -1rem; bottom: -1rem; width: 3px; margin-left: 0.45rem; background: var(--wog-light); }
html body #view-experience .exp-item::after { content: ""; position: absolute; left: calc(-1.6rem + 0.2rem); top: 1.35rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--wog-navy); box-shadow: 0 0 0 3px #fff; }
html body #view-experience .wog-chips { gap: 0.4rem; }
html body #view-experience .wog-chip { display: inline-flex; align-items: center; gap: 0.3rem; background: var(--wog-light); color: var(--wog-navy); border-radius: 999px; padding: 0.2rem 0.6rem; font-size: 0.85rem; font-weight: 600; }
html body #view-experience .wog-chip i { color: var(--wog-navy); font-size: 0.85em; }
html body #view-experience .wog-chips > i { display: none; }

/* Revenue Forecasts: KPI header strip, big number, up/down colors with arrows */
html body #rf-root .kpi, html body #ff-root .kpi { border-top: 5px solid var(--wog-blue) !important; }
html body #rf-root .kpi .v, html body #ff-root .kpi .v { font-size: 1.75rem; font-weight: 800; color: var(--wog-navy); }
html body #rf-root .pos { color: #198754 !important; }
html body #rf-root .neg { color: #c0392b !important; }
html body #rf-root .pos::before { content: "\25B2\00a0"; font-size: 0.75em; }
html body #rf-root .neg::before { content: "\25BC\00a0"; font-size: 0.75em; }

/* Football: rounded bars with % inside, team cards hover */
html body #ff-root .bar3 { height: 1.15rem; border-radius: 10px; }
html body #ff-root .bar3 span { display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font-size: 0.66rem; font-weight: 700; line-height: 1; white-space: nowrap; }
html body #ff-root .bar3 span:nth-child(2) { color: var(--wog-navy); }
html body #ff-root .bar3 span[data-p]::after { content: attr(data-p); }
html body #ff-root .ff-teamlinks a { border-left: 4px solid var(--wog-navy); transition: transform .15s ease, box-shadow .15s ease; }
html body #ff-root .ff-teamlinks a:hover, html body .fp-grid > *:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(18, 38, 70, 0.13); }
html body .fp-grid > * { border-left: 4px solid var(--wog-navy) !important; }

/* Method notes: numbered step cards + sticky contents bar */
.wog-method-body { counter-reset: wogstep; }
.wog-step { padding: 1rem 1.15rem; margin: 0 0 1rem; scroll-margin-top: 4rem; }
.wog-step > h2 { display: flex; align-items: center; gap: 0.55rem; }
.wog-step > h2::before { counter-increment: wogstep; content: counter(wogstep); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--wog-navy); color: #fff; font-size: 0.9rem; }
.wog-step > h2 > i { color: var(--wog-blue); flex: none; }
.wog-toc { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: nowrap; gap: 0.35rem; overflow-x: auto; background: var(--wog-light); border-radius: 10px; padding: 0.45rem 0.5rem; margin: 0 0 1rem; scrollbar-width: thin; }
.wog-toc a { flex: none; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wog-navy); background: #fff; border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.wog-toc a:hover { background: var(--wog-navy); color: #fff; }
html body .ff-method.wog-method-body { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; transform: none !important; }

/* SQL view: navy code panels + copy button */
html body #view-intuitive pre { background: var(--wog-navy) !important; color: #fff !important; border: 0 !important; border-radius: 10px !important; }
.wog-code { position: relative; }
.wog-copy { position: absolute; top: 0.45rem; right: 0.45rem; opacity: 0; transition: opacity .15s; border: 0; border-radius: 8px; width: 2rem; height: 2rem; background: rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer; }
.wog-code:hover .wog-copy, .wog-copy:focus-visible { opacity: 1; }
@media (hover: none) { .wog-copy { opacity: 0.85; } }

/* walkofgrit.com tabs: ONE row at every width. No wrapping, no sideways scrolling.
   Navy #1F3A5F selected with white text, light blue #DCEAF7 others with navy text, weight 600 always,
   1.5px border always, so a click only changes the color.
   Paste at the end of assets/brand/brand.css (all 21 pages load it). Replaces the earlier tab blocks. */
html { scrollbar-gutter: stable; }
html body #header.header { padding: 0.5rem 0 !important; }
html body #header hr { margin: 0.35rem 0 !important; }
html body #header .container-fluid.mt-1 { margin-top: 0 !important; }
html body #rf-root, html body #ff-root { margin-top: 0.9rem !important; }

/* ---------- 1. Main menu (7 tabs with icons), every page including blog.html ---------- */
html body #header nav[aria-label="Site"] { display: block !important; width: 100%; overflow: visible !important; }
html body #header nav[aria-label="Site"] .site-tabs {
  display: flex !important; flex-wrap: nowrap !important; overflow: visible !important;
  gap: clamp(0.25rem, 0.6vw, 0.4rem) !important; row-gap: 0 !important;
  width: 100%; max-width: 1160px; margin: 0 auto !important; padding: 0.25rem clamp(0.25rem, 1vw, 0.75rem) !important;
  list-style: none; box-sizing: border-box;
}
html body #header nav[aria-label="Site"] .site-tabs .nav-item {
  flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; margin: 0 !important; display: flex;
}
html body #header nav[aria-label="Site"] .site-tabs .nav-item[hidden] { display: none !important; }
html body #header nav[aria-label="Site"] .site-tabs .nav-link,
html body #header nav[aria-label="Site"] .site-tabs .nav-link.tab-cross-site {
  box-sizing: border-box; flex: 1 1 auto; width: 100%; min-width: 0 !important;
  display: flex !important; align-items: center; justify-content: center; gap: clamp(0.2rem, 0.45vw, 0.4rem);
  height: 2.6rem; padding: 0 clamp(0.25rem, 0.7vw, 0.8rem) !important; margin: 0 !important;
  font-size: clamp(0.68rem, 0.5rem + 0.38vw, 0.86rem) !important; font-weight: 600 !important;
  line-height: 1.1 !important; letter-spacing: 0 !important; text-align: center; white-space: normal !important;
  overflow: hidden; border: 1.5px solid #DCEAF7 !important; border-radius: 9px !important;
  background: #DCEAF7 !important; color: #1F3A5F !important; box-shadow: none !important; transform: none !important;
  transition: background-color .12s, color .12s, border-color .12s;
}
html body #header nav[aria-label="Site"] .site-tabs .nav-link i { flex: none; font-size: 1em; line-height: 1; margin: 0 !important; color: inherit !important; }
html body #header nav[aria-label="Site"] .site-tabs .nav-link:hover,
html body #header nav[aria-label="Site"] .site-tabs .nav-link:focus-visible { border-color: #1F3A5F !important; }
html body #header nav[aria-label="Site"] .site-tabs .nav-link.active,
html body #header nav[aria-label="Site"] .site-tabs .nav-link[aria-current="page"] {
  background: #1F3A5F !important; border-color: #1F3A5F !important; color: #fff !important; font-weight: 600 !important;
}

/* ---------- 2. Sub-tabs: companies (#rf-pills, 11), leagues (#ff-pills, 7), Who is Kareem Powell (2), SQL groups (6) ---------- */
html body .rf-pills, html body .who-pills, html body #view-intuitive .sql-groups, html body #view-intuitive .sql-tabs {
  display: flex !important; flex-wrap: nowrap !important; overflow: visible !important;
  gap: clamp(0.25rem, 0.5vw, 0.4rem) !important; row-gap: 0 !important;
  width: 100%; max-width: 1160px; margin: 0 auto !important; padding: 0 0.25rem 0.35rem !important; box-sizing: border-box;
}
html body .rf-pills a, html body .who-pills a,
html body #view-intuitive .sql-groups button, html body #view-intuitive .sql-tabs button {
  box-sizing: border-box; flex: 1 1 0 !important; min-width: 0 !important; width: auto !important;
  display: flex !important; align-items: center; justify-content: center; gap: 0.3rem;
  height: 2.2rem; padding: 0 clamp(0.15rem, 0.6vw, 0.7rem) !important; margin: 0 !important;
  font-size: clamp(0.66rem, 0.5rem + 0.33vw, 0.84rem) !important; font-weight: 600 !important;
  line-height: 1.05 !important; text-align: center; white-space: normal !important; overflow: hidden;
  border: 1.5px solid #DCEAF7 !important; border-radius: 999px !important;
  background: #DCEAF7 !important; color: #1F3A5F !important; box-shadow: none !important; transform: none !important;
}
html body #view-intuitive .sql-tabs button[hidden] { display: none !important; }
html body #view-intuitive .sql-groups button i, html body #view-intuitive .sql-tabs button i { flex: none; margin: 0 !important; }
html body .rf-pills a:hover, html body .who-pills a:hover,
html body #view-intuitive .sql-groups button:hover, html body #view-intuitive .sql-tabs button:hover { border-color: #1F3A5F !important; }
html body .rf-pills a[aria-current="page"], html body .who-pills a[aria-current="page"],
html body #view-intuitive .sql-groups button[aria-selected="true"], html body #view-intuitive .sql-tabs button[aria-selected="true"] {
  background: #1F3A5F !important; border-color: #1F3A5F !important; color: #fff !important; font-weight: 600 !important;
}
/* The 11 company tickers are short: size each chip to its text so Overview gets a little more room */
html body #rf-pills a { flex: 1 1 auto !important; }
/* SQL topics: tall enough for a 2-line label on tablets */
html body #view-intuitive .sql-tabs button { height: 2.6rem; }
html body #view-intuitive .sql-topic-select { display: none; }

/* ---------- 3. Narrower screens: smaller gap ---------- */
@media (max-width: 1023.98px) {
  html body #header nav[aria-label="Site"] .site-tabs, html body .rf-pills, html body .who-pills,
  html body #view-intuitive .sql-groups, html body #view-intuitive .sql-tabs { gap: 0.25rem !important; }
}

/* ---------- 4. Phones (under 640px) ---------- */
@media (max-width: 639.98px) {
  /* Main menu and SQL groups: compact bar, icon on top, small label under it, equal widths */
  html body #header nav[aria-label="Site"] .site-tabs { padding: 0.2rem 0.25rem !important; }
  html body #header nav[aria-label="Site"] .site-tabs .nav-link,
  html body #header nav[aria-label="Site"] .site-tabs .nav-link.tab-cross-site,
  html body #view-intuitive .sql-groups button {
    flex-direction: column; gap: 0.15rem; height: 3.75rem; padding: 0.2rem 0.1rem !important;
    font-size: clamp(0.5rem, 2.3vw, 0.64rem) !important; line-height: 1 !important; border-radius: 8px !important;
    overflow-wrap: break-word; hyphens: manual;
  }
  html body #header nav[aria-label="Site"] .site-tabs .nav-link i,
  html body #view-intuitive .sql-groups button i { font-size: 1.05rem; }
  /* Companies, leagues, Who is Kareem Powell: small chips, label can take 2 lines inside the chip */
  html body .rf-pills, html body .who-pills { padding: 0 0.25rem 0.3rem !important; }
  html body .rf-pills a, html body .who-pills a {
    height: 2.3rem; padding: 0 0.15rem !important; font-size: clamp(0.5rem, 2.3vw, 0.62rem) !important; border-radius: 10px !important;
  }
  /* SQL topics (up to 9 per group): one dropdown instead of a tab row (built by the small script below) */
  html body #view-intuitive .sql-tabs { display: none !important; }
  html body #view-intuitive .sql-topic-select {
    display: block; box-sizing: border-box; width: 100%; height: 2.4rem; margin: 0 0 0.35rem; padding: 0 0.6rem;
    font: 600 0.84rem/1.2 Roboto, -apple-system, "Segoe UI", sans-serif; color: #1F3A5F;
    background-color: #DCEAF7; border: 1.5px solid #1F3A5F; border-radius: 9px;
  }
}
/* Very small phones (under 360px): tabs size to their words instead of equal shares, so no word is cut off */
@media (max-width: 359.98px) {
  html body #header nav[aria-label="Site"] .site-tabs .nav-item { flex: 1 1 auto !important; min-width: min-content !important; }
  html body #header nav[aria-label="Site"] .site-tabs .nav-link,
  html body #header nav[aria-label="Site"] .site-tabs .nav-link.tab-cross-site { padding: 0.2rem 0.05rem !important; }
  html body #header nav[aria-label="Site"] .site-tabs, html body .rf-pills, html body #view-intuitive .sql-groups { gap: 0.15rem !important; padding-left: 0.15rem !important; padding-right: 0.15rem !important; }
  html body .rf-pills a { flex: 1 1 auto !important; padding: 0 0.1rem !important; font-size: 0.48rem !important; }
}

/* Home (walk-of-grit.html#home): even, tighter gaps between sections.
   Cause: main.css gives every <section> padding 60px 0, and .wog-section adds margin-top 2.6rem,
   so each gap is about 162px. Fix: no section padding, one 2rem gap. Paste at the end of assets/brand/brand.css. */
html body .wog-section { padding: 0 !important; margin: 2rem auto 0 !important; }
html body .wog-band { margin: 2rem auto 1.5rem !important; }
@media (max-width: 575.98px) {
  html body .wog-section { margin-top: 1.5rem !important; }
  html body .wog-band { margin: 1.5rem auto 1rem !important; }
}
