:root {
  color-scheme: light;
  --navy: #172554;
  --navy-soft: #1e3a8a;
  --ink: #172033;
  --muted: #5b6678;
  --line: #d6dce5;
  --panel: #fff;
  --page: #f1f5f9;
  --blue: #3157a4;
  --blue-pale: #eff6ff;
  --green: #166534;
  --red: #991b1b;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; margin: 0; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}
.app-main { width: min(1000px, calc(100% - 2rem)); margin: 1.5rem auto; }
.privacy-notice, .review-notice { border: 1px solid #bfdbfe; border-radius: .55rem; background: #eff6ff; color: #1e3a5f; padding: .85rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: clamp(1rem, 3vw, 1.5rem); margin: 0 0 1rem; box-shadow: 0 3px 12px #0f172a08; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
h2, h3, p { margin-top: 0; }
.panel-heading h2 { margin-bottom: .2rem; font-size: 1.25rem; }
.panel-heading p { margin-bottom: 0; }
.eyebrow { margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); font-size: .72rem; font-weight: 750; }
.muted { color: var(--muted); }
.small { font-size: .83rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
label { display: block; font-weight: 650; font-size: .9rem; }
input:not([type=checkbox]), select, textarea {
  display: block;
  width: 100%;
  border: 1px solid #aab5c4;
  border-radius: .4rem;
  color: var(--ink);
  background: #fff;
  padding: .65rem .75rem;
  margin-top: .35rem;
}
textarea { min-height: 5rem; resize: vertical; }
.span-two { grid-column: span 2; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; }
.button { min-height: 2.55rem; padding: .55rem .95rem; border: 1px solid transparent; border-radius: .45rem; font-weight: 700; }
a.button { display: inline-flex; align-items: center; text-decoration: none; }
.service-link { color: var(--blue); }
.settings-divider { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.defaults-summary { background: var(--blue-pale); color: var(--navy-soft); border-radius: .4rem; padding: .6rem .8rem; font-size: .86rem; }
#classForm { margin-top: 1rem; }
#storageStatus:empty { display: none; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: #244786; }
.button-secondary { color: #23324b; background: #f8fafc; border-color: #bdc7d5; }
.button-secondary:hover { background: #eef2f7; }
.button-danger { color: var(--red); background: #fff; border-color: #fecaca; }
.button-danger:hover { background: #fef2f2; }
.count-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .3rem .7rem; color: #1e3a8a; background: #eff6ff; font-size: .8rem; font-weight: 750; white-space: nowrap; }
.file-button { display: inline-flex; align-items: center; position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.class-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .55rem; margin-top: .75rem; }
.class-list-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-width: 0; border: 1px solid var(--line); border-radius: .45rem; padding: .5rem .6rem; }
.class-list-item span { overflow-wrap: anywhere; font-size: .88rem; }
.class-list-item .button { min-height: 2rem; padding: .3rem .55rem; font-size: .78rem; flex-shrink: 0; }
.backup-note { margin: .8rem 0 0; }
.status { min-height: 1.3rem; margin: .5rem 0 0; color: var(--green); font-size: .85rem; }
.status.error { color: var(--red); }
.disclosure { margin-top: .6rem; border-top: 1px solid #e2e8f0; padding-top: .75rem; }
.disclosure summary { font-weight: 700; color: var(--blue); }
.disclosure textarea { margin-top: .75rem; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.history-list { display: grid; gap: .65rem; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem; border: 1px solid var(--line); border-radius: .5rem; padding: .75rem; }
.history-item.active { border-color: #60a5fa; background: #f8fbff; }
.history-info { min-width: 0; }
.history-info strong, .history-info span { display: block; overflow-wrap: anywhere; }
.history-info span { color: var(--muted); font-size: .8rem; }
.history-actions { display: flex; gap: .45rem; flex-shrink: 0; }
.history-actions .button { min-height: 2.2rem; padding: .4rem .65rem; font-size: .82rem; }
.history-score { color: var(--blue); font-size: .85rem; margin-top: .3rem; }
.history-notes { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: .5rem; font-size: .85rem; }
.history-notes summary { color: var(--blue); font-weight: 700; }
.history-notes p { margin-top: .5rem; }
.history-panel { margin-top: 1rem; }
.dashboard-notes { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .87rem; }
.conference-sheet { background: #fff; border: 1px solid var(--line); border-radius: .75rem; padding: clamp(1rem, 3vw, 1.75rem); box-shadow: 0 3px 12px #0f172a08; }
.conference-sheet[hidden] { display: none; }
.review-notice { border-color: #fcd34d; background: #fffbeb; color: #78350f; }
.conference-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr); gap: 1.2rem; border-bottom: 2px solid var(--navy); padding-bottom: 1.15rem; }
.conference-summary h2 { margin: .1rem 0; font-size: 1.6rem; }
.book-byline { color: var(--muted); margin: .25rem 0 0; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem 1rem; margin: 0; align-content: center; }
.summary-grid dt { color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.summary-grid dd { margin: .1rem 0 0; font-weight: 650; overflow-wrap: anywhere; }
.summary-focus { grid-column: span 2; }
.score-input-row { display: flex; align-items: center; gap: .5rem; max-width: 13rem; }
.score-input-row input { width: 8rem; }
.question-section { margin-top: 1.5rem; }
.section-title { display: flex; gap: .75rem; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: .65rem; margin-bottom: .75rem; }
.section-title h3 { margin: 0; font-size: 1.1rem; }
.section-title p { margin: .1rem 0 0; color: var(--muted); font-size: .84rem; }
.section-number { display: grid; place-items: center; flex: 0 0 1.8rem; height: 1.8rem; border-radius: 50%; color: #fff; background: var(--navy-soft); font-weight: 800; }
.notes-section label { margin-top: .75rem; }
.notes-input { min-height: 7rem; }
.next-steps-label { margin-top: 1rem !important; }
.quick-notes { margin-top: .85rem; }
.quick-notes__label { margin: 0 0 .4rem; color: var(--muted); font-size: .82rem; font-weight: 650; }
.quick-notes__list { display: flex; flex-wrap: wrap; gap: .45rem; }
.quick-note-chip { min-height: 2.2rem; padding: .35rem .7rem; border: 1px solid #bdc7d5; border-radius: 999px; background: #f8fafc; color: #23324b; font-size: .82rem; font-weight: 650; }
.quick-note-chip:hover { background: #eff6ff; border-color: #60a5fa; }
.quick-note-chip--custom { display: inline-flex; align-items: center; padding: 0; border-color: #bdc7d5; background: #eff6ff; overflow: hidden; }
.quick-note-chip--custom .quick-note-chip__main { border: 0; background: transparent; padding: .35rem .55rem .35rem .75rem; color: #1e3a8a; font-size: .82rem; font-weight: 650; }
.quick-note-chip--custom .quick-note-chip__main:hover { text-decoration: underline; }
.quick-note-chip--custom .quick-note-chip__remove { border: 0; background: transparent; padding: .25rem .6rem; color: #991b1b; font-size: 1rem; line-height: 1; }
.quick-note-chip--custom .quick-note-chip__remove:hover { background: #fef2f2; }
.quick-notes__add { display: flex; align-items: center; gap: .45rem; margin-top: .5rem; }
.quick-notes__add input { flex: 1; max-width: 22rem; margin-top: 0; }
.quick-notes__add .button { min-height: 2.4rem; }
.print-notes { display: none; min-height: 2rem; padding: .5rem; white-space: pre-wrap; overflow-wrap: anywhere; border-bottom: 1px solid #94a3b8; }
.save-status { color: var(--green); font-size: .82rem; margin: .8rem 0 0; }
.save-status.error { color: var(--red); }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem .25rem; color: var(--muted); font-size: .82rem; }
.app-footer p { margin: 0; }
.confirm-dialog { width: min(420px, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: .7rem; padding: 1.25rem; box-shadow: 0 15px 50px #0f172a44; }
.confirm-dialog::backdrop { background: #0f172a88; }
.confirm-dialog h2 { margin-bottom: .5rem; font-size: 1.15rem; }
.dialog-actions { justify-content: flex-end; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.inline-ai-picker { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.inline-ai-picker select { width: auto; margin-top: 0; padding: .45rem .6rem; font-size: .85rem; }
@media (max-width: 700px) {
  .app-main { width: min(100% - 1rem, 600px); margin: .75rem auto; }
  .form-grid, .conference-summary { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .summary-focus { grid-column: auto; }
  .panel-heading { flex-direction: column; }
  .quick-notes__add { flex-direction: column; align-items: stretch; }
  .quick-notes__add input { max-width: none; }
  .history-item { grid-template-columns: 1fr; }
  .app-footer { align-items: flex-start; flex-direction: column; }
}
@media print {
  @page { size: letter; margin: .55in; }
  :root { background: #fff; }
  body { min-width: 0; background: #fff; color: #000; font-size: 10.5pt; }
  .no-print, #setupPanel, #historyPanel, .app-footer { display: none !important; }
  .app-main { width: 100%; margin: 0; }
  .conference-sheet { display: block !important; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .conference-sheet[hidden] { display: none !important; }
  .review-notice { background: #fff; border: 1px solid #777; color: #000; }
  .conference-summary { grid-template-columns: 1fr 1fr; }
  .print-notes { display: block; min-height: 2.4rem; }
  .notes-input { display: none !important; }
  .question-section { break-inside: auto; }
  .section-title { break-inside: avoid; }
}
