:root { --series-ink: #14252d; --series-accent: #13646a; --series-paper: #faf7f1; --series-line: #cfdbd7; }
* { box-sizing: border-box; }
.crossword-index { margin: 0; background: var(--series-paper); color: var(--series-ink); font: 1.0625rem/1.55 system-ui, sans-serif; }
.crossword-index a, .crossword-game .series-bar a, .crossword-game .series-footer a { color: inherit; text-underline-offset: .2em; }
.series-bar, .series-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(75rem, calc(100% - 2rem)); margin-inline: auto; padding: .85rem 0; border-bottom: 1px solid var(--series-line); font-size: .9rem; }
.series-bar img { display: block; filter: brightness(.19); }
.series-bar nav { display: flex; flex-wrap: wrap; gap: .9rem; }
.series-footer { border-top: 1px solid var(--series-line); border-bottom: 0; }
.crossword-index .skip { position: absolute; left: -100vw; top: .5rem; }
.crossword-index .skip:focus { left: .5rem; z-index: 4; background: white; padding: .65rem; }
.crossword-index :focus-visible, .builder :focus-visible { outline: 3px solid #c47133; outline-offset: 3px; }
.series-hero { background: #112c35 radial-gradient(ellipse at 86% 120%, #378b85 0%, transparent 61%); color: white; padding: clamp(2.1rem, 7vw, 5.6rem) max(1rem, calc((100% - 75rem)/2)); }
.series-hero h1 { margin: 0; font: 700 clamp(2.8rem, 7vw, 6rem)/1 Georgia, serif; letter-spacing: -.046em; }
.series-hero p { max-width: 46ch; margin: .9rem 0 0; color: #e4eeec; }
.series-hero.compact { padding-block: clamp(1.9rem, 5vw, 3.8rem); }
.series-hero.compact p:first-child { margin: 0 0 .65rem; font-size: .9rem; }
.theme-list, .index-list { width: min(75rem, calc(100% - 2rem)); margin: 2.3rem auto 3.3rem; }
.theme-list ul, .index-list ol { display: grid; gap: .8rem; list-style: none; margin: 0; padding: 0; }
.theme-list ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme-list a, .index-list a { display: block; height: 100%; min-width: 0; background: #fffefb; border: 1px solid var(--series-line); border-radius: .4rem; text-decoration: none; padding: 1.05rem 1.15rem; position: relative; }
.theme-list a:hover, .index-list a:hover { border-color: var(--series-accent); background: #eef6f2; }
.theme-list strong, .index-list strong { display: block; color: var(--series-ink); font: 700 clamp(1.34rem, 3vw, 2.02rem)/1.1 Georgia, serif; letter-spacing: -.023em; }
.theme-list p { margin: .6rem 2.5rem .35rem 0; color: #41595e; }
.chapter { color: var(--series-accent); display: block; margin-bottom: .55rem; font-size: .79rem; font-weight: 800; }
.launch { color: var(--series-accent); position: absolute; right: 1rem; bottom: 1rem; }
.index-list a { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); align-items: baseline; gap: .7rem; padding-right: 3rem; }
.game-heading h1 { letter-spacing: -.035em; }
.crossword-game main:has(#board) .game-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: start;
  gap: clamp(1.15rem, 4vw, 3.2rem);
}
.crossword-game main:has(#board) .clue-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
}
.builder { overflow: hidden; border: 1px solid #b8cdc9; border-radius: .5rem; background: #eef6f3; margin-bottom: 1.15rem; }
.builder-heading { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem .8rem .05rem; gap: .5rem; }
.builder .builder-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 1.12rem; color: var(--series-ink); }
.builder output { font-weight: 700; color: var(--series-accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.model-view { width: 100%; height: clamp(9rem, 25vw, 16rem); background: radial-gradient(ellipse at 50% 78%, #d8ebe6, #eef6f3 68%); touch-action: pan-y; }
.model-view canvas { display: block; width: 100%; height: 100%; }
.build-status { margin: 0; min-height: 2.15rem; padding: .45rem .8rem; font-size: .82rem; color: #345257; }
.pdf-downloads a { margin-right: .8rem; }
.source-list { padding: .5rem 0; }
.source-list summary { cursor: pointer; color: var(--series-accent); font-weight: 700; }
@media (max-width: 760px) {
  .theme-list ul { grid-template-columns: 1fr; }
  .crossword-game main:has(#board) .game-layout { grid-template-columns: minmax(0, 1fr); }
  .crossword-game main:has(#board) .clue-panel { display: contents; }
  .builder { grid-row: 1; margin-bottom: 0; }
  .model-view { height: clamp(7.1rem, 29vw, 10rem); }
  .crossword-game .board-panel { grid-row: 2; }
}
