.dev-header,
.dev-footer,
.developer-portal {
  --brand: #0a2958;
  --brand-dark: #173f75;
  --accent: #0a2958;
}

:root {
  --ink: #172a46;
  --paper: #f5f7fa;
  --card: #ffffff;
  --line: #e1e6ed;
  --lime: #0a2958;
  --purple: #0a2958;
  --muted: #5b6778;
  --danger: #be123c;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--public-font-family, Hanken, Arial, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.dev-brand,
.dev-footer,
.hero h1,
.section h2,
.dark-section h2,
.cta h2,
.steps h3,
.vertical-grid h3,
.form-layout aside h1,
.auth-panel h1,
.panel-heading > span,
.console-title h1,
.metrics strong,
.section-title h2,
.production-card h2,
.app-top h3,
.portal-modal h2,
.docs-content h1,
.docs-content h2,
.docs-content h3,
.endpoint > .method {
  font-family: var(--public-font-family, Hanken, Arial, sans-serif);
  color: #0a2958;
}

.dev-header {
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}
.dev-footer {
  background: #fff;
  border-top: 1px solid var(--line);
}

.dev-brand b,
.panel a,
.step-icon,
.auth-flow b,
.credential button,
.app-meta button,
.sandbox-note b { color: #0a2958; }

.button {
  border-radius: 10px;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.button-primary {
  border-color: #173f75;
  background: #0a2958;
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 41, 88, .18);
}

.button-primary:hover {
  transform: none;
  background: #173f75;
  box-shadow: 0 10px 24px rgba(10, 41, 88, .24);
}

.button-dark { background: #0a2958; }
.button-dark:hover { background: #173f75; }

.panel,
.app-card,
.metrics,
.auth-flow > div,
.info-box {
  border-color: #e1e6ed;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}

.panel { box-shadow: 0 18px 50px rgba(15, 23, 42, .09); }
.form-page { background: var(--paper); }

.form-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.form-panel select {
  height: 52px;
  min-height: 52px;
  box-sizing: border-box;
}

.login-panel h1 {
  font-size: clamp(36px, 4vw, 40px);
  letter-spacing: -.04em;
  white-space: nowrap;
}
.create-app-modal h2 { white-space: nowrap; }
.console-sidebar { background: #eef3f8; }
.console-sidebar nav a.active { color: #173f75; }
.eyebrow span { background: #0a2958; }

input:focus,
select:focus,
textarea:focus {
  border-color: #0a2958;
  box-shadow: 0 0 0 3px rgba(10, 41, 88, .13);
}

.choice-card:has(input:checked) {
  border-color: #0a2958;
  background: #edf2f9;
}

.choice-card input,
.terms input { accent-color: #0a2958; }
.env-sandbox { background: #e0f2fe; color: #0369a1; }
.state.active { background: #dcfce7; color: #166534; }
.tag-row span { background: #f1f5f9; }

.production-card {
  border-color: #c4d2e5;
  background: #edf2f9;
  box-shadow: 0 12px 28px rgba(10, 41, 88, .10);
}

.code-window {
  background: #0d2344;
  border-color: #29446a;
  box-shadow: 0 18px 45px rgb(10 41 88 / 12%);
  transform: none;
}
.code-block { background: #0d2344; color: #f2f6fc; }
.code-window .muted, .code-window .window-bar span,
.code-block > div { color: #afc1d9; }
.code-window .window-bar, .code-block > div { border-color: #29446a; }
.dark-section { background: #0a2958; }
.dark-section h2, .dark-section h3 { color: #fff; }
.vertical-intro > p, .vertical-grid p { color: #c4d2e5; }
.vertical-grid article { border-color: #3b567e; }
.vertical-number { color: #c4d2e5; }
.eyebrow.light span { background: #f28c28; }
.logos-strip { color: var(--muted); }
.docs-sidebar nav a.active { background: #edf2f9; color: #0a2958; }
.docs-content th { background: #edf2f9; }
input, select, textarea { border-color: #c4d2e5; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #0a2958;
  outline-offset: 4px;
}
.code-block button { color: #bfdbfe; }
.code-block button:focus-visible { outline-color: #bfdbfe; }
.endpoint > .method { color: #fff; }
.method.post { background: #0a2958; }
.info-box { border-left-color: #0a2958; }

.dev-brand-mark {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e6ed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.dev-brand-mark img {
  position: absolute;
  width: 200%;
  height: 200%;
  max-width: none;
  left: -50%;
  top: -4%;
  object-fit: contain;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input { padding-right: 48px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 8px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5b6778;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #f1f5f9;
  color: #173f75;
  outline: 2px solid transparent;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.button-spinner {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: portal-spin .7s linear infinite;
}

.is-submitting button[type="submit"] { cursor: wait; }
.is-submitting button[type="submit"]:disabled { opacity: .78; }

@keyframes portal-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .button-spinner { animation-duration: 1.4s; }
  .button { transition: none; }
}

@media (max-width: 480px) {
  .login-panel h1 {
    font-size: 36px;
    white-space: normal;
  }

  .create-app-modal h2 { white-space: normal; }
}

.app-meta > div { position: relative; }

.app-meta > div:first-child {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
}

.app-meta > div:first-child > span { grid-column: 1; grid-row: 1; }
.app-meta > div:first-child > button {
  position: static;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  min-height: 28px;
  margin: -5px -7px 0 0;
  padding: 5px 7px;
  border-radius: 7px;
}
.app-meta > div:first-child > button:hover { background: #edf2f9; }
.app-meta > div:first-child > code { grid-column: 1 / -1; grid-row: 2; }

.has-portal-modal { overflow: hidden; }

.portal-confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(5px);
}

.portal-confirm-layer[hidden] { display: none; }

.portal-confirm-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 18px;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid #e1e6ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
  animation: portal-modal-in .18s ease-out;
}

.portal-confirm-icon {
  display: grid;
  grid-column: 1;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #fff1f2;
  color: #be123c;
}

.portal-confirm-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.portal-confirm-copy { grid-column: 2; min-width: 0; }
.portal-confirm-copy h2 {
  margin: 9px 36px 8px 0;
  font-size: 23px;
  line-height: 1.2;
}
.portal-confirm-copy p { margin: 0; color: #5b6778; }

.portal-confirm-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5b6778;
  font-size: 25px;
  cursor: pointer;
}
.portal-confirm-close:hover { background: #f1f5f9; color: #172a46; }

.portal-confirm-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.button-danger {
  border-color: #be123c;
  background: #be123c;
  color: #fff;
}
.button-danger:hover { border-color: #9f1239; background: #9f1239; }

@keyframes portal-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-confirm-card { animation: none; }
}

@media (max-width: 600px) {
  .portal-confirm-card { grid-template-columns: 1fr; padding: 24px; }
  .portal-confirm-icon { grid-column: 1; margin-bottom: 16px; }
  .portal-confirm-copy { grid-column: 1; }
  .portal-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
