/* ==========================================================================
   theme-light.css — the single authoritative light theme.
   Loaded last, after site.css, home.css, fonts.css and fixes.css.

   Replaces the 22 stacked override sections that were fighting each other.
   Order inside this file is deliberate: tokens -> surfaces -> type -> tables
   -> controls -> composition. Nothing here needs !important.
   ========================================================================== */

/* ── 1. tokens ------------------------------------------------------------ */
:root[data-theme=light]{
  color-scheme: light;

  /* surfaces: warm ivory */
  --bg:#F4F1E9;
  --bg2:#EAE5D9;
  --grad-a:#F7F4ED;
  --grad-b:#EFEADD;
  --panel:#FFFDF8;
  --panel2:#FFFFFF;
  --hover:#F3EFE6;

  /* ink */
  --text:#101620;
  --muted:#39424F;
  --dim:#4C5663;

  /* accent: two roles, two values */
  --gold:#8A5F00;         /* text on light */
  --gold2:#6F4C00;
  --gold-ink:#8A5F00;
  --gold-fill:#C9A227;    /* button surface */
  --gold-fill-2:#E2C05E;
  --gold-glow:rgba(201,162,39,.18);

  /* edges: warm, visible */
  --line:rgba(30,32,26,.16);
  --line2:rgba(30,32,26,.30);
  --rule:#DBD3C2;
  --ctl:#C6BCA7;

  --ok:#0B0B0C;
  --warn:#8A5F00;
  --bad:#6E4A00;
  --fut:#101620;
  --fx:#8A5F00;

  --shadow:0 1px 2px rgba(20,28,45,.06),0 6px 16px rgba(20,28,45,.05);
}

/* ── 2. page ground ------------------------------------------------------- */
:root[data-theme=light] body{
  background:
    radial-gradient(70vmax 50vmax at 8% -10%, rgba(240,190,85,.10), transparent 62%),
    linear-gradient(160deg,#F7F4ED 0%,#EFEADD 100%) fixed,
    #F4F1E9;
  color:var(--text);
  font-size:19px;
}

/* ── 3. headings and labels ----------------------------------------------- */
:root[data-theme=light] h1,
:root[data-theme=light] h2,
:root[data-theme=light] h3,
:root[data-theme=light] .sec-head h2{color:var(--text)}
:root[data-theme=light] .sec-head h2{position:relative;padding-bottom:10px}
:root[data-theme=light] .sec-head h2:after{
  content:"";position:absolute;left:0;bottom:0;width:44px;height:3px;border-radius:3px;
  background:linear-gradient(90deg,#F0BE55,#C9A227);
}
:root[data-theme=light] .eyebrow{color:var(--gold)}
:root[data-theme=light] .meta,
:root[data-theme=light] .note,
:root[data-theme=light] small,
:root[data-theme=light] .ctable td small{color:var(--muted)}

/* ── 4. cards ------------------------------------------------------------- */
:root[data-theme=light] .card,
:root[data-theme=light] .panel,
:root[data-theme=light] .box{
  background:var(--panel);
  border:1px solid var(--rule);
  box-shadow:var(--shadow);
  border-radius:14px;
}
:root[data-theme=light] .card:hover{
  border-color:#E0C084;
  box-shadow:0 2px 4px rgba(20,28,45,.07),0 14px 30px rgba(20,28,45,.10);
}

/* ── 5. tables: the homepage .ft and the firm-page .ctable ---------------- */
:root[data-theme=light] .ft,
:root[data-theme=light] .ctable{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  font-size:15px;
}
:root[data-theme=light] .ft th,
:root[data-theme=light] .ctable th{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.05em;
  white-space:normal;
  vertical-align:bottom;
  background:#F2EDE1;
  color:#2A2A22;
  border-bottom:1px solid var(--rule);
  padding:10px;
}
:root[data-theme=light] .ft td,
:root[data-theme=light] .ctable td{
  padding:12px 10px;
  border-bottom:1px solid #E8E2D3;
  vertical-align:top;
  font-size:15px;
}
:root[data-theme=light] .ft tbody tr:nth-child(even),
:root[data-theme=light] .ctable tbody tr:nth-child(even){background:#FBF8F1}
:root[data-theme=light] .ft tbody tr:hover,
:root[data-theme=light] .ctable tbody tr:hover{background:#F5EFE0}
:root[data-theme=light] .ctable th[scope=row]{color:var(--muted);font-weight:600}

/* frame */
:root[data-theme=light] .ctable-wrap,
:root[data-theme=light] #firmTable{
  background:#fff;
  border:1px solid var(--rule);
  border-top:2px solid #E9C071;
  border-radius:12px;
  overflow:hidden;
}

/* keep the last column inside the card */
:root[data-theme=light] .ft td:last-child,
:root[data-theme=light] .ctable td:last-child{padding-right:16px}

/* CTAs inside data grids must not outweigh the data */
:root[data-theme=light] .ft .btn,
:root[data-theme=light] .ctable .btn,
:root[data-theme=light] .acts .btn{
  padding:6px 11px;
  font-size:13px;
  min-height:0;
  border-radius:8px;
}
:root[data-theme=light] .ft .tag,
:root[data-theme=light] .ctable .tag{font-size:10px;padding:2px 5px}

/* ── 6. controls ---------------------------------------------------------- */
:root[data-theme=light] .btn.gold{
  background:linear-gradient(180deg,#E2C05E 0%,#C9A227 55%,#B08E1E 100%);
  border:1px solid #B08E1E;
  color:#1A1405;
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 2px 8px rgba(160,120,20,.25);
}
:root[data-theme=light] .btn.gold:hover{
  background:linear-gradient(180deg,#EBCE74 0%,#D4AC2E 55%,#BA961F 100%);
}
:root[data-theme=light] .btn:not(.gold){
  background:#fff;
  border:1px solid var(--ctl);
  color:#141A26;
}
:root[data-theme=light] .btn:not(.gold):hover{border-color:#8C95A3;background:#F6F2E8}
:root[data-theme=light] input,
:root[data-theme=light] select,
:root[data-theme=light] textarea{
  background:#fff;border:1px solid var(--ctl);color:var(--text);
}

/* ── 7. composition: bands, footer, hero ---------------------------------- */
:root[data-theme=light] .band.alt{
  background:#F7F4ED;
  border-block:1px solid #E4DCCC;
  color:var(--text);
}
:root[data-theme=light] .band.alt .card{background:#fff}

:root[data-theme=light] .site-foot{
  background:linear-gradient(180deg,#0C1726,#08101A);
  border-top:1px solid rgba(201,162,39,.25);
  color:#F7F3EA;
  --text:#F7F3EA;
  --muted:#C6CBD3;
  --panel:#0F1A27;
  --line:rgba(255,255,255,.12);
  --gold:#D9B04A;
  --gold-ink:#D9B04A;
}
:root[data-theme=light] .site-foot a{color:#D7DBE1}
:root[data-theme=light] .site-foot a:hover{color:#D9B04A}
:root[data-theme=light] .site-foot .nl-h,
:root[data-theme=light] .site-foot .foot-h{color:#F7F3EA}

/* hero: no stretching, no internal gaps */
:root[data-theme=light] .hpair{align-items:start}
:root[data-theme=light] .hpair>*{height:auto}
:root[data-theme=light] .hpair .card{justify-content:flex-start;height:auto}

/* guide thumbnails: nothing over the image */
:root[data-theme=light] .guide-card .img img{opacity:1;filter:none;mix-blend-mode:normal}
:root[data-theme=light] .guide-card .img::before,
:root[data-theme=light] .guide-card .img::after{content:none;display:none}

/* ── 8. phones ------------------------------------------------------------ */
@media (max-width:767px){
  :root[data-theme=light] body{font-size:18px}
  :root[data-theme=light] .ft td,
  :root[data-theme=light] .ctable td,
  :root[data-theme=light] .ft th,
  :root[data-theme=light] .ctable th{font-size:14px;padding:10px 8px}
  :root[data-theme=light] .sizes-table th:nth-child(3),
  :root[data-theme=light] .sizes-table td:nth-child(3),
  :root[data-theme=light] .sizes-table th:nth-child(4),
  :root[data-theme=light] .sizes-table td:nth-child(4),
  :root[data-theme=light] .sizes-table th:nth-child(5),
  :root[data-theme=light] .sizes-table td:nth-child(5),
  :root[data-theme=light] .sizes-table th:nth-child(7),
  :root[data-theme=light] .sizes-table td:nth-child(7),
  :root[data-theme=light] .sizes-table th:nth-child(8),
  :root[data-theme=light] .sizes-table td:nth-child(8){display:none}
}

/* ── 9. hero cards: no vertical gap --------------------------------------
   .bt is a flex column with space-between, so the score row is pushed to the
   bottom of the card and the slack shows as a gap under the subtitle.
   -------------------------------------------------------------------------- */
:root[data-theme=light] .bt{
  justify-content:flex-start;
  gap:14px;
  height:auto;
}
:root[data-theme=light] .bt-top,
:root[data-theme=light] .bt-score,
:root[data-theme=light] .bt-tools{flex:0 0 auto}
:root[data-theme=light] .bt-score{margin-top:0}

/* ── 10. Prop Guard: make the score bars honest --------------------------
   The rows render as .score with an inner fill at --w%. Without a visible
   track, 18/20 looks identical to 20/20. Give the track a surface so the
   shortfall is legible.
   -------------------------------------------------------------------------- */
:root[data-theme=light] .score{
  position:relative;
  height:6px;
  border-radius:99px;
  background:#E7E0D0;
  overflow:hidden;
}
:root[data-theme=light] .score i,
:root[data-theme=light] .score i:before{
  background:linear-gradient(90deg,#C9A227,#E2C05E);
  border-radius:99px;
}

/* destructive action, demoted to a quiet text link */
:root[data-theme=light] .danger-link{
  background:none;
  border:0;
  padding:0 4px;
  font:inherit;
  font-size:13px;
  color:var(--muted);
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
:root[data-theme=light] .danger-link:hover{color:#9A3412;text-decoration-color:#9A3412}

/* grouped stat grid */
:root[data-theme=light] .stats-grouped{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px;
  background:var(--rule);
  border:1px solid var(--rule);
  border-radius:12px;
  overflow:hidden;
}
:root[data-theme=light] .stats-grouped .stat-group{
  grid-column:1 / -1;
  background:#F2EDE1;
  padding:8px 14px;
  font-size:11.5px;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:#4A4433;
  font-weight:600;
}
:root[data-theme=light] .stats-grouped>*:not(.stat-group){
  background:#FFFDF8;
  padding:14px;
}
@media (max-width:767px){
  :root[data-theme=light] .stats-grouped{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ── 11. Prop Guard: the real bar markup --------------------------------
   The rows are .g-meter > .g-meter-h + .g-track > i (width%), so the earlier
   .score rules never matched and every bar read as full length.
   -------------------------------------------------------------------------- */
:root[data-theme=light] .g-track{
  position:relative;
  height:7px;
  border-radius:99px;
  background:#E5DDCB;
  overflow:hidden;
}
:root[data-theme=light] .g-track i{
  display:block;
  height:100%;
  border-radius:99px;
  background:linear-gradient(90deg,#C9A227,#E2C05E);
}
:root[data-theme=light] .g-track i.bad,
:root[data-theme=light] .g-track i.danger{background:linear-gradient(90deg,#B3261E,#D8564B)}

/* ── 12. deals freshness banner ----------------------------------------- */
:root[data-theme=light] .freshness{
  margin:0 0 18px;
  padding:12px 16px;
  border-radius:12px;
  border:1px solid var(--rule);
  background:#F7F4ED;
  color:var(--muted);
  font-size:15px;
}
:root[data-theme=light] .freshness.is-stale{
  border-color:#E0B979;
  background:#FDF3DF;
  color:#6E4A00;
  font-weight:600;
}
