/* The Conclave — Library mode (ivory) and Situation Room mode (obsidian). */
:root {
  --teal-deep: #0E3B43;
  --teal: #1F7A7A;
  --teal-soft: #E6F0EE;
  --ivory: #F7F3EA;
  --paper: #FFFFFF;
  --line: #E4DED0;
  --line-soft: #EFEAE0;
  --ink: #1B2A2E;
  --ink-2: #3F4B52;
  --slate: #5B6770;
  --brass: #B08D57;
  --brass-ink: #6B4F1F;
  --coral: #B6472F;
  --obsidian: #111417;
  --obsidian-2: #1A1F23;
  --obsidian-line: #2A3136;
  --night-ink: #F2EEE4;
  --night-2: #C9D2D3;
  --night-3: #9AA7AA;
  --night-teal: #7CC2BC;
  --night-coral: #E88C75;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 35, 0.04);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--ivory); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
a { color: var(--teal-deep); }
a:hover { color: var(--teal); }
h1, h2, h3 { font-family: var(--serif); color: var(--teal-deep); font-weight: 600; line-height: 1.12; margin: 0 0 0.4em; }
h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 500; }
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); margin-bottom: 10px; }
.muted { color: var(--slate); }
.small { font-size: 13.5px; }
.loading { padding: 80px 24px; text-align: center; color: var(--slate); }

/* Top bar */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal-deep); font-family: var(--serif); font-size: 26px; font-weight: 600; }
.brand svg { flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 9px 12px; border-radius: 8px; font-size: 14.5px; }
.nav a[aria-current="page"] { background: #ECE6D8; color: var(--teal-deep); font-weight: 600; }
.topbar .actions { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--teal-deep); background: var(--teal-deep); color: var(--ivory); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: #0A2E34; color: var(--ivory); }
.btn.secondary { background: transparent; color: var(--teal-deep); }
.btn.secondary:hover { background: var(--teal-soft); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 12px; }
.btn.danger { background: var(--coral); border-color: var(--coral); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Forms */
label { display: block; font-weight: 500; font-size: 14.5px; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea { width: 100%; font: 400 16px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid #CFC7B6; border-radius: 10px; padding: 12px 14px; min-height: 46px; }
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 18px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--teal-deep); }
.error { color: var(--coral); font-size: 14px; margin-top: 8px; }
.notice { background: var(--teal-soft); border-radius: 10px; padding: 14px 18px; color: var(--teal-deep); }
.notice.warn { background: #F4ECDC; color: var(--brass-ink); }

/* Cards and grids */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card.feature { border: 2px solid var(--teal); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.section { padding: 56px 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-deep); font-weight: 500; }
.pill.brass { background: #F4ECDC; color: var(--brass-ink); }
.pill.grey { background: #F1EFEA; color: var(--slate); }
.pill.coral { background: #F8E3DD; color: #8C3522; }
.tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: #1F6B6B; text-transform: uppercase; }

/* Hero */
.hero { background: var(--teal-deep); color: var(--ivory); padding: 72px 0 64px; }
.hero h1 { color: var(--ivory); max-width: 820px; }
.hero p { color: #D6E4E2; font-size: 18px; max-width: 700px; }
.hero .eyebrow { color: #9FD3CE; }
.hero .btn { background: var(--ivory); color: var(--teal-deep); border-color: var(--ivory); }
.hero .btn.secondary { background: transparent; color: var(--ivory); border-color: #6FA7A2; }

/* Plans */
.toggle { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #D8D1C1; border-radius: 999px; background: var(--paper); }
.toggle button { min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--teal-deep); font: 500 14px var(--sans); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--teal-deep); color: var(--ivory); }
.plan h3 { font-size: 30px; margin-bottom: 4px; }
.price { font-size: 28px; font-weight: 600; margin: 14px 0 2px; }
.price { white-space: nowrap; }
.price small { font-size: 14px; color: var(--slate); font-weight: 400; }
.ticks { list-style: none; padding: 0; margin: 16px 0; font-size: 14.5px; }
.ticks li { padding-left: 26px; position: relative; margin: 8px 0; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.ticks li.no::before { border: 0; width: 10px; height: 2px; background: #C9C1AF; transform: none; top: 11px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.table-wrap { overflow-x: auto; }

/* Progress */
.bar { height: 8px; border-radius: 4px; background: #ECE6D8; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.seals { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; text-align: center; }
@media (max-width: 640px) { .seals { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.seal { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #D8D1C1; background: var(--paper); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; text-align: left; }
.chip[aria-pressed="true"] { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--ivory); }
.progressline { height: 3px; background: var(--line); }
.progressline > span { display: block; height: 3px; background: var(--brass); transition: width 300ms ease; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Situation Room */
.room { background: var(--obsidian); color: var(--night-ink); min-height: calc(100vh - 69px); }
.room h1, .room h2, .room h3 { color: var(--night-ink); }
.room .muted { color: var(--night-3); }
.room .card { background: var(--obsidian-2); border-color: var(--obsidian-line); color: var(--night-ink); box-shadow: none; }
.room .btn { background: var(--teal); border-color: var(--teal); color: #fff; }
.room .btn.secondary { background: transparent; border-color: #3A4247; color: var(--night-2); }
.room .clock { font-family: var(--mono); font-size: 22px; }
.room .obligation { font-family: var(--mono); font-size: 12.5px; color: var(--night-coral); }
.room textarea { background: var(--obsidian-2); color: var(--night-ink); border-color: #3A4247; min-height: 80px; }
.room .bar { background: var(--obsidian-line); }
.room .bar > span { background: var(--night-teal); }
.room .bar > span.low { background: var(--night-coral); }
.narrative { font-family: var(--serif); font-size: 22px; line-height: 1.4; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 10px; border: 1px solid #2F373C; background: var(--obsidian-2); color: var(--night-ink); font: 400 15px var(--sans); text-align: left; cursor: pointer; }
.option:hover { border-color: var(--night-teal); }
.option .kind { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--night-3); text-transform: uppercase; }
.log { display: flex; flex-direction: column; gap: 14px; }
.log .you { align-self: flex-end; background: #16282A; border: 1px solid #2F5B5E; border-radius: 12px; padding: 10px 14px; max-width: 80%; font-size: 14.5px; }
.speaker { font-size: 13px; color: var(--night-3); margin-bottom: 6px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
@media (max-width: 900px) { .room-grid { grid-template-columns: 1fr; } }

/* Admin */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.kpi { font-family: var(--serif); font-size: 40px; color: var(--teal-deep); font-weight: 600; line-height: 1; }
pre.code { background: #F1EDE3; border-radius: 10px; padding: 14px; overflow: auto; font: 12.5px var(--mono); max-height: 460px; white-space: pre-wrap; }

/* Footer and toast */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--slate); font-size: 13.5px; background: var(--ivory); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--teal-deep); color: var(--ivory); padding: 12px 18px; border-radius: 10px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity 200ms ease; max-width: 90vw; z-index: 40; }
.toast.show { opacity: 1; }
.test-banner { background: #F4ECDC; color: var(--brass-ink); text-align: center; font-size: 13px; padding: 8px 16px; }
.refs { margin: 6px 0 0; padding-left: 18px; } .refs li { margin: 4px 0; } details > summary { cursor: pointer; }

/* 2.7.0: reference votes, plan choice in Billing, form labels without a control */
.linkish { background: none; border: 0; padding: 0; color: var(--teal-deep); font: inherit; text-decoration: underline; cursor: pointer; min-height: 24px; }
.ref-votes select { display: inline-block; width: auto; min-height: 28px; padding: 2px 6px; font-size: 13px; margin-left: 6px; }
.option-card { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.option-card[aria-pressed="true"] { border-color: var(--teal-deep); box-shadow: 0 0 0 2px var(--teal-deep) inset; }
.label { display: block; font-weight: 600; margin-bottom: 6px; }
.row > select, .row > input { width: auto; flex: 0 1 auto; }

/* ---------------------------------------------------------------------------------------------------------
   2.8.0 Situation Room. The member's decisions are the boldest thing on the page (brass); the notepad is the
   one warm object in a dark room; links are readable on dark; one orchestrated reveal after each decision. */
:root { --brass-night: #D9B77A; --pad: #F7E78C; --pad-line: #A9C1DB; --pad-margin: #D16A5B; --pad-ink: #22303A; --hand: 'Kalam', 'Bradley Hand', 'Segoe Print', cursive; }
.room a { color: var(--night-teal); text-underline-offset: 3px; }
.room a:hover { color: #A8E0DA; }
.room .refs .muted { color: var(--night-2); }
.room .linkish { color: var(--night-teal); }
.room select, .room input[type=text], .room input[type=search] { background: var(--obsidian-2); color: var(--night-ink); border-color: #3A4247; }
.room-pad { padding-top: 28px; padding-bottom: 64px; }
.room h1 { font-size: clamp(30px, 4vw, 44px); margin: 0; }
.room h2 { font-size: 26px; }

/* Role */
.role-banner { border-left: 4px solid var(--brass-night); padding: 6px 0 6px 18px; margin-bottom: 22px; }
.role-title { font-family: var(--serif); font-size: 28px; line-height: 1.2; color: var(--night-ink); }
.role-title strong { color: var(--brass-night); font-weight: 600; }
.role-banner p { margin: 4px 0 0; max-width: 70ch; }
.brief-start { max-width: 760px; padding: 24px 0; }
.brief-start > * + * { margin-top: 18px; }
.premise { font-family: var(--serif); font-size: 23px; line-height: 1.45; color: var(--night-ink); }
.role-pick { border: 1px solid #3A4247; border-left: 4px solid var(--brass-night); border-radius: 12px; padding: 22px 24px; background: var(--obsidian-2); }
.role-pick select { max-width: 420px; }

/* Head: title, decision clock, ledger */
.room-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 28px; align-items: center; margin-bottom: 26px; }
.room-head p { margin: 0 0 4px; }
@media (max-width: 900px) { .room-head { grid-template-columns: 1fr; gap: 16px; } }
.clockbox { display: flex; gap: 12px; align-items: center; }
.ring circle { fill: none; stroke-width: 6; }
.ring .ring-track { stroke: var(--obsidian-line); }
.ring .ring-used { stroke: var(--night-teal); stroke-linecap: round; transition: stroke-dasharray 900ms ease; }
.ring.late .ring-used { stroke: var(--brass-night); }
.ring.overdue .ring-used { stroke: var(--night-coral); }
.ring.overdue { animation: throb 2.4s ease-in-out infinite; }
@keyframes throb { 50% { opacity: 0.6; } }
.room .clock { font-family: var(--mono); font-size: 22px; }
.window { font-size: 14px; color: var(--night-2); }
.window.overdue { color: var(--night-coral); font-weight: 600; }
.ledger { min-width: 230px; max-width: 360px; }
.ledger summary { list-style: none; display: flex; flex-direction: column; cursor: pointer; padding: 10px 14px; border: 1px solid var(--obsidian-line); border-radius: 10px; }
.ledger summary::-webkit-details-marker { display: none; }
.ledger summary:hover { border-color: var(--brass-night); }
.ledger-total { font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--brass-night); font-variant-numeric: tabular-nums; }
.ledger details[open] { background: var(--obsidian-2); border-radius: 10px; }
.ledger details[open] > :not(summary) { padding: 0 14px; }
.ledger-lines { list-style: none; padding: 0; margin: 8px 0; max-height: 260px; overflow: auto; font-size: 13.5px; }
.ledger-lines li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 0; border-bottom: 1px solid var(--obsidian-line); }
.ledger-lines .amt { font-family: var(--mono); }
.ledger-lines .saving .amt { color: var(--night-teal); }
.ledger-lines .fee .amt { color: var(--brass-night); }
.ledger-lines .when { grid-column: 1 / -1; font-size: 12px; }

/* The story */
.story { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.update { border-left: 2px solid var(--obsidian-line); padding: 2px 0 2px 18px; }
.update h3 { font-size: 21px; margin-bottom: 2px; color: var(--night-2); }
.speaker { font-size: 13.5px; color: var(--night-3); margin: 0 0 6px; }
.narrative.small-n { font-size: 18px; color: var(--night-2); margin: 0; }
.decision { background: linear-gradient(90deg, rgba(217, 183, 122, 0.14), rgba(217, 183, 122, 0.03)); border: 1px solid rgba(217, 183, 122, 0.5); border-left: 6px solid var(--brass-night); border-radius: 12px; padding: 18px 22px; margin-left: 6%; }
.decision.pending { border-style: dashed; border-left-style: solid; }
.d-kicker { color: var(--brass-night); font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.d-text { font-family: var(--serif); font-size: 27px; line-height: 1.25; color: #FFF8EA; margin: 0 0 10px; }
.d-effects { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-d { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--night-2); }
.chip-d.up { background: rgba(124, 194, 188, 0.16); color: #A8E0DA; }
.chip-d.down { background: rgba(232, 140, 117, 0.16); color: #F2B1A1; }
.chip-d.cost { background: rgba(217, 183, 122, 0.16); color: var(--brass-night); }
.now { background: var(--obsidian-2); border: 1px solid var(--obsidian-line); border-radius: 14px; padding: 24px 26px; }
.now > p.muted { margin: 0 0 6px; }
.now .headline { font-size: clamp(28px, 3.4vw, 38px); color: #FFF8EA; margin-bottom: 8px; }
.now .narrative { margin: 0 0 14px; }
.rate-step { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; border-top: 1px solid var(--obsidian-line); padding-top: 12px; margin-top: 6px; }
.developing { display: flex; gap: 16px; align-items: center; border: 1px dashed #3A4247; border-radius: 14px; padding: 20px 22px; }
.developing p { margin: 2px 0 0; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--night-teal); flex: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(0.7); opacity: 0.5; } 50% { transform: scale(1.15); opacity: 1; } }

/* The one orchestrated moment: after a decision, the new situation unfolds. */
.now.reveal { animation: arrive 700ms ease-out both; }
.now.reveal .headline { background: linear-gradient(90deg, rgba(217, 183, 122, 0.35), transparent) no-repeat; background-size: 0 100%; animation: sweep 1.1s 250ms ease-out forwards; }
.now.reveal .narrative { opacity: 0; animation: unfold 600ms ease-out forwards; }
@keyframes arrive { from { border-color: var(--brass-night); box-shadow: 0 0 0 6px rgba(217, 183, 122, 0.18); } }
@keyframes sweep { to { background-size: 100% 100%; } }
@keyframes unfold { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Deciding */
.decide { border-top: 1px solid var(--obsidian-line); padding-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.decide h2 { margin: 0; }
.prudent { background: rgba(124, 194, 188, 0.07); border: 1px solid rgba(124, 194, 188, 0.3); border-radius: 12px; padding: 14px 18px; }
.prudent h3 { font-size: 19px; color: #A8E0DA; margin-bottom: 6px; }
.prudent ul { margin: 0; padding-left: 20px; color: var(--night-ink); }
.prudent li { margin: 4px 0; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; width: 100%; padding: 14px 18px; border-radius: 12px; border: 1px solid #2F373C; background: var(--obsidian-2); color: var(--night-ink); font: 400 15px var(--sans); text-align: left; cursor: pointer; }
.option2:hover, .option2:focus-visible { border-color: var(--brass-night); }
.o-label { font-size: 17px; font-weight: 500; }
.o-kind { grid-column: 2; grid-row: 1; font-size: 12.5px; color: var(--night-3); align-self: start; }
.o-trade { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; color: var(--night-2); }
.o-trade b { font-weight: 600; }
.o-trade .up b { color: #A8E0DA; }
.o-trade .down b { color: #F2B1A1; }
.own { display: flex; flex-direction: column; gap: 8px; }
.own label { margin: 0; }
.own .btn { align-self: flex-start; }
.advice-panel { border: 1px solid var(--obsidian-line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.advice-panel h3 { font-size: 20px; margin: 0; }
.advice-panel label { margin: 0; }
.adv-opt { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.adv-opt .muted { flex: 1 1 260px; }
.advice { border: 1px solid #36424A; border-radius: 12px; padding: 16px 20px; background: #161C20; margin-right: 6%; }
.advice.expert { border-top: 3px solid var(--night-teal); }
.a-kicker { font-size: 13.5px; font-weight: 600; color: var(--night-teal); margin: 0 0 4px; }
.a-who { margin: 0 0 8px; }
.a-text { font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.advice ul { margin: 0 0 8px; padding-left: 20px; }
.a-watch { color: #F2B1A1; font-size: 14.5px; }

/* Side: notepad, standing, guidance */
.side { display: flex; flex-direction: column; gap: 20px; }
.side h2 { font-size: 21px; margin-bottom: 10px; }
.panel { background: var(--obsidian-2); border: 1px solid var(--obsidian-line); border-radius: 14px; padding: 18px 20px; }
.panel .refs { padding-left: 18px; font-size: 14.5px; }
.panel .refs li { margin: 8px 0; }
.dial + .dial { margin-top: 10px; }
.dial .num { font-family: var(--mono); }
.dial .up { color: #A8E0DA; } .dial .down { color: #F2B1A1; }
.room .bar > span { transition: width 1s ease-out; }
.notepad { position: relative; background-color: var(--pad); color: var(--pad-ink); border-radius: 4px 4px 10px 10px; padding: 22px 18px 22px 46px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); background-image: linear-gradient(90deg, transparent 34px, var(--pad-margin) 34px, var(--pad-margin) 36px, transparent 36px), repeating-linear-gradient(transparent 0 31px, var(--pad-line) 31px 32px); background-position: 0 0, 0 22px; transform: rotate(-0.6deg); }
.notepad::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 18px; background: #3B2F23; border-radius: 4px 4px 0 0; }
.notepad h2 { font-family: var(--hand); font-weight: 700; font-size: 26px; color: var(--pad-ink); line-height: 32px; margin: 0; }
.notepad ol { margin: 0; padding-left: 18px; font-family: var(--hand); font-size: 19px; line-height: 32px; }
.notepad p { font-family: var(--hand); font-size: 18px; line-height: 32px; margin: 0; }
.notepad li.new { opacity: 0; animation: jot 700ms ease-out forwards; background: linear-gradient(transparent 55%, rgba(255, 196, 0, 0.55) 55%) no-repeat; background-size: 0 100%; }
@keyframes jot { from { opacity: 0; } to { opacity: 1; background-size: 100% 100%; } }

/* The Library drawer: Library mode (ivory) beside the scenario */
.drawer { position: fixed; inset: 0; z-index: 30; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(5, 8, 10, 0.55); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); overflow: auto; background: var(--ivory); color: var(--ink); padding: 24px; z-index: 1; animation: slidein 260ms ease-out; }
.drawer-panel h2, .drawer-panel h3 { color: var(--teal-deep); }
.drawer-panel .card { background: var(--paper); color: var(--ink); border-color: var(--line); }
.drawer-panel a { color: var(--teal-deep); }
.drawer-panel .muted { color: var(--slate); }
.drawer-panel textarea, .drawer-panel input { background: var(--paper); color: var(--ink); border-color: #CFC7B6; }
.drawer-panel .btn { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--ivory); }
.drawer-panel .toggle { margin: 16px 0; }
body.drawer-open { overflow: hidden; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .now.reveal, .now.reveal .narrative, .now.reveal .headline, .notepad li.new, .ring.overdue, .pulse, .drawer-panel { animation: none !important; opacity: 1 !important; background-size: 100% 100% !important; } }
@media (max-width: 640px) { .decision { margin-left: 0; } .advice { margin-right: 0; } .d-text { font-size: 23px; } .notepad { transform: none; } }
.drawer-panel .refs .muted, .drawer-panel .refs { color: var(--slate); }
.drawer-panel .linkish { color: var(--teal-deep); }
.drawer-panel select { background: var(--paper); color: var(--ink); border-color: #CFC7B6; }
.drawer-panel input[type=search], .drawer-panel textarea { background: var(--paper); color: var(--ink); border-color: #CFC7B6; }
