/* Slimm, the app, as a prototype (2026-10-09). Same paper, ink and blue as the scene pages
   (mockups/the-refund-room.html, mockups/the-library.html). Light only. */
:root {
  --desk: #F3EEE5; --screen: #FFFDF9; --soft: #F7F2EA; --soft-2: #ECE5D8;
  --ink: #1E1B16; --ink-2: #57524A; --ink-3: #6A6256;
  --line: #E7E0D3; --line-2: #D5CCBB;
  --yes: #2B66FA; --yes-deep: #1F4FD1; --yes-ink: #FFFFFF; --yes-wash: #E8EFFF;
  --wait: #8F5400; --wait-wash: #FFF0D2;
  --ok: #1E6B3A; --ok-wash: #E3F4E8;
  --src: #4C3FB8; --src-wash: #ECE8FF;
  --hold: #8A2E2E; --hold-wash: #FBE6E6;
  --ring: rgba(47,107,255,.34); --shade: rgba(70,52,25,.18);
  --c-pia: #1E8A5A; --c-brian: #2F6BFF; --c-marcus: #4C3FB8; --c-rizwan: #B86B2E; --c-michael: #0E7C86; --c-linda: #B8336A; --c-oscar: #7A4E9E; --c-maja: #2E7F8A;
  --display: "Bricolage Grotesque", "Schibsted Grotesk", system-ui, sans-serif;
  --ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* Keyboard: a visible ring on whatever has focus, never on a mouse click */
:focus-visible { outline: 2px solid var(--yes); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
html, body { height: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--ui); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
b { font-weight: 700; }
svg { display: inline-block; vertical-align: -2px; }
input, textarea { font: inherit; color: inherit; }
.lab { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* People and agents */
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; background: var(--ink-3); }
.av.pia { background: var(--c-pia); } .av.brian { background: var(--c-brian); } .av.marcus { background: var(--c-marcus); } .av.rizwan { background: var(--c-rizwan); } .av.michael { background: var(--c-michael); } .av.linda { background: var(--c-linda); } .av.oscar { background: var(--c-oscar); } .av.maja { background: var(--c-maja); }
.av.thomas { background: #5B6B2E; } .av.henrik { background: #3F6B8A; } .av.signe { background: #8A3F6B; } .av.anders { background: #2E4E8A; } .av.karen { background: #8A5A2E; } .av.camilla { background: #B8442E; } .av.jonas { background: #2E8A7A; } .av.mathias { background: #4E4E8A; } .av.sofie { background: #8A2E5B; } .av.lotte { background: #6B8A2E; } .av.peter { background: #5A4E3F; } .av.nadia { background: #8A6B2E; } .av.frederik { background: #2E6B8A; } .av.emma { background: #B82E7A; }
.agent { width: 22px; height: 22px; display: inline-grid; place-items: center; flex: none; }
.agent svg { width: 100%; height: 100%; display: block; }
.agent.sm { width: 16px; height: 16px; }
.agent.lg { width: 48px; height: 48px; align-self: flex-start; }
.card.dense .agent.lg { width: 28px; height: 28px; align-self: center; }
.toag svg.bot { width: 14px; height: 14px; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login .box { width: 100%; max-width: 380px; background: var(--screen); border: 1px solid var(--line); border-radius: 20px; padding: 28px 28px 24px; box-shadow: 0 24px 50px -30px var(--shade); animation: pop .4s ease-out; }
.login .brand { font-family: var(--display); font-weight: 800; font-size: 24px; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.login .brand i { width: 18px; height: 18px; border-radius: 5px; background: var(--yes); display: inline-block; }
.login p.lead { margin: 0 0 18px; color: var(--ink-2); }
.login h1 { font-family: var(--display); font-size: 22px; margin: 0 0 14px; }
.login label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.login input { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 15px; background: var(--screen); outline: 0; }
.login input:focus { border-color: var(--yes); box-shadow: 0 0 0 3px var(--ring); }
.login .hint { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 14px; }
.login .primary { width: 100%; background: var(--yes); color: var(--yes-ink); border-radius: 10px; padding: 11px; font-weight: 700; font-size: 15px; transition: transform .1s, background .2s; }
.login .primary:hover { background: var(--yes-deep); }
.login .primary:active { transform: scale(.985); }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12.5px; margin: 16px 0; }
.login .or::before, .login .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.login .alt { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; background: var(--screen); }
.login .alt:hover { border-color: var(--ink-3); }
.login .small { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }
.login .small a { color: var(--ink-2); }
.login .busy { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 12px; color: var(--ink-2); }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--line-2); border-top-color: var(--yes); border-radius: 50%; animation: spin .9s linear infinite; }

/* ---------- App shell ---------- */
.shell { height: 100vh; display: grid; grid-template-rows: 56px 1fr; }
.top { height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 18px; background: var(--screen); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.brand { font-family: var(--display); font-weight: 800; font-size: 19px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand i { width: 14px; height: 14px; border-radius: 4px; background: var(--yes); display: inline-block; }
.top .co { color: var(--ink-3); font-size: 13.5px; }
.top .me { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.top .me .pill { font-size: 11px; padding: 1px 7px; }
.top .clock { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.top .clock + .me { margin-left: 18px; }
.top .me a { font-size: 12.5px; color: var(--ink-3); cursor: pointer; margin-left: 8px; }
.top .me a:hover { color: var(--ink); }
.top .proto { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); margin-left: 24px; padding: 3px 10px; border: 1px dashed var(--line-2); border-radius: 999px; }
.top .proto a { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; color: var(--ink-2); }
.top .proto select { font: inherit; font-size: 12px; color: var(--ink-2); border: 0; background: none; cursor: pointer; }
.body { display: grid; grid-template-columns: 220px minmax(0, 1fr) 460px; min-height: 0; }
.nav { border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--soft); min-height: 0; }
.main { overflow: auto; min-height: 0; min-width: 0; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.nav a:hover { background: var(--soft-2); color: var(--ink); }
.nav a.on { background: var(--screen); color: var(--ink); box-shadow: 0 1px 2px var(--shade); }
.nav a em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink-3); background: var(--soft-2); padding: 1px 7px; border-radius: 999px; min-width: 22px; text-align: center; }
.nav a em.hot { background: var(--yes); color: var(--yes-ink); animation: pop .3s ease-out; }
.nav a em.none { visibility: hidden; }
.nav hr { border: 0; border-top: 1px solid var(--line); margin: 10px 4px; }
.nav a.sub { font-weight: 500; font-size: 13.5px; }
.main { padding: 26px 36px 30px; }

.main h1 { font-family: var(--display); font-size: 28px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
.head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { margin: 0; }
.head .pills { margin: 0 0 0 auto; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 24px; }
.pill { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--soft-2); color: var(--ink-2); }
.pill.hot { background: var(--yes-wash); color: var(--yes-deep); }
.pill.ok { background: var(--ok-wash); color: var(--ok); }
.pill.wait { background: var(--wait-wash); color: var(--wait); }
.pill.src { background: var(--src-wash); color: var(--src); }
.pill.hold { background: var(--hold-wash); color: var(--hold); }

/* Filters: a search, one pill per thing you can filter by, each opens a menu; a sort; clear all */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; }
.filters .search { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 12px; background: var(--screen); color: var(--ink-3); height: 32px; width: 220px; transition: border-color .15s, box-shadow .15s; }
.filters .search:focus-within { border-color: var(--yes); box-shadow: 0 0 0 3px var(--ring); color: var(--ink-2); }
.filters .search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 13.5px; }
.fl { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--screen); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.fl:hover { border-color: var(--ink-3); color: var(--ink); }
.fl.on { background: var(--yes-wash); border-color: var(--yes-wash); color: var(--yes-deep); padding-right: 6px; }
.fl .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.fl [data-clear] { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-left: 2px; }
.fl [data-clear]:hover { background: rgba(47,107,255,.15); }
.nav a em, .pill, .fl, .pager, .menu em, .sect .lab em, .lab.list, .card .from .when, .row .mark { font-variant-numeric: tabular-nums; }
.fl.sort { margin-left: auto; }
.filters .clear { font-size: 12.5px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; padding: 0 4px; }
.filters .clear:hover { color: var(--ink); }
.menu { position: fixed; z-index: 60; min-width: 200px; max-width: 280px; max-height: 60vh; overflow: auto; background: var(--screen); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; box-shadow: 0 18px 40px -18px var(--shade); display: none; flex-direction: column; }
.menu.open { display: flex; animation: pop .15s ease-out; }
.menu button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); }
.menu button:hover { background: var(--soft); color: var(--ink); }
.menu button.on { color: var(--yes-deep); font-weight: 600; background: var(--yes-wash); }
.menu button em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--ink-3); background: var(--soft-2); padding: 0 7px; border-radius: 999px; }
.menu .ms { display: flex; align-items: center; gap: 7px; padding: 6px 10px; margin: 0 0 4px; border-bottom: 1px solid var(--line); color: var(--ink-3); position: sticky; top: -6px; background: var(--screen); }
.menu .ms input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); }
.menu .none { display: none; padding: 8px 10px; font-size: 13px; color: var(--ink-3); }
.menu.empty .none { display: block; }
.lab.list { margin-bottom: 10px; }
.pager { display: flex; align-items: center; gap: 14px; margin: 18px 0 8px; font-size: 13px; color: var(--ink-3); }
.pager .pg { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.pager .pg button { min-width: 30px; height: 30px; padding: 0 9px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid transparent; }
.pager .pg button:hover { border-color: var(--line-2); background: var(--screen); }
.pager .pg button.on { background: var(--ink); color: var(--screen); }
.pager .pg button:disabled { color: var(--line-2); cursor: default; border-color: transparent; background: none; }
.pager .pg i { color: var(--ink-3); padding: 0 4px; font-style: normal; }

/* The library page: one row per line */
.lrow { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--line); border-radius: 16px; font-size: 14px; background: var(--screen); margin-bottom: 8px; width: 100%; text-align: left; transition: border-color .15s, box-shadow .15s; }
.lrow:hover { border-color: var(--line-2); box-shadow: 0 6px 18px -14px var(--shade); }
.lrow .t { flex: 1; line-height: 1.4; }
.lrow small { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.lrow small .av { width: 16px; height: 16px; font-size: 9px; }
.lrow .g { margin-top: 2px; }
.sect { margin-bottom: 28px; }
.sect .lab { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sect .lab em { font-style: normal; background: var(--soft-2); color: var(--ink-2); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.sect .lab .walk { margin-left: auto; text-transform: none; letter-spacing: 0; }
.quiet { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-3); padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 16px; }
.quiet i { width: 20px; height: 20px; border-radius: 50%; background: var(--ok-wash); color: var(--ok); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.placeholder { padding: 40px 0; color: var(--ink-3); }

/* Cards: the one thing a person is asked. Compact: a row of pills, the question with the ask in bold, the choices on the right */
.card { border: 1px solid var(--line-2); border-left-width: 4px; border-radius: 14px; padding: 9px 14px 10px 13px; background: var(--screen); animation: slideup .5s cubic-bezier(.2,.8,.2,1); margin-bottom: 8px; }
.card.late { animation: slideup .7s cubic-bezier(.2,.8,.2,1); }
.card.sel, .row.sel { border-color: var(--yes); box-shadow: 0 0 0 3px var(--ring); }
.card { cursor: pointer; }
.card.today { border-left-color: var(--wait); }
.card.now { border-left-color: var(--hold); }
.pills.sm { margin: 0 0 6px; gap: 4px; align-items: center; }
.pills.sm .pill { font-size: 11px; height: 20px; padding: 0 7px; line-height: 20px; box-sizing: border-box; border: 1px solid transparent; display: inline-flex; align-items: center; }
.pills.sm .pill.by { gap: 4px; background: var(--screen); border-color: var(--line); padding-left: 5px; }
.pills.sm .pill.by .agent { width: 14px; height: 14px; }
.pills.sm .pill.by .agent svg { vertical-align: 0; }
.pills.sm .pill.when { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.pill.today { background: var(--wait-wash); color: var(--wait); }
.pill.now { background: var(--hold-wash); color: var(--hold); }
.card .qrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card .q { flex: 1 1 300px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.card .ttl { font-family: var(--display); font-weight: 700; font-size: 15.5px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .ctx { margin-top: 3px; }
.card .ask { font-weight: 700; color: var(--ink); margin-top: 2px; }
.deep { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; max-width: 72ch; }
.card.dense { padding-top: 7px; padding-bottom: 8px; }
.card.dense .pills.sm { margin-bottom: 4px; }
.card .btns { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.parties { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pill.pp { font-size: 11px; height: 20px; padding: 0 7px 0 3px; line-height: 20px; display: inline-flex; align-items: center; gap: 4px; background: var(--soft-2); color: var(--ink-2); font-weight: 600; }
.pill.pp .av { width: 14px; height: 14px; font-size: 8.5px; }
.pill.pp:not(:has(.av)) { padding-left: 7px; }
.toag { margin-left: 4px; height: 20px; padding: 0 7px 0 4px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-3); border: 1px solid transparent; }
.toag svg { width: 14px; height: 14px; }
.toag:hover { background: var(--yes-wash); color: var(--yes-deep); }
.card.sel .toag, .row.sel .toag { background: var(--yes-wash); color: var(--yes-deep); }
.card[data-id], .row[data-id] { cursor: pointer; }
.dens { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; background: var(--screen); margin-left: auto; }
.dens button { height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.dens button.on { background: var(--ink); color: var(--screen); }
.dens + .fl.sort { margin-left: 0; }
.card .who { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); animation: pop .3s ease-out; }
.btn { border: 1px solid var(--line-2); background: var(--screen); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; transition: transform .1s, border-color .15s, background .15s; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.96); }
.btn.y { background: var(--yes); color: var(--yes-ink); border-color: var(--yes); }
.btn.y:hover { background: var(--yes-deep); border-color: var(--yes-deep); }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.doneline { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 16px; background: var(--ok-wash); font-size: 14px; animation: pop .4s ease-out; margin-bottom: 10px; }
.doneline .ok { color: var(--ok); font-weight: 700; }
/* A tapped card, held for a few seconds before it leaves */
.held { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 16px; background: var(--ok-wash); font-size: 14px; animation: pop .25s ease-out; margin-bottom: 10px; }
.held .ok { color: var(--ok); font-weight: 700; }
.held .t { flex: 1; }
.held small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.held small b { color: var(--ink-2); }
.card.back { animation: pop .3s ease-out; }
.msg .mark .btn.sm { padding: 2px 9px; font-size: 12px; margin-left: 4px; }
.msg .mark .sent { color: var(--ok); font-weight: 600; }
.doneline small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--line); border-radius: 16px; font-size: 14px; animation: pop .4s ease-out; background: var(--screen); margin-bottom: 8px; width: 100%; text-align: left; transition: border-color .15s, box-shadow .15s; }
.row.dense { padding: 7px 14px; margin-bottom: 6px; }
.row .t .parties { margin-left: 8px; vertical-align: middle; }
.row:hover { border-color: var(--line-2); box-shadow: 0 6px 18px -14px var(--shade); }
.row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wait); margin-top: 7px; flex: none; }
.row .dot.ok { background: var(--ok); } .row .dot.live { background: var(--src); }
.row .t { flex: 1; } .row small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.row .mark { font-size: 12px; color: var(--ink-3); }

/* The agent, in a panel on the right of every page. The page never moves. */
.side { border-left: 1px solid var(--line); background: var(--screen); padding: 14px 18px 16px; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side .sh { display: flex; align-items: center; gap: 8px; font-size: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex: none; }
.side .sh .st { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.chat { flex: 1 1 0; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; overflow: auto; min-height: 0; padding: 4px 2px; }
.chat .empty { margin: auto 0; color: var(--ink-3); font-size: 14px; text-align: center; padding: 0 20px; }
.chat .empty p { margin: 0 0 6px; }

.focus { display: none; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.focus.on { display: flex; animation: pop .25s ease-out; }
.focus .chip { display: inline-flex; align-items: center; gap: 8px; background: var(--yes-wash); color: var(--yes-deep); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 13px; font-weight: 600; max-width: 100%; }
.focus .chip .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.focus .chip button { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--yes-deep); }
.focus .chip button:hover { background: rgba(47,107,255,.15); }
.work .step.bg { color: var(--ink-3); font-size: 12.5px; }
.msg { max-width: 92%; display: flex; flex-direction: column; gap: 5px; animation: pop .35s ease-out; }
.msg .bub { padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.me .bub { background: var(--yes); color: var(--yes-ink); border-bottom-right-radius: 6px; }
.msg.ag { align-self: flex-start; }
.msg.ag .bub { background: var(--screen); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg .mark { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); padding: 0 4px; }
.msg .mark a { color: var(--yes-deep); text-decoration: none; font-weight: 600; cursor: pointer; }
.msg .bub .btns { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.msg .bub p { margin: 0; }
.msg .bub p + p { margin-top: 6px; }
/* The agent working, in view: each step appears, the found line lands green */
.work { align-self: flex-start; max-width: 92%; border: 1px solid var(--line); background: var(--soft); border-radius: 16px; border-bottom-left-radius: 6px; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); animation: pop .35s ease-out; }
.work .step { display: flex; align-items: center; gap: 8px; animation: pop .3s ease-out; }
.work .step.busy::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--line-2); border-top-color: var(--yes); border-radius: 50%; animation: spin .9s linear infinite; flex: none; }
.work .step.did::before { content: "✓"; color: var(--ok); font-weight: 700; width: 10px; flex: none; font-size: 12px; }
.work .found { display: flex; align-items: center; gap: 7px; background: var(--ok-wash); color: var(--ok); font-weight: 600; padding: 5px 9px; border-radius: 9px; animation: pop .3s ease-out; cursor: pointer; }
.work .found:hover { text-decoration: underline; }
.work .found .g { margin-left: auto; }
.g { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft-2); color: var(--ink-2); white-space: nowrap; }
.g.confirmed { background: var(--ok-wash); color: var(--ok); }
.g.said { background: var(--wait-wash); color: var(--wait); }
.g.source { background: var(--src-wash); color: var(--src); }
.g.hold { background: var(--hold-wash); color: var(--hold); }
.g i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.compose { border: 1px solid var(--line-2); background: var(--screen); border-radius: 14px; padding: 5px 5px 5px 13px; display: flex; align-items: flex-end; gap: 8px; transition: border-color .15s, box-shadow .15s; flex: none; }
.compose:focus-within { border-color: var(--yes); box-shadow: 0 0 0 3px var(--ring); }
.compose textarea { flex: 1; border: 0; outline: 0; resize: none; background: none; min-height: 22px; max-height: 120px; line-height: 1.45; font-size: 14.5px; padding: 6px 0; }
.compose textarea::placeholder { color: var(--ink-3); }
.compose .send { background: var(--yes); color: var(--yes-ink); border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex: none; transition: transform .1s, background .2s; }
.compose .send:hover { background: var(--yes-deep); }
.compose .send:active { transform: scale(.96); }
.compose .send:disabled { background: var(--soft-2); color: var(--ink-3); cursor: default; }
.empty .tries { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.tries button { border: 1px solid var(--line); background: var(--screen); border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--ink-2); max-width: 100%; text-align: left; }
.tries button:hover { border-color: var(--ink-3); color: var(--ink); }
/* A card in the walk: the count, the context, the one question, the choices, then the quiet ways out */
.bub.walk .pills.sm { margin-bottom: 8px; }
.bub.walk .ctx { color: var(--ink-2); }
.bub.walk .ask { font-weight: 700; margin-top: 8px !important; }
.walkctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.walkctl button { font-size: 12.5px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.walkctl button:hover { color: var(--ink); }
.at { color: var(--yes-deep); font-weight: 700; }
.msg.me .at { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); }

/* The library drawer: one line, with everything on it */
.drawer { position: fixed; top: 56px; right: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--screen); border-left: 1px solid var(--line); box-shadow: -20px 0 50px -30px var(--shade); transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); z-index: 40; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer .dh { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer .dh code { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.drawer .dh button { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: var(--ink-3); }
.drawer .dh button:hover { background: var(--soft); color: var(--ink); }
.drawer .db { padding: 18px; overflow: auto; }
.line { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--screen); }
.line .sent { font-family: var(--display); font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.line dl { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 7px 12px; font-size: 13.5px; }
.line dt { color: var(--ink-3); }
.line dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.line dd .av { width: 20px; height: 20px; font-size: 10px; }
.line dd code { font-family: var(--mono); font-size: 12px; background: var(--soft); padding: 1px 6px; border-radius: 5px; }
.line .hist { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.line .hist .lab { margin-bottom: 6px; }
.line .hist p { margin: 0 0 4px; }
.line .hist s { color: var(--ink-3); }
.evid { margin-top: 14px; }
.evid .lab { margin-bottom: 6px; }
.evid a { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink-2); margin-bottom: 6px; }
.evid a:hover { border-color: var(--ink-3); color: var(--ink); }
.scrim { position: fixed; inset: 56px 0 0; background: rgba(30,27,22,.12); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 35; }
.scrim.on { opacity: 1; pointer-events: auto; }

/* Keys: the cursor on the list, the keycaps on a cursored card's buttons, the sheet under "?" */
.card.cur, .row.cur, .lrow.cur, .held.cur { outline: 2px solid var(--ink); outline-offset: 2px; }
.keys .card.cur .btn[data-key]::after { content: attr(data-key); font-size: 10px; font-weight: 700; line-height: 1; padding: 2px 4px; border-radius: 4px; background: rgba(30,27,22,.12); color: inherit; margin-left: 2px; }
.keys .card.cur .btn.y[data-key]::after { background: rgba(255,255,255,.25); }
.help { position: fixed; inset: 0; background: rgba(30,27,22,.25); z-index: 80; display: none; place-items: center; }
.help.open { display: grid; }
.help .hb { background: var(--screen); border: 1px solid var(--line-2); border-radius: 18px; padding: 18px 22px 20px; width: 460px; max-width: calc(100% - 32px); box-shadow: 0 24px 60px -24px var(--shade); position: relative; animation: pop .2s ease-out; }
.help .hb .lab { margin-bottom: 12px; }
.help .hb #hclose { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: var(--ink-3); }
.help .hb #hclose:hover { background: var(--soft); color: var(--ink); }
.help dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; align-items: center; }
.help dt { white-space: nowrap; }
.help dd { margin: 0; color: var(--ink-2); }
kbd { font-family: var(--ui); font-size: 11.5px; font-weight: 700; padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--soft); color: var(--ink-2); }
a.pill { text-decoration: none; cursor: pointer; }
a.pill:hover { filter: brightness(.96); }

/* Toast, bell */
#toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; z-index: 70; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.bell { display: inline-flex; align-items: center; gap: 7px; color: var(--yes-deep); font-weight: 700; font-size: 13px; animation: pop .3s ease-out; }
.bell svg { animation: wiggle .7s ease-in-out 3; transform-origin: 50% 10%; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slideup { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ringbig { 0% { box-shadow: 0 0 0 0 var(--ring); } 100% { box-shadow: 0 0 0 22px transparent; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-22deg); } 75% { transform: rotate(22deg); } }

@media (max-width: 1200px) { .body { grid-template-columns: 200px minmax(0, 1fr) 380px; } }
@media (max-width: 760px) {
  .body { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto; }
  .nav { position: sticky; top: auto; bottom: 0; height: auto; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 6px 8px; order: 3; z-index: 30; }
  .nav a { flex: 1; justify-content: center; font-size: 12.5px; padding: 8px 4px; }
  .nav a.sub, .nav hr { display: none; }
  .side { order: 2; border-left: 0; border-top: 1px solid var(--line); padding: 10px 16px 12px; max-height: 50vh; }
  .top .proto { display: none; }
  .main { padding: 18px 16px 40px; }
  .top .co { display: none; }
  .msg, .work { max-width: 94%; }
}

/* ---------- MVP: the window after a tap, rooms, the import, settings (rules M23 to M27, M35, M36, M41) ---------- */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pill:empty { display: none; }
button.pill { cursor: pointer; border: 0; }
button.pill:hover { filter: brightness(.96); }
.pill.dlv { margin-top: 6px; }
.login .hint.err { color: var(--hold); }
.login .choose { display: flex; flex-direction: column; gap: 8px; }
/* The window: the choices of the one parameter that can still change, the default highlighted, a bar and its words, Undo. No pulsing. */
.held.win { align-items: flex-start; flex-wrap: wrap; position: relative; }
.win .wtop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.win .wchoices { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.win .btn.wc { gap: 8px; }
.win .btn.wc.sel { box-shadow: 0 0 0 2px var(--yes-wash); }
.win .dg { font-size: 10.5px; font-weight: 700; line-height: 1; padding: 2px 5px; border-radius: 4px; background: rgba(30,27,22,.12); color: inherit; }
.win .btn.y .dg { background: rgba(255,255,255,.25); }
.win .wrow { display: flex; align-items: center; gap: 10px; margin-top: 4px; min-height: 18px; }
.win .wbar { flex: 0 1 180px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.win .wbar i { display: block; height: 100%; width: 100%; background: var(--ok); border-radius: 999px; }
.win .wtime { color: var(--ink-2); font-size: 12.5px; margin: 0; }
.win .wact { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.win.held-mode, .win.held { }
.win.held .wbar i { background: var(--wait); }
.win .wother { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.win .wother input { border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px; background: var(--screen); }
.keys .win .dg { display: inline-block; }
/* A room */
.posts { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.post { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; background: var(--screen); }
.post.none { border-style: dashed; color: var(--ink-3); }
.post .ptext { margin: 2px 0 0; white-space: pre-wrap; }
.room-compose { margin-top: 6px; }
.room-compose textarea { flex: 1; border: 0; outline: 0; resize: none; background: none; min-height: 22px; max-height: 120px; line-height: 1.45; font-size: 14.5px; padding: 6px 0; }
.room-compose[hidden] { display: none; }
.room-line .sent { font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.room-line { padding: 12px 14px; }
.namerow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--yes); }
.fl.pick { height: 34px; }
.pill.pp.wait { background: var(--wait-wash); color: var(--wait); }
a.row { text-decoration: none; color: inherit; cursor: pointer; }
.room-row small { display: block; margin-top: 4px; }
/* The import */
.imp { max-width: 760px; }
.drop { border: 2px dashed var(--line-2); border-radius: 16px; padding: 28px 18px; text-align: center; color: var(--ink-2); background: var(--screen); cursor: pointer; margin-bottom: 12px; }
.drop:hover, .drop.over { border-color: var(--yes); color: var(--ink); }
.files { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.frow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.frow code, .pill code { font-family: var(--mono); font-size: 11.5px; }
.modes { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.modes legend { float: left; margin-right: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.msgline { color: var(--ink-2); font-size: 13.5px; margin: 6px 0; min-height: 1em; }
.claims { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.claim { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; background: var(--screen); }
.claim .chk { align-items: flex-start; }
.claim .pills.sm { margin: 0 0 4px; }
.quote { margin: 4px 0 4px 2px; padding: 2px 0 2px 10px; border-left: 3px solid var(--line-2); color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.rl .lab em { font-style: normal; background: var(--soft-2); color: var(--ink-2); border-radius: 999px; padding: 0 7px; font-size: 11px; }
#imp-top { margin: 0 0 16px; }
/* Settings */
.set-time { margin-left: 0; }
.main h2.lab { margin: 0 0 10px; }
.news { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--screen); margin-bottom: 8px; }
.news h3 { margin: 0 0 4px; font-family: var(--display); font-size: 16px; }
.news ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .win .wbar i { transition: none !important; } }
