:root { color-scheme: light; --bg: #f7f5f0; --panel: #ffffff; --field: #ffffff; --soft: #f1efe9; --track: #ece8df;
        --border: #e3ded3; --text: #22252a; --muted: #6b6f76; --accent: #3b5bdb; --accent-soft: #e7ecff;
        --good: #2f9e44; --good-soft: #e6f6ea; --good-text: #1e6b2f; --bad: #e03131; --bad-soft: #fdecec;
        --bad-border: #f5c2c2; --bad-text: #9b2020; --info-text: #23397f; --warn: #e8590c;
        --note: #fffbea; --note-border: #f2e2a6; --rule: #e8eefc; --radius: 12px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --bg: #16181d; --panel: #1f2228; --field: #17191e; --soft: #2a2d34;
        --track: #2c3038; --border: #353943; --text: #e6e7ea; --muted: #9aa0aa; --accent: #5c7cfa; --accent-soft: #263056;
        --good: #37b24d; --good-soft: #1b3122; --good-text: #8ce99a; --bad: #fa5252; --bad-soft: #3a2023;
        --bad-border: #6b2c2c; --bad-text: #ffa8a8; --info-text: #bac8ff; --warn: #ff922b;
        --note: #2e2914; --note-border: #5c4f22; --rule: #262c3d; }
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #16181d; --panel: #1f2228; --field: #17191e; --soft: #2a2d34;
        --track: #2c3038; --border: #353943; --text: #e6e7ea; --muted: #9aa0aa; --accent: #5c7cfa; --accent-soft: #263056;
        --good: #37b24d; --good-soft: #1b3122; --good-text: #8ce99a; --bad: #fa5252; --bad-soft: #3a2023;
        --bad-border: #6b2c2c; --bad-text: #ffa8a8; --info-text: #bac8ff; --warn: #ff922b;
        --note: #2e2914; --note-border: #5c4f22; --rule: #262c3d; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; align-items: center; gap: 6px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--border);
         position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
header h1 { font-size: 20px; margin: 0 10px 0 0; }
header h1 a { color: var(--accent); text-decoration: none; }
header h1 a:hover { text-decoration: underline; }
#app-name { color: inherit; }
#app-name:not([href]) { text-decoration: none; }
#course-label:not(:empty)::before { content: "·"; display: inline-block; margin: 0 6px 0 2px; color: var(--muted); }
nav a { color: var(--text); text-decoration: none; padding: 7px 10px; border-radius: 999px; font-weight: 500; }
nav a:hover { background: var(--accent-soft); }
nav a.active { background: var(--accent); color: white; }
.spacer { flex: 1; }
a { color: var(--accent); }
main { max-width: 1440px; margin: 0 auto; padding: 22px 20px 60px; }
.page { display: none; }
.page.active { display: block; }
h2 { font-size: 22px; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 18px 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--border); background: var(--panel); border-radius: 10px; padding: 8px 16px; font-weight: 500; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: white; }
button.good { background: var(--good); border-color: var(--good); color: white; }
button.link { border: none; background: none; color: var(--accent); padding: 4px 6px; }
button.danger { background: var(--bad); border-color: var(--bad); color: white; }
button.danger-outline { border-color: var(--bad-border); color: var(--bad-text); }
button.danger-outline:hover:not(:disabled) { border-color: var(--bad); }
button.link.danger-text { color: var(--bad-text); }
select, input[type=text], input[type=email], input[type=password], input[type=search], textarea { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--field); }
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=search]:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { border: none; border-radius: 0; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--accent); color: white; }
.chip { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--field); white-space: nowrap; }
button.chip { padding: 4px 12px; font-weight: 400; }
button.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.code { font-family: ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar > div { height: 100%; background: var(--good); }
/* A labelled slim bar with an optional line under it: the coach's memory and the daily allowances */
.meter { display: grid; grid-template-columns: auto minmax(60px, 1fr); gap: 2px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.meter .bar { height: 6px; border-radius: 3px; }
.meter-note { grid-column: 1 / -1; color: var(--text); line-height: 1.35; }
.meter.allowance .bar > div { background: var(--accent); }
.meter.full .bar > div, .meter.low .bar > div { background: var(--warn); }
.meter.done .bar > div { background: var(--good); }
.meter.icon { grid-template-columns: auto 56px auto; gap: 6px; }
.meter.icon .meter-icon { font-size: 15px; line-height: 1; }
.meter.icon .meter-note { grid-column: auto; color: var(--warn); font-weight: 600; }
.meter.done .meter-note { color: var(--good-text); }

/* Home */
.goal { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.goal .big { font-size: 34px; font-weight: 700; }
.domain-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; }
.domain-head .dot { width: 14px; height: 14px; border-radius: 50%; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-left: 6px solid var(--c); border-radius: var(--radius); padding: 12px 14px; }
.tile h4 { margin: 2px 0 8px; font-size: 16px; }
.tile .stats { font-size: 13px; color: var(--muted); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-bottom: 8px; }
.tile .actions { display: flex; gap: 4px; }
.tile .actions button { padding: 4px 10px; font-size: 14px; }
#course-bar { align-items: center; padding: 12px 18px; border-color: var(--accent); background: var(--accent-soft); }
#course-bar[hidden] { display: none; }
.goal-line { gap: 4px 10px; }
.goal-line .goal-text { font-weight: 600; }
#goal-bar { padding: 10px 18px; }
#goal-bar[hidden] { display: none; }
.goal .goal-line { flex-basis: 100%; }
.course-tile { --c: var(--border); }
.course-tile.mine { --c: var(--accent); }

/* Learn */
.learn { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.starters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.starters button { font-size: 14px; padding: 4px 10px; font-weight: 400; }
.toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.toc-course { display: flex; gap: 6px; width: 100%; text-align: left; border: none; background: none; padding: 6px 10px 6px 2px; font-weight: 700; font-size: 15px; }
.toc-course:hover { background: var(--accent-soft); }
.toc-course span { width: 1em; flex: none; color: var(--muted); }
.toc-list { margin-bottom: 10px; }
.toc .dname { font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
.toc a { display: block; padding: 4px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; }
.toc a:hover { background: var(--accent-soft); }
.toc a.active { background: var(--accent); color: white; }
.toc-search { position: sticky; top: -18px; margin: -18px -22px 8px; padding: 18px 22px 8px; background: var(--panel); z-index: 1; }
.toc-search > div { position: relative; }
.toc-search input { width: 100%; padding-right: 36px; }
.toc-search input::-webkit-search-cancel-button { display: none; }
.toc-clear { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: none; background: none; padding: 4px 10px; font-size: 18px; line-height: 1; color: var(--muted); }
.toc-clear:hover { color: var(--text); }
.toc .toc-group { font-size: 15px; font-weight: 700; margin: 12px 0 4px; }
.lesson .summary { font-size: 20px; }
.lesson ul { padding-left: 22px; }
.lesson li { margin: 6px 0; }
.example { background: var(--note); border: 1px solid var(--note-border); border-radius: var(--radius); padding: 14px 18px; }
.example ol { padding-left: 22px; }
.watch { background: var(--bad-soft); border: 1px solid var(--bad-border); border-radius: var(--radius); padding: 10px 18px; }

/* Cards */
.flash { max-width: 680px; margin: 0 auto; }
.flash .prompt { font-size: 24px; margin: 8px 0 18px; }
.flash.in-session { max-width: 1000px; }
.pset .icon.first_try { color: var(--good); } .pset .icon.again, .pset .icon.redone { color: var(--warn); }
.pset a[data-jump] { cursor: pointer; }
.pset a.static:not(.active):hover { background: none; }
.pset .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.choices { display: grid; gap: 8px; margin-bottom: 12px; }
.choices button { text-align: left; font-weight: 400; display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.choices button b { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.choices button.picked { border-color: var(--accent); background: var(--accent-soft); }
.choices button.right { border-color: var(--good); background: var(--good-soft); }
.choices button.wrong { border-color: var(--bad); background: var(--bad-soft); }
.answer-box { font-size: 22px; padding: 10px 14px; width: 100%; max-width: 420px; }
.keys { display: flex; gap: 4px; margin: 8px 0; flex-wrap: wrap; }
.keys button { padding: 4px 12px; font-family: ui-monospace, monospace; }
.preview { min-height: 32px; font-size: 20px; color: var(--muted); margin: 4px 0; }
.feedback { border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; }
.feedback.good { background: var(--good-soft); color: var(--good-text); }
.feedback.bad { background: var(--bad-soft); color: var(--bad-text); }
.feedback.info { background: var(--accent-soft); color: var(--info-text); }
.session-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* Practice */
.gen-row { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; flex-wrap: wrap; }
.gen-label { width: 96px; flex: none; color: var(--muted); font-size: 14px; padding-top: 6px; }
#g-allowance { flex: 0 1 300px; align-self: center; margin-left: 8px; }
.std-chips { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.std-chips .group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 15px; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
tr.link { cursor: pointer; }
tr.link:hover td { background: var(--accent-soft); }
.st-solved { color: var(--good); border-color: var(--good); }
.st-attempted { color: var(--warn); border-color: var(--warn); }
.st-revealed { color: var(--muted); }
.st-failed { color: var(--bad); border-color: var(--bad); }
.st-generating { color: var(--accent); border-color: var(--accent); }
.st-reported { color: var(--bad-text); border-color: var(--bad-border); background: var(--bad-soft); margin-left: 4px; }
.solve { max-width: 900px; }
.solve-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.pset { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 14px 12px; }
.pset .count { font-size: 14px; color: var(--muted); margin: 0 6px 6px; }
.pset .bar { margin: 0 6px 10px; }
.pset a { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.35; }
.pset a:hover { background: var(--accent-soft); }
.pset a.active { background: var(--accent); color: white; }
.pset .icon { width: 20px; flex: none; text-align: center; font-weight: 700; color: var(--muted); }
.pset .icon.attempted { color: var(--warn); } .pset .icon.solved { color: var(--good); }
.pset .icon.generating { color: var(--accent); } .pset .icon.failed { color: var(--bad); }
.pset a.active .icon { color: inherit; }
.solve .prompt { font-size: 19px; }
.scratch { width: 100%; min-height: 220px; font: 17px/1.6 ui-monospace, monospace; resize: vertical;
           background: repeating-linear-gradient(var(--field), var(--field) 26px, var(--rule) 27px); background-attachment: local; line-height: 27px; padding-top: 0; }
.hint { background: var(--note); border: 1px solid var(--note-border); border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.review .step { border-left: 4px solid var(--good); padding: 4px 10px; margin: 8px 0; }
.review .step.no { border-color: var(--bad); }
.review .step code { background: var(--soft); padding: 1px 6px; border-radius: 4px; }
.stars { color: #f59f00; letter-spacing: 2px; }

/* Coach dock */
body.coach-open { padding-right: var(--coach-w, 400px); }
#coach { position: fixed; top: 0; right: 0; bottom: 0; width: var(--coach-w, 400px); background: var(--panel); border-left: 1px solid var(--border);
         display: flex; flex-direction: column; padding: 14px 16px; z-index: 6; }
body:not(.coach-open) #coach { display: none; }
#coach-show { position: fixed; right: 20px; bottom: 20px; z-index: 6; display: none; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
body:not(.coach-open) #coach-show { display: block; }
#coach-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; }
#coach-resize:hover, #coach-resize.dragging { background: var(--accent-soft); border-left: 2px solid var(--accent); }
body.resizing { cursor: col-resize; user-select: none; }
#coach-ai { font-size: 13px; margin: 4px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); }
/* Under the input: icons with slim bars for the coach's memory and today's coach messages */
#coach-status { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
#coach-status .meter { cursor: help; }
#coach-meter .bar > div { background: var(--accent); }
#coach-meter .full .bar > div { background: var(--warn); }
#coach-forget { font-size: 13px; color: var(--text); line-height: 1.35; margin: 4px 0 0; }
#coach-forget:empty { display: none; }
#coach-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 8px 10px 2px; }
#coach textarea { width: 100%; resize: none; height: 70px; }
.msg { padding: 8px 12px; border-radius: 14px; max-width: 92%; }
.msg p:first-child { margin-top: 0; } .msg p:last-child { margin-bottom: 0; }
.msg.user { align-self: flex-end; background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--soft); border-bottom-left-radius: 4px; }
.msg.error { background: var(--bad-soft); }
.msg-report { align-self: flex-start; margin: -8px 0 0 6px; font-size: 12px; color: var(--muted); }
.msg-report button.link { font-size: 12px; padding: 0; color: var(--muted); }
.msg-report button.link:hover { color: var(--accent); }
.marker { align-self: center; font-size: 12px; color: var(--muted); text-align: center; padding: 2px 10px; border-top: 1px solid var(--border); width: 100%; }
.event { align-self: stretch; font-size: 13px; background: var(--note); border: 1px solid var(--note-border); border-radius: 10px; padding: 6px 10px; }
.typing { color: var(--muted); font-style: italic; }

/* Log */
.log-entry { border-bottom: 1px solid var(--border); padding: 10px 0; }
.log-entry .meta { font-size: 13px; color: var(--muted); }
.log-filter { margin: 4px 0 6px; }
.log-entry.flagged { border-left: 4px solid var(--warn); padding-left: 10px; background: var(--soft); }
.log-entry.flagged.distress { border-left-color: var(--bad); background: var(--bad-soft); }
.log-entry .flag-note { font-size: 14px; margin: 4px 0; }
.log-entry .reported-reply { margin: 6px 0 2px; padding: 4px 12px; border-left: 3px solid var(--border); color: var(--muted); }
.log-entry.distress .flag-note b { color: var(--bad-text); }

/* Feedback and problem reports */
#feedback-open { color: var(--text); padding: 7px 14px; border-radius: 999px; }
#feedback-open:hover { background: var(--accent-soft); }
:is(#feedback, #report, #goal-edit) { border: none; padding: 0; background: none; color: var(--text); width: min(560px, calc(100% - 32px)); }
:is(#feedback, #report, #goal-edit)::backdrop { background: rgba(0,0,0,.45); }
:is(#feedback, #report, #goal-edit) form { display: flex; flex-direction: column; gap: 12px; margin: 0; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
:is(#feedback, #report, #goal-edit) h2 { margin: 0; }
:is(#feedback, #report, #goal-edit) p { margin: 0; }
:is(#feedback, #report, #goal-edit) .seg { align-self: flex-start; }
:is(#feedback, #report, #goal-edit) textarea { width: 100%; min-height: 140px; resize: vertical; }
:is(#feedback, #report, #goal-edit) .feedback { margin: 0; }
#report textarea, #goal-edit textarea { min-height: 90px; }
:is(#report, #goal-edit) [hidden] { display: none; }
#app-footer { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--border); text-align: center; }
#feedback-thanks { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 7; background: var(--good-soft);
                   color: var(--good-text); border: 1px solid var(--good); border-radius: var(--radius); padding: 8px 18px; }

/* Sign-in: until a parent signs in, the form replaces the pages, the coach, and the header's links */
#signin { display: none; }
body.signed-out #signin { display: block; max-width: 460px; margin: 10vh auto 0; padding: 0 20px; }
body.signed-out :is(header nav, #child-switch, #feedback-open, main, #coach, #coach-show) { display: none !important; }
body.signed-out.coach-open { padding-right: 0; }
#signin form { display: flex; flex-direction: column; gap: 14px; }
#signin h2, #signin p { margin: 0; }
#signin input[type=email] { font-size: 19px; padding: 10px 14px; }
#signin .answer-box { max-width: none; letter-spacing: .3em; font-family: ui-monospace, monospace; }
#signin .feedback { margin: 0; }
#signin .row { margin-top: -4px; }
.signed-in { padding: 10px 22px; }

/* Consent: until the family consents to the notice's current Version, the form replaces the pages and the coach */
#consent { display: none; }
body.consent-needed #consent { display: block; max-width: 760px; margin: 4vh auto 40px; padding: 0 20px; }
body.consent-needed :is(header nav, #course-label, #child-switch, #feedback-open, main, #coach, #coach-show) { display: none !important; }
body.consent-needed.coach-open { padding-right: 0; }
#consent form { display: flex; flex-direction: column; gap: 14px; }
#consent-form > h2, #consent-form > p { margin: 0; }
.consent-notice { max-height: 40vh; overflow-y: auto; background: var(--soft); border: 1px solid var(--border);
                  border-radius: var(--radius); padding: 4px 20px 12px; font-size: 15px; line-height: 1.55; }
.consent-notice h1 { font-size: 22px; margin: 14px 0 4px; }
.consent-notice h2 { font-size: 18px; margin: 18px 0 6px; }
.consent-notice p, .consent-notice ul, .consent-notice ol { margin: 0 0 10px; }
.consent-notice ul, .consent-notice ol { padding-left: 22px; }
.notice-dates { color: var(--muted); font-size: 13px; }
#consent label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
#consent label.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
#consent label.name { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
#consent label.name input { font-size: 18px; padding: 9px 12px; max-width: 420px; }
#consent .feedback { margin: 0; }
#consent-note { background: var(--accent-soft); padding: 10px 18px; }
#consent-note[hidden] { display: none; }
.consent-record p { margin: 0 0 10px; }

/* Profiles: the picker replaces the pages until someone picks a child, and before then only the parent area opens */
#picker { display: none; }
body.picking #picker { display: block; max-width: 640px; margin: 10vh auto 0; padding: 0 20px; }
body.picking :is(header nav, #course-label, #child-switch, main, #coach, #coach-show) { display: none !important; }
body.no-child :is(#nav, #course-label, #course-bar, #goal-bar, #coach, #coach-show) { display: none !important; }
body.parent-page :is(#coach, #coach-show) { display: none !important; }
body:is(.picking, .no-child, .parent-page).coach-open { padding-right: 0; }
#picker h2 { margin: 0; }
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 10px; border-radius: var(--radius); }
.profile .avatar { font-size: 52px; }
.profile .name { font-size: 18px; font-weight: 600; }
.profile.on { border-color: var(--accent); background: var(--accent-soft); }
.avatar { line-height: 1; }
#child-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; padding: 6px 10px; border-radius: 999px; }
#child-switch:hover { background: var(--accent-soft); }
#child-switch[hidden] { display: none; }
#child-switch .avatar { font-size: 20px; }
#child-switch .name { max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#child-switch .caret { color: var(--muted); font-size: 12px; }

/* Parent area */
.pin-prompt { max-width: 460px; margin: 6vh auto 0; display: flex; flex-direction: column; gap: 14px; }
.pin-prompt h2, .pin-prompt p, .pin-prompt .feedback { margin: 0; }
.pin-prompt .answer-box { max-width: none; letter-spacing: .3em; font-family: ui-monospace, monospace; }
input.pin::placeholder { letter-spacing: normal; }
input.pin { font-size: 22px; width: 7.5em; letter-spacing: .4em; text-align: center; font-family: ui-monospace, monospace; }
.signed-in > .muted { margin-right: 4px; }
.profile-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.profile-row .avatar { font-size: 28px; }
.profile-form { display: flex; flex-direction: column; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.profile-form label { display: flex; flex-direction: column; gap: 4px; }
.profile-form .feedback { margin: 0; }
.delete-confirm { background: var(--bad-soft); border: 1px solid var(--bad-border); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.delete-confirm p { margin: 0 0 10px; }
.delete-confirm .feedback { margin: 10px 0 0; }
.your-data .account-row { padding-top: 14px; align-items: flex-start; flex-wrap: nowrap; }
.your-data .account-row p { margin: 2px 0 0; }
.avatars { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-pick { font-size: 24px; line-height: 1.2; padding: 4px 8px; }
.avatar-pick.on { border-color: var(--accent); background: var(--accent-soft); }
.log-pick { margin: 4px 8px 6px 0; }
.log-more { margin-top: 14px; }
.log-more[hidden] { display: none; }
.parent-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 18px; }
.parent-tabs a { white-space: nowrap; }
.weekly-form { display: flex; flex-direction: column; gap: 10px; }
.weekly-form label { display: flex; gap: 6px; align-items: center; }
.weekly-form p { margin: 0; }
.good-text { color: var(--good-text); }
.bad-text { color: var(--bad-text); }

@media (max-width: 1100px) { body.coach-open { padding-right: 0; } #coach { width: min(var(--coach-w, 400px), 100%); box-shadow: -6px 0 20px rgba(0,0,0,.12); } }
@media (max-width: 860px) { .learn, .solve-wrap { grid-template-columns: 1fr; } .toc, .pset { position: static; max-height: none; } }
