/* Public sample only. The private notebook keeps its existing layout. */
.demo-page { overflow-wrap: anywhere; }
.demo-header, .demo-footer {
  width: calc(100% - 64px); max-width: 1060px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.demo-header { min-height: 92px; border-bottom: 1px solid var(--line); }
.demo-header nav { display: flex; align-items: center; gap: 22px; font-size: .78rem; }
.demo-header nav a, .demo-footer a { color: var(--ink-2); text-decoration: none; }
.demo-header nav a:hover, .demo-footer a:hover { text-decoration: underline; }
.demo-header .brand { flex-shrink: 0; }
.demo-shell { max-width: 1060px; padding-top: 28px; }
.demo-intro { max-width: 680px; padding: 0 0 28px; }
.demo-intro > p:not(.eyebrow) { font-size: .9rem; color: var(--ink-2); line-height: 1.8; margin-bottom: 14px; }
.demo-badge { display: inline-block; padding: 5px 11px; background: var(--note-mint); border-radius: 4px; font-size: .72rem; font-weight: 600; }
.demo-lesson-heading > .handwritten { color: var(--teal-dark); margin-bottom: 10px; }
.demo-lesson-heading h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.1; margin-bottom: 18px; }
.demo-lesson-heading .big-idea { font-size: 1rem; line-height: 1.8; margin-bottom: 24px; }
.demo-drawing { margin: 0 0 24px; }
.demo-drawing a { display: block; border-radius: 5px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; }
.demo-drawing img { width: 100%; height: auto; display: block; }
.demo-drawing figcaption { color: var(--muted); font-size: .7rem; margin-top: 9px; }
.demo-scenario { margin-top: 26px; }
.demo-page .note-section-title > .handwritten,
.demo-cards summary > span { flex-shrink: 0; white-space: nowrap; }
.demo-question { border: 1px solid var(--line); border-radius: 7px; padding: 26px; background: var(--paper); margin: 16px 0; }
.demo-question h3 { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.demo-question-scenario { font-size: .92rem; line-height: 1.8; }
.demo-question fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.demo-question legend { font-size: .95rem; font-weight: 650; line-height: 1.6; margin-bottom: 15px; }
.demo-option { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; margin-bottom: 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); font-size: .84rem; line-height: 1.65; cursor: pointer; }
.demo-option input { width: 17px; height: 17px; min-height: 17px; flex: 0 0 17px; margin: 3px 0 0; accent-color: var(--teal-dark); }
.demo-option:has(input:checked) { border-color: var(--teal-dark); background: var(--note-blue); }
.demo-option.is-correct { border-color: var(--green); background: var(--note-mint); }
.demo-option.is-wrong { border-color: var(--danger); background: var(--note-pink); }
.demo-question fieldset:disabled .demo-option { cursor: default; }
.demo-quiz-progress { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .73rem; color: var(--muted); margin-top: 23px; }
.demo-quiz-progress progress { width: 120px; height: 7px; accent-color: var(--teal-dark); }
.demo-feedback { font-size: .84rem; line-height: 1.8; }
.demo-feedback [data-answer-status]:empty { margin: 0; }
.demo-feedback [data-answer-status]:not(:empty) { font-weight: 650; margin-top: 19px; }
.demo-feedback p { margin-bottom: 12px; }
.demo-feedback p:last-child { margin-bottom: 18px; }
.demo-quiz-result { background: var(--note-mint); padding: 30px; border: 1px solid var(--line); border-radius: 7px; margin-top: 20px; }
.demo-quiz-result h3 { font-size: 1.5rem; letter-spacing: -.03em; }
.demo-quiz-result > p:not(.handwritten) { font-size: .9rem; }
.demo-cards details > div p { margin: 0; }
.demo-overview { max-width: 730px; padding: 48px 0 0; }
.demo-overview h2 { margin-bottom: 17px; }
.demo-overview > p:not(.eyebrow) { color: var(--ink-2); font-size: .9rem; line-height: 1.8; }
.demo-chapters { margin: 25px 0; padding: 17px 0; border-block: 1px solid var(--line); font-size: .84rem; }
.demo-chapters summary { cursor: pointer; font-weight: 600; }
.demo-chapters ol { padding: 10px 0 0; list-style: none; }
.demo-chapters li { display: flex; gap: 20px; align-items: baseline; padding: 10px 0; }
.demo-chapters .handwritten { min-width: 24px; color: var(--teal-dark); }
.demo-chapters p { margin: 4px 0 0; color: var(--muted); font-size: .77rem; }
.demo-footer { border-top: 1px solid var(--line); padding: 24px 0 32px; color: var(--muted); font-size: .75rem; }
@media (max-width: 760px) {
  .demo-header, .demo-footer { width: calc(100% - 32px); }
  .demo-header { flex-wrap: wrap; gap: 8px; padding: 18px 0 12px; }
  .demo-header nav { flex-wrap: wrap; gap: 16px; font-size: .72rem; }
  .demo-header nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .demo-header .brand { min-height: 44px; }
  .demo-page .study-page { padding: 24px 20px; }
  .demo-page .page-tabs { flex-wrap: wrap; gap: 12px 18px; }
  .demo-page .page-tabs a { font-size: .73rem; padding: 6px 0; }
  .demo-question { padding: 18px 16px; }
  .demo-quiz-result { padding: 24px 18px; }
  .demo-footer { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
}
@media print {
  .demo-header nav, .demo-question button, .demo-footer, .demo-quiz-progress { display: none !important; }
}
