/* Rapid Strategy War Room — design system
   Rapid Strategy brand (capability statement palette): deep teal rail, teal primary, slate type,
   Archivo headings + Source Sans 3 body. Red is reserved for risk, never decoration. */
:root {
  /* brand teal ramp (the --navy-* names are kept so every component follows the brand) */
  --navy-950: #012624; --navy-900: #013f3c; --navy-800: #025955; --navy-700: #0a6b66; --navy-600: #1b847d;
  --teal: #025955; --teal-deep: #013f3c; --teal-bright: #5cb3aa; --teal-light: #7ac6bd; --teal-tint: #e3efee;
  --crimson: #c8102e; --crimson-soft: #fdecef;
  --ink: #2c333a; --ink-2: #3a444f; --ink-3: #5c666f; --ink-4: #8a939b;
  --line: #dfe6e6; --line-2: #edf2f2; --paper: #ffffff; --ground: #f4f6f6;
  --green: #0f8a5f; --green-soft: #e6f6ef; --amber: #b45309; --amber-soft: #fdf3e2;
  --blue: #1d4ed8; --blue-soft: #e8effd; --violet: #6d28d9; --violet-soft: #f1eafd;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --font: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
h1, h2, h3, h4, .btn, .eyebrow, .tabs a, .badge, .kpi .v, .verdict, .brand-name, .nav, .tier, label, table.t th { font-family: var(--display); }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14.5px; color: var(--ink); background: var(--ground); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 8px; }
small, .muted { color: var(--ink-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.rail { background: linear-gradient(180deg, #01403d 0%, #012b29 60%, #011f1d 100%); color: #cfe0de; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.brand { display: block; padding: 6px 10px 20px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 168px; max-width: 100%; height: auto; }
.brand-product { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--teal-light); }
.brand-product::before { content: ""; width: 18px; height: 2px; background: var(--teal-bright); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--teal); display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.brand-name { font-weight: 700; font-size: 14px; line-height: 1.1; }
.brand-sub { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #9fc4c0; }
.rail a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #cfe0de; font-weight: 500; font-size: 14px; }
.rail a.nav:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.rail a.nav.active { background: rgba(92,179,170,.18); color: #fff; box-shadow: inset 3px 0 0 var(--teal-bright); }
.rail a.nav .count { margin-left: auto; background: var(--crimson); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; font-weight: 600; }
.rail .nav-label { font-family: var(--display); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: #6fa19c; padding: 14px 10px 4px; }
.rail .spacer { flex: 1; }
.rail .me { border-top: 1px solid rgba(255,255,255,.08); padding: 12px 8px 0; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.rail .me a { color: #9fc4c0; font-size: 12px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 28px 0; }
.content { padding: 18px 28px 48px; max-width: 1480px; }
.mobile-bar { display: none; }

/* ---------- surfaces ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.card-body { padding: 16px 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.kpi { padding: 14px 16px; }
.kpi .v { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.kpi .l { font-size: 12px; color: var(--ink-3); }
.empty { text-align: center; color: var(--ink-3); padding: 28px 16px; }
.empty h3 { color: var(--ink-2); margin-bottom: 4px; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 13px var(--display); padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f3f8f7; text-decoration: none; }
.btn-primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-accent { background: var(--teal-bright); border-color: var(--teal-bright); color: #012624; }
.btn-accent:hover { background: var(--teal-light); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0 0 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], select, textarea {
  width: 100%; font: 14px var(--font); color: var(--ink); background: #fff; border: 1px solid #cfd8e3; border-radius: 8px; padding: 9px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(2, 89, 85, .15); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }

/* ---------- badges ---------- */
.badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-red { background: var(--crimson-soft); color: var(--crimson); }
.b-blue { background: var(--teal-tint); color: var(--teal); }
.b-violet { background: var(--violet-soft); color: var(--violet); }
.b-navy { background: var(--teal); color: #fff; }
.conf-Confirmed { background: var(--green-soft); color: var(--green); }
.conf-High { background: var(--teal-tint); color: var(--teal); }
.conf-Medium { background: var(--amber-soft); color: var(--amber); }
.conf-Low { background: #fbe9e9; color: #b42318; }
.conf-Unknown { background: var(--line-2); color: var(--ink-3); }
.inf-High { background: var(--teal-deep); color: #fff; }
.inf-Medium { background: var(--teal-tint); color: var(--teal); }
.inf-Low { background: var(--line-2); color: var(--ink-3); }
.tier { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: 11.5px; font-weight: 700; }
.tier-1 { background: var(--teal-deep); color: #fff; }
.tier-2 { background: var(--teal-tint); color: var(--teal); box-shadow: inset 0 0 0 1px #b9d6d3; }
.tier-3 { background: var(--line); color: var(--ink-2); }

/* ---------- alerts ---------- */
.alert { border-radius: 10px; padding: 10px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.alert-red { background: var(--crimson-soft); border-color: #f5c2cb; color: #7f1d1d; }
.alert-amber { background: var(--amber-soft); border-color: #f3d9a8; color: #78350f; }
.alert-blue { background: var(--teal-tint); border-color: #b9d6d3; color: #013f3c; }
.alert-green { background: var(--green-soft); border-color: #b7e4cf; color: #064e3b; }
.flash-wrap { margin-bottom: 14px; display: grid; gap: 8px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #fbfcfe; }

/* ---------- avatars ---------- */
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy-700); color: #fff; display: inline-grid; place-items: center; font-weight: 650; font-size: 13px; flex-shrink: 0; object-fit: cover; overflow: hidden; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- opportunity list ---------- */
.opp-card { display: block; padding: 16px 18px; color: inherit; transition: box-shadow .15s, border-color .15s; }
.opp-card:hover { text-decoration: none; border-color: #c8d3e1; box-shadow: var(--shadow-lg); }
.opp-card h3 { font-size: 15px; margin: 6px 0 4px; }
.opp-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.opp-meta b { color: var(--ink-2); font-weight: 600; }

/* ---------- war room header ---------- */
.wr-head { padding: 22px 24px; background: linear-gradient(100deg, #012b29 0%, #013f3c 45%, rgba(1,63,60,.82) 70%, rgba(1,63,60,.55) 100%), url("brand/hero.jpg") right center / cover no-repeat; color: #e2e8f0; border-radius: var(--radius); position: relative; overflow: hidden; }
.wr-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(1,38,36,.55)); pointer-events: none; }
.wr-head h1 { color: #fff; font-size: 21px; max-width: 900px; }
.wr-head .eyebrow { color: var(--teal-light); }
.wr-head .badge { background: rgba(255,255,255,.12); color: #e2e8f0; }
.wr-head .badge.b-red { background: var(--crimson); color: #fff; }
.wr-head .badge.b-teal { background: rgba(92,179,170,.28); color: #d3efec; }
.wr-head .badge.b-green { background: rgba(15,138,95,.25); color: #b7f0d6; }
.wr-head .badge.b-amber { background: rgba(180,83,9,.3); color: #fde2b3; }
.wr-head .wr-actions { position: relative; z-index: 1; }
.wr-head .btn { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; }
.wr-head .btn:hover { background: rgba(255,255,255,.16); }
.wr-head .btn-accent { background: var(--teal-bright); border-color: var(--teal-bright); color: #012624; }
.wr-head .btn-accent:hover { background: var(--teal-light); }

.phases { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 16px; position: relative; z-index: 1; }
.ph { background: rgba(1,38,36,.55); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 7px 8px; font-size: 11px; color: #cfe0de; min-width: 0; font-family: var(--display); backdrop-filter: blur(2px); }
.ph .n { font-size: 10px; color: #7fb3ad; font-weight: 600; }
.ph .l { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph.done { border-color: rgba(92,179,170,.75); background: rgba(92,179,170,.25); color: #e3f5f3; }
.ph.running { border-color: #fbbf24; background: rgba(251,191,36,.15); color: #fef3c7; animation: pulse 1.6s infinite; }
.ph.failed { border-color: rgba(200,16,46,.7); background: rgba(200,16,46,.2); color: #fecdd3; }
@keyframes pulse { 50% { opacity: .65; } }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 12px; font-weight: 600; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--teal); border-color: var(--teal); }
.tabs a .c { font-size: 11px; background: var(--line-2); border-radius: 999px; padding: 0 6px; margin-left: 4px; color: var(--ink-3); }

/* ---------- war room layout with chat ---------- */
.wr-layout { display: block; padding-bottom: 72px; }  /* room so the chat icon never covers the last row */
.chat { position: fixed; right: 24px; bottom: 96px; width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100vh - 128px)); z-index: 40; display: none; flex-direction: column; overflow: hidden; box-shadow: 0 18px 50px rgba(1, 38, 36, .28); border-radius: 16px; }
.wr-layout.chat-open .chat { display: flex; animation: chat-in .16s ease-out; }
@keyframes chat-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.chat-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-tint); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 12px; background: #fbfcfe; }
.msg { max-width: 100%; font-size: 13.5px; }
.msg .who { font-size: 11px; color: var(--ink-3); font-weight: 600; margin-bottom: 3px; }
.msg .bubble { border-radius: 12px; padding: 10px 12px; }
.msg.user { align-self: flex-end; max-width: 88%; }
.msg.user .bubble { background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.msg.user .bubble a { color: #d3efec; }
.msg.user .who { text-align: right; }
.msg.assistant .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .bubble p { margin: 0 0 6px; }
.msg .bubble p:last-child { margin-bottom: 0; }
.msg .bubble ul { margin: 4px 0 6px; padding-left: 18px; }
.msg .bubble a { word-break: break-word; }
.msg .status { font-size: 12px; color: var(--ink-3); font-style: italic; }
.chips { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.chip { display: flex; align-items: center; gap: 8px; font-size: 12px; border-radius: 8px; padding: 6px 9px; background: var(--green-soft); color: #065f46; }
.chip.pending { background: var(--amber-soft); color: #78350f; flex-wrap: wrap; }
.chip.confirmed { background: var(--teal-tint); color: var(--teal-deep); }
.chip.cancelled { background: var(--line-2); color: var(--ink-3); text-decoration: line-through; }
.chip .grow { flex: 1; min-width: 120px; }
.chat-form { border-top: 1px solid var(--line-2); padding: 10px; background: #fff; }
.chat-form textarea { min-height: 44px; max-height: 160px; font-size: 13.5px; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.suggest button { font: 12px var(--font); border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; color: var(--ink-2); }
.suggest button:hover { border-color: var(--teal); color: var(--teal); }
.typing::after { content: "▍"; animation: blink 1s infinite; color: var(--ink-4); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- influence chart ---------- */
.influence { display: grid; grid-template-columns: repeat(7, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 160px; }
.lane h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 4px 4px 8px; display: flex; justify-content: space-between; }
.pcard { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 9px; padding: 9px; margin-bottom: 8px; cursor: pointer; }
.pcard:hover { box-shadow: var(--shadow-lg); }
.pcard.inf-border-High { border-left-color: var(--teal-deep); }
.pcard.inf-border-Medium { border-left-color: var(--teal-bright); }
.pcard.inf-border-Low { border-left-color: var(--ink-4); }
.pcard .nm { font-weight: 650; font-size: 13px; line-height: 1.25; }
.pcard .ttl { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; margin-top: 2px; }

/* ---------- person drawer ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; box-shadow: var(--shadow-lg); max-width: min(720px, calc(100vw - 32px)); width: 100%; }
dialog::backdrop { background: rgba(7, 20, 42, .45); }
.dlg-head { padding: 18px 20px; border-bottom: 1px solid var(--line-2); display: flex; gap: 14px; align-items: center; }
.dlg-body { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
.dlg-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(7, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 200px; }
.kcol h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 4px 4px 8px; display: flex; justify-content: space-between; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin-bottom: 8px; }
.kcard.overdue { border-color: #f5c2cb; box-shadow: inset 3px 0 0 var(--crimson); }

/* ---------- theory ---------- */
.theory-statement { font-size: 15.5px; line-height: 1.65; color: var(--ink); border-left: 3px solid var(--teal); padding: 4px 0 4px 16px; }
.assume { display: grid; grid-template-columns: 96px 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.assume:last-child { border-bottom: 0; }
.money-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.money-flow .step { padding: 14px 16px; border-right: 1px solid var(--line-2); position: relative; }
.money-flow .step:last-child { border-right: 0; }
.money-flow .step .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 650; }
.money-flow .step .v { font-weight: 600; margin-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 10px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--teal-bright), var(--teal)); border-radius: 6px 6px 0 0; position: relative; min-height: 2px; }
.bars .bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.bars-x { display: flex; gap: 8px; font-size: 11px; color: var(--ink-3); }
.bars-x div { flex: 1; text-align: center; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item::before { content: ""; position: absolute; left: -17px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--teal); }
.diff-chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.diff-chain > div { padding: 10px 12px; border-right: 1px dashed var(--line); font-size: 12.5px; }
.diff-chain > div:last-child { border-right: 0; background: var(--teal-tint); color: var(--teal-deep); font-weight: 600; }
.diff-chain .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 650; margin-bottom: 4px; }
.draft { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.source-list { font-size: 12px; margin: 4px 0 0; padding-left: 16px; color: var(--ink-3); }
.source-list a { word-break: break-all; }
details.sources summary { font-size: 12px; color: var(--ink-3); cursor: pointer; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(160deg, rgba(1,63,60,.92) 0%, rgba(1,43,41,.86) 55%, rgba(1,31,29,.95) 100%), url("brand/hero.jpg") center / cover no-repeat; color: #cfe0de; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { color: #fff; font-size: 34px; letter-spacing: -.02em; max-width: 460px; }
.login-art .loop { font-family: var(--display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-light); line-height: 2; }
.login-logo { width: 220px; max-width: 70%; height: auto; display: block; }
.login-form { display: grid; place-items: center; padding: 32px; background: #fff; }
.login-form form { width: 100%; max-width: 360px; }

/* ---------- highlights ---------- */
mark.hl { background: #fff1a8; color: #3b3000; padding: 0 3px; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.insights { background: #fffbe6; border: 1px solid #f1dc7a; border-left: 4px solid #e6b800; border-radius: var(--radius); }
.insights .card-head { border-bottom-color: #f5e6a3; }
.insight { padding: 12px 20px; border-bottom: 1px solid #f5ecc4; }
.insight:last-child { border-bottom: 0; }
.insight .why { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.insight .miss { font-size: 12.5px; color: #7a5b00; margin-top: 2px; }

/* ---------- chain of command ---------- */
.orgtree-wrap { overflow-x: auto; padding: 8px 4px 16px; }
.orgtree, .orgtree ul { list-style: none; margin: 0; padding: 0; }
.orgtree ul { display: flex; justify-content: center; padding-top: 22px; position: relative; }
.orgtree li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.orgtree > li { padding-top: 0; }
.orgtree li::before, .orgtree li::after { content: ""; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid #b9d6d3; }
.orgtree li::before { right: 50%; }
.orgtree li::after { left: 50%; border-left: 2px solid #b9d6d3; }
.orgtree li:only-child::before, .orgtree li:only-child::after { display: none; }
.orgtree li:only-child { padding-top: 22px; }
.orgtree li:first-child::before, .orgtree li:last-child::after { border: 0 none; }
.orgtree li:last-child::before { border-right: 2px solid #b9d6d3; border-radius: 0 6px 0 0; }
.orgtree li:first-child::after { border-radius: 6px 0 0 0; }
.orgtree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid #b9d6d3; }
.orgtree > li::before, .orgtree > li::after { display: none; }
.onode { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 150px; max-width: 200px; text-align: center; box-shadow: var(--shadow); cursor: default; }
.onode.org { background: var(--teal-tint); border-color: #b9d6d3; }
.onode.org .t { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--teal-deep); }
.onode.person { cursor: pointer; }
.onode.person:hover { box-shadow: var(--shadow-lg); }
.onode.contracting { border: 2px solid var(--teal-bright); }
.onode .avatar { margin: 0 auto 4px; }
.onode .nm { font-weight: 700; font-size: 12.5px; line-height: 1.2; font-family: var(--display); }
.onode .tt { font-size: 11px; color: var(--ink-3); line-height: 1.25; margin-top: 2px; }
.onode .rel { font-size: 10px; color: var(--ink-4); margin-top: 3px; }
.onode.inferred { border-style: dashed; }

/* ---------- short version: stars, key points, More ---------- */
.star { color: #d49a00; font-size: 1.05em; line-height: 1; }
.tabs a .star { margin-right: 4px; }
.tabs a.starred { color: var(--ink); }
.short-box { background: #fffbe6; border: 1px solid #f1dc7a; border-left: 4px solid #e6b800; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.star-note { font-family: var(--display); font-weight: 650; font-size: 14px; color: #5c4400; }
.short-box .kp { margin-top: 6px; }
.kp { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.kp li { margin-bottom: 4px; }
.kp li::marker { color: var(--teal-bright); }
.kp-lg { font-size: 14.5px; margin-top: 12px; }
.lede { font-size: 15px; line-height: 1.55; color: var(--ink); margin: 0; }
details.more { margin-top: 4px; }
details.more > summary { display: inline-block; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--teal); font-family: var(--display); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " ▾"; }
details.more[open] > summary::after { content: " ▴"; }
details.more > div { margin-top: 4px; }
.start-here .card-body { padding-top: 6px; padding-bottom: 8px; }
.star-row { display: grid; grid-template-columns: 22px 130px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.star-row:last-child { border-bottom: 0; }
.star-row:hover { text-decoration: none; background: #fffdf2; }
.star-row .go { font-size: 12px; color: var(--teal); font-weight: 600; font-family: var(--display); }

/* ---------- money ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.kpis .kpi { border-right: 1px solid var(--line-2); }
.kpis .kpi:last-child { border-right: 0; }
.kpis .kpi .v { font-size: 18px; line-height: 1.25; margin-top: 2px; }
.tips { border-left: 4px solid var(--teal-bright); }
.tip-list { margin: 0; padding-left: 22px; }
.tip-list li { padding: 5px 0; font-size: 14px; }
.tip-list li::marker { font-family: var(--display); font-weight: 700; color: var(--teal); }
.pie-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; }
.pie { width: 100%; max-width: 180px; height: auto; display: block; }
.pie path:hover { opacity: .85; }
.pie-total { font-family: var(--display); font-weight: 700; font-size: 17px; fill: var(--ink); }
.pie-sub { font-size: 11px; fill: var(--ink-3); }
.pie-legend { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.pie-legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.pie-legend li:last-child { border-bottom: 0; }
.pie-legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.pie-legend .nm a { color: var(--ink); }
.pie-legend .pct { font-family: var(--display); font-weight: 650; color: var(--ink-2); }
.pie-legend .pct { white-space: nowrap; text-align: right; }
.pie-legend .pct small { color: var(--ink-3); font-weight: 600; margin-left: 4px; }
.pie-legend .note { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.bars .bar-stack { flex: 1; display: flex; flex-direction: column; gap: 2px; position: relative; min-height: 2px; }
.bars .bar-stack > span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.bars .seg { min-height: 2px; }
.bars .seg:first-of-type { border-radius: 6px 6px 0 0; }
.bars .seg.cur { background: linear-gradient(180deg, var(--teal-bright), var(--teal)); }
.bars .seg.prev { background: #b9d6d3; }
.sw-inline { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.sw-inline.cur { background: var(--teal); }
.sw-inline.prev { background: #b9d6d3; }

/* ---------- influence ---------- */
.lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.lanes .lane { min-height: 0; }
.pc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pc-icons { display: flex; gap: 5px; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.pcard .ttl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.legend { font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend .tier { width: 20px; height: 20px; font-size: 10.5px; }

/* ---------- theory ---------- */
.bucket-1 { border-top: 3px solid var(--green); }
.bucket-2 { border-top: 3px solid var(--amber); }
.bucket-3 { border-top: 3px solid #b42318; }
.assume-item { padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.assume-item:last-child { border-bottom: 0; }
.assume-item > summary { cursor: pointer; list-style: none; }
.assume-item > summary::-webkit-details-marker { display: none; }
.assume-item > summary::before { content: "▸ "; color: var(--ink-4); }
.assume-item[open] > summary::before { content: "▾ "; }
.assume-more { margin: 6px 0 2px 14px; font-size: 12.5px; display: grid; gap: 4px; }

/* ---------- spider chart ---------- */
.radar-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.radar-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.radar-overall { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--teal-deep); }
.radar-overall span { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.radar-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.sw-line { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--teal); vertical-align: middle; margin-right: 4px; }
.sw-line.prev { border-top: 2px dashed #8a939b; }
.radar { width: 100%; height: auto; display: block; overflow: visible; }
.radar .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .ring-outer { stroke: #c9d4d4; stroke-width: 1.5; }
.radar .ring-ready { fill: none; stroke: var(--green); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .8; }
.radar .ready-label { font-family: var(--display); font-size: 11px; font-weight: 700; fill: var(--green); }
.due-urgent, .due-passed { background: var(--crimson) !important; color: #fff !important; }
.due-soon { background: var(--amber-soft) !important; color: var(--amber) !important; }
.wr-head .due-soon { background: rgba(180,83,9,.35) !important; color: #fde2b3 !important; }
.ready-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 12.5px; font-weight: 650; border-radius: 999px; padding: 4px 11px; background: var(--line-2); color: var(--ink-3); }
.ready-badge.on { background: var(--green-soft); color: var(--green); }
.meter { position: relative; }
.meter > i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--green); opacity: .7; }
.radar .spoke { stroke: var(--line); stroke-width: 1; }
.radar .shape-now { fill: rgba(27, 132, 125, .22); stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; }
.radar .shape-prev { fill: none; stroke: #8a939b; stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; }
.radar .dot { fill: var(--teal); stroke: #fff; stroke-width: 2; }
.radar .dot-live { fill: #fff; stroke: var(--teal); stroke-width: 3; }
.radar .shape-with { fill: rgba(235, 104, 52, .14); stroke: #eb6834; stroke-width: 2.5; stroke-linejoin: round; }
.radar .dot-with { fill: #eb6834; stroke: #fff; stroke-width: 2; }
.sw-line.with { border-top-color: #eb6834; }
.radar-overall.with { color: #b4461a; }
.radar-overall.small { font-size: 24px; }
.radar-overall span { margin-left: 2px; }
.with-card { border-left: 4px solid #eb6834; }
.pwin { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--teal-deep); }
a.pwin:hover { text-decoration: none; color: var(--teal); }
.pwin.best { color: #b4461a; }
.pwin-box { color: var(--ink); }
.pwin-box:hover { text-decoration: none; }
.pwin-box .pwin { font-size: 26px; line-height: 1.1; }
.radar .axis-label { font-family: var(--display); font-size: 14px; font-weight: 650; fill: var(--ink); }
.radar .axis-score { font-family: var(--display); font-size: 13px; font-weight: 700; fill: var(--teal); }
.radar .axis-score.unscored { fill: var(--ink-4); font-weight: 600; font-size: 11.5px; }
.radar a:hover .axis-label { fill: var(--teal); text-decoration: underline; }
.call { padding: 6px 0; font-size: 13px; }
.spoke-row { display: block; padding: 9px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.spoke-row:last-child { border-bottom: 0; }
.spoke-row:hover { text-decoration: none; background: #fbfdfd; }
.spoke-score { font-family: var(--display); font-weight: 700; color: var(--teal-deep); }
.meter { height: 6px; background: var(--line-2); border-radius: 999px; margin: 5px 0 4px; overflow: hidden; }
.meter > div { height: 100%; background: var(--teal); border-radius: 999px; }
.meter > div.mid { background: #d9a400; }
.meter > div.low { background: var(--crimson); }
.radar-mini { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13.5px; color: var(--ink); padding: 4px 0 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }

/* ---------- rfi / rfp ---------- */
.ready-card { border-left: 4px solid var(--line); }
.ready-card.on { border-left-color: var(--green); }
.ready-card .radar-overall span { font-size: 15px; color: var(--ink-3); }
.req { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.req:last-child { border-bottom: 0; }
.req-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--teal-tint); color: var(--teal); font-family: var(--display); font-size: 11px; font-weight: 700; margin-right: 6px; }
.quote { font-size: 12.5px; color: var(--ink-2); background: #f8fafc; border-left: 3px solid var(--line); padding: 6px 10px; border-radius: 6px; }

/* ---------- who did what ---------- */
.by { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.act { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.act:last-child { border-bottom: 0; }
.act .avatar { background: var(--teal-bright); color: #012624; }
.act-detail { color: var(--ink-3); }
.act-time { font-size: 12px; white-space: nowrap; }

/* ---------- voice ---------- */
.voice-field { position: relative; }
.voice-field .mic { margin-top: 6px; }
.mic.listening { background: var(--crimson); border-color: var(--crimson); color: #fff; animation: pulse 1.2s infinite; }
.mic-round { padding: 8px 11px; }
.mic-off { opacity: .45; }

/* ---------- access ---------- */
.update { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.update:last-child { border-bottom: 0; }

/* ---------- misc ---------- */
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-6 { -webkit-line-clamp: 6; }
.spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spin.dark { border-color: var(--line); border-top-color: var(--navy-700); }
@keyframes spin { to { transform: rotate(360deg); } }
.hide { display: none !important; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.dropzone { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 18px; text-align: center; color: var(--ink-3); cursor: pointer; background: #fafbfd; }
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: var(--teal-tint); color: var(--teal); }
.dropzone img { max-height: 140px; border-radius: 10px; margin-top: 8px; }
.segmented { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented a, .segmented button { border: 0; background: transparent; font: 600 13px var(--font); color: var(--ink-3); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.segmented .active { background: #fff; color: var(--teal); box-shadow: var(--shadow); }
.verdict { font-size: 18px; font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .phases { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 50; }
  .rail.open { display: flex; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #012b29; color: #fff; position: sticky; top: 0; z-index: 30; }
  .mobile-bar img { height: 26px; width: auto; }
  .content { padding: 16px 16px 48px; }
  .topbar { padding: 16px 16px 0; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .money-flow, .diff-chain { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi { border-bottom: 1px solid var(--line-2); }
  .pie-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .pie-legend { width: 100%; }
  .star-row { grid-template-columns: 22px 1fr; }
  .radar-layout { grid-template-columns: minmax(0, 1fr); }
  .star-row .go { display: none; }
  .money-flow .step, .diff-chain > div { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .assume { grid-template-columns: 1fr; gap: 4px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 32px 24px; }
  .login-art h1 { font-size: 26px; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wr-head { padding: 16px; }
}
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 41; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--teal-bright), var(--teal)); box-shadow: 0 10px 28px rgba(1, 63, 60, .38); transition: transform .15s; }
.chat-fab:hover { transform: scale(1.06); }
.chat-fab:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 3px; }
.chat-fab .ic-close { display: none; }
.chat-fab.open .ic-open { display: none; }
.chat-fab.open .ic-close { display: block; }
@media (max-width: 820px) { .chat { right: 16px; bottom: 88px; } .chat-fab { right: 16px; bottom: 16px; } }
