:root {
  --ink: #163c35;
  --ink-deep: #102f2a;
  --mint: #dff3ea;
  --mint-soft: #f1f8f5;
  --lime: #d9f36d;
  --cream: #f7f4ec;
  --paper: #fffefa;
  --muted: #66756f;
  --line: #dbe4df;
  --danger: #a33a30;
  --shadow: 0 24px 70px rgba(22, 60, 53, 0.11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink-deep);
  background:
    radial-gradient(circle at 82% 4%, rgba(217, 243, 109, 0.24), transparent 25rem),
    linear-gradient(180deg, var(--cream) 0%, #fbfaf6 58%, #eef5f1 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  min-height: 100vh;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(22, 60, 53, 0.13);
}

.brand { color: var(--ink); text-decoration: none; font-weight: 780; letter-spacing: -0.02em; display: flex; gap: 11px; align-items: center; }
.brand-mark { width: 28px; height: 28px; display: flex; gap: 3px; align-items: flex-end; padding: 5px; border-radius: 8px; background: var(--ink); }
.brand-mark i { display: block; width: 4px; border-radius: 4px; background: var(--lime); }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 11px; }
.privacy-note { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.privacy-note span { width: 7px; height: 7px; background: #51a580; border-radius: 50%; box-shadow: 0 0 0 4px rgba(81, 165, 128, 0.14); }

.hero { text-align: center; padding: 78px 16px 44px; }
.eyebrow { color: #587068; font-size: 11px; font-weight: 800; letter-spacing: 0.22em; margin-bottom: 18px; }
.hero h1 { margin: 0; color: var(--ink); font-size: clamp(38px, 6vw, 68px); line-height: 1.08; letter-spacing: -0.055em; font-weight: 800; }
.hero p { max-width: 670px; margin: 24px auto 0; color: var(--muted); line-height: 1.8; font-size: 16px; }

.upload-card { max-width: 850px; margin: 0 auto; padding: 34px; background: rgba(255, 254, 250, 0.94); border: 1px solid rgba(22, 60, 53, 0.12); box-shadow: var(--shadow); border-radius: 24px; }
.card-heading, .results-heading, .sample-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.card-heading > div, .results-heading > div { display: flex; align-items: center; gap: 12px; }
.card-heading h2, .results-heading h2 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.step-number { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--ink); font-size: 11px; font-weight: 800; }
.step-number.light { background: rgba(217, 243, 109, 0.16); color: var(--lime); border: 1px solid rgba(217, 243, 109, 0.34); }
.file-rule { font-size: 11px; letter-spacing: 0.1em; font-weight: 800; color: #7b8984; }

.dropzone { margin-top: 28px; min-height: 278px; padding: 42px 24px; border: 1.5px dashed #9db1aa; border-radius: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--mint-soft); cursor: pointer; transition: 180ms ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--ink); background: #e8f5ef; transform: translateY(-2px); }
.dropzone:focus-within { outline: 3px solid rgba(22, 60, 53, 0.18); outline-offset: 3px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-symbol { display: grid; place-items: center; width: 55px; height: 55px; border-radius: 17px; color: var(--ink); background: var(--lime); font-size: 27px; margin-bottom: 20px; box-shadow: 0 10px 24px rgba(126, 151, 38, 0.2); }
.dropzone strong { font-size: 18px; margin-bottom: 7px; }
.dropzone > span:not(.upload-symbol) { font-size: 14px; color: var(--muted); }
.dropzone small { margin-top: 20px; color: #7a8984; font-size: 12px; }

.selected-file { margin-top: 18px; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.selected-file:not([hidden]) { display: flex; }
.file-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 11px; background: var(--ink); color: var(--lime); font-size: 9px; font-weight: 800; }
.file-meta { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.file-meta strong { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 14px; }
.file-meta span { font-size: 12px; color: var(--muted); }
.text-button { padding: 8px; border: 0; color: #75827e; background: transparent; cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.primary-button { margin-top: 18px; width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 16px; border: 0; border-radius: 14px; background: var(--ink); color: white; font-weight: 750; cursor: pointer; transition: 180ms ease; }
.primary-button:hover:not(:disabled) { background: #0e2f29; transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.42; }
.primary-button span { color: var(--lime); font-size: 20px; }

.progress-panel { margin-top: 18px; padding: 17px; background: #edf5f1; border-radius: 14px; }
.progress-copy { display: flex; justify-content: space-between; font-size: 13px; }
.progress-track { height: 7px; margin: 12px 0; overflow: hidden; border-radius: 10px; background: #d2dfda; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ink); transition: width 220ms ease; }
.progress-track span.analyzing { width: 38%; animation: analyzing 1.4s ease-in-out infinite; }
.progress-panel p { margin: 0; color: var(--muted); font-size: 12px; }
@keyframes analyzing { 0% { transform: translateX(-110%); } 100% { transform: translateX(270%); } }

.error-message { margin-top: 18px; padding: 13px 15px; color: var(--danger); background: #fbecea; border-radius: 11px; font-size: 13px; }

.results { margin: 78px 0 30px; padding: 44px; border-radius: 28px; color: white; background: var(--ink-deep); box-shadow: 0 28px 70px rgba(16, 47, 42, 0.24); }
.results-heading > div { flex-wrap: wrap; }
.results-heading p { width: 100%; margin: -4px 0 0 48px; color: #a8beb7; font-size: 13px; }
.download-button { padding: 14px 18px; color: var(--ink-deep); background: var(--lime); border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 800; white-space: nowrap; }
.download-button span { margin-left: 10px; font-size: 17px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 34px; }
.metric { min-height: 164px; padding: 23px; border-radius: 16px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; }
.metric.featured { background: var(--lime); color: var(--ink-deep); border-color: var(--lime); }
.metric > span, .split-metric span { color: #a9bdb7; font-size: 12px; }
.metric.featured > span, .metric.featured small { color: #425945; }
.metric > strong { margin-top: 18px; font-size: 38px; letter-spacing: -0.04em; }
.metric small { margin-top: auto; color: #8fa6a0; line-height: 1.45; font-size: 11px; }
.split-metric { justify-content: space-between; }
.split-metric > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.split-metric strong { font-size: 25px; }

.sample-panel { margin-top: 16px; overflow: hidden; border-radius: 17px; background: #fff; color: var(--ink-deep); }
.sample-heading { padding: 24px 25px 18px; }
.sample-heading h3 { margin: 0 0 7px; font-size: 16px; }
.sample-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.light-link { color: var(--ink); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 25px; color: #73817c; background: #f1f6f3; font-size: 10px; letter-spacing: 0.08em; }
td { padding: 14px 25px; border-top: 1px solid #edf0ee; font-size: 13px; }
.status-pill { display: inline-block; padding: 4px 8px; color: #315c4a; background: #dff3e6; border-radius: 999px; font-size: 10px; font-weight: 750; }
.empty-sample { padding: 36px; color: var(--muted); text-align: center; font-size: 13px; }

.method { max-width: 850px; margin: 48px auto 78px; display: grid; grid-template-columns: repeat(3, 1fr); }
.method > div { position: relative; padding: 0 34px; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; }
.method > div + div { border-left: 1px solid var(--line); }
.method span { grid-row: span 2; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #b8c7c1; border-radius: 50%; font-size: 11px; }
.method strong { font-size: 13px; }
.method small { margin-top: 5px; color: var(--muted); font-size: 11px; }

footer { padding: 24px; color: #71807b; border-top: 1px solid var(--line); text-align: center; font-size: 11px; }

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .results { padding: 30px; }
}

@media (max-width: 600px) {
  .page-shell { width: min(100% - 24px, 1120px); }
  .topbar { min-height: 66px; }
  .privacy-note { display: none; }
  .hero { padding: 58px 8px 34px; }
  .hero h1 { font-size: 40px; }
  .upload-card { padding: 22px; border-radius: 19px; }
  .card-heading, .results-heading, .sample-heading { align-items: flex-start; flex-direction: column; }
  .dropzone { min-height: 240px; padding: 30px 15px; text-align: center; }
  .results { margin-top: 50px; padding: 22px; border-radius: 20px; }
  .results-heading p { margin-left: 0; }
  .download-button { width: 100%; text-align: center; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { min-height: 142px; }
  .method { grid-template-columns: 1fr; gap: 22px; }
  .method > div + div { border-left: 0; }
  th, td { padding-left: 16px; padding-right: 16px; white-space: nowrap; }
}

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