/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-2);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: var(--fs-4); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
h2 { font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-top: var(--s-7); margin-bottom: var(--s-3); }
h3 { font-size: var(--fs-2); font-weight: 600; margin-top: var(--s-6); margin-bottom: var(--s-2); }
p { margin: 0 0 var(--s-4); }
ul, ol { padding-left: 1.4em; margin: 0 0 var(--s-4); }
li { margin-bottom: var(--s-1); }
blockquote { margin: var(--s-5) 0; padding: 0 0 0 var(--s-4); border-left: 1px solid var(--line-2); color: var(--ink-2); }
blockquote p:last-child { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.93em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
strong { font-weight: 600; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.small { font-size: var(--fs-1); color: var(--ink-2); }

/* ---------- buttons (metar-taf: filled black primary, outlined uppercase secondary) ---------- */
.btn {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 14px; border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  cursor: pointer; transition: border-color 150ms, background 150ms;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); padding: 8px 22px; font-size: 12px; letter-spacing: 0.1em; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.quiet { border-color: var(--line-2); color: var(--ink-2); }
.btn.quiet:hover { color: var(--accent); border-color: var(--accent); }
.btn[disabled] { opacity: 0.4; cursor: default; pointer-events: none; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer; color: var(--ink-2); padding: 0;
  transition: border-color 150ms, color 150ms;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.app > div { min-width: 0; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.brand {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); padding: var(--s-6) var(--s-5) var(--s-5);
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.brand .brand-text { color: inherit; text-decoration: none; }
.brand .logo-btn { display: block; padding: 0; border: 0; background: none; cursor: pointer; color: var(--accent); border-radius: var(--bubble-tile-radius); }
.brand .logo-btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.brand .logo { width: 40px; height: 40px; margin: -4px 0 0 -4px; display: block; }
.topbar .brand { flex-direction: row; align-items: center; gap: var(--s-3); }
.topbar .brand .logo { width: 28px; height: 28px; margin: 0; }

/* the family bubble: liquid glass just below the logo, its left edge on the logo's own left grid line */
.brand .logo-wrap { position: relative; display: block; }
.family {
  position: absolute; left: 1px; top: calc(100% - 5px + var(--bubble-gap)); z-index: 30; width: 220px;   /* 1px / 5px: where the board sits inside the logo's viewBox */
  padding: 8px; border-radius: var(--bubble-radius); overflow: hidden;
  background: var(--bubble-fallback);
  box-shadow: inset 0 0 0 1px var(--bubble-rim), 0 0 0 0.5px var(--bubble-edge), var(--bubble-shadow);
  transform-origin: 0 0; transform: scale(0.85) translateY(-8px); opacity: 0;
  transition: transform var(--bubble-anim) cubic-bezier(0.2, 0.8, 0.2, 1), opacity var(--bubble-anim);
  text-transform: none; letter-spacing: 0; font-weight: 400;
}
.family::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--bubble-sheen); pointer-events: none; }
.family > * { position: relative; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .family { background: var(--bubble-bg); -webkit-backdrop-filter: blur(var(--bubble-blur)) saturate(var(--bubble-saturate)); backdrop-filter: blur(var(--bubble-blur)) saturate(var(--bubble-saturate)); }
}
.family.open { transform: none; opacity: 1; }
.topbar .family { left: 3.5px; top: calc(100% - 3.5px + var(--bubble-gap)); }
.family-title { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); padding: 6px 12px; }
.family-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--bubble-row-radius);
  color: var(--ink); text-decoration: none; transition: background 120ms;
}
.family-item:hover, .family-item:focus-visible { background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 0.5px var(--bubble-rim); outline: none; }
.family-item.next { color: var(--ink-3); cursor: default; }
.family-item.next .family-tile { color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 0.5px var(--bubble-rim); }
.family-item.next:hover { background: transparent; box-shadow: none; }
.family-tile {
  flex: none; width: 40px; height: 40px; border-radius: var(--bubble-tile-radius); color: var(--app-accent);
  background: rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 0.5px var(--bubble-rim), 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex; align-items: center; justify-content: center;
}
.family-tile svg { width: 26px; height: 26px; display: block; }
.family-name { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.brand small { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-3); margin-top: 4px; text-transform: none; }
.curriculum { flex: 1; padding: 0 var(--s-3) var(--s-4); }
.track { margin-bottom: var(--s-2); }
.track-head {
  display: flex; align-items: center; gap: var(--s-2); width: 100%;
  padding: var(--s-2) var(--s-2); border: 0; background: none; cursor: pointer; text-align: left;
}
.track-head:hover .name { color: var(--ink); }
.track-head .num { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); width: 1.4em; }
.track-head .name { flex: 1; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.track-head .bar { width: 36px; height: 2px; background: var(--line); overflow: hidden; }
.track-head .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 300ms; }
.track-head .chev { color: var(--ink-3); transition: transform 150ms; font-size: 8px; }
.track.open .track-head .chev { transform: rotate(90deg); }
.lessons { list-style: none; margin: 0; padding: 0 0 var(--s-2) calc(1.4em + var(--s-2) + var(--s-2)); display: none; }
.track.open .lessons { display: block; }
.lesson-link {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 5px var(--s-2); text-decoration: none; font-size: var(--fs-1); color: var(--ink-2);
}
.lesson-link:hover { color: var(--ink); }
.lesson-link.current { color: var(--accent); font-weight: 600; }
.lesson-link.planned { color: var(--ink-3); pointer-events: none; }
.lesson-link .tick { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; display: grid; place-items: center; }
.lesson-link.done .tick { background: var(--accent); border-color: var(--accent); }
.lesson-link.done .tick::after { content: ""; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg); }
.lesson-link.started .tick { border-color: var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.lesson-link .soon { margin-left: auto; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.sidebar-footer { padding: var(--s-4) var(--s-5) var(--s-5); border-top: 1px solid var(--line); }
.sidebar-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-3); }

.main { padding: var(--s-8) var(--s-7); min-width: 0; }
.page { max-width: var(--page-w); margin: 0; }
.prose { max-width: var(--measure); }
/* lesson body: text keeps the reading measure, boards and game viewers may use the full page width; everything centred */
.lesson-body { max-width: none; }
.lesson-body > :not(figure):not(.blk) { max-width: var(--measure); }
.topbar { display: none; }
.scrim { display: none; }

/* ---------- home ---------- */
.hero { max-width: var(--measure); margin: 0 0 var(--s-7); }
.hero h1 { margin: var(--s-3) 0 var(--s-4); }
.hero h1.quote { text-transform: none; letter-spacing: 0; font-weight: 500; line-height: 1.25; margin-bottom: var(--s-2); }
.hero .attrib { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: var(--s-5); }
.hero p { font-size: var(--fs-2); color: var(--ink-2); }
.card { border: 1px solid var(--line); padding: var(--s-5); background: var(--surface); }
.continue { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.continue h3 { margin: var(--s-1) 0 0; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-4); }
.track-card { text-decoration: none; display: flex; flex-direction: column; gap: var(--s-2); min-height: 140px; transition: border-color 150ms; }
.track-card:hover { border-color: var(--accent); }
.track-card h3 { margin: 0; }
.track-card p { color: var(--ink-2); font-size: var(--fs-1); margin: 0; flex: 1; }
.track-card .meta { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.switch-row { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-6) 0 var(--s-4); font-size: var(--fs-1); color: var(--ink-2); }
.switch { position: relative; width: 34px; height: 18px; border-radius: 9px; background: var(--line-2); border: 0; cursor: pointer; padding: 0; transition: background 150ms; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 150ms; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* ---------- lesson ---------- */
.lesson-head { margin: 0 0 var(--s-6); max-width: var(--measure); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.lesson-head h1 { margin: var(--s-3) 0 var(--s-3); }
.lesson-head .lede { font-size: var(--fs-2); color: var(--ink-2); margin: 0; }
.lesson-nav { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); font-size: var(--fs-1); }
.lesson-nav a { text-decoration: none; color: var(--ink-2); }
.lesson-nav a:hover { color: var(--ink); }
.lesson-nav .next { text-align: right; }
.lesson-nav .eyebrow { display: block; margin-bottom: 2px; }
.complete-row { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-7); padding: var(--s-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--fs-1); }
.complete-row .msg { color: var(--ink-2); }
.complete-row.done .msg { color: var(--accent); font-weight: 600; }
.complete-row .count { font-family: var(--font-mono); color: var(--ink-3); }
.sources { margin: var(--s-7) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--line); font-size: var(--fs-0); color: var(--ink-2); max-width: var(--measure); }
.sources ul { padding-left: 1.2em; }
.sources li { margin-bottom: var(--s-2); overflow-wrap: anywhere; }
.callout { border-left: 1px solid var(--ink); padding: var(--s-2) var(--s-4); margin: var(--s-5) 0; max-width: var(--measure); }
.callout p:last-child { margin: 0; }
details.more { border-top: 1px solid var(--line); margin: var(--s-5) 0; }
details.more:last-of-type { border-bottom: 1px solid var(--line); }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) 0; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; width: 18px; height: 18px; border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 400; color: var(--ink-3); flex: none; font-size: 12px; }
details.more[open] > summary::before { content: "–"; border-color: var(--accent); color: var(--accent); }
details.more > summary:hover { color: var(--accent); }
details.more > .more-body { padding-bottom: var(--s-4); }
.puzzle-intro { font-size: var(--fs-1); color: var(--ink-2); margin: var(--s-6) 0 var(--s-3); }

/* ---------- board: full square, centred, no decoration ---------- */
.board-wrap { width: 100%; max-width: var(--board-max); aspect-ratio: 1; position: relative; min-width: 0; margin: 0; }
.board-wrap svg.cm-chessboard { max-width: 100%; }
.board-figure { margin: var(--s-5) 0 var(--s-6); }
.board-figure.with-aside { display: grid; grid-template-columns: min(var(--board-max), 58%) minmax(0, 1fr); gap: var(--s-6); align-items: end; }
.board-figure.with-aside figcaption { grid-column: 1; }
.board-aside { grid-column: 2; grid-row: 1; align-self: end; }
.board-aside .photo { position: relative; max-width: 240px; background: #f3efe6; padding: 6px; border: 1px solid var(--line); overflow: hidden; }
/* old film: warm monochrome, lifted blacks, soft contrast, grain and a light vignette */
.board-aside img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) sepia(0.32) contrast(0.9) brightness(1.04); }
.board-aside .photo::before { content: ""; position: absolute; inset: 6px; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 52%, rgba(40,30,15,0.38) 100%); mix-blend-mode: multiply; }
.board-aside .photo::after { content: ""; position: absolute; inset: 6px; pointer-events: none; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 0.9'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.board-aside .photo.faded img { filter: grayscale(1) sepia(0.32) contrast(1.35) brightness(0.98); }
.board-aside .photo.dark img { filter: grayscale(1) sepia(0.32) contrast(0.85) brightness(1.15); }
.board-aside .credit { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: var(--s-2); max-width: 260px; }
@media (max-width: 900px) { .board-figure.with-aside { grid-template-columns: minmax(0, 1fr); } .board-aside { grid-column: 1; grid-row: auto; } }
.board-figure figcaption { font-size: var(--fs-1); color: var(--ink-2); margin: var(--s-3) 0 0; max-width: var(--board-max); }
/* wrong answer: only the piece shakes (CSS `translate` composes with the SVG transform attribute) */
.cm-chessboard .pieces-layer .piece-shake { animation: piece-shake 380ms ease-in-out; }
@keyframes piece-shake { 0%,100% { translate: 0 0 } 20% { translate: -5px 0 } 40% { translate: 5px 0 } 60% { translate: -4px 0 } 80% { translate: 4px 0 } }

.cm-chessboard.learn .board .square.white { fill: var(--sq-light); }
.cm-chessboard.learn .board .square.black { fill: var(--sq-dark); }
.cm-chessboard.learn .coordinates .coordinate { font-family: var(--font-sans); font-size: 6.5px; font-weight: 500; }
.cm-chessboard.learn .coordinates .coordinate.white { fill: var(--sq-coord-light); }
.cm-chessboard.learn .coordinates .coordinate.black { fill: var(--sq-coord-dark); }
.cm-chessboard.learn .board .border { stroke-width: 0; }
.cm-chessboard .markers .marker.mk-last { fill: var(--sq-last); opacity: 1; }
.cm-chessboard .markers .marker.mk-from { fill: var(--sq-from); opacity: 1; }
.cm-chessboard .markers .marker.mk-check { fill: var(--sq-check); opacity: 1; }
.cm-chessboard .markers .marker.mk-hint { fill: var(--sq-hint); opacity: 1; }
.cm-chessboard .markers .marker.mk-good { stroke: var(--good); stroke-width: 2.2px; opacity: 0.9; }
.cm-chessboard .markers .marker.mk-bad { stroke: var(--bad); stroke-width: 2.2px; opacity: 0.9; }
.cm-chessboard .markers .marker.marker-dot { fill: var(--sq-dot); opacity: 1; }
.cm-chessboard .markers .marker.marker-bevel { fill: var(--sq-dot); opacity: 1; }
.cm-chessboard .arrows .arrow { opacity: 0.92; pointer-events: none; }
.cm-chessboard .ar-main .arrow-head { fill: var(--arrow-main); }
.cm-chessboard .ar-main .arrow-line { stroke: var(--arrow-main); }
.cm-chessboard .ar-alt .arrow-head { fill: var(--arrow-alt); }
.cm-chessboard .ar-alt .arrow-line { stroke: var(--arrow-alt); }
.cm-chessboard .ar-bad .arrow-head { fill: var(--arrow-bad); }
.cm-chessboard .ar-bad .arrow-line { stroke: var(--arrow-bad); }
svg.cm-chessboard .promotion-dialog-group .promotion-dialog { fill: var(--surface); fill-opacity: 0.98; stroke: var(--line-2); }

/* ---------- game viewer / exercise ---------- */
.game, .exercise {
  display: grid; grid-template-columns: min(var(--board-max), 58%) minmax(0, 1fr);
  gap: var(--s-5); margin: var(--s-5) 0 var(--s-7); outline: none;
}
.game > *, .exercise > * { min-width: 0; }
.game:focus-visible .board-wrap, .exercise:focus-visible .board-wrap { outline: 1px solid var(--accent); outline-offset: 2px; }
.game-controls { display: flex; gap: 0; margin-top: var(--s-3); }
.game-controls .icon-btn { width: 36px; margin-right: -1px; }
.game-controls .spacer { flex: 1; }
.game-side { min-width: 0; display: flex; flex-direction: column; }
.game-head { padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); margin-bottom: var(--s-3); }
.game-players { font-size: var(--fs-2); font-weight: 600; line-height: 1.3; }
.game-meta { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.game-note { font-size: var(--fs-1); color: var(--ink-2); min-height: 3.2em; margin-bottom: var(--s-3); line-height: 1.5; }
.moves {
  display: flex; flex-wrap: wrap; gap: 2px 0; align-content: flex-start;
  font-family: var(--font-mono); font-size: 12px; max-height: 420px; overflow-y: auto; padding-right: var(--s-2);
}
.moves .mvnum { color: var(--ink-3); padding: 2px 6px 2px 0; width: 3.2em; text-align: right; }
.moves .mv { border: 0; background: none; padding: 2px 6px; cursor: pointer; font: inherit; width: calc((100% - 3.2em) / 2); text-align: left; }
.moves .mv:hover { background: var(--surface-2); }
.moves .mv.current { background: var(--accent); color: #fff; }
.moves .mv-comment { width: 100%; font-family: var(--font-sans); font-size: var(--fs-1); color: var(--ink-2); padding: var(--s-2) 0 var(--s-2) 0.4em; line-height: 1.45; }
.moves .mv-break { width: 100%; height: 0; }
.moves .mv-result { width: 100%; color: var(--ink-3); padding: var(--s-2) 0 0 0.4em; }

.exercise-side { display: flex; flex-direction: column; gap: var(--s-3); }
.exercise-side .turn { display: flex; align-items: center; gap: var(--s-2); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.turn-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink); background: #fff; }
.turn-dot.b { background: var(--ink); }
.exercise-side .prompt { font-size: var(--fs-2); }
.exercise-side .status { min-height: 1.6em; font-size: var(--fs-1); color: var(--ink-2); }
.exercise-side .status.good { color: var(--good); }
.exercise-side .status.bad { color: var(--bad); }
.exercise-side .hint { font-size: var(--fs-1); color: var(--ink-2); font-style: italic; }
.exercise-side .actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: auto; }
.exercise.solved .board-wrap { outline: 2px solid var(--good); outline-offset: 0; }

/* ---------- prose tables ---------- */
.lesson-body table { border-collapse: collapse; margin: var(--s-4) 0; font-size: var(--fs-1); }
.lesson-body th, .lesson-body td { text-align: left; padding: 6px 18px 6px 0; border-bottom: 1px solid var(--line); }
.lesson-body th { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.lesson-body td:last-child, .lesson-body th:last-child { font-family: var(--font-mono); }

/* ---------- play page ---------- */
.nav-play { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2); margin-bottom: var(--s-3); text-decoration: none; border-bottom: 1px solid var(--line); }
.nav-play .num { font-size: 9px; color: var(--ink-3); width: 1.4em; }
.nav-play .name { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.nav-play:hover .name, .nav-play.current .name { color: var(--accent); }
.play { display: grid; grid-template-columns: min(var(--board-max), 58%) minmax(0, 1fr); align-items: start; gap: var(--s-6); margin: var(--s-5) 0 var(--s-7); }
.play > * { min-width: 0; }
.play-side { display: flex; flex-direction: column; gap: var(--s-4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.field select { font: inherit; font-size: var(--fs-1); border: 0; border-bottom: 1px solid var(--line-2); background: transparent; padding: 6px 0; outline: none; -webkit-appearance: none; appearance: none; color: var(--ink); cursor: pointer; }
.field select:focus { border-bottom-color: var(--accent); }
.seg { display: flex; }
.seg .btn { margin-right: -1px; }
.seg .btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.play-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.play .status { min-height: 1.6em; font-size: var(--fs-1); color: var(--ink-2); }
.play .status.good { color: var(--good); font-weight: 600; }
.play .status.bad { color: var(--bad); }
.play .moves .mv { cursor: default; }
.play .moves .mv:hover { background: none; }
.play .moves.reviewing .mv { cursor: pointer; }
.play .moves.reviewing .mv:hover:not(.current) { background: var(--surface-2); }
.play .moves .mv i { font-style: normal; font-weight: 600; margin-left: 1px; }
.play .moves .mv.inaccuracy i { color: var(--ink-2); }
.play .moves .mv.mistake { color: var(--arrow-alt); }
.play .moves .mv.blunder { color: var(--bad); }
.play .moves .mv.current.mistake, .play .moves .mv.current.blunder { color: #fff; }
.switch-row.compact { margin: 0; }

/* evaluation bar: the side at the bottom of the board fills from the bottom */
.play-left { min-width: 0; }
.play-board { display: flex; align-items: stretch; gap: var(--s-3); }
.review-controls { margin-left: calc(12px + 2px + var(--s-3)); } /* aligned with the board, not the bar */
.review-controls[hidden] { display: none; }
.review-controls .icon-btn[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }
.review-pos { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); align-self: center; padding-right: 2px; }
.play-left:has(.evalbar[hidden]) .review-controls { margin-left: 0; }
.play-board .board-wrap { flex: 1; min-width: 0; }
.evalbar { position: relative; flex: none; width: 12px; background: var(--ink); border: 1px solid var(--ink); display: flex; flex-direction: column; justify-content: flex-end; }
.evalbar .fill { display: block; width: 100%; height: 50%; background: #fff; transition: height 400ms ease; }
.evalbar.flipped { background: #fff; }
.evalbar.flipped .fill { background: var(--ink); }
.evalbar .num { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.evalbar[hidden] { display: none; }

/* post-game review */
.review[hidden] { display: none; }
.review { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--fs-1); }
.review-summary { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px var(--s-3); align-items: baseline; }
.review-summary b { font-weight: 600; }
.review-summary .acc { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.review-summary .counts { color: var(--ink-2); }
.review-summary .turning { grid-column: 1 / -1; color: var(--ink-2); margin-top: 2px; }
.review-note { font-size: var(--fs-1); color: var(--ink-2); line-height: 1.45; min-height: 2.9em; margin: var(--s-3) 0 0 calc(12px + 2px + var(--s-3)); max-width: var(--measure); }
.review-note[hidden] { display: none; }
.play-left:has(.evalbar[hidden]) .review-note { margin-left: 0; }
.key-moves:empty { display: none; }
.key-moves { display: flex; flex-direction: column; margin-top: var(--s-2); }
.key-head { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: var(--s-3) 0 var(--s-2); }
.key-head + .key-head { padding-top: var(--s-4); }
.key { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s-3); align-items: baseline; text-align: left; font: inherit; font-size: var(--fs-1); border: 0; border-top: 1px solid var(--line); background: none; padding: var(--s-2) 0; cursor: pointer; color: var(--ink); }
.key:hover .key-move { color: var(--accent); }
.key-move { font-family: var(--font-mono); font-size: 12px; font-weight: 600; white-space: nowrap; }
.key.mistake .key-move { color: var(--arrow-alt); }
.key.blunder .key-move { color: var(--bad); }
.key-swing { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.key-better { grid-column: 1 / -1; color: var(--ink-2); }
.key-better b { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink); }

/* ---------- openings book ---------- */
.openings { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-6); }
.openings > * { min-width: 0; }
.openings-list { position: sticky; top: var(--s-5); align-self: start; max-height: calc(100vh - var(--s-7)); overflow-y: auto; padding-right: var(--s-2); }
.ofam h2 { margin: var(--s-4) 0 var(--s-2); }
.ofam ul { list-style: none; margin: 0; padding: 0; }
.ofam li a { display: block; padding: 4px 0; font-size: var(--fs-1); color: var(--ink-2); text-decoration: none; }
.ofam li a:hover { color: var(--ink); }
.ofam li a.current { color: var(--accent); font-weight: 600; }
.openings-view .oname { margin: var(--s-2) 0 var(--s-2); font-size: var(--fs-3); letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 600; }
.openings-view .onote { color: var(--ink-2); margin-bottom: var(--s-2); max-width: var(--measure); }
.openings-view .omoves { font-size: 12px; color: var(--ink-3); margin-bottom: var(--s-4); }
.odrill { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.odrill .seg { margin: var(--s-3) 0 var(--s-4); }
@media (max-width: 900px) { .openings { grid-template-columns: minmax(0, 1fr); } .openings-list { position: static; max-height: none; } }

/* ---------- activity grid ---------- */
.activity-grid { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; width: 100%; }
.activity-grid i { aspect-ratio: 1; background: var(--act-0); display: block; }
.activity-grid i.l1 { background: var(--act-1); } .activity-grid i.l2 { background: var(--act-2); }
.activity-grid i.l3 { background: var(--act-3); } .activity-grid i.l4 { background: var(--act-4); }
.activity-grid i.today { outline: 1px solid var(--accent); outline-offset: -1px; }
.activity-stats { display: flex; justify-content: space-between; margin-top: var(--s-2); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.activity-stats b { color: var(--accent); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .game, .exercise, .play { grid-template-columns: minmax(0, 1fr); }
  .moves { max-height: 260px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(var(--sidebar-w), 86vw); transform: translateX(-100%); transition: transform 200ms; z-index: 20; box-shadow: 0 0 40px rgba(0,0,0,0.12); }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 15; display: none; }
  .scrim.open { display: block; }
  .topbar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
  .topbar .brand { padding: 0; }
  .main { padding: var(--s-5) var(--s-4) var(--s-8); }
  h1 { font-size: var(--fs-3); }
}
@media (prefers-reduced-motion: reduce) {
  .cm-chessboard .pieces-layer .piece-shake { animation: none; }
  .family { transition: none; }
  .switch::after, .track-head .bar i { transition: none; }
}

/* my games */
.games-source { display: flex; flex-direction: column; gap: var(--s-4); margin: var(--s-5) 0; max-width: var(--measure); }
.games-source .row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.games-source input[type="text"], .games-source textarea { font: inherit; font-size: var(--fs-1); border: 1px solid var(--line-2); background: var(--surface); padding: 8px 10px; outline: none; color: var(--ink); flex: 1; min-width: 12em; }
.games-source textarea { font-family: var(--font-mono); font-size: 12px; width: 100%; resize: vertical; }
.games-source input:focus, .games-source textarea:focus { border-color: var(--accent); }
.games-source [hidden] { display: none; }
.games-openings, .games-list, .games-review, .games-drills { margin: var(--s-6) 0; }
.games-openings[hidden], .games-list[hidden], .games-review[hidden], .games-drills[hidden] { display: none; }
.games-openings .small, .games-drills .small { max-width: var(--measure); margin: var(--s-2) 0 var(--s-3); }
.games-table, .openings-table { border-collapse: collapse; width: 100%; font-size: var(--fs-1); margin-top: var(--s-3); }
.games-table th, .openings-table th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-2); }
.games-table td, .openings-table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.games-table tr.current td { background: var(--surface-2); }
.games-table .turn-dot { margin-right: 6px; }
.games-table .res.win { color: var(--accent); font-weight: 600; }
.games-table .res.loss { color: var(--bad); }
.games-table .btn.quiet { padding: 4px 10px; font-size: 10px; }
.games-table tr.analysed .btn.quiet { border-color: var(--accent); color: var(--accent); }
.openings-table a { color: var(--accent); text-decoration: none; }
.openings-table a:hover { text-decoration: underline; }
.games-review .play { margin-top: var(--s-3); }
.review-head { display: flex; flex-direction: column; gap: 2px; }
.review-players { font-size: var(--fs-2); }
.review-players .vs { color: var(--ink-3); margin: 0 4px; }
.review-players .res { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); margin-left: 6px; }
.drill { margin: var(--s-4) 0 var(--s-6); }
.drill-caption { font-size: var(--fs-1); color: var(--ink-2); margin-bottom: var(--s-2); }
.reviewer .moves .mv { cursor: pointer; }
.games-table .turn-dot { display: inline-block; vertical-align: -1px; }
.games-source .status { font-size: var(--fs-1); color: var(--ink-2); min-height: 1.4em; }
.games-source .status.good { color: var(--accent); }
.games-source .status.bad { color: var(--bad); }
.table-scroll { overflow-x: auto; }
.games-table td.mono, .games-table td.res, .games-table td:last-child { white-space: nowrap; }
.games-source .fairplay { max-width: var(--measure); color: var(--ink-3); }
.ratings { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); }
.ratings[hidden] { display: none; }
.ratings .rating { font-size: var(--fs-1); color: var(--ink-2); }
.ratings .rating b { font-family: var(--font-mono); font-size: var(--fs-2); color: var(--ink); font-weight: 600; margin-right: 3px; }
.games-report { margin: var(--s-6) 0; }
.games-report[hidden] { display: none; }
.games-report .small { max-width: var(--measure); margin: var(--s-2) 0 var(--s-3); }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.report-actions .small { margin: 0; }
.openings-table .btn.quiet { padding: 4px 10px; font-size: 10px; white-space: nowrap; }
.openings-table b.mono { font-size: 12px; }
#linedrill[hidden] { display: none; }
#linedrill { margin: var(--s-5) 0; }
.table-scroll table { min-width: 560px; }
.openings-table { min-width: 640px; }
.openings-table td b.mono, .openings-table td .mono { white-space: nowrap; }
.openings-table td.mono, .openings-table th:nth-child(2), .openings-table th:nth-child(3) { width: 1%; white-space: nowrap; }
.openings-table td:first-child { min-width: 180px; }
.openings-table td:nth-child(4) { min-width: 190px; }
.openings-table td.mono .small { font-family: var(--font-sans); white-space: nowrap; }
.games-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin: var(--s-5) 0 0; padding: var(--s-3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.games-filters[hidden] { display: none; }
.games-filters label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: var(--s-2); }
.games-filters select { font: inherit; font-size: var(--fs-1); letter-spacing: 0; text-transform: none; color: var(--ink); border: 0; border-bottom: 1px solid var(--line-2); background: transparent; padding: 2px 0; outline: none; cursor: pointer; }
.games-filters select:focus { border-bottom-color: var(--accent); }
.games-filters label.check { text-transform: none; letter-spacing: 0; font-size: var(--fs-1); font-weight: 400; color: var(--ink-2); }
.games-filters .small { margin-left: auto; }
.games-clock { margin: var(--s-6) 0; }
.games-clock[hidden] { display: none; }
.games-clock .small { max-width: var(--measure); margin: var(--s-2) 0 var(--s-4); }
.clock-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-5); }
.clock-figures .fig { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--line-2); padding-left: var(--s-3); }
.clock-figures .fig b { font-family: var(--font-mono); font-size: var(--fs-3); font-weight: 600; }
.clock-figures .fig span { font-size: var(--fs-1); color: var(--ink-2); line-height: 1.35; }
.clock-figures .fig i { font-style: normal; font-weight: 600; color: var(--ink); }
.clock-figures .fig.bad { border-left-color: var(--bad); }
.clock-figures .fig.bad b { color: var(--bad); }
.clock-table { border-collapse: collapse; font-size: var(--fs-1); min-width: 320px; }
.clock-table th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 6px 24px 6px 0; border-bottom: 1px solid var(--line-2); }
.clock-table td { padding: 6px 24px 6px 0; border-bottom: 1px solid var(--line); }
.clock-slow { margin-top: var(--s-5); display: flex; flex-direction: column; }
.clock-slow .slow { display: grid; grid-template-columns: 4.5em 5em minmax(0, 1fr); gap: var(--s-3); align-items: baseline; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; padding: 7px 0; cursor: pointer; }
.clock-slow .slow:hover { background: var(--surface-2); }
.clock-slow .slow b { font-size: 12px; font-weight: 600; }
.clock-slow .slow > span.mono { font-size: 12px; }
.clock-slow .eyebrow { display: block; margin-bottom: var(--s-2); }
.scout { margin: var(--s-6) 0; border-top: 1px solid var(--line); padding-top: var(--s-4); }
.scout > summary { cursor: pointer; list-style: none; }
.scout > summary::-webkit-details-marker { display: none; }
.scout > summary .eyebrow::after { content: ' +'; }
.scout[open] > summary .eyebrow::after { content: ' –'; }
.scout .small { max-width: var(--measure); }
.scout form { margin: var(--s-3) 0; max-width: var(--measure); }
.scout .row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.scout input[type="text"] { font: inherit; font-size: var(--fs-1); border: 1px solid var(--line-2); background: var(--surface); padding: 8px 10px; outline: none; color: var(--ink); flex: 1; min-width: 12em; }
.scout input[type="text"]:focus { border-color: var(--accent); }
.scout .status { font-size: var(--fs-1); color: var(--ink-2); min-height: 1.4em; }
.scout .status.good { color: var(--accent); }
.scout .status.bad { color: var(--bad); }
.scout-head { margin: var(--s-4) 0 var(--s-2); font-size: var(--fs-2); }
.scout-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); padding: 7px 0; border-bottom: 1px solid var(--line); }
.scout-line > .small:first-child { flex: 0 0 13em; color: var(--ink-3); }
.scout-line .pick b { font-size: 12px; }
.sidebar-footer .credit { margin-top: var(--s-3); font-size: 10px; line-height: 1.5; color: var(--ink-3); }
.sidebar-footer .credit b { font-weight: 600; color: var(--ink-2); }
.sidebar-footer .credit a { color: var(--ink-3); text-decoration: none; }
.sidebar-footer .credit a:hover { color: var(--accent); }
/* cmx-20260927-7e674fc1ff69 */

/* ---------- the cat in the box (js/mascot.js) ---------- */
/* Always in the corner, small. It meows when it has something and waits to be clicked; the bubble only
   opens on a click. Clicked with nothing to say, it answers with hearts. */
.mascot {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end;
  pointer-events: none;
}
.mascot > * { pointer-events: auto; }
.mascot[hidden] { display: none; }
.mascot-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the bubble: only there when opened */
.mascot-bubble {
  position: relative; box-sizing: border-box;
  width: max-content; max-width: min(232px, calc(100vw - 28px));
  padding: 8px 24px 9px 11px;
  margin: 0 0 calc(var(--mascot-tail) * 1px + 3px) 0;
  transform-origin: 70% 100%; transform: scale(.6); opacity: 0; visibility: hidden;
  transition: transform 240ms cubic-bezier(.2, 1.4, .4, 1), opacity 140ms, visibility 0s 240ms;
}
.mascot[data-state="open"] .mascot-bubble { transform: scale(1); opacity: 1; visibility: visible; transition: transform 240ms cubic-bezier(.2, 1.4, .4, 1), opacity 140ms, visibility 0s; }
.mascot-outline { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mascot-outline path {
  fill: var(--mascot-paper); stroke: var(--mascot-line); stroke-width: calc(var(--mascot-stroke) * 1px);
  stroke-linejoin: round; stroke-linecap: round;
}
.mascot-label, .mascot-text, .mascot-close { position: relative; }
.mascot-label { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2px; color: var(--mascot-tip); }
.mascot[data-kind="hint"] .mascot-label { color: var(--mascot-hint); }
.mascot-text { margin: 0; font-size: 12.5px; line-height: 1.42; color: var(--ink); }
.mascot-text b { font-weight: 700; }
.mascot-close {
  position: absolute; top: 3px; right: 4px; width: 20px; height: 20px; padding: 0;
  border: 0; background: none; color: var(--ink-3); font-size: 16px; line-height: 1; cursor: pointer;
}
.mascot-close:hover { color: var(--ink); }

/* the cat, its meow, its hearts */
.mascot-body { position: relative; }
.mascot-cat {
  display: block; width: var(--mascot-cat-w); padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 50% 100%; transition: transform 160ms;
}
.mascot-cat:hover { transform: translateY(-2px); }
.mascot-cat:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mascot-cat svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.10)); }
.mascot-cat.squish { animation: mascot-squish 260ms ease-out; }
.mascot-body.hop { animation: mascot-hop 700ms cubic-bezier(.3, 0, .3, 1); }

/* "meow" — a word and three sound lines beside the head, drawn in the artwork's black */
.mascot-meow {
  position: absolute; right: 64%; bottom: 72%;
  display: flex; align-items: flex-end; gap: 1px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--mascot-ink);
  opacity: 0; transform: scale(.4) rotate(-8deg); transform-origin: 100% 100%;
  transition: opacity 160ms, transform 240ms cubic-bezier(.2, 1.5, .4, 1);
  pointer-events: none;
}
.mascot-meow span { transform: rotate(-8deg); }
.mascot-sound { width: 13px; height: 13px; order: 2; margin-bottom: 7px; }
.mascot-sound path { fill: none; stroke: var(--mascot-ink); stroke-width: 1.6; stroke-linecap: round; }
.mascot[data-state="meowing"] .mascot-meow { opacity: 1; transform: scale(1) rotate(-8deg); animation: mascot-meow 1.6s ease-in-out 400ms infinite; }

.mascot-hearts { position: absolute; left: 40%; top: 6%; width: 0; height: 0; pointer-events: none; }
.mascot-hearts .heart {
  position: absolute; left: calc(var(--size) / -2); top: 0; width: var(--size); height: var(--size);
  animation: mascot-heart 1.1s ease-out var(--delay) both;
}
.mascot-hearts svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot-hearts path { fill: var(--mascot-heart); stroke: var(--mascot-ink); stroke-width: 1.8; stroke-linejoin: round; }

@keyframes mascot-hop { 0%, 100% { transform: translateY(0) } 28% { transform: translateY(-9px) } 50% { transform: translateY(0) } 68% { transform: translateY(-3px) } }
@keyframes mascot-squish { 0% { transform: scale(1, 1) } 35% { transform: scale(1.07, .9) } 70% { transform: scale(.97, 1.04) } 100% { transform: scale(1, 1) } }
@keyframes mascot-meow { 0%, 100% { transform: scale(1) rotate(-8deg) } 50% { transform: scale(1.1) rotate(-5deg) } }
@keyframes mascot-heart {
  0% { transform: translate(0, 0) scale(.3); opacity: 0 }
  18% { transform: translate(calc(var(--dx) * .3), -8px) scale(1); opacity: 1 }
  100% { transform: translate(var(--dx), -58px) scale(.85); opacity: 0 }
}

@media (max-width: 560px) {
  .mascot { right: max(10px, env(safe-area-inset-right)); }
  .mascot-cat { width: var(--mascot-cat-w-phone); }
  .mascot-bubble { max-width: calc(100vw - 20px); }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-bubble, .mascot[data-state="open"] .mascot-bubble { transform: none; transition: opacity 140ms, visibility 0s; }
  .mascot-cat.squish, .mascot-body.hop, .mascot[data-state="meowing"] .mascot-meow { animation: none; }
  .mascot-meow { transform: rotate(-8deg); }
  .mascot-hearts .heart { animation: mascot-heart-still 1.1s ease-out var(--delay) both; }
  @keyframes mascot-heart-still { 0% { opacity: 0 } 25% { opacity: 1 } 100% { opacity: 0; transform: translate(var(--dx), -20px) } }
}

/* a tip tucked into a lesson: a small cat and a label in the text; the cat in the corner delivers it */
.prose .tip { margin: var(--s-4) 0; }
.prose .tip-cue {
  display: inline-flex; align-items: center; gap: 9px; padding: 3px 12px 3px 4px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
}
.prose .tip-cue:hover { border-color: var(--accent); color: var(--accent); }
.prose .tip-cat { display: block; }
.prose .tip-text { margin: var(--s-2) 0 0; padding-left: var(--s-3); border-left: 2px solid var(--line-2); font-size: var(--fs-1); color: var(--ink-2); }

/* the switch for the cat, beside the mute button */
.icon-btn.cat-toggle { width: 32px; }
.icon-btn.cat-toggle .tip-cat { width: 24px; height: auto; }
.icon-btn.cat-toggle[aria-pressed="false"] { opacity: 0.4; }

/* the welcome's background on this app only: a knight's tour (js/knight-tour.js), behind the word */
.wl-tour { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.wl-tour-grid { fill: none; stroke: var(--wl-ink); stroke-opacity: .14; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.wl-tour-line { fill: none; stroke: var(--wl-ink); stroke-opacity: .38; stroke-width: .022; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.wl-tour-dot { fill: var(--wl-ink); opacity: 0; transition: opacity 300ms; }
.wl-tour-dot.on { opacity: .5; }
.wl-tour-head { fill: #e5483c; }
