/* CRM capability story shared by the home page and the dedicated CRM page. */
.home-page .home-crm {
  width: 100%;
  max-width: none;
  padding-inline: max(24px, calc((100% - var(--container)) / 2 + 24px));
  border-top: 1px solid #dce5df;
  background: #edf3ef;
}

.home-crm-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 52px;
}

.home-crm-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.home-crm-cards article {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid #bdd0c6;
}

.home-crm-cards h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
}

.home-crm-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.home-crm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
}

.home-crm-note {
  max-width: 900px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.crm-dashboard {
  position: relative;
  min-width: 0;
  margin: 0;
}

.crm-dashboard-stage {
  position: relative;
  min-height: 360px;
  display: grid;
  align-items: center;
}

.crm-device {
  width: min(100%, 470px);
  overflow: hidden;
  border: 1px solid #294c55;
  border-radius: 18px;
  background: #102f38;
  box-shadow: 0 22px 54px rgba(8, 26, 34, .2);
}

.crm-device-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  color: #eef7f4;
  border-bottom: 1px solid #385b62;
  font-size: 13px;
}

.crm-device-bar b {
  color: #fff;
  font-weight: 600;
}

.crm-device-bar span {
  color: #b5d1ca;
}

.crm-device-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 12px 14px;
  background: #183d46;
}

.crm-device-tabs span {
  padding: 8px 5px;
  border-radius: 5px;
  color: #bcd5cf;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}

.crm-device-tabs span:first-child {
  color: #092b31;
  background: #bde8df;
  font-weight: 600;
}

.crm-device-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.crm-mini-stat {
  min-width: 0;
  padding: 12px;
  border: 1px solid #365960;
  border-radius: 8px;
  background: #173b44;
  color: #bcd5cf;
  font-size: 10px;
  line-height: 1.35;
}

.crm-mini-stat b {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-mini-chart {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(18px, 1fr));
  align-items: end;
  gap: 9px;
  height: 132px;
  padding: 18px 16px 14px;
  border: 1px solid #365960;
  border-radius: 8px;
  background: #f7fbf9;
}

.crm-mini-chart span {
  align-self: end;
  border-radius: 4px 4px 1px 1px;
  background: #4fa696;
}

.crm-mini-chart span:nth-child(1) { height: 25%; }
.crm-mini-chart span:nth-child(2) { height: 46%; }
.crm-mini-chart span:nth-child(3) { height: 31%; }
.crm-mini-chart span:nth-child(4) { height: 68%; }
.crm-mini-chart span:nth-child(5) { height: 53%; }
.crm-mini-chart span:nth-child(6) { height: 86%; }
.crm-mini-chart span:nth-child(7) { height: 73%; }

.crm-mail-card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(245px, 54%);
  padding: 16px;
  border: 1px solid #bfd2c8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(8, 26, 34, .14);
}

.crm-mail-card span {
  display: block;
  color: #6b7e78;
  font-size: 11px;
}

.crm-mail-card b {
  display: block;
  margin: 6px 0 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.crm-mail-card em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #0f5c54;
  background: #dcefe8;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.crm-dashboard figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.crm-page {
  --container: 1160px;
  background: #fafbf8;
}

.crm-page h1,
.crm-page h2,
.crm-page h3,
.crm-page h4 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.crm-hero .page-hero-copy {
  max-width: 660px;
}

.crm-hero .page-hero-copy h1 {
  max-width: 650px;
}

.crm-hero .hero-lead {
  max-width: 640px;
}

.crm-hero-visual {
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(214, 229, 226, .24);
  border-radius: 16px;
  background: rgba(9, 32, 40, .56);
}

.crm-flow {
  display: grid;
  gap: 13px;
}

.crm-flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.crm-flow-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(202, 226, 220, .26);
  border-radius: 10px;
  background: rgba(247, 251, 249, .08);
}

.crm-flow-card span {
  display: block;
  margin-bottom: 8px;
  color: #a7d8ce;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.crm-flow-card b {
  display: block;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
}

.crm-flow-arrow {
  color: #a7d8ce;
  font-size: 20px;
  text-align: center;
}

.crm-flow-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(202, 226, 220, .2);
}

.crm-flow-result p {
  margin: 0;
  color: #c8dfd9;
  font-size: 12px;
  line-height: 1.55;
}

.crm-flow-envelope {
  position: relative;
  width: 42px;
  height: 30px;
  border: 1px solid #a7d8ce;
  border-radius: 4px;
}

.crm-flow-envelope::before,
.crm-flow-envelope::after {
  position: absolute;
  top: 7px;
  width: 24px;
  height: 1px;
  background: #a7d8ce;
  content: "";
}

.crm-flow-envelope::before {
  left: 3px;
  transform: rotate(30deg);
}

.crm-flow-envelope::after {
  right: 3px;
  transform: rotate(-30deg);
}

.crm-hero-visual figcaption {
  margin-top: 18px;
  color: #c8dfd9;
  font-size: 12px;
  line-height: 1.55;
}

.crm-admin-section {
  border-top: 1px solid #dce5df;
}

.crm-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 46px;
  margin-top: 34px;
}

.crm-admin-card {
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid #bed0c7;
}

.crm-card-index {
  display: block;
  margin-bottom: 14px;
  color: #7b572c;
  font-size: 12px;
  font-weight: 600;
}

.crm-admin-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.3;
}

.crm-admin-card > p,
.crm-admin-card li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.crm-admin-card > p {
  margin: 0;
}

.crm-admin-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.crm-admin-card li + li {
  margin-top: 6px;
}

.crm-boundary-note {
  margin-top: 34px;
  padding: 20px 22px;
  border-left: 3px solid #c99c54;
  background: #f4efe6;
  color: #435b54;
  font-size: 14px;
  line-height: 1.7;
}

.crm-owner-band {
  padding: 0;
  background:
    linear-gradient(105deg, rgba(7, 26, 36, .98), rgba(16, 43, 53, .95));
}

.crm-owner-inner {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 64px 24px;
}

.crm-owner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 52px;
}

.crm-owner-copy h2 {
  max-width: 620px;
  color: #fff;
}

.crm-owner-copy > p {
  max-width: 640px;
  margin: 18px 0 0;
  color: #cbdcda;
  font-size: 16px;
  line-height: 1.7;
}

.crm-owner-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 26px;
}

.crm-owner-list article {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid #4b6b6e;
}

.crm-owner-list b {
  display: block;
  margin-bottom: 7px;
  color: #f5f8f6;
  font-size: 16px;
  line-height: 1.4;
}

.crm-owner-list span {
  display: block;
  color: #bdd2cf;
  font-size: 14px;
  line-height: 1.6;
}

.crm-report-sheet {
  overflow: hidden;
  border: 1px solid #385b62;
  border-radius: 14px;
  background: #f8fbf9;
  color: var(--ink);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .22);
}

.crm-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: #fff;
  background: #0b454f;
}

.crm-report-head b {
  font-size: 16px;
}

.crm-report-head span {
  color: #c8e2dc;
  font-size: 11px;
}

.crm-report-body {
  padding: 18px;
}

.crm-report-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.crm-report-stats div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d2dfd9;
  border-radius: 7px;
  background: #fff;
}

.crm-report-stats span {
  display: block;
  color: #687b75;
  font-size: 10px;
}

.crm-report-stats b {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #143d42;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-report-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  gap: 7px;
  height: 112px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d2dfd9;
  border-radius: 7px;
  background: #fff;
}

.crm-report-chart span {
  display: block;
  border-radius: 3px 3px 1px 1px;
  background: #5aa99a;
}

.crm-report-chart span:nth-child(1) { height: 38%; }
.crm-report-chart span:nth-child(2) { height: 54%; }
.crm-report-chart span:nth-child(3) { height: 43%; }
.crm-report-chart span:nth-child(4) { height: 72%; }
.crm-report-chart span:nth-child(5) { height: 59%; }
.crm-report-chart span:nth-child(6) { height: 92%; }
.crm-report-chart span:nth-child(7) { height: 65%; }
.crm-report-chart span:nth-child(8) { height: 81%; }

.crm-report-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.crm-report-files span {
  padding: 7px 9px;
  border-radius: 5px;
  color: #0b554e;
  background: #dbeee8;
  font-size: 11px;
  font-weight: 600;
}

.crm-report-caption {
  margin: 12px 0 0;
  color: #b7cfca;
  font-size: 12px;
  line-height: 1.55;
}

.crm-owner-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid #4b6b6e;
  color: #bdd2cf;
  font-size: 13px;
  line-height: 1.65;
}

.crm-owner-inner .software-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 30px;
}

.crm-final {
  background: #edf3ef;
}

.crm-final-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.crm-final-copy {
  max-width: 760px;
}

.crm-final h2 {
  margin-bottom: 12px;
}

.crm-final p {
  color: var(--muted);
  line-height: 1.7;
}

.crm-final-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.crm-page a:focus-visible {
  outline: 3px solid #c8994f;
  outline-offset: 4px;
}

@media (max-width: 1000px) {
  .home-crm-layout,
  .crm-owner-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-dashboard {
    max-width: 620px;
  }

  .crm-owner-layout {
    gap: 36px;
  }
}

@media (max-width: 780px) {
  .home-page .home-crm {
    padding-inline: 22px;
  }

  .home-crm-layout {
    gap: 32px;
  }

  .home-crm-cards,
  .crm-admin-grid,
  .crm-owner-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-dashboard-stage {
    min-height: 340px;
  }

  .crm-hero-visual {
    padding: 18px;
  }

  .crm-owner-inner {
    padding: 44px 22px;
  }

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

  .crm-final-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-final-actions {
    width: 100%;
  }

  .crm-final-actions a {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .crm-dashboard-stage {
    min-height: 0;
    display: block;
  }

  .crm-device {
    width: 100%;
  }

  .crm-device-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-mini-stat:nth-child(3) {
    grid-column: 1 / -1;
  }

  .crm-mail-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: calc(100% - 28px);
    margin: -18px 14px 0;
  }

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

  .crm-flow-arrow {
    transform: rotate(90deg);
  }

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

@media (max-width: 360px) {
  .home-page .home-crm,
  .crm-owner-inner {
    padding-inline: 18px;
  }

  .crm-device-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
