/* =====================================================================
   The Spelling Bee — stylesheet
   Palette + honeycomb identity, light/dark themes, responsive, a11y.
   ===================================================================== */

:root {
  /* Brand */
  --honey:        #FFD000;
  --honey-bright: #FFE14D;
  --honey-deep:   #F7A400;
  --honey-soft:   #FFF3C9;

  /* Light theme surfaces & ink */
  --bg:        #ffffff;
  --bg-alt:    #F5F7FB;
  --bg-band:   #FFE9A8;
  --surface:   #ffffff;
  --surface-2: #f7f7f5;
  --ink:       #1b1b1b;
  --ink-soft:  #5d5d63;
  --ink-faint: #8a8a90;
  --line:      #eceae3;
  --line-2:    #e2e0d8;

  /* Hive */
  --hex:        #E4EAF3;
  --hex-press:  #cdd6e6;
  --hex-text:   #1b1b1b;

  /* Feedback */
  --good:   #2e9e5b;
  --bad:    #d8463c;

  --shadow-sm: 0 1px 2px rgba(20,18,8,.06), 0 2px 6px rgba(20,18,8,.05);
  --shadow-md: 0 6px 20px rgba(20,18,8,.10);
  --shadow-lg: 0 18px 50px rgba(20,18,8,.18);

  --radius:   14px;
  --radius-lg: 22px;
  --maxw: 1120px;

  --font-display: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --hw: 96px;                 /* hex width */
  --hgap: 1.085;              /* spacing factor between hexes */
}

[data-theme="dark"] {
  --bg:        #15151a;
  --bg-alt:    #1a1a20;
  --bg-band:   #2a2520;
  --surface:   #21212a;
  --surface-2: #2a2a34;
  --ink:       #f1f0ec;
  --ink-soft:  #aeaeb8;
  --ink-faint: #7f7f8a;
  --line:      #2c2c36;
  --line-2:    #353541;
  --hex:       #34343f;
  --hex-press: #44444f;
  --hex-text:  #f1f0ec;
  --honey-soft:#3a3320;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 22px rgba(0,0,0,.4);
  --shadow-lg: 0 20px 55px rgba(0,0,0,.55);
}

* { 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: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
a { color: inherit; }
img, svg { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--honey-deep); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--honey);
  padding: 10px 16px; border-radius: 10px; z-index: 200; transition: top .2s; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ============================ Header ============================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--honey);
  border-bottom: 2px solid rgba(0,0,0,.08);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  height: 60px; display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #1b1b1b; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; display: block; }
.brand b { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand .the { font-weight: 600; opacity: .82; }

.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  text-decoration: none; color: #1b1b1b; font-weight: 600; font-size: .94rem;
  padding: 7px 12px; border-radius: 999px; transition: background .15s;
}
.main-nav a:hover { background: rgba(0,0,0,.09); }
.main-nav a[aria-current="page"] { background: #1b1b1b; color: var(--honey); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 40px; height: 40px; border: none; background: transparent; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; color: #1b1b1b;
  transition: background .15s;
}
.icon-btn:hover { background: rgba(0,0,0,.10); }
.icon-btn svg { width: 21px; height: 21px; }

.nav-toggle { display: none; }

/* ============================ Game shell ============================ */
.game-area { background: var(--bg); padding: 14px 0 34px; }
.game-grid {
  max-width: 540px; margin: 0 auto; padding: 0 16px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}

/* Mode + date strip */
.mode-strip {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 6px 0 2px;
}
.mode-switch { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.mode-switch a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .86rem;
  padding: 6px 15px; border-radius: 999px; transition: .15s;
}
.mode-switch a.active { background: var(--honey); color: #1b1b1b; box-shadow: var(--shadow-sm); }
.puzzle-meta { font-size: .82rem; color: var(--ink-faint); font-weight: 500; text-align: right; }
.puzzle-meta strong { color: var(--ink-soft); font-weight: 600; }

/* Rank bar */
.rankbar { width: 100%; margin: 16px 0 6px; display: flex; align-items: center; gap: 12px; }
.rank-name {
  font-family: var(--font-display); font-weight: 700; font-size: .92rem; white-space: nowrap;
  min-width: 66px; color: var(--ink);
}
.rank-track {
  position: relative; flex: 1; height: 2px; background: var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
}
.rank-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--honey-deep); transition: width .5s cubic-bezier(.4,1.2,.5,1); }
.rank-dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); position: relative; z-index: 1;
  transition: background .3s;
}
.rank-dot.reached { background: var(--honey-deep); }
.rank-dot.current {
  width: 30px; height: 30px; background: var(--honey); color: #1b1b1b;
  display: grid; place-items: center; font-weight: 800; font-size: .82rem; font-family: var(--font-display);
  box-shadow: 0 0 0 4px var(--bg), var(--shadow-sm);
}
.rank-score { font-weight: 800; font-family: var(--font-display); color: var(--ink); min-width: 30px; text-align: left; font-size: .95rem;}

/* Current word */
.current-word {
  height: 44px; display: flex; align-items: center; justify-content: center; gap: 1px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; letter-spacing: .03em;
  text-transform: uppercase; margin: 10px 0 2px; min-height: 44px;
}
.current-word .ltr { color: var(--ink); }
.current-word .ltr.center { color: var(--honey-deep); }
.current-word .ltr.bad { color: var(--bad); }
.current-word .caret {
  width: 2px; height: 30px; background: var(--honey-deep); animation: blink 1s steps(2,start) infinite; border-radius: 2px;
}
.current-word .placeholder { color: var(--ink-faint); font-weight: 600; font-size: 1rem; letter-spacing: normal; text-transform: none; font-family: var(--font-body);}
@keyframes blink { 50% { opacity: 0; } }

/* Toast / feedback popup */
.toast-layer { position: relative; height: 0; width: 100%; display: flex; justify-content: center; z-index: 60; }
.toast {
  position: absolute; top: -2px; background: var(--ink); color: #fff; padding: 7px 16px; border-radius: 999px;
  font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-md); white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.toast.show { animation: toastpop 1.15s ease forwards; }
.toast.good { background: var(--good); }
.toast.bad  { background: var(--bad); }
.toast.pangram { background: var(--honey); color: #1b1b1b; }
@keyframes toastpop {
  0% { opacity: 0; transform: translateY(6px) scale(.9); }
  14% { opacity: 1; transform: translateY(0) scale(1); }
  78% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(.96); }
}
.score-float {
  position: absolute; top: -6px; font-family: var(--font-display); font-weight: 800; color: var(--honey-deep);
  font-size: 1.1rem; opacity: 0; pointer-events: none;
}
.score-float.show { animation: floatup 1s ease forwards; }
@keyframes floatup {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* ============================ The hive ============================ */
.hive {
  position: relative;
  width: calc(var(--hw) * 3.05);
  height: calc(var(--hw) * 3.05);
  margin: 6px auto 4px;
  touch-action: manipulation;
}
.hex {
  position: absolute; left: 50%; top: 50%;
  width: var(--hw); height: calc(var(--hw) * 1.1547);
  margin: 0; padding: 0; border: none; background: transparent;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
}
.hex .cell {
  position: absolute; inset: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--hex);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; color: var(--hex-text);
  text-transform: uppercase; user-select: none;
  transition: transform .08s ease, background .12s ease;
}
.hex.center .cell { background: var(--honey); color: #1b1b1b; }
.hex:active .cell, .hex.tapped .cell { transform: scale(.9); background: var(--hex-press); }
.hex.center:active .cell, .hex.center.tapped .cell { background: var(--honey-deep); }

/* flower positions (pointy-top, 2-3-2) */
.hex.h-c  { transform: translate(-50%, -50%); }
.hex.h-tl { transform: translate(calc(-50% - var(--hw) * .5  * var(--hgap)), calc(-50% - var(--hw) * .866 * var(--hgap))); }
.hex.h-tr { transform: translate(calc(-50% + var(--hw) * .5  * var(--hgap)), calc(-50% - var(--hw) * .866 * var(--hgap))); }
.hex.h-l  { transform: translate(calc(-50% - var(--hw) * 1.0 * var(--hgap)), -50%); }
.hex.h-r  { transform: translate(calc(-50% + var(--hw) * 1.0 * var(--hgap)), -50%); }
.hex.h-bl { transform: translate(calc(-50% - var(--hw) * .5  * var(--hgap)), calc(-50% + var(--hw) * .866 * var(--hgap))); }
.hex.h-br { transform: translate(calc(-50% + var(--hw) * .5  * var(--hgap)), calc(-50% + var(--hw) * .866 * var(--hgap))); }

.hive.shuffling .hex { transition: transform .45s cubic-bezier(.4,1.1,.5,1); }

/* ============================ Controls ============================ */
.controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 6px; flex-wrap: wrap; }
.ctrl {
  height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: .98rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .14s; box-shadow: var(--shadow-sm);
}
.ctrl:hover { border-color: var(--ink-faint); }
.ctrl.round { width: 48px; padding: 0; justify-content: center; }
.ctrl.round svg { width: 22px; height: 22px; }
.ctrl.enter { background: #1b1b1b; color: #fff; border-color: #1b1b1b; }
[data-theme="dark"] .ctrl.enter { background: var(--honey); color: #1b1b1b; border-color: var(--honey); }
.ctrl.enter:hover { opacity: .9; }
.ctrl:active { transform: scale(.96); }

/* ============================ Found words ============================ */
.found-panel { width: 100%; margin: 22px 0 0; }
.found-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; cursor: pointer; box-shadow: var(--shadow-sm);
}
.found-head .summary { font-weight: 600; color: var(--ink); }
.found-head .summary b { font-family: var(--font-display); }
.found-head .chev { transition: transform .2s; color: var(--ink-faint); }
.found-panel.open .found-head .chev { transform: rotate(180deg); }
.found-list {
  display: none; border: 1.5px solid var(--line); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); padding: 8px 16px 14px; margin-top: -4px;
  max-height: 230px; overflow-y: auto;
  columns: 3; column-gap: 14px;
}
.found-panel.open .found-list { display: block; }
.found-list .w { break-inside: avoid; padding: 4px 0; font-size: .92rem; color: var(--ink); text-transform: capitalize; border-bottom: 1px solid var(--line); }
.found-list .w.pangram { color: var(--honey-deep); font-weight: 700; }
.found-empty { color: var(--ink-faint); font-size: .9rem; padding: 6px 0; }

/* preview chips of recent finds under controls */
.recent-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 8px; margin-top: 4px; }
.recent-strip .chip { font-size: .82rem; color: var(--ink-soft); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; text-transform: capitalize; }
.recent-strip .chip.pangram { background: var(--honey); color: #1b1b1b; font-weight: 700; }

/* ============================ Side actions (new game / hint row already above) === */
.subactions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap;}
.link-btn {
  background: none; border: none; color: var(--honey-deep); font-weight: 700; font-size: .92rem; padding: 6px 10px; border-radius: 8px;
}
.link-btn:hover { background: var(--honey-soft); }

/* ============================ Modal ============================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,12,4,.5); backdrop-filter: blur(2px);
  display: none; align-items: flex-start; justify-content: center; z-index: 120; padding: 40px 16px; overflow-y: auto;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: modalin .22s ease;
}
@keyframes modalin { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 18px 18px 6px; }
.modal-head h2 { margin: 0; font-size: 1.25rem; }
.modal-close {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border: none; background: var(--surface-2);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); padding: 0;
}
.modal-close svg { width: 16px; height: 16px; display: block; }
.modal-close:hover { background: var(--line-2); }
.modal-body { padding: 8px 24px 26px; }
.modal-body p { color: var(--ink-soft); margin: 0 0 14px; }
.modal-body ul { margin: 0; padding: 0; list-style: none; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.rank-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--honey-deep); flex-shrink: 0; }
.rank-row .nm { font-weight: 700; font-family: var(--font-display); }
.rank-row .pts { color: var(--ink-faint); margin-left: auto; font-weight: 600; }
.rank-row.is-current { background: var(--honey-soft); margin: 0 -10px; padding: 7px 10px; border-radius: 10px; }

.howto-list li { display: flex; gap: 10px; padding: 7px 0; color: var(--ink-soft); }
.howto-list li::before { content: "•"; color: var(--honey-deep); font-weight: 800; }
.howto-sub { font-family: var(--font-display); font-weight: 700; margin: 14px 0 4px; color: var(--ink); }

/* stats */
.stat-cards { display: flex; gap: 12px; margin-bottom: 18px; }
.stat-card { flex: 1; background: var(--surface-2); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat-card .n { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--ink); }
.stat-card .l { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.dist-title { font-family: var(--font-display); font-weight: 700; text-align: center; margin: 4px 0 12px; }
.dist-row { display: grid; grid-template-columns: 70px 1fr 30px; align-items: center; gap: 10px; margin: 5px 0; }
.dist-row .lbl { font-size: .82rem; font-weight: 600; color: var(--ink-soft); text-align: right; }
.dist-bar { height: 14px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.dist-bar > span { display: block; height: 100%; background: var(--honey); border-radius: 999px; }
.dist-row .ct { font-size: .82rem; font-weight: 700; text-align: right; color: var(--ink); }
.stat-actions { text-align: center; margin-top: 18px; }
.btn-solid { display: inline-flex; align-items: center; justify-content: center; background: var(--honey); color: #1b1b1b; border: none; font-weight: 700; padding: 11px 22px; border-radius: 999px; font-family: var(--font-display); box-shadow: var(--shadow-sm); }
.btn-solid:hover { background: var(--honey-bright); }
.btn-ghost { background: none; border: none; color: var(--bad); font-weight: 600; padding: 10px; margin-top: 4px; }
.btn-ghost:hover { text-decoration: underline; }

/* yesterday answers */
.ya-letters { text-align: center; font-family: var(--font-display); font-weight: 800; letter-spacing: .35em; font-size: 1.4rem; margin: 2px 0 2px; }
.ya-letters .c { color: var(--honey-deep); }
.ya-sub { text-align: center; color: var(--ink-faint); font-size: .85rem; margin-bottom: 14px; }
.ya-list { columns: 3; column-gap: 16px; font-size: .9rem; }
.ya-list .w { break-inside: avoid; padding: 4px 0; border-bottom: 1px solid var(--line); text-transform: capitalize; color: var(--ink); }
.ya-list .w.pan { font-weight: 800; color: var(--honey-deep); }
.ya-list .w.found { color: var(--honey-deep); }
.ya-legend { margin-top: 16px; font-size: .82rem; color: var(--ink-soft); }
.ya-legend b { color: var(--honey-deep); }

/* ============================ Content sections ============================ */
.band { background: var(--bg-band); }
.band-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px; text-align: center; }
.band-inner h1, .band-inner h2 { font-size: 1.9rem; margin-bottom: 6px; color: #2a2208; }
.band-inner p { color: #3d3415; max-width: 680px; margin: 0 auto; font-size: .98rem; }
[data-theme="dark"] .band-inner h1, [data-theme="dark"] .band-inner h2 { color: var(--honey-bright); }
[data-theme="dark"] .band-inner p { color: #cfc6b4; }

.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 1.9rem; text-align: center; margin-bottom: 8px; }
.section .lead { text-align: center; color: var(--ink-soft); max-width: 680px; margin: 0 auto 36px; font-size: 1.05rem; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p { color: var(--ink-soft); margin: 0 0 18px; font-size: 1.02rem; }
.prose h2 { text-align: left; font-size: 1.5rem; margin: 36px 0 12px; }
.prose h3 { font-size: 1.18rem; margin: 26px 0 8px; }
.prose ul { color: var(--ink-soft); padding-left: 0; list-style: none; margin: 0 0 18px; }
.prose ul li { position: relative; padding: 5px 0 5px 26px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 9px; height: 10px; background: var(--honey-deep);
  clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); }
.prose a { color: var(--honey-deep); font-weight: 600; }

/* how to play steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 920px; margin: 0 auto; }
.step { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 24px 20px; text-align: center; box-shadow: var(--shadow-sm); }
.step .num { width: 40px; height: 40px; margin: 0 auto 14px; background: var(--honey); color: #1b1b1b; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; }
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: .94rem; margin: 0; }

/* comparison cards */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 880px; margin: 0 auto; }
.cmp-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.cmp-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.cmp-card .tag { font-size: .72rem; background: var(--honey); color: #1b1b1b; padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.cmp-card p { color: var(--ink-soft); font-size: .96rem; }
.cmp-card .go { display: inline-block; margin-top: 8px; color: var(--honey-deep); font-weight: 700; text-decoration: none; }

/* games grid (related games, empty links) */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 16px; max-width: 940px; margin: 0 auto; }
.game-card {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 18px; text-align: center;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: .16s; display: block;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--honey); }
.game-card .ico { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; background: var(--honey-soft); color: var(--honey-deep); }
.game-card h3 { font-size: 1rem; margin: 0 0 3px; }
.game-card p { font-size: .82rem; color: var(--ink-faint); margin: 0 0 8px; }
.game-card .play { font-size: .8rem; font-weight: 700; color: var(--honey-deep); letter-spacing: .04em; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 20px; font-weight: 600; font-size: 1.02rem; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q .pm { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--honey-deep); border-radius: 2px; }
.faq-q .pm::before { left: 4px; right: 4px; top: 10px; height: 2.5px; }
.faq-q .pm::after { top: 4px; bottom: 4px; left: 10px; width: 2.5px; transition: transform .2s; }
.faq-item.open .faq-q .pm::after { transform: scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a-inner { padding: 0 20px 18px; color: var(--ink-soft); }
.faq-item.open .faq-a { max-height: 420px; }

/* about cta */
.about-cta { display: flex; align-items: center; gap: 26px; max-width: 820px; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.about-cta img { width: 110px; height: 110px; flex-shrink: 0; }
.about-cta p { color: var(--ink-soft); margin: 0; }

/* rating */
.rating-box { text-align: center; padding: 36px 0; }
.rating-box .stars { color: var(--honey-deep); font-size: 1.6rem; letter-spacing: 4px; }
.rating-box .score { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.rating-box .votes { color: var(--ink-faint); font-size: .85rem; }

/* ============================ Footer ============================ */
.site-footer { background: #141414; color: #cfcfcf; padding: 44px 0 28px; margin-top: 0; }
[data-theme="dark"] .site-footer { background: #0e0e12; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-brand img { width: 36px; height: 36px; }
.footer-brand b { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.1rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; font-family: var(--font-display); }
.footer-col a { display: block; color: #b9b9b9; text-decoration: none; padding: 4px 0; font-size: .92rem; }
.footer-col a:hover { color: var(--honey); }
.footer-tag { color: #8f8f8f; font-size: .88rem; max-width: 240px; }
.footer-bottom { max-width: var(--maxw); margin: 26px auto 0; padding: 18px 20px 0; border-top: 1px solid #2a2a2a; color: #7d7d7d; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: #9a9a9a; text-decoration: none; }
.footer-bottom a:hover { color: var(--honey); }

/* generic page hero (about/contact/privacy) */
.page-hero { background: var(--honey); padding: 40px 0 34px; text-align: center; }
.page-hero h1 { font-size: 2.1rem; margin: 0 0 6px; color: #1b1b1b; }
.page-hero p { color: #4a3f12; margin: 0; font-weight: 500; }
.page-body { padding: 48px 0 64px; }

/* contact / feedback form */
.form-card { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; font-family: inherit;
  font-size: 1rem; background: var(--bg); color: var(--ink); transition: border .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--honey-deep); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--ink-faint); margin-top: 4px; }

/* ============================ Responsive ============================ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr; max-width: 440px; }
  .compare { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  :root { --hw: 84px; }
  .header-inner { gap: 6px; padding: 0 10px; }
  .brand b { font-size: 1rem; }
  .brand .the { display: none; }
  .header-tools { gap: 0; }
  .icon-btn { width: 38px; height: 38px; border-radius: 10px; }
  .icon-btn svg { width: 20px; height: 20px; }
  .section { padding: 42px 0; }
  .section h2 { font-size: 1.55rem; }
  .found-list, .ya-list { columns: 2; }
  .stat-card .n { font-size: 1.6rem; }

  /* mobile nav drawer */
  .mobile-drawer {
    position: fixed; inset: 60px 0 auto 0; background: var(--honey); padding: 10px 16px 18px;
    display: none; flex-direction: column; gap: 2px; z-index: 55; box-shadow: var(--shadow-md);
    border-bottom: 2px solid rgba(0,0,0,.1);
  }
  .mobile-drawer.show { display: flex; }
  .mobile-drawer a { text-decoration: none; color: #1b1b1b; font-weight: 600; padding: 11px 8px; border-radius: 10px; }
  .mobile-drawer a:hover { background: rgba(0,0,0,.08); }
}
@media (max-width: 500px) {
  .brand b { display: none; }
  .icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 430px) {
  :root { --hw: 74px; }
  .current-word { font-size: 1.4rem; }
  .ctrl { height: 44px; padding: 0 16px; font-size: .92rem; }
  .ctrl.round { width: 44px; }
  .controls { gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .about-cta { flex-direction: column; text-align: center; }
}
.mobile-drawer { display: none; }

/* ============================ Rank label (name + next) ============================ */
.rank-label { display: flex; flex-direction: column; line-height: 1.15; min-width: 74px; }
.rank-label .rank-name { font-family: var(--font-display); font-weight: 700; font-size: .98rem; }
.rank-next { font-size: .74rem; color: var(--ink-faint); font-weight: 600; }
.rank-score {
  min-width: 34px; height: 34px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--ink-faint);
  border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  flex-shrink: 0;
}

/* ============================ Hints grid ============================ */
.hint-grid-scroll { overflow-x: auto; margin: 6px 0 4px; -webkit-overflow-scrolling: touch; }
.hint-grid { border-collapse: collapse; width: 100%; font-size: .82rem; }
.hint-grid th, .hint-grid td { border: 1px solid var(--line); padding: 6px 4px; text-align: center; min-width: 26px; }
.hint-grid thead th { background: var(--surface-2); font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.hint-grid th.corner { background: transparent; border: none; }
.hint-grid .rl { background: var(--surface-2); font-family: var(--font-display); font-weight: 800; }
.hint-grid .rl.center { color: var(--honey-deep); }
.hint-grid td.empty { color: var(--ink-faint); }
.hint-grid td.done { color: var(--good); font-weight: 800; background: rgba(46,158,91,.12); }
.hint-grid .sum, .hint-grid .totals th, .hint-grid .totals td { font-weight: 800; color: var(--ink); background: var(--surface-2); }
.twol-title { font-family: var(--font-display); font-weight: 700; text-align: center; margin: 16px 0 8px; }
.twol-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 4px 14px; }
.twol { font-size: .85rem; color: var(--ink-soft); }
.twol b { color: var(--ink); font-family: var(--font-display); }

/* ============================ Solver ============================ */
.solver-intro-label { text-align: center; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin-bottom: 6px; }
.solver-board { display: flex; flex-direction: column; align-items: center; }
.hive.solver { width: calc(var(--hw) * 3.05); height: calc(var(--hw) * 3.05); }
.hex .cell.input-cell { padding: 0; }
.hex .cell.input-cell input {
  width: 70%; height: 60%; border: none; background: transparent; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; text-transform: uppercase;
  color: inherit; outline: none; padding: 0; caret-color: var(--honey-deep);
}
.hex .cell.input-cell input::placeholder { color: rgba(0,0,0,.18); }
.hex.center .cell.input-cell input::placeholder { color: rgba(0,0,0,.3); }
.solver-actions { display: flex; gap: 12px; justify-content: center; margin: 18px 0 6px; }
.solver-results { max-width: 760px; margin: 26px auto 0; }
.solver-stats { display: flex; justify-content: center; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 18px; }
.solver-stats .st { flex: 1; text-align: center; border-right: 1px solid var(--line); }
.solver-stats .st:last-child { border-right: none; }
.solver-stats .st .l { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.solver-stats .st .n { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; color: var(--ink); }
.solver-group-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 22px 0 10px; }
.solver-len { margin-bottom: 12px; }
.solver-len-bar { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--honey); padding-bottom: 5px; margin-bottom: 8px; }
.solver-len-bar .lt { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink); }
.solver-len-bar .cnt { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.solver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 18px; }
.solver-word { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 6px; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.solver-word .sw-pts { font-size: .72rem; color: var(--ink-faint); font-weight: 700; }
.solver-word.pan { background: var(--honey-soft); border-radius: 8px; border-bottom-color: transparent; font-weight: 700; }
.solver-word.pan .sw-text::after { content: " ★"; color: var(--honey-deep); }
.solver-word.pan .sw-pts { color: var(--honey-deep); }
.solver-note { text-align: center; color: var(--ink-soft); padding: 18px; background: var(--surface-2); border-radius: var(--radius); }
.solver-summary { text-align: center; color: var(--ink-soft); margin-bottom: 10px; }

@media (max-width: 720px) {
  .twol-list { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); }
  .solver-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .solver-stats .st .n { font-size: 1.4rem; }
}

/* ============================ Liveliness & new components ============================ */

/* Hover lift + yellow border on cards */
.step, .cmp-card, .form-card, .about-cta, .stat-card {
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.step:hover, .cmp-card:hover, .form-card:hover, .about-cta:hover {
  border-color: var(--honey); transform: translateY(-4px); box-shadow: var(--shadow-md);
}
.faq-item { transition: border-color .22s ease, box-shadow .22s ease; }
.faq-item:hover { border-color: var(--honey); box-shadow: var(--shadow-sm); }

/* Footer links nudge on hover */
.footer-col a { transition: transform .16s ease, color .16s ease; }
.footer-col a:hover { transform: translateX(5px); color: var(--honey); }
.footer-bottom a { transition: color .16s ease; }

/* Rank bar is tappable */
.rankbar { cursor: pointer; border-radius: 10px; padding: 4px 6px; margin-left: -6px; margin-right: -6px; transition: background .15s ease; }
.rankbar:hover { background: var(--surface-2); }

/* Centered meta (mode pills removed) */
.mode-strip { justify-content: center; }
.puzzle-meta { text-align: center; }

/* Solver CTA banner (under the words list) */
.solver-cta {
  display: flex; align-items: center; gap: 16px; width: 100%; margin: 18px 0 0;
  background: var(--honey-soft); border: 1.5px solid var(--honey); border-radius: var(--radius-lg);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.solver-cta:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.solver-cta .cta-ico { width: 48px; height: 48px; flex-shrink: 0; background: var(--honey); border-radius: 13px; display: grid; place-items: center; color: #1b1b1b; }
.solver-cta .cta-ico svg { width: 26px; height: 26px; }
.solver-cta .cta-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.solver-cta .eyebrow { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--honey-deep); }
.solver-cta .cta-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.solver-cta .cta-desc { font-size: .88rem; color: var(--ink-soft); }
.solver-cta .cta-arrow { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line-2); display: grid; place-items: center; color: var(--ink); transition: transform .2s ease, background .2s ease; }
.solver-cta .cta-arrow svg { width: 18px; height: 18px; }
.solver-cta:hover .cta-arrow { transform: translateX(4px); background: var(--honey); }

/* Share CTA (under the words list) */
.share-cta { width: 100%; margin: 26px 0 0; text-align: center; }
.share-cta .btn-solid { transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.share-cta .btn-solid:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Rating card (above footer on daily & unlimited) */
.rating-section { background: var(--bg); padding: 44px 0; }
.rating-card {
  max-width: 520px; margin: 0 auto; text-align: center; background: var(--honey-soft);
  border: 1.5px solid var(--honey); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.rating-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rating-card h2 { font-size: 1.3rem; margin: 0 0 12px; }
.rating-card .stars { display: inline-flex; gap: 5px; color: var(--honey-deep); line-height: 1; }
.rating-card .stars svg { width: 28px; height: 28px; }
.rating-card .score { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin-top: 10px; color: var(--ink); }
.rating-card .score span { color: var(--ink-faint); font-weight: 600; font-size: 1rem; }
.rating-card .votes { color: var(--ink-faint); font-size: .88rem; margin-top: 2px; }

/* Montserrat is a touch wider — keep the brand wordmark tight */
.brand b { letter-spacing: -.02em; }
