:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #edf3f7;
  --ink: #152231;
  --muted: #617184;
  --line: #d7e1ea;
  --nav: #0f1c2a;
  --nav-soft: #152536;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --accent: #3b82f6;
  --accent-soft: #e7f5f8;
  --warning: #c09a43;
  --shadow: 0 22px 54px rgba(16, 33, 51, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(237, 243, 247, 0.9), rgba(244, 247, 251, 0) 560px),
    var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  letter-spacing: 0;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(21, 34, 49, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 34, 49, 0.032) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 520px);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

#modelField {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.06;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(214, 224, 232, 0.9);
  background: rgba(247, 250, 252, 0.92);
  color: var(--ink);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(12, 24, 36, 0.04);
}

.brand,
.header-actions,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 154px;
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 154px;
  height: auto;
  background: transparent;
  mix-blend-mode: multiply;
  filter: invert(1) grayscale(1) contrast(1.25);
  opacity: 1;
}

.nav-links {
  gap: clamp(16px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--brand-strong);
}

.header-actions {
  gap: 10px;
}

.lang-switch,
.header-cta,
.primary-button,
.secondary-button,
.copy-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.lang-switch {
  min-width: 48px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--brand-strong);
}

.header-cta,
.primary-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.header-cta {
  background: #f4f8fb;
  color: var(--nav);
  box-shadow: none;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--line);
  background: var(--surface);
  color: var(--brand-strong);
  font-weight: 700;
}

.lang-switch:hover,
.header-cta:hover,
.primary-button:hover,
.secondary-button:hover,
.copy-button:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
}

.primary-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 470px);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
  min-height: calc(100vh - 74px);
  padding: 112px clamp(20px, 5vw, 72px) 72px;
}

.hero-copy,
.router-viz {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: 84px;
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 720px;
  margin-bottom: 34px;
  color: #516171;
  font-size: 21px;
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-width: 150px;
  padding: 14px 22px;
  text-align: center;
}

.router-viz {
  align-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(11, 27, 40, 0.08);
}

.router-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbfd, #f2f7fa);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
}

.pulse::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  animation: pulse 1.8s ease-in-out infinite;
}

.router-stage {
  position: relative;
  padding: 20px 10px 20px;
  background:
    radial-gradient(circle at 50% 48%, rgba(37, 99, 235, 0.08), transparent 60%),
    linear-gradient(180deg, #fbfdff, #f4f8fc);
}

.router-graph {
  display: block;
  width: 100%;
  height: auto;
}

.router-links line {
  stroke: rgba(37, 99, 235, 0.18);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  transition: stroke 280ms ease, stroke-width 280ms ease, opacity 280ms ease;
}

.router-links line.active {
  stroke: rgba(37, 99, 235, 0.55);
  stroke-width: 1.6;
  stroke-dasharray: none;
}

.router-particles circle {
  fill: #3b82f6;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.7));
}

.router-providers {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.router-providers li {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-148px) rotate(calc(var(--angle) * -1));
  box-shadow: 0 6px 16px rgba(15, 28, 42, 0.08);
  transition: border-color 280ms ease, box-shadow 280ms ease, transform 280ms ease;
}

.router-providers li .provider-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  transition: background 280ms ease, box-shadow 280ms ease;
}

.router-providers li.active {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.18);
}

.router-providers li.active .provider-dot {
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.router-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbfd, #f2f7fa);
}

.router-stats div {
  display: grid;
  gap: 4px;
  padding: 14px 10px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.router-stats div:last-child {
  border-right: 0;
}

.router-stats strong {
  color: #1d4ed8;
  font-size: 19px;
  font-weight: 750;
  line-height: 1;
}

.router-stats span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 clamp(20px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 31, 45, 0.05);
}

.proof-strip div {
  display: grid;
  gap: 8px;
  min-height: 124px;
  align-content: center;
  padding: 24px clamp(18px, 4vw, 38px);
  border-right: 1px solid var(--line);
}

.proof-strip div:last-child {
  border-right: 0;
}

.proof-strip strong {
  color: #1d4ed8;
  font-size: 34px;
  font-weight: 760;
  line-height: 1;
}

.proof-strip span {
  color: var(--muted);
  line-height: 1.45;
}

.section {
  padding: 112px clamp(20px, 5vw, 72px);
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.7fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: start;
  margin-bottom: 44px;
}

h2 {
  margin-bottom: 0;
  font-size: 54px;
  font-weight: 740;
  line-height: 1.05;
  letter-spacing: 0;
}

.split-heading p,
.developer-copy p,
.enterprise-section > h2 + p {
  color: #516171;
  font-size: 18px;
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.feature-grid article {
  min-height: 268px;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.feature-grid article:last-child {
  border-right: 0;
}

.feature-index {
  display: block;
  margin-bottom: 60px;
  color: #2563eb;
  font-size: 16px;
  font-weight: 800;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.25;
}

.feature-grid p,
.model-column p,
.enterprise-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.model-section {
  background: linear-gradient(180deg, #eef4f8, #eaf1f6);
}

.model-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.model-column {
  min-height: 210px;
  padding: clamp(24px, 4vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.model-column:nth-child(2n) {
  border-right: 0;
}

.model-column:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.model-column h3 {
  color: var(--brand-strong);
}

.developer-section {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(320px, 0.8fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
}

.developer-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.developer-points span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 10px 13px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #2563eb;
  font-size: 14px;
  font-weight: 650;
}

.code-window {
  position: relative;
  overflow: hidden;
  border: 1px solid #bfd0db;
  border-radius: 8px;
  background: linear-gradient(180deg, #10202f, #0b1723);
  box-shadow: 0 22px 54px rgba(9, 20, 31, 0.22);
}

.code-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #152334;
}

.code-tab {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.code-tab:last-child {
  border-right: 0;
}

.code-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 26px;
  color: #d8e7ee;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.72;
}

.copy-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.enterprise-section {
  background: linear-gradient(180deg, #f7fafc, #ffffff);
}

.enterprise-section > h2 {
  max-width: 980px;
  margin-bottom: 42px;
}

.enterprise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.enterprise-grid article {
  min-height: 220px;
  padding: clamp(22px, 3vw, 34px);
  background: linear-gradient(180deg, #fcfdfe, #f7fafc);
}

.enterprise-grid h3 {
  color: var(--brand-strong);
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 clamp(20px, 5vw, 72px) 72px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid #bfd0db;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(31, 95, 134, 0.09), rgba(43, 142, 163, 0.06)),
    var(--surface);
  box-shadow: var(--shadow);
}

.cta-band h2 {
  max-width: 840px;
  font-size: 46px;
  line-height: 1.08;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #f8fbfd;
  color: var(--muted);
  font-size: 14px;
}

.docs-page {
  background: linear-gradient(180deg, #eef4f8, #f6f8fb);
}

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: 42px clamp(20px, 5vw, 72px) 88px;
}

.docs-sidebar {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(18, 31, 45, 0.05);
}

.docs-sidebar a {
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.docs-sidebar a:hover,
.docs-sidebar a:focus {
  background: var(--surface-soft);
  color: var(--brand-strong);
}

.docs-content {
  max-width: 940px;
}

.docs-hero,
.docs-section {
  scroll-margin-top: 110px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(16, 33, 51, 0.04);
}

.docs-hero {
  padding: clamp(30px, 5vw, 52px);
}

.docs-hero h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
}

.docs-hero p,
.docs-section p {
  color: #516171;
  font-size: 17px;
  line-height: 1.72;
}

.docs-section {
  padding: clamp(24px, 4vw, 38px);
}

.docs-section h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 40px);
}

.docs-section h3 {
  color: var(--brand-strong);
  font-size: 18px;
}

.docs-section pre {
  margin-top: 18px;
  border-radius: 8px;
  background: #0c1720;
}

.docs-section code,
.docs-callout code,
.docs-table code {
  border: 1px solid #d8e2e9;
  border-radius: 5px;
  padding: 2px 5px;
  background: #edf4f8;
  color: #12384b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.docs-section pre code {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.docs-callout {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 24px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #2563eb;
}

.docs-callout strong {
  color: #1d4ed8;
}

.docs-callout a {
  color: var(--brand-strong);
  font-weight: 700;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.docs-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #fcfdfe, #f7fafc);
}

.docs-grid p {
  margin-bottom: 0;
  font-size: 15px;
}

.docs-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 15px;
}

.docs-table th,
.docs-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  background: #edf4f8;
  color: var(--brand-strong);
  font-weight: 750;
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.docs-table td {
  color: #526170;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .split-heading,
  .developer-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 42px;
  }

  .router-viz {
    align-self: stretch;
  }

  .proof-strip,
  .feature-grid,
  .enterprise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid article:nth-child(2n) {
    border-right: 0;
  }

  .feature-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand {
    min-width: auto;
  }

  .brand-logo {
    width: 132px;
  }

  .header-cta {
    display: none;
  }

  .nav-links {
    gap: 16px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .hero {
    padding: 64px 18px 48px;
  }

  h1 {
    font-size: 42px;
  }

  h2,
  .cta-band h2 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-actions,
  .cta-band,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .proof-strip {
    margin: 0 18px;
  }

  .section {
    padding: 72px 18px;
  }

  .proof-strip,
  .feature-grid,
  .model-board,
  .enterprise-grid {
    grid-template-columns: 1fr;
  }

  .proof-strip div,
  .feature-grid article,
  .model-column {
    border-right: 0;
  }

  .proof-strip div,
  .model-column {
    border-bottom: 1px solid var(--line);
  }

  .proof-strip div:last-child,
  .model-column:last-child {
    border-bottom: 0;
  }

  .feature-grid article {
    min-height: auto;
  }

  .feature-index {
    margin-bottom: 34px;
  }

  .cta-band {
    margin: 0 18px 48px;
  }

  pre {
    padding: 20px 18px 68px;
    font-size: 12px;
  }

  .docs-shell {
    padding: 28px 18px 64px;
  }

  .docs-sidebar,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .docs-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ===== Login modal ===== */
.login-backdrop[hidden],
.login-modal[hidden] {
  display: none;
}

.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 28, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: login-fade 200ms ease both;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.login-card {
  position: relative;
  pointer-events: auto;
  width: min(420px, 100%);
  padding: 32px clamp(24px, 4vw, 34px) 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(8, 20, 32, 0.28);
  animation: login-rise 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.login-close:hover {
  color: var(--brand-strong);
  border-color: rgba(37, 99, 235, 0.35);
  background: #ffffff;
}

.login-eyebrow {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.login-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 720;
  line-height: 1.2;
  color: var(--ink);
}

.login-desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 6px;
}

.login-field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.login-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-field input::placeholder {
  color: #94a2b3;
}

.login-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.login-field input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.login-password {
  position: relative;
  display: flex;
}

.login-password input {
  padding-right: 44px;
}

.login-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 160ms ease, background 160ms ease;
}

.login-toggle:hover {
  color: var(--brand-strong);
  background: var(--surface-soft);
}

.login-error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

.login-foot {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

body.login-open {
  overflow: hidden;
}

@keyframes login-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 26px 20px 22px;
  }

  .login-title {
    font-size: 22px;
  }
}

/* ===== Contact advisor modal ===== */
.contact-backdrop[hidden],
.contact-modal[hidden] {
  display: none;
}

.contact-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 28, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: login-fade 200ms ease both;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.contact-card {
  position: relative;
  pointer-events: auto;
  width: min(420px, 100%);
  padding: 32px clamp(24px, 4vw, 34px) 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(8, 20, 32, 0.28);
  animation: login-rise 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.contact-advisor {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbfd, #f2f7fa);
}

.contact-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.contact-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.contact-email {
  color: var(--brand-strong);
  font-size: 14px;
  font-family: "SFMono-Regular", Consolas, monospace;
  word-break: break-all;
}

.contact-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.contact-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.contact-copy:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
}

body.contact-open {
  overflow: hidden;
}
