/* Workshop: a friendly learning space, with shared styles for every learning screen. */
body {
  --font-body: 'Segoe UI', Arial, sans-serif;
  --accent: #6450b7; --accent-ink: #fff; --bg: #f7f8fa; --surface: #fff; --panel: #f4f3f8;
  --ink: #262735; --muted: #686975; --line: #e5e5eb; --line-soft: #eeedf2; --control: #ceceda;
  --miss: #a33c37; --good: #30673e;
  font-family: var(--font-body); color-scheme: light;
}
button, select, input, textarea { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button { touch-action: manipulation; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 10px; }
body > header { min-height: 83px; padding: 16px 36px; gap: 24px; background: var(--surface); }
#brand { display: flex; gap: 11px; align-items: center; font-size: 23px; font-weight: 750; letter-spacing: -.8px; white-space: nowrap; }
#brand:hover { text-decoration: none; }
#home-nav { display: flex; gap: 27px; margin-left: 44px; }
#home-nav button { color: var(--muted); background: none; border: 0; font-size: 13px; font-weight: 600; padding: 10px 0; cursor: pointer; }
#home-nav button:hover { color: var(--accent); }
#home-role { margin-left: auto; }
.role-picker { background: var(--panel); border-radius: 9px; padding: 4px; display: flex; gap: 3px; }
.role-picker button { border: 0; background: none; color: var(--muted); padding: 9px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.role-picker button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px #00000012; }
/* Home keeps only the sign-in button from the header tools. */
body[data-mode="home"] .tools { margin-left: 12px; }
body[data-mode="home"] .tools > :not(#signin-top) { display: none; }
@media (max-width: 520px) {
  body[data-mode="home"] header { flex-wrap: nowrap; }
  body[data-mode="home"] .tools { margin-left: 8px; }
}
body[data-mode="home"] main { padding: 0; }
body[data-mode="home"] #card { max-width: none; background: transparent; padding: 0; }
body:not([data-mode="home"]) #card { border: 1px solid var(--line); border-radius: 18px; margin-block: 12px; box-shadow: 0 5px 25px #00000004; }
body:not([data-mode="home"]) main { padding: 28px; }
.chip { min-height: 40px; padding: 9px 13px; line-height: 1.25; }
.chip.primary, .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#list .item { padding-block: 15px; }
#list .item:hover { background: var(--surface); }
#list .item[aria-current="true"] { box-shadow: inset 3px 0 0 var(--accent); }
body[data-mode="setup"] #card { max-width: 850px; }
body[data-mode="setup"] #card > h2 { font-size: 27px; line-height: 1.3; max-width: 620px; margin-bottom: 30px; }
.setup { gap: 25px; }
.setup legend { color: var(--ink); }
.setup .daily { border-radius: 12px; padding: 20px; }
.setup .actions .chip { min-height: 48px; }
.setup .field { min-height: 44px; }
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; border: 0; padding: 13px 19px; min-height: 46px; border-radius: 9px; font-size: 13px; font-weight: 650; cursor: pointer; line-height: 1.5; }
.home-button svg, .home-sidebar svg, .quiet-banner svg { width: 20px; height: 20px; flex: none; }
.home-button.solid { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 8px #00000008; }
.home-button:hover { filter: brightness(.95); }
.home-button.text-button { color: var(--accent); padding: 7px 0; background: none; min-height: 36px; justify-content: start; }
.home-button.outline { background: transparent; color: var(--ink); border: 1px solid var(--control); }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.6px; margin: 0 0 12px; line-height: 1.6; color: var(--muted); }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.welcome-row h1 { font-size: 30px; letter-spacing: -1px; line-height: 1.25; margin: 0; }
.welcome-row .eyebrow { font-size: 9px; margin-bottom: 7px; }
.grade-picker { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.grade-picker select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 30px 11px 13px; color: var(--ink); font-size: 13px; font-weight: 600; max-width: 200px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 30px 0 16px; }
.section-heading h2 { font-size: 20px; letter-spacing: -.4px; margin: 0; }
.section-heading > span { font-size: 11px; color: var(--muted); }
.section-heading .eyebrow { margin-bottom: 8px; }
.app-shell { display: grid; grid-template-columns: 218px minmax(0,1fr); max-width: 1600px; margin: auto; }
.studio-shell { min-width: 0; }
.home-sidebar { border-right: 1px solid var(--line); padding: 33px 19px; background: var(--surface); display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.sidebar-label { color: var(--muted); font-size: 9px; letter-spacing: 1.5px; padding: 0 14px; margin-bottom: 15px; }
.home-sidebar button { display: flex; align-items: center; gap: 12px; background: none; color: var(--muted); border: 0; padding: 13px; text-align: left; font-size: 12px; border-radius: 9px; cursor: pointer; }
.home-sidebar button:hover { background: var(--panel); }
.home-sidebar .side-active { color: var(--accent); background: #efebf8; font-weight: 600; }
.side-note { margin: 55px 9px 25px; padding: 18px 14px; background: #faf7eb; border: 1px solid #f0e9d0; border-radius: 12px; }
.side-note strong { display: block; font-size: 12px; }
.side-note p { font-size: 11px; color: #787262; margin: 7px 0 0; }
.little-spark { width: 33px; height: 33px; background: #cba84e; display: block; color: #a78434; font-size: 35px; line-height: 1; margin-bottom: 14px; }
.studio-main { padding: 34px 40px 26px; min-width: 0; }
.studio-hero { background: #eeeaf8; border: 1px solid #e5dff3; border-radius: 19px; padding: 33px 36px; display: grid; grid-template-columns: 1.4fr 1fr; min-height: 298px; overflow: hidden; }
.studio-hero .eyebrow { color: #77639d; font-size: 9px; }
.studio-hero h2 { font-size: clamp(28px,3vw,42px); line-height: 1.17; letter-spacing: -1.3px; margin-bottom: 16px; font-weight: 750; text-wrap: initial; }
.studio-hero h2 em { font-style: normal; color: #7560b5; }
.studio-hero p:not(.eyebrow) { font-size: 13px; line-height: 1.8; color: #70667e; margin-bottom: 22px; }
.hero-caption { display: block; font-size: 9px; margin-top: 10px; color: #776b87; }
.math-art { position: relative; min-height: 230px; margin: 0 -5px 0 20px; }
.art-orbit { position: absolute; inset: 16px -5px 10px -5px; border: 1px dashed #c6bbdf; border-radius: 50%; transform: rotate(-22deg); }
.art-block { width: 124px; height: 129px; background: #8c76c3; position: absolute; top: 59px; left: 46%; transform: translateX(-50%) rotate(-12deg); border-radius: 18px; color: white; font: italic 43px/1.12 Georgia,serif; padding: 15px 20px; box-shadow: 8px 9px 0 #7c67b1; z-index: 2; }
.art-block i { font-size: 35px; white-space: nowrap; }
.art-spark { width: 110px; height: 110px; background: #e4b94b; font: 115px/1 Georgia,serif; position: absolute; top: -22px; right: 5px; color: #e4b94b; transform: rotate(12deg); }
.art-triangle { position: absolute; left: 0; top: 39px; width: 0; height: 0; border-left: 35px solid transparent; border-right: 35px solid transparent; border-bottom: 65px solid #9bbbad; transform: rotate(-19deg); }
.art-ring { position: absolute; width: 65px; height: 65px; border: 16px solid #f2c969; border-radius: 50%; right: 2px; bottom: 18px; }
.art-note { position: absolute; z-index: 3; left: 10px; bottom: 4px; transform: rotate(-7deg); color: #78644f; font-size: 12px; background: #fffdf1; padding: 10px 17px; box-shadow: 2px 4px 10px #42342b13; }
.art-dot { position: absolute; font-size: 30px; bottom: -3px; right: 89px; color: #937ebf; }
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.path-card { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 13px; padding: 23px; }
.path-icon { display: inline-flex; padding: 10px; border-radius: 10px; background: #faf1d9; color: #9e7522; margin-bottom: 17px; }
.path-icon svg { width: 21px; height: 21px; }
.practice-card .path-icon { color: #588475; background: #eaf3ee; }
.mini-label { position: absolute; right: 22px; top: 38px; font-size: 8px; font-weight: 600; color: var(--muted); letter-spacing: 1px; }
.path-card h3 { margin: 0 0 9px; font-size: 16px; letter-spacing: -.4px; }
.path-card p { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.topic-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.topic-card { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 11px; padding: 18px 14px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; min-width: 0; transition: transform .15s, border-color .15s; }
.topic-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.topic-card:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.topic-symbol { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 9px; color: #7965a4; background: #f0ecf8; font: 23px Georgia,serif; }
.topic-1 .topic-symbol { background: #fbf0db; color: #937023; font-size: 17px; }
.topic-2 .topic-symbol { background: #e7f2ed; color: #527b68; font-size: 34px; }
.topic-3 .topic-symbol { background: #e9effa; color: #5676a0; }
.topic-4 .topic-symbol { background: #f9e9e4; color: #b2745c; }
.topic-5 .topic-symbol { background: #e8f2f2; color: #467e7b; font-size: 17px; }
.topic-card strong { font-size: 11px; display: block; font-weight: 600; }
.topic-card small { font-size: 9px; color: var(--muted); display: block; margin-top: 4px; }
.topic-card > svg { width: 14px; height: 14px; margin-left: auto; flex: none; color: var(--muted); }
.quiet-banner { display: flex; gap: 13px; align-items: center; padding: 20px 0 0; margin-top: 18px; }
.quiet-banner > svg { color: #9b84bd; }
.quiet-banner p { font-size: 11px; color: var(--muted); margin: 0; }
.quiet-banner p strong { color: var(--ink); }
.quiet-banner button { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--accent); font-size: 10px; margin-left: auto; cursor: pointer; white-space: nowrap; }
.art-spark, .little-spark { clip-path: polygon(50% 0,59% 30%,85% 15%,70% 41%,100% 50%,70% 59%,85% 85%,59% 70%,50% 100%,41% 70%,15% 85%,30% 59%,0 50%,30% 41%,15% 15%,41% 30%); }
.parent-guide { margin-top: 34px; padding: 29px; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
.parent-guide h2 { font-size: 23px; line-height: 1.3; margin-bottom: 15px; }
.parent-guide p { font-size: 12px; color: var(--muted); line-height: 1.8; max-width: 400px; }
.parent-guide ol { margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.parent-guide li { counter-increment: guide; position: relative; padding-left: 34px; margin-bottom: 17px; }
.parent-guide li:last-child { margin-bottom: 0; }
.parent-guide li:before { content: counter(guide); position: absolute; left: 0; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; text-align: center; font-size: 11px; line-height: 23px; color: var(--accent); }
.parent-guide strong { font-size: 12px; display: block; margin-bottom: 4px; }
.parent-guide li span { font-size: 11px; color: var(--muted); display: block; }
@media (min-width: 1500px) {
.studio-main { padding-inline: 55px; }
.studio-hero { min-height: 340px; padding: 42px; }
.math-art { width: 300px; justify-self: center; }
}
@media (max-width: 1100px) {
#home-nav { margin-left: 10px; gap: 17px; }
body > header { padding-inline: 24px; gap: 15px; }
#brand { font-size: 20px; }
.app-shell { grid-template-columns: 180px minmax(0,1fr); }
.home-sidebar { padding-inline: 10px; }
.home-sidebar button { font-size: 11px; gap: 9px; }
.studio-main { padding: 28px 25px; }
.studio-hero { padding: 28px; grid-template-columns: 1.5fr 1fr; }
.studio-hero h2 { font-size: 30px; }
.math-art { transform: scale(.85); margin-left: 0; }
.topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mini-label { font-size: 7px; right: 15px; }
.path-card { padding: 18px; }
}
@media (max-width: 800px) {
body > header { min-height: 70px; padding: 14px 20px; gap: 12px; }
#brand { font-size: 20px; }
#home-nav { display: none; }
.role-picker button { padding: 9px; font-size: 10px; }
.app-shell { display: block; }

.studio-main { padding: 26px 22px; }
.studio-hero h2 { font-size: 35px; }
.math-art { max-width: 270px; width: 100%; justify-self: center; transform: none; }
.welcome-row h1 { font-size: 26px; }
.parent-guide { gap: 25px; padding: 25px; }
body:not([data-mode="home"]) > header { gap: 8px; padding: 12px 15px; }
body:not([data-mode="home"]) #brand { margin: 0; }
body:not([data-mode="home"]) main { padding: 12px; }
body:not([data-mode="home"]) #card { margin: 0; border-radius: 12px; padding: 23px 20px; }
}
@media (max-width: 580px) {
body > header { padding: 13px 16px; gap: 8px; }
#brand { gap: 7px; font-size: 17px; letter-spacing: -.6px; }
.role-picker { padding: 3px; gap: 0; }
.role-picker button { padding: 9px 7px; font-size: 9px; }
.studio-main { padding: 25px 17px; }
.welcome-row { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.welcome-row .grade-picker { width: 100%; justify-content: space-between; }
.welcome-row select { min-width: 138px; }
.welcome-row h1 { font-size: 28px; }
.studio-hero { display: flex; flex-direction: column; padding: 27px 23px 18px; min-height: 0; }
.studio-hero h2 { font-size: 32px; letter-spacing: -1px; }
.studio-hero p:not(.eyebrow) { font-size: 12px; }
.studio-hero p br { display: none; }
.math-art { height: 155px; min-height: 155px; width: 245px; margin: 15px auto 0; }
.art-block { width: 95px; height: 98px; font-size: 33px; padding: 10px 16px; top: 24px; border-radius: 14px; }
.art-block i { font-size: 27px; }
.art-spark { width: 85px; height: 85px; font-size: 90px; right: 12px; top: -10px; }
.art-triangle { border-left-width: 26px; border-right-width: 26px; border-bottom-width: 48px; top: 26px; }
.art-ring { width: 49px; height: 49px; border-width: 12px; }
.art-note { font-size: 10px; bottom: 3px; padding: 7px 13px; }
.art-orbit { inset: 0 0 4px; }
.art-dot { bottom: -6px; }
.section-heading { margin-top: 25px; }
.section-heading h2 { font-size: 18px; }
.section-heading > span { display: none; }
.section-heading .home-button { font-size: 10px; gap: 7px; }
.path-grid { grid-template-columns: 1fr; gap: 12px; }
.path-card { padding: 20px; }
.path-icon { margin-bottom: 12px; }
.mini-label { font-size: 8px; top: 34px; right: 20px; }
.path-card p br { display: none; }
.topic-grid { gap: 9px; }
.topic-card { padding: 15px 12px; flex-wrap: wrap; gap: 10px; position: relative; align-content: start; }
.topic-card > span:nth-child(2) { flex-basis: 100%; }
.topic-card > svg { position: absolute; right: 12px; top: 24px; }
.topic-card strong { font-size: 11px; }
.topic-card small { font-size: 10px; }
.quiet-banner { flex-wrap: wrap; gap: 8px; }
.quiet-banner p { flex: 1; }
.quiet-banner button { margin-left: 29px; min-height: 36px; }
.parent-guide { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
.parent-guide h2 { font-size: 22px; }
.parent-guide p { margin-bottom: 0; }
.parent-guide li { margin-bottom: 20px; }
.parent-guide strong { font-size: 13px; }
.parent-guide li span { font-size: 12px; }
body[data-mode="setup"] #card > h2 { font-size: 23px; }
body[data-mode="test"] > header { flex-wrap: nowrap; gap: 7px; }
body[data-mode="test"] #testbar { flex: 1; gap: 5px; flex-wrap: nowrap; }
body[data-mode="test"] #testbar .chip { font-size: 12px; padding-inline: 9px; }
body[data-mode="test"] .tools { gap: 0; }
body[data-mode="test"] #brand { display: none; }
}
@media (prefers-reduced-motion: reduce) {
*, *:before, *:after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
.skip-link { display: none !important; }
}
.home-sidebar button, #home-nav button, .grade-picker, .grade-picker select { font-size: 14px; }
.studio-hero p:not(.eyebrow), .path-card p, .parent-guide p { font-size: 14px; }
.topic-card strong { font-size: 13px; }
.topic-card small, .hero-caption { font-size: 11px; }
.parent-guide strong { font-size: 14px; }
.parent-guide li span { font-size: 12px; }
@media (max-width: 1100px) and (min-width: 801px) {
.home-sidebar button { font-size: 12px; }
}
@media (max-width: 580px) {
.role-picker button { font-size: 11px; min-height: 36px; }
.studio-hero h2 { font-size: 29px; }
.studio-hero h2 br { display: none; }
.studio-hero h2 em { display: block; }
.path-card p, .studio-hero p:not(.eyebrow) { font-size: 14px; }
.topic-card strong { font-size: 12px; }
}

/* The primary navigation belongs to the application, not an individual screen. */
#site-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  overflow-y: auto;
  z-index: 20;
}
#site-nav .nav-short { display: none; }
.app-shell > .layout { min-width: 0; }
@media (min-width: 801px) {
  #grades { flex: 1; min-width: 0; }
  .app-shell > .layout:not(.solo) { grid-template-columns: minmax(220px, 27%) minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filters .select { width: 100%; }
  .app-shell > .layout:not(.solo) main { padding: 22px; }
}
@media (max-width: 800px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  #site-nav {
    position: fixed;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    height: auto;
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px #26273508;
  }
  #site-nav .sidebar-label, #site-nav .side-note, #site-nav .nav-label { display: none; }
  #site-nav .nav-short { display: block; }
  #site-nav button {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 8px 2px;
    min-height: 52px;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
  }
  #site-nav button:focus-visible { outline-offset: -2px; }
}
@media (max-height: 650px) and (min-width: 801px) {
  #site-nav .side-note { display: none; }
}
@media print {
  body { padding-bottom: 0; }
  .app-shell { display: none !important; }
}
/* Role remains visible while the learning screen and its drafts stay in place. */
.parent-test-share { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.parent-test-share .chip { justify-self: start; }
.parent-context { margin-block: 18px; padding: 12px 15px; border-left: 3px solid #b6a6d8; background: var(--panel); }
.test-help { margin-top: 24px; padding: 18px; border: 1px solid #ded6ed; border-radius: 12px; background: #f8f6fc; }
.test-help .hint-box { border-bottom: 0; margin-bottom: 12px; padding-bottom: 0; }
.test-help .hint-box p, .answer-box p { font-size: 15px; line-height: 1.65; }
.test-help .meta { font-weight: 600; color: var(--accent); }
.answer-box { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.help-note { font-size: 12px; margin-top: 12px; }
.reply .numeric-reply { width: 100%; max-width: 20rem; min-height: 52px; font-size: 22px; letter-spacing: .05em; }
.reply .numeric-reply[readonly] { background: var(--panel); }
#reply-invalid:empty { display: none; }
.help-used { color: var(--accent); }
@media (max-width: 800px) {
  body:not([data-mode="home"]) > header { flex-wrap: wrap; }
  body:not([data-mode="home"]) #home-role { flex-basis: 100%; order: 10; display: flex; justify-content: flex-end; }
  body:not([data-mode="home"]) #home-role .role-picker { padding: 2px; }
  body:not([data-mode="home"]) #home-role button { min-height: 30px; padding-block: 7px; }
}
/* Guided choices, readable progress, and a report that separates each kind of assessment. */
.page-title { font-size: clamp(25px, 3vw, 34px); line-height: 1.25; letter-spacing: -.8px; margin: 0 0 25px; }
.simple-paths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.simple-paths .path-card { padding: 20px; }
.simple-paths h3 { line-height: 1.4; }
.mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode-option { color: var(--ink); background: var(--surface); border: 1px solid var(--control); border-radius: 12px; padding: 20px; text-align: left; cursor: pointer; }
.mode-option strong { display: block; font-size: 18px; margin-bottom: 8px; }
.mode-option span { display: block; font-size: 14px; color: var(--muted); line-height: 1.6; }
.mode-option[aria-pressed="true"] { background: #f1edf9; border: 2px solid var(--accent); padding: 19px; }
.advanced-setup, .saved-history { border-top: 1px solid var(--line); padding-top: 16px; }
.advanced-setup > summary, .saved-history > summary { cursor: pointer; font-size: 15px; font-weight: 600; padding: 10px 0; }
.advanced-setup > .setup { margin-top: 18px; }
.lesson-rules { background: #f6f4fb; border: 1px solid #e1daef; border-radius: 12px; padding: 23px; }
.lesson-rules h2 { font-size: 23px; }
.lesson-rules ol { padding-left: 22px; margin: 15px 0; }
.lesson-rules li { padding: 5px 0; font-size: 16px; line-height: 1.65; }
.session-progress { border-bottom: 1px solid var(--line); margin-bottom: 24px; padding-bottom: 17px; }
.progress-heading { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 16px; }
.progress-count { font-size: 13px; color: var(--muted); }
.session-progress progress { display: block; width: 100%; height: 9px; margin: 12px 0; accent-color: var(--accent); border: 0; border-radius: 10px; overflow: hidden; }
.session-progress progress::-webkit-progress-bar { background: #eeeaf6; }
.session-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 10px; }
.save-status { font-size: 11px; }
.feedback { background: #fff4df; padding: 16px; border-radius: 10px; font-size: 16px; line-height: 1.6; }
.feedback.good { background: #edf6ed; color: #305d39; }
.paper-task { padding: 18px; background: #f8f4e8; border: 1px solid #e9dfc7; border-radius: 12px; }
.paper-task strong { display: block; font-size: 18px; margin-bottom: 8px; }
.paper-task p { margin: 0; font-size: 15px; color: #665e49; line-height: 1.65; }
.browse-start { display: grid; gap: 12px; padding-block: 18px; }
.browse-start .chip { justify-self: start; }
.saved-work { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 22px; margin: 0 0 24px; }
.saved-work h2 { font-size: 20px; }
.saved-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 17px 0; border-top: 1px solid var(--line-soft); }
.saved-row:first-of-type { margin-top: 15px; }
.saved-row > div:first-child, .saved-row > strong:first-child { flex: 1; min-width: 180px; font-size: 14px; }
.saved-row strong { display: block; font-size: 14px; }
.saved-row .note { margin-top: 5px; }
body[data-mode="result"] #card.report-card { max-width: 1180px; }
.report-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.summary-stat { background: #f5f4f8; padding: 19px; border-radius: 12px; }
.summary-stat strong { display: block; font-size: 32px; line-height: 1.2; margin-bottom: 9px; }
.summary-stat span { display: block; font-size: 13px; color: var(--muted); }
.summary-stat.good { background: #edf6ee; color: #376542; }
.summary-stat.retry { background: #fbf2e2; color: #8e6425; }
.summary-stat.manual { background: #f0edf8; color: var(--accent); }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 22px 0 10px; }
.report-actions .field { width: 220px; }
.report-table-wrap { overflow-x: auto; margin: 24px 0; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
.report-table caption { text-align: left; color: var(--muted); padding: 0 0 14px; font-size: 13px; }
.report-table th { text-align: left; padding: 12px 10px; background: var(--panel); font-size: 11px; }
.report-table td { padding: 15px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; max-width: 160px; }
.report-table .good { color: #30673e; font-weight: 600; }
.report-task { border: 1px solid transparent; background: none; color: var(--accent); padding: 10px; font-weight: 650; cursor: pointer; white-space: nowrap; border-radius: 8px; }
.report-task[aria-current="true"] { border-color: #c3b4e1; background: #f1edf8; }
.report-detail { border-top: 1px solid var(--line); padding-top: 25px; scroll-margin-top: 20px; }
.review-problem { max-width: 760px; margin: 0 auto; }
.review-form { max-width: 760px; margin: 25px auto 0; padding: 23px; border-radius: 12px; border: 1px solid var(--line); background: #faf9fc; display: grid; gap: 15px; }
.review-form h3 { font-size: 20px; margin: 0; }
.review-form .field { width: 100%; }
.review-form select { max-width: 220px; }
.review-form textarea { min-height: 90px; resize: vertical; }
.review-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.6; cursor: pointer; }
.review-check input { margin-top: 5px; accent-color: var(--accent); flex: none; width: 18px; height: 18px; }
@media (max-width: 1100px) {
  .simple-paths { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 580px) {
  .mode-options { grid-template-columns: 1fr; }
  .mode-option { padding: 17px; }
  .mode-option[aria-pressed="true"] { padding: 16px; }
  .lesson-rules { padding: 18px; }
  .lesson-rules li { font-size: 15px; }
  .saved-work { padding: 18px; }
  .saved-row { align-items: stretch; }
  .saved-row > div:first-child { flex-basis: 100%; }
  .session-nav { gap: 9px; }
  .session-nav .chip { flex-basis: calc(50% - 9px); font-size: 12px; }
  .summary-stat { padding: 15px; }
  .summary-stat strong { font-size: 28px; }
  .report-table, .report-table tbody, .report-table tr, .report-table td { display: block; }
  .report-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .report-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 12px; }
  .report-table td { max-width: none; border-bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 7px; font-size: 13px; }
  .report-table td:before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 400; }
  .report-table caption { display: block; }
  .report-task { padding: 4px 7px; text-align: left; }
  .report-actions { align-items: stretch; }
  .report-actions .field { width: 100%; }
  .review-form { padding: 18px; }
  .page-title { font-size: 27px; }
}

/* AI practice problems: a mark on the card and in the list, a note, and links between a problem and its AI variants. */
.ai-badge { display: inline-block; padding: 1px 7px; border: 1px solid #e3b95c; border-radius: 999px; background: #fff3d9; color: #7a4f00; font: 700 12px/1.5 var(--font-body); letter-spacing: 0.04em; vertical-align: 0.2em; }
.item-title .ai-badge { vertical-align: 0.05em; font-size: 11px; padding: 0 6px; }
.ai-note { margin: -4px 0 14px; padding: 9px 12px; border-left: 3px solid #e3b95c; background: #fffaf0; color: var(--ink); }
.similar-box { display: grid; gap: 10px; margin-top: 18px; padding: 14px 16px; border: 1px dashed #e3b95c; border-radius: 12px; background: #fffcf5; }
.similar-box .chip { justify-self: start; }
.similar-list { display: grid; gap: 8px; }
.similar-list[hidden] { display: none; }
.similar-item { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 15px/1.4 var(--font-body); text-align: left; cursor: pointer; }
.similar-item:hover { border-color: #e3b95c; }
.similar-item .ai-badge { vertical-align: 0.05em; font-size: 11px; padding: 0 6px; }
.similar-filter { padding: 0 12px 10px; }

/* Progress: marks in the list and on the card, the "Мій прогрес" screen and the suggestions on home. */
.done-mark { display: inline-block; min-width: 1.1em; font-weight: 700; color: var(--good); }
.done-mark.tried { color: #b07a10; }
.done-mark.paper { color: var(--accent); }
.done-note { margin: 0; font: 600 14px/1.4 var(--font-body); color: var(--good); }
.done-note.tried { color: #8a5a00; }
.similar-item .note { display: inline; font-size: 13px; }
.account-box { display: grid; gap: 12px; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.account-box h2 { margin: 0; font-size: 19px; }
.account-box p { margin: 0; }
.account-box .chip { justify-self: start; }
.signin-form { display: flex; flex-wrap: wrap; gap: 10px; }
.signin-form .field { flex: 1 1 240px; min-height: 44px; }
.good-note { color: var(--good); font-weight: 600; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.stats-table th { color: var(--muted); font-weight: 600; }
.practice-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.practice-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.practice-list li > div { flex: 1 1 220px; min-width: 0; }
.practice-list .linkish { text-align: left; }
.practice-panel { display: grid; gap: 10px; margin: 0 0 22px; padding: 18px 20px; border: 1px dashed #e3b95c; border-radius: 16px; background: #fffcf5; }
.practice-panel h2 { margin: 0; font-size: 20px; }
.signin-alt { display: grid; gap: 10px; }
.google-signin { justify-self: start; gap: 8px; min-height: 44px; padding-inline: 16px; background: #fff; border-color: var(--control); font-weight: 600; }
.google-g { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #4285f4; color: #fff; font: 700 13px/1 Arial, sans-serif; }

/* "Увійти" in the header, the signed-in name with the Google picture, and the sign-in dialog. */
.signin-top { gap: 8px; font-weight: 600; white-space: nowrap; }
.signin-top:not(.signed-in) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.signin-top .avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -4px 0 -4px -5px; border-radius: 50%; object-fit: cover; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.signin-top .signin-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
body[data-mode="test"] .signin-top { display: none; }
.signin-icon { display: none; }
.signin-icon svg { width: 20px; height: 20px; }
@media (max-width: 520px) {
  .signin-top .signin-name { display: none; }
  .signin-top .signin-icon { display: inline-grid; }
  .signin-top { padding-inline: 9px; }
}
.legal-note a { color: var(--accent); }
.signin-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px #1e1b3a40; }
.signin-dialog::backdrop { background: #1e1b3a66; }
.signin-dialog .dialog-body { position: relative; display: grid; gap: 12px; padding: 26px 22px 22px; }
.signin-dialog h2 { margin: 0; padding-right: 36px; font-size: 22px; }
.signin-dialog p { margin: 0; }
.signin-dialog .google-signin { justify-self: stretch; justify-content: center; min-height: 48px; font-size: 16px; }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.signin-dialog .signin-form .field { flex-basis: 100%; }
.signin-dialog .signin-form .chip { flex: 1; justify-content: center; }
.google-holder { display: grid; min-height: 44px; }
.google-official { display: flex; justify-content: center; min-height: 44px; }
.google-official[hidden], .google-holder .google-signin[hidden] { display: none; }
.account-box .google-official { justify-content: flex-start; }

/* The MathAI brand: the black-hole logo and "Math" with a gold "AI". */
.brand-logo { display: block; height: 66px; width: auto; aspect-ratio: 250 / 150; margin-block: -8px; }
.brand-icon { display: none; width: 40px; height: 40px; }
@media (max-width: 800px) { .brand-logo { height: 52px; margin-block: -4px; } }
/* Narrow screens with a crowded header show the square sigma instead of the wide name. */
@media (max-width: 520px) {
  body:not([data-mode="home"]) .brand-logo { display: none; }
  body:not([data-mode="home"]) .brand-icon { display: block; }
}

/* The plain-HTML footer under every screen: what MathAI is and its policies. */
.site-footer { display: grid; gap: 6px; padding: 22px max(16px, calc((100% - 1100px) / 2)) 28px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1.5; }
.site-footer p { margin: 0; }
.site-footer strong { color: var(--ink); }
.site-footer a { color: var(--accent); }
body[data-mode="test"] .site-footer { display: none; }
@media print { .site-footer { display: none; } }

/* Assignments: the parent's builder, list and work, the child's hand-in, and picking in the library. */
.parent-tasks { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; margin: 0 0 24px; padding: 24px 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.parent-tasks > div:first-child { flex: 1 1 360px; }
.parent-tasks h2 { margin: 6px 0 8px; font-size: 22px; }
.parent-tasks p { margin: 0; color: var(--muted); }
.parent-task-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.task-list { display: grid; gap: 6px; margin: 0 0 6px; padding-left: 1.4em; }
.task-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.task-list .task-name { min-width: 0; }
.task-list .note { white-space: nowrap; font-size: 12px; }
.task-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.task-add .select { flex: 1 1 180px; }
.task-add input[type=number] { width: 80px; }
.task-signin { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: #f4f1ff; }
.task-signin p { margin: 0; }
.task-signin .chip { justify-self: start; }
.task-created { display: grid; gap: 10px; margin: 0 0 22px; padding: 18px 20px; border: 1px solid #b7e1c1; border-radius: 14px; background: #f1fbf3; }
.task-created h2, .task-created p { margin: 0; }
.task-rows { display: grid; gap: 10px; }
.task-row { display: grid; gap: 4px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.task-row:hover { border-color: var(--accent); }
.task-handed { font-size: 13px; font-weight: 600; color: var(--muted); }
.task-handed.has { color: var(--good); }
.pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; background: #f4f1ff; font-weight: 600; }
.handin-answers { display: grid; gap: 4px; }
#task-title { width: 100%; }
