@layer app {
  .study-page { padding-block: 2rem 4rem; }
  .study-heading { margin-block: 1.75rem 2.5rem; }
  .study-heading h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-block: .5rem 1rem; }
  .eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .study-today { margin-block: 1.5rem 2.5rem; }
  .study-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; align-items: center; margin-block: 1rem 2rem; }
  .study-day { display: grid; justify-items: center; padding: .8rem .2rem; border-radius: .75rem; border: 1px solid var(--line); }
  .study-day span, .study-day small { font-size: .75rem; color: var(--muted); }
  .study-day strong { font-size: 1.5rem; }
  .study-day.selected { background: var(--blue); border-color: var(--primary); }
  .study-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
  .study-section-heading h2, .study-exams h2, .course-study-start h2 { font-size: 1.6rem; }
  .study-topic-list { display: grid; gap: .75rem; margin-block: 1rem 1.5rem; }
  .study-topic { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: .75rem; background: white; }
  .study-topic h2, .study-topic h3 { font-size: 1.35rem; margin-block: .4rem .5rem; }
  .study-topic p { max-width: 65ch; }
  .study-session-actions { display: grid; gap: .5rem; min-width: 9rem; }
  .study-completed { background: var(--progress); border-radius: 2rem; padding: .2rem .7rem; font-weight: 700; font-size: .8rem; text-align: center; }
  .study-empty { background: var(--blue); border-radius: 1rem; padding: 1.75rem; margin-block: 1rem; }
  .study-empty h3 { font-size: 1.4rem; margin-bottom: .6rem; }
  .study-empty .button { margin-top: 1rem; }
  .study-warning { background: var(--blue); padding: 1rem; border-radius: .75rem; margin: 1rem 0; color: var(--ink); }
  .study-preferences, .study-exams, .study-records { border: 1px solid var(--line); padding: 1rem 1.25rem; border-radius: .75rem; margin-block: 1rem; }
  .study-preferences summary, .study-exams summary, .study-records summary { cursor: pointer; font-weight: 700; padding-block: .4rem; }
  .study-exams > p { margin: .5rem 0 1rem; }
  .study-exams-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .study-exam-add { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; flex-shrink: 0; }
  .study-exam-add:hover { background: var(--blue); }
  .study-exam-add:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .study-check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; margin-block: .5rem; }
  .study-check input { width: auto; accent-color: var(--primary); }
  .study-page form, .study-preferences form, .lesson-page form { display: grid; gap: .5rem; margin-block: .75rem; }
  .study-page select, .study-preferences select, .lesson-page select { width: 100%; min-height: 2.75rem; font: inherit; background: white; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .5rem; padding: .5rem; }
  .study-page fieldset, .study-preferences fieldset { border: 1px solid var(--line); border-radius: .5rem; }
  .study-records article { padding-block: 1rem; border-bottom: 1px solid var(--line); }
  .lesson-print-answers { display: none; }
  .lesson-sharing { margin-bottom: 1rem; }
  .lesson-page { max-width: 1280px; padding-block: 1.5rem 4rem; }
  .lesson-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-bottom: 2.5rem; font-size: .85rem; color: var(--primary); }
  .lesson-toolbar button { background: transparent; border: 0; color: inherit; cursor: pointer; }
  .lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; }
  .lesson-document { max-width: 72ch; }
  .lesson-document h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); line-height: 1.12; margin-bottom: 2rem; }
  .lesson-document h2 { font-size: 1.6rem; margin-block: 2rem 1rem; }
  .lesson-document p { margin-block: .9rem; line-height: 1.85; }
  .lesson-document section { scroll-margin-top: 2rem; }
  .lesson-document a { text-decoration: underline; color: var(--primary); }
  .nova-panel { position: sticky; top: 1.5rem; align-self: start; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; background: var(--sidebar-background); max-height: calc(100vh - 3rem); overflow: auto; }
  .nova-panel header { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
  .nova-panel h2 { font-size: 1.4rem; }
  .nova-panel p, .nova-panel label { font-size: .85rem; }
  .nova-mark { display: grid; place-items: center; width: 4rem; height: 4rem; flex-shrink: 0; object-fit: contain; }
  .nova-conversation article { padding-block: 1rem; border-top: 1px solid var(--line); }
  .nova-conversation strong { font-size: .8rem; }
  .nova-conversation p { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: .5rem; }
  .lesson-practice { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
  .lesson-practice h2 { font-size: 1.75rem; margin-bottom: 1rem; }
  .lesson-practice h3 { font-size: 1.1rem; line-height: 1.5; }
  .lesson-practice article { background: var(--blue); padding: 1.25rem; border-radius: .75rem; margin-block: 1rem; }
  .lesson-practice .practice-feedback { background: white; border: 1px solid var(--line); }
  .lesson-practice details { margin-top: 1rem; }
  @media (max-width: 950px) { .lesson-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; } .nova-panel { position: static; max-height: none; } }
  @media (max-width: 600px) { .study-week { gap: .15rem; } .study-day { padding: .6rem .1rem; } .study-day small { font-size: .55rem; } .study-topic { flex-direction: column; align-items: stretch; padding: 1rem; } .study-session-actions { min-width: 0; } .study-topic h3 { font-size: 1.15rem; } }
  @media print { .lesson-toolbar, .lesson-sharing, .nova-panel, .lesson-practice form, .lesson-practice .button_to, .lesson-practice .practice-feedback { display: none !important; } .lesson-layout { display: block; } .lesson-print-answers { display: block; break-before: page; } .lesson-print-answers h2 { font-size: 18pt; } .lesson-print-answers h3 { font-size: 12pt; margin-top: 1rem; } .lesson-page { width: 100%; padding: 0; } .lesson-document h1 { font-size: 24pt; } .lesson-document h2 { break-after: avoid; } }
}

/* Prepared public lessons reuse the lesson reader and native practice disclosures. */
.sample-lesson { max-width: 1100px; }
.sample-lesson-label { margin-bottom: 20px; color: var(--primary); font-size: .8rem; font-weight: 700; }
.sample-lesson .lesson-toolbar { justify-content: space-between; }
.sample-lesson .lesson-practice > p { line-height: 1.7; color: var(--muted); }
.sample-lesson .lesson-practice label { display: block; margin-block: 20px 8px; font-size: .85rem; font-weight: 700; }
.sample-lesson textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: white; resize: vertical; }
.sample-lesson summary { cursor: pointer; padding-block: 10px; color: var(--primary); font-weight: 700; font-size: .85rem; }
.sample-lesson details p { line-height: 1.8; margin-block: 10px; }
.sample-lesson textarea:focus-visible, .sample-lesson a:focus-visible, .sample-lesson summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.sample-lesson-sidebar > p { line-height: 1.8; }
.sample-lesson-sidebar > .button { margin-block: 20px; }
.sample-lesson-sidebar nav { display: grid; gap: 15px; border-block: 1px solid var(--line); padding-block: 22px; margin-bottom: 22px; font-size: .85rem; }
.sample-lesson-sidebar h3 { font-size: 1rem; }
.sample-lesson-sidebar nav a { color: var(--muted); }
.sample-lesson-sidebar a[aria-current="page"] { color: var(--primary); font-weight: 800; }
.sample-lesson-sidebar > p a { color: var(--primary); text-decoration: underline; }
.sample-lesson-next { margin-top: 40px; padding: 30px; border-radius: 16px; background: var(--blue); }
.sample-lesson-next h2 { font-size: 1.6rem; }
.sample-lesson-next p { margin-block: 16px 24px; line-height: 1.8; }
.sample-lesson-next > a { display: inline-flex; margin: 0 15px 10px 0; }

@layer app {
  .path-page { max-width: 1180px; padding: 2.25rem 1.25rem 4rem; }
  .path-heading { margin: 2rem 0 2.25rem; }
  .path-heading .eyebrow { color: var(--primary-hover); font-size: .72rem; letter-spacing: .08em; }
  .path-heading h1 { margin: .65rem 0 .85rem; font-size: clamp(2.3rem, 4vw, 3.5rem); letter-spacing: -.055em; }
  .path-heading > p:last-child { font-size: .95rem; }
  .path-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 2.5rem; align-items: start; }
  .path-main, .path-sidebar { min-width: 0; }
  .path-main > turbo-frame { display: block; }
  .path-overview { padding: 1.5rem; border: 1px solid var(--line); border-radius: 1rem; }
  .path-progress-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; font-size: .85rem; }
  .path-progress-heading span { color: var(--muted); font-size: .75rem; }
  .path-overview progress { display: block; width: 100%; height: .5rem; margin: 1rem 0 1.5rem; overflow: hidden; border: 0; border-radius: 1rem; background: var(--sidebar-background); accent-color: var(--primary); }
  .path-overview progress::-webkit-progress-bar { background: var(--sidebar-background); border-radius: 1rem; }
  .path-overview progress::-webkit-progress-value { background: var(--primary); border-radius: 1rem; }
  .path-overview progress::-moz-progress-bar { background: var(--primary); border-radius: 1rem; }
  .path-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; font-variant-numeric: tabular-nums; }
  .path-stats > div + div { border-left: 1px solid var(--line); padding-left: 1.25rem; }
  .path-stats dt { color: var(--muted); font-size: .72rem; }
  .path-stats dd { margin: .3rem 0 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -.035em; }
  .path-stats dd span { font-size: .85rem; font-weight: 600; }
  .path-next { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.25rem; border-radius: 1rem; background: var(--blue); padding: 1.5rem; }
  .path-label { color: var(--primary-hover); font-size: .73rem; font-weight: 800; }
  .path-next h2 { margin: .55rem 0 .65rem; font-size: 1.4rem; line-height: 1.3; letter-spacing: -.03em; }
  .path-next p:last-child { max-width: 48ch; font-size: .8rem; line-height: 1.7; }
  .path-page .path-next form { flex-shrink: 0; margin: 0; }
  .path-next .button { font-size: .8rem; padding-inline: 1.1rem; }
  .path-roadmap { margin-top: 2.5rem; }
  .path-roadmap-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.8rem; }
  .path-roadmap-heading h2, .path-resources h2 { font-size: 1.35rem; }
  .path-roadmap-heading p { margin-top: .5rem; font-size: .8rem; }
  .path-roadmap-heading > a { flex-shrink: 0; color: var(--primary-hover); font-size: .75rem; font-weight: 700; }
  .path-step { position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 1.25rem; padding-bottom: 1.5rem; }
  .path-step:not(:last-child)::before { position: absolute; top: 2.5rem; bottom: 0; left: calc(1.25rem - .5px); width: 1px; background: var(--line); content: ""; }
  .path-step-number { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--muted); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
  .path-step.is-next .path-step-number { background: var(--primary); border-color: var(--primary); color: white; }
  .path-step.is-complete .path-step-number { background: var(--progress); border-color: var(--progress); color: var(--ink); }
  .path-step-content { min-width: 0; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem 1.5rem; background: var(--card); }
  .path-step.is-next .path-step-content { border-color: var(--blue-dark); background: var(--blue); }
  .path-step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: var(--muted); font-size: .7rem; }
  .path-status { padding: .2rem .6rem; border-radius: .4rem; background: var(--sidebar-background); color: var(--muted); font-weight: 800; }
  .is-next .path-status { background: var(--primary-hover); color: white; }
  .is-complete .path-status { background: var(--progress); color: var(--ink); }
  .path-step h3 { margin: .65rem 0 .6rem; font-size: 1.13rem; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
  .path-step-context { margin-top: 1rem; }
  .path-step-caption { margin-bottom: .35rem; color: var(--ink); font-size: .7rem; font-weight: 800; }
  .path-step-reason { max-width: 62ch; font-size: .82rem; line-height: 1.75; text-wrap: pretty; }
  .path-step-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1.25rem; }
  .path-step-details { min-width: 0; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .5rem; font-size: .75rem; }
  .path-step-details summary { width: fit-content; min-height: 2.75rem; align-content: center; cursor: pointer; color: var(--muted); }
  .path-step-details .study-sources { margin-block: .5rem .75rem; }
  .path-step-details ul { display: grid; gap: .5rem; }
  .path-step-details li { padding: .6rem .75rem; border-radius: .5rem; background: var(--sidebar-background); overflow-wrap: anywhere; }
  .path-step-details a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
  .path-page .path-step-footer > form { max-width: 100%; margin: 0; }
  .path-open-lesson { font-size: .75rem; padding-inline: 1rem; }
  .path-step.is-next .path-open-lesson { background: var(--primary); border-color: var(--primary); color: white; }
  .path-step.is-next .path-open-lesson:hover { background: var(--primary-hover); color: white; }
  .path-priority { min-height: 2.75rem; color: var(--primary-hover); font-size: .72rem; font-weight: 700; text-align: left; }
  .path-page a, .path-page button, .path-page summary { transition: color 180ms ease, background 180ms ease; }
  .path-page a:hover, .path-page .link-button:hover { color: var(--primary); }
  .path-page .button:hover { background: var(--primary-hover); color: white; }
  .path-page .button.secondary:hover { background: var(--blue); color: var(--ink); }
  .path-sidebar { display: grid; gap: 1.5rem; }
  .path-sidebar .study-exams, .path-tools { margin: 0; padding: 1.5rem; border: 0; border-radius: 1rem; background: var(--sidebar-background); }
  .path-sidebar h2 { font-size: 1.05rem; line-height: 1.4; letter-spacing: -.025em; }
  .path-sidebar p { font-size: .78rem; line-height: 1.8; }
  .path-sidebar .study-exams > p, .path-tools > p { margin: .6rem 0 1.25rem; }
  .path-sidebar .study-exams > details { border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .5rem; }
  .path-sidebar summary { font-size: .8rem; line-height: 1.6; }
  .path-sidebar .study-preferences, .path-sidebar .study-records { margin: .75rem 0 0; padding: .5rem 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .path-sidebar .path-tools { padding: 1.5rem; border-radius: 1.5rem; background: white; }
  .path-sidebar .path-tools h2 { font-size: 1.15rem; }
  .path-tools > p:first-of-type { margin: .5rem 0 1.25rem; line-height: 1.65; text-wrap: pretty; }
  .path-settings-link { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem; border-radius: .875rem; background: var(--blue); color: var(--ink); }
  .path-settings-link > span:last-child { font-size: 1.2rem; }
  .path-tools strong { display: block; font-size: .8rem; font-weight: 700; line-height: 1.5; }
  .path-tools small { display: block; margin-top: .2rem; color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.5; }
  .dashboard-playful .app-main .path-tools > details { margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
  .path-sidebar .path-tools > details > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 4.5rem; padding: 1rem .25rem; list-style: none; color: var(--ink); }
  .path-tools > details > summary::-webkit-details-marker { display: none; }
  .path-tools > details > summary::after { content: ""; flex-shrink: 0; width: .4rem; height: .4rem; margin-right: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
  .path-tools > details[open] > summary::after { transform: rotate(225deg); }
  .path-tools > details > summary:hover { color: var(--primary-hover); }
  .path-page .path-settings-link:hover { background: var(--blue-dark); color: var(--ink); }
  .path-tools > details > form { padding-bottom: .75rem; }
  .path-tools textarea { min-width: 0; resize: vertical; font-size: .8rem; }
  .path-sidebar label, .path-sidebar legend { font-size: .75rem; }
  .path-sidebar fieldset { min-width: 0; margin-inline: 0; padding: .75rem; }
  .path-sidebar .button { padding-inline: .75rem; font-size: .75rem; }
  .path-sidebar .path-tools > .path-sidebar-note { margin: 1rem 0 0; padding: 0; font-size: .7rem; line-height: 1.7; }
  .path-main > .field-note { border-top: 1px solid var(--line); padding-top: 1.25rem; font-size: .78rem; }
  .path-main > .field-note a { color: var(--primary-hover); font-weight: 700; }
  .path-resources { padding-block: 1.5rem; border-top: 1px solid var(--line); }
  .path-resources li { margin-top: 1rem; font-size: .82rem; }
  .path-resources a { color: var(--primary-hover); font-weight: 700; }
  .path-resources p { margin-top: .4rem; }
  .path-page .study-empty h2 { margin-bottom: .75rem; font-size: 1.6rem; line-height: 1.3; }
  @media (max-width: 1150px) { .path-layout { grid-template-columns: minmax(0, 1fr) 16rem; gap: 1.5rem; } .path-next { align-items: start; flex-direction: column; gap: 1rem; } }
  @media (max-width: 700px) { .path-page { width: 100%; padding: 1.5rem 1.25rem 3rem; } .path-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; } .path-heading { margin-block: 1.5rem 2rem; } .path-overview, .path-next { padding: 1.25rem; } .path-stats { gap: .5rem; } .path-stats > div + div { padding-left: .75rem; } .path-stats dd { font-size: 1rem; } .path-progress-heading { flex-wrap: wrap; gap: .25rem; } .path-roadmap-heading { align-items: start; flex-direction: column; gap: .75rem; } .path-step { grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: .85rem; } .path-step-meta { gap: .4rem .75rem; } .path-step h3 { font-size: 1.05rem; } }
  @media (prefers-reduced-motion: reduce) { .path-page a, .path-page button, .path-page summary { transition: none; } }
  @media (max-width: 700px) { .path-step-content { padding: 1rem; } .path-step-meta { gap: .5rem; } .path-step-meta > span:last-child { flex-basis: 100%; } }
}
