:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #78716c;
  --text-4: #a8a29e;
  --primary: oklch(0.48 0.13 255);
  --primary-hover: oklch(0.42 0.13 255);
  --primary-soft: oklch(0.96 0.02 255);
  --primary-border: oklch(0.88 0.05 255);

  /* Section accents — used for the eyebrow tag + left bar on each section */
  --acc-1: oklch(0.45 0.1 230);   /* slate-blue   — Inbox source */
  --acc-1-soft: oklch(0.96 0.025 230);
  --acc-2: oklch(0.46 0.13 295);  /* violet       — Rules */
  --acc-2-soft: oklch(0.96 0.03 295);
  --acc-3: oklch(0.48 0.12 55);   /* amber-brown  — Decision log */
  --acc-3-soft: oklch(0.97 0.035 65);
  --acc-4: oklch(0.44 0.09 165);  /* teal-green   — Email preview */
  --acc-4-soft: oklch(0.96 0.03 165);

  --red: oklch(0.58 0.19 25);
  --red-soft: oklch(0.96 0.03 25);
  --red-border: oklch(0.85 0.08 25);

  --orange: oklch(0.65 0.16 55);
  --orange-soft: oklch(0.97 0.04 70);
  --orange-border: oklch(0.86 0.09 65);

  --teal: oklch(0.58 0.09 195);
  --teal-soft: oklch(0.96 0.025 195);
  --teal-border: oklch(0.85 0.05 195);

  --green: oklch(0.62 0.13 150);
  --green-soft: oklch(0.96 0.03 150);

  --radius-sm: 5px;
  --radius: 7px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 0 rgba(28,25,23,0.04), 0 1px 2px rgba(28,25,23,0.04);
  --shadow: 0 1px 0 rgba(28,25,23,0.04), 0 4px 12px -2px rgba(28,25,23,0.06), 0 1px 2px rgba(28,25,23,0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--primary-soft); }

.mono { font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; }

/* ------- Layout ------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,249,0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--text);
  display: grid;
  place-items: center;
  color: var(--bg);
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  font-weight: 600;
}
.crumbs {
  color: var(--text-3);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.crumbs .slash { color: var(--text-4); }
.crumbs .here { color: var(--text); }
.topbar .spacer { flex: 1; }
.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
}
.env-pill .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, oklch(0.7 0.1 50), oklch(0.55 0.13 30));
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}

.page-head {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 32px 40px;
}
.page-head .eyebrow {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.page-head h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text);
}
.page-head .sub {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 660px;
  line-height: 1.55;
}

.main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px 120px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ------- Section ------- */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.section[data-accent="1"] { --accent: var(--acc-1); --accent-soft: var(--acc-1-soft); }
.section[data-accent="2"] { --accent: var(--acc-2); --accent-soft: var(--acc-2-soft); }
.section[data-accent="3"] { --accent: var(--acc-3); --accent-soft: var(--acc-3-soft); }
.section[data-accent="4"] { --accent: var(--acc-4); --accent-soft: var(--acc-4-soft); }

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 32px 24px;
}
.section-head .titles { flex: 1; min-width: 0; }
.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, var(--text-3));
  margin-bottom: 10px;
  white-space: nowrap;
}
.section-head .eyebrow .dotnum {
  width: 5px; height: 5px;
  border-radius: 999px;
  background: var(--accent, var(--text-4));
}
.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--accent, var(--text));
}
.section-head .desc {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-3);
  max-width: 620px;
  line-height: 1.5;
}
.section-head .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.section-body { padding: 8px 32px 28px; }

/* ------- Buttons ------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 80ms ease, border-color 80ms ease, transform 80ms ease;
  box-shadow: 0 1px 0 rgba(28,25,23,0.03);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn .icon { width: 14px; height: 14px; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover { background: #000; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

.btn-icon {
  width: 28px; height: 28px;
  padding: 0;
  display: grid; place-items: center;
}

/* ------- Form bits ------- */
.input, .select {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 80ms ease, box-shadow 80ms ease;
  font-size: 13px;
  width: 100%;
}
.input:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path fill='none' stroke='%2378716c' stroke-width='1.4' stroke-linecap='round' d='M2 4l3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ------- Connection section ------- */
.conn-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
}
.conn-right { display: flex; flex-direction: column; }

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.account-card .mailicon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-2);
}
.account-card .meta { flex: 1; min-width: 0; }
.account-card .meta .who { font-weight: 500; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.account-card .meta .who .status-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.account-card .meta .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.scan-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 14px;
}
.scan-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  flex: 1;
  min-height: 72px;
}
.scan-result.has-result {
  border-color: var(--accent, var(--primary-border));
  background: var(--accent-soft, var(--primary-soft));
  color: var(--text);
}
.scan-result .count {
  font-family: "Geist Mono", monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent, var(--primary));
  line-height: 1;
}

.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--text);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------- Tables ------- */
.table-wrap {
  border-top: 1px solid var(--border);
  overflow-x: auto;
}
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.t thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
table.t tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.t tbody tr:last-child td { border-bottom: none; }
table.t tbody tr:hover { background: rgba(0,0,0,0.012); }

.cell-inline { display: flex; align-items: center; gap: 8px; }
.cell-tight .input, .cell-tight .select { height: 28px; font-size: 12.5px; }

.rules-add {
  padding: 14px 32px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ------- Badges / pills ------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
}
.pill .pdot {
  width: 6px; height: 6px; border-radius: 999px;
}
.pill-red { background: var(--red-soft); color: var(--red); border-color: var(--red-border); }
.pill-red .pdot { background: var(--red); }
.pill-orange { background: var(--orange-soft); color: oklch(0.5 0.17 55); border-color: var(--orange-border); }
.pill-orange .pdot { background: var(--orange); }
.pill-teal { background: var(--teal-soft); color: oklch(0.45 0.09 195); border-color: var(--teal-border); }
.pill-teal .pdot { background: var(--teal); }
.pill-muted { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }
.pill-muted .pdot { background: var(--text-4); }
.pill-green { background: var(--green-soft); color: oklch(0.42 0.13 150); border-color: oklch(0.85 0.07 150); }
.pill-green .pdot { background: var(--green); }

/* ------- Stat strip ------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.stat {
  padding: 18px 22px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat:last-child { border-right: none; }
.stat .label {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.stat .label .pdot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--text-4);
}
.stat .num {
  font-family: "Geist Mono", monospace;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
}
.stat .delta {
  font-size: 11.5px;
  color: var(--text-3);
}
.stat[data-tone="green"] .num { color: var(--green); }
.stat[data-tone="green"] .label .pdot { background: var(--green); }
.stat[data-tone="red"] .num { color: var(--red); }
.stat[data-tone="red"] .label .pdot { background: var(--red); }
.stat[data-tone="orange"] .num { color: var(--orange); }
.stat[data-tone="orange"] .label .pdot { background: var(--orange); }

/* ------- Decision log ------- */
.subject-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.subject-cell .pr {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}
.subject-cell .subj { color: var(--text); }
.attach-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}
.attach-cell .ext {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
}
.recom-cell {
  font-size: 12.5px;
  color: var(--text-2);
}
.recom-cell .why { color: var(--text-3); }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.row-in { animation: rowIn 280ms ease both; }

.log-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.log-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ------- Email preview ------- */
.tabs {
  display: flex;
  gap: 6px;
  padding: 14px 24px 0 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 11px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  background: transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  font-weight: 500;
}
.tab .pill { transform: translateY(-0.5px); }

.email-frame {
  padding: 36px 22px;
  background: var(--surface-2);
}
.email-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.email-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.email-head .subject {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.email-head .meta {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 12px;
  font-size: 12.5px;
}
.email-head .meta .k { color: var(--text-3); }
.email-head .meta .v { color: var(--text); }
.email-head .meta .v.mono { font-family: "Geist Mono", monospace; font-size: 12px; }

.email-body {
  padding: 18px 22px 22px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
}
.email-body p { margin: 0 0 12px; }
.email-body .signoff { color: var(--text-2); margin-top: 18px; font-size: 12.5px; }

.kv-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
  margin: 8px 0 14px;
}
.kv-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  font-size: 12.5px;
  padding: 5px 0;
  align-items: center;
}
.kv-row + .kv-row { border-top: 1px dashed var(--border); }
.kv-row .k { color: var(--text-3); }
.kv-row .v { color: var(--text); font-family: "Geist Mono", monospace; font-size: 12px; }
.kv-row .flag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
}
.kv-row .flag.low { color: oklch(0.5 0.17 55); background: var(--orange-soft); border-color: var(--orange-border); }
.kv-row .flag.high { color: oklch(0.5 0.1 150); background: var(--green-soft); border-color: oklch(0.85 0.07 150); }

.rule-callout {
  display: flex;
  gap: 12px;
  border: 1px solid var(--red-border);
  background: var(--red-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.rule-callout .ic {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.rule-callout .body { font-size: 12.5px; color: oklch(0.35 0.12 25); }
.rule-callout .body .label { font-weight: 600; color: var(--red); }
.rule-callout .body .expr {
  font-family: "Geist Mono", monospace;
  background: var(--surface);
  border: 1px solid var(--red-border);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.actions-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.disclaimer {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* ------- Helpers ------- */
.helper {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}
.dot-sep {
  display: inline-block;
  width: 3px; height: 3px; border-radius: 999px;
  background: var(--text-4);
  vertical-align: middle;
  margin: 0 8px;
}

footer.footnote {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px 40px;
  color: var(--text-4);
  font-size: 11.5px;
  display: flex;
  gap: 16px;
  align-items: center;
}
footer.footnote .seal {
  font-family: "Geist Mono", monospace;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-3);
}

/* ------- Section accent 5 — indigo: Request Queue ------- */
:root {
  --acc-5: oklch(0.46 0.15 270);
  --acc-5-soft: oklch(0.96 0.03 270);
}
.section[data-accent="5"] { --accent: var(--acc-5); --accent-soft: var(--acc-5-soft); }

/* ------- Request Queue table ------- */
.req-id {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.category-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 500;
}
.requester-name {
  font-size: 13px;
  color: var(--text);
}
.queue-row {
  cursor: pointer;
  transition: background 80ms ease;
}
.queue-row:hover { background: rgba(0,0,0,0.018); }
.queue-row-open { background: var(--primary-soft); }
.queue-row-open:hover { background: var(--primary-soft); }

/* ------- Action buttons ------- */
.btn-confirm {
  background: var(--green-soft);
  color: oklch(0.35 0.13 150);
  border-color: oklch(0.82 0.08 150);
}
.btn-confirm:hover { background: oklch(0.92 0.04 150); }
.btn-reject {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red-border);
}
.btn-reject:hover { background: oklch(0.93 0.04 25); }
.btn-review {
  background: var(--orange-soft);
  color: oklch(0.5 0.17 55);
  border-color: var(--orange-border);
}
.btn-review:hover { background: oklch(0.94 0.05 65); }

.inline-notice {
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}
.inline-notice-red { color: var(--red); background: var(--red-soft); border: 1px solid var(--red-border); }
.inline-notice-red-sm {
  font-size: 11.5px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ------- Expanded row ------- */
.expanded-row-tr { background: var(--primary-soft); }
.expanded-cell {
  padding: 0 !important;
  border-bottom: 2px solid var(--primary-border) !important;
}
.expanded-panel {
  padding: 20px 24px 22px;
  border-top: 1px solid var(--primary-border);
}
.expanded-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.expanded-col { display: flex; flex-direction: column; }
.exp-label {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.expanded-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--primary-border);
}

/* ------- Rule callout neutral variant ------- */
.rule-callout-neutral {
  border-color: var(--primary-border) !important;
  background: var(--surface) !important;
}
.rule-callout-neutral .body { color: var(--text-2) !important; }
.rule-callout-neutral .body .label { color: var(--primary) !important; }
.rule-callout-neutral .body .expr {
  border-color: var(--primary-border) !important;
  color: var(--text-2) !important;
}
.ic-neutral {
  background: var(--primary) !important;
}

/* ------- Confidence bar ------- */
.conf-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.conf-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.conf-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 400ms ease;
}
.conf-label {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  min-width: 36px;
  text-align: right;
}

/* ------- Ariba Project Preview modal ------- */
.ariba-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 180ms ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ariba-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px -12px rgba(28,25,23,0.22), 0 4px 16px -4px rgba(28,25,23,0.1);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 220ms cubic-bezier(0.22,1,0.36,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.ariba-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.eyebrow-sm {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.ariba-modal-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.35;
}
.ariba-modal-body {
  padding: 20px 24px 24px;
}

.ariba-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ariba-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ariba-card-label {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ------- Vendor suggestions ------- */
.vendor-list { padding: 4px 0; }
.vendor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.vendor-row:last-child { border-bottom: none; }
.vendor-rank {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  flex-shrink: 0;
}
.vendor-info { flex: 1; min-width: 0; }
.vendor-name { font-size: 13px; font-weight: 500; color: var(--text); }
.vendor-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.star-rating { display: inline-flex; gap: 2px; }
.star { font-size: 14px; line-height: 1; }
.star-on { color: oklch(0.72 0.16 75); }
.star-off { color: var(--border-strong); }

/* ------- Ariba CTA area ------- */
.ariba-cta {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.btn-lg {
  height: 40px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: var(--radius);
}
.ariba-disclaimer {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ------- Ariba success state ------- */
.ariba-success {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid oklch(0.85 0.07 150);
  background: var(--green-soft);
  border-radius: var(--radius);
  width: 100%;
  animation: fadeIn 260ms ease;
}
.success-check {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.success-text { flex: 1; }
.success-title {
  font-size: 13.5px;
  font-weight: 600;
  color: oklch(0.3 0.1 150);
  line-height: 1.4;
}
.success-note {
  font-size: 12px;
  color: oklch(0.45 0.08 150);
  margin-top: 5px;
  line-height: 1.5;
}
