:root {
  --bg: #f7f5ef;
  --bg-strong: #ffffff;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --ink: #171717;
  --muted: #5f5b52;
  --faint: #8b867a;
  --line: rgba(23, 23, 23, 0.1);
  --line-strong: rgba(23, 23, 23, 0.18);
  --gold: #b9973d;
  --gold-strong: #8f6f1f;
  --ok: #0f766e;
  --warn: #a16207;
  --bad: #991b1b;
  --shadow-soft: 0 24px 80px rgba(23, 23, 23, 0.08);
  --shadow-lift: 0 34px 100px rgba(23, 23, 23, 0.14);
  --radius-2xl: 36px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --body: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Libre Bodoni", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(212, 175, 55, 0.18), transparent 32%),
    radial-gradient(circle at 86% 12%, rgba(23, 23, 23, 0.08), transparent 30%),
    linear-gradient(135deg, #fffdf8 0%, #f3efe4 52%, #f8f7f2 100%);
  color: var(--ink);
  font-family: var(--body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
}

.ambient {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.72;
}

.ambient-one {
  width: 340px;
  height: 340px;
  left: -110px;
  top: 160px;
  background: rgba(212, 175, 55, 0.16);
}

.ambient-two {
  width: 420px;
  height: 420px;
  right: -160px;
  top: 38px;
  background: rgba(23, 23, 23, 0.08);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 76px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 50px rgba(23, 23, 23, 0.08);
  backdrop-filter: blur(24px) saturate(1.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
  border-radius: 999px;
  outline: none;
}

.brand:focus-visible,
.dropzone:focus-within,
.primary-button:focus-visible,
.ghost-button:focus-visible {
  outline: 3px solid rgba(185, 151, 61, 0.35);
  outline-offset: 3px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #171717;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

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

.eyebrow,
.kicker,
.panel-label {
  color: rgba(23, 23, 23, 0.56);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.trust-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(185, 151, 61, 0.12);
}

.status-chip[data-tone="ok"] {
  color: var(--ok);
  background: rgba(15, 118, 110, 0.08);
}

.status-chip[data-tone="warn"] {
  color: var(--warn);
  background: rgba(161, 98, 7, 0.08);
}

.status-chip[data-tone="bad"] {
  color: var(--bad);
  background: rgba(153, 27, 27, 0.08);
}

.content {
  display: grid;
  gap: 34px;
  padding-top: 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.96fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.upload-card,
.summary-card,
.insight-panel {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(26px) saturate(1.22);
}

.hero-copy {
  min-height: 640px;
  padding: clamp(30px, 4.4vw, 54px);
  border-radius: var(--radius-2xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  width: 220px;
  height: 220px;
  align-self: flex-end;
  margin: -40px -20px -86px 0;
  border-radius: 999px;
  border: 1px solid rgba(185, 151, 61, 0.28);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 34%, transparent 35%),
    conic-gradient(from 140deg, rgba(185, 151, 61, 0.58), rgba(23, 23, 23, 0.08), rgba(185, 151, 61, 0.58));
  opacity: 0.8;
}

.hero-copy h1 {
  max-width: 11ch;
  margin: 18px 0 20px;
  font-family: var(--display);
  font-size: clamp(48px, 6.7vw, 86px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.proof-item {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.58);
  transition: border-color 220ms var(--ease), background-color 220ms var(--ease), transform 220ms var(--ease);
}

.proof-item:hover {
  border-color: rgba(185, 151, 61, 0.35);
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-2px);
}

.proof-item span {
  display: block;
  margin-bottom: 14px;
  color: var(--gold-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.proof-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

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

.upload-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-2xl);
}

.card-head,
.section-heading,
.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.card-head h2,
.section-heading h2,
.summary-card h3,
.insight-panel h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.dropzone {
  position: relative;
  min-height: 286px;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 28px;
  border: 1px dashed rgba(23, 23, 23, 0.24);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.46)),
    radial-gradient(circle at top, rgba(185, 151, 61, 0.14), transparent 42%);
  text-align: center;
  cursor: pointer;
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease), background-color 220ms var(--ease);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: rgba(185, 151, 61, 0.56);
  box-shadow: 0 28px 70px rgba(185, 151, 61, 0.12);
  transform: translateY(-2px);
}

.dropzone.dragover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top, rgba(185, 151, 61, 0.22), transparent 46%);
}

.dropzone-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #171717;
  color: #fff;
  box-shadow: 0 22px 44px rgba(23, 23, 23, 0.18);
}

.dropzone-icon svg {
  width: 30px;
  height: 30px;
}

.dropzone-copy {
  display: grid;
  gap: 8px;
}

.dropzone-copy strong {
  font-size: 19px;
  letter-spacing: -0.015em;
}

.dropzone-copy span {
  color: var(--muted);
  line-height: 1.65;
}

.selected-file {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
}

.selected-file[hidden] {
  display: none;
}

.preview-frame {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 18px;
  background: #ece7dc;
}

.preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.selected-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.selected-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background-color 200ms var(--ease), opacity 200ms var(--ease), color 200ms var(--ease);
}

.primary-button {
  position: relative;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #171717, #343026);
  color: #fff;
  box-shadow: 0 22px 48px rgba(23, 23, 23, 0.22);
}

.primary-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  box-shadow: none;
}

.button-spinner {
  width: 16px;
  height: 16px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: #fff;
  border-radius: 999px;
}

.primary-button.is-loading .button-spinner {
  display: inline-block;
  animation: spin 820ms linear infinite;
}

.ghost-button {
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(185, 151, 61, 0.35);
}

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

.step {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border-radius: 999px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.52);
}

.step span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.16);
}

.step p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.step.active {
  color: var(--ink);
}

.step.active span {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(185, 151, 61, 0.14);
}

.results {
  display: grid;
  gap: 22px;
}

.results[hidden] {
  display: none;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.86fr) minmax(260px, 0.86fr);
  gap: 18px;
}

.summary-card,
.insight-panel {
  border-radius: var(--radius-2xl);
  padding: 26px;
}

.verdict-card {
  min-height: 310px;
}

.score-orbit {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.score-ring {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0 57%, transparent 58%),
    conic-gradient(var(--gold) calc(var(--score) * 1%), rgba(23, 23, 23, 0.08) 0);
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.06);
}

.score-ring span {
  min-width: 86px;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  text-align: center;
}

.score-orbit small {
  color: var(--muted);
}

.verdict-copy {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.metric {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.metric span,
.spec-list dt {
  color: rgba(23, 23, 23, 0.52);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric strong,
.spec-list dd {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  word-break: break-word;
}

.spec-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 18px 0 0;
}

.spec-list dt,
.spec-list dd {
  margin: 0;
}

.compact {
  margin-bottom: 18px;
}

.insight-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

.insight-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.66);
}

.insight-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.insight-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.insight-list li {
  line-height: 1.7;
}

.reveal {
  animation: fadeUp 620ms var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .hero-copy {
    min-height: auto;
  }

  .proof-row,
  .metric-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .topbar {
    align-items: flex-start;
    border-radius: 28px;
    flex-direction: column;
  }

  .trust-pill {
    width: 100%;
    justify-content: center;
  }

  .hero-copy,
  .upload-card,
  .summary-card,
  .insight-panel {
    padding: 22px;
    border-radius: 28px;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }

  .card-head,
  .section-heading,
  .summary-head {
    flex-direction: column;
  }

  .selected-file {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .selected-file .ghost-button {
    grid-column: 1 / -1;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
