/* ============================================================
   FreeDict.com — public site stylesheet (hand-rolled, no framework)
   Canonical design: freedict-homepage-v6.html
   Fonts: Source Serif 4 (display) + Inter (body) — both self-hosted
   ============================================================ */

/* ── SELF-HOSTED FONTS (no Google CDN — honours the site-wide asset rule) ──
   Source Serif 4 (variable): authoritative reference-book display serif, clean
   J/j with no swash — replaced Fraunces, whose swash j read as broken to
   non-English readers. Inter: body/UI (static latin subsets already shipped). */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-serif-4-var.woff2') format('woff2');
}
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/inter-800.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 900; font-display: swap; src: url('/fonts/inter-900.woff2') format('woff2'); }

:root {
  --ink: #071426;
  --navy: #0d2b58;
  --blue: #1d63d8;
  --blue-soft: #eef4ff;
  --red: #8b1e2d;
  --gold: var(--navy);
  --paper: #ffffff;
  --surface: #ffffff;
  --muted: #566176;
  --quiet: #7d8798;
  --line: #dce3ec;
  --line-strong: #bcc8d6;
  --soft: #f4f7fb;
  --green: #1d6b4e;
  --green-lt: #eef7f1;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Defensive: the browser's default [hidden]{display:none} UA rule loses to ANY
   author-stylesheet display declaration on the same element (e.g. .pronounce-btn's
   display:grid) — meaning `el.hidden = true` silently does nothing wherever a class
   also sets display. This one rule guarantees `hidden` always actually hides. */
[hidden] { display: none !important; }

html, body {
  color: var(--ink);
  background: var(--paper);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Source Serif 4 — authoritative reference serif for display headings.
   Optical sizing + a touch of soft contrast reads premium, not generic. */
.brand,
.hero h1, .hero-wod-word, .panel-head h2, .section-head h2,
.tw-word, .game-name, .flash-title, .discover-title, .feat-word, .feat-title,
.newsletter h2, .footer-brand, .sense-pos, .entry-hw, .entry-section > h2,
.page-head h1, .prose h2, .empty-state h1 {
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
}

a { color: var(--blue); }

.wrap { width: min(1160px, calc(100vw - 48px)); margin: 0 auto; }

/* ── TOPLINE ── */
.topline {
  background: var(--ink);
  color: rgba(255,255,255,.55);
  font-size: 12px;
}
.topline-inner {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.topline a { color: rgba(255,255,255,.55); text-decoration: none; }
.topline a:hover { color: #fff; }
.topline nav { display: flex; gap: 20px; }

/* ── HEADER ── */
.header {
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.header-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}
/* Uniform site search band (navy) — one unified white pill: input | scope | button */
.site-search { background: var(--navy); padding: 16px 0; }
.ssb {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 12px; padding: 5px 5px 5px 18px; min-height: 52px;
}
.ssb-icon { color: var(--quiet); flex: none; }
.ssb-input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 15.5px; color: var(--ink); font-family: inherit; }
.ssb-input::placeholder { color: var(--quiet); }
.ssb-sep { width: 1px; align-self: stretch; margin: 9px 0; background: var(--line); flex: none; }
.ssb-scope {
  border: 0; outline: none; background: none; color: #344055; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; padding: 0 4px; flex: none;
  -webkit-tap-highlight-color: transparent;
}
.ssb-scope:focus, .ssb-scope:focus-visible { outline: none; box-shadow: none; }
.ssb-btn {
  border: 0; border-radius: 9px; background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 700; padding: 0 26px; height: 42px; cursor: pointer;
  font-family: inherit; flex: none;
}
.ssb-btn:hover { filter: brightness(1.06); }
/* typeahead dropdown drops from the whole pill, full width */
.ssb .ss-dropdown { top: calc(100% + 8px); left: 0; right: 0; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 28px;
  font-weight: 860;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.5px;
}
.brand-mark { display: block; width: 32px; height: 32px; border-radius: 7px; flex: 0 0 auto; }
.brand-text span { color: var(--blue); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: #344055;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--navy); }
.nav a.active {
  color: var(--navy);
  border-bottom-color: var(--red);
}

.header-actions { display: flex; gap: 8px; align-items: center; }

/* burger (mobile menu trigger) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
}

/* full-screen mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #fff;
  overflow-y: auto;
  animation: menuIn .16s ease;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mobile-menu-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.burger-close {
  border: 0; background: none; cursor: pointer;
  font-size: 34px; line-height: 1; color: var(--muted);
}
.mobile-nav { display: flex; flex-direction: column; padding: 8px 0 28px; }
.mobile-nav > a {
  padding: 16px 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-nav > a.active { color: var(--blue); }
.mobile-nav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.mobile-nav-actions .hbtn { height: 46px; justify-content: center; font-size: 15px; }

@media (max-width: 1120px) {
  .burger { display: flex; }
}
@media (max-width: 560px) {
  .hide-sm { display: none !important; }
}
.hbtn {
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 740;
  padding: 0 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.hbtn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ── HERO ── */
.hero {
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(180deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(150deg, #061220 0%, #0d2b58 55%, #12376e 100%);
  color: #fff;
  border-bottom: 3px solid var(--red);
}
.hero-inner {
  padding: 44px 0 52px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
}
.hero-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 10px;
}
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 520px;
}

/* search tabs + box */
.search-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 0;
}
.search-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.search-tabs button.active {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.search-box {
  display: grid;
  grid-template-columns: 1fr 116px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(0,0,0,.22);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  color: var(--quiet);
}
.search-field svg { flex-shrink: 0; }
.search-field input {
  min-width: 0;
  width: 100%;
  height: 60px;
  border: 0;
  outline: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  font-family: inherit;
  background: transparent;
}
.search-field input::placeholder { color: #9ba6b8; font-weight: 500; }
.search-submit {
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
  font-family: inherit;
}
.search-popular {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.search-popular a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.3);
  font-weight: 700;
}

/* hero right — word of day preview */
.hero-wod {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  padding: 24px;
}
.hero-wod-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 10px;
}
.hero-wod-word {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 38px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.hero-wod-pron {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin-bottom: 4px;
  font-style: italic;
}
.hero-wod-pos {
  display: inline-block;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  font-style: italic;
  border-bottom: 1px solid rgba(255,255,255,.15);
  padding-bottom: 12px;
  margin-bottom: 12px;
  width: 100%;
}
.hero-wod-def {
  font-size: 15px;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  margin-bottom: 10px;
}
.hero-wod-example {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: rgba(255,255,255,.4);
  line-height: 1.55;
  border-left: 2px solid rgba(181,132,45,.5);
  padding-left: 12px;
  margin-bottom: 16px;
}
.hero-wod-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.6);
  text-decoration: none;
}
.hero-wod-link:hover { color: #fff; }

/* ── MAIN BODY ── */
.main { padding: 36px 0 52px; }
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 32px;
  align-items: start;
}

/* panel system */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(14,28,46,.06);
}
.panel + .panel { margin-top: 20px; }
.panel-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
}
.panel-head h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.panel-head a {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}
/* Sidebar: In Other Languages */
.side-langs { list-style: none; padding: 0 14px; margin: 0; }
.side-langs li { border-bottom: 1px solid var(--line); }
.side-langs li:last-child { border-bottom: 0; }
.side-langs a { display: flex; align-items: center; gap: 10px; padding: 11px 0; text-decoration: none; }
.side-langs .sl-name { font-size: 13.5px; font-weight: 600; color: var(--ink); flex: 1; }
.side-langs .sl-word { font-size: 14px; color: var(--navy); font-weight: 600; }
.side-langs a:hover .sl-word { color: var(--blue); }
.side-trans .section-more, .side-wotd .section-more { display: inline-block; margin: 10px 14px 14px; font-size: 13px; }
/* Sidebar: Word of the Day mini */
.wotd-mini { display: block; padding: 6px 14px 4px; text-decoration: none; }
.wotd-mini-word { display: block; font-family: 'Source Serif 4', Georgia, serif; font-size: 22px; font-weight: 700; color: var(--navy); }
.wotd-mini-pron { display: block; font-size: 13px; color: var(--quiet); margin-top: 2px; }
.wotd-mini-blurb { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.wotd-mini:hover .wotd-mini-word { color: var(--blue); }

/* section divider */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}
.section-head h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.section-head a {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}

/* ── TRENDING WORDS — horizontal strip ── */
.trending-strip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(14,28,46,.06);
}
.trending-strip-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
}
.trending-strip-head h2 { font-size: 14px; font-weight: 860; }
.trending-strip-head a { font-size: 12.5px; font-weight: 790; color: var(--blue); text-decoration: none; }
.trending-words {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--line);
}
.trending-word {
  padding: 14px 14px 12px;
  border-right: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.trending-word:hover { background: var(--soft); }
.tw-tag {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.tw-word {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.1;
}
.tw-def {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── WORD TOOLS ── */
.tools-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
}
.tool-cell {
  border-right: 1px solid var(--line);
  padding: 16px 15px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tool-cell:hover { background: var(--soft); }
.tool-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.tool-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── DISCOVER STRIP ── */
.discover {
  background: linear-gradient(135deg, #f1eefe 0%, #eaf0ff 100%);
  border: 1px solid #d6cdf6;
  box-shadow: 0 1px 2px rgba(7,20,38,.04), 0 8px 26px rgba(76,29,149,.10);
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 26px 28px;
  border-radius: 16px;
}
.discover-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6d28d9;
  margin-bottom: 5px;
}
.discover-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.discover-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.discover-pills {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.discover-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border: 1px solid #d6cdf6;
  color: #6d28d9;
  background: rgba(255,255,255,.5);
  border-radius: 20px;
}
.discover-btn {
  min-height: 40px;
  padding: 0 20px;
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  color: #fff;
  border: 0;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  border-radius: 5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ── LEARN MODE landing (chooser) ── */
.learn-choose { padding: 8px 0 56px; }
.learn-pairwrap { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-bottom: 18px; }
.learn-pairwrap label { font-size: 13px; font-weight: 600; color: var(--muted); }
.learn-pair {
  font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer;
}
.learn-discover {
  display: flex; align-items: center; gap: 22px; justify-content: space-between;
  background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 45%, #4f46e5 100%);
  color: #fff; border-radius: 18px; padding: 30px 32px; text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(76,29,149,.45); position: relative; overflow: hidden;
}
.learn-discover::after { content:""; position:absolute; top:-40%; right:-5%; width:50%; height:160%; background:radial-gradient(circle,rgba(255,255,255,.18),transparent 70%); pointer-events:none; }
.ld-text { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.ld-kick { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.ld-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 28px; font-weight: 600; line-height: 1.1; }
.ld-sub { font-size: 14.5px; line-height: 1.5; opacity: .9; max-width: 52ch; }
.ld-cta { flex: none; background: #fff; color: #4c1d95; font-weight: 700; font-size: 15px; padding: 13px 22px; border-radius: 30px; position: relative; z-index: 1; }
.learn-h { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; color: var(--navy); margin: 30px 0 14px; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.learn-tile {
  display: flex; flex-direction: column; gap: 3px; padding: 18px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none;
  box-shadow: 0 1px 2px rgba(7,20,38,.04); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.learn-tile:hover { border-color: #b9a9ee; box-shadow: 0 6px 18px rgba(76,29,149,.10); transform: translateY(-2px); }
.learn-tile b { font-family: 'Source Serif 4', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--navy); }
.learn-tile span { font-size: 13px; color: var(--muted); }
.learn-tile.wide b { font-size: 18px; }
.learn-h-link { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; }
.learn-h-link a { color: var(--blue); text-decoration: none; }
/* Translation cards — bidirectional flags + levels */
.lang-flag { border-radius: 3px; box-shadow: 0 0 0 1px rgba(7,20,38,.12); vertical-align: middle; object-fit: cover; }
.tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tcard {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  box-shadow: 0 1px 2px rgba(7,20,38,.04); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tcard:hover { border-color: #9db8f0; box-shadow: 0 8px 22px rgba(26,95,212,.10); transform: translateY(-2px); }
.tcard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tcard-arrows { color: var(--muted); display: inline-flex; }
.tcard-name { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; font-weight: 600; color: var(--navy); }
.tcard-sub { font-size: 13px; color: var(--muted); margin: 3px 0 14px; line-height: 1.45; }
.tcard-levels { display: flex; gap: 8px; flex-wrap: wrap; }
.tlevel {
  font-size: 12.5px; font-weight: 600; color: var(--blue); text-decoration: none;
  padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 20px; background: #fff;
}
.tlevel:hover { border-color: var(--blue); background: rgba(26,95,212,.05); }
.tcard-more { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; background: var(--soft); border-style: dashed; }
.tcard-more .tcard-sub { margin-bottom: 0; }

/* ── LEARN MODE banner (dark, auto-scrolling cards) ── */
.lb {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 26px; align-items: center;
  margin-top: 20px; padding: 34px 36px; border-radius: 20px; overflow: hidden;
  text-decoration: none; position: relative; isolation: isolate;
  background: radial-gradient(120% 120% at 12% 10%, #2a1a6e 0%, transparent 55%),
              radial-gradient(120% 130% at 95% 95%, #0c3b5e 0%, transparent 55%),
              linear-gradient(135deg, #0e1230 0%, #160f33 55%, #0a0a16 100%);
  box-shadow: 0 16px 40px -16px rgba(40,20,110,.55);
}
.lb-left { position: relative; z-index: 1; }
.lb-kick { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fbbf24; margin-bottom: 14px; }
.lb-title { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; font-size: 32px; line-height: 1.08; color: #fff; letter-spacing: -.01em; margin-bottom: 12px; }
.lb-sub { font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.72); max-width: 44ch; margin-bottom: 22px; }
.lb-btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; font-weight: 700; font-size: 14.5px; padding: 13px 22px; border-radius: 30px; box-shadow: 0 8px 22px -6px rgba(124,58,237,.6); }
.lb:hover .lb-btn { filter: brightness(1.08); }
.lb-right { position: relative; height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.lb-track { display: flex; flex-direction: column; gap: 12px; animation: lb-scroll 26s linear infinite; }
.lb:hover .lb-track { animation-play-state: paused; }
@keyframes lb-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.lb-card {
  display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; border-radius: 13px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-left: 3px solid var(--a); backdrop-filter: blur(2px);
}
.lb-ct { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.lb-cw { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; font-size: 18px; color: #fff; }
.lb-cd { font-size: 12.5px; color: rgba(255,255,255,.6); line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .lb-track { animation: none; } }
@media (max-width: 720px) { .lb { grid-template-columns: 1fr; padding: 26px 24px; } .lb-right { display: none; } .lb-title { font-size: 26px; } }

/* ── GRAMMAR + TRENDING two col ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.two-col .panel + .panel { margin-top: 0; }

/* list links */
.list { list-style: none; }
.list-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: #22304a;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 600;
}
.list li:last-child .list-link { border-bottom: 0; }
.list-link:hover { background: var(--soft); }
.tag {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── RAIL ── */
.rail { display: grid; gap: 20px; }

.translate-body { padding: 14px; }
.select-row {
  display: grid;
  grid-template-columns: 1fr 34px 1fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}
.lang-select {
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 740;
  font-family: inherit;
  outline: 0;
  width: 100%;
}
.swap-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.translate-body textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  font-family: inherit;
  outline: 0;
}
.full-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 820;
  cursor: pointer;
  font-family: inherit;
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.lang-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #22304a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}
.lang-link:hover { background: var(--soft); }
.lang-link-name { flex: 1; }
.lang-link-code { color: var(--quiet); font-size: 12px; font-weight: 700; }

/* ── FULL-WIDTH SECTIONS ── */
.full-width { margin-top: 32px; }

.lang-table-full {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-cell {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #22304a;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface);
}
.lang-cell:hover { background: var(--soft); }
.lang-cell.active { background: var(--navy); color: #fff; }
.lang-cell-name { flex: 1; }
.lang-cell-code { color: var(--quiet); font-size: 12px; font-weight: 700; letter-spacing: .03em; }

/* flashcard strip */
.flash-strip {
  background: #eef4ff;
  border: 1px solid #c2d4f6;
  box-shadow: 0 1px 2px rgba(7,20,38,.04), 0 6px 24px rgba(7,20,38,.06);
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 26px 28px;
  border-radius: 16px;
}
.flash-kicker {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 5px;
}
.flash-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.flash-sub { font-size: 15px; color: var(--muted); }
.flash-btn {
  min-height: 40px;
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
  border: 0;
  font-size: 13.5px;
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* flashcards selling page */
.fc-features {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fc-feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 20px;
  box-shadow: 0 1px 2px rgba(7,20,38,.04);
}
.fc-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #eef4ff;
  color: var(--blue);
  margin-bottom: 12px;
}
.fc-feat-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}
.fc-feature p, .fc-step p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.fc-step p a { color: var(--blue); font-weight: 600; text-decoration: none; }
.fc-step p a:hover { text-decoration: underline; }
.fc-steps {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.fc-step {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}
.fc-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 820;
  font-size: 14px;
  margin-bottom: 11px;
}
@media (max-width: 760px) {
  .fc-features, .fc-steps { grid-template-columns: 1fr; }
}

/* games strip */
.games-strip {
  background: var(--green-lt);
  border: 1px solid #c2e0d0;
  box-shadow: 0 1px 2px rgba(7,20,38,.04), 0 6px 24px rgba(7,20,38,.06);
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
}
.game-cell {
  padding: 16px 18px;
  border-right: 1px solid #c9e9d4;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.game-cell:last-of-type { border-right: none; }
.game-cell:hover { background: #dff2ea; }
.game-kicker {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 5px;
}
.game-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 3px;
}
.game-desc { font-size: 14px; color: var(--muted); line-height: 1.45; }
.games-all {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
  gap: 5px;
}

/* newsletter */
.newsletter {
  background: var(--navy);
  color: #fff;
  margin-top: 32px;
  padding: 28px 0;
}
.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: center;
}
.newsletter h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}
.newsletter p { font-size: 14px; color: rgba(255,255,255,.65); line-height: 1.55; }
.email-row { display: grid; grid-template-columns: 1fr 96px; gap: 6px; }
.email-input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: 0;
}
.email-input::placeholder { color: rgba(255,255,255,.4); }
.email-btn {
  height: 42px;
  border: 0;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
  font-family: inherit;
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 44px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-brand {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
  text-decoration: none;
}
.footer-brand span { color: var(--blue); }
.footer-blurb { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 12px; max-width: 30ch; }
.footer-col h4 {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px;
}
.footer-col a { display: block; font-size: 13.5px; color: var(--muted); text-decoration: none; padding: 4px 0; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line);
}
.footer-copy { font-size: 12px; color: var(--quiet); }
.source-credit { border-top: 1px solid var(--line); background: #fafbfc; }
.source-credit .wrap { padding: 11px 0; font-size: 11.5px; color: var(--quiet); line-height: 1.5; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-about { grid-column: 1 / -1; }
}

/* ── FEATURED ROW ── */
.featured-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 28px;
}
.featured-left,
.featured-right {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(14,28,46,.06);
}
.feat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
}
.feat-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.feat-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.feat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background .12s;
}
.feat-item:last-child { border-bottom: 0; }
.feat-item:hover { background: var(--soft); }
.feat-item-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feat-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--quiet);
}
.feat-word {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}
.feat-def {
  font-size: 13.5px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 1px;
}
.feat-arrow {
  font-size: 16px;
  color: var(--line-strong);
  flex-shrink: 0;
  transition: color .12s, transform .12s;
}
.feat-item:hover .feat-arrow,
.tool-nav-item:hover .feat-arrow { color: var(--blue); transform: translateX(3px); }

.tool-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background .12s;
}
.tool-nav-item:last-child { border-bottom: 0; }
.tool-nav-item:hover { background: var(--soft); }
.tni-left { display: flex; flex-direction: column; gap: 1px; }
.tni-name { font-size: 15px; font-weight: 700; color: var(--navy); }
.tni-desc { font-size: 13px; font-weight: 300; color: var(--muted); }

/* ============================================================
   WORD PAGE (/word/{slug})
   ============================================================ */
.entry { padding: 32px 0 48px; }
.entry-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 36px;
  align-items: start;
}
.breadcrumb {
  font-size: 12.5px;
  color: var(--quiet);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }

.entry-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.entry-hw {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 10px;
}
.entry-pron {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.entry-ipa { font-size: 18px; color: var(--muted); font-style: italic; }
.pronounce-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.pronounce-btn:hover { background: var(--soft); }
.entry-badges { display: flex; gap: 8px; margin-bottom: 10px; }
.entry-syllab {
  font-size: 17px;
  color: var(--quiet);
  font-weight: 500;
  margin: -4px 0 10px;
  letter-spacing: .02em;
}
.entry-pos {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: var(--soft);
  border: 1px solid var(--line-strong);
  padding: 3px 11px;
  border-radius: 20px;
  text-transform: lowercase;
}
.entry-cefr {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid rgba(26,95,212,.3);
  background: rgba(26,95,212,.06);
  padding: 3px 9px;
  border-radius: 20px;
}
.entry-common {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(29,107,78,.3);
  background: rgba(29,107,78,.06);
  padding: 3px 9px;
  border-radius: 20px;
}

/* Respelling — the plain-English "sounds like" aid, shown big. */
.entry-respell {
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin: 4px 0 14px;
  letter-spacing: .01em;
}

.flag {
  display: inline-block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(7,20,38,.12);
  vertical-align: middle;
}

/* Pronunciation — two clearly-labelled accents, each a tappable audio button. */
.pron-rows { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.pron-row {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 30px;
  background: #fff; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.pron-row:hover { border-color: var(--blue); box-shadow: 0 2px 12px rgba(26,95,212,.10); }
.pron-lbl { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.pron-ipa { font-size: 16px; font-style: italic; color: var(--muted); }
.pron-spk { display: inline-flex; color: var(--blue); }
.entry-variant { font-size: 14px; color: var(--muted); margin-top: 10px; }
.entry-variant a { color: var(--blue); font-weight: 600; }

.example-cite {
  display: block;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 13px;
  color: var(--quiet);
  margin-top: 4px;
  font-weight: 500;
}

.form-type {
  font-size: 11px;
  color: var(--quiet);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-left: 4px;
}
.form-list-plain {
  font-size: 15px; line-height: 1.9; color: var(--ink); margin: 4px 0 0;
}

/* per-word FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  color: var(--quiet);
  font-weight: 400;
  font-size: 20px;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  padding: 0 16px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #2a3850;
}

/* entries near */
.entry-near-current { font-weight: 800 !important; color: var(--navy) !important; background: var(--soft); cursor: default; }

/* word finder results */
.wf-count { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.wf-group { margin-bottom: 22px; }
.wf-group-head {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px; color: var(--navy); margin-bottom: 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.wf-group-head span { color: var(--quiet); font-weight: 400; font-size: 14px; }
.wf-empty { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); }
.wf-related { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.wf-related h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 17px; color: var(--navy); margin-bottom: 12px; }
.wf-related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-related-grid a {
  font-size: 13px; font-weight: 600; color: var(--blue);
  padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: 20px;
  text-decoration: none; background: #fff;
}
.wf-related-grid a:hover { border-color: var(--blue); }

/* flash toast (newsletter etc.) */
.flash-toast { padding: 12px 0; font-size: 14px; font-weight: 600; }
.flash-toast .wrap { display: block; }
.flash-success { background: #e7f6ee; color: var(--green); border-bottom: 1px solid #c2e0d0; }
.flash-error { background: #fdecec; color: var(--red); border-bottom: 1px solid #f5c2c2; }

/* cookie consent banner */
.cookie-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--ink);
  color: #fff;
  border-top: 3px solid var(--blue);
  box-shadow: 0 -8px 30px rgba(0,0,0,.25);
}
.cookie-consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  flex-wrap: wrap;
}
.cookie-consent-text { font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.8); max-width: 720px; }
.cookie-consent-text a { color: #fff; text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  height: 40px; padding: 0 20px;
  border-radius: 6px; font-size: 14px; font-weight: 740;
  cursor: pointer; font-family: inherit; border: 1px solid transparent;
}
.cookie-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.cookie-btn-ghost:hover { border-color: #fff; }
.cookie-btn-primary { background: var(--blue); color: #fff; }
@media (max-width: 640px) {
  .cookie-consent-inner { flex-direction: column; align-items: stretch; }
  .cookie-consent-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; }
}

/* live search typeahead dropdown */
.ss-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 36px rgba(7,20,38,.16);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}
.ss-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 4px 10px;
  padding: 11px 18px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.ss-item:last-child { border-bottom: 0; }
.ss-item:hover, .ss-item.active { background: var(--blue-soft); }
.ss-w { font-weight: 700; color: var(--ink); font-size: 15.5px; }
.ss-pos { font-size: 12px; font-style: italic; color: var(--red); }
.ss-d {
  font-size: 13.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 560px) {
  .ss-item { grid-template-columns: 1fr; gap: 2px; }
  .ss-d { white-space: normal; }
}

/* bilingual word-page translation cards */
.trans-cards { display: flex; flex-direction: column; gap: 14px; }
.trans-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--surface);
}
.trans-card-target {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 12px;
}
.trans-card-target .pronounce-btn { width: 34px; height: 34px; }
.trans-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.trans-pos {
  font-family: 'Source Serif 4', Georgia, serif; font-style: italic;
  font-size: 14px; color: var(--red);
}
.trans-gender, .trans-register {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); border: 1px solid var(--line-strong);
  padding: 2px 8px; border-radius: 12px;
}
.trans-roman { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.trans-gloss { font-size: 14.5px; color: var(--muted); margin-top: 6px; font-style: italic; }

/* hub card grid — content-rich directory cards (thesaurus, dictionary, etymology hubs) */
.hub-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(14,28,46,.05);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.hub-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(14,28,46,.1);
  transform: translateY(-1px);
}
.hub-card-word {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.hub-card-syns {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-card-def {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-card-meta { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--quiet); }
.hub-card-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-top: 2px;
}
@media (max-width: 680px) {
  .hub-cards { grid-template-columns: 1fr; }
}

/* compare-page quick answer (AI Overview / featured-snippet target) */
.quick-answer {
  background: #f0f5ff;
  border: 1px solid #c5d5f5;
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.quick-answer-label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.quick-answer p { font-size: 17px; line-height: 1.6; color: var(--ink); }

/* thesaurus / etymology show-page lead */
.thesaurus-lead { font-size: 17px; line-height: 1.6; color: #2a3850; margin-top: 8px; }
.thesaurus-sense { font-size: 15px; color: var(--muted); line-height: 1.55; margin-top: 8px; }
.thesaurus-sense em { color: var(--red); font-style: italic; }

/* "see all" link under a section */
.section-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}
.section-more:hover { text-decoration: underline; }

/* Class of {year} block */
.classof {
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(7,20,38,.04), 0 6px 24px rgba(7,20,38,.06);
}
.classof-head { margin-bottom: 10px; }
.classof-head strong {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  color: var(--navy);
  margin-right: 8px;
}
.classof-head span { font-size: 13.5px; color: var(--muted); }
.classof-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.classof-chip {
  font-size: 14px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
}
.classof-chip:hover { border-color: var(--blue); color: var(--blue); }
.classof-link { font-size: 13.5px; font-weight: 700; color: var(--blue); text-decoration: none; }
.classof-link:hover { text-decoration: underline; }

/* featured-in (vocab lists featuring this word) */
.featured-in { font-size: 15.5px; line-height: 1.7; color: #2a3850; }
.featured-in a { color: var(--blue); font-weight: 600; text-decoration: none; }
.featured-in a:hover { text-decoration: underline; }

/* external references — real-world entities/citations sharing this word */
.ref-list { display: flex; flex-direction: column; gap: 4px; }
.ref-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ref-item:last-child { border-bottom: 0; }
.ref-title { display: inline-block; color: var(--blue); font-weight: 700; font-size: 15.5px; text-decoration: none; }
.ref-title:hover { text-decoration: underline; }
.ref-desc { margin: 4px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* recent web examples */
/* Example Sentences — attributed real-world usage (Dictionary.com style) */
.examples-note { font-size: 13.5px; color: var(--muted); margin: -6px 0 16px; }
.examples-note em { font-style: italic; }
.webex-list { display: flex; flex-direction: column; gap: 4px; }
.webex {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.webex:last-child { border-bottom: 0; }
.webex-body { min-width: 0; }
.webex-quote {
  margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--ink);
  border-left: 3px solid var(--line-strong); padding-left: 15px;
}
.webex-quote strong { font-weight: 700; }
.webex-src { font-size: 13px; color: var(--quiet); margin-top: 10px; padding-left: 15px; }
.webex-src a { color: var(--blue); font-weight: 600; text-decoration: none; }
.webex-src a:hover { text-decoration: underline; }
.src-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; width: 68px; text-align: center; }
.src-mark {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--soft); border: 1px solid var(--line); color: var(--muted); overflow: hidden;
}
.src-mark img { width: 100%; height: 100%; object-fit: contain; }
.src-label { font-size: 12px; font-weight: 700; color: var(--navy); }
@media (max-width: 560px) {
  .webex { grid-template-columns: 1fr; }
  .src-badge { flex-direction: row; width: auto; gap: 8px; padding-left: 15px; }
  .src-mark { width: 30px; height: 30px; }
}

/* vocabulary list rows */
.vlist { list-style: none; counter-reset: vlist; }
.vlist-row {
  display: grid;
  grid-template-columns: 36px 180px 1fr;
  align-items: baseline;
  gap: 4px 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.vlist-row:last-child { border-bottom: 0; }
.vlist-num { font-size: 13px; font-weight: 700; color: var(--quiet); }
.vlist-word {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.vlist-word:hover { color: var(--blue); }
.vlist-word--plain { color: var(--ink); }
.vlist-def { font-size: 14.5px; color: var(--muted); line-height: 1.45; }

@media (max-width: 640px) {
  .vlist-row {
    grid-template-columns: 28px 1fr;
  }
  .vlist-def { grid-column: 2; }
}

.sense-block { margin-bottom: 28px; }
.sense-pos {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  color: var(--red);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.sense {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.sense-num {
  flex-shrink: 0;
  width: 24px;
  font-weight: 800;
  color: var(--quiet);
  font-size: 15px;
}
.sense-body { min-width: 0; }
.sense-def {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 6px;
}
.sense-register {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-right: 8px;
}
.sense-example {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
  margin-top: 8px;
}

/* etymology / synonyms / translations blocks on word page */
.entry-section { margin: 28px 0; }
.entry-section > h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.etymology-text {
  font-size: 16px;
  line-height: 1.7;
  color: #2a3850;
}
.etymology-meta {
  font-size: 13px;
  color: var(--quiet);
  margin-top: 8px;
}
.syn-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.syn-chip {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  color: var(--navy);
  text-decoration: none;
  background: #fff;
}
.syn-chip:hover { background: var(--soft); border-color: var(--blue); }
.syn-chip.antonym { color: var(--red); border-color: rgba(139,30,45,.3); }

/* Synonyms / Antonyms — side-by-side coloured cards */
.synant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.synant-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.synant-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.synant-head h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 17px; color: var(--navy); margin: 0; }
.synant-head a { font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-syn, .chip-ant, .chip-pas {
  font-size: 13.5px; font-weight: 600; padding: 6px 13px; border-radius: 20px; text-decoration: none; border: 1px solid transparent;
}
.chip-syn { color: #0f6e56; background: #e1f5ee; border-color: #bfe6d7; }
.chip-syn:hover { background: #cdeee1; }
.chip-ant { color: #99253c; background: #fbeaf0; border-color: #f2cdd9; }
.chip-ant:hover { background: #f6dbe4; }
.chip-pas { color: var(--navy); background: var(--soft); border-color: var(--line-strong); }
.chip-pas:hover { background: #fff; border-color: var(--blue); }
@media (max-width: 640px) { .synant-grid { grid-template-columns: 1fr; } }

/* ── Learner layer ("How to Use It") — the original, learner-first moat (brief §4a) ── */
.lnotes {
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 60%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 14px;
  padding: 20px 22px 22px;
}
.lnotes-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.lnotes-head h2 { margin: 0; }
.lnotes-tag {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-soft); border: 1px solid #d3e2fb;
  padding: 3px 10px; border-radius: 20px;
}
.lnotes-plain {
  font-size: 17px; line-height: 1.6; color: var(--ink); margin: 4px 0 18px;
}
.lnotes-kicker {
  display: inline-block; font-family: 'Source Serif 4', Georgia, serif; font-weight: 700;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--blue);
  margin-right: 10px; vertical-align: 1px;
}
.lnotes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lnote {
  background: var(--soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px 14px;
}
.lnote-h {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px; color: var(--navy);
  margin-bottom: 6px;
}
.lnote-h svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--blue); }
.lnote p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.lnote-warn { background: #fdf3f5; border-color: #f2cdd9; }
.lnote-warn .lnote-h { color: var(--red); }
.lnote-warn .lnote-h svg { color: var(--red); }
.lnote-tip { background: var(--green-lt); border-color: #cfe8da; }
.lnote-tip .lnote-h { color: var(--green); }
.lnote-tip .lnote-h svg { color: var(--green); }
.lnotes-confuse { margin-top: 14px; }
.lnotes-confuse .lnote-h { margin-bottom: 9px; }
.chip-confuse {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px; text-decoration: none;
  color: var(--red); background: #fdf3f5; border: 1px solid #f2cdd9;
}
.chip-confuse:hover { background: #f8e7ec; border-color: #e6b8c6; }
.chip-confuse .cc-arrow { opacity: .55; font-weight: 700; }
.chip-confuse-plain { color: var(--muted); background: var(--soft); border-color: var(--line); }
.lnote-anchor {
  display: inline-block; margin-top: 9px;
  font-size: 12.5px; font-weight: 700; color: var(--green); text-decoration: none;
}
.lnote-anchor:hover { text-decoration: underline; }
.lnotes-colloc { margin-top: 14px; }
.lnotes-colloc .lnote-h { margin-bottom: 9px; }
.chip-colloc {
  font-size: 13.5px; font-weight: 600; padding: 6px 13px; border-radius: 8px;
  color: var(--navy); background: #fff; border: 1px solid var(--line-strong);
}
@media (max-width: 640px) { .lnotes-grid { grid-template-columns: 1fr; } }

/* Featured In — vocabulary lists that include this word, as a tidy chip list */
.featured-in-intro { color: var(--muted); font-size: 14.5px; margin: 0 0 12px; }
.featured-in-intro em { font-style: italic; color: var(--ink); }
.featured-list { display: flex; flex-wrap: wrap; gap: 10px; }
.featured-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--navy);
  background: var(--soft); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 10px; text-decoration: none;
}
.featured-chip:hover { background: #fff; border-color: var(--blue); color: var(--blue); }
.featured-chip svg { width: 16px; height: 16px; color: var(--blue); flex: 0 0 auto; }

/* Word-page "Test yourself" CTA */
.word-quiz-cta {
  display: flex; align-items: center; gap: 14px; margin: 18px 0 4px;
  background: var(--blue-soft); border: 1px solid #d3e2fb; border-radius: 12px;
  padding: 14px 16px; text-decoration: none;
}
.word-quiz-cta:hover { border-color: var(--blue); background: #e6f0ff; }
.wqc-icon { flex: 0 0 auto; color: var(--blue); }
.wqc-icon svg { width: 26px; height: 26px; }
.wqc-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.wqc-text strong { font-size: 15.5px; color: var(--navy); }
.wqc-text span { font-size: 13px; color: var(--muted); }
.wqc-go { flex: 0 0 auto; font-size: 20px; font-weight: 700; color: var(--blue); }

/* ════════ INTERACTIVE LEARNING TOOLS (§4a) ════════ */
/* CEFR difficulty badge — A green (easy) · B blue (mid) · C amber (hard) */
.cefr-badge { display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  border-radius: 6px; padding: 3px 9px; font-size: 12px; font-weight: 700; border: 1px solid transparent; vertical-align: middle; }
.cefr-badge .cefr-code { font-weight: 800; letter-spacing: .02em; }
.cefr-badge .cefr-name { font-weight: 600; font-size: 11.5px; opacity: .82; }
.cefr-sm { padding: 2px 7px; }
a.cefr-badge:hover { filter: brightness(.96); }
.cefr-a1, .cefr-a2 { color: #0b6e46; background: #e9f7ef; border-color: #bfe6d1; }
.cefr-b1, .cefr-b2 { color: #1857c4; background: #eaf1fd; border-color: #c6dbf8; }
.cefr-c1, .cefr-c2 { color: #8a4b12; background: #fbf0e5; border-color: #f0d6bd; }

/* Pronunciation practice */
.pron-practice { margin-top: 13px; }
.pp-open { font-size: 13.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft);
  border: 1px solid #d3e2fb; border-radius: 20px; padding: 7px 15px; cursor: pointer; }
.pp-open:hover { background: #e2edff; }
.pp-panel { margin-top: 12px; padding: 15px 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; max-width: 460px; }
.pp-panel[hidden] { display: none; }
.pp-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.pp-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-btn { font-size: 13.5px; font-weight: 700; color: var(--navy); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 14px; cursor: pointer; }
.pp-btn:hover { border-color: var(--blue); color: var(--blue); }
.pp-rec.is-rec { color: #fff; background: var(--red); border-color: var(--red); }
.pp-rec.is-rec:hover { color: #fff; }
.pp-note { font-size: 12.5px; color: var(--quiet); margin: 10px 0 0; }
.pp-result { margin-top: 12px; padding: 10px 13px; border-radius: 9px; font-size: 14px; line-height: 1.5; }
.pp-result.pp-ok { background: var(--green-lt); border: 1px solid #cfe8da; color: #12432f; }
.pp-result.pp-no { background: #fdf3f5; border: 1px solid #f2cdd9; color: #6f1a26; }
.pp-result.pp-wait { background: var(--blue-soft); border: 1px solid #d3e2fb; color: var(--navy); }

/* Cloze / fill-the-gap */
.word-cloze .cloze-lead { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.cloze-sentence { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; line-height: 1.6; color: var(--ink);
  background: var(--soft); border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; padding: 14px 16px; margin: 0 0 14px; }
.cloze-input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cloze-input { flex: 1 1 220px; min-width: 0; font-size: 16px; padding: 11px 14px;
  border: 1.5px solid var(--line-strong); border-radius: 10px; }
.cloze-input:focus { outline: none; border-color: var(--blue); }
.cloze-input.is-ok { border-color: var(--green); background: var(--green-lt); }
.cloze-input.is-no { border-color: var(--red); }
.cloze-check { font-size: 15px; font-weight: 700; color: #fff; background: var(--blue); border: none;
  border-radius: 10px; padding: 11px 22px; cursor: pointer; }
.cloze-check:hover { background: #1857c4; }
.cloze-check:disabled { opacity: .55; cursor: default; }
.cloze-result { margin-top: 12px; padding: 10px 13px; border-radius: 9px; font-size: 14.5px; }
.cloze-result.ok { background: var(--green-lt); border: 1px solid #cfe8da; color: #12432f; }
.cloze-result.no { background: #fdf3f5; border: 1px solid #f2cdd9; color: #6f1a26; }

/* ════════ WORD SCRAMBLE game ════════ */
.scramble-wrap { padding: 28px 0 56px; }
.scramble-app { max-width: 560px; margin: 0 auto; }
.scr-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; font-size: 13px; font-weight: 700; color: var(--muted); }
.scr-stat b { color: var(--navy); font-size: 15px; margin-left: 3px; }
.scr-count { margin-left: auto; color: var(--quiet); font-variant-numeric: tabular-nums; }
.scr-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; box-shadow: 0 6px 24px rgba(13,43,88,.06); }
.scr-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.scr-tile { width: 44px; height: 52px; display: grid; place-items: center; font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px; font-weight: 700; color: var(--navy); background: var(--blue-soft); border: 1px solid #d3e2fb; border-radius: 9px; }
.scr-hint { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 18px; line-height: 1.5; }
.scr-hint b { color: var(--navy); }
.scr-input-row { display: flex; gap: 10px; }
.scr-input { flex: 1 1 auto; min-width: 0; font-size: 18px; text-align: center; letter-spacing: .08em;
  padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; }
.scr-input:focus { outline: none; border-color: var(--blue); }
.scr-input.is-ok { border-color: var(--green); background: var(--green-lt); }
.scr-input.is-no { border-color: var(--red); animation: scr-shake .3s; }
@keyframes scr-shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-5px);} 75%{transform:translateX(5px);} }
.scr-check { font-size: 15px; font-weight: 700; color: #fff; background: var(--blue); border: none; border-radius: 10px; padding: 12px 22px; cursor: pointer; }
.scr-check:hover { background: #1857c4; }
.scr-check:disabled { opacity: .55; cursor: default; }
.scr-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.scr-a { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px; cursor: pointer; }
.scr-a:hover { border-color: var(--blue); color: var(--blue); }
.scr-a:disabled { opacity: .5; cursor: default; }
.scr-fb { margin-top: 16px; padding: 10px 14px; border-radius: 9px; font-size: 14.5px; text-align: center; }
.scr-fb.scr-ok { background: var(--green-lt); border: 1px solid #cfe8da; color: #12432f; }
.scr-fb.scr-no { background: #fdf3f5; border: 1px solid #f2cdd9; color: #6f1a26; }
.scr-fb.scr-skip { background: var(--soft); border: 1px solid var(--line); color: var(--muted); }
.scr-result { text-align: center; padding: 28px 0; }
.scr-final { font-family: 'Source Serif 4', Georgia, serif; font-size: 58px; font-weight: 700; color: var(--navy); line-height: 1; }
.scr-final span { font-size: 24px; color: var(--quiet); }
.scr-msg { font-size: 16px; color: var(--muted); margin-top: 10px; }
.scr-result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.scr-again { font-size: 15px; font-weight: 700; color: #fff; background: var(--blue); border: none; border-radius: 10px; padding: 12px 24px; cursor: pointer; }
.scr-again:hover { background: #1857c4; }
.scr-back { display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 12px 8px; }
.scr-back:hover { color: var(--blue); }
.scr-empty, .scr-loading { text-align: center; color: var(--muted); padding: 40px 0; }
@media (max-width: 560px) { .scr-tile { width: 38px; height: 46px; font-size: 22px; } .scr-input-row { flex-direction: column; } }

/* ════════ GAME THUMBNAILS + DAILY ARCHIVE ════════ */
.game-thumb { display: block; width: 100%; height: auto; border-radius: 12px; aspect-ratio: 16 / 9; }
.game-thumb-wrap { display: block; line-height: 0; margin-bottom: 12px; }
/* Games hub — responsive card grid (Sky-puzzles style, stacks on mobile) */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.game-card { display: flex; flex-direction: column; text-decoration: none; }
.game-card-kicker { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.game-card-name { font-family: 'Source Serif 4', Georgia, serif; font-size: 21px; font-weight: 700; color: var(--navy); margin: 6px 0 4px; }
.game-card-desc { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.game-card:hover .game-card-name { color: var(--blue); }
@media (max-width: 820px) { .games-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .games-grid { grid-template-columns: 1fr; gap: 22px; } }
/* Homepage games strip — sits in the main column beside the rail; auto-fit keeps it 3-up when wide, 2-up on mobile, never a cramped single squish. */
.home-games { margin-top: 30px; }
.home-games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.home-games-grid .game-card-name { font-size: 18px; }
.home-games-grid .game-card-desc { font-size: 13.5px; }
@media (max-width: 480px) { .home-games-grid { gap: 12px; } }
.quiz-archive-wrap { padding: 6px 0 52px; }
.quiz-archive-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.quiz-archive-card { display: flex; flex-direction: column; text-decoration: none; }
.qa-thumb { display: block; line-height: 0; margin-bottom: 10px; }
.qa-thumb .game-thumb { border-radius: 10px; }
.qa-label { font-size: 16px; font-weight: 700; color: var(--ink); }
.quiz-archive-card:hover .qa-label { color: var(--blue); }
.qa-kind { font-size: 13px; color: var(--quiet); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .quiz-archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .quiz-archive-grid { gap: 12px; } .qa-label { font-size: 14px; } }

/* ════════ QUIZZES ════════ */
.quiz-wrap { padding: 28px 0 56px; }
.quiz-app { max-width: 640px; margin: 0 auto; }
.quiz-top { margin-bottom: 20px; }
.quiz-prog { height: 8px; background: var(--soft); border-radius: 20px; overflow: hidden; }
.quiz-prog span { display: block; height: 100%; background: var(--blue); border-radius: 20px; transition: width .35s ease; }
.quiz-count { font-size: 13px; font-weight: 700; color: var(--quiet); margin-top: 8px; letter-spacing: .02em; }
.quiz-q { font-family: 'Source Serif 4', Georgia, serif; font-size: 23px; line-height: 1.35; color: var(--navy); margin: 6px 0 20px; }
.quiz-opts { display: flex; flex-direction: column; gap: 11px; }
.quiz-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 15px 16px; cursor: pointer;
  transition: border-color .12s, background .12s, transform .05s;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
.quiz-opt:active:not(:disabled) { transform: translateY(1px); }
.quiz-opt:disabled { cursor: default; }
.quiz-key {
  flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: var(--soft); border-radius: 7px;
}
.quiz-opt.correct { border-color: var(--green); background: var(--green-lt); color: #12432f; font-weight: 600; }
.quiz-opt.correct .quiz-key { background: var(--green); color: #fff; }
.quiz-opt.wrong { border-color: var(--red); background: #fdf3f5; color: #6f1a26; }
.quiz-opt.wrong .quiz-key { background: var(--red); color: #fff; }
.quiz-fb { margin: 16px 0 4px; padding: 13px 15px; border-radius: 10px; font-size: 14.5px; line-height: 1.55; }
.quiz-fb.ok { background: var(--green-lt); border: 1px solid #cfe8da; color: #12432f; }
.quiz-fb.no { background: #fdf3f5; border: 1px solid #f2cdd9; color: #6f1a26; }
.quiz-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.quiz-next {
  font-size: 15px; font-weight: 700; color: #fff; background: var(--blue);
  border: none; border-radius: 10px; padding: 12px 22px; cursor: pointer;
}
.quiz-next:hover { background: #1857c4; }
/* Result */
.quiz-result { text-align: center; padding: 24px 0; }
.quiz-score { font-family: 'Source Serif 4', Georgia, serif; font-size: 60px; font-weight: 700; color: var(--navy); line-height: 1; }
.quiz-score span { font-size: 26px; color: var(--quiet); }
.quiz-msg { font-size: 19px; color: var(--ink); margin-top: 10px; }
.quiz-best { font-size: 13.5px; color: var(--quiet); margin-top: 6px; font-weight: 600; }
.quiz-result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.quiz-again, .quiz-share {
  font-size: 15px; font-weight: 700; border-radius: 10px; padding: 12px 22px; cursor: pointer; border: 1.5px solid transparent;
}
.quiz-again { color: #fff; background: var(--blue); border-color: var(--blue); }
.quiz-again:hover { background: #1857c4; }
.quiz-share { color: var(--navy); background: #fff; border-color: var(--line-strong); }
.quiz-share:hover { border-color: var(--blue); color: var(--blue); }
.quiz-backbtn { display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 12px 8px; }
.quiz-backbtn:hover { color: var(--blue); }
.quiz-loading, .quiz-empty, .quiz-noscript { text-align: center; color: var(--muted); padding: 40px 0; }
.quiz-back { margin-top: 22px; text-align: center; }
.quiz-back a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.quiz-back a:hover { color: var(--blue); }
/* Results recap — the words you were quizzed on, with meanings + links */
.quiz-recap { max-width: 640px; margin: 34px auto 0; border-top: 1px solid var(--line); padding-top: 26px; }
.quiz-recap h3 { font-family: 'Source Serif 4', Georgia, serif; font-size: 19px; color: var(--navy); margin: 0 0 14px; text-align: center; }
.quiz-recap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quiz-recap-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 15px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.qr-word { font-size: 16px; font-weight: 700; color: var(--blue); text-decoration: none; }
.qr-word:hover { text-decoration: underline; }
.qr-meaning { font-size: 14px; color: var(--muted); line-height: 1.45; }
/* Hub */
.quiz-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, var(--navy), #17407e); color: #fff;
  border-radius: 16px; padding: 26px 28px; text-decoration: none; box-shadow: 0 10px 30px rgba(13,43,88,.18);
}
.quiz-hero:hover { transform: translateY(-1px); }
.quiz-hero-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9dc0ff; }
.quiz-hero-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 27px; font-weight: 700; margin: 4px 0 6px; }
.quiz-hero-sub { font-size: 15px; color: #d5e3fb; }
.quiz-hero-go { flex: 0 0 auto; font-size: 16px; font-weight: 700; background: rgba(255,255,255,.15); padding: 12px 20px; border-radius: 10px; }
.quiz-intro { color: var(--muted); font-size: 14.5px; margin: 4px 0 14px; }
.quiz-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quiz-level {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px;
}
.quiz-level:hover { border-color: var(--blue); background: var(--blue-soft); }
.quiz-level.is-empty { opacity: .55; pointer-events: none; }
.quiz-level-code { font-family: 'Source Serif 4', Georgia, serif; font-size: 22px; font-weight: 700; color: var(--blue); width: 38px; }
.quiz-level-label { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.quiz-word-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.quiz-word-chip {
  font-size: 14.5px; font-weight: 600; color: var(--navy); background: var(--soft);
  border: 1px solid var(--line); border-radius: 20px; padding: 8px 16px; text-decoration: none;
}
.quiz-word-chip:hover { background: #fff; border-color: var(--blue); color: var(--blue); }
.quiz-any-note { font-size: 13.5px; color: var(--quiet); margin-top: 12px; }
.quiz-info { color: var(--ink); font-size: 15px; line-height: 1.65; }
.quiz-info ul { margin: 12px 0; padding-left: 20px; }
.quiz-info li { margin: 5px 0; }
@media (max-width: 560px) {
  .quiz-levels { grid-template-columns: repeat(2, 1fr); }
  .quiz-hero { flex-direction: column; align-items: flex-start; }
  .quiz-q { font-size: 20px; }
}

.trans-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.trans-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}
.trans-cell:hover { background: var(--soft); }
.trans-lang { font-size: 12px; color: var(--quiet); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.trans-word { font-size: 16px; font-weight: 600; color: var(--navy); }

/* add-to-flashcards CTA */
.fc-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 14px;
  font-weight: 740;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
.fc-add:hover { background: #e2ecff; }
.fc-save-row { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 8px; }
.fc-save-note { font-size: 13px; color: var(--muted); max-width: 320px; line-height: 1.45; }
.fc-save-note a { color: var(--blue); font-weight: 600; text-decoration: none; }
.fc-save-note a:hover { text-decoration: underline; }
.fc-add.fc-added { border-color: #0f9d63; background: #e6f6ee; color: #0b7a4c; }

/* guest (localStorage) flashcards — hub note + full-screen study overlay */
.fc-guest-note { font-size: 13px; color: var(--muted); margin: -6px 0 16px; }
.fc-guest-note a { color: var(--blue); font-weight: 600; text-decoration: none; }
.fc-guest-note a:hover { text-decoration: underline; }
.fc-guest-study { position: fixed; inset: 0; z-index: 200; overflow-y: auto;
  background: radial-gradient(1100px 560px at 50% -8%, #e9eefb, var(--soft) 58%); }
/* Study views centre the card in the space so it doesn't float at the top. */
.fc-guest-study .fc-study, .fc-study.fc-study-solo { min-height: calc(100vh - 8px); display: flex; flex-direction: column; }
.fc-guest-study .fc-stage, .fc-study-solo .fc-stage { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
/* [hidden] attr must beat the display:flex above (recurring gotcha) — hide when the session ends. */
.fc-guest-study .fc-stage[hidden], .fc-study-solo .fc-stage[hidden] { display: none; }
.fc-kbd-hint { text-align: center; margin-top: 26px; font-size: 12.5px; color: var(--quiet);
  font-weight: 600; letter-spacing: .01em; }
.fc-kbd-hint kbd { display: inline-block; padding: 1px 6px; margin: 0 2px; border-radius: 5px;
  background: #fff; border: 1px solid var(--line-strong); font: inherit; font-size: 11.5px; color: var(--muted); }
@media (max-width: 640px) { .fc-kbd-hint { display: none; } }
.fd-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 300;
  background: #0f9d63; color: #fff; font-size: 14px; font-weight: 650; padding: 12px 20px; border-radius: 10px;
  box-shadow: 0 10px 30px -8px rgba(7,20,38,.4); opacity: 0; transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.fd-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Save-to-collection picker popover */
.fc-picker {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 300px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 6px 16px -6px rgba(7,20,38,.16), 0 22px 50px -22px rgba(7,20,38,.34);
  padding: 8px; animation: fcPickIn .14s ease;
}
@keyframes fcPickIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fc-pick-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--quiet); padding: 8px 10px 6px; }
.fc-pick-list { display: flex; flex-direction: column; max-height: 244px; overflow-y: auto; }
.fc-pick-empty { font-size: 13px; color: var(--muted); padding: 4px 10px 10px; }
.fc-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-family: inherit; }
.fc-pick-row:hover { background: var(--soft); }
.fc-pick-check { width: 19px; height: 19px; border-radius: 6px; border: 2px solid #cbd3e0; flex: none; position: relative; transition: .12s; }
.fc-pick-row.on .fc-pick-check { background: #0f9d63; border-color: #0f9d63; }
.fc-pick-row.on .fc-pick-check::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fc-pick-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-pick-count { font-size: 12px; color: var(--quiet); flex: none; }
.fc-pick-new { display: flex; gap: 6px; padding: 8px 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.fc-pick-new input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 14px; font-family: inherit; }
.fc-pick-new input:focus { outline: none; border-color: var(--blue); }
.fc-pick-new button { flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 9px;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; }

/* ── flashcard deck view ─────────────────────────────────── */
.fc-crumb { font-size: 13px; margin-bottom: 8px; color: rgba(255,255,255,.75); }
.fc-crumb a { color: #fff; text-decoration: none; opacity: .8; }
.fc-crumb a:hover { opacity: 1; text-decoration: underline; }
.fc-crumb span { opacity: .5; margin: 0 3px; }
.fc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.fc-act {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14.5px; font-weight: 720; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(7,20,38,.04);
}
.fc-act:hover { background: var(--soft); }
.fc-act-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.fc-act-primary:hover { background: #2447c9; }
.fc-cards { display: flex; flex-direction: column; gap: 10px; }
.fc-card-row {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px;
}
.fc-cr-main { flex: 1; min-width: 0; }
.fc-cr-front { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; font-weight: 700; color: var(--ink); }
.fc-cr-ipa { font-family: Georgia, serif; font-style: italic; font-weight: 400; font-size: 14px; color: var(--quiet); margin-left: 9px; }
.fc-cr-back { font-size: 14.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.fc-cr-ex { font-size: 13px; font-style: italic; color: var(--quiet); margin-top: 5px; }
.fc-cr-state { flex: none; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 30px; color: #556; background: #eef1f6; }
.fc-state-new { color: #1d4ed8; background: #e7eeff; }
.fc-state-learning, .fc-state-relearning { color: #b45309; background: #fdf0da; }
.fc-state-review { color: #0b7a4c; background: #e6f6ee; }

/* ── flashcard study (flip + SRS) ────────────────────────── */
.fc-study { max-width: 620px; margin: 0 auto; padding: 26px 18px 60px; }
.fc-study-top { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.fc-study-exit { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); color: var(--muted); text-decoration: none; font-size: 22px; line-height: 1; }
.fc-study-exit:hover { background: #e6e9f0; }
.fc-progress { flex: 1; height: 7px; border-radius: 4px; background: #e7eaf1; overflow: hidden; }
.fc-progress-bar { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 4px; transition: width .3s ease; }
.fc-study-count { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.fc-empty { text-align: center; padding: 40px 10px; }
.fc-empty-ico { font-size: 44px; margin-bottom: 8px; }
.fc-empty h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 26px; color: var(--ink); margin-bottom: 8px; }
.fc-empty p { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 400px; margin: 0 auto 20px; }

/* Sexy gradient flip card — same visual family as Flow Mode. */
/* Study card — ONE card, CLICK TO REVEAL (Quizlet-style; no "Show Answer" button,
   no fixed-height 3D faces that scroll). The card grows to fit its content so there's
   never a scrollbar, and is pinned to a comfortable min-height so it doesn't jump
   between the word side and the (taller) answer side. */
.fc-card {
  position: relative; width: 100%; min-height: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 44px 34px; border-radius: 26px; color: #fff; cursor: pointer; overflow: hidden;
  background: linear-gradient(150deg, #4f46e5, #7c3aed 55%, #4c1d95);
  box-shadow: 0 24px 70px -24px rgba(37,25,90,.7), inset 0 1px 0 rgba(255,255,255,.18);
  transition: background .5s ease; user-select: none; -webkit-tap-highlight-color: transparent;
}
.fc-card.revealed { background: linear-gradient(155deg, #131a3a, #24215e 55%, #3b2f7a); cursor: default; }
.fc-card:focus-visible { outline: 3px solid rgba(255,255,255,.55); outline-offset: 3px; }
.fc-card::before { content: ""; position: absolute; top: -26%; right: -12%; width: 66%; height: 66%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); pointer-events: none; }
.fc-card-face { position: relative; z-index: 1; width: 100%; }
.fc-card-face[hidden] { display: none; }
.fc-back-face { animation: fcReveal .38s cubic-bezier(.2,.75,.25,1); }
@keyframes fcReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fc-badge { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 16px; }
.fc-word { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; font-size: clamp(38px, 8vw, 58px); line-height: 1.02; letter-spacing: -.02em; }
.fc-respell { font-size: 17px; font-weight: 600; color: rgba(255,255,255,.85); margin-top: 12px; }
.fc-tap-hint { font-size: 12.5px; color: rgba(255,255,255,.55); margin-top: 22px; }
/* Learner-layer note on the card back (memory tip / plain meaning) — reinforces recall. */
.fc-note { margin-top: 16px; padding: 11px 14px; border-radius: 10px; text-align: left;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.17);
  color: rgba(255,255,255,.9); font-size: 14px; line-height: 1.5; }
.fc-note::before { content: "💡 "; }
.fc-note[hidden] { display: none; }
.fc-word-sm { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; font-size: 26px; margin-bottom: 12px; }
.fc-def { font-size: 20px; line-height: 1.45; font-weight: 500; }
.fc-ex { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; font-size: 15.5px; color: rgba(255,255,255,.82);
  margin-top: 14px; line-height: 1.5; border-left: 3px solid rgba(255,255,255,.4); padding-left: 13px; text-align: left; }
.fc-pron { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; width: 100%; }
.fc-pron-row { display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer; text-align: left;
  padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1); color: #fff; font-family: inherit; }
.fc-pron-row:hover { background: rgba(255,255,255,.18); }
.fc-pron-row:active { transform: scale(.99); }
.fc-pron-row svg { flex: none; }
.fc-pron-row img, .fc-pron-row .flag { width: 22px; height: auto; border-radius: 3px; flex: none; }
.fc-pron-lbl { font-size: 13.5px; font-weight: 700; }
.fc-pron-ipa { font-family: Georgia, serif; font-style: italic; font-size: 14px; color: rgba(255,255,255,.72); }
.fc-pron-spk { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(255,255,255,.92); color: #24215e; }
.fc-grade { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 20px; }
.fc-grade[hidden] { display: none; }
.fc-grade-q { grid-column: 1 / -1; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.fc-grade-q span { display: block; font-size: 12px; font-weight: 500; color: var(--quiet); margin-top: 1px; }
/* End-of-session summary — grade breakdown */
.fc-summary { display: flex; justify-content: center; gap: 12px; margin: 10px 0 22px; }
.fc-summary[hidden] { display: none; }
.fc-sum { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 66px;
  padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 12px; font-weight: 700; color: var(--muted); }
.fc-sum b { font-family: 'Source Serif 4', Georgia, serif; font-size: 24px; font-weight: 700; line-height: 1; }
.fc-sum-again { border-color: #f2b8c4; } .fc-sum-again b { color: #b3193c; }
.fc-sum-good  { border-color: #bcd0f7; } .fc-sum-good b  { color: #1d4ed8; }
.fc-sum-easy  { border-color: #b4e2cb; } .fc-sum-easy b  { color: #0b7a4c; }
.fc-g { display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center;
  height: 62px; border-radius: 12px; border: 1px solid; cursor: pointer; font-family: inherit; background: #fff; }
.fc-g span { font-size: 15px; font-weight: 780; }
.fc-g small { font-size: 11px; opacity: .8; font-weight: 600; }
.fc-g-again { border-color: #f2b8c4; color: #b3193c; }
.fc-g-again:hover { background: #fdecf1; }
.fc-g-good  { border-color: #bcd0f7; color: #1d4ed8; }
.fc-g-good:hover { background: #eef3fe; }
.fc-g-easy  { border-color: #b4e2cb; color: #0b7a4c; }
.fc-g-easy:hover { background: #e9f7ef; }

/* empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--ink);
}
.empty-state p { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 460px; margin: 0 auto 20px; }

/* generic hub/static page body */
.page-head {
  background: linear-gradient(150deg, #061220 0%, #0d2b58 60%, #12376e 100%);
  color: #fff;
  border-bottom: 3px solid var(--red);
  padding: 40px 0;
}
.page-head h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 10px;
}
.page-head p { font-size: 16px; color: rgba(255,255,255,.7); line-height: 1.6; max-width: 640px; }
.prose { padding: 32px 0 48px; max-width: 720px; }
.prose h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 22px; margin: 28px 0 12px; color: var(--ink); }
.prose p { font-size: 16px; line-height: 1.7; color: #2a3850; margin-bottom: 14px; }
.prose a { color: var(--blue); }

/* ── member auth (login / signup / reset) ─────────────────── */
.auth-wrap { display: flex; justify-content: center; padding: 52px 20px 72px; background: var(--soft); min-height: 60vh; }
.auth-card {
  width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 34px 34px 30px;
  box-shadow: 0 1px 2px rgba(7,20,38,.04), 0 22px 60px -28px rgba(7,20,38,.28);
}
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 27px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.auth-head p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: #33415a; }
.field input {
  height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fff; width: 100%;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,91,234,.14); }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; margin-top: -2px; }
.auth-check { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.auth-row a { color: var(--blue); text-decoration: none; font-weight: 600; }
.auth-row a:hover { text-decoration: underline; }
.auth-btn {
  height: 48px; border: 0; border-radius: 10px; background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 750; cursor: pointer; font-family: inherit; margin-top: 4px;
}
.auth-btn:hover { background: #2447c9; }
.auth-alt { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }
.auth-alt a { color: var(--blue); font-weight: 650; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-error { color: #b3193c; font-size: 13px; font-style: normal; }
.auth-linkbtn { background: none; border: 0; color: var(--blue); font: inherit; font-weight: 650; cursor: pointer; padding: 0; }
.auth-linkbtn:hover { text-decoration: underline; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--quiet); font-size: 12.5px; margin: 4px 0 2px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-status { background: #e6f6ee; border: 1px solid #b4e2cb; color: #0b7a4c; font-size: 13.5px;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; line-height: 1.45; }

/* password strength meter (public/js/password.js) */
.pw-meter { margin-top: -4px; }
.pw-bar { height: 6px; border-radius: 4px; background: #e7eaf1; overflow: hidden; }
.pw-bar-fill { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .25s ease, background .25s ease; }
.pw-strength { font-size: 12px; font-weight: 700; margin-top: 5px; min-height: 15px; }
.pw-reqs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
.pw-reqs li { font-size: 12px; color: var(--quiet); display: flex; align-items: center; gap: 7px; }
.pw-reqs li .pw-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd3e0; flex: none; transition: background .2s; }
.pw-reqs li.ok { color: #0b7a4c; }
.pw-reqs li.ok .pw-dot { background: #0f9d63; }
.auth-btn-danger { background: #b3193c; }
.auth-btn-danger:hover { background: #97102f; }

/* ── member account area ──────────────────────────────────── */
.acct-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.acct-nav a { padding: 11px 14px; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.acct-nav a:hover { color: var(--ink); }
.acct-nav a.active { color: var(--navy); border-bottom-color: var(--red); }
.acct-nav-logout { margin-left: auto; }
.acct-nav-logout button { background: none; border: 0; color: var(--quiet); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 11px 6px; }
.acct-nav-logout button:hover { color: #b3193c; }

.acct-verify { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #fdf6e3; border: 1px solid #f0d999; border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; font-size: 14px; color: #7a5a13; }
.acct-verify button { border: 0; background: #a9791a; color: #fff; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 8px; cursor: pointer; }

.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.acct-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; text-align: center; box-shadow: 0 1px 2px rgba(7,20,38,.04); }
.acct-stat b { display: block; font-family: 'Source Serif 4', Georgia, serif; font-size: 30px; font-weight: 700; color: var(--ink); }
.acct-stat span { font-size: 13px; color: var(--muted); font-weight: 600; }

.fc-hub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fc-hub-add { font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; white-space: nowrap; }
.fc-hub-add:hover { text-decoration: underline; }
.fc-hub-manage { font-size: 13px; color: var(--muted); margin-top: 12px; }
.fc-hub-manage a { color: var(--blue); font-weight: 600; text-decoration: none; }
/* ready-made deck catalogue on the flashcards hub */
.fc-ready-intro { font-size: 14px; color: var(--muted); margin: -6px 0 16px; }
.fc-cat-head { font-family: 'Source Serif 4', Georgia, serif; font-size: 16px; font-weight: 700; color: var(--ink); margin: 20px 0 12px; }
.fc-ready-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fc-ready-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; text-decoration: none; box-shadow: 0 1px 2px rgba(7,20,38,.04);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.fc-ready-card:hover { border-color: var(--blue); box-shadow: 0 8px 20px -10px rgba(47,91,234,.35); transform: translateY(-1px); }
.fc-ready-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.fc-ready-meta { font-size: 12.5px; color: var(--quiet); font-weight: 600; }
.fc-ready-cta { font-size: 13px; font-weight: 700; color: var(--blue); margin-top: 8px; }
.acct-decks { display: flex; flex-direction: column; gap: 10px; }
.acct-deck { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.acct-deck-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.acct-deck-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 17px; font-weight: 700; color: var(--ink); }
.acct-deck-count { font-size: 13px; color: var(--quiet); }
.acct-deck-actions { display: flex; gap: 6px; flex: none; }
.acct-deck-actions a, .acct-deck-btn { font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-family: inherit; }
.acct-deck-actions a:hover, .acct-deck-btn:hover { background: var(--soft); }
.acct-deck-delform { display: inline; }
.acct-deck-del { color: #b3193c; }
.acct-deck-del:hover { background: #fdecf1; }
.acct-deck { flex-wrap: wrap; }
.acct-rename { flex-basis: 100%; display: flex; gap: 8px; margin-top: 4px; }
.acct-rename[hidden] { display: none; }
.acct-rename input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; }
.acct-rename input:focus { outline: none; border-color: var(--blue); }
.acct-rename button { flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; }

.acct-panels { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.acct-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.acct-panel h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.acct-panel .auth-btn { align-self: flex-start; padding: 0 22px; }
.acct-danger { border-color: #f2c2ce; }
.acct-danger h2 { color: #b3193c; }
.acct-danger > p { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.acct-hint { font-size: 13px; color: var(--muted); margin-top: -4px; }
.acct-hint a { color: var(--blue); font-weight: 600; text-decoration: none; }
.acct-empty { color: var(--muted); font-size: 15px; }
.acct-empty a { color: var(--blue); font-weight: 600; text-decoration: none; }
@media (max-width: 560px) { .acct-stats { grid-template-columns: 1fr; } .acct-deck { flex-wrap: wrap; } }

/* responsive */
/* Hide the main nav before it overflows the header (no hamburger yet — topline
   + footer still carry navigation). Prevents the tablet-width horizontal scroll. */
@media (max-width: 1120px) {
  .nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
}
@media (max-width: 560px) {
  .ssb-scope, .ssb-sep { display: none; }
  .ssb-btn { padding: 0 18px; }
  .ssb { gap: 8px; padding-left: 14px; }
  .brand { font-size: 22px; }
}

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-wod { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .lang-table-full { grid-template-columns: repeat(3, 1fr); }
  .newsletter-inner { grid-template-columns: 1fr; }
  .games-strip { grid-template-columns: 1fr 1fr; }
  .trending-words { grid-template-columns: 1fr 1fr; }
  .tools-row { grid-template-columns: repeat(2, 1fr); }
  .entry-grid { grid-template-columns: 1fr; }
  .featured-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .topline-inner > span { display: none; }
  .topline nav { gap: 14px; margin: 0 auto; }
  .two-col { grid-template-columns: 1fr; }
  .trending-words { grid-template-columns: 1fr; }
  .discover { grid-template-columns: 1fr; }
  .flash-strip { grid-template-columns: 1fr; gap: 18px; }
  .flash-btn { justify-self: start; }
  .tools-row { grid-template-columns: 1fr 1fr; }
  .trans-strip { grid-template-columns: 1fr; }
}

/* ── TRENDING / MOST-SEARCHED LEADERBOARD (hubs/trending) ── */
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.rank-col { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 10px; }
.rank-col-head { display: flex; align-items: center; gap: 10px; }
.rank-col-head h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.015em; }
.rank-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; }
.rank-badge-live { background: var(--green-lt); color: var(--green); }
.rank-badge-warm { background: var(--blue-soft); color: var(--blue); }
.rank-col-sub { font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.rank-list { list-style: none; counter-reset: rank; }
.rank-item { display: flex; align-items: baseline; gap: 14px; padding: 11px 8px; border-radius: 8px; border-top: 1px solid var(--line); text-decoration: none; transition: background .12s ease; }
.rank-list li:first-child .rank-item { border-top: 0; }
.rank-item:hover { background: var(--soft); }
.rank-num { flex: 0 0 26px; font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; font-weight: 700; color: var(--line-strong); text-align: right; font-variant-numeric: tabular-nums; }
.rank-list li:nth-child(-n+3) .rank-num { color: var(--blue); }
.rank-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rank-word { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; font-weight: 600; color: var(--navy); letter-spacing: -.01em; }
.rank-pos { font-size: 11px; font-style: italic; color: var(--red); }
.rank-def { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-empty { font-size: 14px; color: var(--muted); padding: 12px 0 20px; }
@media (max-width: 780px) { .rank-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ── COMPACT rankings (dictionary hub — small selection, links to full /trending/) ── */
.rank-grid-compact { margin-bottom: 34px; }
.rank-grid-compact .rank-col { padding: 18px 18px 8px; }
.rank-col-head .rank-seeall { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; white-space: nowrap; }
.rank-col-head .rank-seeall:hover { text-decoration: underline; }
.rank-list-compact .rank-item { padding: 8px 6px; }
.rank-list-compact .rank-word { font-size: 17px; }
.rank-list-compact .rank-body { flex-direction: row; align-items: baseline; gap: 8px; }
