:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e2e2e2;
  --muted: #6b6b6b;
  --text: #1a1a1a;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --tag-bg: #f3f4f6;
  --code-bg: #f6f8fa;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
/* Full-bleed modes hide the sidebar entirely. */
body[data-mode="landing"],
body[data-mode="papers-list"],
body[data-mode="topics-list"],
body[data-mode="admin-edit"],
body[data-mode="loading"] {
  grid-template-columns: 1fr;
}
body[data-mode="landing"] #sidebar,
body[data-mode="papers-list"] #sidebar,
body[data-mode="topics-list"] #sidebar,
body[data-mode="admin-edit"] #sidebar,
body[data-mode="loading"] #sidebar { display: none; }

.home-link {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 14px;
  padding: 2px 6px;
  border-radius: 4px;
}
.home-link:hover { background: var(--tag-bg); color: var(--text); }

/* ---------- landing / chooser screens ----------------------------------- */
.choice-screen {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}
.choice-screen h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}
.choice-screen .lede {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 36px 0;
  line-height: 1.55;
}
.choice-screen .back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  text-decoration: none;
}
.choice-screen .back-link:hover { color: var(--text); }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tile-grid--two { grid-template-columns: 1fr 1fr; }

.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 22px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
  cursor: pointer;
}
.tile:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.10);
  transform: translateY(-1px);
}
.tile-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}
.tile-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.3;
}
.tile-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.tile-stats {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.tile-stats b { color: var(--text); font-weight: 600; }

/* Landing mode shows just two big tiles side by side */
.landing-tile {
  padding: 36px 28px 32px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.landing-tile .tile-title { font-size: 22px; }
.landing-tile .tile-meta { font-size: 14px; }

/* year/month grouping on the by-paper chooser */
.year-block { margin-bottom: 36px; }
.year-h {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--text);
  display: inline-block;
}
.month-block { margin-bottom: 18px; }
/* ---------- admin: crop queue + editor ---------------------------------- */
.admin-crop-tile { padding-bottom: 14px; }
.admin-crop-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 10px 0 8px;
}
.admin-crop-reason {
  font-size: 11px;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.admin-editor {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px 96px;
}
.admin-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.admin-header .admin-meta { font-size: 14px; }
.admin-pane {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.admin-instructions {
  background: var(--accent-soft);
  color: #1e3a8a;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.admin-canvas-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: crosshair;
  user-select: none;
}
.admin-canvas-wrap img {
  display: block;
  max-width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}
.adm-bbox {
  position: absolute;
  border: 2px solid #22c55e;
  background: rgba(34, 197, 94, 0.12);
  pointer-events: none;
  display: none;
}
.adm-bbox--current {
  border-style: dashed;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.admin-side {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.admin-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.admin-thumb {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.admin-thumb--preview { background: repeating-conic-gradient(#f0f0f0 0% 25%, #fafafa 0% 50%) 50% / 16px 16px; }
.adm-readout {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.adm-save {
  margin-top: 10px;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.adm-save:disabled { background: var(--border); cursor: not-allowed; }
.adm-status { font-size: 12px; margin-top: 6px; min-height: 16px; }
.adm-status.pending { color: var(--accent); }
.adm-status.ok { color: #166534; }
.adm-status.err { color: #991b1b; }

.tile-slug-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 1px 7px;
  border-radius: 4px;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: 1px;
}
.month-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 4px 0 8px 2px;
}

/* topic-grouped sidebar for topic mode */
.topic-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 2px;
}
.topic-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px 0;
  line-height: 1.2;
}
.topic-section {
  margin-bottom: 14px;
}
.topic-section-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 10px 4px 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  text-transform: none;
}

.nav-question--topic { padding: 8px 10px; }
.nav-question--topic .nav-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nav-question--topic .nav-qnum {
  font-weight: 700;
  font-size: 13px;
}
.nav-question--topic .marks {
  float: none;
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.nav-question--topic .nav-subtopics {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

#sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

#paper-picker {
  width: 100%;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  margin-bottom: 12px;
  cursor: pointer;
}

#sidebar h1 {
  font-size: 16px;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.topic-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.topic-filter:empty { display: none; }
.topic-chip {
  font-family: inherit;
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  color: var(--text);
}
.topic-chip:hover { background: var(--tag-bg); }
.topic-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.nav-subtopics {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0;
  text-transform: none;
}

#nav { display: flex; flex-direction: column; gap: 4px; }

.nav-question {
  font-weight: 600;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-question:hover { background: var(--tag-bg); }
.nav-question.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }

.nav-question .marks {
  float: right;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}

#main {
  padding: 36px 56px 96px;
  max-width: 880px;
}

#content { line-height: 1.6; }

h2.question-header {
  font-size: 26px;
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.topic-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.question-marks {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.part {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 16px;
}

.part .label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.part .label-name {
  font-weight: 700;
  font-size: 15px;
}

.part .label-meta {
  font-size: 11px;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 2px 7px;
  border-radius: 4px;
}

.part .label-meta.long { background: #fef3c7; color: #92400e; }
.part .label-meta.mcq { background: #ede9fe; color: #5b21b6; }
.part .label-meta.table_complete, .part .label-meta.diagram_complete { background: #dcfce7; color: #166534; }

.part.container {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 0;
}
.part.container > .label .label-meta { display: none; }

.part .sub-parts { margin-top: 14px; padding-left: 8px; border-left: 2px solid var(--border); }

.stem p { margin: 0.5em 0; }

.stem code {
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.92em;
}

.stem pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.45;
}

.file-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px 6px 0 0;
  margin-top: 12px;
  margin-bottom: -1px;
  letter-spacing: 0.02em;
}
.file-label + pre {
  margin-top: 0;
  border-top-left-radius: 0;
}
pre + pre, pre + .file-label, pre {
  margin-top: 10px;
}

.stem pre code { background: none; padding: 0; }

.stem table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 14px;
}
.stem th, .stem td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  min-height: 32px;
}
.stem th { background: var(--code-bg); font-weight: 600; }
.stem td:empty::before { content: " "; color: var(--muted); }

.stem td.td-fillable {
  background: #fffbeb;
  outline: 1px dashed #f59e0b;
  outline-offset: -2px;
  cursor: text;
  min-width: 80px;
}
.stem td.td-fillable:empty::before {
  content: attr(data-placeholder);
  color: #c0a059;
  font-style: italic;
}
.stem td.td-fillable:focus {
  background: #fff;
  outline: 2px solid var(--accent);
}

.table-fill-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 6px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--tag-bg);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.option:hover { background: var(--accent-soft); }
.option .opt-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.option.selected { background: var(--accent-soft); }
.option.selected .opt-label { background: var(--accent); border-color: var(--accent); color: #fff; }

.options-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
}

/* SAT answer-key feedback */
.option.option--correct {
  background: #dcfce7;
  outline: 2px solid #16a34a;
}
.option.option--correct .opt-label { background: #16a34a; border-color: #16a34a; color: #fff; }
.option.option--wrong {
  background: #fee2e2;
  outline: 2px solid #dc2626;
}
.option.option--wrong .opt-label { background: #dc2626; border-color: #dc2626; color: #fff; }
.check-status.verdict-correct { color: #16a34a; font-weight: 700; }
.check-status.verdict-incorrect { color: #dc2626; font-weight: 700; }
.check-status.warn { color: #b45309; }
.sat-reveal {
  margin-top: 10px;
  font-size: 14px;
  padding: 8px 12px;
  background: var(--tag-bg);
  border-radius: 6px;
}

.figure {
  margin: 14px 0;
  text-align: center;
}
.figure img {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.figure-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

.draw-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.draw-wrap img { display: block; max-width: 100%; height: auto; }
.draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.draw-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 4px;
  flex-wrap: wrap;
}
.draw-hint {
  font-size: 12px;
  color: var(--muted);
  margin-right: 6px;
}
.draw-tool, .draw-clear {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.draw-tool.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.draw-clear:hover { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.crop-validation {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
}
.crop-validation.ok { background: #dcfce7; color: #166534; }
.crop-validation.fail { background: #fee2e2; color: #991b1b; }

/* -------- answer area + feedback ----------------------------------------- */
.answer-area {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.answer-input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  resize: none;            /* JS handles auto-grow up to a max */
  overflow-y: auto;        /* scroll once max-height hit */
  max-height: 500px;       /* matches AUTOGROW_MAX_PX in app.js */
  min-height: 40px;
  line-height: 1.5;
  background: #fff;
  color: var(--text);
}
.answer-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.answer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.check-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.check-btn:hover { background: #1e4ed8; }
.check-btn:disabled { opacity: 0.6; cursor: wait; }

.check-status {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.check-status.warn { color: #92400e; }
.check-status.err { color: #991b1b; }
.check-status.pending { color: var(--accent); }
.check-status.verdict-correct { color: #166534; }
.check-status.verdict-partial { color: #92400e; }
.check-status.verdict-incorrect { color: #991b1b; }

.feedback {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}
.feedback-header .score { margin-left: auto; font-variant-numeric: tabular-nums; }
.feedback-header .verdict { letter-spacing: 0.04em; }
.feedback-header .reset-btn {
  font-family: inherit;
  font-size: 11px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.8;
}
.feedback-header .reset-btn:hover { opacity: 1; }
.restored-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.5);
  color: inherit;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.feedback-section--primary {
  background: #fffef7;
}
.feedback-section--primary .feedback-h {
  color: var(--text);
  font-size: 12px;
}
.feedback-section--primary .feedback-body {
  font-size: 14.5px;
}
.feedback-header.verdict-correct { background: #dcfce7; color: #166534; }
.feedback-header.verdict-partial { background: #fef3c7; color: #92400e; }
.feedback-header.verdict-incorrect { background: #fee2e2; color: #991b1b; }
.feedback-header .verdict { letter-spacing: 0.04em; }
.feedback-header .score { font-variant-numeric: tabular-nums; }

.feedback-section {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.feedback-section:first-of-type { border-top: none; }
.feedback-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
  cursor: default;
}
details.feedback-section > summary.feedback-h {
  cursor: pointer;
  user-select: none;
}
.feedback-body { font-size: 14px; line-height: 1.55; }
.feedback-body p:first-child { margin-top: 0; }
.feedback-body p:last-child { margin-bottom: 0; }
.feedback-body code { background: var(--code-bg); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

.ms-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 2px 7px;
  border-radius: 4px;
  background: #dcfce7;
  color: #166534;
}
.ms-badge--fallback {
  background: #fef3c7;
  color: #92400e;
}

details.feedback-section.ms-panel > summary.feedback-h {
  color: var(--accent);
}
details.feedback-section.ms-panel[open] {
  background: #f5f9ff;
}
details.feedback-section.ms-panel .feedback-body {
  font-size: 13px;
}
details.feedback-section.ms-panel .feedback-body ul {
  padding-left: 20px;
}

/* -------- follow-up chat ------------------------------------------------- */
details.feedback-section.chat-panel { background: #fafafa; }
details.feedback-section.chat-panel[open] { background: #fff; }
.chat-thread {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 10px;
}
.chat-thread:empty { display: none; }
.chat-turn {
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 90%;
  line-height: 1.5;
}
.chat-turn--user {
  background: var(--accent-soft);
  color: var(--text);
  align-self: flex-end;
}
.chat-turn--assistant {
  background: var(--tag-bg);
  align-self: flex-start;
}
.chat-turn .chat-body p:first-child { margin-top: 0; }
.chat-turn .chat-body p:last-child { margin-bottom: 0; }
.chat-turn .chat-body code { background: var(--code-bg); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

.chat-composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  resize: vertical;
  min-height: 38px;
  line-height: 1.5;
}
.chat-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.chat-send {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.chat-send:disabled { opacity: 0.6; cursor: wait; }
.chat-status { font-size: 11px; color: var(--muted); margin-top: 6px; }
.chat-status.pending { color: var(--accent); }
.chat-status.err { color: #991b1b; }

/* -------- per-part notes ------------------------------------------------- */
.notes-panel {
  margin-top: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fffdf6;
}
.notes-summary {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.notes-input {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 8px;
  background: #fff;
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}
.notes-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.notes-status { font-size: 11px; color: var(--muted); margin-top: 4px; height: 14px; }
.notes-status.ok { color: #166534; }
.notes-status.err { color: #991b1b; }
.notes-status.pending { color: var(--accent); }
