/* The daily lesson (public/js/daily.js): its card on Home and the lesson, full screen, as the mock-up Matt said "do it" to. The
   board's colours (light or dark) from style.css; the buttons press down on their lip like the rest of Home. */
.dl-card { --dl-card: #ffffff; position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 24px; background: var(--dl-card); box-shadow: 0 0 0 2px var(--arc-edge) inset, 0 6px 0 var(--arc-edge); }
body:not(.light) .dl-card { --dl-card: #18181c; }
.dl-card[hidden] { display: none; }
.dl-hi { display: flex; align-items: center; gap: 12px; }
.dl-face { flex: none; width: 60px; height: 60px; } .dl-face svg { width: 100%; height: 100%; display: block; }
.dl-bubble { position: relative; padding: 9px 14px; border-radius: 16px; background: var(--ink); box-shadow: 0 0 0 2px var(--arc-edge) inset; font-size: 14.5px; font-weight: 800; line-height: 1.3; }
.dl-bubble::before { content: ''; position: absolute; left: -6px; top: 50%; width: 11px; height: 11px; background: var(--ink); border-left: 2px solid var(--arc-edge); border-bottom: 2px solid var(--arc-edge); translate: 0 -50%; rotate: 45deg; }
.dl-card h2 { margin: 4px 0 0; display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 900; line-height: 1.15; }
.dl-card p { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--muted); } .dl-card p b { color: var(--text); font-weight: 900; }
.dl-chips { display: flex; flex-wrap: wrap; gap: 8px; } .dl-chips:empty { display: none; }
.dl-chip { padding: 5px 12px; border-radius: 99px; font-size: 13.5px; font-weight: 900; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.dl-card.done h2 { color: #30b158; } .dl-card .dl-ic.ok { width: 28px; height: 28px; padding: 4px; border-radius: 50%; background: #30b158; color: #fff; stroke-width: 3.2; }
.dl-card.wait h2 { color: var(--muted); }
.dl-remind { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border: 0; border-radius: 99px; background: var(--arc); color: var(--muted); font-size: 13px; font-weight: 800; }
.dl-remind .dl-ic { width: 16px; height: 16px; } .dl-remind.on { color: #e06d00; background: color-mix(in srgb, #ff9a3c 16%, transparent); }
.dl-dots { display: flex; gap: 8px; padding: 6px 2px; } .dl-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); animation: dl-dot 1s infinite ease-in-out; } .dl-dots i:nth-child(2) { animation-delay: .15s; } .dl-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dl-dot { 0%, 100% { opacity: .3; translate: 0 0; } 50% { opacity: 1; translate: 0 -4px; } }

.dl-ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dl-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: 18px; padding: 16px 20px 15px; font: 900 18px/1.2 Nunito, system-ui, sans-serif; letter-spacing: .03em; text-transform: uppercase; color: #fff; cursor: pointer; transition: translate .08s, box-shadow .08s, filter .15s; }
.dl-btn.red { background: #ff4646; box-shadow: 0 5px 0 #b3262a; } .dl-btn.green { background: #30b158; box-shadow: 0 5px 0 #1f8a40; }
.dl-btn.ghost { color: #4b82ff; background: var(--dl-card, var(--ink)); box-shadow: 0 0 0 2px var(--arc-edge) inset, 0 4px 0 var(--arc-edge); font-size: 15px; padding: 13px; }
.dl-btn:hover:not(:disabled) { filter: brightness(1.06); } .dl-btn:active:not(:disabled) { translate: 0 4px; box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.dl-btn:disabled { cursor: default; background: var(--arc); color: var(--faint); box-shadow: 0 5px 0 var(--arc-lip); }

/* the lesson, over everything */
html.dl-open, html.dl-open body { overflow: hidden; }
.dl { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; background: var(--ink); color: var(--text); font-family: Nunito, system-ui, sans-serif;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); animation: dl-in .22s ease-out; }
@keyframes dl-in { from { opacity: 0; translate: 0 14px; } }
.dl > * { width: min(100%, 620px); margin-left: auto; margin-right: auto; }
.dl-top { flex: none; display: flex; align-items: center; gap: 14px; padding: 4px 0 18px; }
.dl-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-left: -8px; border: 0; border-radius: 12px; background: none; color: var(--faint); cursor: pointer; }
.dl-close .dl-ic { width: 26px; height: 26px; stroke-width: 2.6; } .dl-close:hover { color: var(--text); background: var(--arc); }
.dl-bar { flex: 1; height: 16px; border-radius: 99px; background: var(--arc); overflow: hidden; }
.dl-bar i { display: block; height: 100%; min-width: 16px; border-radius: 99px; background: #30b158; box-shadow: inset 0 4px 0 -1px #ffffff66; transition: width .45s cubic-bezier(.3, 1.3, .5, 1); }
.dl-streak { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 16px; font-weight: 900; color: #ff9a3c; } .dl-streak .dl-ic { fill: #ff9a3c; stroke: none; } .dl-streak.none { color: var(--faint); } .dl-streak.none .dl-ic { fill: var(--faint); }
.dl-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding-bottom: 12px; }
.dl-tag { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.dl-tag::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.dl-q { margin: 10px 0 22px; font-size: clamp(20px, 5.4vw, 25px); font-weight: 900; line-height: 1.25; }
.dl-opts { display: flex; flex-direction: column; gap: 12px; }
.dl-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-radius: 18px; background: var(--dl-opt, #fff); color: var(--text); box-shadow: 0 0 0 2px var(--arc-edge) inset, 0 4px 0 var(--arc-edge); font: 800 17px/1.3 Nunito, system-ui, sans-serif; cursor: pointer; transition: translate .08s, box-shadow .08s; }
body:not(.light) .dl-opt { --dl-opt: #18181c; }
.dl-opt:active:not(:disabled) { translate: 0 3px; box-shadow: 0 0 0 2px var(--arc-edge) inset, 0 1px 0 var(--arc-edge); }
.dl-k { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; box-shadow: 0 0 0 2px var(--arc-edge) inset; font-size: 14px; font-weight: 900; color: var(--faint); }
.dl-opt.sel { background: color-mix(in srgb, #4b82ff 12%, var(--dl-opt, #fff)); box-shadow: 0 0 0 3px #4b82ff inset, 0 4px 0 #2f5fd0; color: #3b74f0; } .dl-opt.sel .dl-k { box-shadow: 0 0 0 2px #4b82ff inset; color: #4b82ff; }
.dl-opt.right { background: color-mix(in srgb, #30b158 13%, var(--dl-opt, #fff)); box-shadow: 0 0 0 3px #30b158 inset, 0 4px 0 #1f8a40; color: #1e9e4a; } .dl-opt.right .dl-k { box-shadow: 0 0 0 2px #30b158 inset; color: #30b158; }
.dl-opt.wrong { background: color-mix(in srgb, #ff4646 12%, var(--dl-opt, #fff)); box-shadow: 0 0 0 3px #ff4646 inset, 0 4px 0 #b3262a; color: #e02424; } .dl-opt.wrong .dl-k { box-shadow: 0 0 0 2px #ff4646 inset; color: #ff4646; }
.dl-opt:disabled, .dl-tile:disabled { opacity: 1; cursor: default; } .dl-opt.other:disabled { opacity: .55; } /* (style.css dims every disabled button: the marked answers stay bright) */
/* a word bank: the line, its gaps, the tiles */
.dl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; min-height: 64px; padding: 6px 0 18px; border-bottom: 2px solid var(--arc-edge); }
.dl-given { font-size: 18px; font-weight: 800; padding: 0 2px; }
.dl-gap { width: 58px; height: 44px; border-radius: 14px; border: 2px dashed var(--arc-edge); }
.dl-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 26px 0 8px; }
.dl-tile { padding: 9px 15px; border: 0; border-radius: 14px; background: var(--dl-opt, #fff); color: var(--text); box-shadow: 0 0 0 2px var(--arc-edge) inset, 0 4px 0 var(--arc-edge); font: 800 17px/1.25 Nunito, system-ui, sans-serif; cursor: pointer; }
body:not(.light) .dl-tile { --dl-opt: #18181c; }
.dl-tile.used { color: transparent; background: var(--arc); box-shadow: none; cursor: default; }
.dl-line.right .dl-tile { color: #1e9e4a; box-shadow: 0 0 0 2px #30b158 inset, 0 4px 0 #1f8a40; } .dl-line.wrong .dl-tile { color: #e02424; box-shadow: 0 0 0 2px #ff4646 inset, 0 4px 0 #b3262a; }
/* a miss come back at the end (round 42), above its question; the line under a miss saying it will */
.dl-again { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin: 0 0 10px; padding: 5px 12px 5px 9px; border-radius: 99px; font-size: 13px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: #e06d00; background: color-mix(in srgb, #ff9a3c 17%, transparent); }
.dl-again .dl-ic { width: 17px; height: 17px; stroke-width: 2.8; }
.dl-sheet p.dl-later { font-size: 14.5px; opacity: .8; }
/* the foot: Check, or the verdict */
.dl-foot { flex: none; padding: 14px 0 max(22px, env(safe-area-inset-bottom)); }
.dl-sheet { flex: none; width: auto; margin: 0 calc(-1 * max(18px, env(safe-area-inset-left))) 0; padding: 18px max(18px, env(safe-area-inset-left)) max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; animation: dl-up .2s ease-out; }
@keyframes dl-up { from { translate: 0 30px; opacity: 0; } }
.dl-sheet > * { width: min(100%, 620px); margin-left: auto; margin-right: auto; }
.dl-sheet.good { background: color-mix(in srgb, #30b158 15%, var(--ink)); } .dl-sheet.bad { background: color-mix(in srgb, #ff4646 14%, var(--ink)); }
.dl-sheet h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; }
.dl-sheet.good h3 { color: #1e9e4a; } .dl-sheet.bad h3 { color: #e02424; }
.dl-sheet h3 em { margin-left: auto; font-style: normal; font-size: 16px; color: #e0a100; }
.dl-sheet .mark { width: 30px; height: 30px; padding: 5px; border-radius: 50%; color: #fff; stroke-width: 3.2; } .dl-sheet.good .mark { background: #30b158; } .dl-sheet.bad .mark { background: #ff4646; }
.dl-sheet p { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; } .dl-sheet.good p { color: #1b7f3d; } .dl-sheet.bad p { color: #b42020; } .dl-sheet p b { font-weight: 900; }
body:not(.light) .dl-sheet.good p { color: #8fe0a8; } body:not(.light) .dl-sheet.bad p { color: #ffaaaa; }
.dl-board { align-self: flex-start; width: auto !important; margin: 2px 0 6px !important; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 14px; background: var(--dl-opt, #fff); color: #e02424; font: 900 15.5px/1.2 Nunito, system-ui, sans-serif; box-shadow: 0 3px 0 #f2b9b9; cursor: pointer; }
body:not(.light) .dl-board { --dl-opt: #18181c; box-shadow: 0 3px 0 #5a2525; color: #ff8080; }
/* the end (round 42, Matt: "it looks sooooo bad ... higher quality toon animations like duolingo"): the prof's party. He comes up,
   squashes, jumps, his eyes go from bored to beaming, his cap flies off and lands back, his glasses bounce as he lands; rays turn
   behind him, confetti (daily.js, a canvas over the lesson); the title pops, the numbers pop in one by one and count up. All in the
   SVG's own units (its viewBox), the way WebKit moves parts of an SVG. */
.dl > .dl-confetti { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 4; pointer-events: none; }
.dl-body.done { align-items: center; text-align: center; justify-content: center; overflow-x: hidden; }
.dl-party { position: relative; display: grid; place-items: center; width: 220px; height: 196px; margin-bottom: 2px; }
.dl-rays { position: absolute; left: 50%; top: 48%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, #ffc83d 36%, transparent) 0deg 10deg, transparent 10deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 28%, transparent 76%); mask: radial-gradient(closest-side, #000 28%, transparent 76%);
  opacity: 0; animation: dl-rays-in .7s ease-out .35s forwards, dl-spin 24s linear infinite; }
@keyframes dl-rays-in { to { opacity: 1; } }
@keyframes dl-spin { to { rotate: 1turn; } }
.dl-prof { position: relative; width: 166px; height: auto; overflow: visible; }
.dl-prof g, .dl-prof ellipse { transform-box: view-box; }
.dl-prof .p-body { transform-origin: 256px 428px; animation: dl-jump 1.2s cubic-bezier(.3, .6, .35, 1) both, dl-idle 2.8s ease-in-out 1.5s infinite; }
@keyframes dl-jump {
  0% { transform: translateY(150px) scale(1.2, .75); opacity: 0; }
  12% { transform: translateY(0) scale(1.15, .84); opacity: 1; }
  30% { transform: translateY(-120px) scale(.9, 1.12); }
  46% { transform: translateY(-138px) scale(1, 1); }
  62% { transform: translateY(0) scale(1.15, .85); }
  74% { transform: translateY(-24px) scale(.96, 1.05); }
  87% { transform: translateY(0) scale(1.04, .96); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes dl-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.dl-prof .p-shadow { transform-origin: 256px 462px; opacity: .13; animation: dl-shadow 1.2s cubic-bezier(.3, .6, .35, 1) both, dl-shadow-idle 2.8s ease-in-out 1.5s infinite; }
@keyframes dl-shadow { 0% { opacity: 0; transform: scale(.5); } 12% { opacity: .15; transform: scale(1.12); } 30% { opacity: .07; transform: scale(.7); } 46% { opacity: .05; transform: scale(.62); } 62% { opacity: .17; transform: scale(1.14); } 87%, 100% { opacity: .13; transform: scale(1); } }
@keyframes dl-shadow-idle { 50% { opacity: .1; transform: scale(.9); } }
.dl-prof .p-bored { animation: dl-gone .1s linear .24s both; }
@keyframes dl-gone { to { opacity: 0; } }
.dl-prof .p-happy { opacity: 0; transform-origin: 256px 290px; animation: dl-beam .38s cubic-bezier(.2, 1.6, .4, 1) .26s both; }
@keyframes dl-beam { from { opacity: 0; transform: scale(.7, .2); } 60% { opacity: 1; transform: scale(1.06, 1.12); } to { opacity: 1; transform: none; } }
.dl-prof .p-glasses { transform-origin: 256px 234px; animation: dl-glasses 1.2s ease-out both; }
@keyframes dl-glasses { 0%, 58% { transform: none; } 66% { transform: translateY(16px) scale(1.04, .92); } 78% { transform: translateY(-7px); } 90%, 100% { transform: none; } }
.dl-prof .p-cap { transform-origin: 256px 96px; animation: dl-cap 1.3s cubic-bezier(.3, .6, .4, 1) both; }
@keyframes dl-cap {
  0%, 24% { transform: none; }
  48% { transform: translateY(-210px) rotate(-190deg); }
  66% { transform: translateY(-150px) rotate(-320deg); }
  82% { transform: translateY(8px) rotate(-372deg); }
  91% { transform: translateY(-8px) rotate(-366deg); }
  100% { transform: translateY(0) rotate(-368deg); }
}
.dl-title { margin: 0 0 20px; font: 900 34px/1.1 Nunito, system-ui, sans-serif; letter-spacing: -.01em; color: #ff8a1f;
  background: linear-gradient(180deg, #ffb83f 10%, #ff6a1f 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: dl-title .55s cubic-bezier(.2, 1.6, .4, 1) .5s both; }
@keyframes dl-title { from { opacity: 0; transform: scale(.4) rotate(-5deg); } }
.dl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(100%, 420px); }
.dl-st { border-radius: 16px; background: var(--c); padding: 3px; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 70%, #000); animation: dl-card .45s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(.82s + var(--i) * .14s); }
@keyframes dl-card { from { opacity: 0; transform: translateY(20px) scale(.7); } }
.dl-st b { display: block; padding: 4px 0 5px; font-size: 12.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.dl-st span { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 12px 4px; border-radius: 13px; background: var(--ink); font-size: 18px; font-weight: 900; color: color-mix(in srgb, var(--c) 80%, var(--text)); }
.dl-st i { font-style: normal; font-variant-numeric: tabular-nums; } .dl-st u { text-decoration: none; }
.dl-st .dl-ic { width: 20px; height: 20px; } .dl-st .dl-ic.y { fill: #ffc83d; stroke: none; }
.dl-streakup { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 4px; font-size: 21px; color: #ff9a3c; animation: dl-card .45s cubic-bezier(.2, 1.5, .4, 1) 1.3s both; }
.dl-streakup .dl-ic { width: 30px; height: 30px; fill: #ff9a3c; stroke: none; transform-origin: 50% 90%; animation: dl-flicker 1.1s ease-in-out 1.7s infinite; } .dl-streakup b { font-weight: 900; }
@keyframes dl-flicker { 50% { transform: scale(1.1, 1.16) rotate(-4deg); } }
.dl-soft { margin: 8px 0 0; max-width: 340px; font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--muted); animation: dl-fade .5s ease-out 1.5s both; }
@keyframes dl-fade { from { opacity: 0; transform: translateY(6px); } }
.dl.end .dl-foot { animation: dl-fade .4s ease-out 1s both; }
/* still (reduced motion): the beaming prof standing, everything there at once */
.dl.still .dl-prof .p-bored { display: none; } .dl.still .dl-prof .p-happy { opacity: 1; } .dl.still .dl-rays { opacity: .6; }
.dl.still .dl-prof *, .dl.still .dl-rays, .dl.still .dl-title, .dl.still .dl-st, .dl.still .dl-streakup, .dl.still .dl-streakup .dl-ic, .dl.still .dl-soft, .dl.still .dl-foot { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .dl, .dl-sheet, .dl-dots i { animation: none; } }
@media (max-height: 640px) { .dl-q { margin: 6px 0 14px; } .dl-opts { gap: 9px; } .dl-opt { padding: 11px 14px; font-size: 16px; }
  .dl-party { height: 150px; } .dl-prof { width: 124px; } .dl-rays { width: 230px; height: 230px; margin: -115px 0 0 -115px; } .dl-title { font-size: 29px; margin-bottom: 14px; } .dl-streakup { margin-top: 14px; } }
