/* GreenPT web UI. No inline styles anywhere: every visual comes from here. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ----------
   Values from GreenPT's account webapp and chat shell (apps/user-webapp/src/app/globals.css in
   greenpt-api-proxy): one design across GreenPT. */
:root {
  color-scheme: light;
  --c-page: #f5f6f1;          /* account-bg-page = chat-bg */
  --c-panel: #eceee7;         /* account-sidebar = chat-sidebar */
  --c-raised: #e7e9e1;        /* panel-3: hover fills, inline panels */
  --c-raised-hover: #dee0d6;
  --c-surface: #ffffff;
  --c-inset: #f6f8f5;
  --c-hover: #fafbf9;
  --c-table-head: #fafbf7;
  --c-line: #e6e7e2;          /* border-card */
  --c-line-2: #e2e4dc;        /* border-strong */
  --c-line-3: #edeee9;        /* border-inner */
  --c-line-4: #f2f3ee;        /* border-row */
  --c-edge: #d5d8cd;          /* border-3 */
  --c-control: #868b80;       /* 3:1 on white, for input and checkbox edges */
  --c-ink: #232323;
  --c-ink-hover: #000000;
  --c-on-ink: #ffffff;
  --c-body: #3a3d36;
  --c-serif: #6b6b6b;         /* intro lines */
  --c-muted: #5a5d55;         /* account secondary: small text */
  --c-faint: #8a8f88;         /* decoration and large text only (3.3:1) */
  --c-label: #656b63;         /* sidebar group labels */
  --c-header-bg: rgba(236, 238, 231, 0.85);
  --c-green: #3bc971;
  --c-green-hover: #34b865;
  --c-green-active: #2fa95c;
  --c-green-ink: #0f2a1c;
  --c-green-deep: #1a7f64;    /* account-link: icons, bars, kickers */
  --c-green-text: #13694f;    /* links and small text: 4.5:1 on every surface */
  --c-green-hover-text: #0f5c48;
  --c-green-tint: rgba(59, 201, 113, 0.15);
  --c-dark: #16241c;
  --c-dark-ink: #f0f3ee;
  --c-dark-sub: #d7eade;
  --c-dark-accent: #6fd39a;
  --c-danger: #c0463f;
  --c-danger-text: #a63a34;
  --c-danger-bg: #fbeceb;
  --c-warn: #b7791f;
  --c-warn-text: #8a6d3b;
  --c-warn-bg: #fff7ed;
  --c-warn-border: #f4d9b0;
  --c-ok-bg: #e9f7ef;
  --c-policy: #a9dfc0;
  --ring: 0 0 0 3px rgba(59, 201, 113, 0.3);

  --font-sans: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;

  --r-card: 1rem;             /* account-card */
  --r-ctl: 0.5625rem;         /* rounded-md at --radius 0.6875rem */
  --r-ctl-lg: 0.625rem;       /* fields, segmented controls */
  --r-pill: 62.5rem;

  --header-h: 3.25rem;        /* 52px header */
  --aside-w: 16.25rem;
  --sidebar-w: 15.625rem;     /* 250px */
  --sidebar-w-icon: 3.75rem;  /* 60px collapsed */
  --row-h: 2.5rem;
  --container-w: 77.5rem;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.875rem;
  --fs-base: 0.9375rem;
  --fs-lg: 1.0625rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-feature-settings: "calt" 0;  /* agent and deployment names: keep "45x6" an x, not × */
  margin: 0;
  min-height: 100vh;
  background: var(--c-page);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--c-green-text); text-underline-offset: 0.15em; }
* { scrollbar-width: thin; scrollbar-color: var(--c-line) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb { background-color: var(--c-line); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--c-faint); }
a:hover { color: var(--c-green-hover-text); }
code, pre { font-family: var(--font-mono); font-variant-ligatures: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 2px;
}

[tabindex="-1"]:focus-visible { outline: 0; box-shadow: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: var(--s-3);
  top: var(--s-3);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-ctl);
  background: var(--c-ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; }

/* ---------- Type ---------- */
.eyebrow, .kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green-deep);
}
.h1 {
  font-size: 2.125rem;        /* account-title */
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h1-lg { font-size: 2.25rem; }
.lede { font-size: var(--fs-base); line-height: 1.55; color: var(--c-serif); max-width: 58ch; text-wrap: pretty; }
.section-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-label);
}
.card-title { font-size: var(--fs-md); font-weight: 600; line-height: 1.4; }
.card-title-lg { font-size: var(--fs-base); font-weight: 600; line-height: 1.4; }
.text-sm { font-size: var(--fs-sm); line-height: 1.45; color: var(--c-body); }
.text-md { font-size: var(--fs-md); line-height: 1.5; color: var(--c-body); }
.text-muted { color: var(--c-muted); }
.text-ok { color: var(--c-green-text); font-weight: 600; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.h1-md { font-size: 1.5rem; }
.text-md-strong { font-size: var(--fs-md); font-weight: 600; line-height: 1.4; }
.stat { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.grow { flex: 1 1 auto; min-width: 0; }
.notice {
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--c-edge);
  border-radius: var(--r-ctl-lg);
  background: var(--c-inset);
  font-size: var(--fs-md);
  color: var(--c-body);
}

.page-head { display: flex; flex-direction: column; gap: 0.625rem; }

/* ---------- Buttons (shadcn Button with GreenPT tokens; the primary action is near-black, green is an accent) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 2.25rem;
  padding: 0 var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:focus-visible { outline: 0; border-color: var(--c-green); box-shadow: var(--ring); }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn-sm { height: 2rem; gap: 0.375rem; padding: 0 var(--s-3); }
.btn-lg { height: 2.5rem; padding: 0 var(--s-6); }
.btn-xl { height: 3.25rem; padding: 0 var(--s-6); border-radius: 0.9375rem; font-size: var(--fs-base); font-weight: 600; }
.btn-primary { background: var(--c-ink); color: var(--c-on-ink); }
.btn-primary:hover { background: var(--c-ink-hover); color: var(--c-on-ink); }
.btn-outline { background: var(--c-surface); border-color: var(--c-line); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.btn-outline:hover { background: var(--c-raised); color: var(--c-green-deep); }
.btn-xl.btn-outline { border-color: #d7dad2; box-shadow: none; }
.btn-secondary { background: var(--c-inset); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.btn-secondary:hover { background: var(--c-raised); color: var(--c-ink); }
.btn-ghost { background: transparent; color: var(--c-ink); }
.btn-ghost:hover { background: var(--c-raised); color: var(--c-green-deep); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--c-on-ink);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-outline.is-loading::after, .btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--c-ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 0.125rem var(--s-2);
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1rem;
  white-space: nowrap;
}
.badge-exact { background: var(--c-green); color: var(--c-green-ink); }
.badge-zone { background: var(--c-inset); border-color: var(--c-line-3); color: var(--c-ink); }
.badge-policy { background: var(--c-green-tint); color: var(--c-green-text); }
.badge-estimate { background: transparent; border-color: var(--c-line); color: var(--c-ink); }

/* ---------- Cards (account-card) ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: 1.375rem var(--s-6);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  background: var(--c-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.card-loose { gap: var(--s-4); }
.card-flush { padding: 0; gap: 0; overflow: hidden; }
.card-row { flex-direction: row; gap: var(--s-4); align-items: flex-start; }
.card-gap { gap: var(--s-3); }
.card-after { margin-top: auto; }
.card-result { flex-direction: row; align-items: flex-start; gap: 0.875rem; scroll-margin-top: 5rem; }
.result-icon { flex-shrink: 0; width: 1.375rem; height: 1.375rem; color: var(--c-dark-accent); }
.card-rows { padding: var(--s-1) var(--s-6); gap: 0; }
.card-current { border: 2px solid var(--c-ink); }
/* account-dark-card */
.card-dark {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-6) 1.625rem 1.25rem;
  border-radius: 1.125rem;
  background:
    radial-gradient(120% 90% at 90% 0%, rgba(59, 201, 113, 0.22), transparent 55%),
    radial-gradient(80% 80% at 0% 100%, rgba(26, 127, 100, 0.3), transparent 60%),
    var(--c-dark);
  color: var(--c-dark-ink);
  overflow: hidden;
}
.card-dark .section-label, .card-dark .kicker { color: var(--c-dark-accent); }
.card-dark .text-sm,
.card-dark .text-md { color: var(--c-dark-sub); }
.card-dark a:not(.btn) { color: var(--c-dark-sub); font-weight: 600; }
.card-dark a:not(.btn):hover { color: #fff; }
.card-dark-title { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.stack { display: flex; flex-direction: column; gap: var(--s-6); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-xs { display: flex; flex-direction: column; gap: 0.125rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s-3); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }  /* 4, then 2 × 2, never 3 + 1 */

/* Key/value and list rows inside a card */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  min-height: 4rem;
  padding: 0.625rem 0;
  border-top: 1px solid var(--c-line-4);
}
.row:first-child { border-top: 0; }
.row-sm { min-height: 3rem; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.125rem; text-align: right; }
.row-value { font-size: var(--fs-base); font-weight: 600; }
.card-rows > .section-label { display: flex; align-items: center; min-height: 2.5rem; }

/* Bulleted help lists */
.bullets { display: flex; flex-direction: column; gap: var(--s-2); }
.bullets li {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--c-body);
}
.bullets li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 0.3125rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--c-green);
}
.bullets-never li::before { background: var(--c-danger); }

/* Numbered dots */
.num-dot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--c-line-2);
  color: var(--c-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
}
.num-dot-lg { width: 1.75rem; height: 1.75rem; font-size: var(--fs-sm); }
.num-dot-done { background: var(--c-green); color: var(--c-green-ink); }
.num-dot-current { background: var(--c-ink); color: #fff; }
.num-dot-accent { background: var(--c-green); color: var(--c-green-ink); }
.num-dot svg { width: 0.875rem; height: 0.875rem; }
.num-dot-lg svg { width: 1rem; height: 1rem; }
.dark-item { display: flex; gap: var(--s-3); align-items: flex-start; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.label { font-size: var(--fs-md); font-weight: 600; }
.hint { font-size: var(--fs-sm); color: var(--c-muted); }
.input, .select {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.8125rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-ctl-lg);
  background: var(--c-surface);
  font-size: var(--fs-md);
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--c-faint); opacity: 1; }
.input:focus-visible, .select:focus-visible { outline: 0; border-color: var(--c-green); box-shadow: 0 0 0 3px rgba(59, 201, 113, 0.14); }
.input:disabled, .select:disabled {
  background: #f4f5f0;
  color: var(--c-muted);
  cursor: not-allowed;
}
.input[aria-invalid="true"] { border-color: var(--c-danger); }
.select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235a5d55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8125rem center; }
.select-sm { height: 2rem; width: auto; font-size: var(--fs-sm); }
.check {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-md);
  line-height: 1.4;
}
.check input {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--c-ink);
  cursor: pointer;
}
.check input:disabled { cursor: not-allowed; }
.check-card { padding: var(--s-4) var(--s-5); border: 1px solid var(--c-line); border-radius: var(--r-card); background: var(--c-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); }
.form-error,
.flash-error {
  padding: var(--s-3) var(--s-4);
  border: 1px solid #f1cfcc;
  border-radius: var(--r-ctl-lg);
  background: var(--c-danger-bg);
  color: var(--c-danger-text);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.flash-ok {
  padding: var(--s-3) var(--s-4);
  border: 1px solid #cdeedb;
  border-radius: var(--r-ctl-lg);
  background: var(--c-ok-bg);
  color: var(--c-green-hover-text);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.flashes { display: flex; flex-direction: column; gap: var(--s-2); }
.flashes:empty { display: none; }

/* Radio cards */
.radio-cards { display: flex; flex-direction: column; gap: var(--s-3); border: 0; margin: 0; padding: 0; min-width: 0; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 4.75rem;
  padding: var(--s-3) var(--s-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  background: var(--c-surface);
  cursor: pointer;
  transition: background 0.12s;
}
.radio-card:hover { background: var(--c-hover); }
.radio-card:has(input:checked) { border: 2px solid var(--c-ink); padding: calc(var(--s-3) - 1px) calc(var(--s-5) - 1px); }
.radio-card:has(input:focus-visible) { box-shadow: var(--ring); }
.radio-card input { flex-shrink: 0; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--c-ink); }
.radio-card input:focus-visible { outline: 0; box-shadow: none; }
.radio-card-body { display: flex; flex-direction: column; gap: var(--s-1); flex: 1 1 auto; min-width: 0; }
.radio-card-name { font-size: var(--fs-base); font-weight: 600; overflow-wrap: anywhere; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-6);
  border: 1px dashed var(--c-control);
  border-radius: var(--r-card);
  background: var(--c-surface);
}
.empty-title { font-size: var(--fs-lg); font-weight: 600; }

/* ---------- Copy rows and code ---------- */
.copy-row { display: flex; align-items: center; gap: var(--s-3); }
.copy-row-label { flex: 0 0 7rem; font-size: var(--fs-sm); font-weight: 600; color: var(--c-body); }
.copy-row .btn { flex-shrink: 0; }
.mono-box {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 var(--s-3);
  border: 1px solid var(--c-line-3);
  border-radius: var(--r-ctl);
  background: var(--c-inset);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--c-ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mono-box > span { overflow: hidden; text-overflow: ellipsis; }
.code-block {
  display: block;
  margin: 0;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--c-line-3);
  border-radius: var(--r-ctl);
  background: var(--c-inset);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--c-ink);
  overflow-x: auto;
  white-space: pre;
}
.quote {
  padding: 0.875rem var(--s-4);
  border: 1px solid var(--c-line-3);
  border-radius: var(--r-ctl-lg);
  background: var(--c-inset);
  font-size: var(--fs-md);
  line-height: 1.55;
}
.bubble {
  min-height: 8.25rem;
  padding: 0.875rem var(--s-4);
  border: 1px solid var(--c-line-3);
  border-radius: var(--r-card) var(--r-card) var(--r-card) var(--s-1);
  background: var(--c-inset);
  font-size: var(--fs-md);
  line-height: 1.55;
}

/* ---------- Tables ---------- */
.table-scroll {
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  background: var(--c-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  overflow-x: auto;
}
.table-fit.table { min-width: 0; }
.table { min-width: 36rem; font-size: var(--fs-md); text-align: left; }
.table th {
  height: 2.5rem;
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--c-line-3);
  background: var(--c-table-head);
  font-size: 0.78125rem;
  font-weight: 500;
  color: var(--c-muted);
  white-space: nowrap;
}
.table td { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--c-line-4); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: var(--c-hover); }
.table th.cell-head {
  border-top: 1px solid var(--c-line-4);
  border-bottom: 0;
  font-size: inherit;
  background: transparent;
  font-weight: inherit;
  color: inherit;
  white-space: normal;
}
.table tbody tr:first-child th.cell-head { border-top: 0; }
.table th.num, .table td.num { text-align: right; }
.cell-main { font-weight: 600; }
.cell-sub { display: block; font-size: var(--fs-sm); color: var(--c-muted); }

/* ---------- Status dots ---------- */
.dot {
  flex-shrink: 0;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--c-edge);
}
.dot-ready, [data-state="ok"] > .dot { background: var(--c-green); }
.dot-partial { background: var(--c-warn); }
.dot-missing, [data-state="waiting"] > .dot { background: var(--c-edge); }
[data-state="failed"] > .dot { background: var(--c-danger); }
.state-ready, [data-state="ok"] .check-state { color: var(--c-green-text); }
.state-partial { color: var(--c-warn-text); }
.state-missing, [data-state="waiting"] .check-state { color: var(--c-muted); }
[data-state="failed"] .check-state { color: var(--c-danger-text); }

.checks-list { display: flex; flex-direction: column; }
.check-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--row-h);
  padding: var(--s-2) 0;
  border-top: 1px solid var(--c-line-4);
}
.check-row-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-md); }
.check-message { font-size: var(--fs-sm); color: var(--c-muted); }
.check-message:empty { display: none; }
.check-state { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }

.agent-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 4rem;
  padding: var(--s-2) 0;
  border-top: 1px solid var(--c-line-4);
  flex-wrap: wrap;
}
.agent-row:first-of-type { border-top: 0; }
.agent-row-main { flex: 1 1 12rem; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.agent-row-state { flex: 0 0 5.5rem; text-align: right; font-size: var(--fs-sm); font-weight: 600; }

/* ---------- Dashboard ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  gap: 0;
}
.kpi { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.125rem 1.375rem; border-left: 1px solid var(--c-line-3); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi-label { font-size: 0.78125rem; font-weight: 500; color: var(--c-muted); }
.kpi-value { font-family: var(--font-mono); font-size: 1.625rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.kpi-note { font-size: var(--fs-xs); color: var(--c-muted); }
.mix-bar { display: flex; gap: 2px; height: 0.875rem; border-radius: 0.4375rem; overflow: hidden; background: var(--c-line-4); }
.mix-seg { display: block; height: 100%; min-width: 0; }
.mix-seg-exact { background: var(--c-green-deep); }
.mix-seg-zone { background: var(--c-green); }
.mix-seg-policy { background: var(--c-policy); }
.mix-seg-estimate { background: var(--c-edge); }
.mix-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); color: var(--c-body); }
.mix-legend li { display: inline-flex; align-items: center; gap: 0.375rem; }
.swatch { width: 0.625rem; height: 0.625rem; border-radius: 2px; border: 1px solid transparent; }
.swatch-exact { background: var(--c-green-deep); }
.swatch-zone { background: var(--c-green); }
.swatch-policy { background: var(--c-policy); border-color: var(--c-green-deep); }
.swatch-estimate { background: var(--c-edge); border-color: #b4b8ac; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18.75rem; gap: var(--s-4); align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.decision {
  display: grid;
  grid-template-columns: 6.25rem 9.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.875rem;
  min-height: 3rem;
  padding: var(--s-2) 0;
  border-top: 1px solid var(--c-line-4);
  font-size: var(--fs-md);
}
.decision-time { white-space: nowrap; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--c-muted); }
.decision-agent { font-weight: 600; overflow-wrap: anywhere; }
.decision-text { color: var(--c-body); }
.todo { min-height: 8.25rem; gap: 0.375rem; padding: 1.125rem var(--s-5); }
.todo-link { margin-top: auto; font-size: var(--fs-sm); font-weight: 600; }
.month-form { display: flex; align-items: center; gap: var(--s-2); }

/* ---------- Rules and members ---------- */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--s-4); }
.invite-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: var(--s-3); align-items: end; }

/* ---------- Public / sign-in pages (account login) ---------- */
.public-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 4.5rem; padding: 0 2.5rem; }
.public-main { width: 100%; max-width: 67.5rem; margin: 0 auto; padding: 2.5rem var(--s-6) 4rem; display: flex; flex-direction: column; gap: 2.5rem; }
.center-wrap { min-height: calc(100vh - 4.5rem); display: flex; align-items: center; justify-content: center; padding: var(--s-8) 1.25rem 6rem; }
.center-wrap-full { min-height: 100vh; }
.center-card { width: 100%; max-width: 23.75rem; display: flex; flex-direction: column; }
.center-card .kicker { margin-bottom: var(--s-3); }
.center-card .h1 { font-size: 1.8125rem; line-height: 1.5; letter-spacing: -0.025em; }
.center-card .lede { margin: var(--s-2) 0 2.125rem; font-size: 0.96875rem; line-height: 1.55; }
.center-card .notice, .center-card .flashes { margin-bottom: var(--s-4); }
.center-actions { display: flex; flex-direction: column; gap: var(--s-3); }
.center-actions .btn { width: 100%; }
.center-foot { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--c-muted); }
.error-code { font-size: 3rem; line-height: 1; font-weight: 600; letter-spacing: -0.02em; color: var(--c-green-text); }
.flow-dark { background: var(--c-dark); color: var(--c-dark-ink); border-color: var(--c-dark); }
.flow-dark .section-label { color: var(--c-dark-accent); }
.flow-dark .text-sm { color: var(--c-dark-sub); }
.how-split { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: stretch; }
.how-split > * { flex: 1 1 22rem; min-width: 0; }
.how-split .card-dark { padding: 1.375rem; border-radius: 0.875rem; }

.logo { width: 6.75rem; height: auto; }
.logo-sm { width: 6rem; }

/* ---------- Header (onboarding + public) ---------- */
.bar-right { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-4); }
.bar-text { font-size: var(--fs-sm); color: var(--c-muted); overflow-wrap: anywhere; }
.bar-link { font-size: var(--fs-sm); font-weight: 600; }

/* ---------- Onboarding shell (account onboarding: white header, step counter, progress bar) ---------- */
.ob { min-height: 100vh; display: flex; flex-direction: column; }
.ob-header { position: sticky; top: 0; z-index: 20; background: var(--c-surface); }
.ob-header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 2.5rem; }
.ob-header .logo { width: auto; height: 1.75rem; }
.ob-count { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; color: var(--c-muted); white-space: nowrap; }
.ob-progress { height: 3px; background: var(--c-line-3); }
.ob-progress-bar { display: block; height: 100%; background: var(--c-green); transition: width 0.7s ease-in-out; }
.ob-body {
  flex-grow: 1;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.5rem var(--s-6) 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-w);
  grid-template-areas: "main aside";
  gap: 2.5rem;
  align-items: start;
}
.ob-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: var(--s-6); }
.ob-aside { grid-area: aside; display: flex; flex-direction: column; gap: var(--s-4); }
.ob .h1 { font-size: 1.625rem; line-height: 1.25; }
.ob .lede { font-size: 0.90625rem; line-height: 1.5; }
.ob-steps { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-sm); }
.ob-steps a, .ob-steps span { color: var(--c-muted); text-decoration: none; white-space: nowrap; }
.ob-steps a:hover { color: var(--c-ink); }
.ob-steps [aria-current="step"] { color: var(--c-ink); font-weight: 600; }
.ob-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-line-2);
}

/* ---------- App shell: the GreenPT account sidebar and header ---------- */
.app { min-height: 100vh; display: flex; }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-panel);
  border-right: 1px solid var(--c-line-2);
  transition: width 0.2s ease, flex-basis 0.2s ease;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); height: 3.5rem; padding: 0 var(--s-2); }
.app-switch { display: flex; align-items: center; gap: var(--s-2); min-width: 0; height: 2.25rem; padding: 0 0.375rem; border-radius: 0.5rem; color: var(--c-ink); text-decoration: none; }
.app-switch:hover { background: var(--c-raised); color: var(--c-ink); }
.app-switch .logo { flex-shrink: 0; width: 6rem; height: auto; }
.app-pill { padding: 0.125rem 0.375rem; border-radius: 5px; background: rgba(26, 127, 100, 0.12); color: var(--c-green-text); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 0.5rem; background: transparent; color: var(--c-muted); cursor: pointer; transition: background 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--c-raised); color: var(--c-ink); }
.icon-btn svg { width: 1rem; height: 1rem; }
.sidebar-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 var(--s-2); }
.nav-group { padding: var(--s-1) 0; }
.nav-group-label { display: block; padding: var(--s-3) 0.625rem var(--s-1); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-label); white-space: nowrap; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: var(--s-2) 0.625rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--c-muted);
  font-size: 0.84375rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.nav-item svg { flex-shrink: 0; width: 17px; height: 17px; stroke: currentColor; }
.nav-item:hover { background: var(--c-raised); color: var(--c-ink); }
.nav-item[aria-current="page"] { background: var(--c-surface); color: var(--c-ink); font-weight: 600; }
.nav-text { overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-1) var(--s-3) var(--s-3); }
.help-links { padding-top: var(--s-2); border-top: 1px solid var(--c-line-3); }
.profile { position: relative; display: flex; align-items: center; gap: 0.625rem; padding-top: var(--s-3); border-top: 1px solid var(--c-line-2); }
.initials { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--c-green-tint); color: var(--c-green-text); font-size: 0.78125rem; font-weight: 600; }
.profile-text { flex: 1 1 auto; min-width: 0; }
.profile-name { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-sub { font-size: var(--fs-xs); color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary.icon-btn { width: 1.75rem; height: 1.75rem; border-radius: 7px; }
.menu-panel { position: absolute; bottom: 0; left: calc(100% + 0.75rem); z-index: 40; min-width: 12.5rem; padding: var(--s-1); border: 1px solid var(--c-line); border-radius: var(--r-ctl-lg); background: var(--c-surface); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
.menu-item { display: flex; align-items: center; gap: var(--s-2); width: 100%; padding: 0.375rem var(--s-2); border: 0; border-radius: 0.375rem; background: none; color: var(--c-ink); font: inherit; font-size: var(--fs-md); text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--c-raised); color: var(--c-ink); }
.menu-item svg { width: 1rem; height: 1rem; color: var(--c-muted); }
.menu-sep { height: 1px; margin: var(--s-1) calc(-1 * var(--s-1)); background: var(--c-line-3); }
.signout-form { margin: 0; }
.sidebar-backdrop { display: none; }
/* Collapsed to icons (the toggle in the sidebar head). */
.app[data-sidebar="collapsed"] .sidebar { flex-basis: var(--sidebar-w-icon); width: var(--sidebar-w-icon); }
.app[data-sidebar="collapsed"] .sidebar-head { justify-content: center; }
.app[data-sidebar="collapsed"] .app-switch,
.app[data-sidebar="collapsed"] .nav-group-label,
.app[data-sidebar="collapsed"] .nav-text,
.app[data-sidebar="collapsed"] .profile-text,
.app[data-sidebar="collapsed"] .profile .menu { display: none; }
.app[data-sidebar="collapsed"] .sidebar-content { padding: 0 0.875rem; }
.app[data-sidebar="collapsed"] .sidebar-foot { padding: var(--s-1) 0.875rem var(--s-3); }
.app[data-sidebar="collapsed"] .nav-item { justify-content: center; width: 2rem; padding: var(--s-2); }

.app-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  height: var(--header-h);
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--c-line-2);
  background: var(--c-header-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.topbar-start { display: flex; align-items: center; gap: var(--s-1); min-width: 0; }
.sidebar-trigger { display: none; width: 1.875rem; height: 1.875rem; }
.crumbs { display: flex; align-items: center; gap: 0.375rem; min-width: 0; margin-left: var(--s-1); font-size: var(--fs-sm); }
.crumb-cat { font-weight: 500; color: var(--c-muted); text-decoration: none; white-space: nowrap; }
.crumb-cat:hover { color: var(--c-ink); }
.crumb-sep { flex-shrink: 0; width: 0.875rem; height: 0.875rem; color: var(--c-faint); }
.crumb-here { font-weight: 600; color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); }
.topbar-actions .btn { height: 1.875rem; border-radius: 0.5rem; font-size: var(--fs-sm); }
.page { width: 100%; max-width: 60rem; padding: 2.5rem 2.5rem 5rem; display: flex; flex-direction: column; gap: var(--s-6); animation: fade-up 220ms ease-out; }
.page-wide { max-width: 70rem; }
.page-head { display: flex; flex-direction: column; gap: var(--s-2); }
.page-head-row { gap: var(--s-4); }
.page-head-text { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); flex-shrink: 0; }
@media (min-width: 40rem) {
  .page-head-row { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
/* ---------- Agents: setup status and "Set up for me" ---------- */
.agents-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: var(--s-6); align-items: start; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-ctl-lg); background: var(--c-raised); align-self: flex-start; }
.segment {
  display: inline-flex; align-items: center; gap: 0.375rem; height: 2rem; padding: 0 var(--s-3);
  border-radius: 0.5rem; font-size: var(--fs-sm); font-weight: 500; color: var(--c-muted); text-decoration: none;
}
.segment:hover { color: var(--c-ink); }
.segment[aria-current="page"] { background: var(--c-surface); color: var(--c-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04); }
.segment-dot { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--c-faint); }
.segment-fix .segment-dot { background: var(--c-warn); }
.segment-ready .segment-dot { background: var(--c-green); }
.segment-count { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--c-muted); }
.agents-card { container-type: inline-size; }
.agents-head, .agent-item { display: grid; grid-template-columns: minmax(0, 1fr) 16rem 9.5rem; gap: var(--s-3) var(--s-4); }
@container (max-width: 44rem) {
  .agents-head { display: none; }
  .agent-item { grid-template-columns: minmax(0, 1fr); }
  .agent-actions { flex-direction: row; align-items: center; justify-content: space-between; }
  .agent-actions .btn { width: auto; }
}
.agents-head {
  align-items: center; min-height: var(--row-h); padding: 0 var(--s-5); background: var(--c-inset);
  border-bottom: 1px solid var(--c-line-3); border-radius: var(--r-card) var(--r-card) 0 0;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted);
}
.agents-head span:last-child { text-align: right; }
.agent-item { align-items: center; padding: 1.125rem var(--s-5); border-top: 1px solid var(--c-line-4); }
.agents-head + .agent-item { border-top: 0; }
.agents-empty { padding: var(--s-5); font-size: var(--fs-md); }
.agent-who { display: flex; gap: var(--s-3); align-items: flex-start; min-width: 0; }
.agent-name { overflow-wrap: anywhere; }
.agent-model { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); }
.agent-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; }
.agent-icon svg { width: 1rem; height: 1rem; }
.agent-icon-ready { background: var(--c-ok-bg); color: var(--c-green-deep); }
.agent-icon-fix { background: #fff7ed; color: var(--c-warn); }
.agent-icon-new { background: var(--c-panel); color: var(--c-muted); }
.text-warn { color: var(--c-warn-text); }
.agent-checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.375rem; }
.agent-check { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--c-body); }
.agent-check-icon { flex-shrink: 0; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--c-control); box-sizing: border-box; }
.agent-check-ok .agent-check-icon {
  border: 0; background: var(--c-green-deep)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 0.625rem no-repeat;
}
.agent-check-warn { color: var(--c-warn-text); }
.agent-check-warn .agent-check-icon { border-color: var(--c-warn); background: #fff7ed; }
.agent-check-missing { color: var(--c-muted); }
.agent-actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); }
.agent-actions .btn { width: 100%; }
.link-btn {
  min-height: 1.75rem; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--c-green-text);
}
.link-btn:hover { color: var(--c-green-hover-text); text-decoration: underline; }
.change-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.change-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.card-dark .text-md-strong { color: var(--c-dark-ink); }
.dark-foot { padding-top: var(--s-3); border-top: 1px solid #2c3a31; }
.btn-on-dark { background: transparent; border-color: #3d5245; color: var(--c-dark-ink); }
.btn-on-dark:hover { background: #22352a; color: var(--c-dark-ink); }
.callout-warn {
  display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-5);
  border: 1px solid #f4d9b0; border-radius: var(--r-card); background: #fff7ed;
}
.diy summary { cursor: pointer; list-style-position: outside; margin-left: var(--s-4); }
.diy[open] summary { margin-bottom: var(--s-1); }
.diy-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--s-5); margin-top: var(--s-3); }
.setup { display: flex; flex-direction: column; gap: var(--s-5); max-width: 46rem; }
.setup-step { display: flex; align-items: center; gap: var(--s-3); }
.kv { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--c-line); border-radius: var(--r-ctl-lg); overflow: hidden; }
.kv > div { display: flex; gap: var(--s-3); padding: var(--s-2) 0.875rem; min-height: 2.5rem; align-items: center; background: var(--c-inset); border-top: 1px solid var(--c-line-3); }
.kv > div:first-child { border-top: 0; }
.kv dt { flex: 0 0 7.5rem; font-size: var(--fs-sm); font-weight: 600; color: var(--c-body); }
.kv dd { margin: 0; min-width: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.diff { display: flex; flex-direction: column; border: 1px solid var(--c-line); border-radius: var(--r-ctl-lg); overflow: hidden; font-size: var(--fs-sm); line-height: 1.55; }
.diff-add, .diff-keep { display: flex; }
.diff-add { background: var(--c-ok-bg); }
.diff-keep { border-top: 1px solid var(--c-line-3); }
.diff-mark { flex: 0 0 2rem; display: flex; justify-content: center; padding-top: 0.625rem; font-family: var(--font-mono); font-weight: 600; color: var(--c-green-deep); border-right: 1px solid var(--c-line-3); }
.diff-add p, .diff-keep > .stack-xs { margin: 0; padding: 0.625rem 0.875rem; min-width: 0; }
.diff-add p { color: var(--c-green-ink); }
.diff-text { margin: 0; white-space: pre-line; color: var(--c-muted); overflow-wrap: anywhere; }
.note-row { display: flex; gap: var(--s-3); align-items: flex-start; padding: 0.875rem var(--s-4); border: 1px solid var(--c-line-3); border-radius: var(--r-ctl-lg); background: var(--c-inset); }
.note-row > svg { flex-shrink: 0; width: 1.25rem; height: 1.25rem; color: var(--c-green-deep); margin-top: 1px; }
.setup-actions { justify-content: flex-end; }
.setup .check { min-height: 2.75rem; }

@media (max-width: 68rem) {
  .ob-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "aside"; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 80rem) {
  .agents-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 47.9375rem) {
  /* Phones: the sidebar slides in over the page (header button), as the account webapp's sheet. */
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 18rem; flex-basis: auto; transform: translateX(-100%); transition: transform 0.2s ease; }
  .app[data-sidebar="open"] .sidebar { transform: none; }
  .app[data-sidebar="open"] .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.4); }
  .sidebar .sidebar-collapse { display: none; }
  .sidebar-trigger { display: flex; }
  .btn-docs { display: none; }
  .menu-panel { left: auto; right: 0; bottom: calc(100% + 0.375rem); }
  .page { padding: 1.75rem 1.25rem 4rem; }
  .h1 { font-size: 1.875rem; }
  .ob-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "aside"; padding: var(--s-6) var(--s-4) 3rem; }
  .ob-header-row { padding: var(--s-3) var(--s-4); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip .kpi:nth-child(3) { border-left: 0; }
  .stat-strip .kpi:nth-child(n+3) { border-top: 1px solid var(--c-line-3); }
}
@media (max-width: 40rem) {
  .hide-sm, .ob-header .bar-text { display: none; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { gap: var(--s-3); }
  .public-header { padding: var(--s-3) var(--s-4); }
  .h1-lg { font-size: 1.75rem; }
  .copy-row { flex-wrap: wrap; }
  .copy-row-label { flex-basis: 100%; }
  .decision { grid-template-columns: 6.25rem minmax(0, 1fr); }
  .decision-text { grid-column: 1 / -1; }
  .invite-form { grid-template-columns: minmax(0, 1fr); }
  .ob-footer .btn, .ob-footer form { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .sidebar, .ob-progress-bar { transition: none; }
  .page { animation: none; }
  .btn.is-loading::after { animation-duration: 2s; }
}

/* ---------- Label-mix bar widths (generated) ---------- */
.w-0 { width: 0%; }
.w-1 { width: 1%; }
.w-2 { width: 2%; }
.w-3 { width: 3%; }
.w-4 { width: 4%; }
.w-5 { width: 5%; }
.w-6 { width: 6%; }
.w-7 { width: 7%; }
.w-8 { width: 8%; }
.w-9 { width: 9%; }
.w-10 { width: 10%; }
.w-11 { width: 11%; }
.w-12 { width: 12%; }
.w-13 { width: 13%; }
.w-14 { width: 14%; }
.w-15 { width: 15%; }
.w-16 { width: 16%; }
.w-17 { width: 17%; }
.w-18 { width: 18%; }
.w-19 { width: 19%; }
.w-20 { width: 20%; }
.w-21 { width: 21%; }
.w-22 { width: 22%; }
.w-23 { width: 23%; }
.w-24 { width: 24%; }
.w-25 { width: 25%; }
.w-26 { width: 26%; }
.w-27 { width: 27%; }
.w-28 { width: 28%; }
.w-29 { width: 29%; }
.w-30 { width: 30%; }
.w-31 { width: 31%; }
.w-32 { width: 32%; }
.w-33 { width: 33%; }
.w-34 { width: 34%; }
.w-35 { width: 35%; }
.w-36 { width: 36%; }
.w-37 { width: 37%; }
.w-38 { width: 38%; }
.w-39 { width: 39%; }
.w-40 { width: 40%; }
.w-41 { width: 41%; }
.w-42 { width: 42%; }
.w-43 { width: 43%; }
.w-44 { width: 44%; }
.w-45 { width: 45%; }
.w-46 { width: 46%; }
.w-47 { width: 47%; }
.w-48 { width: 48%; }
.w-49 { width: 49%; }
.w-50 { width: 50%; }
.w-51 { width: 51%; }
.w-52 { width: 52%; }
.w-53 { width: 53%; }
.w-54 { width: 54%; }
.w-55 { width: 55%; }
.w-56 { width: 56%; }
.w-57 { width: 57%; }
.w-58 { width: 58%; }
.w-59 { width: 59%; }
.w-60 { width: 60%; }
.w-61 { width: 61%; }
.w-62 { width: 62%; }
.w-63 { width: 63%; }
.w-64 { width: 64%; }
.w-65 { width: 65%; }
.w-66 { width: 66%; }
.w-67 { width: 67%; }
.w-68 { width: 68%; }
.w-69 { width: 69%; }
.w-70 { width: 70%; }
.w-71 { width: 71%; }
.w-72 { width: 72%; }
.w-73 { width: 73%; }
.w-74 { width: 74%; }
.w-75 { width: 75%; }
.w-76 { width: 76%; }
.w-77 { width: 77%; }
.w-78 { width: 78%; }
.w-79 { width: 79%; }
.w-80 { width: 80%; }
.w-81 { width: 81%; }
.w-82 { width: 82%; }
.w-83 { width: 83%; }
.w-84 { width: 84%; }
.w-85 { width: 85%; }
.w-86 { width: 86%; }
.w-87 { width: 87%; }
.w-88 { width: 88%; }
.w-89 { width: 89%; }
.w-90 { width: 90%; }
.w-91 { width: 91%; }
.w-92 { width: 92%; }
.w-93 { width: 93%; }
.w-94 { width: 94%; }
.w-95 { width: 95%; }
.w-96 { width: 96%; }
.w-97 { width: 97%; }
.w-98 { width: 98%; }
.w-99 { width: 99%; }
.w-100 { width: 100%; }
