/* The sample automation builder and report on their feature pages. They
   keep the CRM's own green accents (the report chart draws in them), set in
   the site's type with square corners and no shadow, like every other
   product view on the site. */
.demo-load-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px 20px;
  border: 1px solid #7b8770;
  border-radius: 2px;
  background: #fff;
  color: #182012;
  font-size: 14px;
  line-height: 1.5;
}
.demo-load-status .crm-button {
  margin: 0;
}
.automation-demo {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-control);
  overflow: hidden;
  font-family: var(--text);
  color: #182012;
}
.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fff;
  padding: 24px;
}
.builder-header h3 {
  font: 700 26px/1.3 var(--text);
  letter-spacing: -0.02em;
  color: #182012;
  margin-bottom: 8px;
}
.builder-header small {
  font-size: 14px;
  color: #4d5944;
}
.demo-badge {
  background: #edf8d4;
  color: #41620f;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 2px;
}
.builder-tabs {
  background: #eef1e8;
  display: flex;
  gap: 24px;
  padding: 0 24px;
  font-size: 14px;
}
.builder-tabs span {
  padding: 16px;
  border-bottom: 2px solid #41620f;
  color: #41620f;
  background: #edf8d4;
}
.builder-tabs a {
  padding: 16px;
  color: #4d5944;
}
.builder-body {
  padding: 28px;
  display: grid;
  gap: 16px;
}
.builder-row {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 24px;
}
.builder-row > div:first-child {
  padding-top: 14px;
}
.builder-row strong {
  font-weight: 600;
}
.builder-row small {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: #4d5944;
  margin-top: 6px;
  max-width: 130px;
}
.builder-card {
  border: 1px solid #dde3d5;
  border-radius: 2px;
  padding: 20px 16px;
  background: white;
  font-size: 14px;
}
.field-row {
  display: flex;
  gap: 16px;
  align-items: center;
}
.crm-field {
  display: block;
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 8px 0 14px;
}
.crm-field > span {
  position: absolute;
  left: 8px;
  top: -9px;
  padding: 0 4px;
  background: #fff;
  font-size: 14px;
  color: #4d5944;
  z-index: 1;
}
.crm-field input,
.crm-field select,
.crm-field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid #7b8770;
  border-radius: 2px;
  background: white;
  color: #182012;
  padding: 11px 12px;
  font-size: 14px;
  resize: vertical;
}
.crm-helper {
  font-size: 14px;
  line-height: 1.5;
  color: #4d5944 !important;
  margin: 4px 0;
}
.radio {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.radio:has(:checked) {
  background: #edf8d4;
  border-radius: 2px;
}
input[type="radio"] {
  accent-color: #41620f;
}
.delay-control {
  font-size: 14px;
}
.delay-control input {
  width: 72px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #7b8770;
  border-radius: 2px;
}
.builder-card hr {
  border: 0;
  border-top: 1px solid #dde3d5;
  margin: 18px 0;
}
.action-item {
  border: 1px solid #dde3d5;
  border-radius: 2px;
  margin-top: 12px;
  padding: 16px;
  background: white;
}
.action-item summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 12px;
}
.action-item label {
  display: block;
  margin-top: 16px;
  font-size: 14px;
}
.action-item input {
  min-height: 44px;
  padding: 8px;
  border: 1px solid #7b8770;
  border-radius: 2px;
  max-width: 100%;
}
.crm-button {
  background: white;
  border: 1px solid #7b8770;
  border-radius: 2px;
  padding: 9px 12px;
  font-size: 14px;
  min-height: 44px;
  margin-top: 12px;
}
.crm-button:hover:not(:disabled) {
  background: #edf8d4;
}
.crm-button:disabled {
  background: #eef1e8;
  color: #65705f;
  border-color: #dde3d5;
  cursor: not-allowed;
}
.automation-demo :focus-visible,
.report-demo :focus-visible,
.demo-load-status :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.builder-foot {
  background: white;
  padding: 16px 28px;
  font-size: 14px;
  color: #4d5944;
}
.report-demo {
  font-family: var(--text);
  color: #182012;
  font-size: 14px;
  min-width: 0;
}
.report-nav {
  padding: 0 8px 12px;
  color: #41620f;
  border-bottom: 1px solid #dde3d5;
  font-weight: 600;
  line-height: 1.7;
}
.report-nav span {
  color: #4d5944;
  margin-left: 20px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}
.metrics > div {
  padding: 20px 12px;
  border-right: 1px solid #e3e6dd;
  border-bottom: 1px solid #e3e6dd;
}
.metrics small {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}
.metrics strong {
  display: block;
  font-size: 24px;
  margin: 8px 0;
}
.metrics em {
  font-size: 14px;
  color: #4d5944;
  font-style: normal;
}
.report-demo h4 {
  font-size: 14px;
  letter-spacing: 1.3px;
  margin: 24px 0 8px;
}
.metrics.live {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.live strong {
  font-size: 22px;
}
.chart-card {
  margin-top: 24px;
  padding: 20px;
  min-width: 0;
  border: 1px solid #dde3d5;
  background: #fff;
  border-radius: 2px;
}
.chart-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.chart-heading > div:first-child {
  margin-right: auto;
}
.chart-heading strong {
  font-size: 16px;
}
.chart-heading small {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 6px;
  color: #4d5944;
}
.chart-heading select {
  font-size: 14px;
  min-height: 44px;
  padding-inline: 8px;
  color: #182012;
  border: 0;
  background: white;
}
.chart-heading label {
  display: flex;
  align-items: center;
  font-size: 14px;
  border: 1px solid #7b8770;
  padding: 0 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.view-switch {
  display: flex;
  background: #eef1e8;
  border-radius: 2px;
  padding: 2px;
}
.view-switch button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #182012;
}
.view-switch button[aria-pressed="true"] {
  background: #edf8d4;
  border-color: #8fae42;
}
.chart-content {
  margin-top: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.chart-content svg {
  width: 100%;
  min-width: 720px;
  height: auto;
  display: block;
}
.chart-content svg text {
  font-family: var(--text);
  font-size: 14px;
  fill: #65705f;
}
.month-hit:hover,
.chart-content g:focus .month-hit {
  fill: #edf8d4aa;
}
.report-inspect {
  min-height: 42px;
  font-size: 14px;
  line-height: 1.5;
  color: #4d5944 !important;
  padding-top: 16px;
}
.chart-content .table-scroll {
  max-height: 340px;
  overflow: auto;
}
.chart-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.chart-content th,
.chart-content td {
  padding: 12px 8px;
  text-align: right;
  border-bottom: 1px solid #e4e8de;
}
.chart-content th:first-child {
  text-align: left;
}
.chart-content td {
  white-space: nowrap;
}
.chart-content tbody tr:hover,
.chart-content tbody tr:focus {
  background: #edf8d4;
}
.chart-content g[data-month]:focus {
  outline: none;
}
.chart-content g[data-month]:focus-visible .month-hit {
  stroke: #41620f;
  stroke-width: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 760px) {
  .builder-header {
    padding: 20px;
    align-items: start;
  }
  .builder-header h3 {
    font-size: 20px;
  }
  .demo-badge {
    font-size: 13px;
    padding: 6px 10px;
  }
  .builder-body {
    padding: 20px;
    gap: 24px;
  }
  .builder-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .builder-row > div:first-child {
    padding: 0;
  }
  .builder-row small {
    max-width: none;
  }
  .field-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .crm-field {
    flex-basis: 100%;
    margin-bottom: 10px;
  }
  .builder-tabs {
    padding-inline: 12px;
  }
  .builder-tabs a {
    font-size: 14px;
  }
  .builder-card {
    padding: 16px 12px;
  }
  .builder-foot {
    padding: 16px;
  }
  .crm-field input,
  .crm-field select,
  .crm-field textarea,
  .action-item input,
  .delay-control input,
  .chart-heading select {
    font-size: 16px;
  }
  .metrics,
  .metrics.live {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics > div {
    padding: 16px 8px;
  }
  .metrics strong {
    font-size: 22px;
  }
  .chart-card {
    padding: 16px 12px;
  }
  .chart-heading > div:first-child {
    flex-basis: 100%;
    margin-bottom: 4px;
  }
  .report-nav span {
    display: block;
    margin: 6px 0 0;
  }
}
