/* BidBud design system v3
 *
 * One stylesheet for the app and the marketing site (the landing adds site-marketing.css on top).
 * Ink navy for authority, copper from pipe fittings for the one thing that matters on a screen,
 * drafting paper instead of clinical white. Geist for text and display, Geist Mono for specs and
 * numbers that sit in columns. See design/README.md for the markup patterns.
 */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400..750&family=Geist+Mono:wght@400..600&display=swap");

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light;

  /* surfaces */
  --bg: #f7f6f2;            /* drafting paper */
  --bg-2: #efede6;          /* sunk paper, marketing bands */
  --surface: #ffffff;       /* cards */
  --surface-2: #f6f5f0;     /* table heads, inset wells */
  --surface-3: #edebe4;     /* hover */
  --line: #e6e3db;
  --line-strong: #d1cdc2;

  /* ink */
  --ink: #0b1322;           /* primary text, primary button */
  --ink-2: #465063;
  --ink-3: #687180;
  --ink-inverse: #f8f7f3;

  /* brand */
  --navy: #0e1a2c;
  --navy-2: #172a45;
  --copper: #b95f24;        /* fills, marks, rules */
  --copper-ink: #8a4313;    /* copper text on paper (AA) */
  --copper-soft: rgba(185, 95, 36, 0.10);
  --copper-line: rgba(185, 95, 36, 0.34);
  --brass: #c49a52;
  --link: #1f4f99;

  /* status (reserved, always with a label) */
  --good: #18794a;  --good-bg: #e3f1e8;  --good-line: #b3d8c0;
  --warn: #8f5500;  --warn-bg: #fbeed4;  --warn-line: #ebcf98;
  --bad: #b2332a;   --bad-bg: #f9e3df;   --bad-line: #eab9b2;
  --info: #1f4f99;  --info-bg: #e5ecf7;  --info-line: #bccce6;

  /* chart */
  --chart-line: #1f4f99;               /* win curve */
  --chart-band: rgba(31, 79, 153, 0.11);
  --chart-mark: #b95f24;               /* your bid / recommended */
  --chart-field: rgba(185, 95, 36, 0.06);  /* likely low bid range */
  --chart-field-strip: rgba(185, 95, 36, 0.55);
  --chart-grid: #ebe8e0;
  --chart-axis: #687180;

  /* atmosphere (marketing glow, blueprint grid) */
  --glow-copper: rgba(205, 112, 50, 0.16);
  --glow-blue: rgba(40, 90, 170, 0.10);
  --blueprint: rgba(14, 26, 44, 0.055);

  /* type */
  --font: "Geist", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: "Geist", "Inter", ui-sans-serif, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* shape */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 0 rgba(11, 19, 34, 0.03), 0 1px 2px rgba(11, 19, 34, 0.05);
  --shadow-2: 0 1px 0 rgba(11, 19, 34, 0.03), 0 10px 28px -10px rgba(11, 19, 34, 0.18);
  --shadow-3: 0 2px 0 rgba(11, 19, 34, 0.02), 0 30px 70px -24px rgba(11, 19, 34, 0.30), 0 0 0 1px rgba(11, 19, 34, 0.04);
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px rgba(185, 95, 36, 0.55);

  --sidebar-w: 236px;
  --topbar-h: 56px;
  --page-max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07090e; --bg-2: #0a0d14; --surface: #0e121a; --surface-2: #131822; --surface-3: #1a202b;
    --line: #1e2532; --line-strong: #2c3544;
    --ink: #eeece7; --ink-2: #a9b0bc; --ink-3: #7f8896; --ink-inverse: #0b1322;
    --navy: #0a111c; --navy-2: #142238;
    --copper: #e38b4e; --copper-ink: #f0a46f; --copper-soft: rgba(227, 139, 78, 0.12); --copper-line: rgba(227, 139, 78, 0.40);
    --brass: #d6b06a; --link: #8fb5ea;
    --good: #5cc48e; --good-bg: rgba(92, 196, 142, 0.11); --good-line: rgba(92, 196, 142, 0.30);
    --warn: #eeb05a; --warn-bg: rgba(238, 176, 90, 0.11); --warn-line: rgba(238, 176, 90, 0.30);
    --bad: #f08479; --bad-bg: rgba(240, 132, 121, 0.11); --bad-line: rgba(240, 132, 121, 0.30);
    --info: #8fb5ea; --info-bg: rgba(143, 181, 234, 0.11); --info-line: rgba(143, 181, 234, 0.30);
    --chart-line: #82acea; --chart-band: rgba(130, 172, 234, 0.15); --chart-mark: #e8945a;
    --chart-field: rgba(232, 148, 90, 0.07); --chart-field-strip: rgba(232, 148, 90, 0.6); --chart-grid: #1a212c; --chart-axis: #7f8896;
    --glow-copper: rgba(227, 139, 78, 0.14); --glow-blue: rgba(90, 140, 230, 0.10); --blueprint: rgba(255, 255, 255, 0.04);
    --shadow-1: 0 0 0 1px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    --shadow-3: 0 30px 80px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --focus: 0 0 0 2px var(--bg), 0 0 0 4px rgba(227, 139, 78, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07090e; --bg-2: #0a0d14; --surface: #0e121a; --surface-2: #131822; --surface-3: #1a202b;
  --line: #1e2532; --line-strong: #2c3544;
  --ink: #eeece7; --ink-2: #a9b0bc; --ink-3: #7f8896; --ink-inverse: #0b1322;
  --navy: #0a111c; --navy-2: #142238;
  --copper: #e38b4e; --copper-ink: #f0a46f; --copper-soft: rgba(227, 139, 78, 0.12); --copper-line: rgba(227, 139, 78, 0.40);
  --brass: #d6b06a; --link: #8fb5ea;
  --good: #5cc48e; --good-bg: rgba(92, 196, 142, 0.11); --good-line: rgba(92, 196, 142, 0.30);
  --warn: #eeb05a; --warn-bg: rgba(238, 176, 90, 0.11); --warn-line: rgba(238, 176, 90, 0.30);
  --bad: #f08479; --bad-bg: rgba(240, 132, 121, 0.11); --bad-line: rgba(240, 132, 121, 0.30);
  --info: #8fb5ea; --info-bg: rgba(143, 181, 234, 0.11); --info-line: rgba(143, 181, 234, 0.30);
  --chart-line: #82acea; --chart-band: rgba(130, 172, 234, 0.15); --chart-mark: #e8945a;
  --chart-field: rgba(232, 148, 90, 0.07); --chart-field-strip: rgba(232, 148, 90, 0.6); --chart-grid: #1a212c; --chart-axis: #7f8896;
  --glow-copper: rgba(227, 139, 78, 0.14); --glow-blue: rgba(90, 140, 230, 0.10); --blueprint: rgba(255, 255, 255, 0.04);
  --shadow-1: 0 0 0 1px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --shadow-3: 0 30px 80px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px rgba(227, 139, 78, 0.6);
}

/* Scale tokens: theme independent, so they live in their own block (spacing, type, radii, motion). */
:root {
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;
  --text-xs: 11.5px; --text-sm: 13px; --text-md: 14px; --text-lg: 16px; --text-xl: 19px; --text-2xl: 24px;
  --text-3xl: clamp(28px, 3.4vw, 44px); --text-4xl: clamp(38px, 5vw, 66px);
  --radius-xl: 20px; --radius-pill: 999px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-1: 120ms; --dur-2: 220ms; --dur-3: 420ms; --dur-4: 700ms;
  --z-nav: 30; --z-overlay: 50; --z-drawer: 60; --z-toast: 80;
}

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 var(--font);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
::selection { background: var(--copper-soft); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
p { margin: 0 0 12px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
h1 { font: 640 26px/1.15 var(--display); letter-spacing: -0.028em; font-stretch: 100%; }
h2 { font: 620 17px/1.3 var(--font); letter-spacing: -0.015em; }
h3 { font: 600 14px/1.35 var(--font); }
small { font-size: 12px; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; }
.kbd, kbd {
  font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px; color: var(--ink-2);
}

/* utilities */
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.num { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spec {
  font: 500 11px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.copper { color: var(--copper-ink); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.stack-tight > * + * { margin-top: 8px; }
.check .select-sm { margin-left: 6px; margin-top: -3px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px !important; } .mt-16 { margin-top: 16px !important; } .mt-24 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px !important; } .mb-16 { margin-bottom: 16px !important; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* -------------------------------------------------------------- app shell */
.shell {
  display: grid;
  background: linear-gradient(to right, var(--navy) var(--sidebar-w), var(--bg) var(--sidebar-w));
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 12px;
  background:
    radial-gradient(120% 40% at 0% 0%, rgba(227, 139, 78, 0.10), transparent 60%),
    linear-gradient(180deg, var(--navy-2) -30%, var(--navy) 45%);
  color: #c9d1dc;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar a { color: inherit; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 16px/1 var(--display); letter-spacing: -0.01em; color: var(--ink);
  text-decoration: none !important;
}
.brand-mark { width: 26px; height: 26px; flex: none; display: block; }
/* BidBud wordmark: "Bid" in ink, "Bud" in copper (one word, never split by a wrap) */
.wordmark { white-space: nowrap; letter-spacing: -0.02em; }
.wordmark-bud { color: var(--copper-ink); }
.sidebar .wordmark-bud { color: #e8995f; }
.sidebar .brand { color: #f4efe6; padding: 6px 8px 14px; }
.sidebar .brand-mark, :root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); border-radius: 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); border-radius: 8px; } }
.nav-section {
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: #7f8b9c; padding: 16px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  font-weight: 500; font-size: 13.5px; color: #b9c2cf;
  text-decoration: none !important;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: 0.75; }
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }
.nav-item.active, .nav-item[aria-current="page"] {
  background: linear-gradient(90deg, rgba(227, 139, 78, 0.16), rgba(255, 255, 255, 0.05) 70%); color: #fff;
  box-shadow: inset 2px 0 0 #e38b4e, inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.nav-item.active svg, .nav-item[aria-current="page"] svg { opacity: 1; color: #e7a06b; }
.nav-count {
  margin-left: auto; font: 500 11px/1 var(--mono); color: #9aa6b6;
  background: rgba(255, 255, 255, 0.07); padding: 3px 6px; border-radius: 999px;
}
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.org-switch {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: #dfe5ee;
}
.org-switch:hover { background: rgba(255, 255, 255, 0.06); }
.org-switch .avatar { background: #2a3d5c; color: #f2d2b8; }
.org-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.org-plan { font-size: 11.5px; color: #8e9aab; }
.org-menu { margin: 2px 0 6px; }
.org-menu > summary {
  list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px;
  font-size: 12px; color: #9aa6b6;
}
.org-menu > summary::-webkit-details-marker { display: none; }
.org-menu > summary:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.org-menu form { margin: 0; }
.org-menu .nav-item { width: 100%; background: none; border: 0; text-align: left; font-size: 13px; cursor: pointer; }
.org-menu .nav-item .avatar { width: 22px; height: 22px; font-size: 10px; background: #2a3d5c; color: #f2d2b8; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.topbar .crumbs a { color: var(--ink-3); }
.topbar .crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; width: min(320px, 40vw);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink-3); font-size: 13px;
}
.search input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; flex: 1; min-width: 0; }
.nav-toggle { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.nav-toggle { display: none; }
.theme-toggle .i-sun, .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
:root:not([data-theme]) .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme]) .theme-toggle .i-sun { display: block; }
}

.page { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 28px 28px 64px; }
.page-narrow { max-width: 760px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { font-size: 28px; }
.page-head p, .page-head .lede { color: var(--ink-2); margin: 6px 0 0; max-width: 680px; font-size: 14.5px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-ink); margin-bottom: 10px; display: block; }

/* banners (synthetic data, trial) */
.banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 28px; font-size: 13px;
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line);
}
.banner b { font-weight: 650; }
.banner { flex-wrap: nowrap; align-items: flex-start; }
.banner > svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.banner-info { background: var(--info-bg); color: var(--info); border-bottom-color: var(--info-line); }
.banner a { color: inherit; text-decoration: underline; }

/* ------------------------------------------------------------------ layout */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.span-2 { grid-column: span 2; }
.section { margin-top: 28px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2 { font-size: 15px; }

/* ------------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 20px;
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: -4px 0 16px;
}
.card-head h2, .card-head h3 { font-size: 14.5px; font-weight: 620; }
.card-head .spec { margin-bottom: 4px; display: block; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-foot { margin: 16px -20px -20px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); font-size: 13px; color: var(--ink-2); }
.card-link { display: block; color: inherit; text-decoration: none !important; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.card-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.card-ink, .card.card-ink, .plan-mini.card-ink, .stat.card-ink {
  background: var(--navy); color: #e9e4da; border-color: transparent;
}
:root[data-theme="dark"] .card-ink { background: #0d1626; border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-ink { background: #0d1626; border-color: var(--line); } }
.card-ink h2, .card-ink h3 { color: #fff; }
.card-ink .muted { color: #93a0b2; }

/* definition list: label / value rows */
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv:first-child, .divider + .kv { border-top: 0; }
.kv .k { color: var(--ink-2); }
.kv .v { font-variant-numeric: tabular-nums; font-weight: 550; text-align: right; }

/* ------------------------------------------------------------- stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.stats > .stat { border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.stats > .stat:first-child { border-left: 0; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); padding: 16px 18px; min-width: 0;
}
.stat-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-value {
  font: 600 26px/1.15 var(--font); letter-spacing: -0.02em; margin-top: 6px; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-value small { font-size: 14px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-left: 2px; }
.stat-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.stat-delta { font: 500 12px/1 var(--font); font-variant-numeric: tabular-nums; }
.stat-delta.up { color: var(--good); } .stat-delta.down { color: var(--bad); }
.stat-hero .stat-value { font-size: 44px; letter-spacing: -0.03em; }

/* hero number for a bid */
.price {
  font: 650 clamp(30px, 3.2vw, 44px)/1.05 var(--font); letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
  color: var(--ink); overflow-wrap: anywhere; min-width: 0;
}
.price-sub { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; }

/* ----------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--btn-line); border-radius: 8px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 550 13.5px/1 var(--font); letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer; text-decoration: none !important; user-select: none;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.06s;
  box-shadow: 0 1px 0 rgba(15, 27, 45, 0.04);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }
.btn-primary {
  --btn-bg: var(--ink); --btn-fg: var(--ink-inverse); --btn-line: var(--ink);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 55%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 1px 2px rgba(11, 19, 34, 0.22), 0 4px 12px -6px rgba(11, 19, 34, 0.35);
}
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--copper)); }
.btn-copper { --btn-bg: var(--copper); --btn-fg: #fff; --btn-line: var(--copper); }
.btn-copper:hover { background: color-mix(in srgb, var(--copper) 88%, #000); }
:root[data-theme="dark"] .btn-copper { --btn-fg: #1a0f06; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-copper { --btn-fg: #1a0f06; } }
.btn-ghost { --btn-bg: transparent; --btn-line: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger { --btn-fg: var(--bad); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent; animation: bd-spin 0.7s linear infinite;
}
@keyframes bd-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font: 550 11.5px/1 var(--font); white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge::before { content: none; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-good { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge-copper { background: var(--copper-soft); color: var(--copper-ink); border-color: var(--copper-line); }
.badge-ink { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }

/* pills: filters and trade chips */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  font: 500 12.5px/1 var(--font); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; white-space: nowrap;
  text-decoration: none !important;
}
.pill:hover { border-color: var(--line-strong); color: var(--ink); }
.pill.active, .pill[aria-pressed="true"] { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.pill .x { opacity: 0.6; display: inline-flex; }
.pill svg { width: 13px; height: 13px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* trade swatches (identity, used beside text) */
.trade { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.trade::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ink-3); }
.trade-plumbing::before { background: #2f6db5; }
.trade-hvac::before { background: #c56a2c; }
.trade-mechanical::before { background: #6b5bb5; }
.trade-fire_protection::before { background: #c0392b; }
.trade-electrical::before { background: #c49a1c; }

/* ------------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: inherit; contain: paint; }  /* a wide table scrolls in place; contain keeps a phone from widening the whole page for it */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left; font: 500 11px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); background: var(--surface-2);
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num, .table th.num { text-align: right; }
.table td.num { font-variant-numeric: tabular-nums; }
.table .title { font-weight: 550; color: var(--ink); }
.table .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.table tr.is-us td { background: var(--copper-soft); }
.table tr.is-winner td:first-child { box-shadow: inset 2px 0 0 var(--good); }
.table-compact td { padding: 8px 12px; }
.card > .table-wrap:first-child, .card-flush .table-wrap { margin: 0; }
.card > .table-wrap { margin: 0 -20px -20px; }
.card-flush > .table-wrap { margin: 0; }

/* -------------------------------------------------------------------- forms */
.form { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 13px; font-weight: 550; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.label .opt { font-weight: 400; color: var(--ink-3); }
.input, .select, textarea.input {
  width: 100%; height: 38px; padding: 0 12px;
  font: 400 14px/1.2 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: inset 0 1px 1px rgba(15, 27, 45, 0.04);
  transition: border-color 0.12s, box-shadow 0.12s;
  appearance: none; -webkit-appearance: none;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.input::placeholder { color: var(--ink-3); opacity: 0.8; }
.input:hover, .select:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--ink-3)); }
.input:focus, .select:focus { outline: none; border-color: var(--copper); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input.num, input[type="number"].input { font-variant-numeric: tabular-nums; }
.select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23747c88' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-group { display: flex; align-items: stretch; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 10px; font-size: 13px; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-right: 0; border-radius: 8px 0 0 8px;
}
.input-group .input { border-radius: 0 8px 8px 0; }
.help { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.field.has-error .input, .field.has-error .select { border-color: var(--bad); }
.field.has-error .help, .error-text { color: var(--bad); }
.form-error {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px;
  background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); font-size: 13.5px;
}
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--copper); flex: none; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
details.more > summary { cursor: pointer; color: var(--ink-2); font-size: 13px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; font-family: var(--mono); color: var(--copper-ink); }
details.more[open] > summary::before { content: "-"; }

/* segmented control */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.segmented button, .segmented a {
  border: 0; background: transparent; padding: 0 12px; height: 28px; border-radius: 6px; cursor: pointer;
  font: 550 12.5px/1 var(--font); color: var(--ink-2); display: inline-flex; align-items: center; text-decoration: none !important;
}
.segmented .active, .segmented [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* --------------------------------------------------------------------- tabs */
.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 12px 12px; margin-bottom: -1px;
  font: 550 13.5px/1 var(--font); color: var(--ink-3); background: none; border: 0; cursor: pointer;
  white-space: nowrap; text-decoration: none !important; border-bottom: 2px solid transparent;
}
.tab svg { width: 16px; height: 16px; flex: none; }
.tab:hover { color: var(--ink); }
.tab.active, .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--copper); }
.tab .count { font: 500 11px/1 var(--mono); color: var(--ink-3); background: var(--surface-2); padding: 3px 6px; border-radius: 999px; }
[data-panel][hidden] { display: none !important; }

/* ------------------------------------------------------------ empty states */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 44px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--surface-2) 55%, transparent) 10px 11px);
  color: var(--ink-2);
}
.empty .empty-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--copper); box-shadow: var(--shadow-1); margin-bottom: 6px;
}
.empty .empty-icon svg { width: 22px; height: 22px; }
.empty h3 { font-size: 15px; color: var(--ink); }
.empty p { max-width: 420px; margin: 0; font-size: 13.5px; }
.empty .btn { margin-top: 8px; }

/* ------------------------------------------------------------------ callout */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.callout > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout b, .callout strong { color: var(--ink); }
.callout-info { background: var(--info-bg); border-color: var(--info-line); color: var(--ink-2); }
.callout-info > svg { color: var(--info); }
.callout-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--ink-2); }
.callout-warn > svg { color: var(--warn); }
.callout-bad { background: var(--bad-bg); border-color: var(--bad-line); }
.callout-bad > svg { color: var(--bad); }
.callout-good { background: var(--good-bg); border-color: var(--good-line); }
.callout-good > svg { color: var(--good); }
.callout-copper { background: var(--copper-soft); border-color: var(--copper-line); }
.callout-copper > svg { color: var(--copper); }

/* ------------------------------------------------------------------- avatar */
.avatar {
  width: 28px; height: 28px; border-radius: 7px; flex: none;
  display: inline-grid; place-items: center;
  font: 650 11.5px/1 var(--font); letter-spacing: 0.02em;
  background: var(--copper-soft); color: var(--copper-ink);
}
.avatar-round { border-radius: 50%; }

/* --------------------------------------------------- score meter (fit 0-100) */
.score { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.meter { position: relative; width: 56px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--copper); }
.meter.good > span { background: var(--good); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }
.score-ring { --v: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--copper) calc(var(--v) * 1%), var(--surface-3) 0);
  font: 650 12px/1 var(--font); font-variant-numeric: tabular-nums; position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.score-ring > span { position: relative; }

/* progress bar (training, uploads) */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--copper); transition: width 0.4s ease; }
.progress.indeterminate > span { width: 35% !important; animation: bd-indet 1.3s ease-in-out infinite; }
@keyframes bd-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* ------------------------------------------------------- steps / timeline */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; padding: 10px 0; align-items: start; }
.steps li::before {
  content: ""; position: absolute; left: 11px; top: 30px; bottom: -10px; width: 2px; background: var(--line);
}
.steps li:last-child::before { display: none; }
.steps .dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--ink-3); font: 600 11px/1 var(--font);
}
.steps .done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.steps .done::before { background: var(--good-line); }
.steps .running .dot { border-color: var(--copper); background: var(--surface); box-shadow: 0 0 0 4px var(--copper-soft); }
.steps .running .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); animation: bd-pulse 1.2s ease-in-out infinite; }
.steps .failed .dot { background: var(--bad); border-color: var(--bad); color: #fff; }
/* wizard step you are on: a filled copper circle with its number (the pulsing dot is for running jobs) */
.steps .current .dot { background: var(--copper); border-color: var(--copper); color: #fff; box-shadow: 0 0 0 4px var(--copper-soft); }
.steps .current .step-title { color: var(--ink); }
.steps .step-title { font-weight: 550; font-size: 13.5px; }
.steps .step-sub { font-size: 12.5px; color: var(--ink-3); }
.steps .step-time { font: 500 11.5px/1.6 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
@keyframes bd-pulse { 50% { transform: scale(0.6); opacity: 0.6; } }

/* checklist (bid package) */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.checklist li:first-child { border-top: 0; }
.checklist input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--good); }
.checklist .src { font-size: 12px; color: var(--ink-3); }
.checklist li.is-done .item { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* ------------------------------------------------------- drop zone (upload) */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px;
  padding: 34px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--surface-2); color: var(--ink-2); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--copper-line); }
.dropzone.is-over { border-color: var(--copper); background: var(--copper-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--copper); }
.dropzone .dz-icon svg { width: 20px; height: 20px; }
.dropzone .dz-title { font-weight: 600; color: var(--ink); font-size: 14px; }
.dropzone .dz-files { font: 500 12px/1.5 var(--mono); color: var(--copper-ink); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.file-row .ext { min-width: 38px; text-align: center; font: 600 10px/1 var(--mono); padding: 6px 5px; border-radius: 5px; background: var(--good-bg); color: var(--good); }

/* ------------------------------------------------------------------ toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: calc(100vw - 40px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 10px;
  background: var(--ink); color: var(--ink-inverse); box-shadow: var(--shadow-3); font-size: 13.5px;
  animation: bd-toast-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); flex: none; }
.toast-good::before { background: #5cc48e; }
.toast-bad::before { background: #f08479; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all 0.2s; }
@keyframes bd-toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* ------------------------------------------------------------------ kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
/* when the board is wider than the page, a fade on the scrolling edge says there is more */
.kanban.is-overflowing:not(.at-end), .tabs.is-overflowing:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.kanban-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px; min-height: 200px; }
.kanban-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 600; font-size: 13px; }
.kanban-head .count { font: 500 11px/1 var(--mono); color: var(--ink-3); }
.kanban-head .sum { margin-left: auto; font: 500 11.5px/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.kanban-head::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.kanban-col[data-stage="pricing"] .kanban-head::before { background: var(--copper); }
.kanban-col[data-stage="submitted"] .kanban-head::before { background: var(--info); }
.kanban-col[data-stage="won"] .kanban-head::before { background: var(--good); }
.kanban-col[data-stage="lost"] .kanban-head::before { background: var(--bad); }
.kcard {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  box-shadow: var(--shadow-1); color: inherit; text-decoration: none !important; margin-top: 8px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.kcard:first-of-type { margin-top: 0; }
.kcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.kcard .k-title { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.kcard .k-meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.kcard .k-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin-top: 10px; font-size: 12.5px; }
.kcard .k-foot .opp-due { white-space: nowrap; }
.kcard .k-alert { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--warn); }
.kcard .k-alert .i { width: 14px; height: 14px; }
.kcard .k-next { margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.kcard .k-foot .num { font-weight: 600; }

/* ------------------------------------------------- feed list (opportunities) */
.feed { display: flex; flex-direction: column; }
.opp {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 16px 20px; border-top: 1px solid var(--line); color: inherit; text-decoration: none !important;
  transition: background 0.1s;
}
.opp:first-child { border-top: 0; }
.opp:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.opp-title { font-weight: 600; font-size: 14.5px; color: var(--ink); line-height: 1.35; }
.opp-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.opp-meta svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.opp-meta > span { display: inline-flex; align-items: center; gap: 3px; }
.opp-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.opp-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.opp-due { font: 500 12px/1 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.opp-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.reason { font-size: 12px; line-height: 1.45; color: var(--ink-2); display: inline-flex; align-items: flex-start; gap: 6px; max-width: 100%; }
.reason::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--good); }
.reason.blocker::before { background: var(--bad); }

/* ------------------------------------------------------------------- chart */
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis text, .chart text.axis { fill: var(--chart-axis); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.chart .axis-title { fill: var(--ink-3); font: 500 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.chart .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart .band { fill: var(--chart-band); stroke: none; }
.chart .series { fill: none; stroke: var(--chart-line); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .field-range { fill: var(--chart-field); }
.chart .field-strip { fill: var(--chart-field-strip); }
.chart .field-mid { stroke: var(--chart-mark); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.8; }
.chart .marker-line { stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.chart .marker { fill: var(--chart-mark); stroke: var(--surface); stroke-width: 2.5; }
.chart .label-pill { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08)); }
.legend .k-mid { width: 16px; height: 0; border-top: 2px dotted var(--chart-mark); }
.chart .label { fill: var(--ink); font: 600 12px var(--font); font-variant-numeric: tabular-nums; }
.chart .label-sub { fill: var(--ink-3); font: 500 11px var(--font); }
.chart .label-bg { fill: var(--surface); }
.chart .hover-line { stroke: var(--ink-3); stroke-width: 1; }
.chart .hover-dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% - 12px));
  background: var(--ink); color: var(--ink-inverse); padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow-2);
  font-size: 12px; line-height: 1.45; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chart-tip b { font-size: 13px; }
.chart-tip .muted { color: color-mix(in srgb, var(--ink-inverse) 65%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; flex: none; }
.legend .k-line { width: 16px; height: 2.5px; border-radius: 2px; background: var(--chart-line); }
.legend .k-band { width: 14px; height: 10px; border-radius: 3px; background: var(--chart-band); border: 1px solid color-mix(in srgb, var(--chart-line) 30%, transparent); }
.legend .k-field { width: 16px; height: 4px; border-radius: 2px; background: var(--chart-field-strip); }
.legend .k-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--chart-mark); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--copper-line); }
/* calibration / bar mini charts */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bars > span { flex: 1; background: var(--chart-line); border-radius: 4px 4px 0 0; min-height: 2px; opacity: 0.85; }
.spark { width: 100%; height: 36px; }
.spark path { fill: none; stroke: var(--chart-line); stroke-width: 1.75; }

/* ------------------------------------------------------------- misc atoms */
.tag { font: 500 11px/1 var(--mono); letter-spacing: 0.04em; color: var(--ink-3); padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); white-space: nowrap; }
.dot-sep::before { content: "\00B7"; margin: 0 6px; color: var(--ink-3); }
.copy-btn.is-copied { color: var(--good); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: bd-shimmer 1.4s linear infinite; border-radius: 6px; color: transparent !important; }
@keyframes bd-shimmer { to { background-position: -200% 0; } }
.sheet-title { /* drawing-set title block */
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12px;
}
.sheet-title > div { padding: 6px 12px; border-left: 1px solid var(--line); }
.sheet-title > div:first-child { border-left: 0; }
.sheet-title .spec { display: block; margin-bottom: 3px; font-size: 9.5px; }

/* ================================================================ marketing */
.mk { background: var(--bg); }
.mk-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.mk-nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.mk-nav.is-scrolled { border-bottom-color: var(--line); }
.mk-nav .mk-wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.mk-links { display: flex; gap: 4px; }
.mk-links a { color: var(--ink-2); font-weight: 500; font-size: 14px; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.mk-links a:hover { color: var(--ink); background: var(--surface-3); }
.mk-nav .spacer { flex: 1; }
.mk-nav .actions { display: flex; align-items: center; gap: 8px; }

.mk-hero { position: relative; padding: 76px 0 40px; overflow: hidden; }
.mk-hero::before { /* faint drawing grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
  opacity: 0.7;
}
.mk-hero > * { position: relative; }
.mk-kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: 13px; color: var(--ink-2); text-decoration: none !important;
}
.mk-kicker .badge { height: 20px; border-radius: 999px; }
.mk-h1 {
  font: 720 clamp(38px, 6.2vw, 74px)/1.0 var(--display); font-stretch: 92%;
  letter-spacing: -0.035em; margin: 22px 0 0; max-width: 980px; color: var(--ink); text-wrap: balance;
}
.mk-h1 em { font-style: normal; color: var(--copper-ink); }
.mk-lede { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 640px; margin: 22px 0 0; text-wrap: pretty; }
.mk-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; align-items: center; }
.mk-cta-note { font-size: 13px; color: var(--ink-3); }

.mk-section { padding: 96px 0; }
.mk-section-tight { padding: 64px 0; }
.mk-band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mk-ink { background: var(--navy); color: #d5dbe4; }
:root[data-theme="dark"] .mk-ink { background: #101b2c; border-block: 1px solid #22324a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mk-ink { background: #101b2c; border-block: 1px solid #22324a; } }
.mk-ink .mk-h2, .mk-ink h3 { color: #f6f1e8; }
.mk-ink .mk-sub { color: #a5b0bf; }
.mk-ink .eyebrow { color: #e7a06b; }
.mk-h2 { font: 700 clamp(28px, 3.6vw, 44px)/1.06 var(--display); font-stretch: 94%; letter-spacing: -0.03em; color: var(--ink); max-width: 760px; text-wrap: balance; }
.mk-sub { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 640px; margin-top: 16px; text-wrap: pretty; }
.mk-head { margin-bottom: 44px; }
.mk-head.center { text-align: center; }
.mk-head.center .mk-h2, .mk-head.center .mk-sub { margin-left: auto; margin-right: auto; }

/* product visual frame */
.mk-visual { margin-top: 56px; }
.frame {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-3);
  overflow: hidden;
}
.frame-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.frame-dots { display: flex; gap: 6px; }
.frame-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.frame-url { flex: 1; text-align: center; font: 500 11.5px/1 var(--mono); color: var(--ink-3); }
.frame-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.frame-main { padding: 22px 24px; border-right: 1px solid var(--line); min-width: 0; }
.frame-side { padding: 22px 24px; background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); min-width: 0; }
.frame-caption { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* quotes (problem in owners' words, not testimonials) */
.mk-footer-legal { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.legal { max-width: 720px; margin: 0 auto; padding: 56px 0 72px; }
.legal h1 { font: 650 34px/1.15 var(--display); letter-spacing: -0.02em; margin: 0 0 6px; }
.legal h2 { font: 600 18px/1.3 var(--display); margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.6; }
.legal ul { padding-left: 20px; }
.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.voice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-1); position: relative; }
.voice p { font: 550 18px/1.4 var(--display); font-stretch: 96%; letter-spacing: -0.01em; color: var(--ink); margin: 0; text-wrap: pretty; }
.voice p::before { content: "\201C"; color: var(--copper); margin-right: 2px; }
.voice p::after { content: "\201D"; color: var(--copper); }
.voice .who { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
/* pain statements, not testimonials: no quote marks, the moment named first */
.voices-plain .voice p::before, .voices-plain .voice p::after { content: none; }
.voices-plain .voice .who { margin: 0 0 10px; font: 500 11px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--copper); }

/* 3 steps */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.how-step { padding: 28px 26px 30px; border-left: 1px solid var(--line); position: relative; display: flex; flex-direction: column; }
.how-step:first-child { border-left: 0; }
.how-num { font: 500 12px/1 var(--mono); color: var(--copper-ink); letter-spacing: 0.06em; }
.how-step h3 { font: 650 20px/1.2 var(--display); letter-spacing: -0.015em; margin: 14px 0 10px; }
.how-step p { color: var(--ink-2); font-size: 14.5px; margin: 0 0 22px; }
.how-art { height: 112px; margin: auto 0 0; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.how-art svg { width: 100%; height: 100%; }

/* proof stats */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,0.12); }
.proof > div { padding: 26px 22px 6px 0; border-right: 1px solid rgba(255,255,255,0.12); margin-right: 22px; }
.proof > div:last-child { border-right: 0; margin-right: 0; }
.proof .v { font: 680 clamp(34px, 4vw, 52px)/1 var(--display); font-stretch: 92%; letter-spacing: -0.035em; color: #fff; font-variant-numeric: tabular-nums; }
.proof .l { font-size: 13.5px; color: #a5b0bf; margin-top: 10px; line-height: 1.45; }
.proof.proof-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof-note { margin-top: 28px; font-size: 13px; color: #8a96a8; max-width: 760px; }
.proof-note a { color: #e7a06b; }
.proof-pending { border: 1px dashed rgba(255,255,255,0.2); border-radius: var(--radius-lg); padding: 28px; color: #b8c1ce; }

/* states story */
.states { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.state-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; }
.state-code { font: 720 30px/1 var(--display); font-stretch: 88%; letter-spacing: -0.02em; color: var(--copper-ink); }
.state-law { font-weight: 650; font-size: 14px; color: var(--ink); }
.state-card p { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.5; }
.state-card .badge { align-self: flex-start; margin-top: auto; }

/* trust grid */
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.trust-item h3 { font: 650 16px/1.3 var(--font); margin: 14px 0 6px; }
.trust-item p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.trust-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--copper-soft); color: var(--copper-ink); border: 1px solid var(--copper-line); }
.trust-icon svg { width: 18px; height: 18px; }
.mk-ink .trust-item p { color: #a5b0bf; }
.mk-ink .trust-icon { background: rgba(231,160,107,0.12); color: #e7a06b; border-color: rgba(231,160,107,0.3); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 920px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.plan-featured { border-color: var(--ink); box-shadow: var(--shadow-3); position: relative; }
.plan-featured { overflow: hidden; }
:root[data-theme="dark"] .plan-featured { border-color: var(--copper-line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plan-featured { border-color: var(--copper-line); } }
.plan-featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--copper), var(--brass)); }
.plan-name { font: 650 15px/1 var(--font); min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 6px; }
.plan-price .amt { font: 700 52px/1 var(--display); font-stretch: 92%; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.plan-price .per { color: var(--ink-3); font-size: 14px; }
.plan-desc { color: var(--ink-2); font-size: 14.5px; min-height: 44px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; font-size: 14px; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; color: var(--ink-2); }
.plan li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--copper); }
.plan li b { color: var(--ink); font-weight: 600; }
.plan .btn { margin-top: auto; }
.plan-teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: stretch; }
.plan-mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-1); }
.plan-mini .amt { font: 700 36px/1 var(--display); font-stretch: 92%; letter-spacing: -0.03em; }
.plan-mini .per { color: var(--ink-3); font-size: 13px; }
.fine { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 28px; color: var(--ink-2); font-size: 14px; }
.fine span { display: inline-flex; align-items: center; gap: 8px; }
.fine svg { width: 16px; height: 16px; color: var(--good); }

/* compare table */
.compare { max-width: 920px; margin: 0 auto; }
.compare .table td:not(:first-child), .compare .table th:not(:first-child) { text-align: center; width: 140px; }
.compare svg { width: 16px; height: 16px; color: var(--good); vertical-align: -3px; }

/* faq */
.faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 2px; font: 600 16px/1.4 var(--font); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--copper-ink); transition: transform 0.2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 2px 22px; color: var(--ink-2); font-size: 15px; line-height: 1.65; max-width: 700px; }

/* big CTA */
.mk-final { text-align: center; padding: 88px 0; }
.mk-final .mk-h2 { margin: 0 auto; }
.mk-final .mk-cta-row { justify-content: center; }

/* footer */
.mk-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 13px; color: var(--ink-3); }
.mk-footer .mk-wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.mk-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.mk-footer a { color: var(--ink-2); }
.mk-footer p { max-width: 520px; margin: 10px 0 0; }

/* auth */
.auth { min-height: calc(100vh - 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font: 700 32px/1.1 var(--display); font-stretch: 94%; letter-spacing: -0.03em; }
.auth-card .lede { color: var(--ink-2); margin: 10px 0 28px; font-size: 15px; }
.auth-alt { margin-top: 22px; font-size: 13.5px; color: var(--ink-3); text-align: center; }
.auth-side {
  position: relative; overflow: hidden; background: var(--navy); color: #d5dbe4;
  padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 24px;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.auth-side > * { position: relative; }
.auth-side h2 { font: 650 26px/1.2 var(--display); font-stretch: 94%; letter-spacing: -0.02em; color: #f6f1e8; max-width: 440px; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 14.5px; }
.auth-side li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.auth-side li svg { width: 18px; height: 18px; color: #e7a06b; margin-top: 2px; }
.auth-side .chart { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; }

/* ===================================================== responsive (tablet) */
@media (max-width: 1100px) {
  .grid-4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > .stat:nth-child(3) { border-left: 0; }
  .stats > .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .states { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-teaser { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .plan-teaser > :last-child { grid-column: span 2; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .sidebar {
    position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(280px, 84vw); height: 100%;
    transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow-3);
  }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: rgba(5, 10, 18, 0.45); }
  .icon-btn.nav-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .search { display: none; }
  .page { padding: 20px 16px 48px; }
  .banner { padding: 9px 16px; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .frame-body { grid-template-columns: minmax(0, 1fr); }
  .frame-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .voices, .trust { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how-step { border-left: 0; border-top: 1px solid var(--line); }
  .how-step:first-child { border-top: 0; }
  .proof, .proof.proof-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof > div:nth-child(2) { border-right: 0; margin-right: 0; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .mk-links { display: none; }
}
/* ===================================================== responsive (phone) */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .stats > .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .span-2 { grid-column: auto; }
  .card { padding: 16px; border-radius: 12px; }
  .card.card-flush { padding: 0; }
  .card > .table-wrap { margin: 0 -16px -16px; }
  .card-flush > .table-wrap { margin: 0; }
  .card-foot { margin: 16px -16px -16px; padding: 12px 16px; }
  .card-flush > .card-head { padding: 14px 16px; }
  .page-head h1 { font-size: 24px; }
  .price { font-size: 36px; }
  .stat-hero .stat-value { font-size: 36px; }
  .opp { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  .opp .score-ring { display: none; }
  .opp-side { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .topbar .crumbs a, .topbar .crumbs .sep { display: none; }
  .mk-wrap { padding: 0 16px; }
  .mk-nav .mk-wrap { gap: 12px; }
  .mk-nav .actions .btn-ghost:not(.mk-login) { display: none; }
  .mk-nav .actions { gap: 4px; }
  .mk-nav .actions .mk-login { padding-inline: 8px; }
  .mk-hero { padding: 44px 0 24px; }
  .mk-section { padding: 64px 0; }
  .mk-head { margin-bottom: 28px; }
  .mk-cta-row .btn { flex: 1 1 auto; }
  .frame-main, .frame-side { padding: 16px; }
  .frame-url { display: none; }
  .states { grid-template-columns: minmax(0, 1fr); }
  .proof, .proof.proof-3 { grid-template-columns: minmax(0, 1fr); }
  .proof > div { border-right: 0; margin-right: 0; border-bottom: 1px solid rgba(255,255,255,0.12); padding: 20px 0; }
  .plan-teaser { grid-template-columns: minmax(0, 1fr); }
  .plan-teaser > :last-child { grid-column: auto; }
  .plan { padding: 22px; }
  .plan-price .amt { font-size: 44px; }
  .compare .table td:not(:first-child), .compare .table th:not(:first-child) { width: 76px; }
  .auth-form { padding: 32px 16px; align-items: flex-start; }
  .kanban { grid-auto-columns: minmax(250px, 84vw); }
  .toasts { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .toast { min-width: 0; max-width: none; }
  .sheet-title { grid-template-columns: repeat(2, auto); }
  .sheet-title > div:nth-child(3) { border-left: 0; }
  .sheet-title > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .sidebar, .topbar, .toasts, .mk-nav { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ------------------------------------------------------------------ app integration
   Classes the live app uses beyond the kit vocabulary (integrator, Oct 2026). Tokens only. */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sidebar .logout { margin: 4px 0 0; }
.sidebar .logout .nav-item { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 500; font-size: 13.5px; text-align: left; }
.search { margin: 0; }
.flash { margin-bottom: 16px; }
.inline { display: inline; margin: 0; }
.inline-form { flex-wrap: nowrap; }
.input-sm, .select-sm { height: 32px; font-size: 13px; padding-top: 0; padding-bottom: 0; }
.select-sm { padding-right: 28px; }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.small { font-size: 12.5px; }
.mb-0 { margin-bottom: 0 !important; }
.center { text-align: center; }
.help-error { color: var(--bad); }
.form-card { max-width: 860px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.fieldset > * + * { margin-top: 16px; }
.fieldset > legend + * { margin-top: 0; }
.fieldset > .help { margin-top: 6px; }
.fieldset > legend { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-ink); margin-bottom: 12px; padding: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 14px; padding: 4px 0; }
.check-grid.states { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.danger-zone summary { color: var(--bad); cursor: pointer; }
.danger-zone { color: var(--ink-2); }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.notes { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.basis-card details > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.basis-card details > summary::-webkit-details-marker { display: none; }
.basis-card details > summary h3::after { content: " +"; color: var(--ink-3); font-weight: 400; }
.basis-card details[open] > summary h3::after { content: " \2212"; }
.problems { max-height: 320px; overflow: auto; margin: 8px 0 0; padding-left: 18px; }
.job-log { max-height: 220px; overflow: auto; white-space: pre-wrap; margin: 8px 0 0; font-size: 12px; }
.job-error pre { margin: 0; background: transparent; border: 0; padding: 0; white-space: pre-wrap; }

/* feed */
.feed .opp-main { min-width: 0; }
.opp-title a { color: inherit; }
.opp-title a:hover { color: var(--copper-ink); }
.opp-side form { margin: 0; }
.score-ring.is-low { color: var(--ink-3); }
.filters { gap: 12px; }
.filter-fields { flex-wrap: wrap; }
.filter-fields .input { width: 220px; }

/* bid workspace */
.bid-head h1 { overflow-wrap: anywhere; }
.bid-tags .badge svg { width: 12px; height: 12px; }
.head-actions { align-items: center; }
.sheet-title > div { overflow-wrap: anywhere; }
dl.brief { display: block; margin: 0; padding: 0; border: 0; }
dl.brief .kv-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
dl.brief .kv-row:first-child { border-top: 0; }
dl.brief dt { color: var(--ink-2); margin: 0; }
dl.brief dd { margin: 0; color: var(--ink); }
details.cite { margin-top: 4px; }
details.cite summary { cursor: pointer; list-style: none; display: inline-flex; gap: 4px; }
details.cite summary::-webkit-details-marker { display: none; }
details.cite summary::before { content: "\201C"; font-weight: 700; color: var(--copper); }
details.cite blockquote { margin: 6px 0 0; padding: 8px 12px; border-left: 2px solid var(--copper-line); background: var(--surface-2); border-radius: 0 6px 6px 0; color: var(--ink-2); }
.risk-list, .form-list, .doc-list { list-style: none; margin: 0; padding: 0; }
.risk-list li, .doc-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.risk-list li:first-child, .doc-list li:first-child { border-top: 0; }
.risk-list .badge { text-transform: capitalize; margin-right: 6px; }
.form-list li { padding: 6px 0; }
.doc-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-list form { margin-left: auto; }
.upload-form { margin-top: 12px; }
.upload-form .dropzone { padding: 18px; }
.checklist li label { cursor: pointer; }
.checklist li.is-done .item { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.field-card .kv .v { white-space: nowrap; }
.price-form details summary, .cost-model-inputs summary { cursor: pointer; color: var(--ink-2); }
.save-form .row { gap: 8px; }
.alts td:first-child { white-space: nowrap; }
.compare-chart { margin: 12px 0 0; }

/* server-rendered charts (bidesk/web/charts.py): the compare chart and calibration bars */
.chart-svg { width: 100%; height: auto; display: block; font: 500 11px/1 var(--mono); }
.chart-svg .c-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-svg .c-axis { stroke: var(--chart-axis); stroke-width: 1; }
.chart-svg .c-tick, .chart-svg .c-axis-title { fill: var(--ink-3); }
.chart-svg .c-line, .chart-svg .c-market { fill: none; stroke: var(--chart-line); stroke-width: 2.2; }
.chart-svg .c-firm { fill: none; stroke: var(--copper); stroke-width: 2.2; }
.chart-svg .c-cost-model { fill: none; stroke: var(--good); stroke-width: 2; stroke-dasharray: 6 4; }
.chart-svg .c-band, .chart-svg .c-market-band { fill: var(--chart-band); stroke: none; }
.chart-svg .c-firm-band { fill: var(--copper-soft); stroke: none; }
.chart-svg .c-cost { stroke: var(--bad); stroke-width: 1.4; stroke-dasharray: 3 3; }
.chart-svg .c-cost-lbl { fill: var(--bad); }
.chart-svg .c-our { stroke: var(--info); stroke-width: 1.6; }
.chart-svg .c-rec { fill: var(--chart-mark); stroke: var(--surface); stroke-width: 2; }
.chart-svg .c-rec-lbl { fill: var(--copper-ink); font-weight: 600; }
.chart-svg .c-bar { fill: var(--chart-band); stroke: var(--chart-line); stroke-width: 1; }
.chart-svg .c-hov { fill: transparent; }
.chart-lg { display: block; }
.chart-sm { display: none; }
@media (max-width: 640px) { .chart-lg { display: none; } .chart-sm { display: block; } }
.lg { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--chart-line); }
.lg-firm { background: var(--copper); }
.lg-cost-model { background: var(--good); }
.lg-band { height: 9px; background: var(--chart-band); }
.lg-cost { background: var(--bad); }
.lg-rec { width: 9px; height: 9px; border-radius: 50%; background: var(--chart-mark); }
.legend > span { display: inline-flex; align-items: center; margin-right: 14px; }

/* public pages (auth flow, onboarding, errors) */
.public-page { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.public-page.narrow { max-width: 520px; }
.onboarding h1 { font: 700 30px/1.15 var(--display); letter-spacing: -0.01em; margin: 0; }
.onboarding .lede { color: var(--ink-2); margin: 8px 0 20px; }
.steps-inline { display: flex; gap: 18px; flex-wrap: wrap; }
.steps-inline li { grid-template-columns: 24px auto; padding: 0; }
.steps-inline li::before { display: none; }
.auth .magic summary { cursor: pointer; color: var(--ink-2); }
.dev-magic-link { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  dl.brief .kv-row { grid-template-columns: 1fr; gap: 4px; }
  .filter-fields .input { width: 100%; }
}
@media (max-width: 640px) {
  .head-actions { width: 100%; }
  .opp-side .btn { white-space: nowrap; }
}
.card-flush > .card-foot { margin: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.rec-mobile { display: none; }
@media (max-width: 1100px) {
  .rec-mobile { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
  .rec-mobile .price { font-size: 34px; }
}

/* -------------------------------------------------------------------- notice watch (bid workspace) */
.watch-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.watch-strip .watch-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.watch-strip .watch-dates .badge .i { width: 13px; height: 13px; }
.watch-strip .watch-state { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.watch-strip .watch-state > .i { width: 14px; height: 14px; }
.notice-changes .notice-list { margin: 6px 0 10px; padding-left: 18px; }
.notice-changes .notice-list li + li { margin-top: 4px; }

/* -------------------------------------------------------------------- model page: plain lead + technical */
.grid-top { align-items: start; }
.plain-lead .plain-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.plain-lead .plain-big { font-size: 19px; line-height: 1.5; color: var(--ink); margin: 0 0 10px; letter-spacing: -0.01em; }
.plain-lead .plain-big b { color: var(--copper-ink); font-weight: 650; }
.sets-list { list-style: none; margin: 0 0 12px; padding: 0; }
.sets-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sets-list li:first-child { border-top: 0; }
details.tech { border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--surface); }
details.tech > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
details.tech > summary::-webkit-details-marker { display: none; }
details.tech > summary > span:first-child { display: flex; flex-direction: column; gap: 2px; }
details.tech > summary b { font-size: 16px; }
details.tech > summary b::after { content: " +"; font-family: var(--mono); color: var(--copper-ink); }
details.tech[open] > summary b::after { content: " -"; }
details.tech > .tech-body { padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 860px) {
  .plain-lead .plain-grid { grid-template-columns: minmax(0, 1fr); }
  .sets-list li { flex-direction: column; align-items: flex-start; }
}
.card-pad { padding: 12px 16px 0; margin: 0; }
