:root {
  --bg: var(--ft-color-page, #fbfcfc);
  --panel: var(--ft-color-panel, #ffffff);
  --panel-soft: var(--ft-color-page, #fbfcfc);
  --ink: var(--ft-color-text, #17211f);
  --muted: var(--ft-color-muted, #6e7781);
  --line: var(--ft-color-border, #eaeef2);
  --line-strong: var(--ft-color-border-strong, #d8dee7);
  --teal: var(--ft-color-brand, #b02e79);
  --teal-dark: var(--ft-color-brand-strong, #9b2c6f);
  --teal-soft: var(--ft-color-brand-soft, #fce8f3);
  --red: var(--ft-color-danger, #cf222e);
  --red-soft: var(--ft-color-danger-bg, #ffebe9);
  --amber: #9a6700;
  --amber-soft: #fff7d6;
  --violet: #6941c6;
  --violet-soft: #f1edff;
  --blue: #175cd3;
  --blue-soft: #eaf2ff;
  --gradient: var(--ft-gradient-brand, linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888));
  --gradient-deep: var(--ft-gradient-brand-deep, linear-gradient(45deg, #dc2743, #cc2366, #bc1888, #8134af));
  --focus-ring: var(--ft-focus-ring, 0 0 0 3px rgba(176, 46, 121, 0.16));
  --sidebar: var(--ft-color-panel, #ffffff);
  --sidebar-muted: #737373;
  --radius: var(--ft-radius-card, 12px);
  --shadow: var(--ft-shadow-card, 0 1px 2px rgba(16, 24, 40, .05), 0 8px 28px rgba(16, 24, 40, .04));
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--ft-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif);
  font-size: 14px;
  line-height: 1.55;
}
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { display: grid; grid-template-columns: var(--ft-sidebar-width, 220px) minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--ft-sidebar-width, 220px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  color: var(--ink);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .01em; }
.brand small { display: block; margin-top: 1px; color: var(--sidebar-muted); font-size: 12px; }
.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--gradient-deep);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
  font-weight: 800;
}
.brand-mark.large { width: 52px; height: 52px; font-size: 20px; }
.nav-list { display: grid; gap: 5px; margin-top: 12px; }
.nav-section-label { margin: 13px 12px 2px; color: #a8a8a8; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nav-item {
  display: block;
  padding: 10px 14px;
  color: #404040;
  border-radius: 12px;
  font-weight: 600;
}
.nav-item:hover { color: var(--ink); background: #f2f2f2; text-decoration: none; }
.nav-item.active { color: var(--teal-dark); background: var(--teal-soft); box-shadow: inset 3px 0 0 var(--teal); font-weight: 800; }
.sidebar-boundary {
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 8px;
  margin-top: auto;
  padding: 13px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sidebar-boundary strong { color: var(--ink); font-size: 13px; }
.sidebar-boundary small { grid-column: 2; color: var(--sidebar-muted); line-height: 1.4; }
.status-dot { width: 8px; height: 8px; margin-top: 6px; background: #1a9e77; border-radius: 50%; box-shadow: 0 0 0 4px rgba(26, 158, 119, .14); }

.page-frame { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 18px 34px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 1px 0 0; font-size: 23px; line-height: 1.25; }
.eyebrow { margin: 0; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.user-menu { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.user-avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--gradient-deep);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #e1306c33;
  font-size: 14px;
  font-weight: 800;
}
.ui-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #86255f; background: #fdf2f8; border-color: #f5cee3; font-size: 13px; }
.page-frame > .ui-notice { padding: 9px 34px; border-bottom: 1px solid; }
.content .ui-notice { margin: 0 0 16px; padding: 12px 14px; border: 1px solid; border-radius: 10px; }
.ui-notice--boundary { color: #684b00; background: #fff8df; border-color: #ead89a; }
.ui-notice--simulation { color: #4f3b78; background: #f6f1ff; border-color: #d9c8f4; }
.ui-notice--retired { color: var(--muted); background: var(--panel-soft); border-color: var(--line-strong); }
.ui-notice__text { min-width: 0; }
.ui-notice__aside { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
.content { width: min(var(--ft-content-max, 1200px), 100%); margin: 0 auto; padding: 28px 34px 42px; }
.footer { padding: 18px 34px 28px; color: var(--muted); text-align: center; font-size: 12px; }

.panel {
  margin-bottom: 20px;
  padding: 21px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.panel-header h2 { margin: 2px 0 0; font-size: 18px; }
.panel-header > span, .panel-header > a { align-self: center; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.station-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 20px; padding: 26px 28px; color: rgba(255, 255, 255, .92); background: var(--gradient-deep); border-radius: var(--radius); box-shadow: 0 12px 36px rgba(188, 24, 136, .22); }
.station-hero h2 { margin: 3px 0 8px; color: #fff; font-size: 25px; }
.station-hero p:not(.eyebrow) { max-width: 850px; margin: 0; }
.station-workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.station-step { display: grid; min-height: 145px; align-content: start; padding: 17px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.station-step:hover { border-color: #eab6d4; text-decoration: none; transform: translateY(-1px); }
.station-step > span { width: fit-content; padding: 3px 7px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 6px; font-size: 11px; font-weight: 800; }
.station-step strong { margin: 13px 0 4px; font-size: 17px; }
.station-step small { color: var(--muted); }
.station-step.primary { border-top: 3px solid var(--teal); }
.station-secondary-view {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.station-secondary-view > summary {
  cursor: pointer;
  padding: 14px 18px;
  color: var(--muted);
  font-weight: 700;
}
.station-support-links { margin-top: 20px; }
.station-support-status { margin-top: 20px; }
.service-list { display: grid; gap: 12px; }
.service-list > div { display: grid; grid-template-columns: 12px 1fr; column-gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.service-list > div:last-child { border-bottom: 0; }
.service-list small { grid-column: 2; color: var(--muted); }
.service-dot { width: 9px; height: 9px; margin-top: 6px; background: #18a881; border-radius: 50%; box-shadow: 0 0 0 4px rgba(24,168,129,.12); }
.service-dot.waiting { background: #d09b22; box-shadow: 0 0 0 4px rgba(208,155,34,.12); }
.service-dot.offline { background: #d92d20; box-shadow: 0 0 0 4px rgba(217,45,32,.1); }

.hero-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
  padding: 26px 28px;
  border: 1px solid;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-status.danger { color: #7a271a; background: linear-gradient(135deg, #fff9f7, #fff1ed); border-color: #f2c7be; }
.hero-status.safe { color: #075e54; background: linear-gradient(135deg, #f2fbf8, #e5f5f0); border-color: #b8ded5; }
.hero-status.working { color: #174ea6; background: linear-gradient(135deg, #f7faff, #edf4ff); border-color: #bfd3f2; }
.hero-status h2 { margin: 3px 0 4px; color: var(--ink); font-size: 24px; }
.hero-status p:not(.eyebrow) { max-width: 760px; margin: 0; }
.big-zero { display: grid; min-width: 92px; text-align: center; color: var(--red); font-size: 44px; font-weight: 800; line-height: 1; }
.big-zero small { margin-top: 5px; font-size: 12px; font-weight: 700; }
.mode-chip { padding: 8px 12px; color: #fff; background: var(--teal); border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .08em; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { display: grid; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.metric-card span { color: var(--muted); font-weight: 600; }
.metric-card strong { margin: 5px 0 2px; font-size: 30px; line-height: 1.1; }
.metric-card small { color: var(--muted); }

.verdict-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.verdict-grid > div { display: grid; gap: 10px; padding: 14px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; }
.verdict-grid strong { font-size: 23px; }
.badge { display: inline-flex; width: fit-content; align-items: center; padding: 3px 8px; color: #344640; background: #edf1f0; border: 1px solid #dde5e2; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-exclude { color: var(--red); background: var(--red-soft); border-color: #f3c7c0; }
.badge-blocked { color: var(--red); background: var(--red-soft); border-color: #f3c7c0; }
.badge-conflict { color: var(--violet); background: var(--violet-soft); border-color: #d9ceff; }
.badge-review { color: var(--amber); background: var(--amber-soft); border-color: #ecd98e; }
.badge-ready { color: var(--teal-dark); background: var(--teal-soft); border-color: #b9ddd5; }

.fact-list { display: grid; margin: 0; border-top: 1px solid var(--line); }
.fact-list > div { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fact-list dt { color: var(--muted); font-weight: 600; }
.fact-list dd { margin: 0; }
.fact-list.compact > div { padding: 9px 0; }
.callout { margin: 15px 0 0; padding: 11px 13px; color: #555555; background: #fafafa; border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0; }
.callout.warning { color: #7a4f00; background: #fff9e8; border-left-color: #d6a322; }
.large-copy { margin: 0; font-size: 16px; line-height: 1.75; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; color: var(--muted); background: #fafafa; border-bottom: 1px solid var(--line-strong); text-align: left; font-size: 12px; white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdf6fa; }
td p { margin: 3px 0; }
td small { color: var(--muted); }
.strong-link { color: var(--ink); font-weight: 700; }
.mono, .mono-soft { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mono-soft { color: #52645f; font-size: 12px; }
.breakable { overflow-wrap: anywhere; word-break: break-word; }

.risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.risk-grid > div { display: grid; gap: 4px; padding: 13px; background: #fbfcfc; border: 1px solid var(--line); border-radius: 9px; }
.risk-grid span { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.risk-grid strong { color: var(--amber); font-size: 13px; }

.filter-panel { padding: 15px 18px; }
.filter-grid { display: flex; align-items: end; flex-wrap: wrap; gap: 11px; }
.filter-grid label { display: grid; min-width: 180px; flex: 1 1 210px; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select { width: 100%; min-height: 39px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: var(--focus-ring); }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-weight: 700; text-decoration: none; }
.button:hover { text-decoration: none; }
.button:disabled { cursor: wait; opacity: .6; }
.button-primary { color: #fff; background: var(--gradient-deep); border-color: transparent; }
.button-primary:hover { color: #fff; filter: brightness(.94); }
.button-quiet { color: #404040; background: #fff; border-color: var(--line-strong); }
.button-quiet:hover { color: var(--ink); background: #f2f2f2; }
.button-full { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.button-row.centered { justify-content: center; }
.action-result { position: sticky; top: 10px; z-index: 8; margin-bottom: 18px; padding: 12px 15px; color: #174ea6; background: var(--blue-soft); border: 1px solid #bfd3f2; border-radius: 9px; box-shadow: var(--shadow); font-weight: 700; }
.action-result.success { color: var(--teal-dark); background: var(--teal-soft); border-color: #b9ddd5; }
.action-result.danger { color: var(--red); background: var(--red-soft); border-color: #f3c7c0; }
.compact-empty { padding: 28px 18px; }
.compact-empty p { margin: 7px auto 13px; max-width: 680px; }
.intent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.intent-card { display: grid; gap: 11px; padding: 15px; background: #fbfcfc; border: 1px solid var(--line); border-radius: 10px; }
.intent-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.intent-card p { margin: 0; }
.intent-card .button { justify-self: start; }
.subtable { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.section-title { margin: 0 0 11px; font-size: 14px; }

.email-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: -7px 0 16px;
  padding: 7px;
  background: #efefef;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.email-tabs a { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; color: #555555; border-radius: 8px; font-weight: 700; }
.email-tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .58); text-decoration: none; }
.email-tabs a.active { color: #fff; background: var(--gradient-deep); box-shadow: 0 2px 8px rgba(188, 24, 136, .22); }
.email-tabs a span { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; opacity: .72; }
.email-safety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.email-safety-grid article { display: grid; gap: 3px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.email-safety-grid span, .email-safety-grid small { color: var(--muted); }
.email-safety-grid strong { font-size: 18px; }
.email-safety-grid .email-safe-value { color: var(--teal-dark); }
.plain-list { display: grid; gap: 7px; margin: 11px 0 0; padding-left: 20px; }
.plain-list .badge { margin-right: 6px; }
.email-stop-notice { margin: 0 0 20px; }
.email-card-list { display: grid; gap: 14px; }
.email-card { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.email-card-alert { border-color: #e7a59c; box-shadow: inset 4px 0 0 var(--red); }
.email-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.email-card-header h3 { margin: 7px 0 1px; font-size: 17px; }
.email-card-header p { margin: 0; color: var(--muted); }
.email-card-state { display: grid; min-width: 150px; gap: 3px; justify-items: end; text-align: right; }
.email-card-state strong { color: var(--red); }
.email-card-state small { color: var(--muted); }
.email-blockers { margin-top: 14px; padding: 13px 15px; color: #715000; background: var(--amber-soft); border: 1px solid #ecd98e; border-radius: 9px; }
.email-blockers ul { display: grid; gap: 4px; margin: 7px 0 0; padding-left: 20px; }
.email-blockers p { margin: 6px 0 0; }
.email-action-note { align-self: center; color: var(--muted); font-size: 12px; }
.simulation-stamp { display: grid; min-width: 130px; gap: 2px; padding: 10px 12px; color: var(--teal-dark); background: var(--teal-soft); border: 1px solid #b9ddd5; border-radius: 9px; text-align: center; }
.simulation-stamp small { color: #43736a; }
.simulation-stamp.danger { color: var(--red); background: var(--red-soft); border-color: #f3c7c0; }
.simulation-stamp.danger small { color: var(--red); }
.email-preview { display: grid; gap: 0; margin-top: 15px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.email-preview-row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 11px 13px; background: #f7f9f8; border-bottom: 1px solid var(--line); }
.email-preview-row span, .email-preview-body > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.email-preview-body { display: grid; gap: 8px; padding: 13px; }
.email-preview-body pre { max-height: 360px; margin: 0; padding: 14px; overflow: auto; color: #263632; background: #fbfcfc; border: 1px solid var(--line); border-radius: 7px; font: inherit; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.email-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.email-meta-row code { color: #52645f; }
.email-meta-row a { margin-left: auto; font-weight: 700; }
.email-approval-summary { display: grid; gap: 5px; margin-top: 14px; padding: 13px 15px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 9px; }
.email-approval-summary span, .email-approval-summary small { color: var(--muted); }
.email-result-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 15px 0 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.email-result-facts > div { min-width: 0; padding: 12px 13px; border-right: 1px solid var(--line); }
.email-result-facts > div:last-child { border-right: 0; }
.email-result-facts dt { margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.email-result-facts dd { margin: 0; }
.metric-card .metric-text-value { align-self: center; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }

.buyer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.buyer-card { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.buyer-card:hover { border-color: #eab6d4; box-shadow: 0 8px 24px rgba(188, 24, 136, .08); }
.buyer-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.buyer-card h3 { margin: 13px 0 3px; font-size: 17px; }
.buyer-card h3 a { color: var(--ink); }
.buyer-card > p { margin: 8px 0; }
.buyer-meta { color: var(--muted); font-size: 12px; }
.outreach-lock { color: var(--red); font-size: 11px; font-weight: 800; }
.buyer-counts { display: flex; gap: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.buyer-counts strong { color: var(--ink); }

.detail-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding: 22px; color: #fff; background: var(--gradient-deep); border-radius: var(--radius); }
.detail-hero h2 { margin: 10px 0 2px; font-size: 25px; }
.detail-hero p { margin: 0; color: rgba(255, 255, 255, .85); }
.back-link { color: rgba(255, 255, 255, .85); font-size: 12px; }
.detail-status { display: grid; justify-items: end; gap: 7px; }
.detail-status strong { color: #ffd1ca; }

.review-list, .evidence-list { display: grid; gap: 11px; }
.review-item { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid #aebbb7; border-radius: 9px; }
.review-item.severity-high { border-left-color: #d92d20; }
.review-item.severity-medium { border-left-color: #e2a80b; }
.review-item > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.review-item > div small { margin-left: auto; color: var(--muted); }
.review-item p { margin: 9px 0 0; }
.dedupe-company-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch !important; gap: 12px !important; margin-top: 12px; }
.dedupe-company-grid > div { display: grid; gap: 3px; align-content: start; padding: 12px; background: #f8faf9; border: 1px solid var(--line); border-radius: 8px; }
.dedupe-company-grid small { margin: 0 !important; color: var(--muted); }
.dedupe-versus { align-self: center; color: var(--muted); font-weight: 800; }
.dedupe-signals { margin-top: 10px; color: var(--muted); font-size: 12px; }
.dedupe-signals summary { cursor: pointer; font-weight: 700; }
.dedupe-signals ul { margin: 8px 0 0; padding-left: 20px; }
.action-line { color: #3d4f4a; }
.reference-line { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; overflow-wrap: anywhere; }
.evidence-item { padding: 14px 16px; background: #fbfcfc; border: 1px solid var(--line); border-radius: 9px; }
.evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.evidence-head span { color: var(--muted); font-size: 12px; }
.field-value { margin: 8px 0; font-weight: 650; overflow-wrap: anywhere; }
blockquote { margin: 8px 0; padding: 8px 12px; color: #555555; background: #faf5f8; border-left: 3px solid #e8b3d0; }
.source-line { color: var(--muted); font-size: 11px; }
.evidence-table { min-width: 1120px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 17px; color: var(--muted); }
.pagination a { padding: 6px 10px; background: #f2f2f2; border-radius: 8px; font-weight: 700; }
.empty-state { grid-column: 1 / -1; padding: 50px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); border-radius: 10px; }
.empty-state strong { color: var(--ink); font-size: 18px; }
.error-state { margin: 60px auto; max-width: 620px; background: #fff; }

.boundary-list, .limitation-list { margin: 0; padding-left: 20px; }
.boundary-list li, .limitation-list li { margin: 8px 0; }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.source-grid article { display: grid; gap: 5px; padding: 13px; background: #fafcfb; border: 1px solid var(--line); border-radius: 9px; }
.source-grid span { color: var(--muted); font-size: 11px; }

.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #dff3ee 0, transparent 36%), linear-gradient(145deg, #f8fbfa, #edf4f2); }
.login-main { width: 100%; }
.login-card { width: min(440px, 100%); margin: 0 auto; padding: 32px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 24px 80px rgba(25, 56, 49, .12); }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand h1 { margin: 2px 0 0; font-size: 24px; }
.login-copy { margin: 20px 0; color: var(--muted); }
.form-stack { display: grid; gap: 14px; }
.form-stack label { display: grid; gap: 6px; font-weight: 700; }
.form-stack label span { font-size: 12px; }
.form-stack input { min-height: 44px; }
.form-error { margin: 0; padding: 9px 11px; color: var(--red); background: var(--red-soft); border: 1px solid #f1c2bb; border-radius: 7px; }
.login-boundary { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 15px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.login-boundary strong { color: var(--teal-dark); }
.login-device-help { display: grid; gap: 5px; margin-top: 14px; padding: 12px; border: 1px solid #e4e6ef; border-radius: 10px; background: #f7f8fb; color: var(--muted); font-size: 11px; }
.login-device-help strong { color: var(--teal-dark); font-size: 12px; }
.login-device-help a { justify-self: start; font-weight: 800; }
.login-device-help small { color: var(--muted); }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verdict-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .station-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-result-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-result-facts > div:nth-child(2) { border-right: 0; }
  .email-result-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; min-height: 0; padding: 14px; }
  .brand { padding-bottom: 10px; }
  .nav-list { grid-template-columns: repeat(3, 1fr); margin: 0; }
  .nav-item { padding: 8px; text-align: center; font-size: 12px; }
  .nav-section-label { grid-column: 1 / -1; margin: 8px 4px 0; text-align: center; }
  .sidebar-boundary { display: none; }
  .page-frame { width: 100%; }
  .topbar { min-height: 72px; padding: 14px 18px; }
  .topbar h1 { font-size: 19px; }
  .user-menu > span { display: none; }
  .page-frame > .ui-notice { align-items: flex-start; flex-direction: column; gap: 3px; padding: 9px 18px; }
  .ui-notice__aside { white-space: normal; }
  .content { padding: 18px; }
  .two-column, .buyer-grid { grid-template-columns: 1fr; }
  .intent-grid { grid-template-columns: 1fr; }
  .risk-grid { grid-template-columns: 1fr; }
  .hero-status { align-items: flex-start; padding: 20px; }
  .hero-status h2 { font-size: 20px; }
  .big-zero { min-width: 60px; font-size: 34px; }
  .detail-hero { align-items: flex-start; }
  .detail-status { justify-items: start; }
  .source-grid { grid-template-columns: 1fr; }
  .station-hero { align-items: flex-start; flex-direction: column; padding: 21px; }
  .email-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-safety-grid { grid-template-columns: 1fr; }
  .email-card-header { display: grid; }
  .email-card-state { justify-items: start; text-align: left; }
  .simulation-stamp { width: 100%; }
}

@media (max-width: 520px) {
  .nav-list { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 24px; }
  .verdict-grid { grid-template-columns: 1fr 1fr; }
  .station-workflow { grid-template-columns: 1fr; }
  .hero-status, .detail-hero { display: grid; }
  .panel { padding: 16px; }
  .fact-list > div { grid-template-columns: 1fr; gap: 4px; }
  .buyer-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .login-card { padding: 24px; }
  .login-boundary { display: grid; }
  .email-tabs { grid-template-columns: 1fr 1fr; }
  .email-tabs a { font-size: 12px; }
  .email-preview-row { grid-template-columns: 1fr; gap: 3px; }
  .email-meta-row a { width: 100%; margin-left: 0; }
  .email-result-facts { grid-template-columns: 1fr; }
  .email-result-facts > div, .email-result-facts > div:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .email-result-facts > div:last-child { border-bottom: 0; }
}

/* System status page (execution-plane boundary view) */
.plane-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.plane-dot.online { background: #1a9e77; box-shadow: 0 0 0 3px rgba(26, 158, 119, .14); }
.plane-dot.standby { background: #9aa4ad; }
.plane-role { display: grid; gap: 7px; padding: 15px; background: #fafcfb; border: 1px solid var(--line); border-radius: 11px; }
.plane-role header { display: flex; align-items: center; gap: 8px; }
.plane-role p { margin: 0; font-size: 13px; }
.plane-role small { color: var(--muted); font-size: 12px; }
.role-chip { margin-left: auto; padding: 3px 9px; color: var(--teal); background: var(--teal-soft); border-radius: 999px; font-size: 11px; font-weight: 700; }
.lock-chip { display: inline-block; padding: 2px 8px; color: #a6261d; background: #fdecea; border-radius: 999px; font-size: 11px; font-weight: 700; }
.panel-aside-note { margin: 0; color: var(--muted); font-size: 12px; }
.muted-note { margin-left: 8px; color: var(--muted); font-size: 11px; }

/* Acquisition page (Hermes execution-plane boundary view) */
.metric-zero { color: var(--muted); }
.acquisition-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.acquisition-main, .acquisition-side { display: grid; gap: 20px; }
.plan-empty { display: grid; gap: 12px; padding: 18px 20px; background: #fafcfb; border: 1px dashed var(--line-strong); border-radius: 11px; }
.plan-empty strong { font-size: 15px; }
.capture-steps { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.capture-steps code { font-size: 12px; }
.plan-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.plan-actions .panel-aside-note { max-width: 420px; }
.policy-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.policy-chip.ok { color: #075e54; background: #e5f5f0; }
.policy-chip.blocked { color: #a6261d; background: #fdecea; }
.sha-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #1a9e77; vertical-align: middle; }
.tech-details { margin-top: 12px; font-size: 12px; color: var(--muted); }
.tech-details summary { cursor: pointer; font-weight: 600; }
.tech-details p { margin: 8px 0 0; }
@media (max-width: 980px) {
  .acquisition-layout { grid-template-columns: 1fr; }
}

/* Evidence pipeline page (admission distribution and gap sections) */
.conclusion-figure { display: grid; justify-items: center; align-content: center; min-width: 110px; }
.conclusion-figure strong { font-size: 44px; line-height: 1; }
.conclusion-figure span { color: inherit; font-size: 12px; opacity: .8; }
.admission-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.admission-chip { display: grid; justify-items: center; gap: 3px; padding: 14px; border-radius: 11px; border: 1px solid var(--line); background: #fafcfb; }
.admission-chip strong { font-size: 26px; }
.admission-chip span { font-size: 12px; color: var(--muted); }
.admission-chip.muted strong { color: var(--muted); }
.admission-chip.conflict { border-color: #d9c2ee; background: #faf6fe; }
.admission-chip.conflict strong { color: #6b21a8; }
.admission-chip.review { border-color: #f0d9a8; background: #fefaf2; }
.admission-chip.review strong { color: #92610a; }
.admission-chip.ready { border: 1.5px solid #1a9e77; background: transparent; }
.admission-chip.ready strong { color: #075e54; }
.badge-ready { color: #075e54; background: transparent; border: 1.5px solid #1a9e77; }
.next-step small { color: var(--muted); }
.gap-panel { align-self: start; }
.gap-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.gap-item:last-child { border-bottom: 0; }
.gap-item header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gap-item p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.gap-more { margin-top: 10px; font-size: 12px; }
.gap-more summary { cursor: pointer; color: var(--teal); font-weight: 600; }
@media (max-width: 980px) {
  .admission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
