@layer base, components, states;
@layer base  {
  :root, [data-theme="light"]  {
    color-scheme: light;
    --bg: #f3f4f7;
    --surface: #ffffff;
    --surface-2: #e9ebf0;
    --surface-3: #dde0e7;
    --ink: #15181e;
    --muted: #596273;
    --line: #d3d7de;
    --line-strong: #15181e;
    --accent: #2f55d4;
    --on-accent: #ffffff;
    --accent-soft: #e4e9fb;
    --focus: #7c3aed;
    --word: #2f55d4;
    --number: #c2410c;
    --logic: #0f766e;
    --picture: #a21caf;
    --done: #15803d;
    --done-soft: #dcf5e3;
    --progress: #c2410c;
    --progress-soft: #fde8dc;
    --correct: #177a42;
    --on-correct: #ffffff;
    --present: #e0b000;
    --on-present: #15181e;
    --absent: #5b6473;
    --on-absent: #ffffff;
    --shadow: 0 8px 22px rgba(21, 24, 30, 0.10);
    --backdrop: rgba(21, 24, 30, 0.55);
  }
  [data-theme="dark"]  {
    color-scheme: dark;
    --bg: #0f1116;
    --surface: #181b22;
    --surface-2: #22262f;
    --surface-3: #2c313c;
    --ink: #eceef2;
    --muted: #a4acba;
    --line: #2e333d;
    --line-strong: #eceef2;
    --accent: #93a6ff;
    --on-accent: #0f1116;
    --accent-soft: #232a4a;
    --focus: #c4b5fd;
    --word: #93a6ff;
    --number: #ffa368;
    --logic: #5fe3cf;
    --picture: #e879f9;
    --done: #4ade80;
    --done-soft: #143322;
    --progress: #ffa368;
    --progress-soft: #3a2416;
    --correct: #1f7f49;
    --on-correct: #ffffff;
    --present: #e3b422;
    --on-present: #0f1116;
    --absent: #4b5160;
    --on-absent: #ffffff;
    --shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    --backdrop: rgba(0, 0, 0, 0.65);
  }
  @media (prefers-color-scheme: dark)  {
    :root:not([data-theme])  {
      color-scheme: dark;
      --bg: #0f1116;
      --surface: #181b22;
      --surface-2: #22262f;
      --surface-3: #2c313c;
      --ink: #eceef2;
      --muted: #a4acba;
      --line: #2e333d;
      --line-strong: #eceef2;
      --accent: #93a6ff;
      --on-accent: #0f1116;
      --accent-soft: #232a4a;
      --focus: #c4b5fd;
      --word: #93a6ff;
      --number: #ffa368;
      --logic: #5fe3cf;
      --picture: #e879f9;
      --done: #4ade80;
      --done-soft: #143322;
      --progress: #ffa368;
      --progress-soft: #3a2416;
      --correct: #1f7f49;
      --present: #e3b422;
      --on-present: #0f1116;
      --absent: #4b5160;
      --shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
      --backdrop: rgba(0, 0, 0, 0.65);
    }
  }
  :root  {
    --font: system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: system-ui, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
    --r-card: 12px;
    --r-ctl: 8px;
    --r-tile: 6px;
    --tap: 44px;
    --gutter: 20px;
    --page: 1120px;
    --t: 150ms ease-out;
  }
  *  {
    box-sizing: border-box;
  }
  [hidden]  {
    display: none !important;
  }
  html  {
    background: var(--bg);
  }
  body  {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3, p, dl, dd, figure  {
    margin: 0;
  }
  h1, h2, h3  {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    line-height: 1.15;
  }
  h1  {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    font-weight: 700;
  }
  h2  {
    font-size: 1.375rem;
    font-weight: 700;
  }
  h3  {
    font-size: 1rem;
    font-weight: 650;
  }
  p  {
    color: var(--muted);
  }
  strong  {
    font-weight: 650;
    color: var(--ink);
  }
  button, input, select  {
    font: inherit;
    color: inherit;
  }
  button  {
    cursor: pointer;
  }
  .eyebrow  {
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .lede  {
    font-size: 1.0625rem;
    max-width: 46ch;
  }
  .fine  {
    font-size: 0.75rem;
  }
  .num, .mono  {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
  }
  .sr-only  {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .shell  {
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  :root  {
    --font-body: var(--font);
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-md: 1.125rem;
    --text-lg: 1.375rem;
    --text-xl: 1.5rem;
    --text-title: 2.75rem;
    --text-hero: clamp(2rem, 4.5vw, 2.75rem);
    --weight-normal: 400;
    --weight-medium: 600;
    --weight-bold: 700;
    --weight-heavy: 900;
    --line-body: 1.5;
    --line-tight: 1.15;
    --line-solid: 1;
    --tracking: 0.08em;
    --tracking-tight: -0.02em;
    --s0: 0px;
    --s1: 2px;
    --s2: 4px;
    --s3: 6px;
    --s4: 8px;
    --s5: 12px;
    --s6: 16px;
    --s7: 20px;
    --s8: 24px;
    --s9: 32px;
    --s10: 40px;
    --s11: 48px;
    --s12: 64px;
    --radius-tile: var(--r-tile);
    --radius-card: var(--r-card);
    --radius-button: var(--r-ctl);
    --radius-pill: 999px;
    --stroke: 1px;
    --stroke-heavy: 2px;
    --focus-width: 3px;
    --page-max: var(--page);
    --game-max: 1120px;
    --play-max: 420px;
    --board-max: 324px;
    --dialog-max: 460px;
    --info-max: 220px;
    --key-height: 44px;
    --page-gutter: var(--gutter);
    --board-gap: 6px;
    --duration: 150ms;
    --reveal-duration: 280ms;
    --ease: ease-out;
    --modal-shadow: var(--shadow);
    --clear: transparent;
    --surface-alt: var(--surface-2);
    --secondary: var(--number);
    --secondary-soft: var(--progress-soft);
    --solved: #116536;
    --solved-ring: #ffffffa6;
    --placed: #0d512b;
    --on-placed: #ffffff;
  }
  :root[data-theme="dark"]  {
    --solved: #176b3b;
    --placed: #12552e;
  }
  /* Orange and blue keep correct and present distinct without red-green vision. */
  :root[data-contrast="true"]  {
    --correct: #ff9d3c;
    --on-correct: #241100;
    --solved: #e87a0c;
    --solved-ring: #241100a6;
    --placed: #9a4700;
    --on-placed: #ffffff;
    --present: #2262bf;
    --on-present: #ffffff;
    --absent: #4c535d;
    --on-absent: #ffffff;
  }
  a  {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    border-radius: 3px;
  }
  button, input, select, summary  {
    border-radius: var(--r-ctl);
  }
  button  {
    min-height: var(--tap);
    padding: 8px 14px;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  input:not([type="checkbox"]), select  {
    min-height: var(--tap);
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  input[type="checkbox"]  {
    accent-color: var(--accent);
  }
  button, a  {
    touch-action: manipulation;
  }
  button, input, select, a  {
    -webkit-tap-highlight-color: transparent;
  }
  button:disabled, [aria-disabled="true"]  {
    opacity: 0.5;
    cursor: not-allowed;
  }
  fieldset  {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
  }
  legend  {
    margin-bottom: 12px;
    padding: 0;
    font-weight: 650;
  }
  summary  {
    cursor: pointer;
  }
  pre  {
    white-space: pre-wrap;
    padding: 16px;
    border-radius: var(--r-ctl);
    background: var(--surface-2);
    font: 0.8125rem/1.5 var(--font-mono);
  }
  /* The two Clean Sweep word colours of its glyph, which the home page shows too. clean-sweep.css holds the palette. */
  :root, [data-theme="light"]  {
    --cs-c1: #d97706;
    --cs-c4: #06b6d4;
  }
  [data-theme="dark"]  {
    --cs-c1: #f59e0b;
    --cs-c4: #22d3ee;
  }
  @media (prefers-color-scheme: dark)  {
    :root:not([data-theme])  {
      --cs-c1: #f59e0b;
      --cs-c4: #22d3ee;
    }
  }
}
@layer components  {
  .site-header  {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    max-width: var(--page);
    margin: auto;
    padding: 12px var(--gutter);
    border-bottom: 1px solid var(--line);
  }
  .brand  {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 2px;
    color: var(--ink);
    font-size: 1.125rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--r-ctl);
  }
  .brand-mark  {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 26px;
    height: 26px;
    flex: none;
  }
  .brand-mark i  {
    border-radius: 3px;
    background: var(--accent);
  }
  .brand-mark i:nth-child(2)  {
    background: var(--present);
  }
  .brand-mark i:nth-child(3)  {
    background: var(--correct);
  }
  .brand-mark i:nth-child(4)  {
    background: var(--ink);
  }
  .header-note  {
    display: none;
  }
  /* The pill says which release is live and links to what changed in it, so it stays visible at every width. */
  .ver-pill  {
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.6875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
  }
  .ver-pill:hover, .ver-pill:focus-visible  {
    border-color: var(--accent);
    color: var(--ink);
  }
  .release-notes .release h2 small  {
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
  }
  .release-notes .release h3  {
    margin: 12px 0 4px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
  .header-actions  {
    display: flex;
    gap: 4px;
    align-items: center;
  }
  .site-nav  {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    order: 3;
    width: 100%;
  }
  /* The side padding narrows on small phones so four links fit on one row at 360 pixels. */
  .site-nav a  {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px clamp(8px, 2.5vw, 12px);
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
  }
  .site-footer  {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    max-width: var(--page);
    margin: 48px auto 0;
    padding: 24px var(--gutter);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8125rem;
  }
  .site-footer nav  {
    display: flex;
    gap: 18px;
  }
  .button  {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
  }
  .primary  {
    --control-bg: var(--accent);
    --control-ink: var(--on-accent);
    --hover-bg: var(--ink);
    --hover-ink: var(--bg);
    --press-bg: var(--muted);
    --press-ink: var(--bg);
    background: var(--control-bg);
    border-color: var(--accent);
    color: var(--control-ink);
  }
  .icon-button  {
    display: inline-grid;
    place-items: center;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    font-size: 1.125rem;
  }
  .icon-button svg, #install-header svg  {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .hub, .choose, .glance, .prose  {
    max-width: var(--page);
    margin: 0 auto;
    padding: 32px var(--gutter);
  }
  .hub-head, .landing-head  {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
  }
  .tile-grid, .board-options, .glance-boards  {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .game-tile, .board-card  {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 18px 16px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
  }
  .game-tile  {
    min-height: 224px;
  }
  .game-tile[data-cat="word"]  {
    --cat: var(--word);
  }
  .game-tile[data-cat="number"]  {
    --cat: var(--number);
  }
  .game-tile[data-cat="logic"]  {
    --cat: var(--logic);
  }
  .game-tile.is-soon  {
    background: transparent;
  }
  .tile-glyph  {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
    border-radius: var(--r-tile);
    background: var(--surface-2);
    color: var(--cat, var(--accent));
    font: 700 1.375rem var(--font-mono);
  }
  .tile-glyph.slirdle-glyph  {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    padding: 5px;
  }
  .slirdle-glyph i  {
    display: grid;
    place-items: center;
    border-radius: 3px;
    background: var(--correct);
    color: var(--on-correct);
    font: normal 700 0.625rem var(--font-mono);
  }
  .slirdle-glyph i:nth-child(2), .slirdle-glyph i:nth-child(3)  {
    background: var(--present);
    color: var(--on-present);
  }
  .tile-glyph.big  {
    width: 72px;
    height: 72px;
  }
  .tile-glyph.big i  {
    font-size: 0.875rem;
  }
  /* Every game's glyph is here, because the home page shows them all and loads no game's own style sheet. */
  .game-tile[data-cat="picture"]  {
    --cat: var(--picture);
  }
  .tile-glyph.mirror-glyph  {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 9px 5px;
  }
  /* The tile glyph centres its items, and these panels have no content, so they stretch to fill their cells. */
  .mirror-glyph i  {
    place-self: stretch;
    position: relative;
    border-radius: 3px;
    background: var(--cat, var(--picture));
  }
  .mirror-glyph i:last-child::after  {
    content: "";
    position: absolute;
    inset: 28%;
    border: 2px solid var(--surface);
    border-radius: 50%;
  }
  .tile-glyph.escape-word-glyph  {
    background: url("/icons/escape-word.svg") center / contain no-repeat;
    color: transparent;
    border-radius: 22%;
  }
  .tile-glyph.tow-glyph  {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 12px 4px;
  }
  .tile-glyph.wt-glyph  {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 8px 10px;
  }
  .tile-glyph.bw-glyph  {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 8px 10px;
  }
  .tow-glyph i, .wt-glyph i, .bw-glyph i  {
    display: grid;
    place-items: center;
    place-self: stretch;
    border-radius: 3px;
    background: var(--cat, var(--word));
    color: var(--on-accent);
    font: normal 700 0.625rem var(--font-mono);
  }
  .tow-glyph i:nth-child(2), .wt-glyph i:nth-child(4), .bw-glyph i:nth-child(3)  {
    background: var(--progress);
  }
  .bw-glyph i:nth-child(2)  {
    background: none;
    color: var(--progress);
  }
  .tile-glyph.cs-glyph  {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 8px;
  }
  .cs-glyph i  {
    display: grid;
    place-items: center;
    place-self: stretch;
    border: 2px solid var(--cs-c4);
    border-radius: 3px;
    background: color-mix(in srgb, var(--cs-c4) 22%, var(--surface));
    color: var(--ink);
    font: normal 700 0.625rem var(--font-mono);
  }
  .cs-glyph i:nth-child(2), .cs-glyph i:nth-child(3)  {
    border-color: var(--cs-c1);
    background: color-mix(in srgb, var(--cs-c1) 22%, var(--surface));
  }
  .tile-glyph.big.cs-glyph i  {
    font-size: 1rem;
  }
  /* Every daily game's board choices show this, and each game loads only its own style sheet. */
  .board-card .status  {
    margin-top: var(--s2);
  }
  .tile-cat, .board-slot  {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cat, var(--muted));
  }
  .tile-name, .board-name  {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .tile-blurb  {
    font-size: 0.8125rem;
    color: var(--muted);
  }
  .status  {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
  }
  .status::before  {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 50%;
  }
  .status-done  {
    color: var(--done);
  }
  .status-done::before  {
    background: currentColor;
  }
  .status-progress  {
    color: var(--progress);
  }
  .status-progress::before  {
    background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  }
  .status-soon::before  {
    border-style: dashed;
  }
  .game-tile .status  {
    margin-top: auto;
    padding-top: 10px;
  }
  .choose > h2  {
    margin-bottom: 14px;
  }
  .board-options  {
    margin-bottom: 24px;
  }
  .board-card  {
    gap: 8px;
    min-height: 180px;
  }
  .board-actions  {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
  }
  .choose > p, .choose > a  {
    margin-top: 16px;
  }
  .game-guide  {
    display: grid;
    gap: 12px;
    max-width: 70ch;
    margin-top: 40px;
  }
  .game-guide ul  {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
  }
  .glance h2  {
    margin: 6px 0 16px;
  }
  .glance-boards  {
    margin-bottom: 16px;
  }
  .glance-boards article  {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .glance-boards h3  {
    margin-bottom: 12px;
  }
  .glance dl  {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    font-size: 0.8125rem;
  }
  .glance dt  {
    color: var(--muted);
  }
  .glance dd  {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .glance .fine  {
    margin-top: 12px;
  }
  .live-line  {
    margin-top: 6px;
    font-size: 0.875rem;
  }
  /* The totals line is empty until the stats load. Holding its height stops the page jumping when they arrive. */
  .live-line + p:empty::before  {
    content: "\00a0";
  }
  .live-dot  {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--done);
    animation: live-pulse 2.4s ease-in-out infinite;
  }
  .team-lobby  {
    max-width: 760px;
    display: grid;
    gap: 16px;
  }
  .team-lobby .button  {
    justify-self: start;
  }
  .team-board, .team-waiting, .team-reason  {
    color: var(--muted);
  }
  .team-code  {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
  }
  .team-players  {
    display: grid;
    gap: 4px;
    padding: 0;
    list-style: none;
  }
  .team-start  {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .team-reason  {
    font-size: 0.875rem;
  }
  .copy-link  {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
  .copy-feedback:empty  {
    display: none;
  }
  .copy-fallback  {
    display: grid;
    flex-basis: 100%;
    gap: 4px;
    font-size: 0.875rem;
  }
  .copy-fallback input  {
    width: 100%;
    min-height: var(--tap);
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-mono);
  }
  .team-invite  {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--gutter) 8px;
    color: var(--muted);
    font-size: 0.875rem;
  }
  .team-code-inline  {
    font-family: var(--font-mono);
    font-weight: 650;
    letter-spacing: 0.1em;
    color: var(--ink);
  }
  .team-presence  {
    text-align: center;
    padding: 12px var(--gutter);
  }
  .leaders  {
    max-width: 760px;
  }
  .leader-controls  {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin: 20px 0 16px;
  }
  .leader-controls label  {
    display: grid;
    gap: 6px;
  }
  .day-picker  {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .day-picker .button  {
    min-width: var(--tap);
    padding: 0;
    font-size: 1.25rem;
  }
  .segmented, .tabs  {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border-radius: 999px;
  }
  .segmented button, .tabs button  {
    border-radius: 999px;
    background: transparent;
    border-color: transparent;
  }
  table  {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
    margin: 12px 0 20px;
  }
  th  {
    padding: 10px;
    text-align: left;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  td  {
    padding: 10px;
    border-top: 1px solid var(--line);
    overflow-wrap: anywhere;
  }
  th:nth-child(n+3), td:nth-child(n+3)  {
    text-align: right;
  }
  .prose  {
    max-width: 800px;
    display: grid;
    gap: 16px;
  }
  .prose pre  {
    margin: 0;
    overflow-wrap: anywhere;
    font: inherit;
  }
  .empty-board  {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: min(100%, 324px);
    gap: 6px;
    margin: 20px auto;
  }
  .empty-board span  {
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: var(--r-tile);
    background: var(--surface);
  }
  .play-start  {
    text-align: center;
  }
  dialog  {
    width: min(100% - 32px, 460px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
  }
  dialog::backdrop  {
    background: var(--backdrop);
  }
  dialog[open]  {
    animation: arrive 180ms ease-out;
  }
  .dialog-panel  {
    position: relative;
    padding: 24px;
    overflow: auto;
    min-height: 0;
  }
  .dialog-panel h2  {
    padding-right: 44px;
  }
  .dialog-panel p  {
    margin: 14px 0;
  }
  #install-dialog[open]  {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #install-dialog .close  {
    position: absolute;
    top: 12px;
    right: 12px;
  }
  #install-pill  {
    position: fixed;
    z-index: 10;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    width: max-content;
    max-width: calc(100vw - 32px);
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: var(--shadow);
    /* A few pulses draw the eye. An endless box-shadow animation repaints the page every frame and drains a phone. */
    animation: install-pulse 2.4s ease-in-out 3;
  }
  @keyframes install-pulse  {
    50%  {
      box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow);
    }
  }
  #install-pill button, #app-update button  {
    --control-ink: var(--on-accent);
    --hover-ink: var(--ink);
    --press-ink: var(--ink);
    background: transparent;
    color: var(--on-accent);
    border-color: transparent;
  }
  #install-pill button  {
    border-radius: 999px;
  }
  .install-now  {
    padding: 8px 16px;
    font-weight: 650;
  }
  .install-dismiss  {
    min-width: var(--tap);
    font-size: 1.375rem;
  }
  #install-header  {
    display: inline-grid;
    place-items: center;
    width: var(--tap);
    min-height: var(--tap);
    padding: 8px;
    border-radius: 999px;
  }
  #app-update  {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--on-accent);
    text-align: center;
    font-weight: 650;
  }
  #update-ready  {
    --control-bg: var(--accent);
    --control-ink: var(--on-accent);
    --hover-bg: var(--ink);
    --hover-ink: var(--bg);
    --press-bg: var(--muted);
    --press-ink: var(--bg);
    border-color: var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.75rem;
    padding: 4px 8px;
  }
  body.has-install-pill  {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  body.has-install-pill #toast  {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .install-steps  {
    display: flex;
    gap: 24px;
    margin-top: 24px;
  }
  .install-steps span  {
    display: grid;
    gap: 8px;
  }
  .install-steps svg  {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }
  #blazor-error-ui  {
    display: none;
    position: fixed;
    bottom: 0;
    z-index: 100;
    width: 100%;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .connection-note  {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    max-width: calc(100% - 32px);
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
  }
  @keyframes live-pulse  {
    50%  {
      opacity: 0.35;
    }
  }
  @keyframes arrive  {
    from  {
      opacity: 0;
      transform: translateY(8px);
    }
  }
  @media (min-width: 760px)  {
    :root  {
      --gutter: 32px;
    }
    .site-header  {
      padding-block: 14px;
    }
    /* The pill stays beside the brand while the links take their own row. */
    .ver-pill  {
      margin-inline-end: auto;
    }
    .tile-grid, .board-options, .glance-boards  {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
    }
    .game-tile  {
      padding: 22px 20px 18px;
    }
    .hub  {
      padding-top: 40px;
    }
    .landing-head  {
      grid-template-columns: auto 1fr;
      column-gap: 24px;
      align-items: start;
    }
    .landing-head > .tile-glyph  {
      grid-row: 1 / span 4;
    }
    .landing-head > :not(.tile-glyph)  {
      grid-column: 2;
    }
  }
  /* Every game's link fits beside the brand only at the page's full width, and only in slightly smaller type. Below
     it the links take their own row. */
  @media (min-width: 1120px)  {
    .site-header  {
      flex-wrap: nowrap;
    }
    .site-nav  {
      order: 0;
      width: auto;
      gap: 2px;
    }
    .site-nav a  {
      padding-inline: 6px;
      font-size: 0.875rem;
    }
  }
  @media (max-width: 599px)  {
    .brand  {
      font-size: 1rem;
    }
    .site-header  {
      padding-inline: 12px;
    }
    .header-actions  {
      gap: 2px;
    }
    .glance-boards  {
      grid-template-columns: 1fr;
    }
    body:has([data-playing]) .site-footer  {
      display: none;
    }
  }
  body:has([data-playing]) .site-header  {
    padding-block: 6px;
  }
  body:has([data-playing]) .site-nav  {
    display: none;
  }
}
@layer states  {
  /* This layer wins over component styles so every control uses the same states. */
  :where(a[href], button, input, select, summary, [role="tab"], [tabindex="0"], .board-card)  {
    transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  }
  :where(.correct)  {
    --control-bg: var(--correct);
    --control-ink: var(--on-correct);
  }
  :where(.present)  {
    --control-bg: var(--present);
    --control-ink: var(--on-present);
  }
  :where(.absent)  {
    --control-bg: var(--absent);
    --control-ink: var(--on-absent);
  }
  :where(.correct, .present, .absent)  {
    background: var(--control-bg);
    color: var(--control-ink);
    border-color: var(--control-bg);
  }
  :where(.board-row.solved .tile.correct, .guess-line.solved .tile.correct)  {
    --control-bg: var(--solved);
  }
  :where(.board-row.placed .tile.correct)  {
    --control-bg: var(--placed);
    --control-ink: var(--on-placed);
  }
  :where(.tile.cursor)  {
    border-color: var(--ink);
  }
  :where(a[href], button, input, select, summary, [role="tab"], [tabindex="0"]):not(:disabled):not([aria-disabled="true"]):hover  {
    background: var(--hover-bg, var(--surface-2));
    border-color: var(--line-strong);
    color: var(--hover-ink, var(--ink));
    box-shadow: var(--hover-shadow, none);
  }
  :where(a[href], button, input, select, summary, [role="tab"], [tabindex="0"]):not(:disabled):not([aria-disabled="true"]):active  {
    background: var(--press-bg, var(--surface-3));
    border-color: var(--line-strong);
    color: var(--press-ink, var(--ink));
    transform: translateY(1px);
    box-shadow: none;
  }
  /* The two :not() tests lift this rule above hover and pressed, so a current control keeps its fill under the pointer and after a tap. */
  :where(a[href], button, input, select, summary, [role="tab"], [tabindex="0"]):not(:disabled):not([aria-disabled="true"]):is([aria-current]:not([aria-current="false"]), [aria-selected="true"], [aria-pressed="true"], .inspected, input[type="checkbox"]:checked)  {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
  }
  :where(a[href], button, input, select, summary, [role="tab"], [tabindex="0"]):focus-visible  {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
  :where(a[href], button, input, select, summary):focus:not(:focus-visible)  {
    outline: none;
  }
  /* Navigation focuses headings for screen readers. Headings need no control ring. */
  h1:focus, h1:focus-visible  {
    outline: none;
  }
  a:not(.button):not(.game-tile):not(.brand):hover  {
    text-decoration-thickness: 2px;
    text-decoration-color: var(--accent);
  }
  a:is(.button, .game-tile, .brand):hover  {
    text-decoration: none;
  }
  /* A card shows state only by the width of its edge. An inset ring adds to the fixed 1px border, so the content does not move.
     These rules come after the control rules above so that they win at the same specificity. */
  :is(.game-tile, .board-card):not(.is-soon):hover  {
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: inset 0 0 0 1px var(--line-strong);
  }
  :is(.game-tile, .board-card):not(.is-soon):active  {
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: inset 0 0 0 2px var(--line-strong);
    transform: none;
  }
  :where(.text-button, .link):hover  {
    text-decoration-thickness: 2px;
  }
  /* Letter marks keep their meaning when a player points at a key or tile. */
  :where(.correct, .present, .absent, .word)  {
    --hover-bg: var(--control-bg);
    --press-bg: var(--control-bg);
    --hover-ink: var(--control-ink);
    --press-ink: var(--control-ink);
    --hover-shadow: inset 0 0 0 2px var(--control-ink);
  }
  :where(.word)  {
    --control-bg: var(--solved);
    --control-ink: var(--on-correct);
  }
  :where(.placed .word)  {
    --control-bg: var(--placed);
    --control-ink: var(--on-placed);
  }
  :where(.word):hover .tile  {
    background: var(--hover-bg);
  }
  :where(.word):active .tile  {
    background: var(--press-bg);
  }
  @media (prefers-reduced-motion: reduce)  {
    *, *::before, *::after  {
      animation: none !important;
      transition: none !important;
      scroll-behavior: auto !important;
    }
  }
}
