:root {
  color-scheme: light;
  --background: #f6f5f2;
  --paper: #fff;
  --ink: #202027;
  --muted: #615e67;
  --line: #e3e0dc;
  --orange: #fe875a;
  --radius: 1.2rem;
  --focus: #4337a7;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.15rem; }
body { min-width: 0; margin: 0; background: var(--background); color: var(--ink); font-size: 1rem; line-height: 1.5; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
a { color: inherit; }
button, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: .16rem solid var(--focus); outline-offset: .18rem; }
.wrap { width: min(calc(100% - 3.3rem), 74rem); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  z-index: 10;
  top: .6rem;
  left: 1rem;
  padding: .55rem .78rem;
  transform: translateY(-160%);
  border-radius: .55rem;
  background: var(--paper);
}
.skip:focus { transform: none; }
.subtle { color: var(--muted); font-size: .92rem; }
.notice { margin-block: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--paper); }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; min-height: 4.6rem; }
.wordmark { display: inline-flex; align-items: center; gap: .56rem; text-decoration: none; font-size: 1.27rem; font-weight: 820; letter-spacing: -.055em; }
.wordmark img { flex: none; border-radius: .67rem; }
#navigation { display: flex; gap: .27rem; }
#navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.67rem;
  padding: .35rem .84rem;
  border-radius: .62rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 680;
}
#navigation a:hover, #navigation a[aria-current="page"] { color: var(--ink); background: #f4f1ed; }
#navigation a[aria-current="page"] { font-weight: 800; }
.streak-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .35rem;
  padding: .42rem .67rem;
  border: 1px solid #f1dfc6;
  border-radius: .62rem;
  background: #fff6e9;
  color: #69441d;
  text-decoration: none;
  font-size: .89rem;
  font-weight: 760;
}
.streak-link:hover { background: #fcebd4; }
.streak-icon { color: #a74b25; }

main.wrap { min-height: min(73vh, 740px); padding-block: 1.8rem 2.9rem; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 2.55fr) minmax(15.6rem, 1fr); gap: 1rem; }
.hero { position: relative; display: grid; min-height: 21.4rem; overflow: hidden; isolation: isolate; border-radius: var(--radius); background: #1c1c20; color: #fff7f0; }
.cover { position: absolute; inset: 0 0 0 auto; width: 69%; height: 100%; object-fit: cover; object-position: 60% 52%; z-index: -2; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #1c1c20 24%, #1c1c20f5 34%, #1c1c201f 61%, transparent 100%);
}
.hero-content { align-self: center; width: min(59%, 30rem); padding: 1.9rem 0 1.9rem clamp(1.4rem, 4vw, 3rem); }
.hero-date { color: #ffbfa7; font-size: .88rem; font-weight: 730; letter-spacing: .01em; }
.hero h1 { margin-top: .44rem; font-size: clamp(2.45rem, 4.9vw, 4.65rem); line-height: .99; letter-spacing: -.083em; font-weight: 820; }
.hero-content > p:not(.hero-date) { max-width: 19rem; margin-top: .77rem; color: #e1dddd; }
.hero-button { margin-top: 1.1rem; background: #ff9a72; color: #282026; }
.hero-button:hover { background: #ffb192; }
.hero-button:focus-visible { outline-color: #ffe4c1; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.8rem; padding: .61rem .94rem; border: 1px solid transparent; border-radius: .66rem; text-align: center; text-decoration: none; font-size: .94rem; font-weight: 750; line-height: 1.2; }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover:not(:disabled) { background: #3c3947; }
.button-subtle { background: #fff; color: var(--ink); border-color: #ddd9d5; }
.button-subtle:hover:not(:disabled) { background: #f5f3f0; }
.button:disabled { background: #efede9; color: #57515a; border-color: #e6e2df; }
.button.compact { min-height: 2.45rem; padding: .43rem .65rem; font-size: .88rem; }
.text-link { display: inline-flex; align-items: center; min-height: 2.52rem; color: #3d3745; text-underline-offset: .22em; text-decoration-thickness: .055em; font-weight: 710; font-size: .92rem; }
.text-link:hover { color: #a53e21; }
.action-row { display: flex; flex-wrap: wrap; gap: .57rem; }
.panel, .progress-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.panel { padding: clamp(1.05rem, 2.6vw, 1.55rem); }
.progress-card { display: flex; flex-direction: column; min-width: 0; padding: clamp(1.12rem, 2.45vw, 1.62rem); }
.progress-card h2, .panel h2 { font-size: 1.23rem; line-height: 1.19; letter-spacing: -.045em; font-weight: 800; }
.solve-line { display: flex; align-items: baseline; gap: .5rem; margin-top: .42rem; color: var(--muted); font-size: .91rem; }
#today-count { color: var(--ink); font-size: 2.5rem; font-weight: 820; font-variant-numeric: tabular-nums; letter-spacing: -.08em; line-height: 1.22; }
#today-count span { color: var(--muted); font-size: 1.12rem; letter-spacing: -.06em; }
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: .31rem; margin-block: .63rem .87rem; }
.segments span { height: .41rem; border-radius: 99px; background: #ebe8e4; }
.segments span.done { background: #df7858; }
.drop-list { list-style: none; padding: 0; }
.drop-list li { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding-block: .43rem; border-bottom: 1px solid #f0edea; font-size: .87rem; }
.drop-name { font-weight: 720; }
.drop-state { text-align: right; color: var(--muted); }
.drop-state.solved { color: #2c6751; font-weight: 720; }
.next-drop { margin-top: auto; padding-top: .86rem; color: var(--muted); font-size: .88rem; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: .74rem; margin-block: 1.68rem .87rem; }
.section-heading h2 { font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.12; font-weight: 820; letter-spacing: -.068em; }
.section-heading p { margin-top: .23rem; color: var(--muted); font-size: .94rem; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
[data-mode="target"] { --tone: #fae0d6; --tint: #fbf0eb; --edge: #efbdac; --accent: #a33e27; --active: #fbc4b0; }
[data-mode="route"] { --tone: #def0e9; --tint: #eef8f3; --edge: #a9cabe; --accent: #23654d; --active: #b4dfca; }
[data-mode="signal"] { --tone: #ebe3f9; --tint: #f6f0fd; --edge: #c5b3df; --accent: #604291; --active: #d9c4f3; }
.mode-card { display: flex; align-items: start; flex-direction: column; min-width: 0; padding: 1.18rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); }
.mode-card-top { display: flex; align-items: center; gap: .6rem; min-height: 3.05rem; }
.mode-art { display: inline-grid; flex: none; place-items: center; width: 3rem; height: 3rem; border-radius: .72rem; background: var(--tone); color: var(--accent); font-size: 1.82rem; font-weight: 790; line-height: 1; }
.mode-category { color: var(--accent); font-size: .84rem; font-weight: 750; }
.mode-card h3 { margin-top: .72rem; font-size: 1.44rem; line-height: 1.18; letter-spacing: -.056em; font-weight: 820; }
.mode-card p { margin-block: .34rem .88rem; color: var(--muted); line-height: 1.42; }
.mode-card > .action-row { margin-top: auto; }
.mode-card .button:disabled { background: var(--tint); border-color: var(--edge); color: var(--accent); opacity: .85; }

.page-heading { margin: .25rem 0 1.25rem; }
.page-heading h1, .missing h1 { font-size: clamp(2.2rem, 5.5vw, 3.9rem); line-height: 1.04; letter-spacing: -.083em; font-weight: 820; }
.page-heading p:not(.game-date), .missing p { margin-top: .43rem; color: var(--muted); }
.page-heading h1:focus, .missing h1:focus { outline: 0; }
.archive-list { display: grid; gap: .62rem; }
.archive-day { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .87rem 1rem; }
.archive-day h2 { font-size: 1.06rem; letter-spacing: -.026em; }
.archive-challenges { display: flex; flex-wrap: wrap; gap: .38rem; }
.archive-challenges .button { color: var(--accent); background: var(--tint); border-color: var(--edge); }
.archive-challenges .button:hover { background: var(--tone); }
.archive-challenges .completed { color: #27604e; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .72rem; margin-bottom: .86rem; }
.stat-box { padding: 1rem; }
.stat-box dt { color: var(--muted); font-size: .89rem; font-weight: 690; }
.stat-box dd { margin-top: .28rem; font-size: clamp(1.9rem, 5vw, 2.65rem); line-height: 1.08; letter-spacing: -.06em; font-weight: 840; }
.stats-panels { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .86rem; }
.activity { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: .36rem; margin-top: 1rem; }
.activity span { display: grid; place-items: center; min-width: 0; min-height: 1.85rem; aspect-ratio: 1; border: 1px solid #e8e2de; border-radius: .41rem; color: #524856; background: #f0edeb; font-size: .8rem; font-weight: 750; }
.activity span[data-level="1"] { background: #f9dfd0; border-color: #f4ceb8; }
.activity span[data-level="2"] { background: #f7c4ac; border-color: #eeb39a; }
.activity span[data-level="3"] { background: #f3a58a; border-color: #e79479; color: #34222b; }
.activity span:last-child { outline: 2px solid #645971; outline-offset: 1px; }
.activity-note { margin-top: .78rem; }
.breakdown { display: grid; gap: .56rem; margin-top: .85rem; }
.breakdown div { display: flex; justify-content: space-between; gap: .55rem; font-weight: 675; }
.breakdown dd { color: var(--muted); font-variant-numeric: tabular-nums; }
.missing { max-width: 42rem; margin: 1.5rem auto; }
.missing .action-row { margin-top: 1rem; }

.play-top { display: flex; justify-content: space-between; gap: .65rem; margin-bottom: .65rem; }
.game-heading { margin-bottom: .94rem; }
.game-date { margin-bottom: .33rem; color: var(--muted); font-size: .88rem; font-weight: 730; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1.92fr) minmax(15.4rem, 1fr); align-items: start; gap: 1rem; }
.game-panel { min-width: 0; border-top: .28rem solid var(--edge); }
.rules ol { margin: .73rem 0 0; padding-left: 1.25rem; color: #49454d; }
.rules li + li { margin-top: .5rem; }
.game-tools { display: flex; flex-wrap: wrap; gap: .47rem; margin-top: .99rem; }
#hint-count { margin-top: .57rem; }
.board-caption { color: var(--muted); font-weight: 700; font-size: .87rem; }
.board-title { font-size: 1.08rem; font-weight: 800; }
.board-content { width: min(100%, 28rem); margin-inline: auto; }
.board-strip { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .47rem; margin-bottom: .72rem; }
.board-strip strong { font-variant-numeric: tabular-nums; }
.board-detail { font-size: .91rem; color: var(--muted); font-weight: 680; }
.board-footer { display: flex; flex-wrap: wrap; gap: .52rem; margin-top: .81rem; }
.feedback { min-height: 1.46rem; margin: .65rem auto 0; max-width: 28rem; color: var(--accent); font-size: .93rem; font-weight: 680; }
.feedback:empty { min-height: 0; margin-top: 0; }
.target-totals { display: flex; flex-wrap: wrap; gap: .38rem; margin-bottom: .84rem; }
.target-totals span { padding: .34rem .64rem; border: 1px solid #eae4df; border-radius: .5rem; background: #f7f5f2; color: #615e67; font-weight: 750; font-variant-numeric: tabular-nums; }
.target-totals span.current, .target-totals span.complete { border-color: var(--edge); background: var(--tone); color: var(--accent); }
.target-totals span.current { box-shadow: inset 0 -2px var(--edge); }
.target-totals span.complete { font-weight: 650; }

.board-grid { --size: 4; --gap: .43rem; display: grid; grid-template-columns: repeat(var(--size), minmax(0, 1fr)); gap: var(--gap); }
.board-grid.route-grid { --size: 5; }
.tile, .slot, .glyph-button {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  aspect-ratio: 1;
  color: var(--ink);
  border: 1px solid #e6e1dd;
  border-radius: .55rem;
  font-weight: 810;
  background: #f8f6f3;
}
.tile { font-size: clamp(1.25rem, 4.8vw, 1.91rem); font-variant-numeric: tabular-nums; }
.tile:hover:not(:disabled), .glyph-button:hover:not(:disabled) { background: var(--tint); border-color: var(--edge); }
.tile[aria-pressed="true"], .slot[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--tone); color: var(--accent); }
.tile.used { color: #6c6161; background: #eeebea; border-color: #e9e4e2; }
.tile.hint, .slot.hint { outline: 2px dashed var(--accent); outline-offset: 1px; }
.route-grid .tile { font-size: clamp(.91rem, 3.8vw, 1.21rem); }
.route-grid .wall { border-color: #d9d7d6; background: repeating-linear-gradient(135deg, #e6e3e2, #e6e3e2 4px, #dfdcda 4px, #dfdcda 8px); }
.route-grid .checkpoint { background: var(--tone); color: var(--accent); border-color: var(--edge); }
.route-grid .endpoint { background: #e2eee9; color: var(--accent); border-color: var(--edge); }
.route-grid .traced { border-color: #87b3a0; background: #cdeada; color: #214f3e; }
.route-grid .tip { border: 2px solid var(--accent); }
.route-links { position: absolute; inset: 0; pointer-events: none; }
.route-links span { position: absolute; z-index: 1; background: #79b19a; border-radius: 3px; }
.route-links [data-dir="east"], .route-links [data-dir="west"] { width: calc(50% + var(--gap) / 2 + 1px); height: .26rem; top: calc(50% - .13rem); }
.route-links [data-dir="south"], .route-links [data-dir="north"] { height: calc(50% + var(--gap) / 2 + 1px); width: .26rem; left: calc(50% - .13rem); }
.route-links [data-dir="east"] { left: 50%; }
.route-links [data-dir="west"] { right: 50%; }
.route-links [data-dir="south"] { top: 50%; }
.route-links [data-dir="north"] { bottom: 50%; }
.route-label { position: relative; z-index: 2; min-width: 1.25em; border-radius: 99px; background: inherit; color: inherit; line-height: 1.2; }
.traced .route-label { background: #cdeada; }
.route-key { display: flex; flex-wrap: wrap; align-items: center; gap: .22rem .65rem; margin-top: .53rem; color: var(--muted); font-size: .85rem; }
.route-key b { color: #285c46; }

.clue-list { display: grid; list-style: none; gap: .28rem; padding: 0; margin-bottom: 1rem; }
.clue-row { display: grid; grid-template-columns: repeat(4, minmax(1.65rem, 2.5rem)) minmax(0, 1fr); align-items: center; gap: .23rem; padding: .3rem .45rem; border: 1px solid #ede9ef; border-radius: .52rem; background: #faf8fc; }
.clue-row .glyph { background: #eee6f6; border-radius: .32rem; }
.clue-row.off { border-color: #ecc3b7; background: #fff2ec; }
.clue-count { justify-self: end; color: #524761; font-size: .86rem; font-weight: 750; text-align: right; }
.glyph { display: grid; min-width: 0; place-items: center; min-height: 1.72rem; font-size: clamp(1rem, 4vw, 1.4rem); font-weight: 790; line-height: 1.1; color: #674a86; }
.glyph[data-symbol="0"] { color: #8c3c70; }
.glyph[data-symbol="1"] { color: #2d687b; }
.glyph[data-symbol="2"] { color: #95531e; }
.glyph[data-symbol="3"] { color: #5b4894; }
.glyph[data-symbol="4"] { color: #2c674e; }
.glyph[data-symbol="5"] { color: #993e37; }
.slots, .palette { display: grid; gap: .38rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slots { margin-top: .34rem; }
.slot { aspect-ratio: 1.34; }
.slot span { font-size: clamp(1.22rem, 6vw, 1.7rem); }
.palette { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: .39rem; }
.glyph-button { aspect-ratio: 1.13; background: #f8f4fb; }
.glyph-button:disabled { opacity: .38; }
.palette-label { margin-top: .61rem; }
.results { padding: .7rem .15rem .9rem; }
.results-mark { display: inline-grid; width: 2.85rem; height: 2.85rem; place-items: center; border-radius: .65rem; background: var(--tone); color: var(--accent); font-size: 1.43rem; font-weight: 820; }
.results h2 { margin-top: .65rem; font-size: clamp(1.55rem, 4vw, 2.2rem); }
.result-line { margin-block: .44rem 1.05rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-row { min-height: 4.3rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem .75rem; padding-block: .65rem; color: var(--muted); font-size: .88rem; }
.footer-row strong { color: var(--ink); }
.save-note { margin-left: .35rem; }
.footer-row a { text-underline-offset: .2em; }
dialog { width: min(29rem, calc(100% - 1.65rem)); padding: 1.35rem; border: 1px solid #e2ddd8; border-radius: .88rem; color: var(--ink); background: #fff; box-shadow: 0 1.4rem 4rem #24212d4a; }
dialog::backdrop { background: #231d2d73; }
dialog h2 { font-size: 1.38rem; font-weight: 810; letter-spacing: -.045em; }
dialog p { color: var(--muted); margin-top: .28rem; }
#share-text { display: block; width: 100%; min-width: 0; margin-top: .7rem; padding: .53rem .61rem; resize: vertical; border: 1px solid var(--line); border-radius: .55rem; background: #faf8f5; color: var(--ink); overflow-wrap: anywhere; }
.dialog-actions { margin-top: .74rem; justify-content: end; }
#copy-status:empty, #hint-count:empty { display: none; }

@media (max-width: 57rem) {
  .wrap { width: calc(100% - 2rem); }
  .lead-grid { grid-template-columns: minmax(0, 2.06fr) minmax(13.1rem, 1fr); gap: .74rem; }
  .hero-content { padding-left: 1.45rem; }
  .mode-card { padding: .97rem; }
  .game-layout, .stats-panels { gap: .73rem; }
  .activity { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 43rem) {
  .header-row { flex-wrap: wrap; row-gap: .16rem; padding-block: .61rem .44rem; }
  #navigation { flex: 1 0 100%; justify-content: start; gap: .19rem; order: 3; }
  #navigation a { min-height: 2.5rem; padding-inline: .63rem; }
  main.wrap { padding-top: .9rem; }
  .lead-grid, .game-layout, .stats-panels { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 17.6rem; }
  .hero-content { width: 65%; }
  .hero h1 { font-size: clamp(2.37rem, 7vw, 3.4rem); }
  .progress-card { display: grid; grid-template-columns: 1fr auto; gap: .25rem .65rem; }
  .progress-card h2 { align-self: center; }
  .solve-line { margin: 0; }
  #today-count { font-size: 1.85rem; }
  .segments, .drop-list, .next-drop { grid-column: 1 / -1; }
  .segments { margin-block: .37rem .21rem; }
  .next-drop { padding-top: .33rem; }
  .mode-grid { grid-template-columns: minmax(0, 1fr); gap: .62rem; }
  .mode-card h3 { margin-top: .47rem; }
  .mode-card p { margin-bottom: .65rem; }
  .archive-day { flex-wrap: wrap; }
}
@media (max-width: 29rem) {
  .wrap { width: calc(100% - 1.36rem); }
  .wordmark { font-size: 1.16rem; }
  .wordmark img { width: 31px; height: 31px; }
  .streak-link { font-size: .81rem; padding-inline: .49rem; }
  .hero { align-items: end; min-height: 20.4rem; }
  .cover { inset: 0 0 auto; width: 100%; height: 65%; object-position: 60% 43%; }
  .hero::after { background: linear-gradient(0deg, #1c1c20 34%, #1c1c20f2 48%, #1c1c2050 70%, transparent); }
  .hero-content { align-self: end; width: 100%; padding: 1rem 1.07rem 1.19rem; }
  .hero h1 { font-size: clamp(2.34rem, 10vw, 3rem); }
  .hero-content > p:not(.hero-date) { font-size: .92rem; }
  .hero-button { margin-top: .79rem; }
  .section-heading { align-items: start; flex-wrap: wrap; gap: .32rem; }
  .section-heading .text-link { min-height: 1.65rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .48rem; }
  .activity { gap: .32rem; }
  .save-note { display: block; margin-left: 0; }
  .game-panel, .rules { padding-inline: .8rem; }
  .archive-challenges { gap: .29rem; }
  .archive-challenges .button { padding-inline: .47rem; font-size: .81rem; }
}

.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; }
.homepage-guide { margin-top: 1.1rem; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: .8rem; }
.guide-grid h3 { font-size: 1rem; letter-spacing: -.025em; margin-bottom: .24rem; }
.guide-grid p, .policy article p { color: var(--muted); }
.policy article { max-width: 47rem; margin-inline: auto; }
.policy h1 { font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.05; letter-spacing: -.06em; }
.policy section { margin-top: 1.17rem; }
.policy p { margin-top: .38rem; }
.policy a { text-underline-offset: .19em; }
@media (max-width: 43rem) { .guide-grid { grid-template-columns: minmax(0, 1fr); } }
