.agency-page .nav .nav-signin { border-color: var(--ink); }
.agency-page section { scroll-margin-top: calc(var(--masthead-height) + 1px); }

.agency-page .hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(28px, 4vw, 58px);
}

.agency-page .hero-copy { padding: 0; container-type: normal; }
.agency-kicker {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agency-page .hero h1 {
  max-width: 17ch;
  font-size: clamp(2.2rem, 4.8vw, 4.75rem);
  line-height: .99;
}

.agency-page .hero .lead {
  max-width: 46ch;
  margin-top: clamp(14px, 2vw, 22px);
}

.agency-page .hero-actions { margin-top: 16px; }
.agency-demo-note { margin-top: 8px; color: var(--muted); font-size: .875rem; }

.how.how-board {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  max-width: 1120px;
}

.agency-how-intro { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agency-how-intro h2 { margin: 0; }
.agency-how-intro .how-tools { flex: none; }
.agency-how-intro .how-tools button { padding-inline: 8px; }

.board {
  grid-area: preview;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--card);
}

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

.board-head b { display: block; font: 600 1.3rem/1.12 var(--serif); }
.board-head small, .board-tag { font-size: .78rem; color: var(--muted); }
.board-tag { padding: 3px 7px; background: var(--paper-deep); color: var(--ink); font-weight: 600; }
.board:not([data-step="0"]) .board-tag { background: var(--accent-soft); }

.board-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(34px, auto);
  align-content: start;
  min-block-size: 204px;
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}

.bi {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 3px 2px;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  line-height: 1.25;
}

.bi:last-child { border-bottom: 0; }
.bi .ic {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.bi em, .bi .by { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.bi em { white-space: nowrap; }
.bi .g, .bi .gp, .bi .by { display: none; }

.board:not([data-step="0"]) .board-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(64px, 1fr);
  align-content: stretch;
  gap: 5px;
}

.board:not([data-step="0"]) .bi {
  grid-template-columns: 22px minmax(0, 1fr);
  align-content: center;
  column-gap: 6px;
  row-gap: 2px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: background .35s, border-color .35s;
}

.board:not([data-step="0"]) .bi .ic { grid-row: span 2; }
.board:not([data-step="0"]) .bi .q,
.board:not([data-step="0"]) .bi .qp { display: none; }
.board:not([data-step="0"]) .bi .g { display: block; font-weight: 600; }
.board:not([data-step="0"]) .bi:not(.paid) .gp {
  grid-column: 2;
  display: block;
  color: var(--accent-strong);
  font-size: .79rem;
}
.board:not([data-step="0"]) .bi.paid { border-color: var(--accent-soft); background: var(--accent-soft); }
.board .bi.paid .by {
  display: block;
  grid-column: 2;
  color: var(--ink);
  font-size: .77rem;
  animation: rise .35s var(--ease) both;
}

.board-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 8px;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

.board-foot b {
  color: var(--ink);
  font: 600 1.35rem/1 var(--serif);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.board-foot .m, .couple .m {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  background: var(--paper-deep);
}

.board-foot .m { opacity: 0; }
.board[data-step="2"] .board-foot .m { opacity: 1; }
.board-foot .m i, .couple .m i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .65s var(--ease);
}
.board-foot .m i { width: 0; }

.agency-page .section { padding-block: clamp(34px, 5vw, 70px); }
.agency-page .section-head { margin-bottom: clamp(18px, 3vw, 35px); }
.agency-page .section-head h2 { margin-bottom: 10px; }

.gain-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(20px, 5vw, 65px); }
.gain { padding: 15px 0 7px; border-top: 1px solid var(--line); }
.gain h3, .agency-setup-steps h3 {
  margin-bottom: 5px;
  font-size: clamp(1.28rem, 2.2vw, 1.72rem);
  font-weight: 600;
  line-height: 1.2;
}
.gain p, .agency-setup-steps p { color: var(--ink-soft); }
.gain .ico { display: inline-flex; margin-bottom: 8px; color: var(--muted); }
.agency-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  background: var(--card);
  color: var(--muted);
  font-size: .84rem;
}

.panel.live { width: 100%; margin: 0; padding: 14px; }
.panel .live-head { padding: 0 0 8px; }
.panel-caption { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .75rem; }
.panel-caption i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: agency-pulse 2.2s var(--ease) infinite; }
@keyframes agency-pulse {
  from { box-shadow: 0 0 0 0 var(--accent-soft); }
  to { box-shadow: 0 0 0 6px transparent; }
}
.panel-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding-bottom: 8px; }
.kpi { min-width: 0; padding: 6px; background: var(--paper-deep); }
.kpi small { display: block; color: var(--muted); font-size: .73rem; line-height: 1.2; }
.kpi b { display: block; margin-top: 4px; font: 600 1.32rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.kpi.bump b { animation: bump .35s var(--ease); }
.couple {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  padding: 6px 3px;
  border-bottom: 1px solid var(--line);
  font-size: .84rem;
  line-height: 1.25;
}
.couple b, .couple span { display: block; }
.couple span { color: var(--muted); font-size: .75rem; }
.couple .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.couple .amt span { font-weight: 400; }
.couple .m { margin-top: 4px; height: 3px; }
.couple.pop { background: var(--paper-deep); }
.feed-title { margin-top: 9px; color: var(--ink); font-size: .82rem; font-weight: 600; }
.panel .toasts { position: relative; min-height: 112px; padding: 5px 0 0; justify-content: flex-start; }
.panel .toast { width: 100%; border: 1px solid var(--line); background: var(--paper); box-shadow: none; }
.panel .toast.still { animation: none; }
.panel .toast.out { position: absolute; inset: auto 0 0; }
.panel .toast .ok { display: block; color: var(--muted); font-size: .72rem; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 7px 0; color: var(--muted); font-size: .78rem; }
.panel .live-cta { margin: 4px 0 0; }

.couple-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 22px; }

.agency-setup-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px clamp(18px, 4vw, 52px);
  counter-reset: agency-step;
  margin: 0;
  padding: 0;
  list-style: none;
}
.agency-setup-steps li { position: relative; padding: 13px 0 4px 38px; border-top: 1px solid var(--line); }
.agency-setup-steps li::before {
  counter-increment: agency-step;
  content: counter(agency-step);
  position: absolute;
  top: 13px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: .85rem;
  font-weight: 600;
}
.agency-setup-steps .who { display: block; margin-top: 8px; color: var(--muted); font-size: .82rem; font-weight: 600; }

.agency-page .agency-start-band {
  margin-top: 25px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.agency-page .agency-start-band h3 { font-weight: 600; }
.agency-page .final { padding-block: clamp(36px, 6vw, 85px); }
.agency-page .final .trail { opacity: .25; }
.agency-page .final .actions { justify-content: center; margin-top: 0; }
.agency-page .final .btn-ghost-light { border: 1px solid var(--accent-soft); color: var(--card); }
.agency-page .final .btn-ghost-light:hover { background: var(--accent-strong); }
.agency-page .tabbar-start a.tab-go[data-start] { background: var(--accent); color: var(--card); }

.agency-page .hs-f input,
.agency-page .hs-f textarea,
.agency-page .hs-chips span,
.agency-page .hs-go,
.agency-page .hs-sec { border-radius: 2px; }

@media (max-width: 900px) {
  .agency-page .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .agency-page .hero h1 { max-width: 23ch; font-size: clamp(2rem, 6.2vw, 3.55rem); }
  .agency-page .nav > a[href="#empezar"] { display: none; }
}

@media (max-width: 760px) {
  .agency-page .nav .nav-start { display: inline-flex; padding-inline: 10px; }
  .agency-page .hero-grid { padding-block: 20px 22px; }
  .agency-page .hero h1 { max-width: 18ch; font-size: clamp(2rem, 8.3vw, 3.15rem); }
  .agency-page .hero-actions { margin-top: 11px; }
  .agency-demo-note { margin-top: 5px; }
  .agency-page .hero-actions .btn { font-size: 1.05rem; }
  .how.how-board, .gain-grid, .agency-setup-steps { grid-template-columns: minmax(0, 1fr); }
  .board { width: 100%; max-width: 470px; justify-self: center; padding: 9px; }
  .board-head small, .board-tag { font-size: .71rem; }
  .board-items { min-block-size: 182px; grid-auto-rows: minmax(30px, auto); }
  .board:not([data-step="0"]) .board-items { grid-auto-rows: minmax(57px, 1fr); }
  .bi { font-size: .77rem; }
  .board:not([data-step="0"]) .bi { padding: 4px; column-gap: 4px; }
  .board:not([data-step="0"]) .bi:not(.paid) .gp, .board .bi.paid .by { font-size: .69rem; }
  .board-foot { font-size: .75rem; }
  .board-foot b { font-size: 1.2rem; }
  .kpi small { font-size: .66rem; }
  .kpi b { font-size: 1.1rem; }
  .agency-page .agency-start-band .btn { width: auto; }
}

@media (max-width: 370px) {
  .agency-page .nav .nav-start { display: none; }
}

@media (max-width: 760px) and (max-height: 600px) {
  .agency-how-intro h2 { font-size: 1.65rem; }
  .how-board .how-step button { flex-direction: row; align-items: center; }
  .how-board .how-step .n { flex: none; }
  .how-board .how-tools { gap: 8px; }
  .how-board .how-tools .editorial-link { font-size: .875rem; }
  .board-head { padding-bottom: 5px; }
  .board-head small { display: none; }

  .board-items { min-block-size: 148px; grid-auto-rows: minmax(24px, auto); }
  .board:not([data-step="0"]) .board-items { grid-auto-rows: minmax(46px, 1fr); }
  .board .bi { padding-block: 2px; }
  .board .bi .ic { width: 18px; height: 18px; }
  .board:not([data-step="0"]) .bi { grid-template-columns: minmax(0, 1fr); }
  .board:not([data-step="0"]) .bi .ic { display: none; }
  .board:not([data-step="0"]) .bi:not(.paid) .gp,
  .board[data-step="2"] .bi.paid .by { grid-column: 1; }
  .board-foot { margin-top: 4px; padding-top: 4px; }
}
