.notebook-page { max-width: 1250px; }
.notebook-page [hidden] { display: none !important; }
.notebook-heading { margin-bottom: 1.5rem; }
.notebook-heading h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.12; margin: .6rem 0; letter-spacing: -.04em; max-width: none; }
.notebook-heading p { max-width: 750px; color: var(--muted); margin-bottom: 0; }
.notebook-page button { font: inherit; cursor: pointer; }
.notebook-page .button { font-weight: 750; border: 1px solid transparent; }
.notebook-page .button.primary { background: #0b65bc; }
.notebook-page .button.secondary { border-color: var(--line); }
.notebook-page button:disabled { cursor: default; opacity: .5; box-shadow: none; }
.nb-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.nb-jump { margin: 0 0 1rem; gap: 1.5rem; }
.nb-filebar { background: var(--navy-900); color: #fff; padding: 1.1rem 1.25rem; border-radius: 14px; }
.nb-filebar p { margin: .7rem 0 0; font-size: .9rem; }
.nb-filebar .needs-download { color: #ffdc89; }
.nb-storage-note { font-size: .9rem; margin: 1rem 0 1.5rem; color: #475a70; max-width: 1000px; }
.nb-message { background: #e7f3ff; color: #123765; border-left: 4px solid #0b65bc; padding: 1rem; border-radius: 5px; overflow-wrap: anywhere; }
.nb-message.error { color: #762526; background: #fff0ef; border-color: #b33131; }
.nb-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.3rem; align-items: start; }
.nb-editor, .nb-collection { min-width: 0; background: white; padding: 1.35rem; border: 1px solid var(--line); border-radius: 16px; }
.nb-editor { border-top: 4px solid #0b65bc; }
.nb-section-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; justify-content: space-between; margin-bottom: 1rem; }
.nb-section-top h2 { font-size: 1.4rem; margin: 0; letter-spacing: -.025em; scroll-margin-top: 110px; }
.nb-section-top > span { font-size: .9rem; color: #475a70; }
.nb-text-button { background: none; border: none; padding: .6rem .25rem; color: #0b5ead; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.notebook-page label { display: flex; flex-direction: column; gap: .4rem; font-weight: 650; font-size: .9rem; margin-bottom: 1rem; }
.notebook-page label > span { font-weight: 400; display: contents; }
.notebook-page input:not([type=checkbox]), .notebook-page textarea, .notebook-page select { width: 100%; min-width: 0; color: var(--ink); background: #fafcff; border: 1px solid #a7bbce; border-radius: 8px; padding: .65rem .75rem; font: inherit; font-size: 1rem; line-height: 1.5; min-height: 46px; }
.notebook-page textarea { resize: vertical; }
.notebook-page input::placeholder, .notebook-page textarea::placeholder { color: #607085; opacity: 1; }
.notebook-page input:focus-visible, .notebook-page textarea:focus-visible, .notebook-page select:focus-visible, .notebook-page summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.nb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.notebook-page .nb-check { flex-direction: row; align-items: center; gap: .65rem; font-weight: 500; min-height: 44px; }
.nb-check input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: #0b65bc; }
.nb-prompt { font-size: .9rem; padding: .9rem; background: #edf6ff; color: #123765; border-radius: 8px; }
.nb-help { font-size: .875rem; line-height: 1.6; color: #53667a; margin: .7rem 0 1.2rem; }
.nb-stage-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0 1.4rem; }
.nb-stage-counts div { background: #edf5fe; border-radius: 10px; padding: .7rem; }
.nb-stage-counts strong { display: block; color: #123765; font-size: 1.5rem; }
.nb-stage-counts span { font-size: .875rem; }
.nb-entry { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.nb-entry h3 { font-size: 1.1rem; line-height: 1.35; margin-bottom: .55rem; white-space: pre-wrap; }
.nb-entry-meta { font-size: .875rem; color: #53667a; margin-bottom: .6rem; }
.nb-stage-label { color: #174c80; font-size: .875rem; margin-bottom: .5rem; }
.nb-entry > a { font-size: .9rem; }
.nb-entry details { margin: .65rem 0; }
.nb-entry summary { padding: .5rem 0; cursor: pointer; color: #0b5ead; font-size: .95rem; }
.nb-entry dl { margin: .5rem 0 1rem; }
.nb-entry dt { font-size: .9rem; font-weight: 750; margin-top: .9rem; }
.nb-entry dd { margin: .25rem 0 0; white-space: pre-wrap; font-size: 1rem; }
.nb-entry .nb-check { margin-bottom: 0; }
.nb-entry-actions { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.nb-empty { padding: 1.6rem 1.1rem; background: #f3f7fc; border: 1px dashed #a7bbce; border-radius: 12px; }
.nb-empty h3 { font-size: 1.1rem; }
.nb-empty p { color: #53667a; margin: 0; }
.nb-export { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.4rem; }
.nb-export h3 { font-size: 1.1rem; }
.nb-export p { font-size: .9rem; color: #53667a; }
.nb-print-sheet { display: none; }
.nb-view-switch, .nb-mode-switch { display: flex; flex-wrap: wrap; gap: .4rem; padding: .4rem; border: 1px solid #b4c9dd; border-radius: 12px; background: #eaf2fb; margin-bottom: 1.2rem; }
.nb-view-switch button, .nb-mode-switch button { flex: 1; min-height: 46px; padding: .65rem 1rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #123765; font-weight: 700; }
.nb-mode-switch button { font-size: .9rem; }
.nb-view-switch button[aria-pressed=true], .nb-mode-switch button[aria-pressed=true] { background: #123765; color: #fff; }
.nb-entry-context { border: 1px solid var(--line); border-radius: 10px; padding: .8rem; margin: .8rem 0 1rem; }
.nb-entry-context summary, .nb-board-entry summary { cursor: pointer; padding: .4rem 0; font-weight: 650; color: #0b5ead; }
.nb-entry-context[open] summary { margin-bottom: 1rem; }
.nb-reflection-fields { border-top: 1px solid var(--line); padding-top: 1rem; }
.nb-reflection-fields h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.nb-analysis-view { padding: 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.nb-analysis-view h2 { scroll-margin-top: 110px; }
.nb-analysis-view > label { max-width: 650px; }
.nb-timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: development; }
.nb-timeline-entry { border-left: 4px solid #1476d4; padding: 1.2rem; margin-bottom: 1.4rem; background: #f5f8fc; border-radius: 0 12px 12px 0; overflow-wrap: anywhere; }
.nb-timeline-entry h3 { font-size: 1.2rem; }
.nb-timeline-entry h4 { margin: .8rem 0 .6rem; font-size: 1rem; }
.nb-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.nb-comparison section { padding: 1rem; border: 1px solid #dce6f0; border-radius: 10px; background: #fff; }
.nb-comparison h4 { margin-top: 0; color: #123765; border-bottom: 2px solid #dcefff; padding-bottom: .6rem; }
.nb-comparison strong { font-size: .875rem; color: #53667a; }
.nb-student-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .4rem 0 1rem; }
.nb-selection-tools { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; }
.nb-selection-tools .nb-check { margin-bottom: 0; margin-right: auto; }
.nb-selection-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.nb-board-lane { min-width: 0; padding: 1rem; background: #f3f7fc; border-radius: 12px; border-top: 4px solid #1476d4; }
.nb-board-lane[data-stage=unassigned] { border-top-color: #758ba3; }
.nb-board-lane > h3 { font-size: 1.05rem; line-height: 1.4; margin-bottom: .4rem; }
.nb-board-entry { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; margin-top: 1rem; background: #fff; overflow-wrap: anywhere; }
.nb-board-entry h4 { font-size: 1.1rem; line-height: 1.4; margin: 0 0 .5rem; }
.nb-board-entry summary { font-size: .95rem; }
.nb-review-prompts dt { font-size: .9rem; font-weight: 700; margin-top: 1rem; }
.nb-review-prompts dd { margin: .5rem 0 0; }
.nb-note-label { display: inline-block; background: #e6f0fc; color: #174c80; font-size: .875rem; padding: .2rem .5rem; border-radius: 5px; }
.quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1120px) { .nb-workspace { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .nb-pair, .quick-grid { grid-template-columns: 1fr; }
  .nb-pair { gap: 0; }
  .nb-actions > .button { flex: 1 1 100%; }
  .nb-editor, .nb-collection { padding: 1rem; }
  .nb-analysis-view { padding: 1rem; }
  .nb-comparison, .nb-selection-board { grid-template-columns: 1fr; }
  .nb-view-switch button { flex-basis: 100%; }
  .nb-mode-switch button { padding: .6rem .5rem; }
  .nb-selection-tools .button { width: 100%; }
}
@media print {
  body.print-notebook-mode > :not(.nb-print-sheet) { display: none !important; }
  body.print-notebook-mode { background: white; min-width: 0; }
  body.print-notebook-mode .nb-print-sheet { display: block; color: #000; }
  .nb-print-sheet pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 11pt/1.6 Arial, sans-serif; }
}
