[hidden] { display: none !important; }
:root { --primary: #273B7B; --accent: #F55018; --ink: #1B2236; --muted: #5B6478; --line: #C9D1E8; --bg: #F5F7FC; --ok: #14532D; --okbg: #DCF5E7; --bad: #B42318; --warn: #8A3A0E; --head: Poppins, sans-serif; --body: Inter, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); }
header.top { background: var(--primary); color: #fff; padding: 18px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
header.top .brand { font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: #fff; text-decoration: none; }
header.top .sub { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
header.top .spacer { flex: 1; }
button.link { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font: 600 13px var(--body); cursor: pointer; min-height: 40px; }
main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px; display: flex; flex-direction: column; gap: 26px; flex: 1; }
h1 { margin: 4px 0 0; font-family: var(--head); font-size: 32px; letter-spacing: -0.03em; }
h2 { margin: 0 0 12px; font-family: var(--head); font-size: 17px; }
.lede { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.meta { font-size: 14px; color: var(--muted); margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.tile { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(27,34,54,.06); }
.tile.dark { background: var(--primary); color: #fff; }
.tile .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile.dark .k, .tile.dark .s { color: #DCE3F5; }
.tile .v { font-family: var(--head); font-size: 30px; font-weight: 700; }
.tile .s { font-size: 13px; color: var(--muted); }
.chart { background: #fff; border-radius: 20px; padding: 28px 22px 32px; box-shadow: 0 1px 2px rgba(27,34,54,.06), 0 8px 24px rgba(27,34,54,.05); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.tree li { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.tree ul { position: relative; width: 100%; margin-top: 30px; padding: 22px; border-radius: 18px; background: #F5F7FC; border: 1px solid #E3E8F5; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; align-items: start; }
.tree ul::before { content: ""; position: absolute; top: -31px; left: 50%; height: 30px; border-left: 2px solid var(--line); }
.team-label { grid-column: 1 / -1; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.seat { width: 100%; max-width: 380px; border: 1px solid #D5DBEA; border-radius: 16px; padding: 16px 18px; background: #fff; box-shadow: 0 4px 14px rgba(27,34,54,.06); display: flex; flex-direction: column; gap: 10px; }
.seat.person { background: #F8F9FD; }
.seat.vacant { border: 2px dashed var(--line); background: #FBFCFE; box-shadow: none; }
.seat.vacant.ai { border-color: #F5B89C; background: #FFFBF8; }
.row { display: flex; gap: 12px; align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 19px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.person { background: var(--primary); color: #fff; }
.avatar.ai { background: #E9EEF8; color: var(--primary); border: 5px solid var(--accent); }
.avatar.vacant { border: 2px dashed var(--line); color: var(--muted); font-size: 22px; }
.name { font-family: var(--head); font-weight: 600; font-size: 17px; }
.role { font-size: 13px; color: var(--muted); }
.pill { margin-left: auto; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.live { background: var(--okbg); color: var(--ok); } .pill.setting { background: #E3E8F5; color: var(--primary); } .pill.paused { background: #EEF1FA; color: var(--muted); } .pill.vacant { background: #fff; color: var(--muted); border: 1px solid #D5DBEA; }
.purpose { font-size: 14px; line-height: 1.5; }
.facts { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.facts .warn { color: var(--warn); font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 10px; font: 600 14px var(--body); text-decoration: none; background: var(--primary); color: #fff; border: 0; cursor: pointer; align-self: flex-start; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 24px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.lower { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.panel { background: #fff; border-radius: 16px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(27,34,54,.06); flex: 999 1 460px; min-width: 0; }
.panel.rules { background: #FFF4EE; flex: 1 1 300px; }
.runs { list-style: none; margin: 0; padding: 0; }
.runs li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #EEF1FA; font-size: 14px; }
.runs .when { width: 90px; color: var(--muted); } .runs .what { flex: 1 1 200px; font-weight: 600; }
.res { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.res.ok { background: var(--okbg); color: var(--ok); } .res.part { background: #FDE7DC; color: var(--warn); } .res.fail { background: #C2410C; color: #fff; } .res.none { background: #EEF1FA; color: var(--muted); }
.deskhead { background: var(--primary); color: #fff; border-radius: 18px; padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.deskhead .name { color: #fff; font-size: 24px; } .deskhead .role, .deskhead .asof { color: #DCE3F5; font-size: 13px; }
.deskhead a.back { color: #fff; font-size: 14px; margin-left: auto; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 18px; align-items: start; }
.dsec { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(27,34,54,.06); }
.dsec.wide { grid-column: 1 / -1; }
.dsec h3 { margin: 0 0 10px; font-family: var(--head); font-size: 16px; }
.dsec p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; } .dsec p:last-child { margin-bottom: 0; }
.dsec.goal { background: #FFF4EE; } .dsec.note { background: #EEF3FF; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th, .dtable td { text-align: left; padding: 8px 10px; border-top: 1px solid #EEF1FA; vertical-align: top; }
.dtable th { color: var(--muted); font-weight: 600; border-top: 0; }
.dcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; font-size: 14px; }
.dcols ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
.scroll { overflow-x: auto; }
.sev { align-self: start; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.findings li { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 14px; line-height: 1.5; }
.login { max-width: 440px; margin: 40px auto; background: #fff; border-radius: 18px; padding: 28px; box-shadow: 0 8px 24px rgba(27,34,54,.08); display: flex; flex-direction: column; gap: 14px; }
.login label { font-size: 14px; font-weight: 600; }
.login input { min-height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: 15px var(--body); }
.notice { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }
.notice.err { color: var(--bad); }
footer.foot { max-width: 1240px; width: 100%; margin: 0 auto; padding: 18px 28px 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { main { padding: 18px; } .chart { padding: 22px 12px 26px; } .tree ul { padding: 14px; } h1 { font-size: 26px; } }

/* Max demo charts */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin-top: 16px; }
.chart { border: 1px solid #E3E8F5; border-radius: 10px; padding: 14px 16px; background: #fff; min-width: 0; }
.chart h4 { margin: 0; font-family: var(--head); font-size: 15px; color: var(--ink); }
.chart .csub { margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.chart .cgroup { margin: 10px 0 0; font-size: 12px; font-weight: 600; color: var(--ink); }
.csvg { width: 100%; height: auto; display: block; font-family: var(--body); }
.csvg .ax { font-size: 10px; fill: var(--muted); }
.csvg .lb { font-size: 12px; fill: var(--ink); }
.csvg .vl { font-size: 12px; fill: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.asof { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
@media (max-width: 520px) { .charts { grid-template-columns: 1fr; } }
.charts { align-items: start; }

/* In-tray */
.tray { background: #fff; border-radius: 18px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(27,34,54,.06), 0 8px 24px rgba(27,34,54,.05); display: flex; flex-direction: column; gap: 12px; }
.tray h2 { margin: 0; font-size: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; margin-top: 4px; }
.card { border: 1px solid #D5DBEA; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; min-width: 0; }
.card.done { background: #F8F9FD; }
.card .grp { font-size: 12px; font-weight: 600; color: var(--muted); }
.card .ttl { font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.35; }
.card .txt { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.card details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--primary); min-height: 32px; display: flex; align-items: center; }
.card details .txt { margin-top: 8px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.why { display: flex; flex-direction: column; gap: 8px; }
.why label { font-size: 13px; font-weight: 600; }
.why textarea { font: 15px var(--body); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; resize: vertical; }
.state { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #EEF1FA; color: var(--muted); }
.state.approved, .state.actioned { background: var(--okbg); color: var(--ok); } .state.rejected { background: #FDE7DC; color: var(--warn); }
.decided > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); min-height: 36px; display: flex; align-items: center; }
.btn:disabled { opacity: .55; cursor: default; }

/* Talk to the agent */
.chatbox{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin:18px 0}
.chatbox h2{margin:0 0 4px;font-size:20px}
.chatlog{max-height:420px;overflow-y:auto;display:flex;flex-direction:column;gap:10px;margin:12px 0;padding:4px}
.bubble{max-width:85%;padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.55}
.bubble .who{font-size:12px;font-weight:600;opacity:.7;margin-bottom:2px}
.bubble .txt{white-space:pre-wrap;word-wrap:break-word}
.bubble.agent{background:#F3F5FB;align-self:flex-start}
.bubble.me{background:var(--primary);color:#fff;align-self:flex-end}
.chatform{display:flex;gap:10px;align-items:flex-end}
.chatform textarea{flex:1;font:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:10px;resize:vertical}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
