/* InteropEV Client Portal, the look.
   A client portal, not a dashboard: a fixed frame (sidebar with the company and its
   projects, a top bar with where you are, search and your account), pages that are lists
   and documents first, calm surfaces. The interopev.com register: white and warm greys,
   ink text, gold for actions and the brand, hairlines, 6/12 px radii, Sora for titles,
   Manrope for reading. Light only. */

@font-face { font-family: "Sora"; src: url("/fonts/Sora-SemiBold.ttf") format("truetype"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/fonts/Sora-Bold.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-SemiBold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #f5f5f3; --surface: #ffffff; --surface-2: #f0f0ed; --hover: #fafaf8;
  --line: #e3e3df; --line-2: #ececE8;
  --ink: #1b1b1f; --soft: #4a4c52; --mute: #6d6f76;
  --gold: #e8b84a; --gold-deep: #c9962a; --gold-ink: #1b1400; --gold-tint: #fbf3df;
  --green: #2e7d4f; --green-tint: #eaf3ed;
  --orange: #a8611a; --orange-tint: #f8efe4;
  --critical: #b23a3a; --critical-tint: #f9ecec;
  --info: #3c5a86; --info-tint: #edf1f7;
  --shadow-sm: 0 1px 2px rgba(27, 27, 31, .04);
  --shadow-pop: 0 16px 40px -16px rgba(27, 27, 31, .28), 0 2px 6px rgba(27, 27, 31, .06);
  --r: 6px; --r-lg: 12px;
  --side: 264px; --top: 60px;
  --e: cubic-bezier(.2, .7, .2, 1);
  --head: "Sora", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-family: var(--head); color: var(--ink); font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: 24px; line-height: 1.25; }
h2 { font-size: 15.5px; line-height: 1.3; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
::selection { background: var(--gold-tint); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--mute); }
.soft { color: var(--soft); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.link { color: var(--ink); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 90; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r); }
.skip:focus { left: 8px; }

/* ───────── frame ───────── */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); z-index: 30; }
.sb-brand { display: flex; align-items: center; height: var(--top); padding: 0 18px; border-bottom: 1px solid var(--line); text-decoration: none; flex: none; }
/* the lockup, as every app in the family writes it (Campaign, Field Log, Analyzer) */
.mark { width: 31px; height: 29px; flex: none; }
.wm { font-family: var(--head); font-size: 15.5px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.wm i { font-style: normal; font-weight: 500; color: var(--mute); margin-left: .06em; }
.sb-brand, .auth-side .brand, .auth-card .mobile-brand { gap: 9px; }
.sb-org { margin: 14px 12px 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; gap: 10px; align-items: center; background: var(--hover); text-decoration: none; }
.sb-org:hover { border-color: #cfcfcb; }
.sb-org .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--head); font-weight: 600; font-size: 12px; flex: none; }
.sb-org .logo.client { background: var(--gold-tint); color: #5a4412; }
.sb-org div { min-width: 0; }
.sb-org b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-org small { display: block; font-size: 12px; color: var(--mute); line-height: 1.3; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 8px 10px 16px; }
.sb-label { font-size: 11.5px; font-weight: 600; color: var(--mute); padding: 14px 10px 6px; display: flex; justify-content: space-between; align-items: center; }
.sb-label a { font-weight: 600; color: var(--mute); text-decoration: none; }
.sb-label a:hover { color: var(--ink); }
.sb-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r); text-decoration: none; color: var(--soft); font-weight: 500; transition: background .15s var(--e), color .15s var(--e); }
.sb-link:hover { background: var(--surface-2); color: var(--ink); }
.sb-link[aria-current="page"] { background: var(--gold-tint); color: var(--ink); font-weight: 600; }
.sb-link[aria-current="page"] svg { color: var(--gold-deep); }
.sb-link .count { margin-left: auto; font-size: 11.5px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--gold); color: var(--gold-ink); }
.sb-proj { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: var(--r); text-decoration: none; color: var(--soft); font-size: 13px; line-height: 1.3; }
.sb-proj:hover { background: var(--surface-2); color: var(--ink); }
.sb-proj[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.sb-proj span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--green); }
.hdot.warn { background: var(--orange); } .hdot.bad { background: var(--critical); } .hdot.mute { background: #b9bab6; }
.sb-foot { border-top: 1px solid var(--line); padding: 12px; flex: none; }
.sb-help { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r); text-decoration: none; color: var(--soft); font-size: 12.5px; line-height: 1.35; }
.sb-help:hover { background: var(--surface-2); color: var(--ink); }
.sb-help b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 25; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 13.5px; color: var(--mute); }
.crumbs a { text-decoration: none; color: var(--mute); white-space: nowrap; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .here { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs svg { width: 14px; height: 14px; color: #b0b1ad; }
.tb-search { display: flex; align-items: center; gap: 10px; width: min(340px, 34vw); height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--mute); font-size: 13px; text-align: left; transition: border-color .15s var(--e); }
.tb-search:hover { border-color: #cfcfcb; color: var(--soft); }
.tb-search span { flex: 1; }
kbd { font-family: var(--body); font-size: 11px; font-weight: 600; color: var(--mute); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.tb-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: var(--r); background: none; display: grid; place-items: center; color: var(--soft); text-decoration: none; transition: background .15s var(--e); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.menu-btn { display: none; }
.me-btn { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 4px; border: 0; border-radius: var(--r); background: none; text-align: left; transition: background .15s var(--e); }
.me-btn:hover { background: var(--surface-2); }
.me-btn b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.me-btn small { display: block; font-size: 11.5px; color: var(--mute); line-height: 1.2; }
.menu { position: fixed; z-index: 45; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 6px;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s var(--e), transform .15s var(--e); }
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu .who { padding: 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.menu .who b { display: block; font-weight: 600; }
.menu .who small { display: block; color: var(--mute); font-size: 12.5px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r); background: none; text-decoration: none; font-size: 13.5px; color: var(--ink); text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }

.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 28px 80px; }
.view-enter { animation: fadein .2s var(--e) both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* page header: a title, one line about it, the page's actions */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-header .sub { color: var(--mute); margin-top: 4px; font-size: 14px; max-width: 72ch; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ───────── surfaces ───────── */
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); min-height: 54px; }
.card-head .desc { font-size: 12.5px; color: var(--mute); margin-top: 2px; font-family: var(--body); font-weight: 400; letter-spacing: 0; }
.card-head .more { font-size: 12.5px; font-weight: 600; color: var(--soft); text-decoration: none; white-space: nowrap; }
.card-head .more:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.cols-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.stack > * + * { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); border-top: 1px solid var(--line-2); }
.stat { padding: 12px 16px; border-right: 1px solid var(--line-2); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--head); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--mute); }

/* ───────── controls ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; transition: background .15s var(--e), border-color .15s var(--e); }
.btn:hover { background: var(--hover); border-color: #cfcfcb; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--gold); border-color: var(--gold-deep); color: var(--gold-ink); }
.btn-primary:hover { background: #efc561; border-color: var(--gold-deep); }
.btn .ic { display: inline-grid; place-items: center; }
.btn .ic svg { width: 15px; height: 15px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--critical); }
.btn-danger:hover { background: var(--critical-tint); border-color: rgba(178, 58, 58, .3); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--soft); margin-bottom: 6px; }
.field > small { display: block; font-size: 12px; color: var(--mute); margin-top: 5px; }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 14px; color: var(--ink); transition: border-color .15s var(--e), box-shadow .15s var(--e); }
textarea.input { height: auto; min-height: 92px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input[type=file].input { padding: 7px 10px; }
.input:hover { border-color: #cfcfcb; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27, 27, 31, .07); }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.search { position: relative; }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.search .input { padding-left: 34px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 240px; max-width: 380px; }
.toolbar select.input { width: auto; min-width: 170px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 2px; gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--soft); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ───────── project header and tabs ───────── */
.phead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.phead-top { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; padding: 20px 22px 16px; flex-wrap: wrap; }
.phead .meta { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 13px; color: var(--mute); }
.phead .meta b { color: var(--ink); font-weight: 600; }
.phead .prog { min-width: 220px; }
.phead .prog small { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); margin-bottom: 6px; }
.subnav { position: sticky; top: var(--top); z-index: 20; background: var(--surface); border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.subnav-in { display: flex; gap: 2px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.subnav-in::-webkit-scrollbar { display: none; }
.subtab { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; text-decoration: none; white-space: nowrap; font-weight: 600; font-size: 13.5px; color: var(--soft); border-bottom: 2px solid transparent; transition: color .15s var(--e), border-color .15s var(--e); }
.subtab:hover { color: var(--ink); }
.subtab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold-deep); }
.subtab[aria-current="page"] svg { color: var(--gold-deep); }
.subtab .count { font-size: 11px; font-weight: 700; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--soft); }
.subtab .count.hot { background: var(--gold); color: var(--gold-ink); }

/* ───────── tables ───────── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mute); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--hover); }
table.t td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .12s var(--e); }
table.t tbody tr:hover { background: var(--hover); }
table.t tr.click { cursor: pointer; }
table.t tr.sel td { background: var(--gold-tint); }
table.t tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--gold-deep); }
table.t td.title { min-width: 200px; }
table.t td.title b { font-weight: 600; display: block; overflow-wrap: anywhere; }
table.t td.title small { color: var(--mute); font-size: 12.5px; }
table.t a.name { text-decoration: none; font-weight: 600; }
table.t a.name:hover { text-decoration: underline; text-underline-offset: 3px; }
.fileicon { color: var(--mute); margin-right: 8px; }

/* ───────── state ───────── */
.state { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 12px; font-weight: 600; font-size: 12px; white-space: nowrap; background: var(--surface-2); color: var(--soft); }
.state svg { width: 13px; height: 13px; stroke-width: 2; }
.tone-ok.state { background: var(--green-tint); color: var(--green); }
.tone-warn.state { background: var(--orange-tint); color: var(--orange); }
.tone-bad.state { background: var(--critical-tint); color: var(--critical); }
.tone-info.state { background: var(--info-tint); color: var(--info); }
.tone-ok { color: var(--green); } .tone-warn { color: var(--orange); } .tone-bad { color: var(--critical); } .tone-info { color: var(--info); } .tone-mute { color: var(--mute); }
.status-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; color: var(--soft); white-space: nowrap; }
.tag.gold { background: var(--gold-tint); border-color: #f1e2bd; color: #5a4412; font-weight: 600; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.progress { display: block; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold-deep); border-radius: 3px; }

/* ───────── home ───────── */
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.attn li:last-child { border-bottom: 0; }
.attn .ai { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--soft); }
.attn .ai.gold { background: var(--gold-tint); color: #8a6516; }
.attn .ai.warn { background: var(--orange-tint); color: var(--orange); }
.attn .ai.bad { background: var(--critical-tint); color: var(--critical); }
.attn b { font-weight: 600; display: block; overflow-wrap: anywhere; }
.attn small { display: block; color: var(--mute); font-size: 12.5px; overflow-wrap: anywhere; }
.contact { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.contact:last-child { border-bottom: 0; }
.contact div { min-width: 0; }
.contact b { font-weight: 600; display: block; line-height: 1.3; }
.contact small { display: block; color: var(--mute); font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.contact small a { color: var(--soft); text-decoration: none; }
.contact small a:hover { text-decoration: underline; color: var(--ink); }
.doclist { list-style: none; margin: 0; padding: 0; }
.doclist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.doclist li:last-child { border-bottom: 0; }
.doclist .fileicon { margin: 2px 0 0; }
.doclist a { text-decoration: none; font-weight: 600; display: block; overflow-wrap: anywhere; }
.doclist a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doclist small { color: var(--mute); font-size: 12px; }

/* project list as a table */
.plist { display: grid; }
.prow { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.1fr) minmax(0, 1.4fr) 150px 20px; gap: 16px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line-2); text-decoration: none; transition: background .12s var(--e); }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: var(--hover); }
.prow.head { padding-top: 10px; padding-bottom: 10px; background: var(--hover); font-size: 12px; font-weight: 600; color: var(--mute); border-bottom-color: var(--line); }
.prow .nm b { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.prow .nm small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 1px; }
.prow .pg { display: grid; gap: 5px; }
.prow .pg small, .prow .nx { color: var(--mute); font-size: 12.5px; }
.prow .nx b { color: var(--soft); font-weight: 600; }
.prow .chev { color: #b0b1ad; }
.prow:hover .chev { color: var(--ink); }

/* ───────── overview parts ───────── */
.update { padding: 16px 18px; }
.update .by { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--mute); margin-bottom: 10px; }
.status-note { color: var(--ink); white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; max-width: 75ch; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.milestones { list-style: none; margin: 0; padding: 0; }
.milestones li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 9px 0; position: relative; }
.milestones li:not(:last-child)::before { content: ""; position: absolute; left: 7px; top: 28px; bottom: -6px; width: 2px; background: var(--line); }
.milestones li.done:not(:last-child)::before { background: #b9d6c4; }
.milestones .dot-m { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c9cac6; margin-top: 3px; background: var(--surface); padding: 0; display: grid; place-items: center; }
button.dot-m:hover { border-color: var(--gold-deep); }
.milestones li.done .dot-m { background: var(--green); border-color: var(--green); color: #fff; }
.milestones li.done .dot-m svg { width: 10px; height: 10px; stroke-width: 2.6; }
.milestones li.late .dot-m { border-color: var(--orange); }
.milestones li.done .t { color: var(--mute); }
.milestones .t { font-weight: 500; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.people li b { font-weight: 600; display: block; line-height: 1.3; }
.people li small { color: var(--mute); display: block; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.people li small a { text-decoration: none; color: var(--soft); }
.people li small a:hover { text-decoration: underline; }
.people .lead-tag { font-size: 11px; font-weight: 700; color: #5a4412; background: var(--gold-tint); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.side-label { font-size: 12px; color: var(--mute); font-weight: 600; margin: 6px 0 2px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--head); font-size: 11.5px; font-weight: 600; flex: none; }
.avatar.client { background: var(--gold-tint); color: #5a4412; }
.avatar.sm { width: 28px; height: 28px; font-size: 10.5px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; overflow-wrap: anywhere; }
.feed li:last-child { border-bottom: 0; }
.feed b { font-weight: 600; }
.feed .when { color: var(--mute); font-size: 12px; white-space: nowrap; }
.feed .proj { display: block; color: var(--mute); font-size: 12px; text-decoration: none; }
.feed .proj:hover { color: var(--ink); }

/* ───────── drive ───────── */
.drive-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.path { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.path button { border: 0; background: none; height: 30px; padding: 0 8px; border-radius: var(--r); font-weight: 600; font-size: 13px; color: var(--soft); display: inline-flex; align-items: center; gap: 6px; }
.path button:hover { background: var(--surface-2); color: var(--ink); }
.path button:last-child { color: var(--ink); }
.path .sep { color: #b0b1ad; }
.drop { border: 1.5px dashed #d6d6d2; border-radius: var(--r-lg); padding: 22px 20px; text-align: center; color: var(--mute); margin: 14px 16px 16px; background: var(--hover); transition: border-color .15s var(--e), background .15s var(--e); }
.drop .i { color: var(--gold-deep); width: 20px; height: 20px; display: block; margin: 0 auto 6px; }
.drop.over { border-color: var(--gold-deep); background: var(--gold-tint); color: var(--ink); }
.uploads { border-bottom: 1px solid var(--line-2); padding: 12px 16px; display: grid; gap: 10px; }
.up { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto auto; gap: 12px; align-items: center; font-size: 13px; }
.folder-row td:first-child { font-weight: 600; }
.folder-row .fileicon { color: var(--gold-deep); }

/* ───────── threads ───────── */
.thread { display: grid; gap: 16px; }
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.msg .head { font-size: 12px; color: var(--mute); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg .head b { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.msg .bubble { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.msg.internal .bubble { border-left: 2px solid var(--gold-deep); padding-left: 10px; }
.msg .del { border: 0; background: none; color: var(--mute); cursor: pointer; font-size: 12px; padding: 0; }
.msg .del:hover { color: var(--critical); }
.composer { padding: 14px 18px 16px; border-top: 1px solid var(--line-2); }
.composer textarea { min-height: 76px; }
.composer .row { justify-content: space-between; margin-top: 10px; }

/* ───────── list and detail ───────── */
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
.split table.t th, .split table.t td { padding-left: 12px; padding-right: 12px; }
.split table.t td.title { min-width: 170px; }
.split .detail { position: sticky; top: calc(var(--top) + 62px); max-height: calc(100dvh - var(--top) - 82px); overflow-y: auto; scrollbar-width: thin; }
.detail h2 { font-size: 18px; line-height: 1.3; }
.detail .ref { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.detail .sec { padding: 14px 18px; border-top: 1px solid var(--line-2); }
.detail .sec h3 { font-size: 12px; color: var(--mute); font-family: var(--body); font-weight: 600; margin-bottom: 6px; letter-spacing: 0; }
.detail .sec p { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail .sec-thread { padding: 0; }
.detail .sec-thread > h3 { padding: 14px 18px 6px; font-family: var(--head); font-size: 14px; color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 5px 0; font-size: 13px; overflow-wrap: anywhere; }
.timeline .d { color: var(--mute); }

/* ───────── dialogs, palette ───────── */
.scrim { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(27, 27, 31, .32); animation: fadein .15s var(--e) both; }
.dialog { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: pop .2s var(--e) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dialog.wide { width: min(760px, 100%); }
.dialog .dh { padding: 20px 22px 4px; }
.dialog .dh h2 { font-size: 18px; }
.dialog .dh p { color: var(--mute); margin-top: 5px; font-size: 13.5px; }
.dialog .db { padding: 14px 22px 4px; }
.dialog .df { padding: 12px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.copybox { display: flex; gap: 8px; }
.copybox .input { font-family: var(--mono); font-size: 12.5px; }
.notice { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); font-size: 13px; color: var(--soft); }
.notice.bad { color: var(--critical); background: var(--critical-tint); }
.notice svg { margin-top: 1px; }
.palette { align-items: start; padding-top: min(14vh, 120px); }
.palette .dialog { width: min(620px, 100%); }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 6px 16px; border-bottom: 1px solid var(--line-2); }
.pal-input svg { color: var(--mute); width: 18px; height: 18px; }
.pal-input input { flex: 1; height: 50px; border: 0; outline: 0; background: none; font-size: 15.5px; }
.pal-list { max-height: min(56vh, 440px); overflow-y: auto; padding: 6px; }
.pal-group { font-size: 11.5px; font-weight: 600; color: var(--mute); padding: 10px 10px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 6px 10px; border: 0; border-radius: var(--r); background: none; text-align: left; font-size: 14px; color: var(--ink); text-decoration: none; }
.pal-item > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .meta { margin-left: auto; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pal-item .pi { width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; color: var(--soft); flex: none; }
.pal-item[aria-selected="true"] { background: var(--gold-tint); }
.pal-item[aria-selected="true"] .pi { background: var(--gold); color: var(--gold-ink); }
.pal-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px 12px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--mute); }

/* ───────── empty, sign-in ───────── */
.empty { padding: 40px 20px; text-align: center; color: var(--mute); }
.empty b { display: block; color: var(--ink); font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-side { background: var(--ink); color: #f4f4f2; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-side .brand { display: flex; align-items: center; }
.auth-side .wm { color: #fff; font-size: 17px; }
.auth-side .wm i { color: #a9aab0; }
/* on night the face turns white and the symbol takes the gold that holds on white */
.auth-side .mark .face { fill: #fff; }
.auth-side .mark g { fill: #b07f16; }
.auth-side h2 { color: #fff; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; max-width: 20ch; }
.auth-side ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; color: #c9cac6; font-size: 14px; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li svg { color: var(--gold); }
.auth-side .foot { font-size: 12.5px; color: #8d8f95; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(400px, 100%); }
.auth-card .mobile-brand { display: none; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .lead { color: var(--mute); margin-bottom: 22px; font-size: 14px; }
.auth-card .btn-primary { width: 100%; height: 42px; }
.auth-card .help { margin-top: 18px; font-size: 12.5px; color: var(--mute); }

/* ───────── campaign frame ───────── */
.frame-card { overflow: hidden; }
.frame { display: block; width: 100%; height: calc(100dvh - 260px); min-height: 600px; border: 0; background: var(--bg); }

#toast { position: fixed; bottom: 22px; left: 50%; z-index: 80; transform: translateX(-50%) translateY(12px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .2s var(--e), transform .2s var(--e); max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--critical); }
.spin { width: 20px; height: 20px; border: 2px solid var(--surface-2); border-top-color: var(--gold-deep); border-radius: 50%; animation: spin .8s linear infinite; margin: 80px auto; }
.card .spin { margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ───────── narrow windows ───────── */
@media (max-width: 1180px) {
  .cols-2, .split { grid-template-columns: minmax(0, 1fr); }
  .split .detail { position: static; max-height: none; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-100%); transition: transform .25s var(--e); z-index: 50; }
  .nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .shade { display: none; }
  .nav-open .shade { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(27, 27, 31, .3); }
  .icon-btn.menu-btn { display: grid; }
  .topbar { padding: 0 12px; gap: 8px; }
  .tb-search { width: 38px; padding: 0; justify-content: center; border-color: transparent; }
  .tb-search span, .tb-search kbd, .me-btn .who-text { display: none; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; }
  .prow > :nth-child(3), .prow > :nth-child(4) { display: none; }
  .cols-even { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .auth-card .mobile-brand { display: flex; align-items: center; margin-bottom: 28px; }
}
@media (min-width: 961px) { .shade { display: none; } }
@media (max-width: 768px) {
  .content { padding: 18px 14px 64px; }
  .crumbs > :not(.here):not(:nth-last-child(2)) { display: none; }
  .fields-2 { grid-template-columns: 1fr; }
  .up { grid-template-columns: minmax(0, 1fr) auto auto; }
  .up .progress { grid-column: 1 / -1; grid-row: 2; }
  .phead-top { padding: 16px; }
  .phead .prog { min-width: 0; width: 100%; }
  table.t th, table.t td { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 21px; }
}

/* ───────── finish ─────────
   The same portal, finished: surfaces lifted by a diffused shadow and a faint ring rather
   than a grey frame, one quiet light behind the page, an active edge in the sidebar,
   tactile buttons, rows that answer the pointer. Only transform, opacity and colour move. */
:root {
  --ring: 0 0 0 1px rgba(27, 27, 31, .07);
  --lift: 0 1px 2px rgba(27, 27, 31, .04), 0 10px 28px -18px rgba(27, 27, 31, .16);
  --lift-hover: 0 1px 2px rgba(27, 27, 31, .05), 0 18px 40px -20px rgba(27, 27, 31, .24);
  --r-lg: 14px;
  --spring: cubic-bezier(.32, .72, 0, 1);
}
body { font-feature-settings: "tnum" 0; }
.stat b, .prow .pg small, table.t td.right, .kv dd, .feed .when, .phead .prog b { font-variant-numeric: tabular-nums; }
svg.i { stroke-width: 1.5; }
h1 { font-size: 26px; letter-spacing: -.025em; }

/* one quiet light, fixed behind the page */
.main::before { content: ""; position: fixed; inset: 0 0 auto var(--side); height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(720px 300px at 22% -60px, rgba(232, 184, 74, .13), transparent 70%); }
@media (max-width: 960px) { .main::before { left: 0; } }

/* surfaces */
.card, .phead { border: 0; box-shadow: var(--ring), var(--lift); }
.card-head { border-bottom-color: rgba(27, 27, 31, .055); padding: 16px 20px; }
.card-body { padding: 16px 20px; }
.attn li, .contact, .doclist li, .prow { padding-left: 20px; padding-right: 20px; }
table.t th { background: transparent; border-bottom-color: rgba(27, 27, 31, .07); padding-top: 12px; }
table.t td { border-bottom-color: rgba(27, 27, 31, .05); }
.prow.head { background: transparent; border-bottom-color: rgba(27, 27, 31, .07); }

/* sidebar */
.sidebar { background: linear-gradient(180deg, #fff 0%, #fcfcfa 100%); border-right-color: rgba(27, 27, 31, .07); }
.sb-brand { border-bottom-color: rgba(27, 27, 31, .06); }
.sb-org { border: 0; background: var(--surface); box-shadow: var(--ring), 0 6px 16px -12px rgba(27, 27, 31, .25); transition: box-shadow .35s var(--spring), transform .35s var(--spring); }
.sb-org:hover { transform: translateY(-1px); box-shadow: var(--ring), 0 10px 22px -12px rgba(27, 27, 31, .3); }
.sb-org .logo { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.sb-link { position: relative; transition: background .25s var(--spring), color .25s var(--spring); }
.sb-link svg { transition: transform .35s var(--spring), color .25s var(--spring); }
.sb-link:hover svg { transform: translateX(1px); }
.sb-link[aria-current="page"] { background: linear-gradient(90deg, var(--gold-tint), rgba(251, 243, 223, .35)); }
.sb-link[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-deep); }
.hdot { box-shadow: 0 0 0 3px rgba(46, 125, 79, .14); }
.hdot.warn { box-shadow: 0 0 0 3px rgba(168, 97, 26, .14); } .hdot.bad { box-shadow: 0 0 0 3px rgba(178, 58, 58, .14); } .hdot.mute { box-shadow: 0 0 0 3px rgba(27, 27, 31, .06); }
.sb-proj { transition: background .25s var(--spring), color .25s var(--spring); }
.sb-foot { border-top-color: rgba(27, 27, 31, .06); }

/* top bar */
.topbar { border-bottom-color: rgba(27, 27, 31, .07); background: rgba(255, 255, 255, .82); }
.tb-search { border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(27, 27, 31, .05); transition: background .25s var(--spring), box-shadow .25s var(--spring); }
.tb-search:hover { background: #fff; box-shadow: var(--ring), 0 6px 16px -10px rgba(27, 27, 31, .2); }
kbd { background: #fff; border-color: rgba(27, 27, 31, .1); box-shadow: 0 1px 0 rgba(27, 27, 31, .08); }
.me-btn .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(27, 27, 31, .08); }
.menu { border: 0; box-shadow: var(--ring), var(--shadow-pop); transform-origin: top right; transform: translateY(-4px) scale(.98); transition: opacity .2s var(--spring), transform .3s var(--spring); }
.menu.open { transform: none; }

/* buttons: pressed, not just recoloured; a trailing arrow nudges */
.btn { border-color: rgba(27, 27, 31, .1); box-shadow: 0 1px 1px rgba(27, 27, 31, .03); transition: background .25s var(--spring), border-color .25s var(--spring), box-shadow .25s var(--spring), transform .2s var(--spring); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { border-color: rgba(150, 108, 22, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 14px -8px rgba(201, 150, 42, .75); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 10px 20px -10px rgba(201, 150, 42, .85); }
.btn-ghost, .btn-ghost:hover { box-shadow: none; }
.btn .go { display: inline-grid; place-items: center; margin-right: -3px; transition: transform .35s var(--spring); }
.btn .go svg { width: 14px; height: 14px; }
.btn:hover .go { transform: translateX(2px); }
.input, select.input, textarea.input { border-color: rgba(27, 27, 31, .12); transition: border-color .25s var(--spring), box-shadow .25s var(--spring); }
.input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(232, 184, 74, .18); }
.seg { border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(27, 27, 31, .05); padding: 3px; }
.seg button { transition: background .25s var(--spring), color .25s var(--spring), box-shadow .25s var(--spring); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--ring), 0 2px 6px -2px rgba(27, 27, 31, .18); }

/* rows answer the pointer */
.prow, table.t tbody tr.click, .attn li, .doclist li { position: relative; }
.prow::before, table.t tbody tr.click td:first-child::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-deep); opacity: 0; transform: scaleY(.4); transition: opacity .25s var(--spring), transform .35s var(--spring); }
table.t tbody tr.click td:first-child { position: relative; }
.prow:hover::before, table.t tbody tr.click:hover td:first-child::before { opacity: 1; transform: none; }
.prow:hover, table.t tbody tr:hover { background: #fcfbf7; }
.prow .chev { transition: transform .35s var(--spring), color .25s var(--spring); }
.prow:hover .chev { transform: translateX(3px); }
table.t tr.sel td:first-child { box-shadow: none; }
table.t tr.sel td:first-child::before { opacity: 1; transform: none; }

/* attention list: the icon says what kind of thing waits */
.attn .ai { border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(27, 27, 31, .04); }
.attn li { transition: background .25s var(--spring); }
.attn li:hover { background: #fcfbf7; }

/* project header: a faint warm band, the progress as a figure */
.phead { overflow: hidden; }
.phead-top { background: linear-gradient(180deg, rgba(251, 243, 223, .55), rgba(255, 255, 255, 0) 85%); }
.phead .prog b { font-family: var(--head); font-size: 15px; color: var(--ink); }
.progress { background: rgba(27, 27, 31, .07); }
.progress > i { background: linear-gradient(90deg, #d9a93c, var(--gold-deep)); }
.subnav { border-top-color: rgba(27, 27, 31, .06); }
.subtab { transition: color .25s var(--spring), border-color .25s var(--spring); }
.subtab svg { transition: transform .35s var(--spring); }
.subtab:hover svg { transform: translateY(-1px); }

/* state chips: a hairline of their own colour */
.tone-ok.state { box-shadow: inset 0 0 0 1px rgba(46, 125, 79, .16); }
.tone-warn.state { box-shadow: inset 0 0 0 1px rgba(168, 97, 26, .16); }
.tone-bad.state { box-shadow: inset 0 0 0 1px rgba(178, 58, 58, .16); }
.tone-info.state { box-shadow: inset 0 0 0 1px rgba(60, 90, 134, .14); }
.state { box-shadow: inset 0 0 0 1px rgba(27, 27, 31, .05); }
.tag.gold { border-color: rgba(201, 150, 42, .25); }

/* page change: a short fade and rise; dialogs settle */
.view-enter { animation: enter .32s var(--spring) both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dialog { border: 0; box-shadow: var(--ring), 0 30px 70px -28px rgba(27, 27, 31, .45); animation: pop .35s var(--spring) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.scrim { background: rgba(27, 27, 31, .28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* empty states get a mark of their own */
.empty .em { width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--mute); box-shadow: inset 0 0 0 1px rgba(27, 27, 31, .05); }
.empty .em svg { width: 20px; height: 20px; }
.welcome-date { font-size: 12.5px; font-weight: 600; color: var(--gold-deep); margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .view-enter, .dialog { animation: none; } }

/* ───────── campaign results ───────── */
.stats.big { border-top: 1px solid rgba(27, 27, 31, .055); grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stats.big .stat { padding: 16px 20px; border-right-color: rgba(27, 27, 31, .055); }
.stats.big .stat b { font-size: 26px; letter-spacing: -.03em; }
.stats.big .stat:first-child b { color: var(--gold-deep); }
.stat small { display: block; font-size: 12px; color: var(--mute); margin-top: 1px; }
.stat span { font-weight: 600; color: var(--soft); }
.rt td { vertical-align: middle; }
.rt .vol { display: inline-block; width: 56px; height: 5px; border-radius: 3px; background: var(--surface-2); margin-right: 10px; vertical-align: middle; overflow: hidden; }
.rt .vol i { display: block; height: 100%; background: #c9cac6; border-radius: 3px; }
.rate { font-weight: 700; font-variant-numeric: tabular-nums; }
.rate.ok { color: var(--green); } .rate.warn { color: var(--orange); } .rate.bad { color: var(--critical); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mute); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bp { fill: var(--gold-deep); background: var(--gold-deep); }
.bf { fill: #dcdcd8; background: #dcdcd8; }
svg.days { display: block; width: 100%; height: 120px; }
.days-x { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); margin-top: 8px; }

/* ───────── drive, refitted ───────── */
.drive-bar { gap: 12px; }
.drive-bar .row { gap: 6px; flex-wrap: nowrap; }
.drive-bar .search { min-width: 0; }
.drop { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; padding: 16px 20px; margin: 12px 16px 16px; }
.drop .i { margin: 0; flex: none; }
.drop b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.drop small { display: block; font-size: 12.5px; color: var(--mute); }
@media (max-width: 1100px) { .drive-bar .row { flex-wrap: wrap; } .drive-bar .search .input { width: 100% !important; } .drive-bar .search { flex: 1 1 200px; } }
@media (max-width: 768px) { .drop { display: none; } .stats.big .stat b { font-size: 22px; } }

/* ───────── help, setup ───────── */
.prose { color: var(--soft); line-height: 1.65; }
.prose p + p, .prose p + ol, .prose ol + p, .prose p + ul { margin-top: 10px; }
.prose ol, .prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose b { color: var(--ink); font-weight: 600; }
.roles dt { font-weight: 600; color: var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid rgba(27, 27, 31, .05); }
.steps li:last-child { border-bottom: 0; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--gold-tint); color: #8a6516; box-shadow: inset 0 0 0 1px rgba(201, 150, 42, .25); }
.steps li.done .n { background: var(--green-tint); color: var(--green); box-shadow: inset 0 0 0 1px rgba(46, 125, 79, .2); }
.steps li.done .n svg { width: 13px; height: 13px; stroke-width: 2.4; }
.steps li.done b { color: var(--mute); text-decoration: line-through; text-decoration-color: rgba(27, 27, 31, .25); }
.steps b { display: block; font-weight: 600; }
.steps small { display: block; color: var(--mute); font-size: 12.5px; }
.sb-foot .sb-link { margin-bottom: 4px; }
.auth-card .help b { color: var(--soft); }
.grid > .card + .card, .grid > section + section { margin-top: 0; }
table.t th.right, table.t td.right { text-align: right; }
