/* BOI — Board of Investors. Boardroom look: deep navy, brass/gold, ivory paper; serif headlines. */
:root, [data-theme="dark"] {
  --bg: #0E1222; --surface: #161B30; --surface2: #1F2540; --border: #2A3150;
  --text: #F3EFE6; --muted: #9EA4BE; --accent: #E0AE45; --on-accent: #10142A;
  --go: #4DB86A; --cond: #E0AE45; --nogo: #E5574F; --user: #E0AE4520; --scrim: #000a;
  --seat-Chair: #E0AE45; --seat-CTO: #6FA8FF; --seat-CFO: #4DB86A; --seat-CMO: #E58AD0; --seat-COO: #F08A4B; --seat-Automation: #5CD1C6;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F6F2E9; --surface: #FFFFFF; --surface2: #EEE8DB; --border: #DDD5C4;
  --text: #141828; --muted: #5E6378; --accent: #B9861F; --on-accent: #FFFFFF;
  --go: #2F8A3E; --cond: #B9861F; --nogo: #C2362F; --user: #B9861F1A; --scrim: #0006;
  --seat-Chair: #B9861F; --seat-CTO: #2F6FD0; --seat-CFO: #2F8A3E; --seat-CMO: #B24C9E; --seat-COO: #C8642A; --seat-Automation: #1F9A8F;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
#app { min-height: 100%; min-height: 100dvh; display: flex; flex-direction: column; }
.serif { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif; }
h1, h2, h3 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif; font-weight: 700; letter-spacing: -.01em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
a.btn { text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 12px; background: var(--surface2); font-weight: 650; white-space: nowrap; transition: filter .12s, transform .12s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; border: 1px solid var(--border); }
.btn.danger { background: transparent; color: var(--nogo); }
.btn.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface2); color: var(--text); }
.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); outline: none; }
textarea.input { resize: none; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.err { color: var(--nogo); font-size: 14px; margin: 8px 0 0; }
.err:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface2);
  font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip.gold { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.seg { display: inline-flex; background: var(--surface2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { height: 34px; padding: 0 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--accent); color: var(--on-accent); }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 30px; height: 30px; }
.brand b { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 19px; letter-spacing: .04em; }
.brand span { font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.top .grow { flex: 1; }
.top .who { font-size: 13px; color: var(--muted); }

/* login */
.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.login { width: 100%; max-width: 400px; }
.login h1 { font-size: 28px; margin: 14px 0 4px; }
.login label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }

/* home */
.home { width: 100%; max-width: 980px; margin: 0 auto; padding: 48px 20px 80px; }
.hero { text-align: center; margin-bottom: 30px; }
.hero .kicker { color: var(--accent); font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; }
.hero h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.08; margin: 12px 0 12px; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 16.5px; }
.seats { display: flex; justify-content: center; gap: 10px; margin: 26px 0 6px; flex-wrap: wrap; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; }
.seat .av { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent); transition: .2s; }
.seat small { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.25; }
.seat.on .av { background: var(--c); color: var(--bg); transform: scale(1.08); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 20%, transparent); }
.pitch { padding: 22px; }
.pitch textarea { min-height: 150px; font-size: 16px; background: var(--bg); }
.pitch .row { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pitch .row .grow { flex: 1; }
.hint { font-size: 13px; color: var(--muted); }
.list-h { display: flex; align-items: baseline; justify-content: space-between; margin: 42px 0 12px; }
.list-h h2 { font-size: 22px; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pcard { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.pcard:hover { border-color: var(--accent); }
.pcard b { font-size: 16px; }
.pcard .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.verdict { font-weight: 800; letter-spacing: .02em; }
.v-GO { color: var(--go); } .v-CONDITIONAL\ GO { color: var(--cond); } .v-NO-GO { color: var(--nogo); }

/* meeting (interview) */
.meeting { flex: none; display: grid; grid-template-columns: 300px 1fr; grid-template-rows: minmax(0, 1fr); min-height: 0; height: calc(100dvh - 60px); overflow: hidden; }
.side { border-right: 1px solid var(--border); padding: 20px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.side h3 { font-size: 13px; font-family: inherit; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.ptitle { font-size: 22px; line-height: 1.2; }
.side .seats { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; gap: 2px; }
.side .seat { width: auto; }
.side .seat small { display: none; }
.side .seat .av { width: 36px; height: 36px; font-size: 10.5px; }
.cov { display: grid; gap: 7px; }
.cov div { display: grid; grid-template-columns: 112px 1fr 32px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .5s; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.stat .big { font-size: 26px; font-weight: 800; color: var(--go); font-family: "Iowan Old Style", Georgia, serif; }
.stat .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modelbox { display: flex; flex-direction: column; gap: 8px; }
.modelbox .why { font-size: 12.5px; color: var(--muted); }

.thread-wrap { display: flex; flex-direction: column; min-height: 0; }
.thread { flex: 1; overflow-y: auto; padding: 26px clamp(16px, 4vw, 48px) 20px; display: flex; flex-direction: column; gap: 18px; }
.msg { max-width: 760px; }
.msg.board { display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.msg.board .av { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
  color: var(--bg); background: var(--c); }
.msg.board .who { font-size: 12.5px; font-weight: 700; color: var(--c); letter-spacing: .04em; }
.msg.board .ack { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.msg.board .q { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 19px; line-height: 1.4; margin-top: 4px; }
.msg.board .why { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.msg.user { align-self: flex-end; background: var(--user); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); padding: 12px 16px;
  border-radius: 16px 16px 4px 16px; white-space: pre-wrap; max-width: 640px; }
.msg.md { font-size: 15px; }
.msg.md p { margin: 0 0 8px; } .msg.md ul, .msg.md ol { margin: 4px 0 8px; padding-left: 20px; } .msg.md h4 { margin: 10px 0 4px; font-size: 15px; }
.typing { display: inline-flex; gap: 4px; padding: 10px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { border-top: 1px solid var(--border); padding: 12px clamp(16px, 4vw, 48px) 16px; background: var(--bg); }
.composer .opts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.composer .opts button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13.5px; color: var(--text); background: var(--surface); }
.composer .opts button:hover { border-color: var(--accent); }
.composer .box { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { max-height: 220px; }
.composer .actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.composer .actions .grow { flex: 1; }
.convene { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff)); color: var(--on-accent); }
.convene.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.banner { margin: 0 auto; max-width: 760px; width: 100%; padding: 10px 14px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.banner.err { background: color-mix(in srgb, var(--nogo) 14%, transparent); color: var(--text); }

/* dialog */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; }
.dialog h2 { font-size: 24px; margin-bottom: 6px; }
.depths { display: grid; gap: 10px; margin: 18px 0; }
.depth { text-align: left; border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.depth.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.depth b { font-size: 16px; } .depth span { font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.depth em { font-style: normal; font-size: 12.5px; color: var(--accent); font-weight: 700; }
.dialog .row { display: flex; justify-content: flex-end; gap: 10px; }

/* deliberation */
.delib { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.delib .card { width: 100%; max-width: 620px; text-align: center; padding: 36px 30px; }
.table-ring { position: relative; width: 230px; height: 230px; margin: 4px auto 26px; }
.table-ring .tbl { position: absolute; inset: 62px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--accent) 35%, var(--surface2)), var(--surface2));
  display: flex; align-items: center; justify-content: center; }
.table-ring .tbl img { width: 46px; opacity: .9; }
.table-ring .seat { position: absolute; width: 50px; }
.table-ring .seat .av { animation: think 2.4s infinite; }
@keyframes think { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); } }
.steps { text-align: left; display: grid; gap: 10px; margin: 22px 0 6px; }
.step { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.step .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex: none; }
.step.running { color: var(--text); font-weight: 600; } .step.running .dot { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.step.done { color: var(--text); } .step.done .dot { background: var(--go); border-color: var(--go); }
.step.done .dot::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--bg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
@keyframes spin { to { transform: rotate(360deg); } }

/* report */
.report { width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 20px 90px; }
.rhead { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.rhead .grow { flex: 1; min-width: 260px; }
.rhead .kicker { color: var(--accent); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.rhead h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 6px 0; }
.rhead .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.vcards { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin: 10px 0 18px; }
.vcard { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; position: relative; overflow: hidden; }
.vcard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--vc); }
.vcard small { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.vcard .v { font-family: "Iowan Old Style", Georgia, serif; font-size: 30px; font-weight: 800; color: var(--vc); margin: 4px 0 2px; }
.vcard .s { font-size: 15px; } .vcard .s b { font-size: 20px; }
.varrow { display: flex; align-items: center; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; }
.panel h2 { font-size: 20px; margin-bottom: 12px; }
.panel h3 { font-size: 16px; margin: 16px 0 8px; }
.summary { font-size: 16.5px; line-height: 1.6; }
.score-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.score-row:last-child { border-bottom: 0; }
.score-row .nm { font-weight: 650; font-size: 14px; } .score-row .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.dbar { position: relative; height: 10px; border-radius: 5px; background: var(--surface2); }
.dbar .after { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: color-mix(in srgb, var(--go) 45%, transparent); }
.dbar .before { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--accent); }
.score-row .val { text-align: right; font-weight: 700; font-size: 14px; } .score-row .val span { color: var(--go); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.kpi small { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.kpi b { display: block; font-size: 19px; margin-top: 4px; font-family: "Iowan Old Style", Georgia, serif; }
.kpi span { font-size: 12px; color: var(--go); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin: 26px 0 16px; scrollbar-width: none; }
.tabs button { padding: 10px 14px; font-weight: 650; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); font-weight: 700; }
table.t td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
.tw { overflow-x: auto; }
ul.b { margin: 4px 0 8px; padding-left: 20px; } ul.b li { margin: 3px 0; }
.lv { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.lv-Critical { background: color-mix(in srgb, var(--nogo) 20%, transparent); color: var(--nogo); }
.lv-High { background: color-mix(in srgb, #F08A4B 20%, transparent); color: #F08A4B; }
.lv-Medium { background: color-mix(in srgb, var(--cond) 20%, transparent); color: var(--cond); }
.lv-Low { background: color-mix(in srgb, var(--go) 20%, transparent); color: var(--go); }
.lv-Fully { color: var(--go); } .lv-Partially { color: var(--cond); } .lv-Human { color: var(--nogo); }
.synth { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 14.5px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.ask { margin-top: 30px; }
.ask .thread { padding: 0; overflow: visible; margin-bottom: 14px; }

@media (max-width: 860px) {
  .meeting { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; overflow: visible; }
  .side { border-right: 0; border-bottom: 1px solid var(--border); flex-direction: column; }
  .side .hide-m { display: none; }
  .thread-wrap { height: calc(100dvh - 60px); }
  .grid2 { grid-template-columns: 1fr; }
  .vcards { grid-template-columns: 1fr; } .varrow { display: none; }
  .brand span, .top .who { display: none; }
  .top { padding: 0 10px; gap: 6px; }
  .kv { grid-template-columns: 1fr; } .kv dt { font-weight: 700; }
}
@media print {
  .top, .tabs, .acts, .ask { display: none !important; }
}
