:root {
  color-scheme: light;
  --ink: #16231d;
  --muted: #617069;
  --line: #dce3de;
  --paper: #f4f6f2;
  --card: #ffffff;
  --green: #17623f;
  --green-2: #a9d447;
  --green-soft: #edf5e6;
  --danger: #a43a35;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.page-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 780; letter-spacing: .08em; }
.brand-mark { width: 30px; height: 30px; position: relative; display: inline-block; }
.brand-mark i { position: absolute; width: 15px; height: 15px; border: 2px solid var(--green); transform: rotate(30deg) skew(-10deg); }
.brand-mark i:nth-child(1) { left: 1px; top: 8px; }
.brand-mark i:nth-child(2) { left: 11px; top: 3px; border-color: #548a47; }
.brand-mark i:nth-child(3) { left: 13px; top: 14px; border-color: var(--green-2); }
.privacy-pill { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.privacy-pill span { width: 8px; height: 8px; border-radius: 50%; background: #35a65d; box-shadow: 0 0 0 4px #dfeee2; }

main { flex: 1; }
.hero { padding: 74px 0 54px; display: grid; grid-template-columns: 1fr 380px; align-items: end; gap: 40px; }
.eyebrow { grid-column: 1 / -1; color: var(--green); font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; margin: 0 0 -8px; }
.hero h1 { font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; margin: 0; font-weight: 720; }
.hero h1 em { color: var(--green); font-style: normal; }
.intro { max-width: 380px; margin: 0 0 5px; color: var(--muted); font-size: 16px; line-height: 1.85; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); gap: 18px; align-items: stretch; }
.workspace-main, .process-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.workspace-main { padding: 28px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-heading > div { display: flex; align-items: center; gap: 12px; }
.section-heading h2, .process-card h2 { font-size: 19px; margin: 0; }
.step-number { color: var(--green); font: 700 11px/1 ui-monospace, monospace; letter-spacing: .1em; }
.format-note { color: var(--muted); font-size: 12px; }

.drop-zone { min-height: 205px; border: 1.5px dashed #aab8af; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: .2s ease; background: #fbfcfa; text-align: center; padding: 24px; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-glyph { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); margin-bottom: 16px; }
.upload-glyph b { font-size: 23px; font-weight: 450; }
.drop-zone strong { font-size: 16px; }
.drop-zone small { color: var(--muted); margin-top: 8px; }

.profile-row { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.profile-row > div { display: grid; gap: 5px; }
.profile-label { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.profile-row strong { font-size: 14px; }
.ready-tag { color: var(--green); background: var(--green-soft); border-radius: 99px; padding: 6px 10px; font-size: 11px; white-space: nowrap; }
.scope-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 14px 2px; }

.primary-button, .secondary-button { border: 0; border-radius: 10px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.primary-button { width: 100%; background: var(--green); color: white; box-shadow: 0 8px 20px rgba(23,98,63,.16); }
.primary-button:hover:not(:disabled) { background: #0f5233; transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .42; box-shadow: none; }
.primary-button b { margin-left: auto; font-size: 18px; }
.primary-button.compact { width: auto; min-width: 190px; }
.secondary-button { border: 1px solid var(--line); background: white; min-width: 145px; }
.secondary-button:hover { border-color: var(--green); color: var(--green); }

.job-panel, .result-panel { margin-top: 18px; border-radius: 14px; padding: 18px; background: #f7f9f6; border: 1px solid var(--line); }
.status-line { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.status-line > div { display: flex; align-items: center; gap: 9px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 0 rgba(169,212,71,.7); animation: pulse 1.4s infinite; }
.progress-track { height: 7px; border-radius: 99px; overflow: hidden; background: #e4e9e4; margin: 14px 0 9px; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--green-2)); transition: width .35s ease; }
.job-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.job-panel.failed { border-color: #e8c6c3; background: #fff8f7; }
.job-panel.failed .pulse { background: var(--danger); animation: none; }

.result-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--green-soft); border-color: #d6e5ce; }
.result-copy { display: flex; align-items: center; gap: 13px; }
.success-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: white; font-weight: 800; }
.result-copy p { margin: 0 0 3px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.result-copy h3 { margin: 0; font-size: 16px; }
.result-actions { display: flex; gap: 8px; }

.process-card { background: var(--ink); color: white; padding: 28px; }
.process-card .step-number { color: var(--green-2); }
.process-card h2 { margin: 8px 0 28px; font-size: 20px; }
.process-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 23px; }
.process-card li { display: grid; grid-template-columns: 31px 1fr; gap: 12px; position: relative; }
.process-card li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 32px; height: 23px; border-left: 1px solid #48564f; }
.process-card li i { width: 31px; height: 31px; border: 1px solid #4a5c52; border-radius: 50%; display: grid; place-items: center; color: var(--green-2); font-style: normal; font-size: 11px; }
.process-card li div { display: grid; gap: 4px; }
.process-card li strong { font-size: 14px; }
.process-card li span { color: #aab5af; font-size: 11px; line-height: 1.5; }
.output-grid { border-top: 1px solid #3c4b44; margin-top: 28px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.output-grid span { border: 1px solid #526159; border-radius: 99px; padding: 6px 9px; color: #c8d0cc; font-size: 10px; }

footer { margin-top: 24px; min-height: 70px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
footer span:first-child { color: var(--ink); font-weight: 700; }

@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(169,212,71,0); } 100% { box-shadow: 0 0 0 0 rgba(169,212,71,0); } }

@media (max-width: 820px) {
  .page-shell { width: min(100% - 24px, 680px); }
  .hero { grid-template-columns: 1fr; padding: 52px 0 34px; }
  .hero .intro { max-width: 620px; }
  .workspace { grid-template-columns: 1fr; }
  .result-panel, .result-actions { align-items: stretch; flex-direction: column; }
  .primary-button.compact, .secondary-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
}

@media (max-width: 520px) {
  .page-shell { width: calc(100% - 16px); }
  .topbar { height: 66px; }
  .privacy-pill { font-size: 10px; }
  .hero h1 { font-size: 42px; }
  .workspace-main, .process-card { padding: 20px; border-radius: 15px; }
  .section-heading { align-items: flex-start; }
  .profile-row { align-items: flex-start; }
}

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