/* Hallmark · macrostructure: Utility app · tone: plain, calm · anchor hue: 165 · hero: none (signed-in tool) */
/* Critique: dense tool screens, one accent, system type; no marketing chrome. */
:root {
  --bg: #fbfbfa; --card: #ffffff; --ink: #1d1d1b; --muted: #6b6a66; --line: #dcdad5; --soft: #f1f0ec;
  --accent: #2f5d50; --accent-ink: #ffffff; --warn: #9a3b23; --ok: #2f6b3a;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --r: 4px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141413; --card: #1c1c1a; --ink: #ecebe7; --muted: #9c9a94; --line: #34332f; --soft: #23231f;
    --accent: #7fb8a4; --accent-ink: #10201b; --warn: #e08c72; --ok: #8bc796; }
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--accent); }
.top { display: flex; align-items: center; gap: 24px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.brand { font-weight: 650; color: var(--ink); text-decoration: none; font-size: 17px; }
nav { display: flex; gap: 16px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; }
nav a.on { color: var(--ink); }
main { max-width: 880px; margin: 0 auto; padding: 24px 20px 80px; }
h1, h2 { text-wrap: balance; }
h1 { font-size: 24px; font-weight: 650; margin: 0 0 16px; overflow-wrap: break-word; min-width: 0; }
h2 { font-size: 17px; font-weight: 650; margin: 28px 0 10px; }
p.lead { color: var(--muted); margin-top: -8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.list { display: grid; gap: 8px; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.skill .name { font-weight: 600; color: var(--ink); text-decoration: none; }
.skill .desc { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.tag { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r); padding: 1px 6px; white-space: nowrap; }
.tag.req { color: var(--accent); border-color: var(--accent); }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
textarea { resize: none; display: block; field-sizing: content; min-height: 1.5em; border: 0; padding: 0; background: transparent; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--r); padding: 6px 12px; cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--warn); }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button:disabled { background: var(--soft); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
:is(a, button, input, select, textarea, .btn):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; transition: none; }
form.stack { display: grid; gap: 4px; max-width: 380px; }
form.stack button { margin-top: 12px; justify-self: start; }
form.inline { display: flex; gap: 8px; }
form.inline input { flex: 1; }
.ask { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 10px 12px 6px; margin-bottom: 16px; }
.ask .tools { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ask .tools button { padding: 2px 8px; border-color: transparent; color: var(--muted); }
.ask .tools button.send { color: var(--accent); }
.ask .tools button.live { color: var(--warn); }
pre { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; overflow-x: auto; font: 13px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-family: var(--mono); font-size: 13px; background: var(--soft); padding: 1px 4px; border-radius: 3px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); font-weight: normal; }
th { color: var(--muted); }
.muted { color: var(--muted); }
.err { color: var(--warn); min-height: 1.5em; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; border-radius: 0; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#main { transition: opacity .12s; }
#main.loading { opacity: .6; }
@media (prefers-reduced-motion: reduce) { #toast, #main { transition: none; } }
code.grow { overflow-wrap: anywhere; }
@media (max-width: 560px) { .row > .grow { flex-basis: 100%; } }
a.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
textarea.code { border: 1px solid var(--line); background: var(--card); padding: 10px; font: 13px/1.5 var(--mono); min-height: 240px; field-sizing: content; max-height: 70vh; }
.stack-gap { display: grid; gap: 8px; }
form.stack.wide { max-width: none; }
.notice { border-color: var(--accent); margin: 12px 0; }
.snippet { position: relative; }
.snippet button { position: absolute; top: 6px; right: 6px; padding: 2px 8px; font-size: 13px; }
.snippet pre { padding-right: 64px; margin: 8px 0; }
.seg.wrap { flex-wrap: wrap; display: flex; gap: 6px; border: 0; overflow: visible; margin-bottom: 16px; }
.seg.wrap button, .seg.wrap button:last-child { border: 1px solid var(--line); border-radius: var(--r); }
.seg.wrap button.on { border-color: var(--accent); }
.stack-gap > *, main > * { min-width: 0; }
.snippet pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice code { overflow-wrap: anywhere; }
form.inline.wrap { flex-wrap: wrap; align-items: center; }
label.check { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--ink); white-space: nowrap; }
label.check input { width: auto; }
details summary { cursor: pointer; color: var(--muted); margin-top: 8px; }
[hidden] { display: none !important; }
.steps { padding-left: 1.3em; }
.steps li { margin: 8px 0; }
.steps .snippet { margin-top: 6px; }
.inline.wrap + .list { margin-top: 12px; }

/* Chat: a workspace layout (dark sidebar, flat message rows, square avatars), in Rucksack's green rather than another app's purple.
   Agents get the same avatar color as their person, outlined instead of filled, and an Agent tag. */
:root {
  --side: #1e3a32; --side-ink: #e6eee9; --side-muted: #a9bcb3; --side-hover: #2a4a40; --side-on: #4f8f7b; --side-line: #2f5046;
  --hover: #f5f5f2; --held: #f1f6f3; --on-dark: #f7faf8; --badge: #a8391f;
  --av0: #2f5d50; --av1: #8a4b2a; --av2: #3d5a8a; --av3: #7a3f6e; --av4: #5f6b2a; --av5: #2f6f7a;
}
@media (prefers-color-scheme: dark) {
  :root { --side: #0f1c18; --side-hover: #1a2c26; --side-on: #2f6b5a; --side-line: #22352f; --hover: #20201d; --held: #18241f; }
}
main.wide { max-width: none; padding: 0; }
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: calc(100dvh - var(--toph, 57px)); min-height: 420px; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; min-height: 0; }
.sidehead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--side-line); }
.sidehead h1 { margin: 0; font-size: 18px; }
.compose { color: var(--side-ink); text-decoration: none; border: 1px solid var(--side-line); border-radius: var(--r); padding: 4px 10px; font-size: 14px; }
.compose:hover { background: var(--side-hover); }
.convos { flex: 1; overflow-y: auto; min-height: 0; padding: 8px 8px 16px; display: flex; flex-direction: column; gap: 2px; }
.sect { color: var(--side-muted); font-size: 14px; padding: 12px 8px 4px; }
.convo { display: flex; align-items: center; gap: 8px; padding: 4px 8px; min-height: 32px; border-radius: var(--r); color: var(--side-muted); text-decoration: none; }
.convo .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo:hover { background: var(--side-hover); }
.convo.unread { color: var(--side-ink); font-weight: 650; }
.convo.on { background: var(--side-on); color: var(--on-dark); }
.hash { width: 20px; text-align: center; opacity: .8; flex: none; }
.count { background: var(--badge); color: var(--on-dark); border-radius: var(--r); font-size: 12px; font-weight: 650; padding: 0 6px; font-variant-numeric: tabular-nums; }
.count.wait { background: transparent; color: inherit; border: 1px solid currentColor; font-weight: 400; }
.convos .empty { color: var(--side-muted); padding: 8px; }
.sidefoot { color: var(--side-muted); font-size: 14px; padding: 12px 16px; border-top: 1px solid var(--side-line); text-decoration: none; }
.sidefoot:hover { color: var(--side-ink); }
.side :focus-visible { outline: 2px solid var(--side-ink); outline-offset: 1px; }

.av { --c: var(--av0); width: 36px; height: 36px; flex: none; border-radius: 6px; display: inline-grid; place-items: center; background: var(--c); color: var(--on-dark); font-size: 14px; font-weight: 650; }
.av1 { --c: var(--av1); } .av2 { --c: var(--av2); } .av3 { --c: var(--av3); } .av4 { --c: var(--av4); } .av5 { --c: var(--av5); }
.av.bot { background: var(--card); color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
.av.sm { width: 20px; height: 20px; font-size: 10px; border-radius: 4px; }
.av.xs { width: 22px; height: 22px; font-size: 10px; border-radius: 4px; box-shadow: 0 0 0 2px var(--card); }
.av.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 8px; }

.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--card); }
.thead { border-bottom: 1px solid var(--line); padding: 8px 20px; }
.thead .bar { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.thead .bar.sub { min-height: 0; gap: 8px; padding-bottom: 4px; }
.thead h2 { margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.thead .grow { flex: 1; }
.thead .back { display: none; font-size: 24px; line-height: 1; text-decoration: none; color: var(--ink); padding: 0 4px; }
.faces { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 2px 8px 2px 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.faces .av + .av { margin-left: -4px; }
.faces > span:last-child { margin-left: 6px; }
button.ghost { border-color: transparent; color: var(--muted); }
button.ghost:hover, button.ghost[aria-expanded="true"] { background: var(--soft); color: var(--ink); }
.seg button { padding: 2px 10px; font-size: 14px; }
.thead .bar.sub > button { margin-left: auto; padding: 2px 10px; font-size: 14px; }
.permpanel { margin: 8px 0 4px; padding: 12px; background: var(--soft); border-radius: var(--r); overflow-x: auto; }
.permpanel > p:first-child { margin-top: 0; }
.permpanel > button.danger { margin-top: 4px; }
.perms td { vertical-align: middle; }

.log { flex: 1; overflow-y: auto; padding: 8px 0 12px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.log > :first-child { margin-top: auto; }
.intro { padding: 24px 20px 16px; }
.intro h3 { font-size: 20px; margin: 12px 0 4px; }
.intro p { margin: 0 0 12px; }
.hash.big { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 8px; background: var(--soft); font-size: 28px; opacity: 1; color: var(--muted); }
.day { display: flex; align-items: center; margin: 12px 0 4px; }
.day::before, .day::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.day span { border: 1px solid var(--line); border-radius: 12px; padding: 2px 12px; font-size: 13px; font-weight: 600; background: var(--card); }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 8px; padding: 2px 20px; }
.msg.head { padding-top: 8px; }
.msg:hover { background: var(--hover); }
.msg .gut { font-size: 11px; color: var(--muted); text-align: right; padding-top: 3px; visibility: hidden; font-variant-numeric: tabular-nums; }
.msg:hover .gut { visibility: visible; }
.msg .who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; line-height: 1.3; }
.msg .who time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.msg .tag { font-size: 11px; padding: 0 4px; }
.tag.bot { color: var(--accent); border-color: var(--accent); }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.off .text { color: var(--muted); }
.msg .only { font-size: 12px; color: var(--muted); }
.msg.note { color: var(--muted); font-size: 14px; }
.msg.arrive { animation: arrive .22s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
.attach { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; max-width: 520px; background: var(--card); }
.attach .name { font-weight: 650; color: var(--ink); text-decoration: none; }
.attach .desc { color: var(--muted); font-size: 14px; }
.held { margin: 4px 0; padding: 12px; border-radius: 8px; background: var(--held); border: 1px solid var(--line); max-width: 640px; }
.held p { margin: 0 0 8px; font-size: 14px; }
.held textarea { border: 1px solid var(--line); background: var(--card); padding: 8px 10px; border-radius: var(--r); margin-bottom: 8px; }
.held .acts, .newconvo .acts { display: flex; gap: 8px; flex-wrap: wrap; }

.composer { padding: 0 20px 16px; }
.composer .ask { margin: 0; border-radius: 8px; border-color: var(--muted); }
.composer .ask:focus-within { border-color: var(--ink); }
.composer .ask select { margin-top: 8px; }
.composer .ask .tools { justify-content: flex-start; border-top: 1px solid var(--line); margin: 8px -12px 0; padding: 4px 8px 0; }
.composer .ask .tools .send { margin-left: auto; }
.pane { flex: 1; overflow-y: auto; padding: 20px; }
.pane.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.newconvo { max-width: 520px; }
.newconvo h2:first-child { margin-top: 0; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 8px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 0; }
.small { font-size: 13px; }
.row.start { justify-content: flex-start; gap: 8px; }
.invite { max-width: 520px; margin: 40px auto; }
@media (max-width: 720px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat.open .side { display: none; }
  .chat:not(.open) .thread { display: none; }
  body:has(.chat.open) .top { display: none; }
  .chat.open { height: 100dvh; }
  .thead { padding: 4px 12px; }
  .thead .back { display: inline-block; }
  .faces > span:last-child { display: none; }
  .msg { padding-left: 12px; padding-right: 12px; }
  .msg .gut { display: none; }
  .msg:not(.head) { padding-left: 56px; grid-template-columns: minmax(0, 1fr); }
  .msg:hover { background: none; }
  .intro { padding: 16px 12px; }
  .composer { padding: 0 8px 8px; }
  .pane { padding: 16px 12px; }
}
@media (prefers-reduced-motion: reduce) { .msg.arrive { animation: none; } }
/* Signed-out pages: landing and pricing. Same utility look, a little more air. */
.hero { padding: 32px 0 8px; }
.hero h1 { font-size: 32px; line-height: 1.2; max-width: 22ch; }
.hero .lead { font-size: 17px; max-width: 60ch; margin: 0 0 20px; }
.hero .inline { flex-wrap: wrap; }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin-top: 32px; }
.feat h3, .plan h3 { font-size: 15px; font-weight: 650; margin: 0 0 4px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 20px; font-weight: 650; margin: 0 0 8px; }
.plan ul { padding-left: 20px; margin: 0 0 16px; flex: 1; font-size: 14px; }
.plan .btn { align-self: start; }
.inline { display: flex; gap: 8px; align-items: center; }
.plan-bar { margin-top: 12px; }
