/* 门口：浅色。白底，蓝色强调 #0054A6，只用在每页唯一的主按钮上。 */

:root {
  --accent: #0054A6;
  --accent-hover: #1A6BC4;
  --accent-press: #004488;
  --ink: #FFFFFF;
  --paper: #1C1C1C;
  --faint: #6A6A6A;
  --line: #D5D5D5;
  --line-strong: #B0B0B0;
  --raise: #F4F4F4;
  --field: #FFFFFF;
  --danger: #C43838;
  --text: #1C1C1C;
  --muted: #5C5C5C;
  --bg: #FFFFFF;
  --ok: #1B7F4E;
  --err: #C43838;
}

html, body {
  background: #FFFFFF;
  color: var(--paper);
  font-family: Inter, Geist, "Segoe UI", system-ui, sans-serif;
}

button, input, select, textarea {
  font: inherit;
  color: var(--paper);
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.btn-primary, a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.hero .btn-primary,
.auth-card .btn-primary,
.error-page .btn-primary {
  height: 48px;
  padding: 0 28px;
  border-radius: 6px;
  font-size: 15px;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { background: var(--accent-press); }
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn-primary:disabled { opacity: 0.45; cursor: default; }
.btn-primary.busy, button.busy { color: transparent; position: relative; }
.busy::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost, .btn-danger, .text-btn {
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
}
.btn-ghost, .btn-danger {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--paper);
}
.btn-danger { border-color: var(--danger); color: var(--danger); }
.text-btn { padding: 4px 8px; }
a.text-btn { color: var(--muted); text-decoration: none; }

.portal {
  min-height: 100vh;
  background:
    radial-gradient(880px 360px at 50% 0%, #E6EEF7, transparent 72%),
    #FFFFFF;
}
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: #FFFFFF;
  border-bottom: 1px solid #E4E4E4;
}
.mark { color: var(--paper); text-decoration: none; font-size: 18px; letter-spacing: 0.08em; }
.signin-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.avatar {
  width: 28px; height: 28px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--raise); color: var(--paper);
}
.portal-foot { margin: 0; padding: 8px 24px 16px; text-align: right; color: var(--faint); font-size: 12px; }

.hero {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 24px 40px;
  text-align: center;
}
.kicker {
  margin: 0 0 16px;
  color: #5C7C99;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.value-prop {
  margin: 0 0 16px;
  color: #1C1C1C;
  font-weight: 500;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.only-narrow { display: none; }
.lede {
  max-width: 640px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* 三站出口 */
.stations {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.station-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px;
  text-align: left;
  color: inherit;
  text-decoration: none;
  background: #FFFFFF;
  border: 1px solid #E2E2E2;
  border-radius: 12px;
}
.station-card:hover { border-color: #C5D7EA; }
.station-card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.station-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.station-link { margin-top: auto; padding-top: 12px; color: #1E4E7A; font-size: 13px; }
.station-state { color: var(--faint); font-size: 12px; }

.home-section {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto 48px;
}
.home-section h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}
.section-copy {
  max-width: 640px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step-card {
  padding: 16px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E2E2;
  border-radius: 12px;
}
.step-card h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.step-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.cta-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 24px 48px;
}
.cta-band .btn-primary { background: #E7F0F8; color: #1E4E7A; border: 1px solid #D3E2F0; }
.cta-band .btn-primary:hover:not(:disabled) { background: #D7E7F4; color: #173E62; }

.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-top: 72px; }
.auth-card {
  width: min(400px, calc(100vw - 32px));
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(28, 40, 60, 0.08);
  color: var(--paper);
}
.card-title, .page-title { margin: 0 0 16px; font-size: 22px; font-weight: 500; line-height: 28px; }
.field { display: block; margin: 12px 0; font-size: 13px; color: var(--muted); }
.field input, .stack input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 8px 10px;
  background: var(--field); border: 1px solid var(--line); border-radius: 8px;
}
.password-row { display: flex; gap: 8px; align-items: center; }
.password-row input { flex: 1; }
.field-error, .form-error { color: var(--danger); font-size: 12px; }
.form-error.ok { color: var(--ok); }
.field-hint, .card-copy, .empty { color: var(--muted); font-size: 13px; line-height: 20px; }
.card-foot, .check { color: var(--muted); font-size: 13px; }
.card-foot a, .check a { color: var(--paper); }
.check { display: flex; gap: 6px; align-items: center; }
.modal::backdrop { background: rgba(0, 0, 0, 0.55); }
.modal {
  width: min(400px, calc(100vw - 32px));
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(28, 40, 60, 0.08);
  color: var(--paper);
}
.modal-title { margin-top: 0; }
.modal-body { color: var(--muted); font-size: 13px; line-height: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.modal-actions.column { flex-direction: column; }
.pop-menu {
  position: fixed; z-index: 50; min-width: 180px; padding: 6px;
  background: var(--raise); border: 1px solid var(--line); border-radius: 12px;
}
.pop-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--paper); padding: 8px 10px; }
.pop-item:hover { background: #E8EEF5; color: #0054A6; }

.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 24px; padding: 24px; }
.settings-nav { display: flex; flex-direction: column; gap: 8px; }
.settings-nav a { color: var(--muted); text-decoration: none; padding: 8px; border-radius: 8px; }
.settings-nav a.on { color: var(--paper); background: var(--raise); }
.model-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.model-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 12px; text-align: left; background: var(--raise);
  border: 1px solid var(--line); border-radius: 12px; color: var(--paper); cursor: pointer;
}
.model-card.on { border-color: var(--accent); }
.pill, .banner {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 84, 166, 0.1); color: var(--accent); font-size: 12px;
}
.banner { margin: 0 0 16px; }
.table { display: flex; flex-direction: column; gap: 4px; }
.table-head, .table-row {
  display: grid; grid-template-columns: 1.2fr repeat(4, 1fr) auto;
  gap: 8px; align-items: center; padding: 10px 8px; border-radius: 8px;
  font-size: 13px;
}
.table-head { color: var(--faint); font-size: 12px; }
.table-row:hover { background: var(--raise); }
.row-ops { display: flex; gap: 4px; flex-wrap: wrap; }
.usage-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 16px; }
.usage-bar { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; }
.section-title { font-size: 15px; font-weight: 500; }
.section-head { display: flex; gap: 12px; align-items: center; }
.legal, .error-page { padding: 24px 32px 64px; max-width: 1100px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.error-page { padding-top: 18vh; }
.settings-block { margin: 0 0 32px; }
.settings-block h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.settings-block .hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

@media (max-width: 1279px) {
  .value-prop { font-size: 36px; white-space: normal; }
}
@media (max-width: 900px) {
  .stations, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .hero { padding-top: 32px; }
  .value-prop { font-size: 30px; white-space: normal; }
  .only-narrow { display: initial; }
  .settings-layout { grid-template-columns: 1fr; }
  .table-head, .table-row { grid-template-columns: 1fr; }
}
