#agent-marketplace-homepage.amh-build-first .gf-page {
  width: min(780px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 78px;
  color: var(--bf-ink);
}

#agent-marketplace-homepage.amh-build-first .gf-page[hidden],
#agent-marketplace-homepage.amh-build-first .gf-page [hidden] {
  display: none !important;
}

#agent-marketplace-homepage.amh-build-first .gf-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 29px;
  color: var(--bf-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#agent-marketplace-homepage.amh-build-first .gf-back:hover,
#agent-marketplace-homepage.amh-build-first .gf-footnote a:hover {
  color: var(--bf-blue);
}

.amh-build-first .gf-header {
  max-width: 760px;
  padding-bottom: 34px;
}

.amh-build-first .gf-kicker,
.amh-build-first .gf-section-number,
.amh-build-first .gf-status-label,
.amh-build-first .gf-dialog-label {
  color: var(--bf-muted);
  font: 750 11px/1.45 var(--bf-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.amh-build-first .gf-kicker {
  margin: 0 0 13px;
}

.amh-build-first .gf-kicker span {
  margin: 0 5px;
  color: var(--bf-blue);
}

#agent-marketplace-homepage.amh-build-first .gf-header h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font: 780 clamp(36px, 5.8vw, 58px)/1.03 var(--bf-mono);
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.amh-build-first .gf-lead {
  max-width: 690px;
  margin: 0;
  color: var(--bf-muted);
  font-size: 17px;
  line-height: 1.62;
}

.amh-build-first .gf-status-sheet {
  position: relative;
  isolation: isolate;
  min-height: 246px;
  padding: 26px 30px 28px 68px;
  border: 1px solid var(--bf-ink);
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--bf-rule) 31px 32px),
    var(--bf-paper);
  box-shadow: 9px 9px 0 color-mix(in srgb, var(--bf-line) 58%, transparent);
}

.amh-build-first .gf-status-sheet::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 46px;
  border-left: 1px solid var(--bf-margin);
  pointer-events: none;
}

.amh-build-first .gf-status-sheet[data-tone="connected"] {
  border-top: 5px solid var(--bf-lime);
  padding-top: 22px;
}

.amh-build-first .gf-status-sheet[data-tone="attention"] {
  border-top: 5px solid var(--bf-blue);
  padding-top: 22px;
}

.amh-build-first .gf-status-sheet[data-tone="error"] {
  border-top: 5px solid var(--color-danger);
  padding-top: 22px;
}

.amh-build-first .gf-status-label {
  margin: 0 0 7px;
  color: var(--bf-blue);
}

.amh-build-first .gf-status-sheet[data-tone="connected"] .gf-status-label {
  color: var(--bf-green);
}

.amh-build-first .gf-status-sheet[data-tone="error"] .gf-status-label {
  color: var(--color-danger);
}

#agent-marketplace-homepage.amh-build-first .gf-status-sheet h2 {
  margin: 0 0 8px;
  font: 760 25px/1.25 var(--bf-mono);
  letter-spacing: -0.05em;
}

.amh-build-first .gf-status-copy {
  max-width: 650px;
  min-height: 52px;
  margin: 0 0 20px;
  color: var(--bf-muted);
  font-size: 14px;
  line-height: 1.6;
}

.amh-build-first .gf-consent-summary {
  max-width: 650px;
  margin: 0 0 21px;
  padding: 13px 15px;
  border-left: 4px solid var(--bf-lime);
  background: color-mix(in srgb, var(--bf-sheet) 88%, transparent);
}

.amh-build-first .gf-consent-summary p {
  margin: 0;
  color: var(--bf-ink);
  font-size: 12px;
  line-height: 1.55;
}

.amh-build-first .gf-consent-summary p + p {
  margin-top: 6px;
}

.amh-build-first .gf-actions,
.amh-build-first .gf-dialog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 17px;
}

.amh-build-first .gf-signin {
  margin-top: 28px;
  padding: 24px 26px 26px;
  border-left: 4px solid var(--bf-blue);
  background: var(--bf-sheet);
}

#agent-marketplace-homepage.amh-build-first .gf-signin h2 {
  margin: 0 0 7px;
  font: 750 21px/1.3 var(--bf-mono);
  letter-spacing: -0.045em;
}

.amh-build-first .gf-signin p {
  margin: 0 0 17px;
  color: var(--bf-muted);
}

.amh-build-first .gf-boundary {
  margin-top: 62px;
  padding-top: 33px;
  border-top: 2px solid var(--bf-ink);
}

.amh-build-first .gf-boundary-heading {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 28px;
}

.amh-build-first .gf-section-number {
  margin: 5px 0 0;
}

#agent-marketplace-homepage.amh-build-first .gf-boundary-heading h2 {
  margin: 0 0 8px;
  font: 760 29px/1.15 var(--bf-mono);
  letter-spacing: -0.055em;
}

.amh-build-first .gf-boundary-heading div > p {
  max-width: 620px;
  margin: 0;
  color: var(--bf-muted);
  font-size: 15px;
  line-height: 1.62;
}

.amh-build-first .gf-boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--bf-line);
  border-bottom: 1px solid var(--bf-line);
}

.amh-build-first .gf-boundary-columns section {
  padding: 25px 28px 27px 0;
}

.amh-build-first .gf-boundary-columns section + section {
  padding-left: 28px;
  border-left: 1px solid var(--bf-line);
}

#agent-marketplace-homepage.amh-build-first .gf-boundary-columns h3 {
  margin: 0 0 13px;
  font: 750 16px/1.35 var(--bf-mono);
  letter-spacing: -0.04em;
}

.amh-build-first .gf-boundary-columns ul {
  margin: 0;
  padding-left: 19px;
  color: var(--bf-muted);
  font-size: 14px;
  line-height: 1.62;
}

.amh-build-first .gf-boundary-columns li + li {
  margin-top: 7px;
}

.amh-build-first .gf-footnote,
.amh-build-first .gf-noscript {
  margin: 25px 0 0;
  color: var(--bf-muted);
  font-size: 12px;
  line-height: 1.6;
}

#agent-marketplace-homepage.amh-build-first .gf-footnote a {
  color: var(--bf-ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

.amh-build-first .gf-dialog {
  width: min(530px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--bf-ink);
  border-radius: var(--radius-sm);
  background: var(--bf-sheet);
  color: var(--bf-ink);
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--bf-ink) 28%, transparent);
}

.amh-build-first .gf-dialog::backdrop {
  background: rgba(21, 32, 25, 0.52);
}

.amh-build-first .gf-dialog form {
  padding: 28px 30px 30px;
}

.amh-build-first .gf-dialog-label {
  margin: 0 0 8px;
  color: var(--color-danger);
}

#agent-marketplace-homepage.amh-build-first .gf-dialog h2 {
  margin: 0 0 11px;
  font: 760 23px/1.25 var(--bf-mono);
  letter-spacing: -0.05em;
}

.amh-build-first .gf-dialog p:not(.gf-dialog-label) {
  margin: 0 0 22px;
  color: var(--bf-muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 700px) {
  #agent-marketplace-homepage.amh-build-first .gf-page {
    width: calc(100% - 32px);
    padding-top: 20px;
    padding-bottom: 56px;
  }

  #agent-marketplace-homepage.amh-build-first .gf-header h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .amh-build-first .gf-lead {
    font-size: 16px;
  }

  .amh-build-first .gf-status-sheet {
    min-height: 0;
    padding: 23px 19px 25px 48px;
    box-shadow: 6px 6px 0 color-mix(in srgb, var(--bf-line) 58%, transparent);
  }

  .amh-build-first .gf-status-sheet::before {
    left: 33px;
  }

  .amh-build-first .gf-status-sheet[data-tone] {
    padding-top: 19px;
  }

  .amh-build-first .gf-status-copy {
    min-height: 0;
  }

  .amh-build-first .gf-actions,
  .amh-build-first .gf-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #agent-marketplace-homepage.amh-build-first .gf-actions > *,
  #agent-marketplace-homepage.amh-build-first .gf-dialog-actions > * {
    width: 100%;
  }

  .amh-build-first .gf-boundary {
    margin-top: 50px;
  }

  .amh-build-first .gf-boundary-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .amh-build-first .gf-boundary-columns {
    grid-template-columns: 1fr;
  }

  .amh-build-first .gf-boundary-columns section {
    padding: 22px 0 24px;
  }

  .amh-build-first .gf-boundary-columns section + section {
    padding-left: 0;
    border-top: 1px solid var(--bf-line);
    border-left: 0;
  }

  .amh-build-first .gf-dialog form {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .amh-build-first .gf-page *,
  .amh-build-first .gf-page *::before,
  .amh-build-first .gf-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Connection health: a rail of what has to be true for Gmail to work, and a
   countdown while Google is in Testing. Status is always written out in words. */
.gf-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  max-width: 650px;
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.gf-rail[hidden],
.gf-meter[hidden],
.gf-rail-step[hidden] {
  display: none;
}

.gf-rail-step {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-top: 4px solid var(--color-line);
  background: var(--color-surface);
}

.gf-rail-step[data-status="done"] { border-top-color: var(--color-ok-ink); }
.gf-rail-step[data-status="current"] { border-top-color: var(--color-accent); }
.gf-rail-step[data-status="failed"] { border-top-color: var(--color-danger); }

.gf-rail-label {
  font: 750 var(--text-sm) / 1.3 var(--font-mono);
  color: var(--color-ink);
}

.gf-rail-state {
  font: 750 var(--text-xs) / 1.4 var(--font-mono);
  text-transform: uppercase;
  color: var(--color-muted);
}

.gf-rail-step[data-status="done"] .gf-rail-state { color: var(--color-ok-ink); }
.gf-rail-step[data-status="current"] .gf-rail-state { color: var(--color-accent-strong); }
.gf-rail-step[data-status="failed"] .gf-rail-state { color: var(--color-danger); }

.gf-rail-text {
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--color-muted);
}

.gf-meter {
  max-width: 650px;
  margin: 0 0 var(--space-4);
}

.gf-meter meter {
  display: block;
  width: 100%;
  height: var(--space-3);
}

.gf-meter p {
  margin: var(--space-2) 0 0;
  font-size: var(--text-md);
  color: var(--color-ink);
}

.gf-meter[data-warn="true"] p {
  color: var(--color-warn-ink);
  font-weight: 700;
}

/* Used by: one row per agent that can use the connection, each with its own
   status in words and its own choice. */
.gf-used {
  max-width: 650px;
  margin: 0 0 var(--space-4);
}

.gf-used[hidden] {
  display: none;
}

.gf-used h3 {
  margin: 0 0 var(--space-2);
  font: 750 var(--text-sm) / 1.3 var(--font-mono);
  color: var(--color-ink);
}

.gf-used-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-line);
}

.gf-used-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-line);
}

.gf-used-name {
  color: var(--color-ink);
  font-size: var(--text-md);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.gf-used-status {
  grid-column: 1;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.gf-used-note {
  grid-column: 1 / -1;
  color: var(--color-warn-ink);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.gf-used-row .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.gf-used-row[data-use="using"] .gf-used-status { color: var(--color-ok-ink); }
.gf-used-row[data-use="attention"] .gf-used-status { color: var(--color-danger); }

@media (max-width: 700px) {
  .gf-rail {
    grid-template-columns: 1fr;
  }

  .gf-used-row {
    grid-template-columns: 1fr;
  }

  .gf-used-row .btn {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}
