/* Seam — tokens from relist_co_/DESIGN.md */
:root {
  --canvas: #fff9ef;
  --paper: #fdfbf7;
  --white: #ffffff;
  --shade: #f3ede4;
  --shade-2: #ede6da;
  --hover: #f5efe4;
  --line: #e1dcd3;
  --ink: #1d1b16;
  --stone: #4a4741;
  --ash: #69655c;
  --mute: #a8a5a0;
  --blue: #2a72de;
  --forest: #224228;
  --forest-bg: #eaf1eb;
  --olive: #5c6f5d;
  --ochre: #bc924c;
  --ochre-ink: #85642a;
  --ochre-bg: #f7f2e8;
  --clay: #6b443d;
  --clay-bg: #f4ebea;
  --band: #19191c;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --shadow: 0 4px 16px -2px rgba(74, 71, 65, .08), 0 1px 3px 0 rgba(74, 71, 65, .04);
  --r-tag: 4px;   /* status labels, thumbnails */
  --r-ctl: 6px;   /* buttons, inputs, chips, tabs */
  --r-surf: 10px; /* cards, sheets, dialogs, banners */
  --r-sm: var(--r-ctl);
  --r: var(--r-surf);
  --r-lg: var(--r-surf);
  /* the stitch: a dashed thread line, used for the wordmark, the active tab and section breaks */
  --stitch: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 10px);
  /* motion: quick and quiet. feedback is fast, things that move take a little longer */
  --dur-press: 90ms; --dur-hover: 140ms; --dur-move: 220ms; --dur-sheet: 280ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-in: cubic-bezier(.4, 0, 1, 1);
  --margin: 2.5rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/20px var(--sans);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--blue);
}
/* Tabular figures only where numbers stack or line up: Inter's tabular set also widens hyphens and colons,
   so turning it on for the whole page put gaps into words like "logged-in". */
.stat-value, .metric, .kv > span:last-child, .price, .hbar > :last-child, .bars .lbl, .chip .n, .num, input[type=number], .tnum,
.table td[data-l="Listed"], .table td[data-l="Engagement"], .table td[data-l="Price"], .table td[data-l="Date"], .table td[data-l="Total"] { font-variant-numeric: tabular-nums; }
::selection { background: var(--shade-2); color: var(--ink); }
html { scrollbar-color: var(--mute) var(--canvas); }
.threads, .messages, .relist-list, dialog.sheet { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
.icon { font-family: 'Material Symbols Outlined'; font-size: 18px; line-height: 1; font-weight: 300; vertical-align: middle; }

/* ---------- type ---------- */
.display { font: 400 48px/56px var(--serif); letter-spacing: -.02em; }
.display em, .h1 em { font-style: italic; }
.h1 { font: 400 32px/40px var(--serif); letter-spacing: -.015em; }
.h2 { font: 400 24px/32px var(--serif); letter-spacing: -.01em; }
.h3 { font: 500 20px/28px var(--serif); }
.serif { font-family: var(--serif); }
.lead { font-size: 16px; line-height: 24px; color: var(--stone); max-width: 62ch; }
.eyebrow { font: 500 12px/16px var(--sans); color: var(--ash); }
.micro { font: 500 11px/14px var(--sans); color: var(--ash); }
.metric { font: 500 28px/32px var(--sans); letter-spacing: -.02em; }
.metric small { font-size: 16px; color: var(--ash); font-weight: 400; }
.display, .h1, .h2, .h3 { text-wrap: balance; }
.lead, .sub { text-wrap: pretty; }
.sub { font-size: 12px; line-height: 18px; color: var(--ash); }
.muted { color: var(--ash); }
.strong { font-weight: 500; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 12px; }
.strike { text-decoration: line-through; color: var(--mute); }
.ok-text { color: var(--forest); }
.bad-text { color: var(--clay); }

/* ---------- layout ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--margin); }
main.wrap { padding-top: 2rem; padding-bottom: 4rem; min-height: calc(100vh - 160px); }
.row { display: flex; align-items: center; gap: .5rem; }
.row.wrap-ok { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.grid { display: grid; gap: 1.5rem; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.grow { flex: 1; min-width: 0; }
.section { margin-top: 2.5rem; }
.page-head { display: flex; gap: 1.5rem; align-items: flex-end; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; }
.page-head .h1 { margin-top: .25rem; }
.page-head .lead { margin-top: .5rem; font-size: 14px; line-height: 20px; color: var(--ash); max-width: 58ch; }
.page-meta { font: 500 13px/18px var(--sans); color: var(--ash); margin-top: .375rem; }
.display .dim { color: var(--mute); font-style: normal; padding: 0 .15em; }
.seam-top { position: relative; padding-top: 2.25rem; }
.seam-top::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1.5px; color: var(--mute); background: var(--stitch); }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--canvas); border-bottom: 1px solid var(--line); }
.topbar .wrap { height: 64px; display: flex; align-items: stretch; gap: 2rem; position: relative; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-name { position: relative; font: 500 27px/1 var(--serif); letter-spacing: -.025em; padding-bottom: 7px; color: var(--ink); }
.brand-name::after { content: ''; position: absolute; left: 1px; right: 2px; bottom: 0; height: 1.5px; color: var(--stone); background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); }
.nav { display: flex; gap: 1.5rem; margin-right: auto; }
@media (max-width: 900px) { .nav { overflow-x: auto; scrollbar-width: none; } }
.nav a { position: relative; display: flex; align-items: center; color: var(--ash); white-space: nowrap; font-weight: 500; transition: color var(--dur-hover) var(--ease-out); }
.nav a[aria-current] { color: var(--ink); }
.nav a::before { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; color: var(--mute); background: var(--stitch); transition: width var(--dur-move) var(--ease-out); }
/* hover styles only where a pointer can hover: on touch a tap would leave them stuck on */
@media (hover: hover) {
  .nav a:hover { color: var(--ink); }
  .nav a:hover::before { width: 100%; }
}
.nav a[aria-current]::before { display: none; }
.nav-line { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; color: var(--ink); background: var(--stitch); pointer-events: none; transition: transform var(--dur-move) var(--ease-out), width var(--dur-move) var(--ease-out), opacity var(--dur-hover); }
.signed-out .nav-line { display: none; }
.topbar .pill, .topbar .acct { align-self: center; }
.nav .count { margin-left: .25rem; }

/* ---------- surfaces ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.well { background: var(--shade); border-radius: var(--r-sm); padding: 1rem; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }


/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; padding: .5625rem 1rem; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 500 13px/18px var(--sans); white-space: nowrap; transition: background var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out), color var(--dur-hover), transform var(--dur-press) var(--ease-out); }
.btn:active:not([disabled]), .icon-btn:active, .chip:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.dark { background: var(--stone); border-color: var(--stone); color: #fff; }
.btn.danger { color: var(--clay); border-color: #e6d3cf; }
.btn.quiet { border-color: var(--line); background: transparent; }
.btn.sm { padding: .3125rem .75rem; font-size: 12px; }
.btn.link { border: 0; padding: 0; background: none; color: var(--stone); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .6; cursor: progress; }

/* sign-in and sign-up */
.auth { max-width: 440px; margin: 3rem auto 0; }
.auth-title { font-size: 40px; line-height: 46px; }
.auth-note { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: var(--r-ctl); background: var(--clay-bg); color: var(--clay); font-size: 14px; line-height: 20px; }
.invite-input { letter-spacing: .03em; }
/* a disabled main action reads as unavailable, not as a faded blue */
.btn.primary[disabled], .btn.dark[disabled] { opacity: 1; background: var(--shade); border-color: var(--line); color: var(--mute); }
.btn .icon { font-size: 17px; }
.icon-btn { width: 34px; height: 34px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--stone); transition: background var(--dur-hover) var(--ease-out), transform var(--dur-press) var(--ease-out); }
/* these draw their own hover and press states, so the browser's grey tap flash would double them */
.btn, .icon-btn, .chip, .pill, .thread { -webkit-tap-highlight-color: transparent; }
/* 34px looks right next to the inputs; the tap target is 40px */
.icon-btn { position: relative; }
.icon-btn::after { content: ''; position: absolute; inset: -4px; }
@media (hover: hover) {
  .btn:hover { background: var(--shade-2); }
  .btn.primary:hover { background: #2266cb; }
  .btn.dark:hover { background: var(--ink); }
  .btn.danger:hover { background: var(--clay-bg); }
  .btn.quiet:hover { background: var(--shade-2); }
  .btn.link:hover { background: none; color: var(--ink); text-decoration-color: currentColor; }
  .icon-btn:hover { background: var(--shade-2); }
}

/* ---------- chips, badges, pills ---------- */
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: .375rem; padding: .3125rem .75rem; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--canvas); color: var(--stone); font-weight: 500; white-space: nowrap; transition: background var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out), color var(--dur-hover), transform var(--dur-press) var(--ease-out); }
@media (hover: hover) { .chip:hover { border-color: rgba(74, 71, 65, .3); } }
.chip.on { background: var(--stone); border-color: var(--stone); color: var(--canvas); }
.chip .n { font: 500 11px/14px var(--sans); padding: 1px 5px; border-radius: var(--r-tag); background: var(--shade-2); color: var(--stone); }
.chip.on .n { background: rgba(255, 255, 255, .18); color: var(--canvas); }
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .4375rem; border-radius: var(--r-tag); font: 500 11px/18px var(--sans); white-space: nowrap; background: var(--shade-2); color: var(--stone); }
.badge.ok { background: var(--forest-bg); color: var(--forest); }
.badge.warn { background: var(--ochre-bg); color: var(--ochre-ink); }
.badge.bad { background: var(--clay-bg); color: var(--clay); }
.badge.blue { background: #e4edfb; color: #1c58b3; }
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .4375rem .75rem; border-radius: var(--r-ctl); background: transparent; box-shadow: inset 0 0 0 1px var(--line); font: 600 12px/16px var(--sans); color: var(--stone); white-space: nowrap; border: 0; transition: background var(--dur-hover) var(--ease-out); }
@media (hover: hover) { .pill:hover { background: var(--shade); } }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); flex-shrink: 0; display: inline-block; }
.dot.warn { background: var(--ochre); }
.dot.bad { background: var(--clay); }
.dot.off { background: var(--mute); }
.status-line { display: inline-flex; align-items: center; gap: .5rem; }

.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--ash); }

/* ---------- figures ---------- */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 1.25rem 1.5rem 1.375rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { font: 500 12px/16px var(--sans); color: var(--ash); display: flex; justify-content: space-between; gap: .5rem; }
.stat-value { font: 400 36px/42px var(--serif); letter-spacing: -.02em; color: var(--ink); margin-top: .25rem; }
.stat .foot { margin-top: .625rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.note { display: flex; flex-direction: column; gap: .625rem; padding: 0 1.75rem; min-width: 0; }
.note:first-child { padding-left: 0; }
.note + .note { border-left: 1px solid var(--line); }
.note-foot { margin-top: auto; padding-top: .5rem; }
.note .h3 + .sub { margin-top: -.375rem; }
/* two rows of figures in one strip: each row starts flush left, the second is ruled off from the first */
.strip.rows .stat:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
.strip.rows .stat:nth-child(n + 5) { border-top: 1px solid var(--line); }
@media (max-width: 960px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .strip.rows .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .strip.rows .stat:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
  .notes { grid-template-columns: 1fr; gap: 1.5rem; }
  .note, .note + .note { padding: 0; border-left: 0; }
}
.bar { height: 6px; border-radius: 999px; background: var(--shade-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--stone); border-radius: 999px; transition: width var(--dur-sheet) var(--ease-out); }
.bar.blue > i { background: var(--blue); }
.bar.ok > i { background: var(--forest); }
.bar.warn > i { background: var(--ochre); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 500 12px/16px var(--sans); color: var(--ash); padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper); }
.table td { padding: .875rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-hover); }
@media (hover: hover) { .table tbody tr:hover { background: var(--hover); } }
.table tbody tr.sel { background: #f8f1e5; }
.table .check { width: 44px; padding-right: 0; }
.table .num { text-align: right; }
.table td[data-l="Listed"], .table td[data-l="Date"], .table td[data-l="Total"], .table td[data-l="Price"] { white-space: nowrap; }
.table .mono, .table .sub.mono { font-variant-numeric: tabular-nums; }
.table-bar { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; background: var(--shade); flex-wrap: wrap; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; background: var(--shade); font-size: 12px; color: var(--stone); flex-wrap: wrap; }
.item { display: flex; align-items: center; gap: .875rem; min-width: 0; }
.item-title { font: 400 17px/22px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb { width: 56px; height: 64px; border-radius: var(--r-tag); border: 1px solid var(--line); background: var(--shade-2); flex-shrink: 0; position: relative; overflow: hidden; display: grid; place-items: center; font: italic 400 16px/1 var(--serif); color: var(--ash); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.sm { width: 40px; height: 44px; font-size: 13px; }
.thumb.lg { width: 72px; height: 88px; }
.thumb .count { position: absolute; right: 3px; bottom: 3px; background: rgba(29, 27, 22, .7); color: #fff; font: 600 9px/12px var(--sans); padding: 1px 4px; border-radius: 4px; }

/* ---------- forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; padding: .5625rem .75rem; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 400 14px/20px var(--sans); outline: none;
}
input, select, textarea { transition: border-color var(--dur-hover), box-shadow var(--dur-hover); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(42, 114, 222, .12); }
textarea { resize: vertical; min-height: 92px; line-height: 22px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%), linear-gradient(135deg, var(--stone) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
input[type=search] { border-radius: var(--r-ctl); padding-left: 2.25rem; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a766e' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px 50%; }
input[type=checkbox]:not(.switch), input[type=radio] { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--blue); }
label.field { display: block; }
label.field > span:first-child, .field-label { display: block; font: 500 13px/18px var(--sans); color: var(--stone); margin-bottom: .375rem; }
.hint { font-size: 12px; line-height: 18px; color: var(--ash); margin-top: .375rem; }
.input-unit { position: relative; }
.input-unit input { padding-right: 2.5rem; }
.input-unit em { position: absolute; right: .875rem; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ash); }
.switch { appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--shade-2); position: relative; cursor: pointer; flex-shrink: 0; transition: background var(--dur-hover), border-color var(--dur-hover); margin: 0; border: 1px solid var(--line); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); transition: transform var(--dur-hover) var(--ease-out); }
.switch:checked { background: var(--blue); border-color: var(--blue); }
.switch:checked::after { transform: translateX(16px); }
.switch:disabled { opacity: .6; cursor: not-allowed; }
.switch:focus-visible, .btn:focus-visible, .chip:focus-visible, .nav a:focus-visible, a:focus-visible, .icon-btn:focus-visible, .pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: var(--r-tag); }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible, .pill:focus-visible { border-radius: var(--r-ctl); }
.thread:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--shade); border-radius: var(--r-ctl); flex-wrap: wrap; position: relative; }
.seg-thumb { position: absolute; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow); pointer-events: none; }
.seg.thumbed input:checked + span { background: transparent; box-shadow: none; }
.seg span { position: relative; z-index: 1; transition: color var(--dur-hover); }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .3125rem .75rem; border-radius: 3px; font-weight: 500; color: var(--stone); white-space: nowrap; }
.seg input:checked + span { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }
.toggle-row { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: .875rem 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-of-type { border-bottom: 0; }
.toggle-row .t { font-weight: 500; }
.photos { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: .375rem; border: 1px solid var(--line); }

/* ---------- automations ---------- */
.auto-card .title-row { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.auto-card .title-row .h3 { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }
.tile { padding: 0; }
.tile .val { font: 400 22px/28px var(--sans); margin-top: .25rem; letter-spacing: -.01em; }
.rule-note { font-size: 12px; line-height: 18px; color: var(--olive); }
.qa { display: flex; gap: .875rem; align-items: flex-start; padding: .875rem 1rem; background: var(--shade); border-radius: var(--r-sm); }
.qa + .qa { margin-top: .5rem; }
.tag-input { display: flex; flex-wrap: wrap; gap: .375rem; padding: .5rem; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--paper); }
.tag-input input { border: 0; padding: .25rem; flex: 1; min-width: 120px; background: none; }
.tag { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .25rem .125rem .5rem; background: var(--shade-2); border-radius: var(--r-tag); font-size: 12px; }
.tag button { border: 0; background: none; padding: 0 .25rem; color: var(--ash); position: relative; }
.tag button::after { content: ''; position: absolute; inset: -6px -4px; }

/* ---------- feed ---------- */
.feed-item { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
@media (hover: hover) { a.feed-item:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; } }
.feed-item.escalate { color: var(--clay); }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; height: calc(100vh - 330px); min-height: 520px; }
.inbox > * { min-height: 0; }
.inbox.two { grid-template-columns: 320px minmax(0, 1fr); }
.threads { border-right: 1px solid var(--line); overflow-y: auto; }
.thread { display: flex; gap: .75rem; padding: .875rem 1rem; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; background: none; }
.thread { transition: background var(--dur-hover); }
@media (hover: hover) { .thread:hover { background: var(--hover); } }
.thread[aria-current] { background: var(--shade); }
.thread .preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ash); font-size: 12px; }
.convo { display: flex; flex-direction: column; min-width: 0; }
.convo-head { padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.msg { max-width: 72%; padding: .625rem .875rem; border-radius: var(--r-surf); background: var(--shade); line-height: 20px; align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--stone); color: #fff; }
.msg.agent { align-self: flex-end; background: var(--forest-bg); color: var(--ink); }
.msg .meta { font-size: 11px; margin-top: .25rem; opacity: .7; }
.msg.system { align-self: center; background: none; color: var(--ash); font-size: 12px; text-align: center; max-width: 90%; }

/* ---------- charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 200px; padding-top: 1.5rem; }
.bars .col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .5rem; height: 100%; justify-content: flex-end; }
.bars .track { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .25rem; }
.bars .b { width: 100%; max-width: 44px; background: var(--olive); border-radius: 4px 4px 0 0; }
.bars .col.now .b { background: var(--forest); }
.bars .lbl { font-size: 11px; color: var(--ash); white-space: nowrap; }
@media (hover: hover) {
  .bars .col:hover .b { background: var(--stone); }
  [data-tip]:hover { position: relative; }
  [data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font: 500 11px/16px var(--sans); padding: .25rem .5rem; border-radius: 6px; white-space: nowrap; z-index: 5; pointer-events: none; }
}
.heat { display: grid; grid-template-columns: 32px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10px; color: var(--ash); }
.heat i { aspect-ratio: 1; border-radius: 3px; display: block; }
.heat .hl { line-height: 14px; align-self: center; }
.hbar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(64px, 1fr) 64px; gap: .75rem; align-items: center; padding: .375rem 0; font-size: 13px; }
.hbar .bar { height: 8px; }
.hbar .bar > i { background: var(--olive); }

/* ---------- label preview ---------- */

/* ---------- plans ---------- */
.plan { display: flex; flex-direction: column; gap: 1rem; }
.plan.featured { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan.featured .muted, .plan.featured .eyebrow, .plan.featured li::before { color: var(--mute); }
.plan.featured .btn:not(.primary) { color: #fff; border-color: rgba(255, 255, 255, .3); }
@media (hover: hover) { .plan.featured .btn:not(.primary):hover { background: rgba(255, 255, 255, .08); } }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: 13px; }
.plan li::before { content: '—'; margin-right: .5rem; color: var(--ash); }
.plan .btn { margin-top: auto; }
.price { font: 400 40px/44px var(--serif); }

/* ---------- onboarding ---------- */
.steps { display: grid; gap: 1rem; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: start; }
.step .num { width: 36px; height: 36px; border-radius: var(--r-ctl); border: 1px solid var(--line); display: grid; place-items: center; font: 400 18px/1 var(--serif); background: var(--paper); }
.step.done .num { background: var(--forest); color: #fff; border-color: var(--forest); }
.step.current .num { border-color: var(--stone); }

/* ---------- overlays ---------- */
dialog { border: 0; padding: 0; background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(29, 27, 22, .28); }
dialog.sheet { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(520px, 100vw); border-radius: var(--r-lg) 0 0 var(--r-lg); }
dialog.sheet .sheet-body { padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem; min-height: 100%; }
dialog.sheet .sheet-foot { margin-top: auto; display: flex; gap: .5rem; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid var(--line); }
dialog.confirm { border-radius: var(--r-lg); width: min(420px, calc(100vw - 2rem)); }
dialog.confirm form { padding: 1.75rem; display: grid; gap: 1rem; }
.toasts { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 50; justify-items: center; }
.toast { background: var(--ink); color: #fff; padding: .6875rem 1rem; border-radius: var(--r-ctl); box-shadow: var(--shadow); font-weight: 500; animation: rise var(--dur-move) var(--ease-out); transition: opacity var(--dur-hover) var(--ease-in), transform var(--dur-hover) var(--ease-in); }
.toast.bad { background: var(--clay); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.jobbar { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 40; width: 320px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem 1.25rem; }
.banner { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-radius: var(--r); background: var(--clay-bg); color: var(--clay); margin-bottom: 1.5rem; flex-wrap: wrap; }
.banner.info { background: var(--shade); color: var(--stone); }
.banner .grow { color: var(--ink); }

.signed-out .nav, .signed-out #bridge-pill, .signed-out .acct, .signed-out .footer nav:not(.legal) { display: none; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--canvas); }
.footer .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; font: 500 12px/16px var(--sans); color: var(--stone); flex-wrap: wrap; }
.footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr); } /* plain 1fr lets a wide table stretch the page sideways */
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: 280px minmax(0, 1fr); }
  .topbar .bridge-detail { display: none; }
}
@media (max-width: 767px) {
  :root { --margin: 1rem; }
  .display { font-size: 36px; line-height: 44px; }
  .h1 { font-size: 26px; line-height: 34px; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .topbar .wrap { height: auto; flex-wrap: wrap; padding-top: .75rem; padding-bottom: .75rem; }
  .nav { order: 3; width: 100%; margin: 0; }
  .topbar .acct { margin-left: auto; max-width: 150px; }
  .topbar .bridge-detail { display: none; }
  .brand-name { font-size: 23px; }
  .auth { margin-top: 1.5rem; }
  .auth-title { font-size: 32px; line-height: 38px; }
  dialog.sheet { border-radius: 0; }
  /* tables reflow into archival cards */
  .table.reflow thead { display: none; }
  .table.reflow tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .375rem .75rem; padding: 1rem; border-bottom: 1px solid var(--line); }
  .table.reflow .item-title { white-space: normal; }
  .table.reflow td { border: 0; padding: 0; grid-column: 2; }
  .table.reflow td.check { grid-column: 1; grid-row: 1 / span 6; }
  .table.reflow td[data-l]::before { content: attr(data-l) ' · '; color: var(--ash); font-size: 11px; }
  .inbox, .inbox.two { grid-template-columns: 1fr; height: auto; }
  .threads { max-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
  .messages { max-height: 60vh; }
  .msg { max-width: 88%; }
  .jobbar { left: 1rem; right: 1rem; width: auto; }
  .hbar { grid-template-columns: 100px 1fr 60px; }
  .bars .col:nth-child(even):not(.now) .lbl { visibility: hidden; } /* every other date, so the labels fit */
  .heat { grid-template-columns: 24px repeat(24, minmax(0, 1fr)); gap: 1px; }
  .photos { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- relist review ---------- */
.relist-list { display: grid; gap: 1.25rem; max-height: 60vh; overflow-y: auto; padding-right: .25rem; }
.relist-photo { display: grid; gap: .5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line, #e1dcd3); }
.relist-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.relist-pair figure { margin: 0; display: grid; gap: .25rem; }
.relist-pair img { width: 100%; max-height: 280px; object-fit: contain; border-radius: var(--r-sm); background: var(--shade); outline: 1px solid rgba(0, 0, 0, .08); outline-offset: -1px; }
.relist-pair figcaption { font: 500 12px/16px var(--sans); color: var(--ash); }
@media (max-width: 560px) { .relist-pair { grid-template-columns: 1fr; } }
@media (max-width: 420px) {
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip .stat, .strip.rows .stat:nth-child(odd), .strip.rows .stat:nth-child(even) { padding-left: 0; border-left: 0; }
  .strip .stat + .stat { border-top: 1px solid var(--line); }
}
/* a toast must not sit on top of the job bar when the screen is too narrow to put them side by side */
@media (max-width: 1100px) { body:has(.jobbar:not([hidden])) .toasts { bottom: 9.5rem; } }

/* ---------- motion: overlays ---------- */
dialog.sheet[open] { animation: sheet-in var(--dur-sheet) var(--ease-out); }
dialog.sheet[open]::backdrop { animation: fade-in var(--dur-sheet) ease-out; }
dialog.sheet.closing { animation: sheet-out var(--dur-move) var(--ease-in) forwards; }
dialog.sheet.closing::backdrop { animation: fade-out var(--dur-move) ease-in forwards; }
dialog.confirm[open] { animation: pop-in var(--dur-move) var(--ease-out); }
dialog.confirm[open]::backdrop { animation: fade-in var(--dur-move) ease-out; }
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateX(32px); opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.toast.out { opacity: 0; transform: translateY(6px); }
.jobbar:not([hidden]) { animation: rise var(--dur-move) var(--ease-out); }

/* reduced motion: nothing moves; hover and focus still change colour */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-press: 0ms; --dur-move: 0ms; --dur-sheet: 0ms; --dur-hover: 80ms; }
  .btn:active:not([disabled]), .icon-btn:active, .chip:active { transform: none; }
  .switch::after { transition: none; } /* the knob jumps; the track still changes colour */
  dialog[open], dialog[open]::backdrop, .toast, .jobbar:not([hidden]) { animation: none; }
}

/* ---------- legal pages (terms, privacy, contact) ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 3rem 0 4rem; }
.legal-page .h1 { margin-bottom: .5rem; }
.legal-page .updated { color: var(--ash); margin-bottom: 2rem; }
.legal-page h2 { font: 500 22px/30px var(--serif); letter-spacing: -.01em; margin: 2.25rem 0 .5rem; }
.legal-page p, .legal-page li { color: var(--stone); font-size: 15px; line-height: 24px; }
.legal-page p + p, .legal-page ul + p, .legal-page p + ul { margin-top: .75rem; }
.legal-page ul { padding-left: 1.25rem; margin: .75rem 0 0; display: grid; gap: .375rem; }
.legal-page a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mute); text-underline-offset: 3px; }
.legal-page .table { margin-top: 1rem; }
.legal-page .note { margin-top: 1.5rem; padding: 1rem 1.25rem; background: var(--shade); border-radius: var(--r-surf); }
.terms-tick { display: flex; gap: .625rem; align-items: flex-start; font-size: 13px; line-height: 20px; color: var(--stone); cursor: pointer; }
.terms-tick input { margin-top: 2px; flex: none; }
.terms-tick a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mute); text-underline-offset: 3px; }
/* skip link: the first stop for keyboard users, visible only when focused */
.skip { position: absolute; left: .75rem; top: -4rem; z-index: 100; padding: .5rem .875rem; background: var(--ink); color: #fff; border-radius: var(--r-ctl); font: 500 14px/1.2 var(--sans); }
.skip:focus { top: .75rem; }
