@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url(fonts/public_sans_regular.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url(fonts/public_sans_bold.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-display: swap; src: url(fonts/source_serif_4_regular.woff2) format("woff2"); }

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --paper-deep: #f2f2f2;
  --surface: #ffffff;
  --ink: #111111;
  --soft: #595959;
  --line: #dcdcdc;
  --line-strong: #767676;
  --sans: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141414;
    --paper-deep: #242424;
    --surface: #2e2e2e;
    --ink: #f2f2f2;
    --soft: #b3b3b3;
    --line: #3a3a3a;
    --line-strong: #8c8c8c;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-size: 1.0625rem; line-height: 1.6; }
.mark { flex: none; display: block; width: 28px; height: 28px; border-radius: 4px; }
.wordmark { font-size: 1rem; font-weight: 700; line-height: 1.375; }
.wrap { width: min(calc(100% - 32px), 72rem); margin-inline: auto; }
h1, h2 { font-family: var(--sans); font-weight: 700; letter-spacing: -.015em; line-height: 1.08; text-wrap: balance; overflow-wrap: break-word; margin: 0; }
h1 { font-size: clamp(2.25rem, 10.5vw, 4.5rem); }
h2 { font-size: clamp(1.5rem, 6vw, 2.25rem); margin-bottom: 1rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 2; padding: .75rem 1rem; background: var(--surface); transform: translateY(-200%); }
.skip:focus { transform: none; }
.site-head nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; min-height: 60px; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .625rem 1.5rem;
  border: 0; border-radius: 4px; background: var(--ink); color: var(--paper);
  font-family: inherit; font-size: 1.0625rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .12s ease-out, opacity .12s ease-out;
}
.btn:hover { opacity: .86; }
.btn:active { transform: scale(.96); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-quiet:hover { opacity: 1; background: var(--paper-deep); }
.store-links { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1.25rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: .75rem 3rem; }
.lead { font-size: clamp(1.125rem, 2.6vw, 1.25rem); line-height: 1.45; color: var(--soft); margin: 1rem 0 0; max-width: 32rem; }
.try-title { margin: 0 0 .5rem; color: var(--soft); font-family: inherit; font-size: 1rem; font-weight: 400; letter-spacing: 0; line-height: 1.6; }
.clue { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 6.8vw, 2.25rem); line-height: 1.25; text-wrap: balance; }
.clue .len { color: var(--soft); font-family: var(--serif); white-space: nowrap; }
.tease { margin: .625rem 0 0; color: var(--soft); }
.source { margin: 1rem 0 0; color: var(--soft); font-size: .9375rem; }

details { margin-top: .75rem; }
summary {
  display: flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+"; flex: none; display: grid; place-items: center; width: 1.25rem; margin-right: .5rem;
  font-weight: 700; line-height: 1;
}
details[open] > summary::before { content: "\2212"; }
summary:hover { text-decoration: underline; text-underline-offset: .2em; }
.hints { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.hints p { margin: 0 0 .25rem 1.75rem; }
.hint { margin: 0; }
.hint .hint { margin-top: .25rem; }
.solution { border-top: 1px solid var(--line); margin-top: .5rem; }
.solution h3 { margin: .5rem 0 .75rem; font-family: var(--sans); font-size: 1.25rem; font-weight: 700; }
.tiles { --gap: 1px; display: grid; grid-template-columns: repeat(6, minmax(0, 3rem)); gap: var(--gap); margin-bottom: 1rem; }
.tiles span {
  display: grid; place-items: center; aspect-ratio: 1; min-width: 0; background: var(--ink); color: var(--paper);
  font: 700 clamp(1.25rem, 6vw, 1.625rem)/1 var(--sans);
}
.parse { margin: 0 0 1rem; display: grid; gap: .625rem; }
.parse div { display: grid; gap: .125rem; }
.parse dt { font-weight: 700; }
.parse dd { margin: 0; color: var(--soft); }
.band { padding-block: 3rem; border-top: 1px solid var(--line); }
.band > .wrap > p { max-width: 40rem; }
.steps { display: grid; gap: 1.25rem; margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; column-gap: .75rem; }
/* The steps really are in order, so they get numbers, set the way a grid numbers its squares. */
.steps li::before {
  content: counter(step); display: block; width: 2.25rem; height: 2.25rem; padding: .125rem .25rem; box-shadow: inset 0 0 0 1px var(--ink);
  font: 400 .8125rem/1.2 var(--sans); font-variant-numeric: lining-nums;
}
.steps h3 { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 2.25rem; }
.steps p { grid-column: 2; margin: 0; color: var(--soft); }
.techniques { display: grid; gap: 0 2rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.techniques li { padding-block: .75rem; border-bottom: 1px solid var(--line); }
.techniques strong { display: block; font-size: 1.0625rem; font-weight: 700; }
.techniques span { color: var(--soft); }
.plain { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: .625rem; }
.plain li { padding-left: 1.5rem; position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; background: var(--ink); }
.finale { padding-block: 3rem; border-top: 1px solid var(--line); }
.finale p { max-width: 34rem; }
.foot { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--soft); font-size: .9375rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-bottom: .75rem; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--soft); }
.foot p { margin: 0; }
#main:focus { outline: none; }

@media (min-width: 40rem) {
  .techniques { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .steps li { grid-template-columns: 1fr; row-gap: .5rem; }
  .steps p { grid-column: 1; }
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 3rem; align-items: start; padding-block: 3.5rem 5rem; }
  .band, .finale { padding-block: 4.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  /* One letter wanders: S hops from A HORSE's fifth place to second, and the rest make room. */
  details[open] > .answer-body .tiles span { animation: settle .5s .6s cubic-bezier(.2, 0, 0, 1) both; }
  details[open] > .answer-body .tiles .wander { animation: wander .75s .6s cubic-bezier(.2, 0, 0, 1) both; position: relative; z-index: 1; }
  @keyframes settle { from { transform: translateX(calc(-100% - var(--gap))); } }
  @keyframes wander {
    from { transform: translateX(calc(300% + 3 * var(--gap))); }
    50% { transform: translate(calc(150% + 1.5 * var(--gap)), -40%); }
  }
  details[open] > .answer-body .tiles .still { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .btn, .tiles span { border: 1px solid ButtonText; }
}
