:root{
  --bg:#0b0f14;
  --card:#121a23;
  --text:#e7eef7;
  --muted:#9bb0c4;
  --line:#243241;

  --gold:#d8b15a;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
  color:var(--text);
  background:var(--bg)
}
.wrap{max-width:820px;margin:0 auto;padding:16px}
.top{display:flex;align-items:center;justify-content:space-between}

h1{margin:0;font-size:28px;letter-spacing:.5px}
.sub{margin:6px 0 0;color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px}
.row{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.smallrow{margin-top:-6px}
.label{color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.dot{opacity:.6;margin:0 8px}

.brand{display:flex;align-items:center;gap:14px}
.nav{display:flex;gap:10px;align-items:center}

.brandlink{color:var(--text);text-decoration:none}

:root{
  --ok:#1f6f3a;
  --bad:#ff3b30;
}

/* thicker border so it reads as a “status” */
.stat{ border-width:2px; }

/* Always-on (Σ + Shape) */
.stat[data-card="SUM"],
.stat[data-card="SH"]{
  border-color: var(--ok);
  box-shadow: 0 0 0 3px rgba(31,111,58,.14);
}

/* Locked hints (default red) */
.stat[data-card="POS"],
.stat[data-card="P"],
.stat[data-card="U"],
.stat[data-card="SSQ"]{
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(255,59,48,.12);
}

/* After reveal (turn green) */
.stat.revealed{
  border-color: var(--ok) !important;
  box-shadow: 0 0 0 3px rgba(31,111,58,.14) !important;
}


.stats{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:12px 0 16px}
@media (max-width: 720px){ .stats{grid-template-columns:repeat(3,1fr)} }

.stat{border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center}
.k{font-weight:800}
.v{font-size:20px;margin-top:4px}
.hint{color:var(--muted);font-size:12px;margin-top:6px}

.inputRow{display:flex;gap:10px}
input{
  flex:1;border-radius:12px;border:1px solid var(--line);
  padding:12px;font-size:16px;background:#0f151d;color:var(--text)
}
button{
  border-radius:12px;border:1px solid var(--line);
  padding:12px 14px;background:#1b2a3a;color:var(--text);
  cursor:pointer
}
button.ghost{background:transparent}
button:disabled{opacity:.5;cursor:not-allowed}

.msg{min-height:22px;color:var(--muted);margin:10px 2px;white-space:pre-wrap}
.board{display:flex;flex-direction:column;gap:10px;margin-top:10px}

.turn{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.tiles{display:flex;gap:8px;justify-content:center}
.tile{
  width:40px;height:40px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;
  border:1px solid var(--line);
  font-weight:900;
  font-size:18px;
  user-select:none;
}




/* tile colour changes (brighter green + much brighter yellow, consistent everywhere) */
.tile.g{ background:#218448; border-color:#218448; }  /* was #1f6f3a */
.tile.y{ background:#e0c63a; border-color:#e0c63a; }  /* brighter yellow */

.miniTile.g{ background:#218448; border-color:#218448; }
.miniTile.y{ background:#e0c63a; border-color:#e0c63a; }

.fp .ok{ background:rgba(33,132,72,.30); border-color:#218448; }
.fp .high{ background:rgba(224,198,58,.32); border-color:#e0c63a; }




.tile.b{background:#0f151d;border-color:var(--line)}

/* ONE-LINE feedback */
.fp{
  margin-top:10px;
  display:flex;
  justify-content:center;
  gap:10px;
  font-size:14px;
  white-space:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:2px;
}
.fp::-webkit-scrollbar{height:6px}
.fp .fpt{
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 8px;
  color:var(--text);
}
.fp .ok{background:rgba(31,111,58,.30);border-color:#1f6f3a}
.fp .low{background:rgba(60,90,140,.28);border-color:rgba(60,90,140,.9)}
.fp .high{background:rgba(122,106,30,.30);border-color:#7a6a1e}
.fp .bad{background:rgba(160,60,60,.28);border-color:rgba(160,60,60,.9)}

.actions{display:flex;gap:10px;margin-top:12px}
dialog{border:none;border-radius:14px;max-width:680px;width:92%}
.dlg{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:16px}

.toast{
  position:fixed;
  left:50%;
  top:18px;
  transform:translateX(-50%);
  background:#1b2a3a;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 14px;
  font-weight:800;
  z-index:9999;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.fx{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  pointer-events:none;
  z-index:9998;
}

/* Mobile: scroll history inside card + keep input visible */
@media (max-width: 520px){
  .wrap{padding:12px}
  .card{padding:12px}

  .board{
    max-height: 46vh;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 10px;
  }

  .inputRow{
    position: sticky;
    bottom: 10px;
    z-index: 50;
    background: var(--card);
    padding: 10px 0 4px;
    flex-direction:column;
  }
  .inputRow input, .inputRow button{width:100%}

   
  .inputRow input{ padding: calc(12px * .80); }
  .inputRow button{ padding: calc(12px * .80) calc(14px * .80); }


  .actions{flex-direction:column}
  .actions button{width:100%}

  .tile{width:41px;height:41px;font-size:19px}
  .fp{font-size:12px;gap:7px}
  .fp .fpt{padding:4px 6px}
}

/* On-screen number pad */
.pad{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)); /* keep 1–6 on one row */
  gap: 10px;
}

/* tighten spacing on phones */
@media (max-width: 520px){
  .pad{ gap: 8px; }
}
@media (max-width: 380px){
  .pad{ gap: 6px; }
}

.padbtn{
  padding: 12px 0;
  font-size: 17px;
  font-weight: 800;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0f151d;
  color: var(--text);
}

/* tighten buttons on smaller phones */
@media (max-width: 520px){
  .padbtn{ padding: 11px 0; font-size: 16px; border-radius: 12px; }
}
@media (max-width: 380px){
  .padbtn{ padding: 10px 0; font-size: 15px; border-radius: 12px; }
}

/* LAST resort only (tiny screens) */
@media (max-width: 340px){
  .pad{ grid-template-columns: repeat(3, 1fr); }
}

/* Hide pad only on mouse/trackpad devices (not touch tablets) */
@media (min-width: 900px) and (hover:hover) and (pointer:fine){
  .pad{ display:none; }
}


/* Archive list */
.archList{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:10px}
@media (max-width: 720px){ .archList{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 420px){ .archList{grid-template-columns:1fr} }
.archItem{
  display:block;
  text-decoration:none;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:#0f151d;
}
.archItem:hover{border-color:#3a4b5d}

/* Ads */
.adwrap{margin:12px 0;min-height:90px}
@media (max-width: 520px){ .adwrap{ min-height: 60px; } }
.adwrap ins{background:transparent}

/* Footer */
.footer{padding-top:6px;padding-bottom:24px}
.footlinks{display:flex;gap:10px;align-items:center;color:var(--muted)}
.footlinks a{color:var(--muted);text-decoration:none}
.footlinks a:hover{color:var(--text)}
.sep{opacity:.6}
.fineprint{margin-top:8px;color:var(--muted);font-size:12px}

/* Privacy prose */
.prose h2{margin-top:0}
.prose p{color:var(--text);opacity:.92;line-height:1.45}
.muted{color:var(--muted)}

/* Consent */
.consent{
  position:fixed;
  inset:auto 0 0 0;
  padding:12px;
  z-index:10000;
}
.consentCard{
  max-width:820px;
  margin:0 auto;
  background:rgba(18,26,35,.96);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  backdrop-filter: blur(6px);
}
.consentText{max-width:560px}
.consentBtns{display:flex;gap:10px}
@media (max-width:520px){
  .consentCard{flex-direction:column;align-items:stretch}
  .consentBtns button{width:100%}
  .consentBtns{flex-direction:column}
}

/* Share dialog close X */
.dlg{ position: relative; }
.dlgX{
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.dlgX:hover{ opacity: 1; }

/* Menu dialog */
.menuDlg{border:none;padding:0;margin:0;background:transparent}
.menuDlg::backdrop{
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.menuPanel{
  position: fixed;
  top: 72px;
  right: max(16px, calc((100vw - 820px)/2 + 16px));
  left: auto;
  margin: 0;

  width: min(420px, calc(100vw - 32px));
  background: rgba(18,26,35,.98);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);

  transform-origin: top right;
  animation: menuDrop .14s ease-out;
}
@keyframes menuDrop{
  from{ transform: translateY(-6px) scale(.98); opacity:.0; }
  to{ transform: translateY(0) scale(1); opacity:1; }
}
.menuHead{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.menuTitle{ font-weight:900; }
.menuList{display:flex;flex-direction:column;gap:10px}
.menuLink{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
}
.menuLink:hover{background: rgba(255,255,255,.06);border-color:#3a4b5d}
.menuLink.active{
  border-color:#ff3b30;
  box-shadow: 0 0 0 3px rgba(255,59,48,.18);
}
.mi{ width:20px; text-align:center; opacity:.9; }

/* Theme row */
.menuRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.03);
}
.menuRowLeft{ display:flex; align-items:center; gap:10px; }

/* Switch */
.switch{ position:relative; display:inline-block; width:52px; height:30px; }
.switch input{ opacity:0; width:0; height:0; }
.slider{
  position:absolute; cursor:pointer;
  inset:0;
  background:#121a23;
  border:1px solid var(--line);
  border-radius:999px;
  transition:.18s;
}
.slider:before{
  content:"";
  position:absolute;
  height:22px; width:22px;
  left:4px; top:3px;
  background:#e7eef7;
  border-radius:999px;
  transition:.18s;
}
.switch input:checked + .slider{
  background: rgba(60,90,140,.38);
  border-color: rgba(60,90,140,.9);
}
.switch input:checked + .slider:before{
  transform: translateX(22px);
}

/* Light theme */
:root[data-theme="light"]{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0b0f14;
  --muted:#435565;
  --line:#d2dbe5;
}

/* Make common surfaces look right in light mode */
:root[data-theme="light"] input,
:root[data-theme="light"] .padbtn,
:root[data-theme="light"] .tile.b{
  background:#f0f3f7;
  color:var(--text);
}
:root[data-theme="light"] button{
  background:#e7eef7;
  color:var(--text);
}
:root[data-theme="light"] .menuPanel{ background: rgba(255,255,255,.98); }
:root[data-theme="light"] .menuLink,
:root[data-theme="light"] .menuRow{ background: rgba(11,15,20,.03); }
:root[data-theme="light"] .slider{
  background:#f0f3f7;
  border-color: var(--line);
}
:root[data-theme="light"] .slider:before{ background:#0b0f14; }

/* Consent in light mode */
:root[data-theme="light"] .consentCard{
  background: rgba(255,255,255,.96);
}

/* Optional: keep the menu under the header on tiny screens */
@media (max-width: 520px){
  .menuPanel{ top: 64px; }
}

/* Fix menu text contrast */
.menuPanel, .menuPanel *{ color: var(--text); }
.menuRow span{ color: var(--text); }

/* About page CTA buttons */
.seg{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-weight: 900;
}
.seg:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}
.seg.on{
  border-color: rgba(216,177,90,.95);
  box-shadow: 0 0 0 3px rgba(216,177,90,.18);
}
:root[data-theme="light"] .seg{
  background: rgba(11,15,20,.03);
}


/* ============================
   PRIVACY HEADER TEST LAYOUT
   ============================ */

.brandH1{ margin:0; letter-spacing:0; }
.brandlink{
  display:flex;
  align-items:center;
  gap:10px;
}
.brandMark{ width:28px; height:28px; }


.brandName{
  font-size:22px;
  font-weight:900;
  letter-spacing:.2px;
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
}

/* right controls */
.pillbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:36px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:800;
}
.pillbtn:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}

.iconbtn{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
  padding:0;
  cursor:pointer;
}
.iconbtn:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}
.iconbtn:focus-visible,
.pillbtn:focus-visible{
  outline: 3px solid rgba(216,177,90,.25);
  outline-offset: 3px;
}

/* Info button: italic/bold "i" + gold outline (both themes) */
.infoBtn{
  border:2px solid var(--gold);
}
.infoBtn:hover{
  filter: brightness(1.02);
}
.iGlyph{
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  transform: translateY(-1px);
}

/* Hamburger glyph sizing */
.hambars{
  font-size: 20px;
  line-height: 1;
}

/* Make the header a bit tighter on small screens */
@media (max-width: 520px){
  .brandName{ font-size:20px; }
  .pillbtn{ height:34px; }
  .iconbtn{ width:34px; height:34px; }
  .brandMark{ width:27px; height:27px; }
}

}

/* ===== Mode selector (Easy / Medium / Hard) ===== */
.modeSeg{
  display:inline-flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.seg{
  min-width:44px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-weight:800;
  cursor:pointer;
  text-decoration:none; /* covers <a class="seg"> too */
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.seg:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}

.seg.on{
  background:#1b2a3a;
  border-color:#3a4b5d;
}

/* Light theme tweaks */
:root[data-theme="light"] .seg{
  background: rgba(11,15,20,.03);
}

:root[data-theme="light"] .seg.on{
  background:#e7eef7;
}


/* Light theme: archive date tiles should not be dark */
:root[data-theme="light"] .archItem{
  background:#f0f3f7;
  color:var(--text);
  border-color:var(--line);
}

:root[data-theme="light"] .archItem:hover{
  background:#e7eef7;
  border-color:#b7c3cf;
}

/* Puzzle row: keep label left, date+mode hard right */
.row.puzzleRow{
  align-items:flex-start;
}

.puzzleMetaStack{
  margin-left:auto;            /* forces it to the far right */
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  text-align:right;
  gap:8px;
}

.monoDate{
  white-space:nowrap;
}

/* mode buttons sit under date, right-aligned */
.puzzleMetaStack .modeSeg{
  justify-content:flex-end;
  flex-wrap:wrap;
}



/* Puzzle row layout: keep mode inline, date pinned right */
.puzzleMeta{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;                 /* take the remaining row width */
  justify-content:flex-end;
  flex-wrap:wrap;         /* safe on small screens */
}

.modeSeg{
  display:inline-flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.monoDate{
  margin-left:auto;       /* pushes date to the far right */
  white-space:nowrap;
}





/* ============================
   HOME: SCROLL TUTORIAL + ABOUT
   ============================ */

:root{
  --cBlue: 76,142,255;
  --cGreen: 31,111,58;
  --cGold: 216,177,90;
  --cRed: 255,59,48;
}

.learnTitleRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.learnKicker{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.learnGrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width: 720px){
  .learnGrid{ grid-template-columns: 1fr; }
}

.learnStep{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(255,255,255,.03);
  position:relative;
  overflow:hidden;
}
:root[data-theme="light"] .learnStep{
  background: rgba(11,15,20,.03);
}

.learnStep::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  border-radius:14px 0 0 14px;
  background: rgba(var(--cBlue), .9);
}
.learnStep.s2::before{ background: rgba(var(--cGold), .95); }
.learnStep.s3::before{ background: rgba(var(--cGreen), .9); }

.learnH3{
  margin:0 0 6px;
  font-size:16px;
}
.learnP{
  margin:0;
  color:var(--muted);
  line-height:1.4;
}

.chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.03);
  font-weight:800;
  font-size:13px;
}
:root[data-theme="light"] .chip{ background: rgba(11,15,20,.03); }

.miniTiles{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin:10px 0;
}
.miniTile{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--line);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:16px;
  user-select:none;
}
.miniTile.g{ background:#1f6f3a; border-color:#1f6f3a; }
.miniTile.y{ background:#7a6a1e; border-color:#7a6a1e; }
.miniTile.b{ background:#0f151d; border-color:var(--line); }
:root[data-theme="light"] .miniTile.b{ background:#f0f3f7; }

.learnExample{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(255,255,255,.02);
}
:root[data-theme="light"] .learnExample{
  background: rgba(11,15,20,.02);
}

.learnExample .mono{
  display:block;
  white-space:pre-wrap;
  line-height:1.35;
  color:var(--text);
}

.learnCTA{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  align-items:center;
}
.learnCTA .muted{ margin:0; }

.aboutMini{
  display:flex;
  gap:12px;
  flex-direction:column;
}
.aboutMiniTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.aboutMini .muted{ line-height:1.45; }

/* Make Shape symbols (>, <, =) pop */
.shapeSym{
  font-weight: 1000;
  font-size: 1.25em;
  letter-spacing: 0.06em;
  display: inline-block;
  transform: translateY(-0.02em);
}

/* tighter guess */

.board{display:flex;flex-direction:column;gap:10px;margin-top:10px}

.turn{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.tiles{display:flex;gap:8px;justify-content:center}

.tile{
  width:40px;height:40px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;
  border:1px solid var(--line);
  font-weight:900;
  font-size:18px;
  user-select:none;
}



/* Extra punch inside mono blocks */
.mono .shapeSym{
  font-size: 1.35em;
}

/* Optional: make the whole Shape result stand out */
.shapeResult{
  font-weight: 1000;
  font-size: 1.35em;
  letter-spacing: 0.10em;
}

/* Tighten fingerprint cards on phones */
@media (max-width: 520px){
  .stats{
    gap: 8px;              /* was 10px */
    margin: 10px 0 12px;   /* was 12px 0 16px */
  }

  .stat{
    padding: 8px;          /* was 10px */
    border-radius: 12px;   /* keep */
  }

  .stat .k{
    font-size: 15px;
  }

  .stat .v{
    font-size: 18px;       /* was 20px */
    margin-top: 3px;       /* was 4px */
  }

  .stat .hint{
    font-size: 11px;       /* was 12px */
    margin-top: 4px;       /* was 6px */
    line-height: 1.15;
    white-space: nowrap;   /* helps keep "sum of squares" on one line */
  }

  /* Extra nudge just for the long label */
  .stat[data-card="SSQ"] .hint{
    font-size: 10.5px;
    letter-spacing: -0.2px;
  }
}




/* FINAL OVERRIDE: make board tiles + example mini tiles identical */
:root{
  --ngGreen:#218448;
  --ngYellow:#e0c63a;
}

.tile.g, .miniTile.g{
  background: var(--ngGreen) !important;
  border-color: var(--ngGreen) !important;
}

.tile.y, .miniTile.y{
  background: var(--ngYellow) !important;
  border-color: var(--ngYellow) !important;
}

/* Fingerprint pills match too */
.fp .ok{
  background: rgba(33,132,72,.30) !important;
  border-color: var(--ngGreen) !important;
}
.fp .high{
  background: rgba(224,198,58,.32) !important;
  border-color: var(--ngYellow) !important;
}


/* Smaller ad placeholder (only grows when an ad actually renders) */
.adwrap{
  min-height: 40px !important;     /* was 90px */
  margin: 10px 0 !important;
}

.adwrap ins{
  display:block;
  min-height: 40px;               /* keep a small slot */
  max-height: 120px;              /* stops huge empty gaps */
  overflow:hidden;
}

/* Mobile even tighter */
@media (max-width:520px){
  .adwrap{ min-height: 28px !important; }
  .adwrap ins{ min-height: 28px; max-height: 100px; }
}

/* feedback row layout */
.fp{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  padding-left:0 !important;
}

/* =========================
   LINK CONTRAST IMPROVEMENTS
   (single set for both themes)
   ========================= */

/* 1) Make normal text links brighter + clearly link-like */
a{
  color: rgba(var(--cBlue), .95);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover{
  color: rgba(var(--cBlue), 1);
}

/* Don’t underline “button-like” links */
.seg, .pillbtn, .menuLink, .archItem, .chip{
  text-decoration: none !important;
}

/* 2) Make the Strategy “section chips” readable (white/black text) */
.chip{
  color: var(--text) !important;                 /* stops “blue link text” */
  border-color: rgba(var(--cBlue), .55);
  background: rgba(var(--cBlue), .14);
}
.chip:hover{
  border-color: rgba(var(--cBlue), .95);
  background: rgba(var(--cBlue), .20);
}

/* Nice keyboard focus */
.chip:focus-visible, a:focus-visible{
  outline: 3px solid rgba(var(--cGold), .25);
  outline-offset: 3px;
  border-radius: 999px;
}




/* =========================
   FOOTER WRAP FIX
   ========================= */

/* wrap between links, not inside link text */
.footlinks{
  flex-wrap: wrap;
  row-gap: 6px;
  justify-content: center; /* optional: looks nicer on mobile */
}

/* keep “How to play” / “About/Support” on one line */
.footlinks a{
  white-space: nowrap;
}

/* on small screens, remove the dot separators so they don’t land awkwardly */
@media (max-width:520px){
  .footlinks{ gap: 14px; }
  .footlinks .sep{ display:none; }
}


/* Toast ("Boom!") theme fix */
:root{
  --toastBg: rgba(0,0,0,.78);
  --toastFg: rgba(255,255,255,.95);
  --toastBd: rgba(255,255,255,.14);
}
:root[data-theme="light"]{
  --toastBg: rgba(255,255,255,.92);
  --toastFg: #0b0f14;
  --toastBd: rgba(11,15,20,.14);
}

.toast{
  background: var(--toastBg);
  color: var(--toastFg);
  border: 1px solid var(--toastBd);
}

/* Shape value should never wrap */
.stat[data-card="SH"] .v{ white-space: nowrap; }

