:root {
  --paper: #f7f2e8;
  --paper-2: #fffaf0;
  --ink: #241f19;
  --muted: #6c6255;
  --line: #ded1bd;
  --soil: #2f2218;
  --green: #244c31;
  --green-2: #16331f;
  --amber: #e1b43f;
  --clay: #b95f3c;
  --white: #fffefa;
  --shadow: 0 22px 70px rgba(61, 43, 27, 0.14);
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  background: rgba(247, 242, 232, 0.88);
  border-bottom: 1px solid rgba(83, 58, 38, 0.14);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(36, 31, 25, 0.12);
  border-radius: var(--radius);
  object-fit: cover;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a,
.site-footer a,
.login-link {
  text-decoration: none;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-link {
  color: var(--green);
  font-weight: 850;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 14px 28px rgba(36, 76, 49, 0.18);
}

.button.secondary {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--soil);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
  gap: 34px;
  width: min(1180px, calc(100% - 40px));
  margin: 26px auto 0;
  align-items: start;
}

.hero-copy {
  padding: 12px 0 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 18px;
  font-size: clamp(3.4rem, 5.6vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 650px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-proof div {
  padding: 13px 14px 13px 0;
}

.hero-proof div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.hero-proof dt {
  font-size: 1.22rem;
  font-weight: 900;
}

.hero-proof dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-preview {
  padding: 16px;
  background: var(--soil);
  border: 1px solid rgba(255, 254, 250, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--white);
}

.preview-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 12px;
}

.preview-top h2 {
  margin-bottom: 0;
  font-size: 1.32rem;
}

.status-pill,
.lead-card span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  background: rgba(225, 180, 63, 0.18);
  border: 1px solid rgba(225, 180, 63, 0.35);
  border-radius: 999px;
  color: #f6cc61;
  font-size: 0.78rem;
  font-weight: 850;
}

.lead-card {
  padding: 11px;
  margin-bottom: 8px;
  background: rgba(255, 254, 250, 0.08);
  border: 1px solid rgba(255, 254, 250, 0.12);
  border-radius: var(--radius);
}

.lead-card.is-hot {
  background: rgba(225, 180, 63, 0.12);
  border-color: rgba(225, 180, 63, 0.38);
}

.lead-card h3 {
  margin: 7px 0 4px;
  font-size: 0.98rem;
}

.lead-card p,
.dispatch-grid p {
  margin-bottom: 0;
  color: rgba(255, 254, 250, 0.68);
  font-size: 0.84rem;
  line-height: 1.32;
}

.dispatch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.dispatch-grid div {
  padding: 11px;
  background: rgba(255, 254, 250, 0.08);
  border: 1px solid rgba(255, 254, 250, 0.12);
  border-radius: var(--radius);
}

.dispatch-grid strong {
  font-size: 0.92rem;
}

@media (min-width: 941px) and (max-height: 720px) {
  .site-header {
    min-height: 58px;
  }

  .hero {
    margin-top: 18px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  h1 {
    max-width: 600px;
    margin-bottom: 14px;
    font-size: clamp(3.05rem, 4.8vw, 4.75rem);
  }

  .hero-lede {
    max-width: 610px;
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.43;
  }

  .hero-actions {
    margin-bottom: 18px;
  }

  .hero-proof div {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .dashboard-preview {
    padding: 14px;
  }

  .lead-card {
    padding: 10px;
  }
}

.platform,
.email-dispatch,
.funnels,
.pricing,
.demo,
.login-panel,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.platform {
  padding: 86px 0 42px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 28px;
}

.section-heading h2,
.funnels h2,
.demo h2,
.login-panel h2 {
  max-width: 700px;
  margin-bottom: 0;
  font-size: clamp(2.25rem, 4.5vw, 4.3rem);
  line-height: 0.98;
}

.section-heading p,
.funnels p,
.demo p,
.login-panel p {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feature-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-grid article,
.pricing-grid article {
  min-height: 230px;
  padding: 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-grid span {
  color: var(--clay);
  font-weight: 900;
}

.feature-grid h3,
.pricing-grid h3 {
  margin: 18px 0 10px;
  font-size: 1.25rem;
}

.feature-grid p,
.pricing-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.email-dispatch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 32px;
  align-items: start;
  padding: 36px;
  margin-top: 28px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.email-dispatch h2 {
  max-width: 700px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 4.5vw, 4.3rem);
  line-height: 0.98;
}

.email-dispatch p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.65;
}

.dispatch-list {
  display: grid;
  gap: 12px;
}

.dispatch-list article {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dispatch-list span {
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dispatch-list h3 {
  margin: 10px 0 8px;
}

.dispatch-list p {
  margin-bottom: 14px;
}

.funnels,
.demo,
.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: 34px;
  align-items: center;
  margin-top: 44px;
  padding: 36px;
  background: var(--green-2);
  border-radius: var(--radius);
  color: var(--white);
}

.funnels p,
.demo p,
.login-panel p {
  color: rgba(255, 254, 250, 0.72);
}

.funnel-list {
  display: grid;
  gap: 10px;
}

.funnel-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  background: rgba(255, 254, 250, 0.08);
  border: 1px solid rgba(255, 254, 250, 0.13);
  border-radius: var(--radius);
  color: var(--white);
  font-weight: 850;
  text-decoration: none;
}

.funnel-list span {
  color: #f6cc61;
  font-size: 0.86rem;
}

.pricing {
  padding: 72px 0 8px;
}

.pricing-grid .featured {
  background: var(--soil);
  border-color: var(--soil);
  color: var(--white);
}

.pricing-grid strong {
  display: block;
  margin-top: 24px;
}

.demo-form,
.access-card {
  padding: 22px;
  background: var(--white);
  border-radius: var(--radius);
  color: var(--ink);
}

.access-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--soil);
  font-size: 1.15rem;
}

.access-card p {
  margin-bottom: 18px;
  color: var(--muted);
}

.demo-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--soil);
  font-size: 0.82rem;
  font-weight: 850;
}

.demo-form input {
  width: 100%;
  height: 46px;
  margin-bottom: 14px;
  padding: 0 13px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

.demo-form .button {
  width: 100%;
  margin-top: 4px;
}

.login-panel {
  grid-template-columns: 1fr auto;
  margin-top: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink);
}

.login-panel p {
  max-width: 760px;
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 34px 0 44px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer > a {
  color: var(--green);
  font-weight: 850;
}

.auth-page,
.dashboard-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(36, 76, 49, 0.12), rgba(185, 95, 60, 0.08)),
    var(--paper);
}

.auth-shell {
  display: grid;
  width: min(520px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  align-content: center;
  gap: 22px;
  padding: 44px 0;
}

.auth-card {
  padding: 28px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-bottom: 14px;
  font-size: clamp(2.65rem, 10vw, 4.2rem);
  line-height: 0.94;
}

.auth-card p {
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  margin-top: 22px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--soil);
  font-size: 0.82rem;
  font-weight: 850;
}

.auth-form input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

.auth-form .button {
  width: 100%;
}

.auth-message {
  min-height: 22px;
  margin: 10px 0 14px;
  color: var(--green);
  font-size: 0.9rem;
}

.auth-message.is-error {
  color: var(--clay);
}

.auth-footnote {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-footnote a {
  color: var(--green);
  font-weight: 850;
}

.access-page {
  min-height: 100vh;
  background: var(--paper);
}

.access-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
  gap: 30px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 58px;
  align-items: start;
}

.access-intro {
  position: sticky;
  top: 88px;
  padding-top: 10px;
}

.access-intro h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 6vw, 5.35rem);
  line-height: 0.92;
}

.access-intro p {
  color: var(--muted);
  line-height: 1.6;
}

.access-form {
  padding: 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.access-form label {
  display: block;
  margin: 0 0 8px;
  color: var(--soil);
  font-size: 0.82rem;
  font-weight: 850;
}

.access-form input,
.access-form select,
.access-form textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 0 13px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

.access-form input,
.access-form select {
  min-height: 46px;
}

.access-form select[multiple],
.access-form textarea {
  min-height: 116px;
  padding-top: 12px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.form-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 850;
}

.form-status.is-error {
  color: var(--clay);
}

.dashboard-header,
.dashboard-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.dashboard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-weight: 850;
}

.dashboard-nav a {
  text-decoration: none;
}

.dashboard-shell {
  padding: 30px 0 54px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 24px;
  align-items: end;
}

.dashboard-hero h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.92;
}

.dashboard-hero p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.dashboard-metrics article {
  min-height: 112px;
  padding: 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dashboard-metrics span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 2rem;
  font-weight: 900;
}

.dashboard-metrics small {
  color: var(--muted);
  font-weight: 850;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 450px);
  gap: 16px;
  margin-top: 24px;
}

.dashboard-panel {
  padding: 18px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 13px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--soil);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

.table-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  background: rgba(36, 76, 49, 0.1);
  border: 1px solid rgba(36, 76, 49, 0.2);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.contact-list,
.access-request-list {
  display: grid;
  gap: 12px;
  max-height: 630px;
  overflow: auto;
  padding-right: 4px;
}

.contact-list article,
.access-request-list article {
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-list h3,
.access-request-list h3 {
  margin-bottom: 7px;
  font-size: 1.04rem;
}

.access-request-list h3 span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  margin-left: 8px;
  padding: 0 8px;
  background: rgba(36, 76, 49, 0.1);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.74rem;
  vertical-align: middle;
}

.contact-list p,
.access-request-list p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.contact-list dl,
.access-request-list dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.contact-list div,
.access-request-list div {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
}

.contact-list dt,
.access-request-list dt {
  color: var(--soil);
  font-size: 0.78rem;
  font-weight: 900;
}

.contact-list dd,
.access-request-list dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.contact-list a,
.access-request-list a {
  color: var(--green);
}

.crm-shell {
  width: min(1360px, calc(100% - 24px));
  padding-top: 18px;
}

.crm-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 540px);
  gap: 18px;
  align-items: end;
}

.crm-topbar h1 {
  max-width: none;
  margin-bottom: 8px;
  font-size: clamp(2.25rem, 4.2vw, 3.85rem);
  line-height: 0.96;
}

.crm-topbar p {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.crm-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 170px auto;
  gap: 10px;
  align-items: end;
  margin: 16px 0;
  padding: 12px;
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.export-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -8px 0 16px;
  padding: 0 2px;
}

.export-strip span {
  color: var(--soil);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.export-strip a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.crm-toolbar label,
.contact-tools label,
.workflow-form label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.crm-toolbar span,
.contact-tools span,
.workflow-form span {
  color: var(--soil);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-toolbar input,
.crm-toolbar select,
.contact-tools input,
.workflow-form input,
.workflow-form select,
.workflow-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.95rem;
}

.workflow-form textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

.crm-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(420px, 1fr) minmax(320px, 400px);
  gap: 12px;
  align-items: start;
}

.crm-grid .dashboard-panel {
  min-height: min(590px, calc(100vh - 178px));
  padding: 14px;
  overflow: hidden;
}

.panel-head.compact {
  margin-bottom: 12px;
}

.panel-head.compact .eyebrow {
  margin-bottom: 5px;
}

.panel-head.compact h2 {
  font-size: 1.32rem;
  line-height: 1.1;
}

.queue-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.queue-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
}

.queue-tabs button.is-active {
  background: var(--soil);
  border-color: var(--soil);
  color: var(--white);
}

.queue-list,
.detail-panel,
.crm-side-panel .contact-list {
  max-height: calc(100vh - 266px);
  min-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.queue-item {
  display: grid;
  width: 100%;
  gap: 7px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.queue-item.is-selected {
  border-color: rgba(36, 76, 49, 0.58);
  box-shadow: inset 4px 0 0 var(--green);
}

.queue-item-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.queue-item strong {
  color: var(--ink);
  line-height: 1.22;
}

.queue-item small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.table-pill.high {
  background: rgba(185, 95, 60, 0.13);
  border-color: rgba(185, 95, 60, 0.3);
  color: var(--clay);
}

.table-pill.low {
  background: rgba(108, 98, 85, 0.1);
  border-color: rgba(108, 98, 85, 0.22);
  color: var(--muted);
}

.table-pill.disqualified,
.table-pill.contact-hold {
  background: rgba(143, 61, 36, 0.12);
  border-color: rgba(143, 61, 36, 0.3);
  color: #8f3d24;
}

.sync-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.sync-status.is-ok {
  border-color: rgba(36, 76, 49, 0.24);
  color: var(--green);
}

.sync-status.is-warn,
.sync-status.is-error {
  border-color: rgba(185, 95, 60, 0.3);
  color: var(--clay);
}

.detail-card {
  display: grid;
  gap: 14px;
}

.detail-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-title h3 {
  margin-bottom: 5px;
  font-size: 1.32rem;
  line-height: 1.18;
}

.detail-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.detail-grid div {
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-grid dt {
  margin-bottom: 5px;
  color: var(--soil);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.lead-workflow-sections,
.detail-section,
.vendor-recommendation-list {
  display: grid;
  gap: 12px;
}

.detail-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
}

.detail-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.detail-section-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.detail-section-head p,
.detail-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.vendor-recommendation-list {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.vendor-recommendation-list article {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.vendor-recommendation-list article > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.vendor-recommendation-list strong {
  color: var(--ink);
}

.vendor-recommendation-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.workflow-form {
  display: grid;
  gap: 12px;
}

.workflow-form .form-row {
  gap: 10px;
}

.workflow-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.86rem;
}

.contact-tools {
  margin-bottom: 10px;
}

.crm-side-panel .contact-list {
  display: grid;
  gap: 9px;
}

.crm-side-panel .contact-list article {
  padding: 12px;
}

.crm-side-panel .contact-list article > div:first-child {
  display: flex;
  grid-template-columns: none;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.match-score {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  background: rgba(225, 180, 63, 0.18);
  border-radius: 999px;
  color: var(--soil);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.dispatch-log {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dispatch-log h3 {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.dispatch-log p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.dashboard-header-v2,
.workspace-shell {
  width: min(1240px, calc(100% - 20px));
}

.dashboard-view-nav {
  align-items: center;
  gap: 8px;
}

.dashboard-view-nav button {
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
}

.engine-nav-group-label {
  display: block;
  margin: 14px 10px 6px;
  color: rgba(255, 255, 255, 0.46);
  font: 700 10px/1 "Inter", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-view-nav button.is-active {
  background: var(--soil);
  border-color: var(--soil);
  color: var(--white);
}

.workspace-shell {
  padding-top: 14px;
}

.workspace-topbar {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
}

.workspace-topbar h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.35rem);
}

.workspace-toolbar {
  grid-template-columns: minmax(220px, 1fr) 160px 150px auto auto;
  margin: 12px 0;
}

.protocol-overview {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(440px, 1.2fr) minmax(300px, 0.9fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.protocol-brief,
.protocol-selected {
  min-height: 148px;
  padding: 14px;
}

.protocol-brief {
  display: grid;
  gap: 12px;
}

.protocol-brief h2,
.protocol-selected h3 {
  margin-bottom: 7px;
  font-size: 1.32rem;
  line-height: 1.1;
}

.protocol-brief p,
.protocol-selected p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.protocol-bands {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.protocol-bands span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.protocol-bands strong {
  color: var(--soil);
}

.protocol-bands .market-protocol {
  border-color: rgba(36, 76, 49, 0.2);
  background: rgba(36, 76, 49, 0.07);
}

.protocol-bands .market-protocol.cloned {
  border-color: rgba(185, 95, 60, 0.22);
  background: rgba(185, 95, 60, 0.08);
}

.protocol-queue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.protocol-bucket {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  min-height: 70px;
  padding: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.protocol-bucket span {
  color: var(--soil);
  font-size: 0.9rem;
  font-weight: 900;
}

.protocol-bucket strong {
  color: var(--green);
  font-size: 1.7rem;
  line-height: 1;
}

.protocol-bucket small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.32;
}

.protocol-bucket:hover {
  border-color: rgba(36, 76, 49, 0.38);
  transform: translateY(-1px);
}

.protocol-selected {
  display: grid;
  gap: 10px;
}

.protocol-selected-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.protocol-status-line,
.protocol-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.protocol-status-line span,
.protocol-checks span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.protocol-status.dispatch-ready,
.protocol-checks .ok {
  border-color: rgba(36, 76, 49, 0.24);
  background: rgba(36, 76, 49, 0.1);
  color: var(--green);
}

.protocol-status.needs-info,
.protocol-status.disqualified,
.protocol-status.contact-hold,
.protocol-checks .missing {
  border-color: rgba(185, 95, 60, 0.3);
  background: rgba(185, 95, 60, 0.12);
  color: var(--clay);
}

.protocol-checks .warn {
  border-color: rgba(225, 180, 63, 0.42);
  background: rgba(225, 180, 63, 0.16);
  color: var(--soil);
}

.workspace-panel[hidden] {
  display: none;
}

.workspace-panel {
  display: none;
}

.workspace-panel.is-active {
  display: block;
}

.workspace-grid {
  display: grid;
  gap: 12px;
  align-items: start;
}

.intake-grid {
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
}

.qualification-grid,
.dispatch-workspace-grid,
.lead-search-grid,
.bridge-workspace-grid,
.access-workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
}

.workspace-grid .dashboard-panel {
  min-height: min(560px, calc(100vh - 250px));
  padding: 14px;
  overflow: hidden;
}

.qualification-grid > .dashboard-panel:first-child {
  overflow-x: auto;
}

.workspace-grid .queue-list,
.workspace-grid .detail-panel,
.workspace-grid .contact-list,
.dispatch-lead-list,
.lead-search-list,
.bridge-workspace-grid .lead-search-list,
.access-request-list {
  max-height: calc(100vh - 340px);
  min-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.workspace-grid .detail-panel {
  max-height: calc(100vh - 314px);
}

.queue-badges,
.detail-badges,
.stage-card-top {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
}

.detail-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.score-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(36, 76, 49, 0.2);
  border-radius: 999px;
  background: rgba(36, 76, 49, 0.1);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.score-pill.hot {
  border-color: rgba(185, 95, 60, 0.35);
  background: rgba(185, 95, 60, 0.13);
  color: var(--clay);
}

.score-pill.warm {
  border-color: rgba(225, 180, 63, 0.45);
  background: rgba(225, 180, 63, 0.18);
  color: var(--soil);
}

.score-pill.nurture,
.score-pill.unscored {
  border-color: rgba(108, 98, 85, 0.22);
  background: rgba(108, 98, 85, 0.1);
  color: var(--muted);
}

.qualification-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: rgba(225, 180, 63, 0.13);
  border: 1px solid rgba(225, 180, 63, 0.34);
  border-radius: var(--radius);
  color: var(--soil);
}

.qualification-summary strong {
  line-height: 1.35;
}

.qualification-summary span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.routing-plan {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(20, 81, 63, 0.08);
  border: 1px solid rgba(20, 81, 63, 0.2);
  border-radius: var(--radius);
}

.routing-plan > div:first-child {
  display: grid;
  gap: 4px;
}

.routing-plan span,
.routing-mini dt {
  color: var(--soil);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.routing-plan strong {
  color: var(--ink);
  line-height: 1.25;
}

.routing-plan p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.routing-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.routing-mini div {
  min-width: 0;
  padding: 8px;
  background: rgba(255, 254, 250, 0.75);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.routing-mini dd {
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.32;
}

.routing-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.routing-lanes span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  background: rgba(20, 81, 63, 0.08);
  border: 1px solid rgba(20, 81, 63, 0.18);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
}

.qualification-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(178px, 1fr));
  gap: 10px;
  min-width: 1080px;
}

.stage-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: calc(100vh - 342px);
  padding: 10px;
  background: rgba(255, 250, 240, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stage-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.stage-column h3 {
  margin: 0;
  font-size: 0.95rem;
}

.stage-column header span {
  display: inline-flex;
  min-width: 26px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--white);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.stage-column > div {
  display: grid;
  gap: 8px;
}

.stage-column p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.stage-card,
.dispatch-lead-list .stage-card {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 11px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.stage-card.is-selected {
  border-color: rgba(36, 76, 49, 0.58);
  box-shadow: inset 4px 0 0 var(--green);
}

.stage-card strong {
  color: var(--ink);
  line-height: 1.2;
}

.stage-card small,
.stage-card em {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.stage-card em {
  font-style: normal;
}

.dispatch-summary {
  margin-bottom: 12px;
}

.dispatch-lane-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.dispatch-lane {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  min-height: 72px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.dispatch-lane span {
  color: var(--soil);
  font-size: 0.82rem;
  font-weight: 900;
}

.dispatch-lane strong {
  color: var(--green);
  font-size: 1.45rem;
  line-height: 1;
}

.dispatch-lane small {
  grid-column: 1 / -1;
  line-height: 1.25;
}

.dispatch-lane:hover,
.dispatch-lane.is-active {
  border-color: rgba(20, 81, 63, 0.44);
  box-shadow: inset 3px 0 0 var(--green);
}

.dispatch-summary article {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(36, 76, 49, 0.08);
  border: 1px solid rgba(36, 76, 49, 0.18);
  border-radius: var(--radius);
}

.dispatch-summary h3 {
  margin-bottom: 6px;
  font-size: 1.18rem;
}

.dispatch-summary p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.dispatch-lead-list {
  display: grid;
  gap: 8px;
  min-height: 250px;
}

.lead-search-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.lead-search-summary div {
  padding: 10px;
  background: rgba(20, 81, 63, 0.08);
  border: 1px solid rgba(20, 81, 63, 0.18);
  border-radius: var(--radius);
}

.lead-search-summary strong {
  display: block;
  color: var(--green);
  font-size: 1.45rem;
  line-height: 1;
}

.lead-search-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.lead-search-list {
  display: grid;
  gap: 8px;
}

.bridge-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.bridge-config-card {
  padding: 12px;
  border: 1px solid rgba(20, 81, 63, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.bridge-config-card span,
.bridge-config-card small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.bridge-config-card strong {
  display: block;
  margin: 4px 0;
  color: var(--green);
}

.bridge-config-card p {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.84rem;
}

.content-admin-panel {
  min-height: 680px;
}

.content-admin-list {
  margin-top: 14px;
  max-height: calc(100vh - 350px);
}

.content-admin-row .workflow-actions {
  margin-top: 10px;
}

.content-admin-row small a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.process-panel {
  min-height: 680px;
}

.process-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 14px;
  align-items: start;
}

.process-sop,
.process-outreach-rules {
  padding: 14px;
  border: 1px solid rgba(20, 81, 63, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.process-sop {
  position: sticky;
  top: 18px;
}

.process-sop h3,
.process-outreach-rules h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.process-sop ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.process-outreach-rules {
  margin-top: 12px;
}

.process-outreach-rules p,
.process-outreach-rules small {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.process-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.process-meta span {
  padding: 4px 7px;
  border: 1px solid rgba(20, 81, 63, 0.14);
  border-radius: 999px;
  background: rgba(20, 81, 63, 0.06);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.panel-head.subhead {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 81, 63, 0.12);
}

.marketing-panel {
  margin-top: 14px;
}

.workspace-panel .marketing-panel {
  margin-top: 0;
}

.marketing-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.marketing-toolbar label,
.marketing-field,
.image-field label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.marketing-toolbar span,
.marketing-field span,
.marketing-actions span {
  color: var(--soil);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.marketing-toolbar select,
.marketing-field input,
.marketing-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.95rem;
}

.marketing-field textarea {
  min-height: 84px;
  padding-top: 10px;
  line-height: 1.45;
  resize: vertical;
}

.marketing-form {
  display: grid;
  gap: 12px;
}

.marketing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 12px;
}

.edit-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.edit-card h3 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.edit-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.editor-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.blog-editor-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-item {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.editor-item strong {
  color: var(--green);
  font-size: 0.82rem;
}

.image-field {
  display: grid;
  gap: 8px;
}

.image-field input[type="file"] {
  min-height: 36px;
  padding: 7px;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.marketing-actions span {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.cms-workbench {
  grid-template-columns: 190px minmax(420px, 1fr) minmax(310px, 360px);
  grid-template-areas:
    "outline canvas inspector"
    "publish publish publish";
  align-items: stretch;
}

.cms-outline,
.cms-canvas,
.cms-inspector {
  max-height: min(720px, calc(100vh - 150px));
  overflow: auto;
}

.cms-outline {
  grid-area: outline;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
  background: rgba(255, 254, 250, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cms-page-label {
  margin: 8px 4px 2px;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cms-outline button,
.cms-item-head button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.cms-outline button {
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
}

.cms-outline button.is-active {
  background: var(--soil);
  border-color: var(--soil);
  color: var(--white);
}

.cms-canvas {
  grid-area: canvas;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.88), rgba(247, 242, 232, 0.98)),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cms-inspector {
  grid-area: inspector;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cms-inspector h3 {
  margin-bottom: 0;
  font-size: 1.12rem;
}

.cms-publish-bar {
  grid-area: publish;
  justify-content: space-between;
  padding: 10px 2px 0;
}

.cms-page-preview {
  --cms-preview-scale: 0.72;
  min-width: 0;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(246, 241, 232, 0.98));
  border: 1px solid rgba(86, 56, 35, 0.16);
  border-radius: var(--radius);
  color: var(--ink);
}

.cms-preview-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  align-items: center;
  padding: 0 8px;
  background: rgba(255, 254, 250, 0.9);
  border-bottom: 1px solid rgba(86, 56, 35, 0.14);
}

.cms-preview-header strong {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
}

.cms-preview-header span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.cms-preview-section {
  position: relative;
  border-radius: var(--radius);
  transition:
    box-shadow 160ms ease,
    outline-color 160ms ease;
}

.cms-preview-section.is-selected {
  outline: 2px solid rgba(225, 180, 63, 0.88);
  outline-offset: 4px;
  box-shadow: 0 16px 42px rgba(61, 43, 27, 0.1);
}

.cms-preview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: var(--cms-section-gap);
  margin-top: var(--cms-hero-top);
  align-items: start;
}

.cms-preview-hero > div:first-child {
  padding-top: var(--cms-hero-copy-top);
}

.cms-preview-hero h1 {
  max-width: 640px;
  margin-bottom: 18px;
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  line-height: 0.94;
}

.cms-lede {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.cms-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cms-preview-form {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--white);
  border: 1px solid rgba(86, 56, 35, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(69, 48, 29, 0.12);
}

.cms-preview-form h2 {
  margin: 0 0 6px;
  font-size: 1.28rem;
}

.cms-preview-fields {
  display: grid;
  gap: 7px;
}

.cms-preview-fields span {
  display: flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
}

.cms-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

.cms-preview-photo {
  height: var(--cms-photo-height);
  margin-top: var(--cms-photo-top);
  overflow: hidden;
  border: 1px solid rgba(86, 56, 35, 0.18);
  border-radius: var(--radius);
}

.cms-preview-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cms-preview-photo p {
  position: sticky;
  bottom: 0;
  margin: -74px 0 0;
  padding: 18px;
  background: linear-gradient(180deg, transparent, rgba(47, 34, 24, 0.72));
  color: var(--white);
  font-size: 1.04rem;
  font-weight: 850;
}

.cms-preview-services {
  padding: var(--cms-services-top) 0 32px;
}

.cms-preview-guides {
  padding: var(--cms-guides-top) 0 32px;
}

.cms-preview-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
  gap: 24px;
  margin-bottom: 22px;
}

.cms-preview-heading h2,
.cms-preview-steps h2,
.cms-preview-engine h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.8rem);
  line-height: 1;
}

.cms-preview-heading p,
.cms-preview-engine p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.cms-preview-service-grid,
.cms-preview-blog-grid {
  display: grid;
  gap: var(--cms-card-gap);
}

.cms-preview-service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cms-preview-service-grid article {
  min-height: var(--cms-service-card-min);
  padding: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cms-preview-service-grid h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.cms-preview-service-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.cms-preview-blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cms-preview-blog-grid article {
  display: grid;
  grid-template-rows: var(--cms-guide-image-height) 1fr;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cms-preview-blog-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cms-preview-blog-grid article > div {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.cms-preview-blog-grid span {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cms-preview-blog-grid h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.18;
}

.cms-preview-blog-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
}

.cms-preview-blog-grid strong {
  color: var(--green);
  font-size: 0.9rem;
}

.cms-preview-steps {
  padding: var(--cms-steps-padding);
  background: var(--soil);
  color: var(--white);
}

.cms-preview-steps .eyebrow {
  color: #f4c95f;
}

.cms-preview-steps ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.cms-preview-steps li {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 254, 250, 0.18);
}

.cms-preview-steps li span {
  color: rgba(255, 254, 250, 0.72);
  line-height: 1.45;
}

.cms-preview-engine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: var(--cms-engine-top);
  padding: 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cms-preview-engine .cms-preview-actions {
  display: grid;
  min-width: 190px;
  margin-top: 0;
}

[contenteditable="true"] {
  border-radius: 5px;
  cursor: text;
}

[contenteditable="true"]:focus {
  outline: 2px solid rgba(36, 76, 49, 0.45);
  outline-offset: 2px;
  background: rgba(255, 254, 250, 0.52);
}

.cms-list-editor {
  grid-template-columns: 1fr;
  max-height: 360px;
  overflow: auto;
}

.cms-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.cms-item-head button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--clay);
  font-size: 0.78rem;
}

.cms-spacing-controls {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.range-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.range-field span,
.range-field input {
  grid-column: 1 / -1;
}

.range-field output {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.cms-mini-card {
  padding: 10px;
  background: #fbf7ef;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(225, 180, 63, 0.72);
  outline-offset: 3px;
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero,
  .email-dispatch,
  .funnels,
  .demo,
  .login-panel,
  .access-shell,
  .dashboard-hero,
  .dashboard-grid,
  .crm-topbar,
  .workspace-topbar,
  .protocol-overview,
  .workspace-grid,
  .crm-grid,
  .marketing-grid,
  .process-layout,
  .editor-list,
  .blog-editor-list {
    grid-template-columns: 1fr;
  }

  .crm-toolbar,
  .workspace-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .crm-grid .dashboard-panel,
  .workspace-grid .dashboard-panel,
  .queue-list,
  .detail-panel,
  .workspace-grid .queue-list,
  .workspace-grid .detail-panel,
  .workspace-grid .contact-list,
  .dispatch-lead-list,
  .access-request-list,
  .crm-side-panel .contact-list {
    max-height: none;
    min-height: auto;
  }

  .qualification-board {
    min-width: 980px;
  }

  .protocol-queue {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .access-intro {
    position: static;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 14px;
  }

  .feature-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .cms-workbench {
    grid-template-columns: 1fr;
    grid-template-areas:
      "outline"
      "canvas"
      "inspector"
      "publish";
  }

  .cms-outline,
  .cms-canvas,
  .cms-inspector {
    max-height: none;
  }

  .cms-preview-hero,
  .cms-preview-heading,
  .cms-preview-engine {
    grid-template-columns: 1fr;
  }

  .cms-preview-service-grid,
  .cms-preview-blog-grid,
  .cms-preview-steps ol {
    grid-template-columns: 1fr;
  }

  .process-sop {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .platform,
  .email-dispatch,
  .funnels,
  .pricing,
  .demo,
  .login-panel,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .dashboard-header,
  .dashboard-shell,
  .access-shell {
    width: min(100% - 28px, 1180px);
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  h1 {
    font-size: clamp(3.1rem, 14vw, 4.7rem);
  }

  .hero-proof,
  .dispatch-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero-proof div,
  .hero-proof div + div {
    padding: 14px 0;
    border-left: 0;
  }

  .hero-proof div + div {
    border-top: 1px solid var(--line);
  }

  .funnels,
  .demo,
  .login-panel {
    padding: 22px;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .protocol-queue {
    grid-template-columns: 1fr;
  }

  .crm-toolbar,
  .workspace-toolbar,
  .detail-grid,
  .workflow-form .form-row,
  .routing-mini {
    grid-template-columns: 1fr;
  }

  .dashboard-view-nav {
    width: 100%;
  }

  .dashboard-view-nav button,
  .dashboard-view-nav a {
    flex: 1 1 auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .login-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Dirt Lead Engine dashboard blend: preserves the live CRM app while matching the reference dashboard shell. */
.dashboard-layout-v3 {
  --engine-bg: #f6f7f4;
  --engine-surface: #ffffff;
  --engine-surface-soft: #eef5f1;
  --engine-ink: #15201d;
  --engine-muted: #68746f;
  --engine-line: #d8e0dc;
  --engine-green: #14513f;
  --engine-green-2: #20755e;
  --engine-gold: #e8b04b;
  --engine-shadow: 0 18px 50px rgba(20, 42, 35, 0.08);
  background: var(--engine-bg);
  color: var(--engine-ink);
  overflow-x: hidden;
}

.engine-app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.engine-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  padding: 20px 16px;
  background: #0f3f33;
  color: #f8fffb;
}

.engine-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fffb;
  text-decoration: none;
}

.engine-brand img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  object-fit: cover;
}

.engine-brand strong,
.engine-brand small {
  display: block;
}

.engine-brand strong {
  font-size: 0.96rem;
  line-height: 1.15;
}

.engine-brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
}

.engine-build-pill {
  width: fit-content;
  margin-top: -12px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.7rem;
  font-weight: 850;
}

.engine-nav {
  display: grid;
  gap: 6px;
}

.engine-nav button {
  display: flex;
  min-height: 42px;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
  text-align: left;
}

.engine-nav button:hover,
.engine-nav button:focus-visible,
.engine-nav button.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  outline: none;
}

.engine-nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: var(--engine-gold);
  font-size: 0.74rem;
  font-weight: 900;
}

.engine-sidebar-footer {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
}

.engine-sidebar-footer span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
}

.engine-sidebar-footer strong {
  font-size: 0.88rem;
  line-height: 1.35;
}

.engine-main.dashboard-shell,
.engine-main.crm-shell,
.engine-main.workspace-shell {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 22px 24px 44px;
}

.engine-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 28px;
  margin-bottom: 18px;
}

.engine-topbar > div:first-child {
  min-width: 0;
  flex: 1 1 520px;
}

.engine-topbar h1 {
  margin-bottom: 7px;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  line-height: 1.04;
}

.engine-topbar p {
  max-width: 760px;
  margin: 0;
  color: var(--engine-muted);
  line-height: 1.45;
}

.engine-topbar-actions {
  display: grid;
  flex: 1 1 540px;
  max-width: 660px;
  grid-template-columns: repeat(3, minmax(136px, 1fr));
  align-items: stretch;
  justify-content: end;
  gap: 10px;
}

.engine-topbar-actions > * {
  width: 100%;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.12;
}

.engine-logout {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--engine-line);
  border-radius: 6px;
  background: var(--engine-surface);
  color: var(--engine-green);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.engine-analytics {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.engine-analytics-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.engine-analytics-head h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.engine-review-stamp {
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid var(--engine-line);
  border-radius: 6px;
  background: var(--engine-surface);
  text-align: right;
}

.engine-review-stamp span,
.engine-review-stamp strong {
  display: block;
}

.engine-review-stamp span {
  color: var(--engine-muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.engine-review-stamp strong {
  margin-top: 4px;
  font-size: 0.9rem;
}

.dashboard-layout-v3 .dashboard-metrics {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
}

.dashboard-layout-v3 .dashboard-metrics article,
.dashboard-layout-v3 .dashboard-panel {
  border-color: var(--engine-line);
  border-radius: 6px;
  background: var(--engine-surface);
  box-shadow: 0 12px 30px rgba(20, 42, 35, 0.05);
}

.dashboard-layout-v3 .dashboard-metrics article {
  min-height: 106px;
  padding: 15px;
}

.dashboard-layout-v3 .dashboard-metrics span {
  margin: 0 0 4px;
  color: var(--engine-green);
  font-size: 2.2rem;
  line-height: 1;
}

.dashboard-layout-v3 .dashboard-metrics small {
  color: var(--engine-muted);
  font-size: 0.78rem;
}

.dashboard-layout-v3 .crm-toolbar {
  grid-template-columns: minmax(220px, 1fr) 160px 150px auto;
  margin: 14px 0 12px;
  border-color: var(--engine-line);
  background: var(--engine-surface);
  box-shadow: 0 12px 30px rgba(20, 42, 35, 0.04);
}

.dashboard-layout-v3 .crm-toolbar input,
.dashboard-layout-v3 .crm-toolbar select,
.dashboard-layout-v3 .contact-tools input,
.dashboard-layout-v3 .workflow-form input,
.dashboard-layout-v3 .workflow-form select,
.dashboard-layout-v3 .workflow-form textarea,
.dashboard-layout-v3 .marketing-toolbar select,
.dashboard-layout-v3 .marketing-field input,
.dashboard-layout-v3 .marketing-field textarea {
  min-height: 38px;
  border-color: var(--engine-line);
  border-radius: 6px;
  background: #fbfcfb;
}

.dashboard-layout-v3 .protocol-overview {
  grid-template-columns: minmax(240px, 0.9fr) minmax(340px, 1.15fr) minmax(250px, 0.95fr);
  gap: 12px;
}

.dashboard-layout-v3 .protocol-bucket,
.dashboard-layout-v3 .queue-item,
.dashboard-layout-v3 .stage-card,
.dashboard-layout-v3 .contact-list article,
.dashboard-layout-v3 .access-request-list article,
.dashboard-layout-v3 .detail-grid div,
.dashboard-layout-v3 .dispatch-summary article,
.dashboard-layout-v3 .marketing-card,
.dashboard-layout-v3 .marketing-section-button,
.dashboard-layout-v3 .marketing-preview-frame,
.dashboard-layout-v3 .inspector-card {
  border-color: var(--engine-line);
  border-radius: 6px;
  background: #fbfcfb;
}

.dashboard-layout-v3 .queue-tabs {
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--engine-line);
  border-radius: 6px;
  background: #f7faf8;
}

.dashboard-layout-v3 .queue-tabs button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--engine-muted);
}

.dashboard-layout-v3 .queue-tabs button.is-active {
  background: var(--engine-green);
  color: #fff;
}

.dashboard-layout-v3 .queue-item.is-selected,
.dashboard-layout-v3 .stage-card.is-selected {
  border-color: rgba(20, 81, 63, 0.5);
  box-shadow: inset 4px 0 0 var(--engine-green);
}

.dashboard-layout-v3 .intake-grid {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

  .dashboard-layout-v3 .qualification-grid,
  .dashboard-layout-v3 .dispatch-workspace-grid,
  .dashboard-layout-v3 .lead-search-grid,
  .dashboard-layout-v3 .bridge-workspace-grid,
  .dashboard-layout-v3 .access-workspace-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  }

.dashboard-layout-v3 .workspace-grid .dashboard-panel {
  min-height: min(540px, calc(100vh - 300px));
}

.dashboard-layout-v3 .workspace-grid .queue-list,
.dashboard-layout-v3 .workspace-grid .detail-panel,
  .dashboard-layout-v3 .workspace-grid .contact-list,
  .dashboard-layout-v3 .dispatch-lead-list,
  .dashboard-layout-v3 .lead-search-list,
  .dashboard-layout-v3 .bridge-workspace-grid .lead-search-list,
  .dashboard-layout-v3 .access-request-list {
    max-height: calc(100vh - 390px);
    min-height: 320px;
}

.dashboard-layout-v3 .qualification-board {
  grid-template-columns: repeat(6, minmax(170px, 1fr));
}

.dashboard-layout-v3 .export-strip {
  margin: -2px 0 14px;
}

.dashboard-layout-v3 .export-strip a,
.dashboard-layout-v3 .button.secondary,
.dashboard-layout-v3 .compact-button,
.dashboard-layout-v3 .sync-status {
  border-radius: 6px;
}

.dashboard-layout-v3 .button.secondary,
.dashboard-layout-v3 .export-strip a {
  background: var(--engine-surface);
  border-color: var(--engine-line);
  color: var(--engine-green);
}

@media (max-width: 1180px) {
  .engine-app-shell {
    grid-template-columns: 1fr;
  }

  .engine-sidebar {
    position: static;
    height: auto;
    gap: 12px;
  }

  .engine-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .engine-sidebar-footer {
    display: none;
  }

  .dashboard-layout-v3 .protocol-overview,
    .dashboard-layout-v3 .intake-grid,
    .dashboard-layout-v3 .qualification-grid,
    .dashboard-layout-v3 .dispatch-workspace-grid,
    .dashboard-layout-v3 .lead-search-grid,
    .dashboard-layout-v3 .bridge-workspace-grid,
    .dashboard-layout-v3 .access-workspace-grid {
      grid-template-columns: 1fr;
    }

  .dispatch-lane-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bridge-config-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-layout-v3 .workspace-grid .dashboard-panel,
  .dashboard-layout-v3 .workspace-grid .queue-list,
  .dashboard-layout-v3 .workspace-grid .detail-panel,
    .dashboard-layout-v3 .workspace-grid .contact-list,
    .dashboard-layout-v3 .dispatch-lead-list,
    .dashboard-layout-v3 .lead-search-list,
    .dashboard-layout-v3 .access-request-list {
      max-height: none;
      min-height: auto;
  }
}

@media (max-width: 760px) {
  .engine-main.dashboard-shell,
  .engine-main.crm-shell,
  .engine-main.workspace-shell {
    padding: 16px;
  }

  .engine-topbar,
  .engine-analytics-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .engine-review-stamp {
    text-align: left;
  }

  .engine-nav,
  .dashboard-layout-v3 .dashboard-metrics,
  .dashboard-layout-v3 .crm-toolbar,
  .dashboard-layout-v3 .protocol-queue,
  .lead-search-summary {
    grid-template-columns: 1fr;
  }

  .engine-topbar-actions {
    flex: 1 1 100%;
    max-width: none;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .engine-topbar-actions > * {
    text-align: center;
  }

  .dispatch-lane-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .engine-topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .engine-topbar-actions {
    grid-template-columns: 1fr;
  }
}

/* Quiet operational pass: keep each workspace focused and move people lookup into Dispatch DB. */
.dashboard-layout-v3 .protocol-overview,
.dashboard-layout-v3 .export-strip,
.dashboard-layout-v3 .engine-analytics-head {
  display: none;
}

.dashboard-layout-v3 .engine-topbar {
  margin-bottom: 12px;
}

.dashboard-layout-v3 .engine-analytics {
  margin-bottom: 10px;
}

.dashboard-layout-v3 .dashboard-metrics {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.dashboard-layout-v3 .dashboard-metrics article {
  min-height: 74px;
  padding: 12px;
}

.dashboard-layout-v3 .dashboard-metrics span {
  font-size: 1.58rem;
}

.dashboard-layout-v3 .dashboard-metrics small {
  line-height: 1.25;
}

.dashboard-layout-v3 .crm-toolbar {
  margin: 8px 0 12px;
}

.operator-desk {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.operator-card {
  display: flex;
  min-height: 124px;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--engine-line);
  border-radius: 8px;
  background: #fbfcfb;
  box-shadow: 0 10px 28px rgba(17, 33, 24, 0.06);
}

.operator-card > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.operator-card p,
.operator-card span,
.operator-card small {
  margin: 0;
}

.operator-card p {
  color: var(--engine-muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.operator-card strong {
  color: var(--engine-green);
  font-size: 2rem;
  line-height: 0.95;
}

.operator-card span {
  color: var(--engine-ink);
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.3;
}

.operator-card small {
  color: var(--engine-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.operator-card .button {
  align-self: center;
  flex: 0 0 auto;
  white-space: nowrap;
}

.operator-card-primary {
  border-color: rgba(20, 81, 63, 0.38);
  background: #f7faf8;
}

.queue-next-action {
  color: var(--engine-green) !important;
  font-weight: 850;
}

.dashboard-layout-v3 .directory-workspace-grid {
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.25fr);
}

.directory-summary,
.directory-tools {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.directory-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.directory-summary div {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--engine-line);
  border-radius: 6px;
  background: #f7faf8;
}

.directory-summary strong,
.directory-summary span {
  display: block;
}

.directory-summary strong {
  color: var(--engine-green);
  font-size: 1.35rem;
  line-height: 1;
}

.directory-summary span {
  margin-top: 5px;
  color: var(--engine-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.directory-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-tools label {
  display: grid;
  gap: 6px;
}

.directory-tools span {
  color: var(--engine-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.directory-tools select {
  min-height: 38px;
  border: 1px solid var(--engine-line);
  border-radius: 6px;
  background: #fbfcfb;
  color: var(--engine-ink);
}

.directory-list {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.directory-card {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--engine-line);
  border-radius: 6px;
  background: #fbfcfb;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.directory-card:hover,
.directory-card:focus-visible,
.directory-card.is-selected {
  border-color: rgba(20, 81, 63, 0.5);
  box-shadow: inset 4px 0 0 var(--engine-green);
  outline: none;
}

.directory-card strong {
  line-height: 1.2;
}

.directory-card > span:not(.queue-item-top),
.directory-card small {
  color: var(--engine-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.directory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.directory-tags span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid rgba(20, 81, 63, 0.16);
  border-radius: 999px;
  background: rgba(20, 81, 63, 0.07);
  color: var(--engine-green);
  font-size: 0.68rem;
  font-weight: 850;
}

.directory-detail-card .directory-tags {
  margin-bottom: 12px;
}

.dashboard-layout-v3 .workspace-grid .directory-list,
.dashboard-layout-v3 .workspace-grid .directory-detail {
  max-height: calc(100vh - 390px);
  min-height: 320px;
}

@media (max-width: 1180px) {
  .engine-nav {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .dashboard-layout-v3 .directory-workspace-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-layout-v3 .workspace-grid .directory-list,
  .dashboard-layout-v3 .workspace-grid .directory-detail {
    max-height: none;
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .dashboard-layout-v3 .dashboard-metrics,
  .operator-desk,
  .directory-summary,
  .directory-tools {
    grid-template-columns: 1fr;
  }

  .operator-card {
    display: grid;
  }

  .operator-card .button {
    width: 100%;
    justify-content: center;
  }
}

/* Full-stretch operations view: panels stack wide so pipeline work does not feel cramped. */
.dashboard-layout-v3 .qualification-grid,
.dashboard-layout-v3 .dispatch-workspace-grid,
.dashboard-layout-v3 .lead-search-grid,
.dashboard-layout-v3 .access-workspace-grid,
.dashboard-layout-v3 .directory-workspace-grid {
  grid-template-columns: 1fr;
}

.dashboard-layout-v3 .workspace-grid .dashboard-panel {
  min-height: auto;
  overflow: visible;
}

.dashboard-layout-v3 .workspace-grid .queue-list,
.dashboard-layout-v3 .workspace-grid .detail-panel,
.dashboard-layout-v3 .workspace-grid .contact-list,
.dashboard-layout-v3 .dispatch-lead-list,
.dashboard-layout-v3 .lead-search-list,
.dashboard-layout-v3 .access-request-list,
.dashboard-layout-v3 .workspace-grid .directory-list,
.dashboard-layout-v3 .workspace-grid .directory-detail {
  max-height: none;
  min-height: auto;
  overflow: visible;
}

.dashboard-layout-v3 .qualification-board {
  min-width: 0;
  grid-template-columns: 1fr;
}

.dashboard-layout-v3 .stage-column {
  min-height: auto;
  padding: 14px;
}

.dashboard-layout-v3 .stage-column > div,
.dashboard-layout-v3 .dispatch-lead-list,
.dashboard-layout-v3 .lead-search-list,
.dashboard-layout-v3 .access-request-list,
.dashboard-layout-v3 .contact-list,
.dashboard-layout-v3 .directory-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dashboard-layout-v3 .dispatch-lane-board {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.pipeline-automation {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(20, 81, 63, 0.18);
  border-radius: 6px;
  background: #f7faf8;
}

.pipeline-automation > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-automation span {
  color: var(--engine-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.pipeline-automation strong {
  color: var(--engine-green);
  font-size: 0.9rem;
}

.pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dispatch-summary .pipeline-automation {
  margin-top: 10px;
}

/* Perplexity export mirror: shared Dirt Engine visual system for public, auth, access, and dashboard surfaces. */
:root {
  --paper: #f5efe5;
  --paper-2: #fffbf2;
  --paper-3: #eee4d4;
  --ink: #221a14;
  --muted: #6f6258;
  --line: #dccdb8;
  --soil: #241a12;
  --soil-2: #33251a;
  --green: #174f34;
  --green-2: #103b27;
  --clay: #a95435;
  --gold: #c79a49;
  --white: #fffaf2;
  --shadow: 0 18px 48px rgba(50, 35, 21, 0.11);
  --radius: 8px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Fraunces, Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

body.reference-site,
body.reference-dashboard,
.dashboard-layout-v3 {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.reference-site h1,
.reference-site h2,
.reference-site h3,
.reference-dashboard h1,
.reference-dashboard h2,
.reference-dashboard h3 {
  color: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
}

.reference-site .eyebrow,
.reference-dashboard .eyebrow,
.reference-site .plan-scope {
  color: var(--clay);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.reference-site .site-header {
  width: min(1280px, calc(100% - 48px));
  min-height: 73px;
  gap: 30px;
  background: rgba(245, 239, 229, 0.94);
  border-bottom-color: rgba(79, 58, 38, 0.16);
  backdrop-filter: blur(12px);
}

.reference-site .brand,
.reference-dashboard .engine-brand {
  font-family: var(--font-sans);
  font-weight: 800;
}

.reference-site .brand img,
.reference-dashboard .engine-brand img {
  border-radius: 8px;
  border-color: rgba(34, 26, 20, 0.12);
}

.reference-site .site-nav {
  gap: 26px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.reference-site .site-nav a,
.reference-site .header-actions > a:not(.button) {
  text-decoration: none;
}

.reference-site .site-nav a:hover,
.reference-site .header-actions > a:not(.button):hover {
  color: var(--ink);
}

.reference-site .header-actions {
  gap: 12px;
}

.reference-site .header-actions > a:not(.button),
.reference-site .login-link {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.reference-site .theme-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink);
}

.reference-site .theme-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.reference-site .button,
.reference-dashboard .button,
.reference-dashboard .engine-logout {
  min-height: 42px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 650;
}

.reference-site .button.primary,
.reference-dashboard .button.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  box-shadow: none;
}

.reference-site .button.primary:hover,
.reference-dashboard .button.primary:hover {
  background: var(--green-2);
  border-color: var(--green-2);
}

.reference-site .button.secondary,
.reference-dashboard .button.secondary,
.reference-dashboard .engine-logout {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--ink);
}

.reference-site .hero {
  grid-template-columns: minmax(0, 1fr) minmax(460px, 520px);
  gap: 48px;
  width: min(1280px, calc(100% - 48px));
  margin-top: 42px;
  padding-bottom: 34px;
  align-items: center;
}

.reference-site .hero-copy {
  padding-top: 0;
}

.reference-site h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: 5rem;
  line-height: 0.92;
}

.reference-site .hero-lede {
  max-width: 670px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.reference-site .hero-actions {
  margin-bottom: 30px;
}

.reference-site .hero-proof {
  max-width: 680px;
  border-top-color: var(--line);
  border-bottom-color: var(--line);
}

.reference-site .hero-proof div {
  padding: 15px 18px 15px 0;
}

.reference-site .hero-proof dt {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 750;
}

.reference-site .hero-proof dd {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.reference-site .dashboard-preview {
  padding: 18px;
  background: var(--soil);
  border-color: rgba(255, 250, 242, 0.16);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(36, 26, 18, 0.22);
  color: var(--white);
}

.reference-site .dashboard-preview .eyebrow {
  color: #d08a5a;
}

.reference-site .preview-top {
  margin-bottom: 16px;
}

.reference-site .preview-top h2 {
  font-size: 1.4rem;
  line-height: 1.08;
}

.reference-site .status-pill {
  min-height: 26px;
  border-color: rgba(199, 154, 73, 0.42);
  border-radius: 999px;
  background: rgba(199, 154, 73, 0.15);
  color: #f1c978;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.reference-site .preview-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 58px 58px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  margin-bottom: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 250, 242, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.08);
}

.reference-site .preview-row.is-hot {
  border-color: rgba(199, 154, 73, 0.35);
  background: rgba(199, 154, 73, 0.12);
}

.reference-site .preview-row span,
.reference-site .preview-row b {
  color: rgba(255, 250, 242, 0.68);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.reference-site .preview-row .preview-id {
  color: #e5bd72;
}

.reference-site .preview-row strong {
  min-width: 0;
  color: var(--white);
  font-size: 0.93rem;
  line-height: 1.25;
}

.reference-site .dispatch-grid {
  gap: 10px;
  margin-top: 14px;
}

.reference-site .dispatch-grid div {
  padding: 15px;
  border-color: rgba(255, 250, 242, 0.12);
  background: rgba(255, 250, 242, 0.08);
}

.reference-site .dispatch-grid strong {
  color: var(--white);
  font-size: 0.96rem;
}

.reference-site .dispatch-grid p {
  color: rgba(255, 250, 242, 0.64);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.reference-site .platform,
.reference-site .email-dispatch,
.reference-site .funnels,
.reference-site .pricing,
.reference-site .demo,
.reference-site .login-panel,
.reference-site .site-footer {
  width: min(1280px, calc(100% - 48px));
}

.reference-site .platform {
  padding: 86px 0 46px;
}

.reference-site .section-heading {
  display: block;
  gap: 28px;
  margin-bottom: 34px;
}

.reference-site .section-heading h2,
.reference-site .email-dispatch h2,
.reference-site .funnels h2,
.reference-site .demo h2,
.reference-site .login-panel h2 {
  max-width: 960px;
  font-size: 3.55rem;
  line-height: 0.98;
}

.reference-site .section-heading p,
.reference-site .email-dispatch p,
.reference-site .funnels p,
.reference-site .demo p,
.reference-site .login-panel p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.reference-site .section-heading p {
  max-width: 760px;
  margin-top: 18px;
}

.reference-site .feature-grid,
.reference-site .pricing-grid {
  gap: 18px;
}

.reference-site .feature-grid article,
.reference-site .pricing-grid article,
.reference-site .dispatch-list article,
.reference-site .funnel-list a,
.reference-site .login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: none;
}

.reference-site .feature-grid article,
.reference-site .pricing-grid article {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 26px;
}

.reference-site .feature-grid span {
  color: var(--clay);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.reference-site .feature-grid h3,
.reference-site .pricing-grid h3 {
  margin: 14px 0 10px;
  font-size: 1.65rem;
  line-height: 1.08;
}

.reference-site .feature-grid p,
.reference-site .pricing-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.reference-site .email-dispatch {
  grid-template-columns: minmax(0, 1fr) minmax(430px, 540px);
  margin-top: 36px;
  padding: 42px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reference-site .dispatch-list article {
  padding: 22px;
}

.reference-site .dispatch-list span,
.reference-site .funnel-list span,
.reference-site .pricing-grid .plan-scope {
  color: var(--clay);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-site .dispatch-list h3 {
  margin: 8px 0 8px;
  font-size: 1.25rem;
}

.reference-site .dispatch-list .button {
  width: 100%;
  margin-top: 8px;
}

.reference-site .funnels {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 520px);
  gap: 42px;
  padding: 78px 0 28px;
  align-items: start;
}

.reference-site .funnel-list {
  gap: 12px;
}

.reference-site .funnel-list a {
  padding: 20px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 750;
  text-decoration: none;
}

.reference-site .funnel-list span {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.reference-site .pricing {
  padding: 70px 0 16px;
}

.reference-site .pricing-grid article ul {
  display: grid;
  gap: 10px;
  margin: 10px 0 22px;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.45;
}

.reference-site .pricing-grid article li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
}

.reference-site .pricing-grid article li::before {
  content: "->";
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 700;
}

.reference-site .pricing-grid .button {
  width: 100%;
  margin-top: auto;
}

.reference-site .pricing-grid .featured {
  background: var(--soil);
  border-color: var(--soil);
  color: var(--white);
}

.reference-site .pricing-grid .featured p,
.reference-site .pricing-grid .featured li {
  color: rgba(255, 250, 242, 0.78);
}

.reference-site .pricing-grid .featured li::before {
  color: #e5bd72;
}

.reference-site .pricing-grid .featured .plan-scope {
  color: #d08a5a;
}

.reference-site .pricing-grid .featured .button.primary {
  background: var(--paper-2);
  border-color: var(--paper-2);
  color: var(--ink);
}

.reference-site .demo {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  margin-top: 54px;
  padding: 44px;
  background: var(--green);
  border-color: var(--green);
  border-radius: 8px;
}

.reference-site .demo h2,
.reference-site .demo .eyebrow {
  color: var(--white);
}

.reference-site .demo p {
  color: rgba(255, 250, 242, 0.75);
}

.reference-site .access-card {
  padding: 26px;
  background: var(--paper-2);
  border: 1px solid rgba(255, 250, 242, 0.15);
  border-radius: 8px;
  color: var(--ink);
}

.reference-site .access-card strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.08;
}

.reference-site .access-card .button {
  width: 100%;
}

.reference-site .login-panel {
  grid-template-columns: 1fr auto;
  margin-top: 28px;
  padding: 28px 32px;
  background: var(--paper-2);
}

.reference-site .login-panel h2 {
  font-size: 2.7rem;
}

.reference-site .login-panel p {
  color: var(--muted);
}

.reference-site .site-footer {
  min-height: 90px;
  padding: 28px 0 36px;
  border-top-color: var(--line);
  color: var(--muted);
}

.reference-site .site-footer .brand {
  color: var(--ink);
}

.access-page.reference-site,
.auth-page.reference-site {
  min-height: 100vh;
  background: var(--paper);
}

.access-page.reference-site .access-shell {
  grid-template-columns: minmax(0, 0.86fr) minmax(430px, 1fr);
  gap: 48px;
  width: min(1280px, calc(100% - 48px));
  padding: 56px 0 70px;
}

.access-page.reference-site .access-intro {
  top: 98px;
}

.access-page.reference-site .access-intro h1,
.auth-page.reference-site .auth-card h1 {
  font-size: 4.7rem;
  line-height: 0.95;
}

.access-page.reference-site .access-intro p,
.auth-page.reference-site .auth-card p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.access-page.reference-site .access-form,
.auth-page.reference-site .auth-card {
  padding: 30px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.access-page.reference-site .access-form label,
.auth-page.reference-site .auth-form label {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-page.reference-site .access-form input,
.access-page.reference-site .access-form select,
.access-page.reference-site .access-form textarea,
.auth-page.reference-site .auth-form input {
  background: #fffdf7;
  border-color: var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.95rem;
}

.access-page.reference-site .form-actions {
  margin-top: 4px;
}

.auth-page.reference-site .auth-shell {
  width: min(540px, calc(100% - 40px));
  min-height: calc(100vh - 73px);
  padding: 52px 0 72px;
}

.auth-page.reference-site .auth-card {
  width: 100%;
}

.auth-page.reference-site .auth-form .button {
  width: 100%;
}

.auth-page.reference-site .auth-footnote a {
  color: var(--green);
}

.reference-dashboard.dashboard-layout-v3 {
  --engine-bg: var(--paper);
  --engine-surface: var(--paper-2);
  --engine-surface-soft: var(--paper-3);
  --engine-ink: var(--ink);
  --engine-muted: var(--muted);
  --engine-line: var(--line);
  --engine-green: var(--green);
  --engine-green-2: var(--green-2);
  --engine-gold: var(--gold);
  --engine-shadow: 0 16px 40px rgba(50, 35, 21, 0.08);
  background: var(--paper);
}

.reference-dashboard .engine-app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.reference-dashboard .engine-sidebar {
  gap: 20px;
  padding: 22px 16px;
  background: var(--soil);
  color: var(--white);
}

.reference-dashboard .engine-brand {
  padding: 8px 6px 18px;
  border-bottom-color: rgba(255, 250, 242, 0.14);
  color: var(--white);
}

.reference-dashboard .engine-brand strong {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.08;
}

.reference-dashboard .engine-brand small,
.reference-dashboard .engine-build-pill,
.reference-dashboard .engine-sidebar-footer span {
  color: rgba(255, 250, 242, 0.66);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-dashboard .engine-build-pill,
.reference-dashboard .engine-sidebar-footer,
.reference-dashboard .engine-nav button {
  border-color: rgba(255, 250, 242, 0.13);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.07);
}

.reference-dashboard .engine-nav button {
  min-height: 43px;
  color: rgba(255, 250, 242, 0.72);
  font-size: 0.88rem;
  font-weight: 650;
}

.reference-dashboard .engine-nav button:hover,
.reference-dashboard .engine-nav button:focus-visible,
.reference-dashboard .engine-nav button.is-active {
  background: rgba(255, 250, 242, 0.13);
  border-color: rgba(255, 250, 242, 0.22);
  color: var(--white);
}

.reference-dashboard .engine-nav-icon {
  color: #e5bd72;
  font-family: var(--font-mono);
}

.reference-dashboard .engine-sidebar-footer strong {
  color: var(--white);
  font-size: 0.9rem;
}

.reference-dashboard .engine-main.dashboard-shell,
.reference-dashboard .engine-main.crm-shell,
.reference-dashboard .engine-main.workspace-shell {
  padding: 28px 30px 54px;
}

.reference-dashboard .engine-topbar {
  align-items: flex-start;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.reference-dashboard .engine-topbar h1 {
  margin-bottom: 8px;
  font-size: 2.75rem;
  line-height: 0.98;
}

.reference-dashboard .engine-topbar p,
.reference-dashboard .engine-analytics-head p,
.reference-dashboard .dashboard-panel p,
.reference-dashboard .detail-panel p {
  color: var(--muted);
}

.reference-dashboard .engine-topbar-actions {
  flex-basis: min(620px, 56vw);
  max-width: 720px;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.reference-dashboard .compact-button,
.reference-dashboard .engine-logout {
  min-height: 42px;
  border-radius: 8px;
  font-size: 0.78rem;
  padding-inline: 12px;
}

.reference-dashboard .engine-review-stamp,
.reference-dashboard .dashboard-panel,
.reference-dashboard .crm-toolbar,
.reference-dashboard .export-strip,
.reference-dashboard .dashboard-metrics article,
.reference-dashboard .directory-summary div,
.reference-dashboard .pipeline-automation,
.reference-dashboard .stage-column,
.reference-dashboard .queue-item,
.reference-dashboard .directory-card,
.reference-dashboard .lead-search-card,
.reference-dashboard .access-request-list article,
.reference-dashboard .contact-list article,
.reference-dashboard .detail-card,
.reference-dashboard .dispatch-summary,
.reference-dashboard .bridge-config-card,
.reference-dashboard .cms-page-card {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: none;
}

.reference-dashboard .dashboard-panel {
  padding: 18px;
}

.reference-dashboard .engine-analytics-head h2,
.reference-dashboard .panel-head h2 {
  font-size: 1.65rem;
  line-height: 1.05;
}

.reference-dashboard .dashboard-metrics {
  gap: 14px;
}

.reference-dashboard .dashboard-metrics article {
  min-height: 86px;
  padding: 16px;
}

.reference-dashboard .dashboard-metrics span,
.reference-dashboard .directory-summary strong {
  color: var(--green);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
}

.reference-dashboard .dashboard-metrics small,
.reference-dashboard .directory-summary span,
.reference-dashboard .sync-status,
.reference-dashboard .export-strip span,
.reference-dashboard .crm-toolbar span,
.reference-dashboard .directory-tools span,
.reference-dashboard .contact-tools span,
.reference-dashboard .marketing-toolbar span,
.reference-dashboard .table-pill,
.reference-dashboard .match-score {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.reference-dashboard .crm-toolbar input,
.reference-dashboard .crm-toolbar select,
.reference-dashboard .directory-tools select,
.reference-dashboard .contact-tools input,
.reference-dashboard .marketing-toolbar select,
.reference-dashboard .workflow-form input,
.reference-dashboard .workflow-form select,
.reference-dashboard .workflow-form textarea {
  min-height: 40px;
  border-color: var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
}

.reference-dashboard .export-strip {
  padding: 12px 14px;
}

.reference-dashboard .export-strip a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.reference-dashboard .stage-column > header h3,
.reference-dashboard .queue-item strong,
.reference-dashboard .directory-card strong,
.reference-dashboard .detail-title strong {
  color: var(--ink);
}

.reference-dashboard .stage-card,
.reference-dashboard .queue-item,
.reference-dashboard .directory-card,
.reference-dashboard .lead-search-card {
  border-color: var(--line);
  border-radius: 8px;
  background: #fffdf7;
}

.reference-dashboard .stage-card:hover,
.reference-dashboard .stage-card:focus-visible,
.reference-dashboard .stage-card.is-selected,
.reference-dashboard .queue-item:hover,
.reference-dashboard .queue-item:focus-visible,
.reference-dashboard .queue-item.is-selected,
.reference-dashboard .directory-card:hover,
.reference-dashboard .directory-card:focus-visible,
.reference-dashboard .directory-card.is-selected {
  border-color: rgba(23, 79, 52, 0.42);
  box-shadow: inset 4px 0 0 var(--green);
}

.reference-dashboard .directory-tags span,
.reference-dashboard .tag-list span,
.reference-dashboard .lead-tags span {
  border-color: rgba(23, 79, 52, 0.18);
  border-radius: 999px;
  background: rgba(23, 79, 52, 0.08);
  color: var(--green);
}

.reference-dashboard .pipeline-automation {
  background: var(--paper-3);
}

.reference-dashboard .pipeline-automation strong {
  color: var(--green);
}

@media (max-width: 1080px) {
  .reference-site .site-header,
  .reference-site .hero,
  .reference-site .platform,
  .reference-site .email-dispatch,
  .reference-site .funnels,
  .reference-site .pricing,
  .reference-site .demo,
  .reference-site .login-panel,
  .reference-site .site-footer,
  .access-page.reference-site .access-shell {
    width: min(100% - 32px, 900px);
  }

  .reference-site .site-header {
    grid-template-columns: 1fr auto;
  }

  .reference-site .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .reference-site .hero,
  .reference-site .email-dispatch,
  .reference-site .funnels,
  .reference-site .demo,
  .access-page.reference-site .access-shell {
    grid-template-columns: 1fr;
  }

  .reference-site h1,
  .access-page.reference-site .access-intro h1 {
    font-size: 4rem;
  }

  .reference-site .section-heading h2,
  .reference-site .email-dispatch h2,
  .reference-site .funnels h2,
  .reference-site .demo h2 {
    font-size: 3.2rem;
  }

  .reference-site .feature-grid,
  .reference-site .pricing-grid {
    grid-template-columns: 1fr;
  }

  .access-page.reference-site .access-intro {
    position: static;
  }

  .reference-dashboard .engine-app-shell {
    grid-template-columns: 1fr;
  }

  .reference-dashboard .engine-sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 720px) {
  .reference-site .site-header {
    width: calc(100% - 24px);
    gap: 14px;
  }

  .reference-site .header-actions {
    justify-content: flex-end;
  }

  .reference-site .header-actions .button {
    display: none;
  }

  .reference-site h1,
  .access-page.reference-site .access-intro h1,
  .auth-page.reference-site .auth-card h1 {
    font-size: 3rem;
    line-height: 0.98;
  }

  .reference-site .section-heading h2,
  .reference-site .email-dispatch h2,
  .reference-site .funnels h2,
  .reference-site .demo h2,
  .reference-site .login-panel h2 {
    font-size: 2.4rem;
    line-height: 1.02;
  }

  .reference-site .hero,
  .reference-site .platform,
  .reference-site .email-dispatch,
  .reference-site .funnels,
  .reference-site .pricing,
  .reference-site .demo,
  .reference-site .login-panel,
  .reference-site .site-footer,
  .access-page.reference-site .access-shell {
    width: calc(100% - 24px);
  }

  .reference-site .hero {
    margin-top: 28px;
  }

  .reference-site .hero-proof,
  .reference-site .dispatch-grid,
  .reference-site .form-row,
  .reference-site .login-panel {
    grid-template-columns: 1fr;
  }

  .reference-site .hero-proof div + div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .reference-site .preview-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .reference-site .email-dispatch,
  .reference-site .demo,
  .reference-site .login-panel,
  .access-page.reference-site .access-form,
  .auth-page.reference-site .auth-card {
    padding: 22px;
  }

  .reference-dashboard .engine-main.dashboard-shell,
  .reference-dashboard .engine-main.crm-shell,
  .reference-dashboard .engine-main.workspace-shell {
    padding: 20px 14px 42px;
  }

  .reference-dashboard .engine-topbar,
  .reference-dashboard .engine-analytics-head {
    display: grid;
  }

  .reference-dashboard .engine-topbar h1 {
    font-size: 2.25rem;
  }

  .reference-dashboard .engine-topbar-actions {
    flex-basis: auto;
    justify-content: flex-start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .reference-dashboard .engine-topbar-actions {
    grid-template-columns: 1fr;
  }
}

/* Fidelity tightening for the supplied Perplexity export. */
.reference-site .brand img {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.reference-site .brand {
  gap: 11px;
}

.reference-site .email-dispatch {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 52px;
  padding: 78px max(48px, calc((100vw - 1280px) / 2 + 24px)) 80px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: #eee8de;
}

.reference-site .email-dispatch h2 {
  max-width: 680px;
}

.reference-site .email-dispatch p {
  max-width: 720px;
}

.reference-site .dispatch-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
}

.reference-site .dispatch-cards article {
  padding: 24px;
}

.reference-site .dispatch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.reference-site .dispatch-card-top span:last-child {
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
}

.reference-site .dispatch-cards h3 {
  margin-bottom: 18px;
  font-size: 1.45rem;
}

.reference-site .dispatch-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.reference-site .dispatch-meta div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
}

.reference-site .dispatch-meta dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-site .dispatch-meta dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.reference-site .dispatch-cards .button {
  gap: 10px;
}

.reference-site .dispatch-cards .button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.reference-site .funnels {
  display: block;
  padding: 78px 0 66px;
  background: transparent;
  border: 0;
  color: var(--ink);
}

.reference-site .funnels > div:first-child {
  max-width: 800px;
}

.reference-site .funnel-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.reference-site .funnel-list a {
  display: grid;
  min-height: 260px;
  align-content: start;
  gap: 14px;
  padding: 26px;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.reference-site .funnel-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.08;
}

.reference-site .funnel-list em {
  width: fit-content;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-site .funnel-list p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
}

.reference-site .lane-list {
  display: grid;
  gap: 9px;
  margin: 16px 0 24px;
  padding: 0;
  list-style: none;
}

.reference-site .lane-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.reference-site .lane-list li::before {
  content: "->";
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.reference-site .access-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reference-site .pricing-grid .featured {
  background: var(--paper-2);
  border: 2px solid var(--green);
  color: var(--ink);
}

.reference-site .pricing-grid .featured p,
.reference-site .pricing-grid .featured li {
  color: var(--ink);
}

.reference-site .pricing-grid .featured .plan-scope {
  color: var(--clay);
}

.reference-site .pricing-grid .featured li::before {
  color: var(--green);
}

.reference-site .pricing-grid .featured .button.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.reference-site .demo {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 510px);
  padding: 78px max(48px, calc((100vw - 1280px) / 2 + 24px));
  border-radius: 0;
}

@media (max-width: 1080px) {
  .reference-site .email-dispatch,
  .reference-site .demo {
    padding-right: 24px;
    padding-left: 24px;
  }

  .reference-site .dispatch-cards,
  .reference-site .funnel-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .reference-site .email-dispatch,
  .reference-site .demo {
    padding: 46px 16px;
  }

  .reference-site .dispatch-meta div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .reference-site .access-actions {
    grid-template-columns: 1fr;
  }
}

/* Backlink contrast: linked text should never read like surrounding body copy. */
.reference-site .funnel-list a strong,
.reference-site .site-footer > a:not(.brand),
.reference-site .auth-footnote a,
.reference-dashboard .export-strip a {
  color: #0f5d3a;
  text-decoration: underline;
  text-decoration-color: rgba(15, 93, 58, 0.48);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.reference-site .site-footer > a:not(.brand),
.reference-site .auth-footnote a,
.reference-dashboard .export-strip a {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 6px;
  background: rgba(15, 93, 58, 0.08);
  font-weight: 800;
}

.reference-site .site-footer > a:not(.brand),
.reference-dashboard .export-strip a {
  padding: 3px 7px;
}

.reference-site .auth-footnote a {
  padding: 1px 5px;
}

.reference-site .funnel-list a:hover strong,
.reference-site .site-footer > a:not(.brand):hover,
.reference-site .auth-footnote a:hover,
.reference-dashboard .export-strip a:hover {
  color: #083b25;
  background: rgba(15, 93, 58, 0.13);
  text-decoration-color: currentColor;
}

/* Dashboard fit pass: selected lead information stays above the queues, and long nav/record areas scroll inside the viewport. */
.engine-sidebar,
.reference-dashboard .engine-sidebar {
  overflow: hidden;
}

.engine-brand,
.engine-build-pill,
.engine-sidebar-footer {
  flex-shrink: 0;
}

.engine-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.dashboard-layout-v3 .intake-grid,
.dashboard-layout-v3 .qualification-grid,
.dashboard-layout-v3 .lead-search-grid {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-layout-v3 .lead-info-top {
  order: -1;
  grid-column: 1 / -1;
}

.dashboard-layout-v3 .lead-info-top .detail-panel {
  max-height: min(44vh, 520px);
  overflow: auto;
  padding-right: 8px;
}

.dashboard-layout-v3 .crm-queue-panel .queue-list,
.dashboard-layout-v3 .qualification-board,
.dashboard-layout-v3 .lead-search-list,
.dashboard-layout-v3 .dispatch-lead-list {
  max-height: min(56vh, 680px);
  overflow: auto;
  padding-right: 8px;
}

.market-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.market-tabs button {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.market-tabs button.is-active {
  border-color: rgba(20, 81, 63, 0.55);
  box-shadow: inset 4px 0 0 var(--green);
}

.market-tabs span,
.market-tabs small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-tabs strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
}

.process-layout {
  align-items: start;
}

.process-sop {
  display: grid;
  gap: 12px;
}

.process-profile {
  max-height: min(62vh, 720px);
  overflow: auto;
  padding: 0 4px 10px 0;
  border-bottom: 1px solid rgba(20, 81, 63, 0.16);
}

.process-profile .detail-card,
.dispatch-summary .detail-card,
#job-map-detail .detail-card,
#mobile-feed-detail .detail-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.linkedin-trace {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(20, 81, 63, 0.16);
  border-radius: 8px;
  background: rgba(20, 81, 63, 0.06);
}

.linkedin-trace > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.linkedin-trace span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-map-grid,
.mobile-feed-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.job-map-canvas {
  position: relative;
  min-height: 430px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid rgba(20, 81, 63, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 81, 63, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 81, 63, 0.06) 1px, transparent 1px),
    #fbf7ed;
  background-size: 42px 42px;
}

.dashboard-job-map {
  margin: 14px 0;
}

.dashboard-map-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.dashboard-map-canvas {
  min-height: 300px;
  margin: 0;
}

.dashboard-map-list {
  max-height: 300px;
  margin-top: 0;
}

.job-map-state-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 2px;
  max-width: min(360px, calc(100% - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(20, 81, 63, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
}

.job-map-state-label strong {
  color: var(--green);
}

.job-map-state-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.job-map-marker {
  position: absolute;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #fffdf7;
  border-radius: 999px;
  background: var(--green);
  color: #fffdf7;
  box-shadow: 0 8px 18px rgba(39, 27, 18, 0.18);
  cursor: pointer;
}

.job-map-marker.hot {
  background: #8f3d24;
}

.job-map-marker.needs-info {
  background: #9c7a2b;
}

.job-map-marker.contact-hold {
  background: #6f4a38;
}

.job-map-marker.is-selected {
  outline: 3px solid rgba(20, 81, 63, 0.28);
  transform: translate(-50%, -50%) scale(1.12);
}

.job-map-marker span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 900;
}

.job-map-list,
.mobile-feed-list {
  max-height: min(44vh, 520px);
}

.mobile-feed-card small,
.map-lead-card small {
  line-height: 1.35;
}

.contact-gate {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(20, 81, 63, 0.18);
  border-radius: 8px;
  background: rgba(20, 81, 63, 0.06);
}

.contact-gate.is-hold {
  border-color: rgba(143, 61, 36, 0.28);
  background: rgba(143, 61, 36, 0.08);
}

.contact-gate span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-gate strong {
  display: block;
  margin-top: 3px;
  color: var(--green);
}

.contact-gate.is-hold strong {
  color: #8f3d24;
}

.contact-gate p {
  margin: 4px 0 0;
  color: var(--muted);
}

.map-profile-backdrop[hidden],
.map-profile-drawer[hidden] {
  display: none;
}

.map-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(39, 27, 18, 0.24);
  backdrop-filter: blur(2px);
}

.map-profile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  width: min(580px, 96vw);
  height: 100dvh;
  overflow: auto;
  border-left: 1px solid rgba(20, 81, 63, 0.18);
  background: #fffdf7;
  box-shadow: -18px 0 44px rgba(39, 27, 18, 0.24);
}

.map-profile-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(20, 81, 63, 0.14);
  background: rgba(255, 253, 247, 0.96);
}

.map-profile-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.map-profile-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.map-profile-body {
  padding: 14px 18px 24px;
}

.map-profile-body .detail-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.lead-packet {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.muted-note {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .engine-sidebar,
  .reference-dashboard .engine-sidebar {
    overflow: visible;
  }

  .engine-nav {
    max-height: 42vh;
  }
}

@media (max-width: 860px) {
  .market-tabs,
  .dashboard-map-body,
  .job-map-grid,
  .mobile-feed-grid {
    grid-template-columns: 1fr;
  }

  .process-layout {
    grid-template-columns: 1fr;
  }

  .process-sop {
    position: static;
  }

  .process-profile,
  .dashboard-layout-v3 .lead-info-top .detail-panel,
  .job-map-list,
  .mobile-feed-list {
    max-height: none;
  }

  .job-map-canvas {
    min-height: 340px;
  }

  .dashboard-map-canvas {
    min-height: 280px;
  }

  .contact-gate {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .market-tabs button {
    min-height: 68px;
  }

  .market-tabs strong {
    font-size: 1.15rem;
  }

  .job-map-marker {
    width: 30px;
    height: 30px;
  }

  .map-profile-drawer {
    width: 100vw;
  }

  .map-profile-head {
    align-items: flex-start;
    padding: 14px;
  }

  .map-profile-body {
    padding: 12px 14px 20px;
  }
}
