:root {
  --ink: #171a1f;
  --muted: #5d6472;
  --paper: #f7f4ee;
  --panel: #fffdf8;
  --line: #d9d1c3;
  --accent: #0b6b5f;
  --accent-dark: #07483f;
  --warning: #9d3f2e;
  --ok: #18836f;
  --shadow: 0 18px 50px rgba(23, 26, 31, 0.12);
  --font-sans: Roboto, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.site-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 72px);
}

.brand-mark,
.site-nav {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-mark {
  font-weight: 700;
  text-decoration: none;
}

.brand-icon {
  border-radius: 4px;
  display: block;
  height: 34px;
  object-fit: cover;
  width: 34px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.flash {
  border: 1px solid var(--line);
  margin: 0 auto 16px;
  max-width: 960px;
  padding: 12px 16px;
}

.flash-notice {
  background: #edf8f5;
}

.flash-alert,
.error-box {
  background: #fff0ed;
  border-color: #e2a093;
}

.hero-section {
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  min-height: calc(100vh - 90px);
  padding: 64px clamp(20px, 5vw, 72px) 96px;
}

.hero-copy {
  align-self: center;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(48px, 8vw, 104px);
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 28px;
  max-width: 880px;
}

h2 {
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: 0;
  line-height: 1.05;
}

h3 {
  font-size: 24px;
}

p,
li,
dd,
dt,
label,
td,
th {
  font-family: var(--font-sans);
}

.hero-lede {
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  border-radius: 6px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 14px 18px;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
}

.call-panel {
  align-self: center;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
}

.call-panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  font-weight: 800;
  gap: 10px;
  padding-bottom: 18px;
}

.status-dot {
  background: var(--ok);
  border-radius: 999px;
  display: block;
  height: 10px;
  width: 10px;
}

.call-summary-list {
  display: grid;
  gap: 20px;
  margin: 24px 0 0;
}

.call-summary-list div {
  display: grid;
  gap: 4px;
}

.call-summary-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.call-summary-list dd {
  font-size: 20px;
  margin: 0;
}

.section-band,
.cta-band,
.narrow-page,
.admin-page {
  padding: 72px clamp(20px, 5vw, 72px);
}

.narrow-page {
  margin: 0 auto;
  max-width: 840px;
}

.page-intro {
  margin: 0 auto 26px;
  max-width: 720px;
}

.page-intro h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  margin-bottom: 14px;
}

.page-intro p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 0;
}

.section-heading {
  max-width: 760px;
}

.feature-grid,
.metric-grid,
.admin-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.feature-grid article,
.admin-panel,
.form-shell,
.demo-access,
.prompt-card,
.metric-grid div,
.success-box,
.error-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.feature-grid p,
.form-shell p,
.demo-access p {
  color: var(--muted);
  line-height: 1.6;
}

.cta-band {
  background: var(--ink);
  color: var(--paper);
}

.cta-band p {
  color: #d9d1c3;
  max-width: 680px;
}

.form-shell,
.demo-access {
  box-shadow: var(--shadow);
}

.form-shell {
  margin: 0 auto;
  max-width: 720px;
}

.stacked-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.stacked-form label {
  display: grid;
  gap: 8px;
}

.stacked-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.label-row {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.field-required,
.field-optional {
  font-size: 12px;
  font-weight: 700;
}

.field-required {
  color: var(--accent-dark);
}

.field-optional {
  color: #8a8174;
}

input,
select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

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

.success-box {
  background: #edf8f5;
}

.phone-number {
  color: var(--accent-dark);
  display: inline-block;
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 900;
  margin: 12px 0 28px;
  text-decoration-thickness: 3px;
}

.demo-access h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  margin-bottom: 8px;
}

.prompt-card h2 {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.prompt-card {
  margin-top: 18px;
}

.prompt-card li {
  margin: 10px 0;
}

.admin-heading {
  margin-bottom: 24px;
}

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

.metric-grid div span {
  display: block;
  font-size: 42px;
  font-weight: 900;
}

.metric-grid div p {
  color: var(--muted);
  margin: 0;
}

.admin-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

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

table {
  border-collapse: collapse;
  font-family: ui-sans-serif, system-ui, sans-serif;
  width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.transcript {
  background: #f1ece3;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.app-body,
.auth-body {
  background: #f8faf9;
  color: var(--ink);
}

.app-sidebar {
  background: white;
  border-right: 1px solid #e4e0d8;
  bottom: 0;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 22px;
  position: fixed;
  top: 0;
  width: 280px;
}

.mobile-topbar,
.mobile-sidebar-dialog {
  display: none;
}

.app-brand {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 12px;
  text-decoration: none;
}

.app-nav {
  display: grid;
  gap: 4px;
  margin-top: 34px;
}

.app-nav a {
  border-radius: 6px;
  color: #364152;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  text-decoration: none;
}

.app-nav a:hover,
.app-nav a.active {
  background: #edf8f5;
  color: var(--accent-dark);
}

.app-sidebar-footer {
  border-top: 1px solid #e4e0d8;
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.app-sidebar-footer strong,
.app-sidebar-footer span {
  display: block;
  font-size: 13px;
}

.app-sidebar-footer span {
  color: var(--muted);
}

.link-button {
  background: none;
  border: 0;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.app-main {
  margin-left: 280px;
  padding: 42px clamp(28px, 5vw, 72px) 72px;
}

.app-page-heading {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.app-page-heading h1 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  margin-bottom: 10px;
}

.app-page-heading p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 0;
}

.app-metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.app-metrics div,
.app-panel {
  background: white;
  border: 1px solid #e4e0d8;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 26, 31, 0.06);
  padding: 22px;
}

.app-metrics span {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.app-metrics p {
  color: var(--muted);
  margin: 8px 0 0;
}

.app-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  margin-bottom: 18px;
}

.app-panel h2 {
  font-size: 22px;
  line-height: 1.2;
}

.empty-copy {
  color: var(--muted);
  margin-bottom: 0;
}

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

.call-card {
  border: 1px solid #e4e0d8;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 14px;
  text-decoration: none;
}

.call-card span,
.call-card p {
  color: var(--muted);
}

.call-card p {
  margin-bottom: 0;
}

.checklist {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  color: var(--muted);
  padding-left: 24px;
  position: relative;
}

.checklist li::before {
  border: 1px solid #b9b0a2;
  border-radius: 999px;
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  top: 5px;
  width: 12px;
}

.checklist li.complete {
  color: var(--ink);
}

.checklist li.complete::before {
  background: var(--ok);
  border-color: var(--ok);
}

.segmented-control {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.segmented-control a {
  border: 1px solid #e4e0d8;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  padding: 8px 14px;
  text-decoration: none;
}

.segmented-control a.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.detail-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 4px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  background: white;
  border: 1px solid #e4e0d8;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 420px;
  padding: 30px;
  width: 100%;
}

.auth-logo {
  border-radius: 6px;
  display: block;
  margin-bottom: 24px;
}

.auth-card h1 {
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 12px;
}

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

.knowledge-groups {
  display: grid;
  gap: 28px;
}

.knowledge-group h2 {
  border-bottom: 1px solid #e4e0d8;
  font-size: 18px;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

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

.knowledge-list article {
  align-items: start;
  border: 1px solid #e4e0d8;
  border-radius: 6px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.knowledge-list p {
  color: var(--muted);
  margin: 6px 0 0;
}

.knowledge-list span {
  background: #edf8f5;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.big-number {
  color: var(--accent-dark);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  margin-bottom: 0;
}

textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

@media (max-width: 860px) {
  .hero-section,
  .feature-grid,
  .admin-columns,
  .metric-grid,
  .app-metrics,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    gap: 16px;
    flex-direction: column;
  }

  h1 {
    font-size: 44px;
  }

  .desktop-sidebar {
    display: none;
  }

  .mobile-topbar {
    align-items: center;
    background: white;
    border-bottom: 1px solid #e4e0d8;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .mobile-menu-button {
    background: white;
    border: 0;
    display: grid;
    gap: 4px;
    padding: 8px;
  }

  .mobile-menu-button span {
    background: var(--ink);
    display: block;
    height: 2px;
    width: 22px;
  }

  .mobile-sidebar-dialog[open] {
    background: transparent;
    border: 0;
    display: block;
    height: 100%;
    inset: 0;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: 0;
    position: fixed;
    width: 100%;
  }

  .mobile-sidebar-dialog::backdrop {
    background: transparent;
  }

  .mobile-sidebar-backdrop {
    background: rgba(23, 26, 31, 0.72);
    inset: 0;
    position: fixed;
  }

  .mobile-sidebar-panel {
    background: white;
    bottom: 0;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.18);
    left: 0;
    max-width: 320px;
    overflow-y: auto;
    padding: 22px;
    position: fixed;
    top: 0;
    width: min(320px, calc(100vw - 64px));
  }

  .mobile-sidebar-panel .app-brand {
    padding-right: 48px;
  }

  .mobile-sidebar-close {
    background: var(--ink);
    border: 0;
    border-radius: 999px;
    color: white;
    font-size: 24px;
    height: 36px;
    line-height: 1;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 36px;
  }

  .mobile-app-nav {
    margin-top: 30px;
  }

  .app-main {
    margin-left: 0;
    padding: 28px 20px 52px;
  }

  .app-page-heading {
    display: grid;
  }
}
