/* vocabularybuilding.org — Liquid Glass look. Colours and glass values follow the glisse tokens,
   so the static pages match the games, which use the glisse components themselves. */
:root {
  --bg: #f2f2f7;
  --ink: rgb(0 0 0 / 0.88);
  --muted: rgb(60 60 67 / 0.62);
  --rule: rgb(60 60 67 / 0.15);
  --glass: rgb(255 255 255 / 0.62);
  --glass-strong: rgb(255 255 255 / 0.8);
  --panel: rgb(255 255 255 / 0.72);
  --shadow-s: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 18px rgb(25 25 35 / 0.07);
  --edge: rgb(255 255 255 / 0.7);
  --shadow: 0 1px 1px rgb(0 0 0 / 0.04), 0 12px 40px rgb(25 25 35 / 0.1);
  --fill: #0088ff;
  --on-fill: #fff;
  --soft: rgb(118 118 128 / 0.12);
  --mark: rgb(255 214 10 / 0.38);
  --glow-1: rgb(0 136 255 / 0.3);
  --glow-2: rgb(175 82 222 / 0.26);
  --glow-3: rgb(255 45 85 / 0.2);
  --glow-4: rgb(48 209 88 / 0.2);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --measure: 46rem;
  --r: 28px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000;
    --ink: #fff;
    --muted: rgb(235 235 245 / 0.62);
    --rule: rgb(235 235 245 / 0.16);
    --glass: rgb(44 44 48 / 0.6);
    --glass-strong: rgb(44 44 48 / 0.82);
    --panel: rgb(36 36 40 / 0.78);
    --shadow-s: 0 6px 18px rgb(0 0 0 / 0.3);
    --edge: rgb(255 255 255 / 0.1);
    --shadow: 0 12px 40px rgb(0 0 0 / 0.4);
    --fill: #0091ff;
    --soft: rgb(118 118 128 / 0.24);
    --mark: rgb(255 214 10 / 0.3);
    --glow-1: rgb(0 145 255 / 0.36);
    --glow-2: rgb(191 90 242 / 0.3);
    --glow-3: rgb(255 55 95 / 0.24);
    --glow-4: rgb(48 209 88 / 0.18);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
/* Soft colour behind the glass: without it glass has nothing to blur. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
  background:
    radial-gradient(42rem 32rem at 8% -6%, var(--glow-1), transparent 70%),
    radial-gradient(40rem 30rem at 96% 2%, var(--glow-2), transparent 70%),
    radial-gradient(38rem 30rem at 82% 92%, var(--glow-3), transparent 70%),
    radial-gradient(40rem 30rem at 4% 96%, var(--glow-4), transparent 70%);
}
a { color: var(--fill); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--fill) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.wrap { max-width: 82rem; margin: 0 auto; padding: 0 1.5rem; }
.site-head .wrap {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}
/* Panels sit on a background that does not move, so blurring it would cost paint time and change nothing. */
.keypoints, .note-box, .try, .tool, .level-cards a, .table-wrap, .wordlist, .foot-nav, .hero-links, .figures div, details {
  background: var(--panel);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow-s);
}

/* Header: a floating capsule */
.site-head { position: sticky; top: 0.8rem; z-index: 20; padding: 0 1.5rem; margin-top: 0.8rem; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1.5rem; padding: 0.55rem 0.7rem 0.55rem 1.4rem; border-radius: 999px; max-width: 79rem; }
.brand { color: var(--ink); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0.15rem; font-size: 0.95rem; font-weight: 500; }
.nav a { color: var(--ink); padding: 0.5rem 1rem; border-radius: 999px; }
.nav a:hover { background: var(--soft); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--glass-strong); box-shadow: 0 1px 4px rgb(0 0 0 / 0.12); }

/* Buttons and chips */
.btn { display: inline-block; font: 600 1.0625rem/1.2 var(--sans); padding: 0.9rem 1.8rem; border-radius: 999px; border: 0; background: var(--fill); color: var(--on-fill); cursor: pointer; box-shadow: 0 6px 20px color-mix(in srgb, var(--fill) 35%, transparent); transition: transform 0.15s, filter 0.15s; }
.btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--edge); box-shadow: var(--shadow-s); }
.btn.small { font-size: 0.95rem; padding: 0.65rem 1.3rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0 auto 1.6rem; padding: 0.3rem; list-style: none; width: fit-content; max-width: 100%; border-radius: 999px; background: var(--soft); }
.chips li { margin: 0; }
.chip { display: inline-block; font: 600 0.95rem/1.2 var(--sans); padding: 0.5rem 1.15rem; border-radius: 999px; color: var(--ink); }
.chip:hover { background: var(--glass); text-decoration: none; }
.chip[aria-current] { background: var(--glass-strong); box-shadow: 0 1px 4px rgb(0 0 0 / 0.14); }

/* Article */
main { padding: 3.2rem 0 4rem; }
.entry { max-width: var(--measure); margin: 0 auto; }
.entry.wide, .entry.home { max-width: none; }
.kicker { font: 600 0.95rem/1.3 var(--sans); color: var(--muted); margin: 0 0 0.7rem; text-align: center; }
.kicker a { color: var(--fill); }
h1 { font-size: 3.2rem; line-height: 1.06; margin: 0 0 1rem; letter-spacing: -0.035em; font-weight: 700; text-align: center; text-wrap: balance; }
h2 { font-size: 1.9rem; line-height: 1.15; margin: 3rem 0 0.8rem; font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.3rem; line-height: 1.25; margin: 2rem 0 0.5rem; font-weight: 600; letter-spacing: -0.015em; }
h2 + h3 { margin-top: 1rem; }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.3rem 0; }
li::marker { color: var(--muted); }
.lede { font-size: 1.35rem; line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 1.2rem; }
.byline { font-size: 0.9rem; color: var(--muted); margin: 0 0 2.4rem; text-align: center; }
.byline a { color: var(--muted); }
.entry-head { display: flex; flex-direction: column; margin-bottom: 2.2rem; }
.entry-head .byline { order: 1; margin-bottom: 1.8rem; }
.entry-head .lede { order: 2; margin-bottom: 0; }
strong { font-weight: 600; }
em { font-style: italic; }
mark { background: var(--mark); color: inherit; padding: 0 0.12em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
abbr[title] { text-decoration: underline dotted var(--muted); cursor: help; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* Home hero */
.hero { text-align: center; padding: 3.5rem 0 3.5rem; }
.hero h1 { font-size: 5.6rem; line-height: 1; letter-spacing: -0.045em; margin-bottom: 1.4rem; }
.hero .tagline { font-size: 1.5rem; line-height: 1.35; color: var(--muted); max-width: 38rem; margin: 0 auto 2.2rem; letter-spacing: -0.01em; }
.hero .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin: 0 0 3rem; }
.hero .cta .btn { font-size: 1.2rem; padding: 1.1rem 2.8rem; }
.hero .label { font-size: 0.95rem; font-weight: 600; color: var(--muted); margin: 0 0 0.8rem; }
.hero .chips { margin-bottom: 0; }
.hero-links { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: var(--r); margin: 0 0 4rem; padding: 0.5rem; font-size: 1.15rem; font-weight: 600; text-align: center; }
.hero-links a { color: var(--ink); padding: 1.1rem 1rem; border-radius: 22px; }
.hero-links a:hover { background: var(--soft); text-decoration: none; }

/* Summary box and callouts */
.keypoints { border-radius: var(--r); padding: 1.4rem 1.6rem 0.6rem; margin: 0 0 2.4rem; }
.keypoints h2 { font: 600 0.9rem/1.3 var(--sans); letter-spacing: 0; color: var(--muted); margin: 0 0 0.5rem; }
.keypoints ul { margin-bottom: 0.7rem; }
.note-box { border-radius: 22px; padding: 1.1rem 1.3rem 0.3rem; margin: 1.5rem 0; }
/* On articles: the free test and games, right under the title. */
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; border-radius: var(--r); padding: 1rem 1.2rem; margin: 0 0 2rem; }
.try p { flex: 1 1 16rem; margin: 0; font: 500 1rem/1.4 var(--sans); }
.try .btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.note-box > strong:first-child { font: 600 0.9rem/1.3 var(--sans); color: var(--muted); display: block; margin-bottom: 0.35rem; }

/* Numbers */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin: 1.6rem 0 2.4rem; padding: 0; }
.figures div { border-radius: 24px; padding: 1.4rem 1.4rem 1.3rem; }
.figures dt { font-size: 2.3rem; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.figures dd { margin: 0.5rem 0 0; font-size: 0.9rem; line-height: 1.4; color: var(--muted); }

/* Tables sit on a pane of glass */
.table-wrap { overflow-x: auto; margin: 0 0 1.6rem; border-radius: 22px; padding: 0.4rem 1.1rem 0.6rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.4; font-variant-numeric: tabular-nums; margin: 0; }
caption { text-align: left; font-size: 0.86rem; line-height: 1.45; color: var(--muted); padding: 0.7rem 0.65rem 0.5rem; caption-side: top; }
th, td { text-align: left; padding: 0.7rem 0.65rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
thead th { font-weight: 600; font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover { background: var(--soft); }
tr.ours td { background: var(--soft); }
table.compact { font-size: 0.86rem; }
table.compact th, table.compact td { padding: 0.45rem 0.45rem; }
td .note { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
td .pos { font-style: italic; color: var(--muted); font-size: 0.9em; }
td .src { color: var(--muted); font-size: 0.85em; }
table.narrow { width: auto; min-width: 21rem; }
table.novels td:nth-child(2) { min-width: 11rem; }
/* Word list of a level: thousands of rows, so each block of rows is laid out only when it nears the screen */
.wordlist { border-radius: 22px; padding: 0.6rem 1.4rem 0.8rem; margin: 0 0 1.6rem; font-size: 0.95rem; line-height: 1.4; }
.wordlist .cap { font-size: 0.86rem; color: var(--muted); margin: 0.5rem 0 0.6rem; }
.wordlist .row { display: grid; grid-template-columns: 14rem 9rem 1fr; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.wordlist .head { font-weight: 600; font-size: 0.82rem; color: var(--muted); }
.wordlist .row b { font-weight: 600; font-size: 1.05rem; }
.wordlist .row i { font-style: normal; color: var(--muted); }
.wordlist .chunk { content-visibility: auto; contain-intrinsic-size: auto 2760px; }

/* Plan (gs.html) */
.days { list-style: none; padding: 0; counter-reset: day; }
.days > li { position: relative; padding: 0 0 0.4rem 3.6rem; margin: 0 0 1.4rem; }
.days > li::before { counter-increment: day; content: "Day " counter(day); position: absolute; left: 0; top: 0.3rem; font-weight: 600; font-size: 0.85rem; color: var(--fill); width: 3rem; }
.days > li h3 { margin-top: 0; }

/* References */
.refs { font-size: 0.92rem; line-height: 1.5; padding-left: 1.6rem; }
.refs li { margin: 0 0 0.6rem; }
.refs li:target { background: var(--mark); border-radius: 6px; }
sup.fn a { font-weight: 600; font-size: 0.7rem; padding: 0 0.1rem; }
details { border-radius: 18px; padding: 0.8rem 1.1rem; margin: 0 0 0.6rem; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 0.6rem; }

/* Bar charts (novel and chapter lengths) */
.bars { margin: 0.8rem 0 1.8rem; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.bars .row { display: grid; grid-template-columns: 9.5rem 1fr 3rem; gap: 0.7rem; align-items: center; margin: 0.35rem 0; }
.bars .lab { color: var(--muted); }
.bars .bar { display: block; height: 0.8rem; background: var(--fill); min-width: 2px; border-radius: 999px; }
.bars .bar.under { background: var(--muted); }
.bars .n { text-align: right; }
.bars figcaption { color: var(--muted); font-size: 0.86rem; margin-top: 0.5rem; }

.cluster { margin-top: 2.5rem; border-top: 1px solid var(--rule); padding-top: 0.5rem; }
.cluster h2 { margin-top: 1rem; font: 600 0.9rem/1.3 var(--sans); letter-spacing: 0; color: var(--muted); }
.cluster ul { font-size: 0.95rem; line-height: 1.5; }
.cluster li { margin-bottom: 0.4rem; }

/* Footer: every page of the site, by group */
.site-foot { font-size: 0.92rem; color: var(--muted); padding-bottom: 2.5rem; }
.foot-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem 2rem; border-radius: var(--r); padding: 2rem; }
.foot-nav h2 { font: 600 0.9rem/1.3 var(--sans); letter-spacing: 0; color: var(--ink); margin: 0 0 0.7rem; }
.foot-nav ul { list-style: none; padding: 0; margin: 0; }
.foot-nav li { margin: 0 0 0.4rem; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
.site-foot p { margin: 1.4rem 0.6rem 0; max-width: 60rem; font-size: 0.85rem; }

/* Tools: the test and the practice quiz */
.tool { max-width: 44rem; margin: 0 auto 3rem; padding: 2.6rem 2rem; border-radius: 32px; text-align: center; }
/* Language of the meanings on the word lists (native.js) */
.native-pick { text-align: center; margin: 0 auto 1rem; font: 500 0.95rem/1.3 var(--sans); color: var(--muted); }
.native-pick select { font: 600 0.95rem/1.2 var(--sans); color: var(--ink); background: var(--panel); border: 1px solid var(--edge);
  border-radius: 999px; padding: 0.4rem 0.9rem; margin-left: 0.3rem; max-width: 14rem; cursor: pointer; }
.tool-progress { font-size: 0.95rem; color: var(--muted); margin: 0 auto 2rem; max-width: 26rem; }
.tool-progress .bar { display: block; height: 6px; background: var(--soft); margin-top: 0.7rem; border-radius: 999px; overflow: hidden; }
.tool-progress .bar i { display: block; height: 100%; background: var(--fill); border-radius: 999px; }
.tool-word { font-size: 4.4rem; line-height: 1.05; font-weight: 700; letter-spacing: -0.04em; margin: 0 0 0.8rem; overflow-wrap: anywhere; }
.tool-hint { font-size: 1.1rem; color: var(--muted); margin: 0 0 1.6rem; }
.tool-lead { font-size: 1.2rem; line-height: 1.4; margin: 0 auto 1.6rem; max-width: 32rem; }
.tool-note { font-size: 0.95rem; color: var(--muted); margin: 0 0 1.2rem; }
.tool-keys { font-size: 0.85rem; color: var(--muted); margin: 1.4rem 0 0; }
.tool-verdict { font-weight: 600; font-size: 1.1rem; margin: 1.4rem 0 1rem; }
.tool-answers { display: grid; gap: 0.6rem; max-width: 34rem; margin: 0 auto; }
.tool-answers.two { grid-template-columns: 1fr 1fr; max-width: 30rem; }
.tool button { cursor: pointer; font-family: var(--sans); }
.opt { font-size: 1.05rem; line-height: 1.35; padding: 0.95rem 1.4rem; border-radius: 20px; border: 1px solid var(--edge); background: var(--glass-strong); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); transition: transform 0.12s; }
.opt:hover:not(:disabled) { transform: translateY(-1px); }
.opt:disabled { cursor: default; opacity: 0.5; }
.opt.right { background: #34c759; color: #fff; opacity: 1; border-color: transparent; }
.opt.wrong { background: #ff383c; color: #fff; opacity: 1; border-color: transparent; }
.tool-bars { max-width: 26rem; margin: 0 auto 1.8rem; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.tool-bars .row { display: grid; grid-template-columns: 2.2rem 1fr 3rem; gap: 0.8rem; align-items: center; margin: 0.45rem 0; }
.tool-bars .bar { display: block; height: 0.7rem; background: var(--soft); border-radius: 999px; overflow: hidden; }
.tool-bars .bar i { display: block; height: 100%; background: var(--fill); border-radius: 999px; }
.tool-bars .lab { font-weight: 600; }
.tool-bars .n { text-align: right; color: var(--muted); }
.tool-missed { text-align: left; max-width: 34rem; margin: 0 auto 1.8rem; border-top: 1px solid var(--rule); }
.tool-missed dt { font-weight: 600; font-size: 1.1rem; padding-top: 0.7rem; }
.tool-missed dd { margin: 0; padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule); font-size: 0.95rem; color: var(--muted); }

/* Level cards */
.level-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin: 1.6rem 0 3rem; }
.level-cards a { display: block; border-radius: 26px; padding: 1.4rem 1.3rem; color: var(--ink); transition: transform 0.2s; }
.level-cards a:hover { text-decoration: none; transform: translateY(-4px); }
.level-cards .lv { display: block; font-size: 2.6rem; line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.level-cards .nm { display: block; font-weight: 600; margin-top: 0.7rem; }
.level-cards .ct { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 0.15rem; }

/* Game cards */
.game-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem 1.2rem; margin: 1.6rem 0 3rem; }
.game-cards a { display: block; color: var(--ink); }
.game-cards a:hover { text-decoration: none; }
.game-cards img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 26px; box-shadow: var(--shadow-s); transition: transform 0.2s; }
.game-cards a:hover img { transform: translateY(-4px) scale(1.01); }
.game-cards .t { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0.9rem 0.3rem 0; }
.game-cards .d { display: block; font-size: 0.92rem; line-height: 1.4; color: var(--muted); margin: 0.3rem 0.3rem 0; }
#game { margin: 0 0 3rem; }

/* Wide pages: tables and tools take the full width, running text keeps a readable line */
.entry.wide > h2, .entry.wide > h3, .entry.wide > p, .entry.wide > ul, .entry.wide > ol, .entry.wide > section,
.entry.wide .entry-head .lede { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.entry.wide .entry-head .lede { text-align: center; color: var(--muted); }
.entry.wide > .full, .entry.home h2, .entry.home p { max-width: none; }

@media (max-width: 1100px) {
  .game-cards { grid-template-columns: repeat(3, 1fr); }
  .level-cards { grid-template-columns: repeat(3, 1fr); }
  .foot-nav { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 1rem; }
  /* On a phone the header scrolls away with the page: a sticky one would cover the game. */
  .site-head { position: static; padding: 0 0.6rem; margin-top: 0.5rem; }
  .site-head .wrap { border-radius: 26px; padding: 0.6rem 0.5rem 0.4rem 0.5rem; justify-content: center; }
  .brand { width: 100%; justify-content: center; }
  .nav { font-size: 0.86rem; justify-content: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  html { scroll-padding-top: 0.5rem; }
  /* Game pages: the game should be on the first screen */
  .entry.play .kicker, .entry.play .entry-head .lede { display: none; }
  .entry.play .entry-head { margin-bottom: 0.9rem; }
  .entry.play h1 { font-size: 1.6rem; margin: 0; }
  main:has(.entry.play) { padding-top: 1rem; }
  .nav a { padding: 0.4rem 0.65rem; }
  .nav { flex-wrap: nowrap; }
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.55rem; margin-top: 2.4rem; }
  .lede { font-size: 1.15rem; }
  main { padding-top: 2rem; }
  .hero { padding: 1.4rem 0 2.4rem; }
  .hero h1 { font-size: 3.1rem; }
  .hero .tagline { font-size: 1.15rem; margin-bottom: 1.6rem; }
  .hero .cta { margin-bottom: 2rem; }
  .hero .cta .btn { flex: 1 1 100%; }
  .chip { font-size: 0.9rem; padding: 0.45rem 0.8rem; }
  .chips { flex-wrap: wrap; justify-content: center; border-radius: 22px; }
  .hero-links { grid-template-columns: 1fr; font-size: 1.05rem; margin-bottom: 3rem; }
  .hero-links a { text-align: left; padding: 0.9rem 1rem; }
  .hero-links a::after { content: "\203A"; float: right; color: var(--muted); }
  .foot-nav { grid-template-columns: 1fr 1fr; padding: 1.3rem; }
  .tool { padding: 1.8rem 1.1rem; border-radius: 26px; }
  .tool-word { font-size: 3rem; }
  .tool-answers.two .btn { padding-left: 0.6rem; padding-right: 0.6rem; }
  .level-cards { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .game-cards { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .game-cards .t { font-size: 1.15rem; }
  .game-cards img { border-radius: 18px; }
  .table-wrap { padding: 0.2rem 0.5rem 0.4rem; border-radius: 18px; }
  .wordlist { padding: 0.4rem 0.9rem 0.6rem; border-radius: 18px; }
  .wordlist .row { grid-template-columns: 7.5rem 1fr; gap: 0.7rem; }
  .wordlist .row i { display: none; }
  .wordlist .chunk { contain-intrinsic-size: auto 3600px; }
  .days > li { padding-left: 0; }
  .days > li::before { position: static; display: block; margin-bottom: 0.35rem; }
  .figures dt { font-size: 1.9rem; }
  .bars .row { grid-template-columns: 7.6rem 1fr 2.6rem; gap: 0.5rem; }
  table.wordlist thead { display: none; }
  table.wordlist tr { display: grid; grid-template-columns: 1.8rem 1fr auto; gap: 0.25rem 0.5rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  table.wordlist td { display: block; padding: 0; border: 0; }
  table.wordlist td:nth-child(3)::after { content: " books"; color: var(--muted); font-size: 0.85em; }
  table.wordlist td:nth-child(4) { display: none; }
  table.wordlist td:nth-child(5) { grid-column: 2 / -1; font-size: 0.95em; }
  /* On phones the novels table keeps title, words and chapters; author and vocabulary are in the CSV */
  table.novels th:nth-child(3), table.novels td:nth-child(3),
  table.novels th:nth-child(7), table.novels td:nth-child(7) { display: none; }
  table.novels td:nth-child(2) { min-width: 9rem; }
}
@media (hover: none) { .tool-keys { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  body { background: #fff; color: #000; }
  body::before, .site-head .nav, .site-foot { display: none; }
  a { color: inherit; }
}

/* My words */
.my-form { display: grid; gap: 0.7rem; margin: 0 0 1.6rem; }
.my-form input, .my-form textarea { width: 100%; font: 1rem/1.45 var(--sans); color: var(--ink); background: var(--glass-strong); border: 1px solid var(--rule); border-radius: 16px; padding: 0.8rem 1rem; }
.my-form textarea { resize: vertical; min-height: 9rem; }
.my-form input:focus, .my-form textarea:focus { outline: 3px solid color-mix(in srgb, var(--fill) 45%, transparent); border-color: transparent; }
.my-form .btn { justify-self: center; }
.my-list { text-align: left; border-top: 1px solid var(--rule); padding: 1.2rem 0 0.6rem; }
.my-list h3 { margin: 0 0 0.2rem; }
.my-plays { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.6rem; }
.my-plays .chip { background: var(--soft); }
.my-plays .chip:hover { background: var(--fill); color: #fff; }
.my-del { background: none; border: 0; padding: 0; font-size: 0.88rem; color: var(--muted); text-decoration: underline; }
code { font: 0.86em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 0.1em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
.note-box ol { padding-left: 1.3rem; }

/* Language choice in the test */
.tool-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; margin: 0 0 1.4rem; }
.tool-langs .chip { border: 0; background: var(--soft); font-family: var(--sans); }
.tool-langs .chip.on { background: var(--fill); color: #fff; }
.tool-bars .row { grid-template-columns: 3rem 1fr 3rem; }
/* The page must not cost anything while it scrolls: no blur behind the header, and the colour wash scrolls with the page */
.site-head .wrap { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong); }
body::before { position: absolute; height: 70rem; transform: none; }
body { position: relative; }

/* My words: the form, the table of lists, the choice of game */
.my-title { font-size: 1.3rem; margin: 0 0 1rem; text-align: left; }
.my-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.7rem; }
.my-actions { display: flex; gap: 0.6rem; justify-content: center; }
.my-table td { vertical-align: middle; }
.my-table td b { display: block; font-size: 1.05rem; }
.my-table .note { display: block; color: var(--muted); font-size: 0.85rem; }
.my-act { white-space: nowrap; text-align: right; }
.my-act .btn { margin-left: 0.35rem; box-shadow: none; }
.my-table th:last-child { text-align: right; }
.btn.danger { color: #ff383c; }
.my-dialog { width: min(46rem, calc(100vw - 2rem)); border: 0; border-radius: 28px; padding: 1.8rem; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / 0.35); text-align: center; }
.my-dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.my-dialog h2 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.my-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin: 1.2rem 0 1.4rem; text-align: left; }
.my-game { display: block; color: var(--ink); }
.my-game:hover { text-decoration: none; }
.my-game img { display: block; width: 100%; height: auto; border-radius: 16px; transition: transform 0.15s; }
a.my-game:hover img { transform: translateY(-3px); }
.my-game b { display: block; margin: 0.5rem 0.2rem 0; font-size: 1.05rem; }
.my-game small { display: block; margin: 0.2rem 0.2rem 0; font-size: 0.78rem; line-height: 1.35; color: var(--muted); }
.my-game.off img { filter: grayscale(1); opacity: 0.4; }
@media (max-width: 640px) {
  .my-two { grid-template-columns: 1fr; }
  .my-games { grid-template-columns: 1fr 1fr; }
  .my-dialog { padding: 1.2rem; border-radius: 22px; }
  /* Each list becomes a card: the table has too many columns for a phone */
  .my-table thead { display: none; }
  .my-table, .my-table tbody, .my-table tr, .my-table td { display: block; width: 100%; }
  .my-table tr { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
  .my-table tbody tr:last-child { border-bottom: 0; }
  .my-table td { border: 0; padding: 0.15rem 0.3rem; text-align: left; }
  .my-table td:not(:first-child):not(.my-act) { display: flex; justify-content: space-between; font-size: 0.92rem; }
  .my-table td:not(:first-child):not(.my-act)::before { content: attr(data-label); color: var(--muted); }
  .my-act { white-space: normal; padding-top: 0.7rem !important; display: flex !important; gap: 0.4rem; }
  .my-act .btn { margin: 0; flex: 1; padding-left: 0.4rem; padding-right: 0.4rem; }
}

/* My words: the form in the middle, an assistant on each side */
.my-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 44rem) minmax(0, 1fr); gap: 1.4rem; align-items: stretch; margin: 0 0 3rem; }
.my-top .tool { margin: 0; max-width: none; }
.ai-card { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.8rem 1.5rem; border-radius: 32px; color: #fff; text-align: left; box-shadow: var(--shadow-s); transition: transform 0.2s; }
.ai-card:hover { text-decoration: none; transform: translateY(-4px); }
.ai-card.gpt { background: linear-gradient(160deg, #1f1f23, #0d0d10); }
.ai-card.claude { background: linear-gradient(160deg, #e08a6c, #c15f3c); }
.ai-card > span { display: block; }
.ai-logo { width: 84px; height: 84px; border-radius: 24px; background: rgb(255 255 255 / 0.14); display: flex !important; align-items: center; justify-content: center; }
.ai-kicker { font-size: 0.85rem; font-weight: 600; opacity: 0.75; margin-bottom: -0.5rem; }
.ai-title { font-size: 1.65rem; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; }
.ai-chat { display: flex !important; flex-direction: column; gap: 0.5rem; padding: 0.9rem; border-radius: 20px; background: rgb(255 255 255 / 0.1); font-size: 0.88rem; line-height: 1.35; }
.ai-chat > span { display: block; padding: 0.55rem 0.8rem; border-radius: 16px; max-width: 92%; }
.ai-me { align-self: flex-end; background: #0088ff; border-bottom-right-radius: 5px !important; }
.ai-bot { align-self: flex-start; background: rgb(255 255 255 / 0.92); color: #1c1c1e; border-bottom-left-radius: 5px !important; }
.ai-link { display: block; margin-top: 0.3rem; color: #0088ff; font-weight: 600; overflow-wrap: anywhere; }
.ai-done { align-self: center; background: #34c759; font-weight: 600; text-align: center; }
.ai-steps { display: grid !important; gap: 0.45rem; font-size: 0.92rem; line-height: 1.3; }
.ai-steps span { display: flex; gap: 0.6rem; align-items: baseline; }
.ai-steps b { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: rgb(255 255 255 / 0.2); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.ai-btn { margin-top: auto; align-self: stretch; text-align: center; padding: 0.9rem 1rem; border-radius: 999px; background: #fff; color: #111; font-weight: 600; font-size: 1.05rem; }
@media (max-width: 1150px) {
  .my-top { grid-template-columns: 1fr 1fr; }
  .my-top .tool { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 640px) {
  .my-top { grid-template-columns: 1fr; gap: 1rem; }
  .my-top .tool { order: -1; }
  .ai-card { padding: 1.4rem 1.2rem; border-radius: 26px; }
  .ai-title { font-size: 1.4rem; }
  .ai-logo { width: 68px; height: 68px; border-radius: 20px; }
  .ai-logo img { width: 44px; height: 44px; }
}

/* Home: short top, the games on the first screen */
.hero { padding: 1.6rem 0 2rem; }
.hero h1 { font-size: 4.2rem; margin-bottom: 0.8rem; }
.hero .tagline { font-size: 1.3rem; margin-bottom: 1.4rem; }
.hero .cta { margin-bottom: 0; }
.hero .cta .btn { font-size: 1.1rem; padding: 0.95rem 2.2rem; }
.entry.home .game-cards { margin-top: 0; margin-bottom: 1.2rem; }
main:has(.entry.home) { padding-top: 1.6rem; }
#games { scroll-margin-top: 5rem; }
@media (max-width: 640px) {
  .hero { padding: 0.6rem 0 1.4rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero .tagline { font-size: 1.05rem; margin-bottom: 1.1rem; }
  .hero .cta .btn { flex: 1 1 100%; padding: 0.9rem 1rem; }
  main:has(.entry.home) { padding-top: 1rem; }
}

button.my-game { background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }

/* Unfinished game: a bar above the page with one button and a way to hide it */
.resume-bar { display: flex; align-items: center; gap: 0.9rem; max-width: 44rem; margin: 0 auto 1.6rem; padding: 0.7rem 0.8rem 0.7rem 1.3rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--edge); box-shadow: var(--shadow-s); }
.resume-bar p { flex: 1; min-width: 0; margin: 0; font-size: 0.98rem; line-height: 1.35; }
.resume-bar .btn { flex: none; padding: 0.6rem 1.2rem; font-size: 0.98rem; box-shadow: none; }
.resume-close { flex: none; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: none; color: var(--muted); font: 400 1.5rem/1 var(--sans); cursor: pointer; }
.resume-close:hover { background: var(--glass); color: var(--ink); }
@media (max-width: 640px) {
  .resume-bar { flex-wrap: wrap; border-radius: 22px; padding: 0.9rem 1rem; gap: 0.6rem; margin-bottom: 1rem; }
  .resume-bar p { flex: 1 1 100%; padding-right: 2.2rem; }
  .resume-bar .btn { flex: 1; text-align: center; }
  .resume-close { position: absolute; top: 0.35rem; right: 0.4rem; }
  .resume-bar { position: relative; }
}
