@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Five two-tone ribbons per day: a deep face (the given phrase) and a pale reverse (your twin). */
:root {
  color-scheme: light;
  --ink: #1b1830;
  --paper: #ffffff;
  --gold: #e9b52f;
  --gold-deep: #7a5300;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --radius: 14px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --deep: #c4362a;
  --pale: #ffc2cf;
  --ground: #fff1f3;
}
[data-tone="0"], .t0 { --deep: #c4362a; --pale: #ffc2cf; --ground: #fff1f3; }
[data-tone="1"], .t1 { --deep: #2a43c4; --pale: #a9dcff; --ground: #eef5ff; }
[data-tone="2"], .t2 { --deep: #0a7550; --pale: #d3ee79; --ground: #f3f9dd; }
[data-tone="3"], .t3 { --deep: #5b33c0; --pale: #dccbff; --ground: #f5f0ff; }
[data-tone="4"], .t4 { --deep: #ae3f0d; --pale: #ffdf7e; --ground: #fff7dc; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  caret-color: var(--deep);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--pale); color: var(--ink); }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }
h1, h2, h3, p { overflow-wrap: break-word; margin: 0; }
svg { display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

/* Masthead */
.masthead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  z-index: 3;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 88%;
  font-size: 26px;
  letter-spacing: -.02em;
  border-radius: 8px;
}
.mark { width: 40px; height: 20px; }
.mark-a { fill: var(--deep); }
.mark-b { fill: var(--pale); stroke: var(--deep); stroke-width: 1.2; stroke-linejoin: round; }
.how summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid color-mix(in oklab, var(--ink) 14%, transparent);
  font-weight: 700;
  font-size: 16px;
  user-select: none;
}
.how summary::-webkit-details-marker { display: none; }
.how summary:hover { border-color: var(--ink); }
.how[open] summary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.how-body {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  padding: 24px 22px 22px;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 18px 40px -12px color-mix(in oklab, var(--ink) 35%, transparent), 0 2px 6px color-mix(in oklab, var(--ink) 10%, transparent);
  font-size: 17px;
}
.how-lead { font-size: 19px; font-weight: 700; line-height: 1.4; max-width: 34ch; }
.how-example {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 6px;
  font-family: var(--display);
  font-weight: 750;
  font-size: 19px;
}
.how-example span { padding: 6px 14px; border-radius: 6px; }
.ex-front { background: var(--deep); color: var(--paper); }
.ex-back { background: var(--pale); }
.how-example svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.how ul { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.how li::marker { color: var(--deep); }

/* Notice */
#notice {
  min-height: 0;
  margin: 8px 0 0;
  font-weight: 700;
  font-size: 17px;
  color: color-mix(in oklab, var(--deep) 70%, var(--ink));
  text-align: center;
}
#notice:empty { margin: 0; }
.loading { padding: 80px 0; text-align: center; font-weight: 700; }

/* Day strip: five little ribbons */
.dayline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 26px;
}
.steps {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step svg { width: 38px; height: 18px; overflow: visible; }
.step .band { fill: color-mix(in oklab, var(--ink) 8%, transparent); stroke: color-mix(in oklab, var(--ink) 28%, transparent); stroke-width: 1.4; stroke-dasharray: 3 3; }
.step.current .band { fill: var(--deep); stroke: none; }
.step.current svg { transform: translateY(-3px); filter: drop-shadow(0 3px 2px color-mix(in oklab, var(--deep) 40%, transparent)); }
.step .front-half { fill: var(--deep); }
.step .back-half { fill: var(--pale); stroke: var(--deep); stroke-width: 1; }
.step.creative .back-half { fill: var(--gold); stroke: var(--gold-deep); }
.step.missed .band, .step.skipped .band { fill: color-mix(in oklab, var(--deep) 22%, #b9b5c4); stroke: none; stroke-dasharray: none; }
.level {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: color-mix(in oklab, var(--deep) 62%, var(--ink));
}
.level b { text-transform: capitalize; }

/* The ribbon */
.ribbon-wrap {
  --notch: 26px;
  position: relative;
  margin: 0 -8px;
  filter: drop-shadow(0 14px 14px color-mix(in oklab, var(--deep) 26%, transparent)) drop-shadow(0 2px 2px color-mix(in oklab, var(--ink) 18%, transparent));
  transform: rotate(-1.6deg);
  transition: transform .5s var(--ease-out), filter .5s var(--ease-out);
}
.ribbon {
  position: relative;
  display: grid;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--notch)) 50%, 100% 100%, 0 100%, var(--notch) 50%);
}
.face {
  grid-area: 1 / 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 168px;
  padding: 30px calc(var(--notch) + 22px);
  text-align: center;
  transition: opacity .35s var(--ease-out);
}
.face.front {
  background:
    linear-gradient(180deg, rgb(255 255 255 / .16), transparent 34%, transparent 70%, rgb(0 0 0 / .14)),
    var(--deep);
  color: var(--paper);
}
.face.back {
  background:
    linear-gradient(180deg, rgb(255 255 255 / .5), transparent 38%, transparent 72%, rgb(0 0 0 / .08)),
    var(--pale);
  color: var(--ink);
  opacity: 0;
}
.ribbon[data-face="back"] .face.front { opacity: 0; }
.ribbon[data-face="back"] .face.back { opacity: 1; }
.ribbon[data-face="back"].foil .face.back {
  background:
    linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .55) 46%, transparent 60%) 0 0 / 300% 100%,
    linear-gradient(180deg, #fff1b8, var(--gold) 55%, #d39a1c);
}
.ribbon h1, .twin {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 87.5%; /* semi-condensed: a width the canvas twist can reproduce exactly */
  font-size: clamp(44px, 11.5vw, 56px);
  line-height: .98;
  letter-spacing: -.025em;
  text-wrap: balance;
  max-width: 12ch;
}
.face-note {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
}
.foil-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffe7a0;
  font-weight: 700;
  font-size: 15px;
}
.foil-tag svg { width: 16px; height: 16px; fill: currentColor; }

.wrap-slack .ribbon-wrap { transform: rotate(1.2deg) translateY(4px); filter: drop-shadow(0 6px 6px color-mix(in oklab, var(--ink) 16%, transparent)); }
.wrap-slack .face.front { background: linear-gradient(180deg, rgb(255 255 255 / .12), transparent 40%), color-mix(in oklab, var(--deep) 45%, #6e6a78); }

/* Reverse strip: a glimpse of the back of the ribbon, where hints show up */
.glimpse {
  position: relative;
  margin: -6px 18px 0;
  padding: 18px 20px 14px;
  background:
    linear-gradient(180deg, rgb(0 0 0 / .1), transparent 30%),
    var(--pale);
  transform: rotate(.8deg);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 8px), 0 100%);
  padding-bottom: 22px;
}
.glimpse-words {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.word { display: flex; gap: 4px; align-items: center; }
.tile {
  display: grid;
  place-items: center;
  width: 34px;
  height: 42px;
  border-radius: 7px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
}
.tile.on { background: var(--ink); color: var(--paper); }
.tile.tail { width: 22px; color: color-mix(in oklab, var(--ink) 55%, var(--deep)); font-size: 22px; }
.glimpse-note {
  margin-top: 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: color-mix(in oklab, var(--ink) 78%, var(--deep));
}

/* Feedback printed under the ribbon */
.feedback {
  min-height: 27px;
  margin: 20px 0 0;
  text-align: center;
  font-weight: 700;
  font-size: 19px;
  color: color-mix(in oklab, var(--deep) 75%, var(--ink));
}
.feedback.wrong { color: #a3241a; }
.tried {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.tried li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 16px;
  color: color-mix(in oklab, var(--ink) 80%, transparent);
}
.tried li span { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: #a3241a; }
.tried svg { width: 16px; height: 16px; fill: none; stroke: #a3241a; stroke-width: 2.6; stroke-linecap: round; }

/* Answer form */
.answer-form { margin-top: 18px; display: grid; gap: 12px; }
.answer-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 16px;
}
input {
  width: 100%;
  min-width: 0;
  height: 64px;
  padding: 0 18px;
  border: 2px solid color-mix(in oklab, var(--ink) 22%, transparent);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: 700 22px/1 var(--body);
  box-shadow: inset 0 2px 0 color-mix(in oklab, var(--ink) 6%, transparent);
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: color-mix(in oklab, var(--ink) 52%, transparent); font-weight: 400; }
input:focus { outline: none; border-color: var(--deep); box-shadow: 0 0 0 4px color-mix(in oklab, var(--deep) 22%, transparent); }
input:disabled { background: color-mix(in oklab, var(--paper) 70%, var(--ground)); }

button {
  font: inherit;
  font-weight: 700;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  color: var(--ink);
  background: var(--paper);
  transition: transform .15s var(--ease-out), background-color .2s, box-shadow .2s;
}
button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
button:disabled { cursor: not-allowed; opacity: .45; }
.primary {
  min-height: 62px;
  width: 100%;
  background: var(--deep);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 90%;
  font-size: 24px;
  letter-spacing: -.01em;
  box-shadow: 0 8px 16px -8px color-mix(in oklab, var(--deep) 80%, transparent);
}
.primary:hover:not(:disabled) { background: color-mix(in oklab, var(--deep) 85%, var(--ink)); }
.primary svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }

.guesses {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: color-mix(in oklab, var(--ink) 80%, var(--deep));
}
.pips { display: inline-flex; gap: 4px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; background: var(--deep); }
.pips i.used { background: transparent; box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--ink) 30%, transparent); }

.hints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 12px;
  border-color: color-mix(in oklab, var(--ink) 14%, transparent);
  font-size: 17px;
  line-height: 1.2;
}
.hint:hover:not(:disabled) { border-color: var(--ink); }
.hint svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--deep); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hint-note {
  margin-top: 10px;
  text-align: center;
  font-size: 16px;
  color: color-mix(in oklab, var(--ink) 80%, var(--deep));
}
.give-up {
  display: block;
  margin: 34px auto 0;
  min-height: 48px;
  background: transparent;
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in oklab, var(--ink) 35%, transparent);
  color: color-mix(in oklab, var(--ink) 82%, var(--deep));
}
.give-up:hover:not(:disabled) { text-decoration-color: var(--ink); }
.subtle {
  margin-top: 14px;
  text-align: center;
  font-size: 16px;
  color: color-mix(in oklab, var(--ink) 78%, var(--deep));
}
.after { margin-top: 26px; }
.expired { margin-bottom: 20px; }

/* Motion: authored once */
.twist-canvas { position: absolute; left: 0; pointer-events: none; }
.ribbon-wrap.twisting .ribbon .face { opacity: 1; transition: none; }
.measuring { transform: none !important; }
@keyframes flip-out { to { transform: perspective(500px) rotateX(90deg); } }
@keyframes flip-in { from { transform: perspective(500px) rotateX(-90deg); } }
@keyframes unfurl {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-1.6deg); }
  20% { transform: rotate(-4deg) translateX(-6px); }
  45% { transform: rotate(.8deg) translateX(5px); }
  70% { transform: rotate(-2.8deg) translateX(-3px); }
}
@keyframes foil { from { background-position: 100% 0, 0 0; } to { background-position: 0 0, 0 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes lift { from { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .unfurl .ribbon-wrap { animation: unfurl .7s var(--ease-out) backwards; }
  .unfurl .glimpse { animation: lift .5s .25s var(--ease-out) both; }
  .wiggle .ribbon-wrap { animation: wiggle .5s var(--ease-out); }
  .ribbon[data-face="back"].foil .face.back { animation: foil 1.4s 1.2s var(--ease-out) both; }
  .pending .face.front {
    background:
      linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .22) 50%, transparent 65%) 0 0 / 200% 100%,
      linear-gradient(180deg, rgb(255 255 255 / .16), transparent 34%, transparent 70%, rgb(0 0 0 / .14)),
      var(--deep);
    animation: shimmer 1.4s linear infinite;
  }
  .row-ribbon { animation: unfurl .7s calc(.35s + var(--n) * .14s) var(--ease-out) backwards; }
  .row-mark svg { animation: pop .45s calc(.75s + var(--n) * .14s) cubic-bezier(.34, 1.56, .64, 1) backwards; }
  body { transition: background-color .6s var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) {
}

/* Results */
.results { padding-top: 10px; }
.results-head { text-align: center; }
.results h1 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 86%;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.score { display: block; margin-top: 8px; color: var(--deep); font-size: .62em; }
.summary { margin-top: 30px; text-align: center; }
.badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 6px 14px -8px color-mix(in oklab, var(--ink) 40%, transparent);
}
.badge svg { width: 28px; height: 34px; }
.tally {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
}
.tally li { display: inline-flex; align-items: center; gap: 8px; }
.tally svg { width: 22px; height: 22px; fill: none; stroke: var(--deep); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tally svg.fill { fill: var(--gold); stroke: var(--gold-deep); stroke-width: 1.4; }
.results .subtle { margin-top: 10px; }

.ribbons { margin-top: 30px; display: grid; gap: 14px; }
.ribbons h2 { text-align: center; }
.row-ribbon { filter: drop-shadow(0 10px 10px color-mix(in oklab, var(--deep) 26%, transparent)) drop-shadow(0 2px 2px color-mix(in oklab, var(--ink) 16%, transparent)); }
.row:nth-of-type(odd) .row-ribbon { transform: rotate(-.8deg); }
.row:nth-of-type(even) .row-ribbon { transform: rotate(.6deg); }
.ribbons h2 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 88%;
  font-size: 28px;
  letter-spacing: -.015em;
}
.row-band {
  --notch: 16px;
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  align-items: stretch;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--notch)) 50%, 100% 100%, 0 100%, var(--notch) 50%);
}
.row-band h3, .row-band .seg {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 10px 8px;
  text-align: center;
  font-family: var(--display);
  font-weight: 750;
  font-stretch: 92%;
  font-size: 19px;
  line-height: 1.1;
}
.row-band h3 { background: var(--deep); color: var(--paper); padding-left: calc(var(--notch) + 6px); }
.row-band .seg { background: var(--pale); padding-right: calc(var(--notch) + 6px); }
.row-band .pinch { width: 30px; height: 100%; }
.pinch .a { fill: var(--deep); }
.pinch .b { fill: var(--pale); }
.row.creative .row-band .seg, .row.creative .pinch .b { background: var(--gold); fill: var(--gold); }
.row.missed .row-band h3, .row.skipped .row-band h3,
.row.missed .pinch .a, .row.skipped .pinch .a { background: color-mix(in oklab, var(--deep) 40%, #6e6a78); fill: color-mix(in oklab, var(--deep) 40%, #6e6a78); }
.row.missed .row-band .seg, .row.skipped .row-band .seg, .row.missed .pinch .b, .row.skipped .pinch .b { background: #e6e3ec; fill: #e6e3ec; }
.share-box {
  margin-top: 36px;
  padding: 22px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 18px 36px -20px color-mix(in oklab, var(--ink) 40%, transparent);
}
.share-box h2 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 88%;
  font-size: 26px;
  letter-spacing: -.015em;
}
.share {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ground);
  font: 17px/1.6 var(--body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.share-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.share-actions.two { grid-template-columns: 1fr 1fr; }
.share-actions .primary { font-size: 21px; }
.share-actions .secondary { min-height: 62px; border-color: var(--ink); font-size: 19px; }
.legend { margin-top: 12px; font-size: 15px; color: color-mix(in oklab, var(--ink) 78%, var(--deep)); }
.compare { margin-top: 18px; text-align: center; font-size: 17px; }

footer {
  margin-top: 40px;
  text-align: center;
  font-size: 15px;
  color: color-mix(in oklab, var(--ink) 75%, var(--deep));
}
.countdown {
  font-family: var(--display);
  font-weight: 750;
  font-size: 19px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.countdown:empty { display: none; }
footer p + p { margin-top: 4px; }

@media (min-width: 720px) {
  .page { padding-top: 28px; }
  .face { min-height: 210px; }
  .ribbon-wrap { margin: 0 -36px; }
  .glimpse { margin-inline: 40px; }
  .answer-form { margin-top: 26px; }
  .row-band h3, .row-band .seg { font-size: 22px; min-height: 72px; }
}
@media (max-width: 380px) {
  .page { padding-inline: 16px; }
  .wordmark { font-size: 23px; }
  .how summary { padding: 0 14px; }
  .step svg { width: 32px; }
  .face { padding-inline: calc(var(--notch) + 12px); }
  .row-band h3, .row-band .seg { font-size: 17px; }
}

/* Fix-round additions */
.hint { justify-content: flex-start; padding-inline: 14px; text-align: left; }
.hint-text { display: grid; line-height: 1.15; }
.hint-text .count { font-size: 15px; font-weight: 700; color: color-mix(in oklab, var(--ink) 75%, var(--deep)); }
.rosette .tail { fill: var(--deep); }
.rosette .disc { fill: var(--deep); }
.rosette .core { fill: var(--pale); }

/* Intro: first screen until today's puzzle is touched */
body[data-screen="intro"] .wordmark { visibility: hidden; }
body[data-screen="intro"] .countdown { display: none; }
.intro {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 4vh 0 0;
}
.intro-mark { width: 88px; height: 44px; }
.intro-mark .mark-a { fill: var(--deep); }
.intro-mark .mark-b { fill: var(--pale); stroke: var(--deep); stroke-width: 1.2; stroke-linejoin: round; }
.intro h1 {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 86%;
  font-size: clamp(48px, 13vw, 76px);
  line-height: .95;
  letter-spacing: -.03em;
}
.intro-demo { width: 100%; margin: 34px 0 0; }
.intro-demo .face { min-height: 132px; }
.intro-demo .twin { font-size: clamp(36px, 9.5vw, 48px); }
.hook {
  margin-top: 34px;
  display: grid;
  justify-items: center;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}
.intro .play { max-width: 340px; margin-top: 28px; }
.intro-date {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 700;
  color: color-mix(in oklab, var(--ink) 78%, var(--deep));
}
@media (prefers-reduced-motion: no-preference) {
  .intro > * { animation: lift .6s var(--ease-out) backwards; }
  .intro > :nth-child(2) { animation-delay: .05s; }
  .intro > :nth-child(3) { animation-delay: .1s; }
  .intro > :nth-child(n + 4) { animation-delay: .2s; }
}
@media (min-width: 720px) {
  .intro { padding-top: 6vh; }
  .intro-demo { max-width: 560px; }
}
.hook mark {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 18px;
  background: var(--deep);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 90%;
  font-size: 1.12em;
  letter-spacing: -.01em;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%, 9px 50%);
  transform: rotate(-1.5deg);
}
.intro .ini {
  color: var(--deep);
  text-decoration: underline;
  text-decoration-thickness: .1em;
  text-underline-offset: .1em;
}

/* Inline answer feedback: sits between the input and the Twist it button */
.answer-form .feedback { min-height: 0; margin: 0; text-align: left; font-size: 18px; }
.answer-form .feedback:empty { display: none; }
.answer-form .feedback.wrong { padding: 10px 14px; border-radius: 12px; background: color-mix(in oklab, #a3241a 10%, var(--paper)); }
.answer-form .tried { justify-content: flex-start; margin: 0; }
.answer-form .tried li { background: color-mix(in oklab, var(--ink) 6%, var(--paper)); }
@media (prefers-reduced-motion: no-preference) {
  .answer-form .feedback.wrong { animation: lift .35s var(--ease-out); }
}

/* Results rows: outcome mark and difficulty beside each ribbon */
.row { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 8px; }
.row-mark { display: grid; justify-items: center; gap: 4px; }
.row-mark svg {
  width: 36px; height: 36px; padding: 7px; border-radius: 50%;
  fill: none; stroke: var(--paper); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  background: var(--deep);
}
.row-mark.creative svg { fill: var(--ink); stroke: none; background: var(--gold); padding: 6px; }
.row-mark.wrong svg { background: color-mix(in oklab, var(--deep) 30%, #8a8596); }
.row-level { font-size: 15px; font-weight: 700; text-transform: capitalize; color: color-mix(in oklab, var(--ink) 78%, var(--deep)); }
@keyframes pop { from { transform: scale(0); } }
.results h1 { font-size: clamp(30px, 8vw, 46px); }
.share-box { margin-top: 20px; padding: 18px 18px 16px; }
.share-box h2 { font-size: 22px; }
.share { margin-top: 10px; padding: 10px 14px; font-size: 16px; line-height: 1.5; }
.share-actions .primary, .share-actions .secondary { min-height: 56px; }
.legend { margin-top: 10px; }

.policy-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-top: 12px; }
.policy-links a { color: var(--deep); padding-block: 10px; text-underline-offset: 3px; }
