:root {
  color-scheme: light;
  --ink: #20201b;
  --muted: #534b39;
  --base: #b7dce4;
  --surface: #fff2c9;
  --line: #24241e;
  --accent: #f58a25;
  --paper: #efc13d;
  --paper-ink: #20201b;
  --display: 'Arial Black', 'Arial', sans-serif;
  font: 14px/1.5 Arial, 'Segoe UI', sans-serif;
  background: var(--base);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--base); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #285ba2; outline-offset: 3px;
}
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }

/* The committee has its own cut-paper palette inside either host theme. */
#app, dialog {
  --surface-background: #fff2c9;
  --surface-elevated: #fffdf0;
  --surface-elevated-foreground: #20201b;
  --surface-foreground: #20201b;
  --surface-muted-foreground: #534b39;
  --surface-muted: #eddfae;
  --surface-subtle: #ecdfa9;
  --interactive-border: #24241e;
  --interactive-hover: #efbc4a;
  --interactive-active: #dfab37;
  --interactive-selection: #f4cd64;
  --interactive-selection-foreground: #20201b;
  --interactive-focus-ring: #285ba2;
  --primary: #f58a25;
  --primary-foreground: #20201b;
  --primary-text: #753100;
  --error-text: #9c1919;
  --font-sans: Arial, 'Segoe UI', sans-serif;
  --font-mono: 'Courier New', monospace;
  --radius: 4px;
  --oc-sdk-field-bg: #fffdf0;
  --oc-sdk-edge: #24241e;
  --oc-sdk-raised-bg: #fff2c9;
  --oc-sdk-field-lift: none;
  --oc-sdk-raised-lift: none;
  --oc-sdk-lit: none;
}

#app { max-width: 1280px; margin: 0 auto; padding: 26px 30px 22px; }
.masthead {
  position: relative; isolation: isolate; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; min-height: 158px; padding: 25px;
  border: 3px solid var(--line); background: #77b6cd; box-shadow: 5px 5px 0 var(--line);
}
.mountains { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.identity {
  display: flex; align-items: center; gap: 13px; min-width: 0; padding: 12px 17px 14px;
  border: 3px solid var(--line); background: #97623a; color: #fff9d9;
  box-shadow: 3px 4px 0 #513c2a; transform: rotate(-1.1deg);
}
.emblem {
  display: grid; place-items: center; width: 49px; height: 53px; flex-shrink: 0;
  background: #f7dd49; border: 2px solid var(--line); border-radius: 46% 49% 44% 51%; transform: rotate(-8deg);
}
.emblem img { width: 37px; height: 37px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1px; font-size: .67rem; font-weight: 800; line-height: 1.6; color: var(--muted); }
.identity .eyebrow { color: #ffe8a3; font-size: .59rem; letter-spacing: 1.4px; }
h1 { font: 900 clamp(1.45rem, 2.7vw, 2.2rem)/1.2 var(--display); letter-spacing: -.8px; text-transform: uppercase; text-shadow: 2px 2px 0 #382b1f; }
.title-dot { color: #f9d82f; }
.header-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; max-width: 210px; }
.quorum {
  display: flex; align-items: center; gap: 7px; padding: 5px 9px; background: #f8e553;
  border: 2px solid var(--line); font-size: .7rem; font-weight: 800; white-space: nowrap; transform: rotate(2deg);
}
.quorum i, .live-dot, .ticker-light { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #258745; border: 1px solid #1d421e; }
#sound-control { background: #fff8de; border: 2px solid var(--line); padding: 3px 7px; }
.intro { color: #283c40; font-weight: 700; font-size: .86rem; margin: 19px 0 24px; text-align: center; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 294px; gap: 26px; }
.floor-column { min-width: 0; }
.floor-header, .floor-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  text-transform: uppercase; font-size: .66rem; font-weight: 800; letter-spacing: .3px;
}
.floor-header { padding: 9px 12px; background: #344b5b; color: #fff7d9; border: 3px solid var(--line); border-bottom: 0; }
.floor-header > span:first-child { display: flex; align-items: center; gap: 8px; }
.live-dot { background: #f6dc38; border-color: #181e19; }
.floor { position: relative; overflow: hidden; background: var(--paper); border: 3px solid var(--line); isolation: isolate; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.floor-note {
  position: absolute; left: 2.2%; top: 2%; padding: 5px 7px; border: 2px solid #24241e;
  background: #fff3b0; font-size: clamp(.37rem, .65vw, .56rem); line-height: 1.35;
  font-weight: 900; letter-spacing: .2px; color: #252319; transform: rotate(-4deg);
}
.floor-stamp {
  position: absolute; bottom: 1.8%; right: 1.8%; padding: 6px 9px; background: #f7e33e;
  border: 3px solid #24241e; text-align: center; line-height: 1.2; font-size: .6rem;
  font-weight: 900; color: #24241e; transform: rotate(7deg); box-shadow: 2px 3px 0 #24241e;
}
.floor-stamp strong { font-size: .85rem; }
.floor-footer { padding: 9px 2px; font-size: .57rem; color: #334a4b; }
.ticker {
  display: flex; align-items: center; gap: 10px; min-height: 45px; padding: 12px 13px;
  background: #fff6d6; border: 2px solid var(--line); box-shadow: 3px 3px 0 #24241e;
  font-size: .77rem; font-weight: 700; line-height: 1.5;
}
.ticker-light { flex-shrink: 0; }
.running .ticker-light { background: #e13532; animation: breathe .65s steps(2) infinite alternate; }
.desk { display: flex; flex-direction: column; gap: 24px; padding-top: 0; }
.agenda {
  position: relative; padding: 21px 18px; background: #fff2c9; border: 3px solid var(--line);
  box-shadow: 5px 5px 0 #536b5d; transform: rotate(.5deg);
}
.agenda::before { content: ''; position: absolute; top: -8px; left: 37%; width: 66px; height: 16px; background: #e5d5a5; border: 1px solid #9b8b60; transform: rotate(-5deg); }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.section-heading h2 { font: 800 .91rem/1.3 var(--display); text-transform: uppercase; letter-spacing: -.3px; }
.section-index { padding: 3px 5px; background: #f7dc41; border: 2px solid var(--line); font-size: .65rem; font-weight: 900; transform: rotate(-4deg); }
.muted { color: var(--muted); font-size: .81rem; line-height: 1.6; }
.agenda .muted { margin-bottom: 15px; }
#task-field { margin-bottom: 15px; }
#app #task-field input { width: 100%; font-size: .87rem; padding: 12px 10px; min-height: 45px; background: #fffdf0; color: var(--ink); border: 2px solid var(--line); border-radius: 2px; box-shadow: none; }
#app .oc-sdk-btn, dialog .oc-sdk-btn {
  color: #20201b; background: #fff2c9; border: 2px solid #24241e; border-radius: 2px;
  box-shadow: 2px 2px 0 #24241e; font-weight: 800; background-image: none;
}
#app .oc-sdk-btn:hover:enabled, dialog .oc-sdk-btn:hover:enabled { background: #ffdb63; }
#app #run-button button {
  width: 100%; min-height: 49px; justify-content: center; font-weight: 900; font-size: .93rem;
  text-transform: uppercase; background: #f58a25; color: #20201b; border: 3px solid #24241e;
  border-radius: 2px; box-shadow: 3px 4px 0 #24241e; transition: transform .1s;
}
#app #run-button button:hover:enabled { background: #ffab34; transform: translate(-1px, -1px); }
#app #run-button button:active:enabled { transform: translate(2px, 3px); box-shadow: 1px 1px 0 #24241e; }
#app #run-button button:disabled { opacity: .65; box-shadow: none; }
.fine-print { color: #534b39; font-size: .59rem; line-height: 1.5; margin-top: 14px; text-align: center; font-weight: 700; }
.verdict {
  padding: 23px 20px; min-height: 235px; background: #f5e557; border: 3px solid var(--line);
  box-shadow: 5px 5px 0 #536b5d; display: flex; flex-direction: column; align-items: flex-start; transform: rotate(-.6deg);
}
.pending-seal { width: 45px; height: 45px; display: grid; place-items: center; background: #e9493e; color: #fffce3; border: 3px solid var(--line); border-radius: 48% 44% 51% 46%; margin: 20px 0 15px; font: 900 1.75rem var(--display); transform: rotate(-8deg); }
.verdict h2 { font: 900 1.12rem/1.35 var(--display); text-transform: uppercase; margin-bottom: 8px; overflow-wrap: anywhere; }
.verdict p:not(.eyebrow) { color: #50472d; font-size: .8rem; line-height: 1.6; }
.verdict.decided { background: #a7d462; }
.verdict.decided .eyebrow { color: #233e20; margin-bottom: 18px; }
.verdict.decided h2 { font-size: 1.45rem; line-height: 1.3; }
.verdict-task { width: 100%; margin-top: 15px; padding-top: 12px; border-top: 2px dashed #3b522b; overflow-wrap: anywhere; }
#copy-button { margin-top: 15px; }
#app #copy-button button { font-size: .74rem; }
.desk-note { color: #203d42; font-size: .77rem; font-weight: 700; line-height: 1.7; display: flex; gap: 9px; padding: 0 10px; }
.desk-note > span { color: #b13b1b; font-size: 1.5rem; }
.records { margin-top: 30px; padding: 22px 20px 14px; border: 3px solid var(--line); background: #fff7dc; box-shadow: 4px 4px 0 #536b5d; }
.record-count { margin-left: auto; font-size: .69rem; font-weight: 800; color: #534b39; }
.empty-history { color: #534b39; font-size: .8rem; padding: 9px 0 13px; }
.history-row { display: grid; grid-template-columns: 36px minmax(100px, 1fr) minmax(140px, 1.25fr) auto 32px; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid #cdbb8d; font-size: .79rem; }
.history-id { color: #6a5534; font-size: .7rem; font-weight: 800; }
.history-task { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.history-outcome { overflow-wrap: anywhere; color: #534b39; line-height: 1.4; }
.history-time { font-size: .67rem; white-space: nowrap; color: #6a5534; }
.history-copy { background: #f7dc41; border: 2px solid var(--line); color: #20201b; font-size: 1.1rem; width: 30px; height: 30px; }
.history-copy:hover { background: #ffb947; }
.legend { margin: 20px 0; color: #283e3d; font-size: .8rem; }
.legend summary { cursor: pointer; width: fit-content; line-height: 1.8; font-weight: 800; }
.legend ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 30px; padding-left: 25px; margin: 20px 0; line-height: 1.55; }
.legend li { padding-left: 3px; overflow-wrap: anywhere; }
.legend li::marker { color: #1a4d56; font-weight: 900; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; font-size: .59rem; font-weight: 800; letter-spacing: .4px; color: #344f50; padding-top: 15px; border-top: 2px solid #567981; }
.notice { padding: 12px 14px; margin-bottom: 18px; background: #ffdb77; border: 2px solid #7c4919; color: #412818; font-size: .8rem; line-height: 1.5; }
dialog { width: min(660px, calc(100% - 32px)); max-height: 90vh; margin: auto; padding: 25px; background: #fff2c9; color: #20201b; border: 3px solid #24241e; border-radius: 3px; box-shadow: 8px 8px 0 #24241e; }
dialog::backdrop { background: #183944aa; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.dialog-header h2, #copy-title { font: 900 1.2rem/1.35 var(--display); text-transform: uppercase; }
.close-button { width: 34px; height: 34px; background: #ee653c; border: 2px solid #24241e; color: #20201b; font-size: 1.5rem; flex-shrink: 0; }
.outcome-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 22px 0; }
.outcome-editor label { display: flex; flex-direction: column; gap: 6px; font-size: .72rem; font-weight: 800; color: #534b39; }
.outcome-editor textarea, #copy-text { width: 100%; min-height: 70px; background: #fffdf0; color: #20201b; border: 2px solid #756546; border-radius: 2px; padding: 10px; font-family: Arial, sans-serif; font-size: .86rem; line-height: 1.4; resize: vertical; }
.motion-control { padding: 15px 0; border-top: 2px solid #b8a57a; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; }
.error { color: #9c1919; font-size: .8rem; font-weight: 700; line-height: 1.5; }
.manual-button { border: 2px solid #24241e; background: #f58a25; color: #20201b; padding: 9px 16px; margin-top: 12px; font-weight: 800; }
#copy-text { margin-top: 15px; min-height: 150px; }

@keyframes breathe { to { opacity: .3; } }
@media (max-width: 1000px) {
  #app { padding: 22px; }
  .masthead { padding: 22px 15px; }
  .identity { padding: 11px; gap: 9px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 252px; gap: 20px; }
  .agenda, .verdict { padding: 19px 15px; }
  .quorum { font-size: .63rem; }
  .floor-footer > span:last-child { display: none; }
}
@media (max-width: 760px) {
  #app { padding: 15px 14px 20px; }
  .masthead { align-items: flex-start; flex-wrap: wrap; gap: 20px; padding: 20px 14px 13px; }
  .identity { padding: 11px; gap: 10px; }
  .identity .eyebrow { font-size: .48rem; letter-spacing: .6px; }
  .emblem { width: 36px; height: 40px; }
  .emblem img { width: 29px; height: 29px; }
  h1 { font-size: clamp(1.05rem, 3.7vw, 1.65rem); letter-spacing: -.5px; }
  .header-tools { width: 100%; max-width: none; flex-wrap: wrap; gap: 8px; }
  .quorum { margin-right: auto; font-size: .61rem; }
  #sound-control { padding: 3px 5px; }
  .intro { font-size: .74rem; margin: 17px 0 22px; line-height: 1.65; }
  .workspace { display: flex; flex-direction: column; gap: 23px; }
  .desk { display: contents; }
  .agenda { order: -1; transform: none; }
  .floor-column { order: 0; }
  .verdict { order: 1; min-height: 0; transform: none; }
  .desk-note { display: none; }
  .verdict .pending-seal { margin: 15px 0 10px; }
  .verdict.decided .eyebrow { margin-bottom: 12px; }
  .floor-header { font-size: .59rem; }
  .floor-footer { font-size: .57rem; }
  .floor-note { font-size: .38rem; padding: 3px 4px; border-width: 1px; }
  .floor-stamp { font-size: .45rem; padding: 4px; border-width: 2px; }
  .floor-stamp strong { font-size: .58rem; }
  .fine-print { font-size: .6rem; }
  .legend ol { grid-template-columns: 1fr 1fr; }
  .records { margin-top: 24px; padding: 19px 13px 12px; }
  .history-row { grid-template-columns: 24px minmax(0, 1fr) 28px; gap: 7px; }
  .history-task { grid-column: 2; }
  .history-outcome { grid-column: 2; grid-row: 2; }
  .history-time { grid-column: 2; grid-row: 3; font-size: .64rem; }
  .history-copy { grid-column: 3; grid-row: 1 / 4; }
  .history-id { grid-row: 1 / 4; }
  .page-footer { font-size: .55rem; line-height: 1.7; flex-wrap: wrap; gap: 7px; }
  .outcome-editor { grid-template-columns: 1fr; }
  dialog { padding: 20px; }
  .dialog-header h2 { font-size: 1.1rem; }
  .dialog-footer { flex-wrap: wrap; }
  .section-heading h2 { font-size: .85rem; }
  #app #task-field input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
