/* Settler notebook. Paper object for the assignment sheet. Shell places it;
   this file only paints the sheet. No side panels, no native select, no emoji. */
.notebook {
  --paper: #faf8f3;
  --paper-low: #f5f0e8;
  --ink: #1c1917;
  --muted: #57534e;
  --quiet: #78716c;
  --line: #e5ddd0;
  --line-strong: #d6cfc2;
  --orange: #c2410c;
  --orange-hover: #ea580c;
  --orange-soft: #fed7aa;
  --orange-wash: #fff7ed;
  --sage: #dceee7;
  --sage-strong: #b8d6ca;
  --focus: #3080ff;
  --shadow: 4px 4px 0 #1c1917;
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(424px, 100%);
  min-height: 0;
  max-height: 100%;
  padding: 28px 28px 26px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='1' cy='1' r='.45' fill='%23e5ddd0' opacity='.58'/%3E%3C/svg%3E");
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--shadow);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
.notebook::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 172px;
  width: 72px;
  height: 17px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  background: var(--line-strong);
}
.notebook::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  background: var(--paper-low);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.notebook .clip {
  position: absolute;
  left: 194px;
  top: -6px;
  width: 28px;
  height: 6px;
  background: var(--ink);
}
.notebook .book-head,
.notebook .book-body {
  position: relative;
  z-index: 1;
}
.notebook .book-head {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.notebook .book-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.notebook .book-kicker {
  margin: 0;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.notebook .book-title {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.06em;
}
.notebook .order-intro {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}
.notebook .order {
  position: relative;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  background: var(--orange-wash);
  box-shadow: 2px 2px 0 var(--line-strong);
}
.notebook .order.old-order {
  border: 2px solid var(--orange);
  background: var(--orange-wash);
}
.notebook .stale-mark {
  position: static;
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 2px 6px;
  border: 2px solid var(--orange);
  background: var(--paper);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}
.notebook .slot {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.notebook .slot:last-of-type { border-bottom: 0; }
.notebook .slot-label {
  flex: 0 0 54px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.notebook .chip {
  display: inline-flex;
  max-width: none;
  align-items: center;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  font-weight: 700;
}
.notebook .chip.wood {
  background: var(--orange-soft);
  border-color: var(--orange);
}
.notebook .chip.stop {
  background: var(--sage);
  border-color: var(--sage-strong);
}
.notebook .chip.strike {
  color: var(--muted);
  text-decoration: line-through 2px var(--orange);
}
.notebook .stale-suggestion {
  margin: 8px 0 2px;
  color: var(--orange);
  font-weight: 700;
}
.notebook .choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 5px 0 6px 62px;
}
.notebook .choice {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.notebook .choice:hover { border-color: var(--ink); background: var(--paper-low); }
.notebook[data-state="edit"] .chip {
  display: none;
}
.notebook .slot.is-fault .slot-label {
  color: var(--orange);
}
.notebook .choice-row.is-fault {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  background: var(--orange-wash);
  padding: 4px;
}
.notebook .choice[aria-pressed="true"],
.notebook .choice.is-active {
  color: var(--ink);
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 2px 2px 0 var(--orange);
}
.notebook .choice:disabled { cursor: wait; opacity: .7; }
.notebook .field-label {
  display: block;
  margin: 10px 0 4px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.notebook .delegation-note {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 6px 8px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.notebook .hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.notebook .plan {
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--line-strong);
}
.notebook .plan-line {
  margin: 0 0 4px;
  font-size: 13px;
}
.notebook .plan-line:last-child { margin-bottom: 0; }
.notebook .ada-says {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.025em;
}
.notebook .paraphrase,
.notebook .pause-cost,
.notebook .delegation-status {
  margin: 8px 0 0;
}
.notebook .pause-cost {
  padding: 6px 8px;
  border: 1px solid var(--sage-strong);
  background: var(--sage);
  font-weight: 700;
}
.notebook .book-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  background: var(--paper);
}
.notebook .book-body .book-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.notebook-sheet-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.notebook .approve,
.notebook .redo {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--orange);
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.notebook .approve {
  background: var(--orange);
  color: #fff;
}
.notebook .approve:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.notebook .approve:disabled { opacity: .7; cursor: wait; }
.notebook .redo {
  background: var(--paper);
  color: var(--orange);
  text-decoration: underline 2px var(--orange);
  text-underline-offset: 3px;
}
.notebook .redo:hover { background: var(--orange-wash); }
.notebook .stamp {
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--sage);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.notebook button:focus-visible,
.notebook textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.notebook .source-list { margin-left: 0; }
.notebook .mentorship {
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--line-strong);
}
.notebook .alert-marks {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
}
.notebook .alert[data-robot] {
  width: 12px;
  height: 12px;
  border: 2px solid var(--orange);
  background: var(--orange-soft);
  box-shadow: 4px 4px 0 #c2410c;
  animation: notebook-alert-pulse 1.2s ease-in-out infinite;
}
@keyframes notebook-alert-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 4px 4px 0 #c2410c; }
  50% { opacity: 0.65; transform: scale(1.08); box-shadow: 6px 6px 0 #c2410c; }
}

@media (prefers-reduced-motion: reduce) {
  .notebook .stale-mark,
  .notebook .stamp { transform: none; }
  .notebook .alert[data-robot] { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 900px), (max-height: 520px) {
  .notebook {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 14px 12px 12px;
  }
  .notebook .book-head {
    align-items: center;
    gap: 6px 8px;
    padding-bottom: 8px;
  }
  .notebook .book-kicker {
    width: 100%;
    font-size: 10px;
  }
  .notebook .book-title {
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: -.04em;
    flex: 1 1 auto;
    min-width: 0;
  }
  .notebook-sheet-toggle { display: inline-flex; }
  .notebook .approve,
  .notebook .redo,
  .notebook .choice,
  .notebook-sheet-toggle,
  .notebook .delegation-note {
    min-height: 44px;
  }
  .notebook .choice {
    padding: 8px 10px;
    font-size: 13px;
  }
  .notebook .delegation-note { font-size: 16px; }
  .notebook .alert-marks { top: 8px; right: 8px; }
}
@media (max-height: 520px) {
  .notebook { padding-top: 8px; padding-bottom: 8px; }
  .notebook .book-kicker { display: none; }
  .notebook .book-head { padding-bottom: 0; }
  .notebook .book-actions { margin-top: 2px; padding-top: 2px; }
}

/* The notebook belongs to the same quiet, opaque control family as the HUD.
   These declarations deliberately supersede the earlier paper-object skin. */
.notebook {
  --paper: oklch(98% .006 235);
  --paper-low: oklch(95% .009 235);
  --ink: oklch(29% .055 258);
  --muted: oklch(47% .035 251);
  --quiet: oklch(58% .027 251);
  --line: oklch(89% .017 235);
  --line-strong: oklch(84% .024 235);
  --orange: oklch(73% .15 54);
  --orange-hover: oklch(67% .15 54);
  --orange-soft: oklch(91% .07 64);
  --orange-wash: oklch(96% .026 64);
  --sage: oklch(93% .032 153);
  --sage-strong: oklch(78% .055 153);
  --focus: oklch(49% .21 260);
  --blue: oklch(49% .21 260);
  --blue-hover: oklch(43% .19 260);
  --blue-wash: oklch(94% .034 260);
  --shadow: 0 7px 18px rgb(24 45 70 / .12), 0 1px 2px rgb(24 45 70 / .08);
  padding: 20px;
  background: var(--paper);
  border-color: var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-family: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif);
}
.notebook::before,
.notebook::after,
.notebook .clip { display: none; }
.notebook .book-head { gap: 12px; padding-bottom: 12px; border-color: var(--line-strong); }
.notebook .book-kicker { color: var(--muted); }
.notebook .book-title { font-family: inherit; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.notebook .order,
.notebook .plan,
.notebook .mentorship { border-color: var(--line-strong); background: var(--paper-low); box-shadow: none; border-radius: 10px; }
.notebook .order.old-order { border-color: var(--orange); }
.notebook .stale-mark { border: 1px solid var(--orange); border-radius: 999px; background: var(--orange-wash); }
.notebook .chip { border-color: var(--line-strong); border-radius: 999px; background: var(--paper); }
.notebook .chip.wood { background: var(--orange-soft); border-color: var(--orange); }
.notebook .choice {
  min-height: 32px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
}
.notebook .choice:hover { border-color: var(--blue); background: var(--blue-wash); }
.notebook .choice[aria-pressed="true"],
.notebook .choice.is-active { color: oklch(99% .004 260); border-color: var(--blue); background: var(--blue); box-shadow: none; }
.notebook .choice-row.is-fault { outline-color: var(--orange); background: var(--orange-wash); border-radius: 10px; }
.notebook .delegation-note { border-color: var(--line-strong); border-radius: 10px; background: var(--paper); }
.notebook .book-actions { background: var(--paper); }
.notebook-sheet-toggle {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: var(--paper-low);
  color: var(--blue);
}
.notebook .approve,
.notebook .redo { border-radius: 10px; border-color: var(--blue); }
.notebook .approve { background: var(--blue); color: oklch(99% .004 260); }
.notebook .approve:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.notebook .redo { color: var(--blue); background: var(--paper); text-decoration-color: var(--blue); }
.notebook .redo:hover { background: var(--blue-wash); }
.notebook .stamp { border: 1px solid var(--sage-strong); border-radius: 999px; }
.notebook .alert[data-robot] { border-color: var(--orange); background: var(--orange-soft); box-shadow: none; }
@keyframes notebook-alert-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: none; }
  50% { opacity: .72; transform: scale(1.04); box-shadow: none; }
}
.notebook button:disabled { opacity: 1; color: var(--muted); background: var(--paper-low); border-color: var(--line-strong); }
.notebook .approve:disabled { color: oklch(45% .025 251); background: oklch(88% .018 244); border-color: oklch(80% .024 244); }
