:root {
  --bg: #eef3f8;
  --paper: #ffffff;
  --paper-soft: #f8fbfe;
  --ink: #10233b;
  --muted: #5f738d;
  --brand: #0d4f8b;
  --brand-deep: #08345d;
  --brand-soft: #dbeaf7;
  --accent: #2d8cf0;
  --line: #d7e3ef;
  --shadow: 0 18px 46px rgba(16, 35, 59, 0.08);
  --good: #2f8f4e;
  --mid: #be7b18;
  --high: #c33b3b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(45, 140, 240, 0.12), transparent 28%),
    linear-gradient(180deg, #f6faff 0%, #eef3f8 32%, #edf2f7 100%);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(8, 52, 93, 0.94), rgba(13, 79, 139, 0.9));
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(8, 52, 93, 0.16);
}

.brand {
  display: flex;
  color: #fff;
}

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

.brand-row-merged {
  gap: 0;
  flex-wrap: nowrap;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy-merged {
  gap: 0;
  margin-left: 12px;
}

.brand-logo {
  width: auto;
  height: 44px;
  max-width: 260px;
  object-fit: contain;
  display: block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.92));
  padding: 8px 12px;
  border-radius: 14px;
  box-shadow:
    0 10px 18px rgba(3, 25, 46, 0.16),
    inset 0 0 0 1px rgba(13, 79, 139, 0.08);
}

.brand-logo-merged {
  height: 52px;
  max-width: 460px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.brand-name-merged {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.brand-mark {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.22s ease;
}

.nav a.active,
.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.96)),
    var(--paper);
  border: 1px solid rgba(13, 79, 139, 0.08);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 12%, rgba(45, 140, 240, 0.16), transparent 18%),
    radial-gradient(circle at 12% 88%, rgba(13, 79, 139, 0.08), transparent 24%);
  pointer-events: none;
}

.hero-home {
  padding-bottom: 28px;
}

.hero-showcase {
  padding: 34px;
}

.hero-showcase-simple {
  padding-bottom: 34px;
}

.hero-carousel-hero {
  display: grid;
  gap: 24px;
}

.hero-copy-block {
  max-width: 920px;
}

.hero-lead {
  max-width: 920px;
  font-size: 16px;
  line-height: 1.9;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(13, 79, 139, 0.08);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.82;
}

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

.hero-carousel-showcase {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(13, 79, 139, 0.1);
  background:
    radial-gradient(circle at top left, rgba(45, 140, 240, 0.1), transparent 28%),
    linear-gradient(180deg, #ffffff, #f5f9fe);
  box-shadow: 0 18px 42px rgba(16, 35, 59, 0.08);
  padding: 18px;
  max-width: 1160px;
  margin: 0 auto;
}

.hero-carousel-stage {
  position: relative;
  min-height: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #edf5fc, #f7fbff);
}

.hero-carousel-slide {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 620px;
  padding: 14px;
}

.hero-carousel-slide.is-active {
  display: flex;
}

.hero-carousel-slide img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 592px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(16, 35, 59, 0.08);
}

.hero-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.hero-carousel-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(13, 79, 139, 0.18);
}

.hero-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 10px;
}

.hero-carousel-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(13, 79, 139, 0.18);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-carousel-dot.is-active {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  transform: scale(1.15);
}

.card h3,
.panel h2,
.section-head h2 {
  margin: 0 0 10px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 18px;
}

.section-head h2 {
  font-size: 24px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.roadmap-only-panel {
  display: block;
}

.roadmap-frame-full {
  padding: 18px;
}

.section-head-tight {
  margin-top: 28px;
}

.roadmap-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(13, 79, 139, 0.1);
  background:
    radial-gradient(circle at top left, rgba(45, 140, 240, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff, #f5f9fe);
  box-shadow: 0 18px 42px rgba(16, 35, 59, 0.08);
  padding: 14px;
}

.roadmap-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f9fbfe);
  box-shadow: 0 10px 24px rgba(16, 35, 59, 0.05);
}

.card-tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,254,0.98));
  padding: 18px;
  box-shadow: 0 12px 28px rgba(16, 35, 59, 0.05);
}

.panel-eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 12px 24px rgba(13, 79, 139, 0.22);
}

.hero-btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 12px 24px rgba(13, 79, 139, 0.22);
}

.hero-btn.secondary,
.ghost-btn {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero-btn:hover,
.btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

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

input[type="file"],
input[type="number"],
select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
}

.infer-config-panel {
  margin-top: 4px;
}

.infer-config-panel-compact {
  padding: 16px;
}

.infer-config-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.infer-config-head h2 {
  margin: 0;
  white-space: nowrap;
}

.infer-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.infer-status-line {
  margin-top: 0;
  min-height: 42px;
}

.form-grid-compact {
  gap: 12px;
}

.side-note {
  display: grid;
  gap: 12px;
}

.note-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.note-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.model-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}

.status-line {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  color: var(--ink);
  font-size: 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

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

.infer-visual-panel {
  margin-top: 18px;
}

.infer-visual-header {
  justify-content: space-between;
  align-items: center;
}

.visual-switcher {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 16px;
  background: #eef4fb;
  border: 1px solid var(--line);
}

.switch-btn {
  min-height: 40px;
  padding: 9px 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.switch-btn.is-active {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 10px 20px rgba(13, 79, 139, 0.18);
}

.image-box-wide {
  min-height: 640px;
}

.image-box-wide img {
  width: auto;
  max-width: 100%;
  max-height: 620px;
  object-fit: contain;
  cursor: zoom-in;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.image-box {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff, #f4f8fc);
  overflow: hidden;
}

.image-box img {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

.image-box.is-empty img {
  display: none;
}

.image-placeholder {
  display: none;
  text-align: center;
  padding: 28px;
  color: var(--muted);
}

.image-box.is-empty .image-placeholder {
  display: block;
}

.image-placeholder-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-deep);
  margin-bottom: 8px;
}

.image-placeholder-text {
  font-size: 13px;
  line-height: 1.7;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.table th {
  background: #f3f7fb;
  color: var(--brand-deep);
  font-weight: 800;
}

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

.badge {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  color: #fff;
}

.badge.high { background: var(--high); }
.badge.medium { background: var(--mid); }
.badge.low { background: var(--good); }

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

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-modal.hidden {
  display: none;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 28, 0.76);
}

.preview-dialog {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: auto;
}

.preview-dialog-wide {
  width: min(1380px, calc(100vw - 32px));
}

.preview-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.preview-image-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.preview-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.review-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.review-item-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbfe);
}

.review-thumb-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.review-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f6f6f6;
}

.review-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.review-item-body {
  min-width: 0;
}

.review-item-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.review-item-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.review-item-verdict {
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .form-shell,
  .roadmap-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .form-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .infer-config-head,
  .infer-toolbar {
    grid-template-columns: 1fr;
  }

  .infer-visual-header {
    align-items: stretch;
    gap: 12px;
  }

  .hero-carousel-slide {
    min-height: 500px;
  }

  .hero-carousel-slide img {
    max-height: 468px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    padding: 18px 14px 36px;
  }

  .hero {
    padding: 22px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .panel-actions,
  .hero-actions {
    align-items: stretch;
  }

  .visual-switcher {
    width: 100%;
    justify-content: stretch;
  }

  .switch-btn {
    flex: 1;
  }

  .roadmap-frame {
    padding: 18px;
  }

  .brand-logo-merged {
    max-width: 300px;
    height: 38px;
  }

  .brand-name-merged {
    font-size: 16px;
  }

  .hero-carousel-showcase {
    padding: 12px;
  }

  .hero-carousel-slide {
    min-height: 300px;
    padding: 10px;
  }

  .hero-carousel-slide img {
    max-height: 276px;
  }

  .image-box-wide {
    min-height: 320px;
  }

  .image-box-wide img {
    max-height: 300px;
  }

  .hero-carousel-controls {
    gap: 8px;
  }

  .hero-carousel-btn {
    width: 40px;
    height: 40px;
  }
}
