.developer-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 56px);
  background:
    radial-gradient(ellipse at 88% 5%, var(--page-glow), transparent 38%),
    var(--page);
}

.developer-shell {
  width: min(100%, 940px);
  margin: 0 auto;
  animation: portal-arrive 520ms ease both;
}

.developer-header,
.header-actions,
.dashboard-heading,
.section-heading,
.form-actions,
.client-heading,
.client-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.developer-header {
  min-height: 48px;
  margin-bottom: clamp(48px, 8vw, 96px);
}

.wordmark {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.header-label,
.eyebrow,
.card-number {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.quiet-button,
.secondary-button,
.text-button,
.client-action {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  transition:
    border-color 200ms,
    transform 200ms,
    background 200ms;
}

.quiet-button:hover,
.secondary-button:hover,
.client-action:hover {
  border-color: var(--link);
  transform: translateY(-1px);
}

.text-button {
  border-color: transparent;
  background: transparent;
  color: var(--link);
}

.text-button:hover {
  text-decoration: underline;
}

.quiet-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.client-action:focus-visible,
.wordmark:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.developer-intro {
  max-width: 630px;
  margin-bottom: 31px;
}

.developer-intro h1 {
  margin: 11px 0 13px;
  font-size: clamp(40px, 6.5vw, 68px);
  font-weight: 620;
  letter-spacing: -0.075em;
  line-height: 1.04;
}

.developer-intro > p:last-child,
.portal-card > p,
.dashboard-heading p,
.small-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.portal-card,
.client-card {
  padding: clamp(23px, 3.5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signed-out-card {
  max-width: 550px;
}

.portal-card h2,
.dashboard-heading h2 {
  margin: 9px 0 8px;
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 620;
  letter-spacing: -0.055em;
}

.start-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.start-actions .primary-button,
.start-actions .secondary-button {
  min-height: 51px;
  margin: 0;
}

.start-actions .text-button {
  justify-self: start;
  grid-column: 1 / -1;
}

.portal-notice {
  max-width: 700px;
  margin: 0 0 20px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.portal-notice[data-kind="error"] {
  border-color: color-mix(in srgb, var(--error) 25%, var(--line));
  background: var(--error-bg);
  color: var(--error);
}

.portal-notice[data-kind="success"] {
  background: var(--success-bg);
  color: var(--success);
}

.portal-progress {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.portal-progress .progress-spinner {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  margin: 0;
}

.portal-progress strong {
  font-size: 13px;
}

.portal-progress p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.portal-progress .progress-limit {
  margin-top: 8px;
}

.dashboard-heading,
.section-heading {
  align-items: end;
  margin: 34px 0 17px;
}

.dashboard-heading h2,
.section-heading h3 {
  margin: 4px 0;
}

.count-pill {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.editor-card h3,
.section-heading h3 {
  font-size: 23px;
  font-weight: 620;
  letter-spacing: -0.045em;
}

.editor-card h3 {
  margin: 10px 0 4px;
}

.editor-card form {
  max-width: 710px;
  margin-top: 24px;
}

.field textarea {
  display: block;
  width: 100%;
  min-height: 105px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.field textarea:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--link) 14%, transparent);
}

.form-actions {
  justify-content: start;
}

.form-actions .primary-button {
  width: min(100%, 220px);
  margin: 0;
}

.client-list {
  display: grid;
  gap: 13px;
}

.client-card {
  box-shadow: none;
}

.client-card h4 {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 650;
}

.client-id,
.callback-url {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.client-id {
  margin: 0;
  color: var(--muted);
}

.client-actions {
  justify-content: end;
}

.client-action[data-action="delete"] {
  color: var(--error);
}

.callback-label {
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.callback-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.empty-clients {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes portal-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .developer-header {
    margin-bottom: 56px;
  }
  .header-label {
    display: none;
  }
  .start-actions {
    grid-template-columns: 1fr;
  }
  .start-actions .text-button {
    grid-column: auto;
  }
  .client-heading,
  .dashboard-heading {
    align-items: start;
    flex-direction: column;
  }
  .client-actions {
    justify-content: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .developer-shell {
    animation: none;
  }
}
