:root {
  /* Brand: costeaux.com theme CSS. Ink #231F20 (headings, links), red #C43733 / hover #EB2D2E, greys #52565A #D8D9D6 #F8F8F8,
     navy #393A93 (footer rule), gold #F8DA78 (banner rule). Headings are DIN Condensed there; Barlow Condensed is the free match. */
  --bg: #F8F8F8; --panel: #FFFFFF; --line: #D8D9D6; --line-soft: #ECECEA; --ink: #231F20; --ink-2: #3D393A; --muted: #52565A; --faint: #7E8285;
  --accent: #C43733; --accent-ink: #9C2A27; --accent-hi: #EB2D2E; --accent-soft: #FBECEB;
  --head: 'Barlow Condensed', 'din-condensed', 'Arial Narrow', sans-serif; --navy: #393A93; --navy-soft: #EEEEF8; --gold: #F8DA78;
  --ok: #2F7A55; --ok-soft: #EAF4EE; --warn: #9A5B0B; --warn-soft: #FBF1E3; --bad: #B42318; --bad-soft: #FDECEA;
  --row-pad: 9px; --radius: 10px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121214; --panel: #1B1B1F; --line: #2C2C31; --line-soft: #232328; --ink: #F2F2F3; --ink-2: #D4D4D8; --muted: #A1A1AA; --faint: #8A8A93;
  --accent-soft: #3A1C1E; --navy-soft: #23244A; --ok-soft: #17301F; --warn-soft: #33260F; --bad-soft: #3A1A17; color-scheme: dark;
}
:root[data-density="compact"] { --row-pad: 5px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 Geist, system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-hi); }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
.mono { font-variant-numeric: tabular-nums; }
.shell { display: flex; min-height: 100vh; }

/* Navigation */
.nav { flex: 0 0 236px; background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 2px 8px 14px; display: block; } .brand img { width: 128px; height: auto; display: block; }
:root[data-theme="dark"] .brand img { background: #fff; border-radius: 8px; padding: 4px; }
.nav-links { display: flex; flex-direction: column; gap: 1px; }
.nav-links a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }
.nav-links a:hover { background: var(--bg); color: var(--ink); }
.nav-links a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
:root[data-theme="dark"] .nav-links a.on { color: #FFB4B8; }
.nav-links a .count { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav-links .sep { height: 1px; background: var(--line-soft); margin: 7px 10px; }
.nav-links svg { flex: 0 0 16px; }
.sources { margin-top: auto; padding: 12px 6px 2px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 5px; }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 2px 8px 2px 4px; }
.src i { width: 6px; height: 6px; border-radius: 99px; background: #2F8A5A; }
.menu-btn { display: none; }

main { flex: 1 1 auto; min-width: 0; outline: none; }

/* Home */
.home { display: flex; min-height: 100vh; }
.home-center { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.home-col { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 22px; }
.home h1 { margin: 0; font: 500 44px/1.05 var(--head); text-align: center; }
.home-sub { margin: -12px auto 0; max-width: 560px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ask { background: var(--panel); border: 1px solid #DEDBD5; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
:root[data-theme="dark"] .ask { border-color: var(--line); }
.ask textarea { border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; min-height: 64px; }
.ask-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; color: var(--faint); } .chip + .chip::before { content: '·'; margin-right: 6px; }
.btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid #DEDBD5; background: var(--panel); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
:root[data-theme="dark"] .btn { border-color: var(--line); }
.btn:hover { border-color: #BDB9B1; }
.btn.primary { background: var(--ink); color: var(--panel); border-color: var(--ink); font-weight: 600; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: default; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; color: var(--ink-2); }
.pill-btn svg { color: var(--muted); }
.pill-btn:hover { border-color: #C9C5BD; color: var(--ink); }
.rail { flex: 0 0 340px; border-left: 1px solid var(--line); background: var(--panel); padding: 20px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; max-height: 100vh; position: sticky; top: 0; }
.rail h2 { margin: 0 0 6px; font: 600 17px/1.2 var(--head); letter-spacing: 0.02em; text-transform: uppercase; }
.todo { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.todo input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.todo .t { font-size: 13px; font-weight: 500; line-height: 1.4; }
.todo.done .t { color: var(--faint); text-decoration: line-through; }
.todo .links { display: flex; gap: 12px; margin-top: 3px; }
.todo .links a, .todo .links button { font-size: 12px; font-weight: 600; background: none; border: 0; padding: 0; color: var(--accent); }
.next { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.next .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tag::before, .dot { content: ''; display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.tag.ok::before, .dot.ok { background: var(--ok); } .tag.warn::before, .dot.warn { background: #D9921C; }
.tag.bad::before, .dot.bad, .tag.red::before, .dot.red { background: var(--accent); } .tag.navy::before { background: var(--navy); }

/* Pages */
.page { padding: 20px 28px 40px; display: flex; flex-direction: column; gap: 14px; max-width: 1600px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font: 500 32px/1.1 var(--head); }
.page-head h1 .n { font-family: Geist, system-ui, sans-serif; font-variant-numeric: tabular-nums; font-size: 15px; color: var(--faint); font-weight: 400; margin-left: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-ask { display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; }
.mini-ask input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13.5px; min-width: 0; }
.mini-ask svg { flex: 0 0 auto; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { height: 34px; flex: 1 1 260px; max-width: 380px; padding: 0 12px; border-radius: 8px; border: 1px solid #DEDBD5; background: var(--panel); font-size: 13px; }
.filters select { height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid #DEDBD5; background: var(--panel); font-size: 13px; color: var(--ink-2); max-width: 220px; }
:root[data-theme="dark"] .filters input, :root[data-theme="dark"] .filters select { border-color: var(--line); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; background: var(--bg); padding: 9px 12px; white-space: nowrap; position: sticky; top: 0; }
th button { background: none; border: 0; padding: 0; color: inherit; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }
th.r, td.r { text-align: right; }
td { white-space: nowrap; font-variant-numeric: tabular-nums; padding: var(--row-pad) 12px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr { cursor: pointer; } tbody tr:hover td { background: #FBFAF8; }
:root[data-theme="dark"] tbody tr:hover td { background: #222227; }
tr.hl td { background: var(--line-soft) !important; box-shadow: inset 2px 0 0 var(--accent); }
td.strong { font-weight: 500; white-space: nowrap; } td.muted { color: var(--muted); max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td .sub { display: block; font-size: 12px; color: var(--faint); }
td input.qty { width: 72px; height: 28px; border: 1px solid #DEDBD5; border-radius: 6px; padding: 0 6px; text-align: right; font-family: 'Geist Mono', monospace; font-size: 12px; background: var(--panel); }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.strip { display: flex; flex-wrap: wrap; gap: 14px 40px; align-content: start; padding: 4px 0; }
.strip > div { display: flex; flex-direction: column-reverse; }

.strip b { display: block; font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.strip span { font-size: 12px; color: var(--muted); }
.banner { display: flex; gap: 10px; align-items: baseline; padding: 2px 0 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; flex-wrap: wrap; }
.banner svg { color: var(--muted); align-self: center; }
.banner b { font-weight: 600; }
.banner > span { flex: 1 1 0; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.split > .card { background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; padding: 8px 14px 4px; }
.bars span { flex: 1; background: #C9C6C0; border-radius: 1px; min-height: 2px; }
.bars span.wk { opacity: .55; }
.card h3 { margin: 0; font: 600 16px/1.2 var(--head); letter-spacing: 0.01em; padding: 12px 14px 0; }
.card .note { font-size: 12px; color: var(--muted); padding: 2px 14px 12px; }

/* Cake builder */
.builder { padding: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.step { display: flex; flex-direction: column; gap: 6px; }
.step label { font-size: 12px; color: var(--muted); }
.step .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 41; display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(0,0,0,.08); }

/* Agent thread */
.thread { max-width: 900px; margin: 0 auto; padding: 28px 32px calc(var(--dock-h, 180px) + 24px); display: flex; flex-direction: column; gap: 16px; }
.bubble { align-self: flex-end; max-width: 600px; background: var(--ink); color: var(--panel); border-radius: 14px 14px 4px 14px; padding: 11px 15px; font-size: 14px; }
.work { padding: 12px 16px; display: flex; flex-direction: column; gap: 7px; }
.work .h { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.work .h b { color: var(--ink); font-weight: 600; }
.wstep { display: grid; grid-template-columns: 18px 120px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.wstep .s { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--accent); }
.wstep .t { color: var(--ink-2); }
.wstep.pending { opacity: .45; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 99px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.answer { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.answer p { margin: 0 0 8px; } .answer ul, .answer ol { margin: 0 0 8px; padding-left: 20px; } .answer li { margin: 2px 0; }
.answer strong { color: var(--ink); }
.answer .md-table { overflow-x: auto; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.answer table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.answer th, .answer td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.answer th { color: var(--muted); font-weight: 500; } .answer tr:last-child td { border-bottom: 0; }
.draft-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.draft-card pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.draft-card textarea { width: 100%; min-height: 140px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--panel); }
.dock { position: fixed; bottom: 0; left: 236px; right: 0; padding: 16px 32px 20px; background: var(--bg); border-top: 1px solid var(--line); z-index: 5; }
.dock form { max-width: 836px; margin: 0 auto; }
.dock .ask textarea { min-height: 28px; font-size: 15px; }
.dock .ask { padding: 10px 14px; gap: 6px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; font-weight: 600; }

#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 9px 16px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
#toast.on { opacity: 1; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.sr { position: absolute; left: -9999px; }

@media (max-width: 1180px) { .rail { flex-basis: 290px; } .split { grid-template-columns: 1fr; } .builder { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .nav { position: static; height: auto; flex: none; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .brand { padding: 0; } .brand img { width: 96px; }
  .menu-btn { display: inline-flex; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); align-items: center; }
  .nav-links { display: none; width: 100%; padding-top: 8px; } .nav.open .nav-links { display: flex; }
  .sources { display: none; }
  .home { flex-direction: column; } .rail { position: static; max-height: none; flex: none; border-left: 0; border-top: 1px solid var(--line); }
  .home-center { padding: 32px 16px; } .home h1 { font-size: 34px; }
  .page { padding: 16px; } .thread { padding: 20px 16px calc(var(--dock-h, 180px) + 20px); } .dock { left: 0; padding: 12px 16px 16px; }
  .builder { grid-template-columns: 1fr; }
  .wstep { grid-template-columns: 18px 90px minmax(0, 1fr); } .wstep .m { display: none; }
}

/* Record page, Linear-style: content and activity on the left, properties on the right, hairlines instead of cards.
   Opens as a wide side panel (the list stays visible) and expands to a full page. */
.drawer.wide { width: min(1000px, calc(100vw - 436px)); container-type: inline-size; }
.drawer.wide.full { width: calc(100vw - 236px); box-shadow: none; }
.dv-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px 10px 24px; border-bottom: 1px solid var(--line); }
.dv-path { display: flex; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; } .dv-path a { color: var(--muted); } .dv-path a:hover { color: var(--ink); }
.dv-path span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dv-icons { display: flex; gap: 2px; }
.ib { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.ib:hover { background: var(--line-soft); color: var(--ink); }
.drawer.wide .body.dv { display: grid; grid-template-columns: minmax(0, 1fr) 280px; padding: 0; gap: 0; overflow-y: auto; flex: 1; }
.dv-main { padding: 26px 32px 40px; min-width: 0; display: flex; flex-direction: column; }
.drawer.wide.full .dv-main { padding: 32px 56px 48px; max-width: 980px; }
.dv-main h2 { font: 500 30px/1.1 var(--head); margin: 0; }
.dv-sub { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }
.dv-props { border-left: 1px solid var(--line); padding: 22px 20px 32px; font-size: 13px; }
.dv-props dl { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.dv-props dt { font-size: 12px; color: var(--muted); margin-bottom: 3px; } .dv-props dd { margin: 0; color: var(--ink); word-break: break-word; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.faint { color: var(--faint); } .block { display: block; width: 100%; }
select.inline { width: auto; flex: none; border: 0; background: none; padding: 0; font-size: 13px; color: var(--ink); cursor: pointer; }
.lchip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); font-size: 12.5px; }
.lchip:hover { border-color: var(--faint); color: var(--ink); }
.meter { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; } .meter i { display: block; height: 100%; background: var(--ink-2); }
/* The one suggestion: a plain line with quiet buttons, not a banner. */
.dv-suggest { margin: 16px 0 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; color: var(--ink-2); }
.dv-suggest > span:nth-child(2) { flex: 1 1 300px; }
.dv-suggest-act { display: flex; gap: 6px; align-items: center; }
.dv-suggest pre { flex-basis: 100%; white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--ink-2); margin: 8px 0 2px; padding-left: 12px; border-left: 2px solid var(--line); max-height: 240px; overflow: auto; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); } .btn.ghost:hover { color: var(--ink); background: var(--line-soft); }
.dv-metrics { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 22px 0 4px; }
.dv-metrics div { min-width: 0; } .dv-metrics dt { font-size: 12px; color: var(--muted); }
.dv-metrics dd { margin: 2px 0 0; font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.dv-metrics dd.faint { font-size: 12px; font-weight: 400; margin: 0; letter-spacing: 0; }
.dv-hero { margin-top: 22px; }
.dv-sec { margin-top: 28px; } .dv-sec h3, .dv-sec-h h3 { font: 600 16px/1.2 var(--head); letter-spacing: 0.01em; margin: 0 0 8px; color: var(--ink); }
.dv-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.muted-line { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
table.dense { font-size: 13px; } table.dense th { background: none; font-size: 12px; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); position: static; }
table.dense td:first-child { white-space: nowrap; } table.dense td { white-space: normal; padding: 7px 10px 7px 0; border-top: 0; border-bottom: 1px solid var(--line-soft); }
table.dense .r { padding: 7px 16px 7px 10px; } table.dense th.r { padding-top: 6px; padding-bottom: 6px; } table.dense .r:last-child { padding-right: 0; } .num { font-variant-numeric: tabular-nums; }
.drawer tbody tr { cursor: default; } .drawer tr.go { cursor: pointer; } .drawer tr.go:hover td, .drawer tr.go:focus td { background: var(--line-soft); } .drawer tr.go:focus { outline: none; }
.drawer tbody tr:not(.go):hover td { background: none; } .drawer td.muted { white-space: normal; max-width: none; }
.doc-totals { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin: 10px 0 0; } .doc-totals div { display: flex; gap: 24px; font-size: 13px; }
.doc-totals dt { color: var(--muted); } .doc-totals dd { margin: 0; min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.dv-sec blockquote { margin: 14px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--line); color: var(--ink-2); font-size: 13.5px; }
.dv-chart { width: 100%; height: auto; display: block; }
.dv-chart text { font-size: 10px; fill: var(--faint); font-variant-numeric: tabular-nums; } .dv-chart line { stroke: var(--line-soft); }
.c-base { fill: #C9C6C0; background: #C9C6C0; } .c-accent { fill: var(--accent); background: var(--accent); }
:root[data-theme="dark"] .c-base { fill: #4A4A52; background: #4A4A52; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); } .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
/* Activity: a quiet log of who did what, with comments inline. */
.dv-activity ol { list-style: none; margin: 4px 0 0; padding: 0; position: relative; }
.dv-activity ol::before { content: ''; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.dv-activity li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 6px 0; font-size: 13px; color: var(--muted); }
.dv-activity li b { color: var(--ink); font-weight: 500; } .dv-activity time { color: var(--faint); white-space: nowrap; }
.dv-activity li.next { opacity: .6; }
.dv-activity li p { margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--panel); }
.av { width: 22px; height: 22px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--muted); display: grid; place-items: center; font-size: 9.5px; font-weight: 600; position: relative; }
.comment { margin-top: 12px; display: flex; gap: 8px; align-items: flex-end; }
.comment textarea { flex: 1; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--panel); resize: vertical; font-size: 13px; }
/* The things themselves. Email and post previews stay light, the way they land in an inbox or feed. */
.mail { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mail-head { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.mail-head span { display: inline-block; width: 64px; color: var(--muted); }
.mail-body { background: #fff; color: #18181B; padding: 24px 28px; }
.mail-logo { height: 36px; display: block; margin-bottom: 18px; }
.mail-body h4 { font-size: 22px; font-weight: 600; margin: 0 0 4px; font-family: Georgia, 'Times New Roman', serif; }
.mail-body p { font-size: 14px; line-height: 1.6; margin: 12px 0 0; }
.mail-cta { display: inline-block; margin-top: 18px; background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 6px; font-weight: 600; font-size: 13.5px; }
.mail-foot { font-size: 11px; color: #8A8A90; padding-top: 14px; border-top: 1px solid #eee; margin-top: 22px; }
.post { max-width: 380px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; color: #18181B; }
.post-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; } .post-top img { height: 26px; width: 26px; object-fit: contain; border-radius: 50%; border: 1px solid #eee; }
.post-img { aspect-ratio: 1; background: #2B2B30; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; gap: 8px; }
.post-img div { font-family: Georgia, 'Times New Roman', serif; font-size: 28px; line-height: 1.15; } .post-img span { font-size: 13px; opacity: .8; }
.post-cap { padding: 10px 12px 4px; font-size: 13px; } .post-stats { padding: 0 12px 12px; font-size: 12px; color: #6B6B70; }
.ai-q { font-size: 15px; font-weight: 500; margin-bottom: 12px; } .ai-q span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-bottom: 2px; }
.ai-ans ol { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.ai-ans li b { display: block; font-size: 13.5px; font-weight: 500; } .ai-ans li span { font-size: 13px; color: var(--muted); } .ai-ans li.us b { color: var(--accent); }
.dv-map svg { width: 100%; height: auto; display: block; }
.dv-map .route { fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linejoin: round; } .dv-map .route.back { stroke-dasharray: 4 4; opacity: .5; }
.dv-map .depot { fill: var(--ink); } .dv-map .depot-t { fill: var(--panel); font-size: 10px; font-weight: 600; }
.dv-map .stop { fill: var(--panel); stroke: var(--ink-2); stroke-width: 1.5; } .dv-map .stop.flag { stroke: var(--accent); stroke-width: 2; }
.dv-map .stop-n { font-size: 10.5px; font-weight: 600; fill: var(--ink); } .dv-map .stop-l { font-size: 10.5px; fill: var(--muted); }
@container (max-width: 720px) { .drawer.wide .body.dv { grid-template-columns: minmax(0, 1fr); } .dv-props { border-left: 0; border-top: 1px solid var(--line); padding: 16px 24px; } .dv-props dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (max-width: 900px) { .drawer.wide, .drawer.wide.full { width: 100vw; } #dr-expand { display: none; } .dv-main { padding: 20px 16px 32px; } .dv-head { padding-left: 16px; } .dv-props { padding: 16px; } }

/* Keep names, dates and amounts intact; narrow screens scroll the answer table. */
.answer table, .a-card table { display: block; max-width: 100%; overflow-x: auto; }
.answer th, .answer td, .a-card th, .a-card td { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
