/* A quiet puzzle table. Semantic groups stay in the same place at every size. */
:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --surface: #fffcf5;
  --ink: #292d28;
  --muted: #65685d;
  --line: #dcded0;
  --edge: #7b8174;
  --shape-red: #bd4432;
  --shape-yellow: #956400;
  --shape-green: #267a53;
  --shape-blue: #3964c4;
  --green: #2e6653;
  --green-soft: #e9eee2;
  --rose: #765a47;
  --rose-soft: #f0e8de;
  --tile: #fffdf8;
  --shadow: 0 3px 0 #303b2010;
  --accent: #bd612f;
  --focus: #1766aa;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1d2421;
  --surface: #252e29;
  --ink: #f0eee2;
  --muted: #b4bcae;
  --line: #465247;
  --edge: #899a8d;
  --shape-red: #f68b76;
  --shape-yellow: #f0c65b;
  --shape-green: #68c99a;
  --shape-blue: #82a9ff;
  --green: #acd4b2;
  --green-soft: #2c3d31;
  --rose: #e0b996;
  --rose-soft: #3a322b;
  --tile: #303a33;
  --shadow: 0 3px 0 #0003;
  --accent: #e9ac7e;
  --focus: #8bc2f0;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.5 "Segoe UI",
    system-ui,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:not(:disabled):hover {
  filter: brightness(0.96);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.15;
}
h1 {
  font:
    normal clamp(34px, 5.3vw, 54px) / 1.08 Georgia,
    serif;
  letter-spacing: -1.6px;
}
h2 {
  font-size: 20px;
  font-weight: 600;
}
h3 {
  font-size: 18px;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  padding: 12px;
  background: var(--surface);
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.shell {
  width: min(100% - 48px, 880px);
  margin: auto;
}
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0 17px;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font:
    bold 44px/1 Georgia,
    serif;
  letter-spacing: -1.5px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 260ms ease;
}
.wordmark:hover .brand-mark {
  transform: rotate(-8deg);
}
:root[data-theme="dark"] .brand-mark {
  filter: brightness(1.65);
}
.header-actions {
  display: flex;
  gap: 5px;
}
.iconbtn {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
}
.iconbtn svg {
  width: 20px;
  height: 20px;
}
.iconbtn:hover {
  background: var(--green-soft);
}
.edition {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 11px 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 600;
}
.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 10px 0 26px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.slot {
  color: inherit;
  text-decoration: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 0 16px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition:
    background 160ms,
    border-color 160ms,
    transform 160ms;
}
.slot[aria-disabled="true"] {
  opacity: 0.48;
  cursor: default;
}
.slot.active {
  border-bottom-color: var(--green);
}
.slot-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.15em;
  width: 1.15em;
  height: 1em;
  font:
    normal 48px/1 Georgia,
    serif;
  color: var(--muted);
}
.slot.active .slot-number {
  color: var(--green);
}
.slot strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.slot small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.slot .slot-check {
  color: var(--green);
}
.slot-check svg {
  width: 1em;
  height: 100%;
  --nucleo-stroke-width: 2.2;
}
.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 14px;
  background: var(--green-soft);
  border-radius: 12px;
  margin-bottom: 20px;
}
.welcome strong {
  font-size: 13px;
}
.welcome p,
.practice-bar p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.welcome-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.phase-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 10px;
}
.phase-head #lede {
  color: var(--muted);
  margin-top: 8px;
  font-size: 15px;
}
.phase-tag {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  padding-top: 5px;
  white-space: nowrap;
}
.evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.evidence-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: var(--green-soft);
  min-width: 0;
}
.evidence-group.misses {
  background: var(--rose-soft);
}
.evidence-group h2 {
  font-size: 15px;
  color: var(--green);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.misses h2 {
  color: var(--rose);
}
.group-note {
  font-size: 11px;
  font-weight: 400;
  margin-left: auto;
}
.tokens {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 9px;
  max-height: 260px;
  overflow-y: auto;
  padding: 3px 3px 6px;
}
.tokens .token {
  max-width: 100%;
}
.tokens:not(:has(.token:nth-child(7))) {
  max-height: none;
  overflow: visible;
}
.tokens .token-face {
  min-width: 0;
}
.tokens .t-word {
  overflow-wrap: anywhere;
  text-align: center;
}
.token {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 55px;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--tile);
  border: 2px solid var(--edge);
  box-shadow: var(--shadow);
  font-size: 22px;
  font-weight: 600;
  position: relative;
}
.token.discovery {
  border: 2px dashed var(--green);
}
.misses .token.discovery {
  border-color: var(--rose);
}
.token.latest {
  animation: tile-pop 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.token small {
  font-size: 10px;
  position: absolute;
  bottom: 1px;
  color: var(--muted);
}
.token-face {
  display: flex;
  align-items: center;
  justify-content: center;
}
.shape-token {
  flex-direction: column;
  gap: 3px;
}
.shape-caption {
  display: grid;
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
.t-word {
  font-family: Georgia, serif;
  font-weight: normal;
}
.t-word.long {
  font-size: 18px;
}
.t-shape {
  width: 38px;
  height: 38px;
}
.t-emoji {
  font-size: 29px;
}
.t-num {
  font-variant-numeric: tabular-nums;
}
.t-card {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: Georgia, serif;
}
.t-card i {
  font-style: normal;
}
.t-card.red {
  color: #c14035;
}
:root[data-theme="dark"] .t-card.red {
  color: #ff9b91;
}
.t-card.blk {
  color: var(--ink);
}
.t-color {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
.board-caption {
  font-size: 11px;
  color: var(--muted);
  margin: -10px 0 16px;
}
.workbench {
  background: var(--surface);
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-title h2 {
  font:
    normal 24px Georgia,
    serif;
}
.count {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.scope {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
}
.workbench .scope {
  margin-bottom: 17px;
}
#probeForm {
  display: flex;
  gap: 10px;
}
input,
select {
  color: var(--ink);
  background: var(--tile);
  border: 1px solid var(--edge);
  border-radius: 8px;
}
input {
  min-width: 0;
  flex: 1;
  padding: 13px 15px;
  font-size: 18px;
}
input::placeholder {
  color: var(--muted);
  font-size: 15px;
}
.btn {
  border: 1px solid var(--edge);
  background: var(--tile);
  padding: 12px 19px;
  border-radius: 8px;
  min-height: 46px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.btn:not(:disabled):active {
  transform: translateY(2px);
}
.btn.primary,
.btn.solve {
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}
.btn.small {
  min-height: 38px;
  font-size: 12px;
  padding: 9px 12px;
}
.textbtn {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  padding: 10px 5px;
  min-height: 44px;
  text-underline-offset: 4px;
}
.textbtn:hover {
  text-decoration: underline;
}
.textbtn.muted {
  color: var(--muted);
}
.workbench-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 19px;
  margin-top: 20px;
}
.workbench-actions .muted {
  margin-left: auto;
}
.reassurance {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
.feedback {
  font-size: 14px;
  margin-top: 14px;
}
.feedback:empty {
  display: none;
}
.feedback.in {
  color: var(--green);
}
.feedback.out {
  color: var(--rose);
}
.hint-panel {
  margin-top: 18px;
  padding: 16px;
  border-left: 3px solid var(--accent);
  background: var(--paper);
  border-radius: 0 8px 8px 0;
}
.hint-panel .eyebrow {
  color: var(--rose);
  margin-bottom: 4px;
}
.hint-panel ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}
.hint-panel li + li {
  margin-top: 8px;
}
.tray {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  max-height: 225px;
  overflow: auto;
  padding: 3px;
}
.tray button.token {
  padding: 5px;
  min-width: 0;
  min-height: 44px;
  box-shadow: none;
  border: 2px solid var(--edge);
}
.tray button.selected {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.tray button:disabled {
  opacity: 0.35;
}
.tray-test {
  margin-top: 13px;
  width: 100%;
}
.emoji-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.emoji-filters button {
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
  min-height: 36px;
}
.emoji-filters button[aria-pressed="true"] {
  background: var(--green);
  color: var(--paper);
}
.tray.pair {
  display: block;
  max-height: none;
  overflow: visible;
}
.picker {
  display: flex;
  gap: 20px;
  align-items: center;
}
.picker > .token {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}
.picker-rows {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.picker-label {
  width: 35px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
}
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}
.seg button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: var(--tile);
  padding: 4px 8px;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.seg button[aria-pressed="true"] {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  background: var(--green-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}
.seg button:has(.color-name) {
  gap: 4px;
  padding: 7px;
}
.color-name {
  font-size: 11px;
  text-transform: capitalize;
}
.seg svg {
  width: 23px;
  height: 23px;
}
.challenge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px 28px;
}
.prove-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.prove-item {
  padding: 10px;
  border: 2px solid var(--edge);
  border-radius: 16px;
  min-width: 0;
  background: var(--tile);
  transition:
    border-color 180ms ease,
    background 180ms ease;
}
.sort-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 112px;
}
.sort-number {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sort-preview > .token {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 20px 2px 12px;
  min-width: 0;
  max-width: 100%;
  font-size: 30px;
}
.sort-preview .t-word {
  overflow-wrap: anywhere;
  text-align: center;
}
.sort-preview .t-shape {
  width: 48px;
  height: 48px;
}
.sort-preview .t-emoji {
  font-size: 38px;
}
.prove-item[data-choice="true"] {
  border-color: var(--green);
}
.prove-item[data-choice="false"] {
  border-color: var(--rose);
}
.prove-item.correct {
  border-color: var(--green);
}
.prove-item.incorrect {
  border-color: var(--rose);
}
.prove-item .truth {
  text-align: center;
  padding: 2px 0 4px;
}
.choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  background: var(--paper);
  border-radius: 12px;
}
.sort-option {
  position: relative;
  cursor: pointer;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.choice-face {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 72px;
  height: 100%;
  padding: 10px 4px;
  border: 2px solid var(--edge);
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition:
    color 160ms,
    background 160ms,
    border-color 160ms,
    transform 160ms;
}
.choice-face svg {
  width: 20px;
  height: 20px;
}
.sort-option:has(input:enabled:not(:checked)):hover .choice-face {
  background: var(--surface);
  color: var(--ink);
}
.sort-option:has(input:enabled):active .choice-face {
  transform: scale(0.96);
}
.fits-option input:checked + .choice-face {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}
.misses-option input:checked + .choice-face {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--paper);
}
.sort-option input:focus-visible + .choice-face {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.sort-option:has(input:disabled) {
  cursor: default;
}
.sort-option input:disabled:not(:checked) + .choice-face {
  opacity: 0.55;
}
.sort-option input:checked + .choice-face svg {
  animation: choice-tick 240ms ease-out;
}
@keyframes choice-tick {
  from {
    transform: scale(0.65);
  }
  to {
    transform: scale(1);
  }
}
.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
  margin: 0;
  border: 0;
}
.truth {
  font-size: 12px;
  margin-top: 9px;
}
.correct {
  background: var(--green-soft);
}
.incorrect {
  background: var(--rose-soft);
}
.challenge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}
.revisited {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.result {
  max-width: 520px;
  margin: 24px auto 0;
  text-align: left;
  animation: settle 0.4s ease-out;
}
.result-mark {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}
.result-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.result-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.run-status {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 16px;
}
.daily-complete {
  display: flex;
  flex-direction: column;
}
.daily-complete .result-top {
  order: 0;
}
.daily-complete .run-summary {
  order: 1;
}
.daily-complete .result-actions {
  order: 2;
  padding-top: 20px;
}
.daily-complete #resultFeedback {
  order: 3;
}
.daily-complete .share-preview {
  order: 4;
}
.daily-complete .next-up {
  order: 5;
  padding: 0;
}
.daily-complete .explanation {
  order: 6;
  margin-top: 12px;
}
.run-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 22px 0 10px;
  padding: 18px 0;
  background: var(--green-soft);
  border-radius: 12px;
  text-align: center;
}
.run-totals strong {
  display: block;
  font:
    30px/1.1 Georgia,
    serif;
}
.run-totals small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 12px;
}
.run-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.run-stage-number {
  font:
    26px/1 Georgia,
    serif;
  color: var(--muted);
}
.run-stage strong {
  font-size: 14px;
}
.run-stage small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.stage-outcome {
  margin-left: auto;
  font-size: 12px;
  color: var(--green);
}
.stage-outcome.revealed {
  color: var(--rose);
}
.celebration-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 9px;
  opacity: 0;
  pointer-events: none;
}
.result .eyebrow {
  margin-bottom: 7px;
}
.result h1 {
  font-size: 43px;
}
.answer {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--green-soft);
  border-radius: 15px;
}
.answer h2 {
  font:
    normal 26px/1.2 Georgia,
    serif;
}
.answer > p:last-child {
  margin-top: 12px;
  font-size: 15px;
}
.takeaway {
  padding: 12px 0 0;
  font-size: 14px;
}
.explanation {
  text-align: left;
  border-block: 1px solid var(--line);
  padding: 14px 0;
  margin-top: 0;
}
summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
details > p {
  font-size: 14px;
  margin-top: 14px;
}
.breakers {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.breaker {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.breaker .token {
  font-size: 18px;
}
.next-up {
  padding: 18px 0 22px;
}
.next-puzzle {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 16px 20px;
  border-radius: 12px;
  gap: 16px;
  box-shadow: 0 4px 0 #173c2e;
}
.next-puzzle strong,
.next-puzzle small {
  display: block;
}
.next-puzzle strong {
  font-size: 18px;
}
.next-puzzle small {
  font-weight: 400;
  font-size: 12px;
  margin-top: 2px;
  opacity: 0.85;
}
.next-number {
  font:
    38px/1 Georgia,
    serif;
  opacity: 0.8;
}
.next-arrow {
  margin-left: auto;
  font-size: 26px;
  transition: transform 180ms ease;
}
.next-puzzle:hover .next-arrow {
  transform: translateX(4px);
}
.day-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.day-progress > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
}
.day-progress > .done {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.day-progress small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}
.result-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
}
.share-preview {
  margin: 6px 0 14px;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.8 monospace;
  text-align: left;
  background: var(--surface);
  padding: 18px;
  border-radius: 8px;
}
.practice-bar {
  padding: 16px 0;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.practice-bar strong {
  font:
    normal 21px Georgia,
    serif;
}
.practice-controls {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.practice-controls select {
  padding: 10px;
  font-size: 13px;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 17px 0 25px;
  color: var(--muted);
  font-size: 11px;
}
footer .textbtn {
  color: var(--muted);
  font-size: 11px;
}
dialog {
  width: min(100% - 32px, 530px);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 25px 80px #0003;
}
dialog::backdrop {
  background: #16271a80;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font:
    normal 31px/1.15 Georgia,
    serif;
  margin-bottom: 16px;
}
dialog > p {
  margin-top: 14px;
  font-size: 14px;
}
dialog .dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dialog-top .eyebrow {
  margin: 0;
}
.dialog-actions,
.tutorial-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.dialog-actions .btn,
.tutorial-choices .btn {
  flex: 1;
}
.tutorial-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.tutorial-board > div {
  padding: 16px;
  background: var(--green-soft);
  border-radius: 8px;
}
.tutorial-board > div:last-child {
  background: var(--rose-soft);
}
.tutorial-board b {
  font-size: 12px;
}
.tutorial-board p {
  font-size: 20px;
  margin-top: 6px;
}
.tutorial-feedback {
  padding: 15px;
  background: var(--paper);
  border-radius: 8px;
  min-height: 100px;
}
#btnTutorialDone {
  width: 100%;
  margin-top: 17px;
}
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-tiles > div {
  padding: 16px 8px;
  text-align: center;
  background: var(--green-soft);
  border-radius: 8px;
}
.stat-tiles b {
  display: block;
  font:
    normal 28px Georgia,
    serif;
}
.stat-tiles span {
  font-size: 11px;
}
dialog h3 {
  margin-top: 25px;
}
.archive {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
  margin-top: 15px;
}
.archive a {
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 11px;
  font-size: 13px;
}
.busy {
  pointer-events: none;
  opacity: 0.65;
}
@keyframes settle {
  from {
    transform: translateY(7px);
    opacity: 0.3;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes tile-pop {
  0% {
    opacity: 0;
    transform: translateY(-12px) rotate(-5deg) scale(0.78);
  }
  65% {
    opacity: 1;
    transform: translateY(2px) rotate(2deg) scale(1.07);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
.slot[href]:hover {
  background: var(--green-soft);
}

/* Shared, linkable site pages. */
a.btn,
a.textbtn {
  text-decoration: none;
}
.site-footer {
  flex-wrap: wrap;
  gap: 12px 24px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.site-footer a,
.site-intro a,
.breadcrumbs a,
.archive-pager a {
  color: var(--green);
  text-underline-offset: 4px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-intro {
  max-width: 600px;
  margin: 20px auto 28px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.site-intro a {
  display: inline-block;
  padding-top: 8px;
}
.content-masthead {
  border-bottom: 1px solid var(--line);
}
main.content-page {
  max-width: 660px;
  margin: 28px auto 48px;
  padding: 0;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 26px;
}
.content-page h1 {
  margin-bottom: 24px;
}
.content-page h2 {
  font:
    normal 27px/1.2 Georgia,
    serif;
  margin: 28px 0 12px;
}
.content-page p {
  margin: 14px 0;
  line-height: 1.75;
}
.content-page .page-lede {
  color: var(--muted);
  font-size: 19px;
}
.content-page > .btn {
  margin-top: 16px;
}
.how-steps {
  padding-left: 25px;
}
.how-steps li {
  padding-left: 8px;
}
.how-steps li::marker {
  color: var(--green);
  font-weight: 600;
}
.category-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.category-link,
.archive-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.category-link:hover,
.archive-day:hover {
  border-color: var(--green);
  background: var(--green-soft);
}
.archive-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.archive-day > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.archive-day strong {
  font-size: 15px;
}
.archive-day small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.archive-number {
  font:
    normal 25px Georgia,
    serif;
  color: var(--green);
}
.archive-pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 480px) {
  .site-footer {
    justify-content: center;
    text-align: center;
  }
  .site-footer nav {
    justify-content: center;
    gap: 4px 16px;
  }
  .site-footer > span {
    width: 100%;
  }
  .content-page h1 {
    font-size: 36px;
  }
  .content-page h2 {
    font-size: 24px;
  }
  .content-page p {
    font-size: 15px;
  }
}
.slot:active {
  transform: translateY(2px);
}
.tray button,
.seg button {
  transition:
    background 150ms,
    border-color 150ms,
    transform 150ms;
}
.tray button:active,
.seg button:active {
  transform: scale(0.92);
}
.explanation[open],
.practice-bar[open] {
  animation: settle 220ms ease-out;
}
@media (min-width: 1100px) {
  main {
    padding: 0 45px;
  }
  .slots {
    margin-bottom: 26px;
  }
  .phase-head {
    margin-top: 24px;
  }
}
@media (max-width: 650px) {
  .shell {
    width: calc(100% - 32px);
  }
  .masthead {
    padding: 20px 0 13px;
    gap: 5px;
  }
  .wordmark {
    font-size: 34px;
  }
  .brand-mark {
    width: 31px;
    height: 31px;
  }
  .iconbtn {
    width: 44px;
    height: 44px;
  }
  .iconbtn svg {
    width: 17px;
    height: 17px;
  }
  .header-actions {
    gap: 0;
  }
  .edition {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .slots {
    gap: 12px;
    margin: 8px 0 24px;
  }
  .slot {
    gap: 7px;
    padding-bottom: 12px;
  }
  .slot-number {
    font-size: 36px;
  }
  .slot strong {
    font-size: 14px;
  }
  .slot small {
    font-size: 10px;
  }
  .welcome {
    padding: 3px 12px;
    margin-bottom: 20px;
  }
  .welcome-actions {
    margin-top: 0;
  }
  .welcome strong {
    font-size: 12px;
  }
  .phase-tag {
    display: none;
  }
  .phase-head {
    margin-bottom: 20px;
  }
  .phase-head #lede {
    font-size: 13px;
    margin-top: 9px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .evidence {
    gap: 10px;
  }
  .evidence-group {
    padding: 13px 10px;
    border-radius: 12px;
  }
  .evidence-group h2 {
    font-size: 12px;
    gap: 5px;
    margin-bottom: 12px;
  }
  .group-note {
    display: none;
  }
  .tokens {
    gap: 7px;
    max-height: 300px;
  }
  .token {
    min-width: 42px;
    min-height: 43px;
    padding: 8px 6px;
    font-size: 19px;
  }
  .t-word.long {
    font-size: 15px;
  }
  .t-shape {
    width: 30px;
    height: 30px;
  }
  .t-emoji {
    font-size: 24px;
  }
  .board-caption {
    font-size: 10px;
    margin: -10px 0 14px;
  }
  .workbench,
  .challenge {
    padding: 18px 15px;
    border-radius: 12px;
  }
  .section-title h2 {
    font-size: 22px;
  }
  .count {
    font-size: 11px;
  }
  .scope {
    font-size: 12px;
  }
  .btn {
    padding: 11px 13px;
    font-size: 13px;
    gap: 8px;
  }
  .workbench-actions {
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    margin-top: 15px;
  }
  .workbench-actions .solve {
    width: 100%;
  }
  .workbench-actions .muted {
    margin-left: auto;
  }
  .reassurance {
    font-size: 10px;
  }
  .tray {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    max-height: 240px;
  }
  .emoji-filters button {
    min-height: 44px;
  }
  .picker {
    gap: 9px;
    align-items: flex-start;
  }
  .picker > .token {
    width: 48px;
    height: 48px;
    padding: 5px;
  }
  .picker-label {
    width: 35px;
    font-size: 11px;
  }
  .seg {
    gap: 4px;
  }
  .seg button {
    min-width: 44px;
    padding: 6px;
    min-height: 44px;
  }
  .seg svg {
    width: 18px;
    height: 18px;
  }
  .picker-row {
    gap: 4px;
  }
  .prove-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .prove-item {
    display: grid;
    grid-template-columns: minmax(56px, 0.65fr) minmax(0, 1.75fr);
    align-items: center;
    gap: 6px 10px;
    padding: 10px;
  }
  .sort-preview {
    min-height: 86px;
  }
  .choice-face {
    min-height: 68px;
    font-size: 12px;
  }
  .prove-item .t-word {
    font-size: 20px;
  }
  .prove-item .t-word.long {
    font-size: 16px;
  }
  .prove-item .truth,
  .prove-item .revisited {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .challenge-actions {
    gap: 10px;
  }
  .practice-bar {
    display: block;
    margin-top: 20px;
    padding: 15px 0;
  }
  .practice-controls {
    margin-top: 15px;
  }
  .practice-controls select {
    flex: 1;
    min-width: 0;
    font-size: 16px;
  }
  .result {
    margin-top: 25px;
  }
  .result h1 {
    font-size: 35px;
  }
  .result-mark {
    width: 60px;
    height: 60px;
  }
  .result-top {
    gap: 8px;
  }
  .next-puzzle {
    padding: 14px 16px;
    gap: 14px;
  }
  .answer {
    padding: 17px;
  }
  .answer h2 {
    font-size: 24px;
  }
  footer {
    font-size: 10px;
    gap: 5px;
  }
  dialog {
    padding: 23px;
  }
  .tutorial-board p {
    font-size: 16px;
    white-space: nowrap;
  }
  .tutorial-board > div {
    padding: 12px 8px;
  }
}
@media (max-width: 480px) {
  .masthead {
    flex-direction: column;
    gap: 10px;
  }
  .header-actions {
    gap: 8px;
  }
  .picker {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .picker > .token {
    width: 64px;
    height: 64px;
  }
  .picker-rows {
    width: 100%;
    gap: 12px;
  }
  .picker-row {
    align-items: flex-start;
    gap: 8px;
  }
  .picker-label {
    padding-top: 13px;
  }
  .prove-item:has(.t-word) {
    grid-template-columns: minmax(0, 1fr);
  }
  .prove-item:has(.t-word) .sort-preview {
    min-height: 70px;
  }
  .prove-item .t-word {
    font-size: 24px;
  }
  .prove-item .t-word.long {
    font-size: 18px;
  }
}
@media (max-width: 350px) {
  .wordmark {
    font-size: 34px;
  }
  .wordmark {
    gap: 4px;
  }
  .brand-mark {
    width: 27px;
    height: 27px;
  }
  .slot-number {
    font-size: 31px;
  }
  .slots {
    gap: 7px;
  }
  .slot {
    gap: 5px;
  }
  .slot strong {
    font-size: 12px;
  }
  .day-progress small {
    font-size: 11px;
  }
  .result-mark {
    width: 54px;
    height: 54px;
  }
  .result h1 {
    font-size: 31px;
  }
  .edition {
    letter-spacing: 0.5px;
  }
  .count {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 650px) {
  .evidence .token:has(.t-shape) {
    padding: 4px;
    min-width: 38px;
  }
  .evidence .token:has(.t-card) {
    padding: 6px;
    min-width: 39px;
    font-size: 18px;
  }
  .ranks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  }
  .ranks button {
    min-width: 0;
  }
  .slot small {
    font-size: 11px;
  }
  .scope {
    font-size: 13px;
  }
  .board-caption {
    font-size: 11px;
  }
  .count {
    font-size: 12px;
  }
  .reassurance {
    font-size: 11px;
  }
  .picker-label {
    width: 34px;
    font-size: 11px;
  }
  .phase-head #lede {
    font-size: 14px;
  }
}

/* A compact, shared footer and readable legal pages. */
.site-footer {
  display: block;
  padding: 30px 0 22px;
  text-align: left;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.25fr;
  gap: 24px;
}
.footer-brand > a {
  gap: 9px;
  color: var(--ink);
  font:
    bold 27px/1 Georgia,
    serif;
  letter-spacing: -1px;
}
.footer-brand img {
  width: 25px;
  height: 25px;
}
.footer-brand p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.6;
}
.site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
}
.site-footer h2 {
  margin: 0 0 6px;
  font: 600 11px/1.5 var(--sans, sans-serif);
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer nav a {
  min-height: 44px;
  line-height: 1.4;
  flex-wrap: wrap;
  column-gap: 4px;
}
.footer-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.site-footer .footer-signature {
  margin-left: auto;
  color: var(--ink);
  font: bold 25px/1 Georgia, serif;
  letter-spacing: -0.8px;
  text-decoration: none;
}
.legal-page a {
  color: var(--green);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.legal-page section {
  scroll-margin-top: 24px;
}
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.legal-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
}
.legal-contact {
  font-style: normal;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.legal-updated {
  color: var(--muted);
  font-size: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.legal-draft {
  padding: 18px;
  border: 1px solid var(--accent);
  background: var(--surface);
  border-radius: 10px;
}
.legal-draft p {
  margin-bottom: 0;
}
.legal-placeholder {
  color: var(--muted);
}
@media (max-width: 680px) {
  .footer-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 16px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 420px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer nav[aria-label="Legal"] {
    grid-column: 1 / -1;
    display: block;
  }
  .site-footer nav[aria-label="Legal"] a {
    margin-right: 16px;
  }
}
