:root {
  color-scheme: light;
  font: 100%/1.55 "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  --audience-color: var(--mint);
  --accent-edge: #465b4c;
  --ribbon-one: var(--sky);
  --ribbon-two: var(--apricot);
  --ribbon-three: var(--sage);
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
}
body[data-audience="adults"] {
  --audience-color: var(--sky);
  --accent-edge: #385e68;
  --ribbon-one: var(--mint);
  --ribbon-two: var(--peach);
}
body[data-audience="kids"] {
  --audience-color: var(--peach);
  --accent-edge: #794d3f;
  --ribbon-one: var(--apricot);
  --ribbon-two: var(--sky);
}
button, input, a { font: inherit; touch-action: manipulation; }
button, a { text-decoration: none; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:is(button, a, input):focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

.masthead, .shell { width: min(1020px, calc(100% - 64px)); margin-inline: auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: clamp(16px, 3.5vh, 34px); }
.brand-logos, .brand-name { display: flex; align-items: center; }
.brand-logos { gap: 12px; }
.brand-logos img { display: block; object-fit: contain; }
.brand-logos .moh-logo { width: clamp(112px, 19vw, 164px); height: auto; }
.brand-logos .kcdc-logo { max-width: 90px; height: 39px; }
.logo-divider { width: 1px; height: 30px; background: var(--rule); }
.brand-name { gap: 9px; font-weight: 700; font-size: .96rem; }
.brand-dot { width: 12px; height: 18px; border: 1.5px solid var(--ink); border-radius: 8px; transform: rotate(32deg); background: linear-gradient(0deg, var(--sky) 49%, var(--paper) 50%); }

.shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 36px; }
.feature, .work-card { border-radius: 30px; }
.feature { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; background: var(--audience-color); }
.feature-copy { position: relative; z-index: 1; padding: clamp(18px, 2.5vw, 32px); }
.audience {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 4px 13px 5px; border-radius: 99px; border: 1px solid var(--accent-edge);
  color: var(--ink); font-weight: 650; font-size: .9rem;
}
.audience::before { content: ""; width: .58em; height: .58em; border-radius: 50%; background: var(--accent-edge); }
.audience:empty { display: none; }
.feature h1 { margin-block: .3em .14em; font-size: clamp(1.8rem, 2.9vw, 2.65rem); line-height: 1.16; letter-spacing: -.03em; font-weight: 730; overflow-wrap: anywhere; }
.feature p { color: var(--ink); font-size: clamp(1rem, 1.5vw, 1.13rem); line-height: 1.55; max-width: 32ch; }
.scene { position: relative; display: grid; place-items: end center; align-self: stretch; overflow: hidden; min-width: 0; padding: 20px 5px 12px; direction: ltr; }
.ribbons { position: absolute; inset: 25% -4% -30%; transform: rotate(-7deg); pointer-events: none; }
.ribbons i {
  position: absolute; width: 88%; height: 55%;
  border-radius: 999px; box-shadow: 0 -2px 0 rgb(255 255 255 / 20%), 0 5px 13px rgb(44 53 48 / 10%);
}
.ribbons i:nth-child(1) { top: 4%; left: 1%; background: var(--ribbon-one); }
.ribbons i:nth-child(2) { top: 32%; right: -3%; background: var(--ribbon-two); }
.ribbons i:nth-child(3) { top: 61%; width: 104%; left: -9%; background: var(--ribbon-three); }
.family-art { position: relative; display: block; width: 100%; height: auto; }
.playing .feature h1 { font-size: clamp(1.4rem, 2.2vw, 2rem); margin-bottom: 0; }
.playing .feature p { display: none; }
.playing .scene { place-items: center; padding-block: 8px; }
.playing .family-art { max-width: 410px; }

.work-card {
  min-width: 0; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 4vw, 58px); background: #fff; border: 1px solid var(--sage);
  box-shadow: 0 10px 28px rgb(44 53 48 / 5%);
}
#view { width: min(100%, 740px); min-width: 0; margin-inline: auto; }
.work-card h2 { font-size: clamp(1.65rem, 2.7vw, 2.5rem); line-height: 1.26; letter-spacing: -.024em; font-weight: 720; overflow-wrap: anywhere; }
.work-card h2:focus { outline: none; }
.sub, .bilingual-sub { color: var(--muted); margin-top: 8px; font-size: 1rem; line-height: 1.6; }
.bilingual-sub { text-align: start; font-weight: 500; }

.langs, .choices, .name-form { margin-top: 24px; }
.langs, .choices { display: grid; gap: 10px; }
.langs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.language, .pick-track, .answer { min-width: 0; min-height: 55px; border-radius: 15px; transition: background-color .14s, border-color .14s, box-shadow .14s; }
.language, .pick-track {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 14px; border: 1.5px solid var(--accent-edge); background: var(--audience-color);
  text-align: center; color: var(--ink); font-weight: 650;
}
.pick-track[href="/adults"] { background: var(--sky); border-color: #61818b; }
.pick-track[href="/kids"] { background: var(--peach); border-color: #977266; }
.language:hover, .pick-track:hover { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pick-track small { font-size: .93rem; font-weight: 550; }
.field-label { display: block; font-weight: 650; margin-bottom: 7px; }
.name-field {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--slate);
  border-radius: 12px; color: var(--ink); background: var(--paper);
}
.name-field::placeholder { color: var(--muted); opacity: 1; }
.name-field[aria-invalid=true] { border-color: #874c3c; }
.field-error { color: #794332; margin-top: 6px; font-weight: 600; }
.btn-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.primary, .secondary { min-height: 48px; padding: 12px 18px; border: 1px solid transparent; border-radius: 13px; font-weight: 690; line-height: 1.4; text-align: center; }
.primary { color: #fff; background: var(--slate); }
.primary:hover:not(:disabled) { background: var(--muted); }
.primary:disabled { color: var(--muted); background: var(--sage); }
.secondary { color: var(--ink); border-color: var(--rule); background: var(--paper); }
.secondary:hover { border-color: var(--slate); background: var(--mint); }

.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .95rem; font-weight: 650; color: var(--accent-edge); }
.meter { width: 100%; height: 7px; overflow: hidden; border-radius: 99px; background: var(--audience-color); margin-block: 10px 22px; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent-edge); }
.question-heading { font-size: clamp(1.38rem, 2.3vw, 1.9rem) !important; }
.choices { border: 0; padding: 0; margin-inline: 0; margin-bottom: 0; }
.answer {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border: 1.5px solid var(--rule); color: var(--ink); background: var(--paper);
  font-weight: 535; line-height: 1.48; cursor: pointer;
}
.answer:not(.locked):hover { border-color: var(--accent-edge); }
.answer input { width: 20px; height: 20px; accent-color: var(--accent-edge); flex: 0 0 auto; margin: 0; }
.answer:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.answer.chosen { border-color: var(--accent-edge); background: var(--audience-color); box-shadow: inset 0 0 0 1px var(--accent-edge); }
.answer.correct-answer { border-color: #506b5b; background: var(--mint); box-shadow: inset 0 0 0 1px #506b5b; }
.answer.wrong-answer { border-color: #874c3c; background: var(--peach); box-shadow: none; }
.answer.locked { cursor: default; }
.answer input:disabled { opacity: .8; }
.feedback { margin-top: 18px; padding: 13px 15px; border-radius: 12px; line-height: 1.55; border-inline-start: 4px solid #506b5b; background: var(--mint); color: var(--ink); }
.feedback.wrong { border-color: #874c3c; background: var(--apricot); }
.feedback strong { display: block; }
.feedback p { margin-top: 3px; }
.result-score { font-variant-numeric: tabular-nums; direction: ltr; display: inline-flex; align-items: baseline; gap: 7px; padding: 8px 16px; margin: 18px 0 4px; border-radius: 15px; background: var(--audience-color); color: var(--ink); }
.result-score b { font-size: 2.3rem; line-height: 1.25; }
.result-score span { font-size: 1.15rem; font-weight: 650; }
.noscript { padding: 20px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[dir=rtl] :is(.feature h1, .work-card h2) { letter-spacing: normal; line-height: 1.48; }

@media (max-width: 760px) {
  .masthead, .shell { width: min(540px, calc(100% - 28px)); }
  .masthead { padding-block: 12px; }
  .brand-logos { gap: 8px; }
  .brand-logos .kcdc-logo { height: 32px; }
  .logo-divider { height: 24px; }
  .brand-name { font-size: .88rem; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 13px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .feature, .work-card { border-radius: 21px; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-copy { padding: 13px 17px 2px; }
  .feature h1 { font-size: clamp(1.5rem, 6vw, 2.05rem); line-height: 1.22; }
  .feature p { max-width: none; font-size: .94rem; line-height: 1.45; }
  .audience { font-size: .8rem; padding: 2px 9px; }
  .scene { place-items: center; padding: 3px 7px 5px; }
  .ribbons { inset: 25% -6% -30%; }
  .family-art { max-width: 430px; }
  .work-card { padding: 24px 18px; }
  .work-card h2 { font-size: 1.65rem; }
  .langs, .name-form, .choices { margin-top: 18px; }
  .meter { margin-bottom: 17px; }
  .btn-row { margin-top: 17px; }
  .playing .feature-copy { padding: 8px 15px 2px; }
  .playing .feature h1 { font-size: 1.05rem; margin: 0; line-height: 1.3; }
  .playing .audience { font-size: .74rem; margin-bottom: 2px; }
  .playing .scene { padding: 0 6px 3px; }
  .playing .family-art { width: min(100%, 290px); }
  .playing .work-card { padding-block: 21px; }
  .question-heading { font-size: 1.37rem !important; }
  .answer { padding: 12px; min-height: 51px; }
  .primary, .secondary { flex: 1 1 auto; }
}
@media (max-width: 350px) {
  .masthead, .shell { width: calc(100% - 18px); }
  .brand-name { font-size: .79rem; }
  .brand-dot { display: none; }
  .feature-copy, .work-card { padding-inline: 13px; }
  .feature p { font-size: .87rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
