/*
Theme Name: Token Boost
Theme URI: https://token-boost.com/
Author: Token Boost
Description: Amber Signal — the Token Boost design system. Practical, dashboard-utility crypto publishing with a mining-first spine. Warm graphite surfaces, signal-amber accents, condensed grotesk display type.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: tokenboost
*/

/* ==========================================================================
   AMBER SIGNAL — design tokens
   Warm on purpose. The sibling sites run cool navy/corporate and editorial
   serif; everything here is warm-neutral so the two never read alike.
   ========================================================================== */

:root {
  /* surfaces */
  --tb-bg:          #FBFAF8;   /* warm paper */
  --tb-surface:     #F3F0EA;   /* warm sand banding */
  --tb-card:        #FFFFFF;
  --tb-border:      #E7E1D6;   /* warm hairline */
  --tb-text:        #1C1A17;   /* warm near-black */
  --tb-muted:       #6B6357;   /* warm gray */

  /* brand */
  --tb-brand:       #F59E0B;   /* SIGNAL AMBER */
  --tb-brand-deep:  #B45309;   /* pressed / hover */
  --tb-accent:      #FBBF24;   /* ELECTRIC AMBER — CTAs, active states */

  /* On a warm paper background #F59E0B lands at ~2.1:1 against body text and
     fails AA as a LINK colour. Amber is for fills and rules; links get their
     own darker token. Same trap cost a sibling an accessibility pass. */
  --tb-link:        #9A5B06;
  --tb-link-hover:  #7A4705;

  /* semantic */
  --tb-bull:        #16A34A;
  --tb-bear:        #DC2626;
  --tb-neutral:     #78716C;

  /* category tints */
  --tb-c-bitcoin:   #F7931A;
  --tb-c-ethereum:  #627EEA;
  --tb-c-litecoin:  #8A8D8F;   /* archived #A6A9AA is 1.9:1 on paper — darkened for AA */
  --tb-c-ripple:    #23292F;
  --tb-c-coins:     #F59E0B;
  --tb-c-mining:    #EA580C;
  --tb-c-prices:    #0EA5E9;
  --tb-c-news:      #DC2626;

  /* type */
  --tb-display: "Archivo", "Archivo Narrow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tb-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tb-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 8px scale */
  --tb-1: 4px;  --tb-2: 8px;  --tb-3: 12px; --tb-4: 16px;
  --tb-5: 24px; --tb-6: 32px; --tb-7: 48px; --tb-8: 64px; --tb-9: 96px;

  --tb-radius:    14px;   /* rounded-xl chunky */
  --tb-radius-sm: 8px;
  --tb-radius-lg: 20px;
  --tb-shadow:    0 1px 2px rgba(28,26,23,.05), 0 4px 16px rgba(28,26,23,.06);
  --tb-shadow-lg: 0 2px 6px rgba(28,26,23,.07), 0 12px 32px rgba(28,26,23,.10);

  --tb-wrap:  1200px;
  --tb-read:  720px;
}

/* Dark mode is WARM. Chrome carries its OWN tokens rather than inheriting the
   body palette — a sibling inverted only the body and the masthead stayed light. */
:root[data-theme="dark"] {
  --tb-bg:      #161513;
  --tb-surface: #211E1A;
  --tb-card:    #211E1A;
  --tb-border:  #38322B;
  --tb-text:    #F5F1EA;
  --tb-muted:   #A79E90;
  --tb-link:       #FBBF24;   /* amber is legible on graphite, unlike on paper */
  --tb-link-hover: #FCD34D;
  --tb-c-ripple:   #C9D1D9;
  --tb-c-litecoin: #B9BCBE;
  --tb-shadow:    0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.32);
  --tb-shadow-lg: 0 2px 6px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.40);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tb-bg:      #161513;
    --tb-surface: #211E1A;
    --tb-card:    #211E1A;
    --tb-border:  #38322B;
    --tb-text:    #F5F1EA;
    --tb-muted:   #A79E90;
    --tb-link:       #FBBF24;
    --tb-link-hover: #FCD34D;
    --tb-c-ripple:   #C9D1D9;
    --tb-c-litecoin: #B9BCBE;
    --tb-shadow:    0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.32);
    --tb-shadow-lg: 0 2px 6px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.40);
  }
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: var(--tb-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* belt-and-braces; individual wide blocks scroll internally */
}

img, video, svg, iframe { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--tb-link); text-decoration: none; }
a:hover { color: var(--tb-link-hover); text-decoration: underline; text-underline-offset: 2px; }
/* Hover must not be a pure recolour — on a warm background a lighter amber drops
   below AA. Underline carries the affordance, colour only reinforces it. */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--tb-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--tb-3);
  color: var(--tb-text);
}
h1 { font-size: clamp(30px, 5vw, 40px); line-height: 1.1; }
h2 { font-size: clamp(22px, 3.4vw, 26px); }
h3 { font-size: 20px; }
h4 { font-size: 18px; }

p { margin: 0 0 var(--tb-4); }
ul, ol { margin: 0 0 var(--tb-4); padding-left: 1.35em; }
li { margin-bottom: var(--tb-2); }

hr { border: 0; border-top: 1px solid var(--tb-border); margin: var(--tb-6) 0; }

code, kbd, samp { font-family: var(--tb-mono); font-size: .92em; }

:focus-visible {
  outline: 3px solid var(--tb-brand);
  outline-offset: 2px;
  border-radius: var(--tb-radius-sm);
}

.tb-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--tb-brand); color: #1C1A17;
  padding: var(--tb-3) var(--tb-4); z-index: 200;
  font-weight: 700; border-radius: 0 0 var(--tb-radius-sm) 0;
}
.tb-skip:focus { left: 0; }

.tb-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

/* Gutters live on their own declaration. A `padding: 0 X` shorthand added later
   for vertical rhythm silently wipes the horizontal gutter and the content goes
   edge-to-edge on mobile. */
.tb-wrap {
  max-width: var(--tb-wrap);
  margin-inline: auto;
  padding-left: var(--tb-4);
  padding-right: var(--tb-4);
}
@media (min-width: 768px) {
  .tb-wrap { padding-left: var(--tb-5); padding-right: var(--tb-5); }
}

.tb-section { padding-block: var(--tb-7); }
.tb-section--tight { padding-block: var(--tb-6); }
.tb-section--band { background: var(--tb-surface); }

.tb-grid { display: grid; gap: var(--tb-5); }
.tb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tb-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* minmax(0,1fr) not 1fr: a grid child's min-content width otherwise overflows
   the track and a long unbroken string blows the whole row out. */
@media (max-width: 1023px) { .tb-grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 767px)  {
  .tb-grid--2, .tb-grid--3, .tb-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.tb-main-sidebar { display: grid; gap: var(--tb-6); grid-template-columns: minmax(0,1fr); }
@media (min-width: 1024px) {
  .tb-main-sidebar { grid-template-columns: minmax(0,1fr) 320px; gap: var(--tb-7); }
}

.tb-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--tb-4); margin-bottom: var(--tb-5);
  border-bottom: 2px solid var(--tb-border); padding-bottom: var(--tb-3);
  flex-wrap: wrap;
}
.tb-section-head h2 { margin: 0; }
.tb-section-head__more { font-weight: 600; font-size: 15px; white-space: nowrap; }

.tb-eyebrow {
  font-family: var(--tb-display);
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--tb-brand-deep);
  display: inline-flex; align-items: center; gap: var(--tb-2);
  margin-bottom: var(--tb-2);
}

/* ==========================================================================
   Header / nav
   ========================================================================== */

.tb-topbar {
  background: #161513; color: #F5F1EA;
  font-size: 13px; border-bottom: 1px solid #38322B;
}
.tb-topbar__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--tb-4); min-height: 40px; flex-wrap: wrap;
}
.tb-topbar__date { color: #A79E90; font-family: var(--tb-mono); font-size: 12px; white-space: nowrap; }
.tb-topbar a { color: #F5F1EA; }
.tb-topbar a:hover { color: var(--tb-accent); }

/* The ticker scrolls inside its OWN container. If it were allowed to size the
   header, a long list would push the page into horizontal scroll on mobile. */
.tb-ticker { display: flex; gap: var(--tb-4); overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.tb-ticker::-webkit-scrollbar { display: none; }
.tb-ticker__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-family: var(--tb-mono); font-size: 12px; }
.tb-ticker__sym { color: #A79E90; font-weight: 600; }
.tb-ticker__val { color: #F5F1EA; }
.tb-ticker__chg--up   { color: #4ADE80; }
.tb-ticker__chg--down { color: #F87171; }

.tb-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--tb-bg);
  border-bottom: 1px solid var(--tb-border);
  /* No overflow:hidden anywhere on this chain — it would clip the mega menus. */
}
.tb-header__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--tb-4); min-height: 68px;
}

.tb-logo { display: inline-flex; align-items: baseline; gap: 1px; font-family: var(--tb-display); font-size: 25px; font-weight: 800; letter-spacing: -0.02em; color: var(--tb-text); }
.tb-logo:hover { text-decoration: none; color: var(--tb-text); }
.tb-logo__b { color: var(--tb-brand-deep); }

.tb-nav { display: none; }
@media (min-width: 1100px) { .tb-nav { display: block; } }
.tb-nav ul { display: flex; align-items: center; gap: var(--tb-1); list-style: none; margin: 0; padding: 0; }
.tb-nav li { margin: 0; position: relative; }
.tb-nav > ul > li > a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: var(--tb-2) var(--tb-3); border-radius: var(--tb-radius-sm);
  font-family: var(--tb-display); font-weight: 600; font-size: 15px;
  color: var(--tb-text);
}
.tb-nav > ul > li > a:hover,
.tb-nav > ul > li:focus-within > a { background: var(--tb-surface); color: var(--tb-text); text-decoration: none; }
.tb-nav > ul > li.current-menu-item > a,
.tb-nav > ul > li.current-menu-parent > a { box-shadow: inset 0 -3px 0 var(--tb-brand); }

.tb-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--tb-card); border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius); box-shadow: var(--tb-shadow-lg);
  padding: var(--tb-2); display: block; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
  z-index: 120;
}
.tb-nav li:hover > .sub-menu,
.tb-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.tb-nav .sub-menu li { width: 100%; }
.tb-nav .sub-menu a {
  display: block; padding: var(--tb-2) var(--tb-3);
  border-radius: var(--tb-radius-sm); font-size: 15px; color: var(--tb-text);
}
.tb-nav .sub-menu a:hover { background: var(--tb-surface); text-decoration: none; }

.tb-header__actions { display: flex; align-items: center; gap: var(--tb-2); }

.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--tb-2);
  font-family: var(--tb-display); font-weight: 700; font-size: 15px;
  padding: 10px var(--tb-4); border-radius: var(--tb-radius-sm);
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.tb-btn--primary { background: var(--tb-brand); color: #1C1A17; }
.tb-btn--primary:hover { background: var(--tb-brand-deep); color: #fff; text-decoration: none; }
.tb-btn--ghost { background: transparent; color: var(--tb-text); border-color: var(--tb-border); }
.tb-btn--ghost:hover { background: var(--tb-surface); color: var(--tb-text); text-decoration: none; }
.tb-btn--block { width: 100%; }

.tb-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--tb-radius-sm);
  border: 1px solid var(--tb-border); background: transparent;
  color: var(--tb-text); cursor: pointer;
}
.tb-iconbtn:hover { background: var(--tb-surface); }
@media (min-width: 1100px) { .tb-burger { display: none; } }

.tb-mobilenav {
  display: none; border-top: 1px solid var(--tb-border);
  background: var(--tb-card); padding: var(--tb-4) 0 var(--tb-5);
  max-height: calc(100vh - 108px); overflow-y: auto;
}
.tb-mobilenav.is-open { display: block; }
.tb-mobilenav ul { list-style: none; margin: 0; padding: 0; }
.tb-mobilenav li { margin: 0; }
.tb-mobilenav a { display: block; padding: var(--tb-3) 0; font-family: var(--tb-display); font-weight: 600; border-bottom: 1px solid var(--tb-border); color: var(--tb-text); }
.tb-mobilenav .sub-menu { padding-left: var(--tb-4); }
.tb-mobilenav .sub-menu a { font-weight: 400; font-family: var(--tb-body); font-size: 15px; }

/* ==========================================================================
   Cards
   ========================================================================== */

.tb-card {
  background: var(--tb-card); border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  min-width: 0;
}
.tb-card:hover { transform: translateY(-2px); box-shadow: var(--tb-shadow-lg); border-color: #D9D0BF; }

/* aspect-ratio needs a block box. On a bare inline <a> it is ignored and the
   thumbnail collapses to text height. */
.tb-card__media { display: block; aspect-ratio: 16 / 9; background: var(--tb-surface); overflow: hidden; }
.tb-card__media img { width: 100%; height: 100%; object-fit: cover; }

.tb-card__body { padding: var(--tb-4); display: flex; flex-direction: column; gap: var(--tb-2); flex: 1 1 auto; }
.tb-card__title { font-family: var(--tb-display); font-size: 18px; font-weight: 700; line-height: 1.25; margin: 0; }
.tb-card__title a { color: var(--tb-text); }
/* The whole card lifts on hover, so the title must not ALSO underline — two
   hover affordances on one target reads as a bug. */
.tb-card:hover .tb-card__title a { color: var(--tb-brand-deep); text-decoration: none; }
.tb-card__excerpt { font-size: 15px; color: var(--tb-muted); margin: 0; }
.tb-card__meta { margin-top: auto; padding-top: var(--tb-2); display: flex; align-items: center; gap: var(--tb-2); font-size: 13px; color: var(--tb-muted); flex-wrap: wrap; }

.tb-card--lead .tb-card__title { font-size: clamp(22px, 3vw, 28px); }
.tb-card--flat { border: 0; background: transparent; border-radius: 0; }
.tb-card--flat:hover { transform: none; box-shadow: none; }

.tb-card--row { flex-direction: row; align-items: flex-start; gap: var(--tb-3); padding: var(--tb-3); }
.tb-card--row .tb-card__media { width: 108px; flex: 0 0 108px; aspect-ratio: 4 / 3; border-radius: var(--tb-radius-sm); }
.tb-card--row .tb-card__body { padding: 0; }
.tb-card--row .tb-card__title { font-size: 15px; }

/* Chips */
.tb-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--tb-display); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--tb-surface); color: var(--tb-muted);
  border: 1px solid var(--tb-border);
}
.tb-chip::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; opacity: .85; }
.tb-chip--bitcoin  { color: #A5620B; }
.tb-chip--ethereum { color: #3F53A8; }
.tb-chip--litecoin { color: #5F6264; }
.tb-chip--ripple   { color: #23292F; }
.tb-chip--coins    { color: #96600A; }
.tb-chip--mining   { color: #C2410C; }
.tb-chip--prices   { color: #0369A1; }
.tb-chip--news     { color: #B91C1C; }
:root[data-theme="dark"] .tb-chip--ripple { color: #C9D1D9; }

.tb-byline { display: inline-flex; align-items: center; gap: var(--tb-2); font-size: 13px; color: var(--tb-muted); }
.tb-byline img { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; flex: 0 0 24px; }
.tb-byline a { color: var(--tb-text); font-weight: 600; }
.tb-dot::before { content: "\00B7"; margin: 0 6px; color: var(--tb-border); }

/* ==========================================================================
   Numbers, tables, market blocks
   ========================================================================== */

.tb-num { font-family: var(--tb-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tb-up   { color: var(--tb-bull); }
.tb-down { color: var(--tb-bear); }
.tb-flat { color: var(--tb-neutral); }

/* A table cannot be its own scroll container — display:block on <table> makes it
   shrink-wrap and the columns collapse. The WRAPPER scrolls. */
.tb-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--tb-border); border-radius: var(--tb-radius); background: var(--tb-card); }
.tb-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.tb-table th, .tb-table td { padding: var(--tb-3) var(--tb-4); text-align: left; border-bottom: 1px solid var(--tb-border); }
.tb-table th {
  font-family: var(--tb-display); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--tb-muted);
  background: var(--tb-surface); position: sticky; top: 0; z-index: 1;
}
/* sticky top MUST be 0 inside an overflow wrapper — any positive value parks the
   header below the wrapper's top edge and hides row 1. */
.tb-table tbody tr:last-child td { border-bottom: 0; }
.tb-table tbody tr:hover { background: var(--tb-surface); }
.tb-table td.tb-num, .tb-table th.tb-num { text-align: right; }
.tb-table__coin { display: inline-flex; align-items: center; gap: var(--tb-2); font-weight: 600; }
.tb-table__coin img { width: 22px; height: 22px; border-radius: 999px; }

/* Coin monogram — stands in for a logo CDN. Self-hosted means no third-party
   request per table row and nothing to fix when someone reorganises their paths. */
.tb-coinmark {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  border-radius: 999px; color: #fff;
  font-family: var(--tb-display); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1; text-transform: uppercase;
}
.tb-table__rank { color: var(--tb-muted); font-family: var(--tb-mono); font-size: 13px; }

/* Skeletons — shown while live data loads. Never an em-dash placeholder. */
.tb-skel { display: inline-block; min-width: 58px; height: 1em; border-radius: 4px; background: linear-gradient(90deg, var(--tb-surface) 25%, var(--tb-border) 37%, var(--tb-surface) 63%); background-size: 400% 100%; animation: tb-shimmer 1.3s ease-in-out infinite; vertical-align: middle; }
@keyframes tb-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.tb-stale { font-size: 12px; color: var(--tb-muted); font-family: var(--tb-body); }

/* ==========================================================================
   Hero / mining spotlight / tools
   ========================================================================== */

.tb-hero { padding-block: var(--tb-6) var(--tb-7); }
.tb-hero__grid { display: grid; gap: var(--tb-6); grid-template-columns: minmax(0,1fr); }
@media (min-width: 900px) { .tb-hero__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.tb-hero__media { border-radius: var(--tb-radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--tb-surface); }
.tb-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.tb-hero h1 { margin-block: var(--tb-3); }
.tb-hero__stand { font-size: 19px; color: var(--tb-muted); margin-bottom: var(--tb-4); }
.tb-hero__side { display: flex; flex-direction: column; gap: var(--tb-4); }

.tb-mining {
  background: linear-gradient(180deg, #1C1A17 0%, #161513 100%);
  color: #F5F1EA; border-radius: var(--tb-radius-lg);
  padding: var(--tb-6) var(--tb-5);
}
.tb-mining h2, .tb-mining h3 { color: #F5F1EA; }
.tb-mining .tb-eyebrow { color: var(--tb-accent); }
.tb-mining .tb-card { background: #211E1A; border-color: #38322B; }
.tb-mining .tb-card__title a { color: #F5F1EA; }
.tb-mining .tb-card:hover .tb-card__title a { color: var(--tb-accent); }
.tb-mining .tb-card__excerpt, .tb-mining .tb-card__meta { color: #A79E90; }
.tb-mining .tb-section-head { border-bottom-color: #38322B; }
.tb-mining .tb-section-head__more { color: var(--tb-accent); }

.tb-toolgrid { display: grid; gap: var(--tb-4); grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1023px) { .tb-toolgrid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 559px)  { .tb-toolgrid { grid-template-columns: minmax(0,1fr); } }
.tb-tool {
  display: flex; flex-direction: column; gap: var(--tb-2);
  padding: var(--tb-5) var(--tb-4); background: var(--tb-card);
  border: 1px solid var(--tb-border); border-radius: var(--tb-radius);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.tb-tool:hover { border-color: var(--tb-brand); transform: translateY(-2px); box-shadow: var(--tb-shadow-lg); text-decoration: none; }
.tb-tool__icon { width: 44px; height: 44px; border-radius: var(--tb-radius-sm); background: var(--tb-surface); display: grid; place-items: center; color: var(--tb-brand-deep); }
.tb-tool__name { font-family: var(--tb-display); font-weight: 700; font-size: 17px; color: var(--tb-text); }
.tb-tool__desc { font-size: 14px; color: var(--tb-muted); }
.tb-tool__go { font-size: 14px; font-weight: 700; color: var(--tb-brand-deep); margin-top: auto; padding-top: var(--tb-2); }

/* ==========================================================================
   Article
   ========================================================================== */

.tb-article { max-width: var(--tb-read); }
.tb-article__stand { font-size: 20px; line-height: 1.5; color: var(--tb-muted); margin-bottom: var(--tb-5); }
.tb-article__meta { display: flex; align-items: center; gap: var(--tb-3); flex-wrap: wrap; padding-block: var(--tb-4); border-block: 1px solid var(--tb-border); margin-bottom: var(--tb-5); }
.tb-article__author { display: flex; align-items: center; gap: var(--tb-3); }
.tb-article__author img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; flex: 0 0 44px; }
.tb-article__author-name { font-weight: 700; color: var(--tb-text); }
.tb-article__author-meta { font-size: 13px; color: var(--tb-muted); }

.tb-prose { font-size: 18px; line-height: 1.75; }
.tb-prose > * { max-width: var(--tb-read); }
.tb-prose h2 { margin-top: var(--tb-7); }
.tb-prose h3 { margin-top: var(--tb-6); }
.tb-prose img, .tb-prose figure { border-radius: var(--tb-radius); }
.tb-prose figure { margin: var(--tb-6) 0; }
.tb-prose figcaption { font-size: 14px; color: var(--tb-muted); margin-top: var(--tb-2); }
.tb-prose blockquote {
  margin: var(--tb-6) 0; padding: var(--tb-4) var(--tb-5);
  border-left: 4px solid var(--tb-brand); background: var(--tb-surface);
  border-radius: 0 var(--tb-radius) var(--tb-radius) 0;
  font-size: 19px;
}
.tb-prose blockquote p:last-child { margin-bottom: 0; }
.tb-prose a { text-decoration: underline; text-underline-offset: 2px; }
/* A bare `.tb-prose a` type/descendant rule outranks a utility class added later
   on a button inside prose, so buttons are scoped out explicitly. */
.tb-prose a.tb-btn { text-decoration: none; color: #1C1A17; }
.tb-prose a.tb-btn:hover { text-decoration: none; }
.tb-prose .tb-tablewrap { margin: var(--tb-6) 0; }

/* Boxes */
.tb-box { border-radius: var(--tb-radius); padding: var(--tb-4) var(--tb-5); margin: var(--tb-6) 0; border: 1px solid var(--tb-border); background: var(--tb-surface); }
.tb-box__title { font-family: var(--tb-display); font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 var(--tb-2); display: flex; align-items: center; gap: var(--tb-2); }
.tb-box p:last-child, .tb-box ul:last-child, .tb-box ol:last-child { margin-bottom: 0; }

.tb-box--answer  { background: #FEF6E7; border-color: #F5D9A3; }
.tb-box--answer .tb-box__title { color: var(--tb-brand-deep); }
.tb-box--takeaway { background: var(--tb-card); border-left: 4px solid var(--tb-brand); }
.tb-box--risk    { background: #FEF2F2; border-color: #FCA5A5; }
.tb-box--risk .tb-box__title { color: #991B1B; }
.tb-box--affiliate { background: var(--tb-surface); font-size: 15px; }
.tb-box--tldr { background: var(--tb-card); border-left: 4px solid var(--tb-accent); }
:root[data-theme="dark"] .tb-box--answer { background: #2A2118; border-color: #6B4C15; }
:root[data-theme="dark"] .tb-box--risk   { background: #2B1A1A; border-color: #7F2222; }

.tb-toc { background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); padding: var(--tb-4) var(--tb-5); margin: var(--tb-6) 0; }
.tb-toc__title { font-family: var(--tb-display); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--tb-muted); margin-bottom: var(--tb-3); }
.tb-toc ol { margin: 0; padding-left: 1.2em; }
.tb-toc li { margin-bottom: 6px; font-size: 15px; }

.tb-proscons { display: grid; gap: var(--tb-4); grid-template-columns: minmax(0,1fr); margin: var(--tb-6) 0; }
@media (min-width: 700px) { .tb-proscons { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.tb-proscons__col { border: 1px solid var(--tb-border); border-radius: var(--tb-radius); padding: var(--tb-4); background: var(--tb-card); }
.tb-proscons__col h4 { margin: 0 0 var(--tb-2); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.tb-proscons__col--pro h4 { color: var(--tb-bull); }
.tb-proscons__col--con h4 { color: var(--tb-bear); }
.tb-proscons ul { margin: 0; padding-left: 1.2em; font-size: 15px; }

.tb-faq { margin: var(--tb-6) 0; }
.tb-faq details { border: 1px solid var(--tb-border); border-radius: var(--tb-radius); background: var(--tb-card); margin-bottom: var(--tb-3); }
.tb-faq summary { cursor: pointer; padding: var(--tb-3) var(--tb-4); font-family: var(--tb-display); font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: var(--tb-3); align-items: center; }
.tb-faq summary::-webkit-details-marker { display: none; }
.tb-faq summary::after { content: "+"; font-size: 20px; color: var(--tb-brand-deep); flex: 0 0 auto; }
.tb-faq details[open] summary::after { content: "\2212"; }
.tb-faq__body { padding: 0 var(--tb-4) var(--tb-4); font-size: 16px; }
.tb-faq__body p:last-child { margin-bottom: 0; }

.tb-sources { font-size: 15px; }
.tb-sources ol { padding-left: 1.3em; }
.tb-sources a { word-break: break-word; }

.tb-authorcard { display: flex; gap: var(--tb-4); align-items: flex-start; padding: var(--tb-5); background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); margin: var(--tb-7) 0; }
.tb-authorcard img { width: 76px; height: 76px; border-radius: 999px; object-fit: cover; flex: 0 0 76px; }
.tb-authorcard__name { font-family: var(--tb-display); font-size: 19px; font-weight: 700; margin: 0 0 2px; }
.tb-authorcard__role { font-size: 13px; color: var(--tb-muted); margin-bottom: var(--tb-2); }
.tb-authorcard__bio { font-size: 15px; margin: 0; }

.tb-tags { display: flex; flex-wrap: wrap; gap: var(--tb-2); margin: var(--tb-5) 0; }
.tb-tags a { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--tb-surface); border: 1px solid var(--tb-border); color: var(--tb-muted); }
.tb-tags a:hover { border-color: var(--tb-brand); color: var(--tb-brand-deep); text-decoration: none; }

/* Sidebar */
.tb-sidebar { display: flex; flex-direction: column; gap: var(--tb-5); }
.tb-widget { background: var(--tb-card); border: 1px solid var(--tb-border); border-radius: var(--tb-radius); padding: var(--tb-4); }
.tb-widget__title { font-family: var(--tb-display); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tb-muted); margin: 0 0 var(--tb-3); padding-bottom: var(--tb-2); border-bottom: 1px solid var(--tb-border); }
.tb-widget ul { list-style: none; margin: 0; padding: 0; }
.tb-widget li { margin-bottom: var(--tb-3); font-size: 15px; }
.tb-widget li:last-child { margin-bottom: 0; }
@media (min-width: 1024px) { .tb-sidebar--sticky { position: sticky; top: 88px; align-self: start; } }

/* ==========================================================================
   Newsletter, footer, misc
   ========================================================================== */

.tb-news-cta { background: var(--tb-brand); border-radius: var(--tb-radius-lg); padding: var(--tb-7) var(--tb-5); text-align: center; color: #1C1A17; }
.tb-news-cta h2 { color: #1C1A17; }
.tb-news-cta p { color: #3A2E12; max-width: 560px; margin-inline: auto; }
.tb-form { display: flex; gap: var(--tb-2); max-width: 460px; margin: var(--tb-4) auto 0; flex-wrap: wrap; }
.tb-form input[type="email"] { flex: 1 1 220px; min-width: 0; padding: 12px var(--tb-4); border-radius: var(--tb-radius-sm); border: 1px solid rgba(28,26,23,.25); font-family: var(--tb-body); font-size: 16px; background: #fff; color: #1C1A17; }
.tb-form .tb-btn { background: #1C1A17; color: #FBBF24; flex: 0 0 auto; }
.tb-form .tb-btn:hover { background: #000; color: var(--tb-accent); }
.tb-form__note { font-size: 13px; color: #3A2E12; margin-top: var(--tb-3); }

.tb-footer { background: #161513; color: #A79E90; padding-block: var(--tb-8) var(--tb-5); margin-top: var(--tb-9); }
.tb-footer h3 { color: #F5F1EA; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--tb-4); }
.tb-footer a { color: #A79E90; }
.tb-footer a:hover { color: var(--tb-accent); }
.tb-footer ul { list-style: none; margin: 0; padding: 0; }
.tb-footer li { margin-bottom: var(--tb-2); font-size: 15px; }
.tb-footer__grid { display: grid; gap: var(--tb-6); grid-template-columns: minmax(0,1fr); }
@media (min-width: 700px)  { .tb-footer__grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .tb-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.tb-footer__brand .tb-logo { color: #F5F1EA; font-size: 24px; }
.tb-footer__brand .tb-logo__b { color: var(--tb-accent); }
.tb-footer__blurb { font-size: 15px; margin: var(--tb-3) 0 var(--tb-4); max-width: 34ch; }
.tb-footer__bottom { border-top: 1px solid #38322B; margin-top: var(--tb-7); padding-top: var(--tb-5); font-size: 13px; display: flex; justify-content: space-between; gap: var(--tb-4); flex-wrap: wrap; }
.tb-footer__disclaimer { max-width: 62ch; color: #8C8377; }
.tb-social { display: flex; gap: var(--tb-2); }
.tb-social a { width: 36px; height: 36px; border-radius: var(--tb-radius-sm); border: 1px solid #38322B; display: grid; place-items: center; }
.tb-social a:hover { border-color: var(--tb-accent); }

.tb-pagination { display: flex; gap: var(--tb-2); justify-content: center; margin-top: var(--tb-7); flex-wrap: wrap; }
.tb-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 var(--tb-3); border-radius: var(--tb-radius-sm); border: 1px solid var(--tb-border); background: var(--tb-card); font-weight: 600; color: var(--tb-text); }
.tb-pagination .page-numbers:hover { border-color: var(--tb-brand); text-decoration: none; }
.tb-pagination .page-numbers.current { background: var(--tb-brand); border-color: var(--tb-brand); color: #1C1A17; }

.tb-archive-head { padding-block: var(--tb-7) var(--tb-5); border-bottom: 1px solid var(--tb-border); margin-bottom: var(--tb-6); }
.tb-archive-head__desc { font-size: 18px; color: var(--tb-muted); max-width: 70ch; margin-top: var(--tb-2); }
.tb-subcats { display: flex; flex-wrap: wrap; gap: var(--tb-2); margin-top: var(--tb-4); }

.tb-breadcrumb { font-size: 13px; color: var(--tb-muted); padding-block: var(--tb-4) 0; }
.tb-breadcrumb a { color: var(--tb-muted); }
.tb-breadcrumb a:hover { color: var(--tb-brand-deep); }
.tb-breadcrumb span[aria-current] { color: var(--tb-text); }

.tb-empty { text-align: center; padding: var(--tb-8) var(--tb-4); color: var(--tb-muted); }
.tb-404 { text-align: center; padding-block: var(--tb-9); }
.tb-404__code { font-family: var(--tb-display); font-size: clamp(72px, 16vw, 140px); line-height: 1; color: var(--tb-brand); margin: 0; }

.tb-disclosure-inline { font-size: 14px; color: var(--tb-muted); border-left: 3px solid var(--tb-border); padding-left: var(--tb-3); margin: var(--tb-4) 0; }

@media print {
  .tb-header, .tb-topbar, .tb-footer, .tb-sidebar, .tb-news-cta, .tb-mobilenav { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Calculators
   ========================================================================== */

.tb-calc { margin: var(--tb-5) 0 var(--tb-6); }
.tb-calc__grid { display: grid; gap: var(--tb-4); grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 640px) { .tb-calc__grid { grid-template-columns: minmax(0,1fr); } }

.tb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tb-field > span { font-family: var(--tb-display); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tb-muted); }
.tb-field input, .tb-field select {
  width: 100%; min-width: 0; padding: 11px var(--tb-3);
  border: 1px solid var(--tb-border); border-radius: var(--tb-radius-sm);
  background: var(--tb-card); color: var(--tb-text);
  font-family: var(--tb-mono); font-size: 16px; font-variant-numeric: tabular-nums;
}
.tb-field input:focus, .tb-field select:focus { border-color: var(--tb-brand); }
.tb-field__row { display: flex; gap: var(--tb-2); min-width: 0; }
.tb-field__row input { flex: 1 1 auto; }
/* flex-basis auto + shrink allowed: flex-shrink:0 here would beat min-width:0
   and push the unit dropdown out of the field on narrow screens. */
.tb-field__row select { flex: 0 1 110px; }

.tb-result {
  margin-top: var(--tb-5); padding: var(--tb-5);
  background: #161513; color: #F5F1EA;
  border-radius: var(--tb-radius-lg);
}
.tb-result__label { font-family: var(--tb-display); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tb-accent); margin: 0 0 var(--tb-2); }
.tb-result__big { font-family: var(--tb-display); font-size: clamp(36px, 7vw, 56px); font-weight: 800; line-height: 1; margin: 0 0 var(--tb-4); color: var(--tb-accent); letter-spacing: -0.02em; }
.tb-result__row { display: grid; grid-template-columns: 1fr auto; gap: 10px var(--tb-4); font-size: 15px; border-top: 1px solid #38322B; padding-top: var(--tb-4); }
.tb-result__row > span:nth-child(odd) { color: #A79E90; }
.tb-result__row > span:nth-child(even) { text-align: right; font-weight: 600; }
.tb-result .tb-stale { color: #8C8377; margin: var(--tb-4) 0 0; }
