/* The CEO app's dark tokens, so the portal and the journal feel like one product. Edit colours here only. */
:root {
  --bg: #1a1a1a;            /* primaryBlack */
  --card: #242424;          /* secondaryBlack */
  --edge: rgba(255, 255, 255, 0.08);
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --blue: #4a90e2; --green: #34c27a; --red: #e5534b; --orange: #f0a030;
  --radius: 12px; --control: 48px; --gutter: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a.btn { display: inline-flex; align-items: center; }
a.plain { color: inherit; display: block; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 17px; margin: 0 0 8px; } h3 { font-size: 15px; margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.shell { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter) 96px; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding: 12px 0; position: sticky; top: 0; background: var(--bg); z-index: 2; border-bottom: 1px solid var(--edge); }
.nav a { padding: 10px 14px; border-radius: var(--radius); color: var(--muted); white-space: nowrap; }
.nav a[aria-current='page'] { background: var(--card); color: var(--text); }
.nav .spacer { flex: 1; }
.card { background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.btn { min-height: var(--control); padding: 0 18px; border: 0; border-radius: var(--radius); background: var(--blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn.quiet { background: transparent; border: 1px solid var(--edge); color: var(--text); }
.btn.danger { background: var(--red); } .btn.good { background: var(--green); color: #0b1a12; }
.btn[disabled] { opacity: 0.5; cursor: default; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; min-height: var(--control); padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--edge); border-radius: var(--radius); font: inherit; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); }
.field .err { color: var(--red); font-size: 13px; margin-top: 4px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--edge); }
.pill.blue { color: var(--blue); } .pill.green { color: var(--green); } .pill.red { color: var(--red); } .pill.orange { color: var(--orange); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--edge); }
.timeline li { padding: 0 0 14px 12px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--edge); }
.bubble.mine { margin-left: auto; background: #1f3552; }
.thinking { color: var(--muted); } .thinking::after { content: '…'; animation: blink 1s infinite; } @keyframes blink { 50% { opacity: 0.2; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius); padding: 12px 18px; z-index: 5; }
.toast.error { border-color: var(--red); }
.tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--edge); color: var(--muted); }
.tabs a[aria-current='page'] { background: var(--blue); color: #fff; border-color: var(--blue); }
@media (prefers-reduced-motion: reduce) { .thinking::after { animation: none; } }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; z-index: 10; padding: var(--gutter); }
.dialog { width: min(420px, 100%); margin: 0; }
.stat { font-size: 24px; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.tabs.small a { padding: 6px 12px; font-size: 14px; }
.codebox { word-break: break-all; font-family: ui-monospace, monospace; background: var(--bg); border: 1px solid var(--edge); border-radius: var(--radius); padding: 10px; user-select: all; }
