:root {
  --ink: #111315;
  --ink-2: #1b1f22;
  --paper: #f6f5ef;
  --paper-2: #ffffff;
  --line: #d9ded7;
  --muted: #64706a;
  --mint: #3ed6a2;
  --cyan: #49bce3;
  --coral: #f06f5d;
  --amber: #f0b84c;
  --blue: #4d8cf0;
  --danger: #bd3c35;
  --shadow: 0 18px 60px rgba(17, 19, 21, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
}

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

button,
input,
select {
  font: inherit;
}

code {
  padding: 2px 5px;
  background: rgba(17, 19, 21, 0.08);
  border-radius: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: #f8fbf7;
  background: rgba(17, 19, 21, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  background: var(--mint);
  border-radius: 8px;
  font-size: 13px;
}

.nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
}

.nav a,
.nav-button {
  color: rgba(248, 251, 247, 0.82);
}

.nav a:hover,
.nav-button:hover {
  color: #fff;
}

.nav-cta {
  padding: 9px 14px;
  color: var(--ink) !important;
  background: #fff;
  border-radius: 6px;
  font-weight: 700;
}

.inline-form {
  margin: 0;
}

.nav-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.notice {
  position: fixed;
  top: 82px;
  left: 50%;
  z-index: 70;
  transform: translateX(-50%);
  max-width: min(680px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.notice-ok {
  color: #0e432f;
  background: #dff8eb;
  border: 1px solid #a5e8c4;
}

.notice-error {
  color: #6b1712;
  background: #ffe3df;
  border: 1px solid #f5ada4;
}

.hero {
  position: relative;
  min-height: calc(88vh - 68px);
  overflow: hidden;
  color: #f8fbf7;
  background: #111315;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 21, 0.96) 0%, rgba(17, 19, 21, 0.78) 38%, rgba(17, 19, 21, 0.24) 74%),
    linear-gradient(0deg, rgba(17, 19, 21, 0.88) 0%, rgba(17, 19, 21, 0) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: clamp(72px, 12vw, 150px) clamp(18px, 6vw, 72px) 76px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.hero-copy,
.wide-copy {
  max-width: 620px;
  color: rgba(248, 251, 247, 0.78);
  font-size: 19px;
}

.hero-actions,
.proxy-actions,
.panel-head,
.console-title,
.product-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  flex-wrap: wrap;
  margin: 30px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.button-primary {
  color: var(--ink);
  background: var(--mint);
}

.button-primary:hover {
  background: #6ce5bc;
}

.button-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.button-dark {
  color: #fff;
  background: var(--ink);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics span {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: rgba(248, 251, 247, 0.74);
  background: rgba(17, 19, 21, 0.42);
}

.hero-metrics strong {
  color: #fff;
}

.section,
.page-hero {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.section-tight {
  padding-top: 58px;
}

.section-heading,
.page-hero {
  max-width: 860px;
}

.compact-hero {
  color: #fff;
  background: var(--ink);
}

.compact-hero p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.panel,
.auth-panel,
.proxy-card,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: 0 8px 28px rgba(17, 19, 21, 0.06);
}

.product-card {
  position: relative;
  min-height: 286px;
  padding: 22px;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--mint);
}

.accent-coral::before {
  background: var(--coral);
}

.accent-amber::before {
  background: var(--amber);
}

.accent-blue::before {
  background: var(--blue);
}

.badge,
.pill,
.status,
.balance-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.badge {
  background: #eff4ec;
}

.product-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.product-price {
  font-weight: 900;
}

.muted,
.feature-list {
  color: var(--muted);
}

.feature-list {
  padding-left: 18px;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  font-weight: 800;
  color: #0f7352;
}

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 34px;
  color: #fff;
  background: #151817;
}

.steps {
  display: grid;
  gap: 12px;
}

.steps div {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.steps span {
  color: var(--amber);
  font-weight: 900;
}

.steps p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
}

.auth-shell {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 54px 18px;
  background:
    linear-gradient(120deg, rgba(62, 214, 162, 0.14), transparent 36%),
    var(--paper);
}

.auth-panel {
  width: min(440px, 100%);
  padding: 30px;
}

.form-stack,
.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #cdd5cf;
  border-radius: 6px;
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 214, 162, 0.18);
}

select:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 214, 162, 0.18);
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.auth-note {
  margin: 18px 0 0;
  color: var(--muted);
}

.auth-note a {
  color: #0f7352;
  font-weight: 800;
}

.console {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  min-height: calc(100vh - 150px);
  padding: 24px clamp(18px, 4vw, 48px) 56px;
}

.console-nav {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.console-nav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
}

.console-nav a.active,
.console-nav a:hover {
  color: var(--ink);
  background: #edf6ef;
}

.admin-console .console-nav a.active,
.admin-console .console-nav a:hover {
  background: #fff4df;
}

.console-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.console-title {
  justify-content: space-between;
  flex-wrap: wrap;
}

.console-title h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.panel {
  padding: 20px;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-head h2,
.panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-card {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 2px solid var(--line);
}

.mini-card span {
  color: var(--muted);
  font-size: 13px;
}

.pill.ok,
.ok-text {
  color: #136246;
  background: #e3f8ec;
}

.pill.warn,
.warn-text {
  color: #7a4a09;
  background: #fff1d4;
}

.balance-chip {
  background: #eef1eb;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-grid .radio-card:only-child {
  grid-column: 1 / -1;
}

.radio-card {
  display: block;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card span {
  display: grid;
  gap: 5px;
  min-height: 140px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.radio-card input:checked + span {
  border-color: var(--mint);
  box-shadow: inset 0 0 0 2px rgba(62, 214, 162, 0.36);
}

.radio-card small {
  color: var(--muted);
  font-weight: 600;
}

.radio-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-card strong b {
  padding: 3px 7px;
  border-radius: 6px;
  color: #7a2e13;
  background: #ffe6d8;
  font-size: 11px;
  line-height: 1;
}

.radio-card .product-meta {
  color: #0f7352;
  font-size: 12px;
}

.radio-card em {
  align-self: end;
  color: #0f7352;
  font-style: normal;
  font-weight: 900;
}

input[readonly] {
  color: #136246;
  background: #eef9f1;
  border-color: #bfe7ca;
  font-weight: 900;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.empty,
.empty-box {
  color: var(--muted);
  text-align: center;
}

.empty-box {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #bcc6bd;
  border-radius: 8px;
  background: #fff;
}

.proxy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.proxy-card {
  padding: 18px;
}

.proxy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status {
  color: #134b37;
  background: #dff8eb;
}

.endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e2db;
  border-radius: 8px;
  background: #f8faf5;
  cursor: copy;
}

.endpoint.copied {
  border-color: var(--mint);
  box-shadow: inset 0 0 0 2px rgba(62, 214, 162, 0.24);
}

.endpoint span {
  overflow-wrap: anywhere;
}

.proxy-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.proxy-meta div {
  min-width: 0;
}

.proxy-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.proxy-meta dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.proxy-actions {
  justify-content: flex-start;
}

.proxy-actions form {
  margin: 0;
}

.proxy-actions button,
.row-form button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.profile-row,
.settings-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.profile-row:last-child,
.settings-list div:last-child {
  border-bottom: 0;
}

.profile-row span,
.settings-list span {
  color: var(--muted);
  font-weight: 800;
}

.row-form {
  display: flex;
  gap: 8px;
}

.row-form input {
  width: 110px;
  min-height: 34px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
}

.site-footer strong {
  color: #fff;
  margin-right: 10px;
}

.version-chip {
  display: inline-flex;
  margin-left: 10px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.footer-links {
  display: flex;
  gap: 14px;
}

@media (max-width: 1120px) {
  .product-grid,
  .metric-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proxy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-layout,
  .split-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 760px;
  }

  .hero-overlay {
    background: rgba(17, 19, 21, 0.78);
  }

  .product-grid,
  .metric-grid,
  .mini-grid,
  .radio-grid,
  .form-grid,
  .proxy-grid {
    grid-template-columns: 1fr;
  }

  .console {
    grid-template-columns: 1fr;
  }

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

  .proxy-meta {
    grid-template-columns: 1fr;
  }
}
