:root { --ok:#246347; --deny:#a53535; --hold:#896019; --muted:#626a67; --line:#dce2dc; --ink:#203c32; --paper:#f7f8f3; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { font:15px/1.6 system-ui,sans-serif; margin:0 auto; max-width:1280px; padding:0 40px; color:var(--ink); background:var(--paper); }
a { color:inherit; text-underline-offset:4px; }
nav { display:flex; justify-content:space-between; align-items:center; padding:26px 0; border-bottom:1px solid var(--line); gap:16px; }
.brand { display:inline-flex; align-items:center; gap:10px; font-size:27px; font-weight:750; letter-spacing:-1px; text-decoration:none; }
.brand-dot { color:#b36234; }
.eyebrow { font-size:11px; text-transform:uppercase; letter-spacing:.14em; font-weight:650; color:var(--muted); }
.hero { padding:48px 0 28px; max-width:780px; }
h1 { font-size:clamp(38px,5vw,64px); line-height:1.08; letter-spacing:-.055em; font-weight:600; margin:18px 0 24px; }
h1 span { color:#7a897b; }
.intro { font-size:18px; max-width:610px; color:var(--muted); }
.truth { margin:0; font-size:12px; color:var(--muted); }
.truth strong { color:var(--ink); margin-right:6px; }
.truth::before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--ok); margin-right:8px; }
h2 { margin:0 0 12px; font-size:22px; letter-spacing:-.035em; line-height:1.25; font-weight:600; }
h3 { font-size:15px; margin:20px 0 8px; }
p { margin:0 0 16px; }
code,pre { font:12px/1.6 ui-monospace,SFMono-Regular,monospace; }
pre { background:#f0f3ec; padding:14px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; border-radius:8px; }
.bar { display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:12px 0; border-top:1px solid var(--line); }
.session { max-width:800px; font-size:12px; }
.session #ready { display:block; padding:8px 0; }
#status { font-size:13px; color:var(--muted); margin:0 0 16px; }
main { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:22px; }
.panel { border:1px solid var(--line); border-radius:16px; padding:28px; min-width:0; background:#fff; }
.panel > p:not(.eyebrow) { color:var(--muted); }
.activity-panel { grid-column:2; grid-row:1 / span 2; align-self:start; min-height:100%; background:#172c25; color:#e5eee7; --muted:#acbdb0; --line:#3a5044; }
.activity-panel h2 { font-size:28px; }
.activity-panel .ledger-format { font:11px/1.6 ui-monospace,monospace; padding-bottom:20px; border-bottom:1px solid var(--line); }
.activity-panel .history,.activity-panel .empty { font-family:ui-monospace,monospace; font-size:12px; }
.activity-panel pre { background:#10221c; color:#dce8df; }
.activity-panel .badge { background:transparent; }
.activity-panel .ok { color:#a2d5ad; }
.activity-panel .deny { color:#ffaaa0; }
.activity-panel .hold { color:#efd38f; }
.activity-panel .warn { color:#d6b0f0; }
.activity-panel button { background:transparent; color:#e5eee7; }
.activity-panel button:hover:not(:disabled) { background:#304c3d; }
.activity-panel .history li.match { background:#304c3d; }
.activity-panel :focus-visible { outline-color:#b4d9f5; }
.ledger-cursor { display:inline-block; width:7px; height:14px; background:#b1cd8d; vertical-align:-2px; margin-left:7px; animation:cursor-blink 1.2s step-end 4; }
@keyframes cursor-blink { 50% { opacity:0; } }
button { font:inherit; font-weight:550; padding:10px 16px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); cursor:pointer; transition:background .15s,border-color .15s; }
button:hover:not(:disabled) { background:#edf2e9; border-color:#90a38f; }
button:disabled { opacity:.5; cursor:not-allowed; }
:focus-visible { outline:3px solid #397aaf; outline-offset:4px; }
#reset { font-size:12px; padding:6px 12px; background:transparent; }
.card .actions button:first-child { background:var(--ink); color:#fff; border-color:var(--ink); }
.card .actions button:first-child:hover:not(:disabled) { background:#375c49; }
summary { cursor:pointer; color:var(--muted); font-size:12px; padding:5px 0; }
fieldset { border:0; margin:24px 0 18px; padding:0; }
legend { font-weight:600; margin-bottom:10px; }
fieldset label { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:8px; margin:7px 0; cursor:pointer; }
fieldset label:has(input:checked) { background:#eef3e9; border-color:#879d7e; }
input { accent-color:var(--ink); width:16px; height:16px; margin:0; }

.tip { border-left:2px solid #becbad; padding:0 0 0 14px; margin-top:24px; font-size:13px; }
.muted { color:var(--muted); }
.badge { display:inline-block; font-size:12px; font-weight:650; padding:3px 9px; border-radius:5px; border:1px solid currentColor; }
.ok { color:var(--ok); background:#f0f7f0; } .deny { color:var(--deny); background:#fff4f0; } .hold { color:var(--hold); background:#fff9e9; }
.warn { color:#7540a0; border-style:dashed; }
.executions { padding-left:20px; } .executions code { overflow-wrap:anywhere; }
.card { border:1px solid #ddc385; border-radius:10px; padding:22px; margin-bottom:20px; background:#fffcf2; }
.card h3 { margin-top:0; } .card .actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.history { list-style:none; padding:0; margin:0; }
.history li { border-top:1px solid var(--line); padding:20px 0; }
.history li.match,.rule-hit { background:#f5edb3; }
.empty { padding:28px 0; }
.service-details { border-top:1px solid var(--line); padding:12px 0; }
.verify { border-top:1px solid var(--line); padding-top:18px; }
.verify > details { margin-top:8px; }
.fatal { border:2px solid var(--deny); padding:20px; margin:12px 0; }
.next { margin:52px 0 36px; }
.next > h2 { font-size:32px; }
.cards { display:grid; grid-template-columns:1.4fr 1fr; gap:48px; margin-top:24px; }
.cards p { color:var(--muted); font-size:14px; }
.cards h3 { font-size:20px; }
.hosted-preview { background:#eaf0e3; border-radius:12px; padding:24px; }
.hosted-preview h3 { margin-top:12px; }
.tag { font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:#596b4b; }
.url-example { display:block; overflow-wrap:anywhere; margin:20px 0; padding:14px; background:#f8faf5; border:1px solid #d5dfcc; border-radius:6px; }
.url-example strong { color:var(--ok); }
.text-link { font-size:14px; font-weight:600; }
footer { border-top:1px solid var(--line); padding:24px 0; font-size:12px; display:flex; justify-content:space-between; gap:20px; color:var(--muted); }
dl { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:6px 14px; margin:14px 0; font-size:13px; }
dt { font-weight:600; } dd { margin:0; overflow-wrap:anywhere; }
@media(max-width:760px) { body { padding:0 20px; } main,.cards { grid-template-columns:1fr; } .activity-panel { grid-column:auto; grid-row:auto; min-height:0; } .panel { padding:22px; } .cards { gap:24px; } .hero { padding-top:32px; } footer { flex-direction:column; gap:6px; } }
@media(prefers-reduced-motion:reduce) { button { transition:none; } .ledger-cursor { animation:none; } }

/* Keep the conversation primary; the ledger is a quiet, independently scrollable rail. */
.hero { padding:30px 0 10px; max-width:none; }
h1 { font-size:clamp(34px,4vw,50px); margin:10px 0 16px; }
h1 br { display:none; }
h1 span::before { content:" "; }
.intro { font-size:16px; max-width:740px; margin-bottom:10px; }
main { grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:20px; align-items:start; }
.request-panel { padding:0; overflow:hidden; box-shadow:0 12px 36px #203c3208; }
.agent-heading { display:flex; align-items:center; gap:12px; padding:20px 24px; border-bottom:1px solid var(--line); }
.avatar { width:38px; height:38px; display:grid; place-items:center; background:#e7eddc; border-radius:12px; font-weight:650; }
.agent-heading h2 { font-size:17px; margin:0; letter-spacing:-.02em; }
.agent-heading p { margin:0; color:var(--muted); font-size:11px; }
.agent-heading code { font-size:10px; }
.agent-label { margin-left:auto; font-size:9px; letter-spacing:.1em; color:var(--muted); border:1px solid var(--line); border-radius:4px; padding:3px 6px; }
.conversation { padding:28px 28px 12px; height:215px; overflow-y:auto; overflow-anchor:none; scrollbar-width:thin; }
.speaker { font:10px/1.5 ui-monospace,monospace; letter-spacing:.1em; color:var(--muted); margin:0 0 8px; display:block; }
.welcome { font-size:18px; line-height:1.6; letter-spacing:-.025em; }
.user-message { background:#edf1e7; border:1px solid #e0e7d7; border-radius:14px 14px 3px 14px; padding:12px 16px; margin:20px 0 22px auto; width:fit-content; max-width:90%; }
.user-message p { margin:0; font-size:14px; }
.user-message .speaker { margin-bottom:4px; }
#latest > p { font-size:13px; }
#latest pre { background:transparent; border-left:2px solid #d5e1cb; border-radius:0; padding:6px 14px; font:14px/1.7 system-ui,sans-serif; }
.composer { padding:18px 24px; background:#fafbf7; border-top:1px solid var(--line); }
.composer .eyebrow { font-size:10px; margin-bottom:10px; }
.tools { display:flex; flex-wrap:wrap; gap:8px; }
.tools button { width:auto; border-radius:20px; font-size:13px; padding:8px 13px; box-shadow:0 2px 3px #203c3205; }
.tools button span { margin-left:10px; color:#6e826e; }
.request-details { margin-top:10px; }
.request-details .args { display:block; padding:6px 0; overflow-wrap:anywhere; }
#approval:not(:empty) { padding:0 24px; }
#approval .card { margin-top:14px; }
.rules-panel { padding:22px 26px; }
.rules-panel h2 { font-size:19px; }
.rules-panel > p { font-size:13px; }
.rules-panel fieldset { margin:16px 0; display:flex; flex-wrap:wrap; gap:8px; }
.rules-panel legend { font-size:12px; margin-bottom:4px; }
.rules-panel label { font-size:12px; padding:8px 10px; margin:4px 0; }
.rules-panel .tip { margin:16px 0 0; }
.activity-panel { position:sticky; top:20px; min-height:0; height:min(720px,calc(100dvh - 40px)); display:flex; flex-direction:column; padding:22px; overflow:auto; scrollbar-width:thin; scrollbar-color:#597362 transparent; }
.activity-panel h2 { font-size:24px; }
.activity-panel .eyebrow { font-size:10px; margin-bottom:8px; }
.activity-panel .ledger-format { font-size:10px; padding-bottom:16px; margin-bottom:0; }
.ledger-stream { flex:1; min-height:100px; overflow:auto; scrollbar-width:thin; scrollbar-color:#597362 transparent; }
.activity-panel .history li { padding:0; border-top:0; border-bottom:1px solid var(--line); }
.ledger-row { display:flex; align-items:center; gap:8px; padding:16px 0; list-style:none; font:11px/1.6 ui-monospace,monospace; color:#e5eee7; }
.ledger-row::-webkit-details-marker { display:none; }
.ledger-row::before { content:"+"; color:#91a68d; flex:none; }
details[open] > .ledger-row::before { content:"−"; }
.ledger-tool { overflow-wrap:anywhere; flex:1; }
.ledger-outcome { flex:none; font-size:10px; }
.activity-panel .history details > p { font-size:12px; margin-bottom:12px; }
.activity-panel dl { display:block; font-size:11px; }
.activity-panel dt { color:var(--muted); margin-top:10px; }
.activity-panel dd { margin-bottom:6px; }
.activity-panel .empty { font-size:11px; line-height:1.8; padding:26px 0; }
.activity-panel .verify { padding-top:12px; }
.activity-panel .verify button { width:100%; font-size:12px; padding:8px; }
.activity-panel .service-details { padding:8px 0; }
.activity-panel .service-details p,.activity-panel .verify p { font-size:12px; }
#status { min-height:21px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media(max-width:900px) and (min-width:761px) { body { padding:0 24px; } .activity-panel { padding:16px; } .agent-mode { display:none; } }
@media(max-width:760px) { main { grid-template-columns:1fr; } .activity-panel { position:static; height:480px; grid-column:auto; grid-row:auto; } .agent-heading,.composer { padding:18px; } .conversation { padding:24px 18px 10px; } .agent-label { font-size:8px; } .agent-mode { display:none; } h1 br { display:block; } }

#latest article { padding-bottom:14px; animation:message-enter 200ms ease-out; }
@keyframes message-enter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
#latest article > p { font-size:13px; }
.conversation-outcome { background:transparent; }
.activity-panel .ledger-outcome { background:transparent; border:0; font-weight:400; opacity:.85; }
.ledger-tool { animation:ledger-type .55s steps(14,end); }
@keyframes ledger-type { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0); } }
.activity-panel #approval:not(:empty) { padding:0; flex-shrink:0; max-height:65%; overflow:auto; }
.activity-panel #approval .card { background:#243a2e; border:1px solid #60734e; color:#e5eee7; padding:16px; margin:12px 0; }
.activity-panel #approval h3 { font-size:15px; }
.activity-panel #approval p { font-size:12px; }
.activity-panel #approval .actions { gap:8px; }
.activity-panel #approval button { font-size:12px; padding:8px 12px; }
.activity-panel #approval .actions button:first-child { background:#d9e5c8; color:#203c32; border-color:#d9e5c8; }
@media(prefers-reduced-motion:reduce) { .ledger-tool, #latest article { animation:none; } }

.agent-response { animation:message-enter 180ms ease-out; }
.agent-response p { font-size:13px; }
.tool-call { color:var(--muted); font:11px/1.6 ui-monospace,monospace; margin:0 0 12px; animation:message-enter 180ms ease-out both; }
.tool-call code { font-size:11px; }
.agent-answer { animation:message-enter 220ms 160ms ease-out both; }
.thinking-dots { display:inline-block; letter-spacing:3px; animation:thinking-pulse 900ms ease-in-out 3; }
@keyframes thinking-pulse { 50% { opacity:.35; transform:translateY(-2px); } }
@media(prefers-reduced-motion:reduce) { .agent-response,.tool-call,.agent-answer,.thinking-dots { animation:none; } }

.agent-bubble { background:#f1f3ef; border:1px solid #e3e8df; border-radius:14px 14px 14px 3px; padding:14px 16px; max-width:90%; width:fit-content; margin-bottom:18px; }
.agent-bubble .welcome { margin:0; font-size:15px; }
.agent-bubble p:last-child { margin-bottom:0; }
.agent-bubble .tool-call { margin:0 0 10px; }
.agent-bubble .tool-call summary { padding:0; font-size:11px; }
.agent-bubble .tool-call p { margin:8px 0; font-size:12px; overflow-wrap:anywhere; }
.agent-answer p { line-height:1.7; }

.activity-panel #approval .card { padding:14px; }
.activity-panel #approval h3 { margin:0 0 4px; }
.activity-panel #approval .approval-caption { margin:0 0 12px; color:var(--muted); font-size:11px; }
.activity-panel #approval .approval-identity { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin:0 0 10px; }
.activity-panel #approval .approval-identity dt { margin:0 0 2px; font-size:10px; }
.activity-panel #approval .approval-identity dd { margin:0; font-size:11px; }
.activity-panel #approval .approval-args { margin:0 0 8px; padding:10px; font-size:11px; line-height:1.45; }
.activity-panel #approval .approval-expiry { margin:0; color:var(--muted); font-size:10px; }
.activity-panel #approval .actions { margin:10px 0 6px; position:sticky; bottom:0; background:#243a2e; padding:6px 0; }
.activity-panel #approval .actions button:first-child { flex:1; }

.rules-panel { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:22px; }
.rule-controls { min-width:0; }
.rule-controls > p:not(.eyebrow) { font-size:13px; color:var(--muted); }
.rules-panel fieldset { display:block; }
.rules-panel label { margin:8px 0; font-weight:700; }
.policy-details { min-width:0; border-left:1px solid var(--line); padding-left:20px; }
.policy-details h3 { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin:0 0 8px; font-size:13px; }
.policy-file { font:10px/1.6 ui-monospace,monospace; color:var(--muted); margin-left:auto; }
.policy-version { height:42px; overflow:auto; margin:0 0 8px; }
.policy-version code { font-size:10px; }
#policy { height:310px; margin:0; font-size:11px; line-height:1.65; white-space:pre; word-break:normal; overflow:auto; }
.policy-caption { font-size:11px; color:var(--muted); margin:8px 0 0; }
@media(max-width:1100px) and (min-width:761px), (max-width:560px) { .rules-panel { grid-template-columns:1fr; } .policy-details { border-left:0; border-top:1px solid var(--line); padding:18px 0 0; } }

.policy-rule { display:block; width:max-content; min-width:100%; border-radius:3px; transition:background-color 180ms ease; }
.policy-line { display:inline-block; }
.policy-changed { animation:ledger-type .55s steps(14,end); }
@media(prefers-reduced-motion:reduce) { .policy-changed { animation:none; } .policy-rule { transition:none; } }

/* Install CTA. */
.hero-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin-bottom:4px; }
.hero-meta p { margin:0; }
.install { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; min-width:0; max-width:100%; }
.install code { min-width:0; max-width:100%; overflow-x:auto; white-space:nowrap; padding:0 8px; background:#f0f3ec; border-radius:4px; }
.run-cmds { white-space:pre; overflow-wrap:normal; }
.btn-primary { display:inline-block; font-weight:600; font-size:14px; padding:10px 16px; border-radius:8px; background:var(--ink); color:#fff; border:1px solid var(--ink); text-decoration:none; }
.btn-primary:hover { background:#375c49; }
.ea-note { display:block; margin-top:6px; font-size:13px; color:var(--muted); }
