:root {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #163a36;
    background: #f6f4eb;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #e59b63; outline-offset: 3px; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header, .site-footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.site-header { padding: 24px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.16rem; letter-spacing: -.04em; }
.brand-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #163a36; color: #f7f5ec; font-size: 1.55rem; line-height: 1; }
.header-note { color: #648078; font-size: .88rem; font-weight: 600; }
main { width: 100%; flex: 1; display: grid; place-items: center; padding: 18px 20px 64px; }
.intro-panel, .practice-panel, .summary-panel { width: min(100%, 780px); }
.intro-panel { position: relative; padding: 32px 0 16px; }
.eyebrow { color: #b7684d; display: inline-flex; align-items: center; gap: 9px; font-size: .76rem; font-weight: 700; letter-spacing: .16em; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: #cf7a57; display: inline-block; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.045em; }
.intro-panel h1 { font-size: clamp(3.2rem, 8vw, 5.5rem); line-height: 1.04; margin: 24px 0 20px; }
.intro-panel h1 em { color: #cc7651; font-style: normal; }
.lead { color: #526f66; font-size: clamp(1.05rem, 2.4vw, 1.2rem); line-height: 1.6; max-width: 580px; }
.intro-illustration { display: flex; gap: 12px; margin: 34px 0 42px; transform: rotate(-2deg); transform-origin: left center; }
.math-tile { background: #fffefa; border: 1px solid #e6e5d9; box-shadow: 0 8px 0 #e9e6d9; border-radius: 18px; min-width: 78px; height: 78px; display: grid; place-items: center; padding: 0 20px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.9rem; font-weight: 700; }
.tile-two { background: #dcebe4; color: #23705e; }
.tile-three { background: #f7dcb8; color: #a85d3b; }
.focus-picker { padding: 30px; background: #fffefa; border: 1px solid #e8e8df; border-radius: 26px; box-shadow: 0 14px 50px rgba(42,72,58,.05); }
.focus-picker h2 { font-size: 1.6rem; margin-bottom: 5px; }
.focus-picker p { color: #698077; margin-bottom: 22px; }
.focus-options { display: flex; flex-wrap: wrap; gap: 9px; }
.focus-option { background: #f5f6ef; color: #48665b; border: 1px solid #e5ebe2; border-radius: 999px; padding: 9px 15px; font-weight: 700; font-size: .88rem; }
.focus-option:hover { background: #e6eee7; }
.focus-option.selected { background: #1d5349; border-color: #1d5349; color: white; }
.primary-button { border: 0; background: #1d5349; color: white; text-decoration: none; display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 15px; padding: 16px 21px; font-weight: 700; font-size: 1rem; box-shadow: 0 7px 0 #123d36; transition: transform .15s, box-shadow .15s; }
.primary-button:hover { transform: translateY(2px); box-shadow: 0 5px 0 #123d36; }
.primary-button span { font-size: 1.3rem; line-height: 1; }
.start-button { width: 100%; margin-top: 26px; padding: 19px 24px; }
.privacy-note { color: #5e756b; font-size: .78rem; line-height: 1.5; margin: 25px 0 0; }
.site-footer { color: #60766b; font-size: .75rem; padding: 28px 0; border-top: 1px solid #e3e6da; }

.practice-panel { padding: 20px 0 42px; }
.practice-topline, .progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-button { border: 0; background: transparent; color: #6b8077; text-decoration: underline; text-underline-offset: 4px; font-size: .85rem; }
.text-button:hover { color: #163a36; }
.progress-heading { margin-top: 42px; margin-bottom: 12px; font-size: .86rem; color: #638075; font-weight: 600; }
.progress-track { width: 100%; height: 10px; background: #e1e9df; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: #79ae87; border-radius: inherit; transition: width .3s; }
.question-card { text-align: center; margin-top: 26px; padding: 55px 24px 46px; background: #fffefa; border: 1px solid #e8e9de; border-radius: 28px; box-shadow: 0 18px 55px rgba(36,69,56,.06); }
.question-label { color: #ae765b; font-size: .75rem; font-weight: 700; letter-spacing: .2em; }
.expression { display: flex; align-items: baseline; justify-content: center; flex-wrap: nowrap; gap: clamp(8px, 2.8vw, 24px); font-size: clamp(3.5rem, 11vw, 7rem); line-height: 1.15; margin: 32px 0 18px; white-space: nowrap; }
.expression .multiply, .expression .equals { color: #b9c7b8; font-size: .7em; }
.expression .question-mark { color: #cf7a57; }
.question-card p { color: #769087; margin-bottom: 0; }
.answer-form { margin-top: 30px; }
.answer-form label { display: block; font-weight: 700; margin-bottom: 12px; }
.answer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.answer-row input { min-width: 0; width: 100%; border: 2px solid #d9e5d9; background: #fffefa; color: #163a36; border-radius: 15px; padding: 12px 18px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.8rem; }
.answer-row input:focus { border-color: #67a47f; }
.input-help { color: #82948b; font-size: .84rem; margin: 10px 0 0; }
.validation-message { color: #aa463c; margin: 10px 0 0; }
.feedback { display: flex; gap: 17px; padding: 23px; border-radius: 20px; margin-top: 23px; }
.feedback-success { background: #dfeee1; color: #20533e; }
.feedback-reflect { background: #f9ead8; color: #744f3b; }
.feedback-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.7); font-weight: 700; }
.feedback strong { display: block; margin-bottom: 6px; }
.feedback p { margin: 0; line-height: 1.45; }
.feedback .strategy-hint { margin-top: 12px; font-weight: 700; }
.next-button { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding: 18px 20px; background: transparent; color: #1d5349; border: 2px solid #1d5349; border-radius: 15px; font-weight: 700; }
.next-button:hover { background: #e6eee7; }
.next-button span { font-size: 1.3rem; }

.summary-panel { padding: 50px 0; }
.summary-star { margin-top: 38px; width: 94px; height: 94px; border-radius: 25px; background: #f7dcb8; display: grid; place-items: center; color: #b96343; font-size: 4rem; transform: rotate(-9deg); }
.summary-panel h1 { font-size: clamp(3rem, 7vw, 5rem); margin: 30px 0 14px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 38px 0 22px; }
.summary-stat { min-height: 150px; background: #fffefa; border: 1px solid #e8e9df; border-radius: 20px; padding: 23px; display: flex; flex-direction: column; justify-content: space-between; }
.summary-stat strong { font-family: Georgia, 'Times New Roman', serif; font-size: 2.5rem; line-height: 1; }
.summary-stat strong span { color: #a0b1a5; }
.summary-stat > span { color: #72887b; font-size: .88rem; line-height: 1.25; }
.encouragement { display: flex; gap: 15px; padding: 23px; background: #e4eee5; border-radius: 19px; margin-bottom: 31px; }
.encouragement > span { color: #41866a; font-size: 1.4rem; }
.encouragement p { margin: 0; line-height: 1.5; color: #406b56; }

@media (max-width: 620px) {
    .site-header, .site-footer { width: calc(100% - 32px); }
    .header-note, .site-footer span:last-child { display: none; }
    main { padding: 6px 16px 48px; place-items: start center; }
    .intro-panel { padding-top: 26px; }
    .intro-panel h1 { margin-top: 20px; }
    .intro-illustration { margin: 32px 0 34px; }
    .math-tile { min-width: 62px; height: 62px; border-radius: 14px; font-size: 1.45rem; padding: 0 15px; }
    .focus-picker { padding: 24px 19px; }
    .focus-option { padding: 9px 13px; }
    .practice-panel { padding-top: 21px; }
    .progress-heading { margin-top: 38px; }
    .question-card { padding: 48px 12px 38px; }
    .expression { font-size: clamp(2.6rem, 9vw, 4.5rem); gap: 6px; }
    .answer-row { grid-template-columns: 1fr; }
    .answer-row .primary-button { width: 100%; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .summary-stat:last-child { grid-column: 1 / -1; min-height: 110px; }
}

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 15px; background: #7f2828; color: white; z-index: 1000; }
#blazor-error-ui .dismiss { position: absolute; right: 12px; cursor: pointer; }
