/* The invitation shares the school's typography and can appear on its own on the homepage. */
.theory-invite { background: #1d1713; color: #fff7ea; overflow: hidden; }
.theory-invite .over, .theory-invite h2 em { color: #ff846c; }
.theory-invite .dash, .theory-stage .dash { background: #ff846c; }
.theory-invite-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: clamp(1rem,5vw,6rem); }
.theory-invite-copy { max-width: 40rem; margin: 1rem 0 1.5rem; color: #e5dacf; }
.theory-record { width: clamp(9rem,17vw,15.5rem); aspect-ratio: 1; border-radius: 50%; display: grid; align-content: center; justify-items: center; color: #231710; background: radial-gradient(circle, #f1765b 0 38%, transparent 38.5%),repeating-radial-gradient(circle closest-side,#43382d 0 1px,#211a17 2px 5px); border: 1px solid #5f4c3f; transform: rotate(8deg); }
.theory-record span { font: 800 clamp(2.3rem,5vw,4.8rem)/.93 var(--display); }
.theory-record small { font: 700 .66rem/1.3 var(--body); letter-spacing: .08em; }
.theory-page { background: radial-gradient(ellipse at 85% 3%,#4b2119 0,transparent 40%),#171310; color: #f9f3e9; }
.theory-stage { max-width: 62rem; padding-block: clamp(2rem,5.6vw,5rem) clamp(3.5rem,8vw,7rem); }
.theory-stage [hidden] { display: none !important; }
.theory-stage .over { color: #ff957f; }
.theory-top { margin-bottom: clamp(1.3rem,3vw,2.3rem); }
.theory-stage h1 { margin: .8rem 0 .7rem; font: 800 clamp(3.6rem,8vw,7.8rem)/.91 var(--display); text-transform: uppercase; letter-spacing: -.025em; }
.theory-stage h1 em { display: inline; margin: 0; font: italic 400 1.02em/.95 var(--serif); text-transform: none; color: #ff856d; letter-spacing: -.04em; }
.theory-lead { max-width: 39rem; color: #eee1d4; }
.theory-stage[data-playing="true"] { padding-top: clamp(1.2rem,3vw,2.5rem); }
.theory-stage[data-playing="true"] .theory-top { margin-bottom: 1rem; }
.theory-stage[data-playing="true"] h1 { font-size: clamp(2.1rem,4.4vw,3.4rem); margin-bottom: 0; }
.theory-stage[data-playing="true"] .theory-lead { display: none; }
.theory-frame { background: #faf6ed; color: #211c18; border-radius: .55rem; border: 1px solid #deceb8; padding: clamp(1.1rem,4vw,2.65rem); box-shadow: 0 18px 48px #0003; }
.theory-frame h2 { margin: .28rem 0 .85rem; font: 800 clamp(1.8rem,4.2vw,3.2rem)/1.05 var(--display); text-transform: none; overflow-wrap: anywhere; letter-spacing: -.01em; }
.theory-frame p { line-height: 1.52; }
.theory-frame .theory-copy { max-width: 65ch; color: #524940; }
.theory-frame form { margin: 0; }
.theory-stage fieldset { margin: 1rem 0; padding: 0; min-width: 0; border: 0; }
.theory-stage legend { margin-bottom: .55rem; font-weight: 700; }
.theory-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.theory-mode { display: flex; gap: .65rem; align-items: flex-start; padding: 1rem; border: 1px solid #b8ab9b; border-radius: .35rem; cursor: pointer; background: #fffdf8; }
.theory-mode:has(input:checked) { border-color: #a32b1a; box-shadow: inset 0 0 0 1px #a32b1a; background: #ffefe4; }
.theory-mode input { flex-shrink: 0; accent-color: #a32b1a; margin-top: .3rem; width: 1.15rem; height: 1.15rem; }
.theory-mode strong,.theory-mode small { display: block; }
.theory-mode strong { font-weight: 750; }
.theory-mode small { color: #554a42; font-size: .92rem; margin-top: .25rem; line-height: 1.4; }
.theory-phone { margin: .85rem 0 1.15rem; }
.theory-stage label:not(.theory-mode) { display: block; font-weight: 650; }
.theory-stage input[type=tel],.theory-stage input[type=text] { display: block; width: min(100%,23rem); margin: .35rem 0 .3rem; padding: .68rem .85rem; background: white; border: 1px solid #8c7968; border-radius: .3rem; color: #251a14; font: inherit; }
.theory-note { font-size: .89rem; color: #584c41; }
.theory-stage .btn, .theory-secondary, .theory-answer { cursor: pointer; }
.theory-stage button:disabled { cursor: default; opacity: .69; }
.theory-status { padding-top: .7rem; color: #ffddbc; font-size: .94rem; }
.theory-status:empty { display:none; }
.theory-meta { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.4rem 1rem; font-size:.88rem; font-weight:700; color:#69392c; }
.theory-track,.theory-timer { position:relative; height:.45rem; border-radius:1rem; overflow:hidden; background:#e6d7c5; margin:.6rem 0 1.2rem; }
.theory-track span,.theory-timer span { height:100%; display:block; background:#ac3220; transform-origin:left center; }
.theory-timer { margin:.65rem 0 .75rem; height:.42rem; }
.theory-timer span { background:#bb3925; }
.theory-answers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; }
.theory-answer { display:flex; align-items:center; gap:.7rem; min-height:3.65rem; padding:.65rem .75rem; text-align:left; font:600 .99rem/1.3 var(--body); border-radius:.36rem; border:1px solid #b3a595; background:#fffdf8; color:#231a15; }
.theory-answer:focus-visible,.theory-answer:hover { border-color:#aa301e; background:#ffebdf; }
.theory-answer .key { flex:none; width:1.5rem; height:1.5rem; display:grid; place-items:center; font-size:.81rem; font-weight:750; border-radius:50%; background:#eeded0; color:#503529; }
.theory-actions { display:flex; gap:.7rem; align-items:center; flex-wrap:wrap; margin-top:1.2rem; }
.theory-secondary { display:inline-flex; align-items:center; justify-content:center; min-height:2.9rem; padding:.55rem 1rem; border:1px solid #ad9d8c; border-radius:.35rem; font:650 .96rem/1.3 var(--body); color:#3f2b20; background:#fffdf8; }
.theory-secondary:hover { background:#f2e7da; }
.theory-score { display:flex; gap:.6rem; align-items:baseline; margin: .45rem 0; font:800 clamp(4rem,11vw,8rem)/1 var(--display); color:#a82e20; letter-spacing:-.035em; }
.theory-score small { font:400 .52em/1 var(--serif); color:#78624b; }
.theory-prize { border-top:1px solid #ccbaa7; margin-top:1.2rem; padding-top:1rem; }
.theory-prize h3 { font:800 1.6rem/1.1 var(--display); margin-bottom:.6rem; }
.theory-code { display:block; max-width:max-content; margin:.65rem 0; padding:.48rem .75rem; overflow-wrap:anywhere; background:#eadbca; border-radius:.2rem; font:700 1.05rem/1.4 monospace; user-select:all; }
.theory-verify { border-top:1px solid #766153; color:#f6ecdf; padding-top:1rem; margin-top:1.5rem; }
.theory-verify summary { cursor:pointer; padding:.4rem 0; width:fit-content; }
.theory-verify>p { max-width:55ch; margin:.6rem 0; }
.theory-verify form { display:flex; align-items:flex-end; flex-wrap:wrap; gap:.8rem; padding:.5rem 0; }
.theory-verify form button { margin-bottom:.3rem; }
.theory-fallback a { text-decoration:underline; }
@media(max-width:650px) {
  .theory-modes { grid-template-columns:1fr; }
  .theory-invite-inner { grid-template-columns:1fr; }
  .theory-record { display:none; }
  .theory-stage .btn { white-space:normal; }
}
@media(max-width:520px) {
  .theory-answers { grid-template-columns:1fr; gap:.42rem; }
  .theory-answer { min-height:2.85rem; padding:.5rem .63rem; }
  .theory-frame { padding:1.05rem; }
}
.theory-feedback { border-left: .25rem solid #9d5634; background: #f4e8da; color: #422d21; padding: .8rem 1rem; margin-top: 1.15rem; border-radius: .12rem; overflow-wrap: anywhere; }
.theory-feedback[data-result="correct"] { border-color: #28674f; background: #e7efe4; color: #204435; }
.theory-feedback strong { display:block; }
.theory-feedback p { margin-top: .22rem; }
.theory-last-question { font-style: italic; }
.theory-profile { font-weight: 700; margin-bottom: .45rem; }
