:root {
  color-scheme: dark;
  --ink: #f5f7f8;
  --muted: #9aa3ad;
  --line: rgba(255, 255, 255, 0.1);
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --surface-soft: #050607;
  --dark: #050607;
  --accent: #f3f6f8;
  --cyan: #81d8e5;
  --green: #6ee7a8;
  --amber: #f0b86a;
  --danger: #ff6b73;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #090a0c 0%, #050607 38%, #08090b 100%);
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 6, 7, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #050607;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #c6ccd2;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: clamp(560px, 76vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #050607;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(0.72) contrast(1.1);
}

.hero-overlay {
  background:
    radial-gradient(circle at 72% 42%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(90deg, rgba(5, 6, 7, 0.94), rgba(5, 6, 7, 0.76) 42%, rgba(5, 6, 7, 0.34)),
    linear-gradient(0deg, rgba(5, 6, 7, 0.96), rgba(5, 6, 7, 0.22) 48%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 92px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #dbe1e6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.04;
  font-weight: 760;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(245, 247, 248, 0.7);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.form-actions,
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.button,
.file-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  white-space: nowrap;
}

.button.primary {
  color: #050607;
  background: var(--accent);
  border-color: var(--accent);
}

.button.secondary,
.file-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.button.ghost {
  color: #d6dbe0;
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.button:hover,
.file-button:hover {
  transform: translateY(-1px);
}

.trust-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -48px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(14, 15, 17, 0.84);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(18px);
}

.trust-strip div {
  padding: 24px;
  border-right: 1px solid var(--line);
}

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

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 84px auto;
}

.section-heading {
  max-width: 720px;
}

.section-heading h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.18;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.75;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.metric,
.panel,
.data-form,
.connect-panel,
.pipeline article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.metric {
  min-height: 126px;
  padding: 22px;
}

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

.metric strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.analytics-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
}

.panel-head,
.records-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel h3 {
  margin: 0;
  font-size: 20px;
}

.panel-head span {
  color: var(--muted);
  font-size: 14px;
}

.bars {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 42px;
  align-items: center;
  gap: 12px;
}

.bar-track {
  height: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  width: var(--bar-width);
  background: linear-gradient(90deg, #f5f7f8, rgba(129, 216, 229, 0.86));
  border-radius: inherit;
}

canvas {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
  margin: 12px auto 0;
}

.split-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 38px;
  align-items: start;
}

.data-form {
  padding: 24px;
}

.connect-panel {
  padding: 26px;
}

.connect-panel h3 {
  margin: 22px 0 16px;
  font-size: 24px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.status-dot[data-status="ready"] {
  background: var(--green);
}

.status-dot[data-status="warning"] {
  background: var(--amber);
}

.status-dot[data-status="demo"] {
  background: var(--cyan);
}

.mode-list {
  display: grid;
  gap: 12px;
}

.mode-list div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.mode-list strong,
.mode-list span {
  display: block;
}

.mode-list span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.fine-print {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.pipeline article {
  min-height: 210px;
  padding: 22px;
}

.pipeline span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #050607;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 800;
}

.pipeline strong {
  display: block;
  margin-top: 18px;
  font-size: 18px;
}

.pipeline p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

label {
  display: grid;
  gap: 8px;
  color: #d9dde1;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

select option {
  color: #101418;
}

.data-form > label {
  margin-top: 16px;
}

.form-actions {
  margin-top: 20px;
}

.records-top {
  margin-bottom: 18px;
}

.toolbar {
  justify-content: flex-end;
}

.toolbar input {
  width: min(260px, 100%);
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(18px);
}

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

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

th {
  color: #aeb6bd;
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
}

td {
  color: #d7dce0;
  line-height: 1.45;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.delete-button {
  color: var(--danger);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.empty-row {
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 60px auto 36px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .nav-shell {
    height: auto;
    min-height: 72px;
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 640px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(5, 6, 7, 0.94), rgba(5, 6, 7, 0.58)),
      linear-gradient(0deg, rgba(5, 6, 7, 0.96), rgba(5, 6, 7, 0.24));
  }

  .trust-strip,
  .metrics-grid,
  .analytics-layout,
  .split-section,
  .pipeline {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-strip div:last-child {
    border-bottom: 0;
  }

  .records-top {
    display: block;
  }

  .toolbar {
    justify-content: flex-start;
    margin-top: 16px;
  }
}

@media (max-width: 620px) {
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .section {
    margin: 62px auto;
  }

  .section-heading h2 {
    font-size: 28px;
  }

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

  .toolbar,
  .hero-actions,
  .form-actions,
  .connect-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .file-button,
  .toolbar input {
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }
}
