@font-face {
  font-family: Inter;
  src: url("inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #1b1b1d;
  --surface: #252527;
  --raised: #333335;
  --line: #414143;
  --line-soft: #363638;
  --ink: #f4f3f1;
  --muted: #b4b3b3;
  --quiet: #aaa8a8;
  --accent: #ff996a;
  --accent-ink: #2b1a12;
  --gutter: clamp(16px, 2.6vw, 48px);
  --max: 1512px;
  --row-height: clamp(38px, 3.2vw, 51px);
  --mono:
    ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --secondary: #d4d2d0;
  --control-border: #545457;
  --control-hover: #717174;
  --tab-selected: #464648;
  --rank-stripe: #28282a;
  --rank-frame: #5d564e;
  --row-hover: #303032;
  --row-mine: #3c3c3e;
  --inset: #202022;
  --table-head: #2c2c2e;
  --placeholder: #a29fa1;
  --error: #ffb09d;
  --medal: #e2d7cd;
  --accent-mark: #ff996a;
  --scrim: rgb(10 10 11 / 73%);
  --winner-bg: #27231f;
  --winner-glow: #33291f;
  --winner-border: #896443;
  --winner-rule: #534436;
  --winner-gold: #f5bf83;
  --winner-badge: #463627;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f6f3;
  --surface: #fffefd;
  --raised: #eceae6;
  --line: #d6d1ca;
  --line-soft: #e3dfd9;
  --ink: #252423;
  --muted: #585651;
  --quiet: #64605a;
  --secondary: #43413e;
  --control-border: #b9b3aa;
  --control-hover: #908a82;
  --tab-selected: #fffefd;
  --rank-stripe: #faf9f6;
  --rank-frame: #cec2b3;
  --row-hover: #f2f0ec;
  --row-mine: #ebe4db;
  --inset: #f6f4f0;
  --table-head: #eae6df;
  --placeholder: #6c6760;
  --error: #993421;
  --medal: #7d5b38;
  --accent-mark: #a54720;
  --scrim: rgb(36 30 26 / 45%);
  --winner-bg: #fffaf2;
  --winner-glow: #f7ebd9;
  --winner-border: #ba8e57;
  --winner-rule: #ddc9ac;
  --winner-gold: #87521f;
  --winner-badge: #f1e1c9;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-block-start: 1rem;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    1rem/1.5 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:disabled {
  cursor: wait;
  opacity: 0.64;
}
:focus-visible {
  outline: 2px solid var(--accent-mark);
  outline-offset: 3px;
}
h1,
h2,
h3,
p,
ul {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.09;
  letter-spacing: -0.04em;
}
.wrap {
  width: min(calc(100% - var(--gutter) - var(--gutter)), var(--max));
  margin-inline: auto;
}
.sr-only,
.compact-table .table-head {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.icon,
[data-i] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon svg,
[data-i] svg {
  display: block;
  width: 1.15em;
  height: 1.15em;
}
.top {
  border-bottom: 1px solid var(--line-soft);
}
.bar {
  min-height: clamp(60px, 4.65vw, 75px);
  display: flex;
  align-items: center;
  gap: clamp(30px, 4.6vw, 78px);
}
.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-weight: 695;
  letter-spacing: -0.045em;
}
.brand {
  font-size: clamp(1.17rem, 1.68vw, 1.6rem);
}
.brand img {
  width: 1.37em;
  height: auto;
}
.brand:hover,
.footer-brand:hover {
  color: var(--accent-mark);
}
.bar nav {
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.5vw, 44px);
}
.bar nav a,
.navcert,
.user {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 480;
  font-size: clamp(0.86rem, 1.075vw, 1.04rem);
}
.bar nav a.active,
.bar nav a:hover,
.navcert:hover,
.user:hover,
.user[aria-current] {
  color: var(--ink);
}
.user {
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  color: var(--ink);
}
.header-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: clamp(10px, 1.3vw, 20px);
  min-width: 0;
  max-width: 34%;
}
.theme-toggle {
  display: grid;
  place-items: center;
  flex: none;
  height: 42px;
  padding: 0 1px;
  border: 0;
  background: transparent;
  border-radius: 15px;
}
.theme-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  align-items: center;
  justify-items: center;
  width: 55px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--control-border);
  border-radius: 16px;
  background: var(--surface);
}
.theme-rail::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 12px;
  background: var(--tab-selected);
  box-shadow: 0 1px 4px rgb(0 0 0 / 22%);
  transform: translateX(100%);
  transition: transform 0.18s ease;
}
.theme-rail svg {
  z-index: 1;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--quiet);
}
.theme-rail .theme-moon {
  color: var(--ink);
}
.theme-toggle:hover .theme-rail {
  border-color: var(--control-hover);
}
:root[data-theme="light"] .theme-rail {
  background: var(--raised);
}
:root[data-theme="light"] .theme-rail::before {
  transform: translateX(0);
}
:root[data-theme="light"] .theme-sun {
  color: var(--accent-mark);
}
:root[data-theme="light"] .theme-moon {
  color: var(--quiet);
}
#profile-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chevron {
  width: 7px;
  height: 7px;
  border: solid var(--muted);
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}
.primary,
.arena-play,
.ghost,
.round-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.91rem;
  line-height: 1.28;
  font-weight: 600;
  text-align: center;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.primary,
.arena-play {
  background: var(--accent);
  color: var(--accent-ink);
}
.primary:hover,
.arena-play:hover {
  background: #ffad85;
}
.ghost,
.round-button {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--control-border);
}
.ghost:hover,
.round-button:hover {
  background: var(--raised);
  border-color: var(--control-hover);
}
.dim,
.intro,
.notice,
.tiny,
.loading,
.empty {
  color: var(--muted);
}
.notice,
.tiny {
  font-size: 0.85rem;
}
.loading {
  padding-block: 3rem;
}
.loading button {
  margin-top: 12px;
}

/* The two images share a single crop as the boundary moves across the stage. */
.arena {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 50px);
  align-items: center;
  margin-top: clamp(24px, 2.3vw, 40px);
}
.arena-copy {
  min-width: 0;
  padding-bottom: clamp(8px, 2vw, 34px);
}
.arena h1 {
  font-size: clamp(2.48rem, 4.07vw, 4.1rem);
  line-height: 1.035;
  letter-spacing: -0.056em;
  font-weight: 740;
}
.arena-copy > p {
  margin-top: clamp(14px, 1.55vw, 25px);
  font-size: clamp(1rem, 1.29vw, 1.29rem);
  color: var(--secondary);
  line-height: 1.5;
}
.arena-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: clamp(22px, 2.3vw, 38px);
}
.arena-play {
  min-height: clamp(46px, 4vw, 64px);
  padding-inline: clamp(20px, 2vw, 34px);
  font-size: clamp(1rem, 1.34vw, 1.31rem);
  font-weight: 640;
}
.remaining,
.personal-places > span {
  color: var(--muted);
  font-size: 0.88rem;
}
.personal-places {
  margin-top: 18px;
}
.personal-places ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 17px;
  list-style: none;
  padding: 3px 0 0;
}
.personal-places li {
  white-space: nowrap;
  font-size: 0.96rem;
}
.personal-places b {
  margin-left: 3px;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
}
.lesson {
  min-width: 0;
}
.lesson-stage {
  --split: 100%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1536 / 580;
  border-radius: 4px;
  background: #3c3837;
}
.lesson-stage .scene,
.compare-reveal,
.prompt-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lesson-stage .scene {
  display: block;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}
.scene-label {
  position: absolute;
  bottom: clamp(10px, 1vw, 17px);
  z-index: 1;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgb(22 22 23 / 64%);
  font-size: clamp(0.77rem, 0.96vw, 0.94rem);
  font-weight: 560;
}
.target-label {
  left: clamp(7px, 0.95vw, 16px);
}
.result-label {
  right: clamp(7px, 0.95vw, 16px);
}
.compare-reveal {
  display: none;
  z-index: 2;
  clip-path: inset(0 0 0 var(--split));
}
.compare-grip {
  display: none;
  position: absolute;
  z-index: 3;
  left: var(--split);
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 0 4px #292526;
  pointer-events: none;
}
.compare-range {
  display: none;
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.lesson-stage:has(.compare-range:focus-visible) {
  outline: 2px solid var(--accent-mark);
  outline-offset: 3px;
}
.lesson[data-step="2"] :is(.compare-grip, .compare-range, .compare-reveal) {
  display: block;
}
.lesson-stage:is([data-edge="reference"], [data-edge="result"]) .compare-grip {
  visibility: hidden;
}
.lesson[data-step="2"] [data-edge="result"] .target-label,
.lesson[data-step="1"] .target-label {
  visibility: hidden;
}
.prompt-overlay {
  display: none;
  z-index: 3;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(18px, 3.25vw, 54px);
  background: linear-gradient(
    100deg,
    rgb(23 22 23 / 93%),
    rgb(27 23 25 / 79%) 65%,
    rgb(31 26 27 / 38%)
  );
  color: #f4f3f1;
}
.lesson[data-step="1"] .prompt-overlay {
  display: flex;
}
.prompt-overlay span {
  margin-bottom: 0.55em;
  font-size: 0.8rem;
  font-weight: 550;
  color: #ffb896;
}
.prompt-overlay p {
  max-width: 37ch;
  font-size: clamp(1rem, 1.55vw, 1.55rem);
  line-height: 1.38;
  letter-spacing: -0.025em;
}
.award-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2.5vw, 38px);
  padding: clamp(12px, 2vw, 32px);
  background:
    radial-gradient(ellipse at 82% 60%, #514237, transparent 63%), #272526;
  color: #f4f3f1;
}
.lesson[data-step="3"] .award-frame {
  display: grid;
}
.lesson[data-step="3"] .target-label {
  visibility: hidden;
}
.award-note > span {
  color: #ffc1a5;
  font-size: clamp(0.78rem, 1vw, 1rem);
}
.award-score {
  margin: 0.06em 0;
  font-size: clamp(2.4rem, 5.4vw, 5.1rem);
  line-height: 1.02;
  font-weight: 670;
  letter-spacing: -0.055em;
}
.award-score small {
  font-size: 0.32em;
  color: #c7c3c0;
  font-weight: 500;
  letter-spacing: 0;
}
.award-feedback {
  max-width: 32ch;
  color: #dedad6;
  font-size: clamp(0.82rem, 1.12vw, 1.08rem);
  line-height: 1.4;
}
.award-paper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e9dbd1;
}
.award-paper canvas {
  display: block;
  min-height: 0;
  max-width: 100%;
  flex: 1 1 0;
  width: 100%;
  height: 0;
  object-fit: contain;
}
.award-paper span {
  flex: none;
  font-size: clamp(0.71rem, 0.95vw, 0.9rem);
}
.award-paper:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lesson-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 43px;
  padding-inline: 32px;
}
.lesson-tabs {
  display: flex;
  align-items: center;
  gap: clamp(7px, 1.7vw, 27px);
}
.lesson-tabs button,
.playback {
  border: 0;
  background: transparent;
}
.lesson-tabs button {
  position: relative;
  padding: 4px 0;
  min-height: 36px;
  color: var(--muted);
  font-size: clamp(0.75rem, 0.92vw, 0.92rem);
}
.lesson-tabs button + button {
  margin-left: clamp(14px, 2.2vw, 35px);
}
.lesson-tabs button + button::before {
  content: "";
  position: absolute;
  right: calc(100% + clamp(7px, 1.3vw, 21px));
  top: 50%;
  width: clamp(12px, 2.15vw, 34px);
  height: 1px;
  background: var(--control-border);
  pointer-events: none;
}
.lesson-tabs button:hover,
.lesson-tabs [aria-pressed="true"] {
  color: var(--ink);
}
.lesson-tabs [aria-pressed="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 2px;
  left: 0;
  right: 0;
  background: var(--accent);
}
.playback {
  display: grid;
  place-items: center;
  position: absolute;
  right: 0;
  width: 32px;
  height: 32px;
  color: var(--quiet);
  border-radius: 4px;
}
.playback:hover {
  color: var(--ink);
  background: var(--raised);
}
.playback svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.play-glyph,
.playback[data-paused="true"] .pause-glyph {
  display: none;
}
.playback[data-paused="true"] .play-glyph {
  display: block;
}

/* Daily first places and the prompts behind them */
.winner-section {
  margin-top: clamp(28px, 3.5vw, 58px);
  border: 1px solid var(--winner-border);
  border-radius: 12px;
  background: linear-gradient(118deg, var(--winner-glow), var(--winner-bg) 62%);
}
.winner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: clamp(16px, 2vw, 30px);
  border-bottom: 1px solid var(--winner-rule);
}
.winner-heading {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}
.winner-heading h2 {
  font-size: clamp(1.45rem, 2.15vw, 2.3rem);
  font-weight: 665;
}
.winner-trophy {
  display: grid;
  place-items: center;
  flex: none;
  width: 35px;
  height: 35px;
  color: var(--winner-gold);
  background: var(--winner-badge);
  border-radius: 50%;
}
.winner-head time {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}
.winner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.winner-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: clamp(16px, 2vw, 30px);
}
.winner-card + .winner-card {
  border-left: 1px solid var(--winner-rule);
}
.winner-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  font-size: 0.89rem;
  letter-spacing: 0;
  font-weight: 570;
  color: var(--secondary);
}
.winner-card h3 .icon {
  color: var(--winner-gold);
}
.winner-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.winner-names {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.winner-nick {
  font-size: clamp(1rem, 1.55vw, 1.52rem);
  font-weight: 635;
  letter-spacing: -0.028em;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.winner-extra,
.winner-empty {
  color: var(--muted);
  font-size: 0.86rem;
}
.winner-score {
  white-space: nowrap;
  color: var(--winner-gold);
  font-weight: 660;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.05rem, 1.5vw, 1.43rem);
  line-height: 1.25;
}
.winner-score small {
  font-size: 0.62em;
  color: var(--muted);
  font-weight: 500;
}
.winner-open {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 12px 0 0;
  min-height: 34px;
  color: var(--winner-gold);
  background: transparent;
  border: 0;
  font-size: 0.87rem;
  font-weight: 560;
  text-align: left;
}
.winner-open:hover {
  text-decoration: underline;
  text-underline-offset: 0.23em;
}
.winner-detail-head,
.winning-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.winner-detail-head {
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.winner-detail-nick {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.36rem;
}
.winner-detail-head .winner-field {
  margin: 0;
  min-width: min(100%, 160px);
}
.winner-detail-score {
  display: grid;
}
.winner-detail-score strong {
  color: var(--winner-gold);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.winner-detail-score small,
.winner-detail-score > span,
.winning-entry-head > span {
  font-size: 0.82rem;
  font-weight: 475;
  color: var(--muted);
}
.winning-entries {
  list-style: none;
  padding: 0;
}
.winning-entries li + li {
  margin-top: 18px;
}
.winning-entry-head {
  margin-bottom: 6px;
}
.winning-entry-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}
.winning-entry-head > span {
  white-space: nowrap;
}
.winning-prompt {
  padding: 12px 15px;
  margin: 0;
  border-left: 2px solid var(--winner-border);
  border-radius: 0 5px 5px 0;
  background: var(--inset);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Daily and weekly standings */
.rank-section {
  margin-top: clamp(32px, 3.5vw, 56px);
  margin-bottom: 26px;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: clamp(14px, 1.45vw, 24px);
}
.sectionhead h2 {
  font-size: clamp(1.82rem, 3vw, 3rem);
  font-weight: 700;
}
.switch {
  display: inline-flex;
  flex-shrink: 0;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}
.tab {
  min-height: 32px;
  padding: 4px clamp(10px, 1.5vw, 24px);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 530;
}
.tab.on {
  background: var(--tab-selected);
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(0 0 0 / 14%);
}
.tab:hover:not(.on) {
  color: var(--ink);
  background: var(--row-hover);
}
.board-filters {
  display: none;
}
.boardgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
}
.board {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 clamp(12px, 1.55vw, 24px);
}
.board + .board {
  border-left: 1px solid var(--line);
}
.boardhead {
  min-width: 0;
  display: flex;
  gap: clamp(9px, 1.16vw, 18px);
  align-items: center;
  min-height: clamp(58px, 5.05vw, 79px);
  padding-inline: 6px;
}
.boardhead > .icon {
  font-size: clamp(1.28rem, 1.6vw, 1.62rem);
}
.boardhead h3 {
  font-size: clamp(1.15rem, 1.65vw, 1.67rem);
  font-weight: 630;
  letter-spacing: -0.035em;
}
.compact-table,
.full-table {
  position: relative;
}
.row,
.table-head {
  display: grid;
  grid-template-columns: clamp(25px, 2.95vw, 46px) minmax(0, 1fr) minmax(
      2.9em,
      max-content
    );
  align-items: center;
  column-gap: clamp(8px, 1.08vw, 17px);
  padding-inline: clamp(7px, 0.95vw, 15px);
}
.row {
  height: var(--row-height);
  border-bottom: 1px solid var(--line-soft);
  font-size: clamp(0.93rem, 1.2vw, 1.17rem);
  line-height: 1.2;
}
.rank,
.num,
.history-score,
.resultscore,
.clock strong {
  font-variant-numeric: tabular-nums;
}
.rank {
  color: var(--secondary);
}
.num {
  text-align: right;
  font-weight: 610;
}
.who {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.nickname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 505;
}
.player-avatar {
  --avatar-size: 1.75rem;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 var(--avatar-size);
  width: var(--avatar-size);
  height: var(--avatar-size);
  overflow: hidden;
  border-radius: 50%;
  background: hsl(var(--avatar-hue) 24% 27%);
  color: hsl(var(--avatar-hue) 39% 85%);
  font-family: Inter, system-ui, sans-serif;
  font-size: calc(var(--avatar-size) * .36);
  font-weight: 640;
  letter-spacing: .015em;
  line-height: 1;
  user-select: none;
}
:root[data-theme="light"] .player-avatar {
  background: hsl(var(--avatar-hue) 38% 89%);
  color: hsl(var(--avatar-hue) 36% 29%);
}
.avatar-picture, .avatar-sample {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.avatar-picture { object-fit: cover; }
.avatar-sample {
  background-image: url("practice-avatars.webp?v=12");
  background-size: 400% 400%;
  background-repeat: no-repeat;
}
#header-photo { display: inline-flex; align-items: center; }
#header-photo .player-avatar { --avatar-size: 1.5rem; }
.winner-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.winner-identity .player-avatar { --avatar-size: 1.45rem; }

.row { position: relative; }
.row:where(:nth-child(even):not(.mine)) { background-color: var(--rank-stripe); }
.who { gap: clamp(6px, .7vw, 10px); }
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.top-ten::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0 solid var(--rank-frame);
  border-inline-width: 1px;
}
.rank-list > .top-ten:first-child::before,
.compact-table > .top-ten::before {
  border-top-width: 1px;
  border-start-start-radius: 6px;
  border-start-end-radius: 6px;
}
.rank-list > .top-ten:last-child::before,
.rank-list > .top-ten:has(+ .row:not(.top-ten))::before,
.compact-table > .top-ten::before {
  border-bottom-width: 1px;
  border-end-start-radius: 6px;
  border-end-end-radius: 6px;
}
.podium .rank-number {
  height: 1.5rem;
  border: 1px solid var(--place-edge);
  border-radius: 50%;
  background: var(--place-fill);
  color: var(--place-ink);
  font-size: .84rem;
  font-weight: 720;
}
.podium .nickname { font-weight: 630; }
.place-1 { --place-fill: #4e3d26; --place-edge: #9f7947; --place-ink: #ffdb97; }
.place-2 { --place-fill: #363c45; --place-edge: #737e8a; --place-ink: #e2e9f3; }
.place-3 { --place-fill: #4b342b; --place-edge: #996c54; --place-ink: #f6c4a8; }
:root[data-theme="light"] .place-1 { --place-fill: #f7eacb; --place-edge: #b9954c; --place-ink: #6d501b; }
:root[data-theme="light"] .place-2 { --place-fill: #e8ebef; --place-edge: #9da6b3; --place-ink: #485367; }
:root[data-theme="light"] .place-3 { --place-fill: #f5e5d9; --place-edge: #bd8e6c; --place-ink: #784927; }

@media (hover: hover) {
  .row:not(.mine):hover {
    background: var(--row-hover);
    border-radius: 3px;
  }
}
.mine {
  background: var(--row-mine);
  border-radius: 3px;
}
.mine .who::before {
  content: "";
  position: absolute;
  right: calc(100% + 8px);
  width: 3px;
  height: 1.3em;
  border-radius: 2px;
  background: var(--accent-mark);
}
.boardfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 49px;
  margin-top: auto;
  padding-inline: clamp(7px, 0.95vw, 15px);
}
.more {
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: var(--secondary);
  font-size: 0.86rem;
}
.more:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.total {
  color: var(--quiet);
  font-size: 0.76rem;
  text-align: right;
}
.empty {
  padding: 16px 8px;
  font-size: 0.9rem;
}
.table-head {
  min-height: 37px;
  color: var(--quiet);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.table-head > :last-child {
  text-align: right;
}
.full-table {
  margin-top: 16px;
}
.full-table .row {
  min-height: 40px;
}
#rank-next .more {
  margin-top: 8px;
}

/* Challenges */
.day-section {
  margin-top: clamp(23px, 2.5vw, 44px);
}
.section-meta,
.clock,
.kind,
.draft-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.section-meta {
  margin-bottom: 6px;
  font-size: 0.86rem;
  color: var(--muted);
}
.round-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px 18px;
}
.clock {
  color: var(--muted);
  font-size: 0.82rem;
}
.clock strong {
  color: var(--ink);
  font-weight: 540;
}
.kind {
  color: var(--secondary);
  font-size: 0.83rem;
  font-weight: 550;
}
.challenge-desk {
  --desk-pad: clamp(19px, 2vw, 32px);
  --desk-edge: clamp(8px, .8vw, 12px);
  --desk-highlight: color-mix(in srgb, var(--accent-mark) 7%, transparent);
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  grid-template-rows: auto auto;
  border-block: 1px solid var(--line);
}
.desk-entry { display: flex; min-width: 0; }
.desk-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: var(--desk-pad);
  border-radius: 7px;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.desk-image {
  grid-row: 1 / 3;
  border-inline-end: 1px solid var(--line);
}
.desk-image .desk-panel { padding-inline-start: var(--desk-edge); }
.desk-text .desk-panel, .desk-code .desk-panel { padding-inline-end: var(--desk-edge); }
.desk-text { border-bottom: 1px solid var(--line); }
.desk-photo {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(168px, 15vw, 248px);
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface);
  margin-bottom: var(--desk-pad);
}
.desk-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.desk-meta, .desk-meta > span, .desk-open { display: inline-flex; align-items: center; }
.desk-meta {
  gap: 12px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 590;
  letter-spacing: .035em;
}
.desk-meta > span { gap: 7px; }
.desk-meta .icon { color: var(--accent-mark); height: 16px; width: 16px; }
.desk-dialect { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; font: .74rem/1.4 var(--mono); }
.desk-content h3 {
  margin: .31em 0 .26em;
  font-size: clamp(1.6rem, 2.45vw, 2.55rem);
  font-weight: 585;
  line-height: 1.08;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}
.desk-image h3 { font-size: clamp(2.1rem, 3.2vw, 3.5rem); }
.desk-brief { max-width: 67ch; color: var(--secondary); font-size: clamp(.93rem, 1vw, 1.02rem); line-height: 1.48; margin: 0; overflow-wrap: anywhere; }
.desk-quote {
  margin: 12px 0 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font: italic clamp(1rem, 1.15vw, 1.18rem)/1.4 Georgia, serif;
}
.desk-quote span { color: var(--accent-mark); line-height: 1; font-size: 1.48em; }
.desk-data { display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; margin-top: 12px; }
.desk-data span { color: var(--quiet); font-size: .75rem; }
.desk-data code { color: var(--secondary); font: .8rem/1.5 var(--mono); overflow-wrap: anywhere; }
.desk-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: clamp(18px, 1.8vw, 29px);
}
.desk-stats { display: flex; flex-wrap: wrap; gap: 10px clamp(16px, 2.5vw, 41px); margin: 0; }
.desk-stats dt { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.desk-stats dd { color: var(--ink); margin: .16em 0 0; font-size: clamp(1.16rem, 1.55vw, 1.58rem); line-height: 1; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.desk-stats small { color: var(--quiet); font-size: .53em; font-weight: 450; letter-spacing: 0; }
.desk-open {
  min-height: 43px;
  padding: 0 14px;
  white-space: nowrap;
  gap: 10px;
  border: 1px solid var(--control-border);
  border-radius: 7px;
  font-size: .84rem;
  font-weight: 570;
  color: var(--ink);
  text-decoration: none;
}
.desk-open span { font-size: 1.12em; }
.desk-image .desk-open { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.desk-entry:focus-visible {
  position: relative;
  z-index: 1;
  outline-offset: -2px;
  border-radius: 7px;
}
.desk-entry:focus-visible .desk-panel,
.desk-entry:active .desk-panel { background-color: var(--desk-highlight); }
.desk-entry:focus-visible .desk-open { border-color: var(--accent-mark); }
@media (hover: hover) and (pointer: fine) {
  .desk-entry:hover .desk-panel {
    background-color: var(--desk-highlight);
    box-shadow: 0 4px 12px rgb(0 0 0 / 9%);
  }
  .desk-entry:hover .desk-open { border-color: var(--accent-mark); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .desk-entry:hover .desk-panel { transform: translateY(-2px); }
}
.organizer-participation { margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.organizer-participation h3 { font-size: 1rem; margin-bottom: 8px; }
.organizer-participation table { width: 100%; border-collapse: collapse; font-size: .83rem; font-variant-numeric: tabular-nums; }
.organizer-participation td, .organizer-participation th { padding: 6px 2px; border-bottom: 1px solid var(--line-soft); text-align: end; }
.organizer-participation tr > :first-child { text-align: start; }
.organizer-participation thead { color: var(--muted); }
@media (max-width: 760px) {
  .challenge-desk { display: block; }
  .desk-image { border-inline-end: none; }
  .desk-entry .desk-panel { padding: 20px var(--desk-edge); }
  .desk-image, .desk-text { border-bottom: 1px solid var(--line); }
  .desk-photo { flex: none; min-height: 0; aspect-ratio: 2.1; }
  .desk-content h3 { font-size: clamp(1.6rem, 6.4vw, 2.3rem); }
}
@media (max-width: 390px) {
  .desk-open { gap: 6px; padding-inline: 10px; }
  .desk-stats { gap: 12px; }
}
.cert-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.cert-banner h3 {
  font-size: clamp(1.13rem, 1.55vw, 1.58rem);
}
.cert-banner p {
  margin-top: 4px;
  font-size: 0.92rem;
  color: var(--muted);
}
.cert-banner .ghost {
  margin-left: auto;
}
.medal {
  flex-shrink: 0;
  font-size: 1.85rem;
  line-height: 1;
  color: var(--medal);
}
/* Task, result and profile share the same reading surfaces. */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-block: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}
.breadcrumb:hover {
  color: var(--ink);
}
.tasktitle {
  margin: 0.18em 0 0.23em;
  font-size: clamp(2.2rem, 4.2vw, 4.5rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}
#app > .tasktitle:first-child {
  margin-top: 40px;
}
.lead {
  max-width: 73ch;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.19rem);
}
.taskgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 32px);
  align-items: start;
  margin-top: 26px;
}
.panel {
  min-width: 0;
  padding: clamp(18px, 2vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.panel h3 {
  font-size: clamp(1.25rem, 1.68vw, 1.73rem);
  margin-bottom: 0.8em;
  font-weight: 640;
}
.panel > .dim,
.panel label.dim {
  font-size: 0.91rem;
}
.refimg {
  display: block;
  max-width: 100%;
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
  border-radius: 5px;
  background: var(--inset);
}
.protected {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.protected img {
  -webkit-user-drag: none;
}
.prose,
.saved-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prose {
  line-height: 1.7;
}
.text.prose {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1.5vw, 1.38rem);
}
.code.prose {
  padding: 14px 17px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--inset);
  font: 0.94rem/1.7 var(--mono);
}
.task-dialect {
  color: var(--accent-mark);
  margin: -0.45em 0 0.85em;
  font-size: 0.88rem;
}
.task-data {
  min-width: 0;
  margin-top: 18px;
}
.task-data h4 {
  margin: 16px 0 8px;
  font-weight: 575;
}
.dataset {
  min-width: 0;
  margin: 0 0 12px;
}
.data-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--inset);
}
.data-scroll:focus-visible {
  outline-offset: 1px;
}
.dataset table {
  border-spacing: 0;
  width: 100%;
  text-align: left;
  font: 0.82rem/1.4 var(--mono);
  white-space: nowrap;
}
.dataset caption {
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--ink);
}
.dataset th,
.dataset td {
  padding: 5px 10px;
  border-top: 1px solid var(--line-soft);
}
.dataset th {
  background: var(--table-head);
  font-weight: 540;
}
.dataset th small {
  display: block;
  color: var(--muted);
  font: 0.69rem/1.3 var(--mono);
}
.dataset .null-value {
  color: var(--quiet);
  font-style: italic;
}
.task-data pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--inset);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 0.82rem/1.5 var(--mono);
}
.prose.code {
  margin: 0;
}
.criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.criteria span {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.77rem;
  color: var(--muted);
}
.resultpanel {
  display: grid;
  grid-template-columns: minmax(155px, 0.36fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 50px);
  margin-top: clamp(14px, 2vw, 32px);
}
.score-block {
  align-self: start;
}
.score-block h3 {
  font-size: 0.95rem;
  letter-spacing: 0;
  margin-bottom: 4px;
}
.resultscore {
  font-size: clamp(2.65rem, 4.4vw, 4.5rem);
  letter-spacing: -0.07em;
  font-weight: 660;
  line-height: 1.15;
}
.resultscore small {
  font-size: 0.35em;
  color: var(--muted);
  letter-spacing: -0.025em;
  font-weight: 490;
}
.result-detail .notice {
  margin-top: 8px;
}
.saved-query {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.saved-query summary {
  cursor: pointer;
  color: var(--secondary);
  font-size: 0.9rem;
}
.saved-prompt {
  margin-top: 10px;
  color: var(--muted);
}
.profile-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 26px;
}
.profile-heading .section-meta {
  margin: 0;
}
.photo-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 22px;
  margin: 0 0 25px;
  border-bottom: 1px solid var(--line-soft);
}
.photo-editor .player-avatar { --avatar-size: 3.65rem; }
.photo-settings { min-width: 0; }
.photo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 15px; }
.photo-pick { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.photo-hint, .photo-status { margin: 5px 0 0; color: var(--muted); font-size: .8rem; }
.photo-status:empty { margin: 0; }
@media (max-width: 575px) {
  .rank-list .player-avatar { --avatar-size: 1.6rem; }
}
.history-list {
  margin-top: 14px;
}
.history-list ul {
  padding: 0;
  list-style: none;
}
.history-list li + li {
  border-top: 1px solid var(--line-soft);
}
.history-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 8px 4px;
}
.history-link:hover .history-name b {
  text-decoration: underline;
  text-underline-offset: 0.23em;
}
.tile {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: var(--raised);
  border-radius: 6px;
}
.history-name {
  display: grid;
  min-width: 0;
}
.history-name b {
  font-weight: 560;
  overflow-wrap: anywhere;
}
.history-name small,
.history-score small {
  color: var(--muted);
  font-size: 0.8rem;
}
.history-score {
  margin-left: auto;
  font-size: 1rem;
  text-align: right;
}
.history-empty {
  color: var(--muted);
  margin-bottom: 14px;
}
#history-next:not(:empty) {
  margin-top: 14px;
}
#history-entry {
  margin-bottom: 14px;
}

/* Dialogs and controls */
dialog {
  width: min(530px, calc(100% - 30px));
  max-height: 90vh;
  max-height: 90dvh;
  overflow: auto;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 18px 80px #0007;
}
dialog.wide {
  width: min(810px, calc(100% - 30px));
}
dialog::backdrop {
  background: var(--scrim);
}
.modal-wrap {
  position: relative;
  padding: clamp(20px, 3.1vw, 43px);
}
.modal-wrap h2 {
  font-size: clamp(1.55rem, 2.3vw, 2.3rem);
  margin-bottom: 0.35em;
  padding-right: 25px;
}
.modal-wrap .intro {
  margin-bottom: 18px;
  font-size: 0.94rem;
}
.modal-wrap .switch {
  margin-bottom: 13px;
}
.x {
  position: absolute;
  right: 9px;
  top: 9px;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
}
.x:hover {
  background: var(--raised);
  color: var(--ink);
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.87rem;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  background-color: var(--inset);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: 7px;
  font-size: 1rem;
}
input,
select {
  min-height: 43px;
  padding: 8px 12px;
}
textarea {
  display: block;
  min-height: 185px;
  resize: vertical;
  padding: 12px 14px;
  margin-block: 7px 4px;
}
input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}
.field :is(input, select):focus,
textarea:focus {
  border-color: var(--accent);
}
#counter {
  display: block;
  text-align: right;
}
#prompt-form .notice {
  margin-top: 5px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
}
.err,
.bad {
  color: var(--error);
}
.err:not(:empty) {
  margin-top: 10px;
}
.cert-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 6px;
  border-radius: 4px;
  background: #fcfaf4;
}
.draft-list {
  display: grid;
  gap: 8px;
}
.draft-list details {
  border: 1px solid var(--line);
  border-radius: 7px;
}
.draft-list summary {
  cursor: pointer;
  padding: 10px 12px;
}
.draft-kind {
  margin-right: 8px;
  font-size: 0.83rem;
  color: var(--muted);
}
.draft-list summary b {
  font-size: 0.9rem;
  font-weight: 555;
}
.draft-reference {
  margin: 0 12px 12px;
}
.draft-reference img {
  display: block;
  width: 100%;
  max-height: 45vh;
  object-fit: contain;
}
.draft-reference p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  color: var(--muted);
}
.working {
  position: relative;
  overflow: hidden;
  height: 3px;
  border-radius: 3px;
  margin-top: 16px;
  background: var(--line);
}
.working::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 33%;
  background: var(--accent);
  animation: working 1.4s ease-in-out infinite alternate;
}
@keyframes working {
  from {
    left: 0;
  }
  to {
    left: 67%;
  }
}
#toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 8px);
  padding: 9px 16px;
  border: 1px solid var(--control-border);
  border-radius: 7px;
  width: max-content;
  max-width: calc(100% - 32px);
  background: var(--raised);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1000px) {
  .arena {
    gap: 20px;
  }
  .arena h1 {
    font-size: clamp(1.85rem, 4.04vw, 2.6rem);
  }
  .boardfoot {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .round-tools {
    gap: 7px 10px;
  }
  .clock {
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  .bar {
    gap: 22px;
  }
  .bar nav {
    gap: 15px;
  }
  .arena {
    grid-template-columns: 1fr;
    gap: 21px;
    margin-top: 26px;
  }
  .arena-copy {
    padding: 0;
  }
  .arena h1 {
    font-size: clamp(2.45rem, 7.4vw, 3.55rem);
  }
  .arena-copy > p,
  .personal-places {
    margin-top: 12px;
  }
  .arena-actions {
    margin-top: 17px;
  }
  .lesson-stage {
    aspect-ratio: 2.5 / 1;
  }
  .prompt-overlay p {
    max-width: 42ch;
    font-size: clamp(0.99rem, 2.8vw, 1.22rem);
  }
  .rank-section {
    margin-top: 21px;
  }
  .boardgrid {
    grid-template-columns: 1fr;
  }
  .board {
    padding: 0 12px;
  }
  .board + .board {
    border-left: 0;
  }
  .board[data-selected="false"] {
    display: none;
  }
  .boardhead {
    display: none;
  }
  .board-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 9px;
  }
  .board-filters button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 37px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 6px 11px;
    color: var(--muted);
    background: transparent;
    font-size: 0.84rem;
  }
  .board-filters [aria-pressed="true"] {
    background: var(--raised);
    color: var(--ink);
    border-color: var(--control-hover);
  }
  .compact-table {
    margin-top: 5px;
  }
  .row {
    --row-height: 42px;
  }
  .boardfoot {
    min-height: 44px;
  }
  .sectionhead {
    margin-bottom: 13px;
  }
  .day-section {
    margin-top: 38px;
  }
  .day-section .sectionhead {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .taskgrid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
  }
  .resultpanel {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cert-banner {
    flex-wrap: wrap;
  }
  .cert-banner .ghost {
    margin-left: 0;
  }
}
@media (max-width: 760px) {
  .winner-grid {
    grid-template-columns: 1fr;
  }
  .winner-card + .winner-card {
    border-left: 0;
    border-top: 1px solid var(--winner-rule);
  }
  .winner-card h3 {
    margin-bottom: 7px;
  }
  .winner-open {
    padding-top: 6px;
  }
}
@media (max-width: 560px) {
  .bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 14px;
    padding-top: 5px;
  }
  .brand {
    min-height: 38px;
  }
  .header-actions {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    gap: 8px;
  }
  .user {
    max-width: min(26vw, 150px);
  }

  .bar nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 22px;
  }
  .bar nav a,
  .navcert {
    min-height: 35px;
    font-size: 0.84rem;
  }
  .lesson-stage {
    min-height: 166px;
    aspect-ratio: 2.12 / 1;
  }
  .lesson-bottom {
    min-height: 38px;
  }
  .prompt-overlay {
    padding: 14px 18px;
  }
  .cert-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px 12px;
  }
  .cert-banner .ghost {
    justify-self: start;
    grid-column: 2;
  }
  .round-tools {
    justify-content: flex-start;
  }
}
@media (max-width: 380px) {
  .arena h1 {
    font-size: clamp(2.1rem, 9.6vw, 2.28rem);
  }
  .sectionhead {
    column-gap: 8px;
  }
  .tab {
    padding-inline: 8px;
  }
  .lesson-tabs {
    gap: 6px;
  }
  .lesson-tabs button + button {
    margin-left: 10px;
  }
  .lesson-tabs button + button::before {
    right: calc(100% + 4px);
    width: 8px;
  }
  .fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 760px) {
  .lesson-bottom {
    padding-inline: 3px 35px;
  }
  .lesson-tabs {
    gap: 12px;
  }
  .lesson-tabs button + button {
    margin-left: 3px;
  }
  .lesson-tabs button + button::before {
    display: none;
  }
}
@media (max-width: 560px) {
  .lesson-tabs {
    width: 100%;
    justify-content: space-evenly;
    gap: 2px;
  }
  .award-frame {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }
  .award-feedback {
    font-size: 0.77rem;
  }
  .award-paper span {
    font-size: 0.7rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Footer and information pages */
.site-footer {
  margin-top: clamp(36px, 5vw, 80px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(200px, 1.8fr) 1fr 1fr;
  gap: clamp(16px, 4vw, 68px);
  padding: clamp(30px, 4.2vw, 68px) 0;
}
.footer-intro .footer-brand {
  font-size: 1.18rem;
  gap: 9px;
  font-weight: 630;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.footer-intro p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 9px;
}
.footer-column {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 4px;
}
.footer-column h2 {
  font-size: 0.88rem;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0 0 8px;
  font-weight: 650;
}
.footer-column a {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 3px 0;
}
.footer-column a:hover,
.footer-column a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  border-top: 1px solid var(--line-soft);
  padding: 14px 0 22px;
}
.footer-bottom #mode-label {
  text-align: left;
  color: var(--muted);
  font-size: 0.82rem;
}
.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  flex-shrink: 0;
  margin-left: auto;
}
.language-picker svg {
  margin: 0 5px;
  color: var(--muted);
}
.language-picker button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 5px 10px;
  border-radius: 99px;
  min-height: 32px;
}
.language-picker button[aria-pressed="true"] {
  background: var(--tab-selected);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.info-page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(8px, 3vw, 40px) 0 clamp(36px, 6vw, 80px);
}
.info-title {
  font-size: clamp(2.45rem, 5vw, 4.5rem);
  margin: 8px 0 22px;
}
.info-page > p,
.faq-list details > p {
  max-width: 68ch;
  line-height: 1.65;
  margin: 16px 0;
  color: var(--secondary);
}
.info-page .info-lead {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  color: var(--ink);
  line-height: 1.45;
}
.info-links,
.inbox-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-block: 22px;
}
.info-page .primary {
  display: inline-flex;
  align-items: center;
}
.faq-list {
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 17px 0;
  gap: 14px;
  font-size: 1.08rem;
  font-weight: 570;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: "+";
  color: var(--muted);
  font: 1.45rem var(--mono);
}
.faq-list details[open] summary::after {
  content: "−";
}
.faq-list details > p {
  margin: 0 0 20px;
}
.info-help a,
.contact-inbox a,
.inline-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-form {
  max-width: 590px;
  margin: 22px 0;
}
.contact-form textarea {
  min-height: 125px;
  resize: vertical;
}
.contact-form :is(button[type="submit"], a.primary) {
  margin-block: 12px 0;
}
.contact-status {
  color: var(--ink);
  margin-top: 9px;
}
.contact-inbox {
  margin-top: 40px;
}
.contact-inbox article {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.contact-inbox p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-block: 8px;
}
@media (max-width: 600px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 23px 16px;
  }
  .footer-intro {
    grid-column: 1/-1;
  }
  .footer-bottom {
    flex-wrap: wrap;
  }
}

.boardhead button { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .25rem; border: 0; background: transparent; color: inherit; font: inherit; }
.boardhead button .icon { font-size: 1.28em; }
.archive-link { display: inline-flex; align-items: center; gap: .55rem; padding-block: .9rem; color: var(--secondary); font-size: .95rem; }
.archive-link:hover, .cert-check:hover { text-decoration: underline; text-underline-offset: .2em; }
@media (min-width: 761px) {
  .board { border-radius: 8px; transition: opacity 160ms ease, background-color 160ms ease; }
  .board[data-selected="false"] { opacity: .82; background: var(--inset); }
  .board[data-selected="true"] { background: var(--surface); }
  .board[data-selected="true"]::before { content: ""; position: absolute; top: -1px; inset-inline: 9%; height: 2px; background: var(--accent-mark); border-radius: 2px; pointer-events: none; }
  .board[data-selected="true"] .boardhead .icon { color: var(--accent-mark); }
}
@media (prefers-reduced-motion: reduce) { .board { transition: none; } }
.cert-check { color: var(--accent-mark); font-weight: 550; }

@media (max-width: 760px) {
  .board-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .board-filters button { display: grid; gap: .35rem; min-width: 0; text-align: left; align-content: center; min-height: 48px; padding: .5rem clamp(.38rem, 1.65vw, .75rem); }
  .board-tab-name, .board-tab-leader { display: flex; align-items: center; gap: .3rem; }
  .board-tab-leader { justify-content: space-between; font-size: .78rem; line-height: 1.3; }
  .board-tab-leader span:not(.sr-only) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .board-tab-leader b { font-variant-numeric: tabular-nums; font-weight: 600; }
  .board-filters button[aria-pressed=false] { opacity: .84; background: var(--inset); }
  .board-filters button[aria-pressed=true] { border-color: var(--accent-mark); }
}
