:root {
  --ink: #17211d;
  --muted: #65706a;
  --line: #d9e0dc;
  --surface: rgba(255, 255, 255, 0.82);
  --paper: #f4f7f5;
  --green: #1f9d68;
  --green-dark: #14774e;
  --lime: #b8ed75;
  --blue: #4777f5;
  --red: #d45454;
  --shadow: 0 24px 70px rgba(30, 54, 43, 0.12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(23, 33, 29, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 29, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
}

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

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

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.55;
  pointer-events: none;
}

.ambient-one { width: 390px; height: 390px; right: -160px; top: 90px; background: rgba(184, 237, 117, 0.28); }
.ambient-two { width: 320px; height: 320px; left: -150px; top: 500px; background: rgba(71, 119, 245, 0.12); }

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 20px; letter-spacing: -0.04em; }
.brand b { color: var(--green-dark); }
.brand-mark { width: 35px; height: 35px; fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.header-pill { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.65); color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.header-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(31,157,104,.1); }

.hero { padding: 76px 0 58px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(20,119,78,.28); border-radius: 8px; background: rgba(184,237,117,.28); letter-spacing: 0; }
.hero h1 { max-width: 900px; margin: 22px auto 22px; font-size: clamp(46px, 7.3vw, 88px); line-height: .98; letter-spacing: -.075em; font-weight: 720; }
.hero h1 em { position: relative; color: var(--green-dark); font-style: normal; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 3%; right: 0; bottom: -7px; height: 8px; border-top: 2px solid var(--lime); border-radius: 50%; transform: rotate(-1deg); }
.hero-copy { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.8; }

.download-form { max-width: 890px; margin: 45px auto 0; text-align: left; }
.download-form > label { display: block; margin: 0 0 10px 5px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.input-row { position: relative; display: flex; align-items: center; padding: 7px; border: 1px solid rgba(23,33,29,.13); border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 18px 50px rgba(25,58,42,.09); transition: border-color .2s, box-shadow .2s, transform .2s; }
.input-row:focus-within { border-color: rgba(31,157,104,.62); box-shadow: 0 20px 55px rgba(25,91,61,.14), 0 0 0 4px rgba(31,157,104,.08); transform: translateY(-1px); }
.link-icon { flex: 0 0 auto; display: grid; place-items: center; width: 44px; color: #829089; }
.link-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.input-row input { min-width: 0; flex: 1; height: 54px; padding: 0 12px 0 2px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.input-row input::placeholder { color: #9ba59f; }
.primary-button { flex: 0 0 auto; height: 54px; display: inline-flex; align-items: center; gap: 12px; padding: 0 22px; border: 0; border-radius: 14px; color: white; background: var(--ink); font-weight: 650; cursor: pointer; box-shadow: 0 8px 20px rgba(23,33,29,.17); transition: transform .18s, background .18s, opacity .18s; }
.primary-button:hover { transform: translateY(-1px); background: #24342d; }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { cursor: not-allowed; opacity: .58; transform: none; }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form-note { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; color: #87928c; font-size: 12px; }
.field-error { min-height: 20px; margin: 8px 4px 0; color: var(--red); font-size: 13px; text-align: center; }

.download-panel { position: relative; max-width: 920px; margin: 18px auto 72px; overflow: hidden; padding: 32px; border: 1px solid rgba(23,33,29,.12); border-radius: 27px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.download-panel[hidden] { display: none; }
.panel-topline { position: absolute; inset: 0 0 auto; height: 4px; background: var(--green); }
.file-heading { display: flex; align-items: center; gap: 16px; }
.file-icon { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: var(--green-dark); background: rgba(184,237,117,.25); }
.file-icon svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.file-copy { min-width: 0; flex: 1; }
.section-kicker { margin: 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.file-copy h2 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; letter-spacing: -.025em; }
.file-copy > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.status-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px; color: var(--green-dark); background: rgba(31,157,104,.09); font-size: 11px; font-weight: 700; }
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.status-badge[data-state="done"] { color: var(--green-dark); }
.status-badge[data-state="done"] i { animation: none; }
.status-badge[data-state="error"] { color: var(--red); background: rgba(212,84,84,.1); }
.status-badge[data-state="error"] i { animation: none; }
.status-badge[data-state="paused"] { color: #926622; background: rgba(217,166,72,.12); }

.progress-block { margin-top: 30px; }
.progress-copy { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.progress-copy strong { font-size: 28px; letter-spacing: -.05em; }
.progress-copy span { color: var(--muted); font-size: 12px; }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e4e9e6; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--green); box-shadow: 0 0 18px rgba(31,157,104,.25); transition: width .22s ease; }
.progress-fill.indeterminate { animation: indeterminate 1.25s ease-in-out infinite; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 25px; border: 1px solid var(--line); border-radius: 17px; background: rgba(250,252,251,.68); }
.metric { padding: 17px 19px; border-right: 1px solid var(--line); }
.metric:last-child { border: 0; }
.metric span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.metric strong { font-size: 15px; font-variant-numeric: tabular-nums; }

.threads-section { margin-top: 25px; }
.threads-heading { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.threads-heading b { color: var(--ink); font-variant-numeric: tabular-nums; }
.thread-grid { display: grid; grid-template-columns: repeat(32, 1fr); gap: 4px; height: 32px; align-items: end; }
.thread { position: relative; height: 100%; overflow: hidden; border-radius: 4px; background: #e4e9e6; }
.thread::after { content: ""; position: absolute; inset: auto 0 0; height: calc(var(--thread-progress, 0) * 100%); min-height: 0; background: #8aa199; transition: height .18s; }
.thread.active::after { background: var(--blue); }
.thread.done::after { height: 100%; background: var(--green); }
.thread.error::after { height: 100%; background: var(--red); }

.panel-message { display: flex; align-items: flex-start; gap: 9px; margin-top: 24px; padding: 12px 14px; border-radius: 12px; color: var(--muted); background: rgba(23,33,29,.035); font-size: 12px; line-height: 1.55; }
.panel-message svg { flex: 0 0 auto; width: 17px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.panel-message[data-kind="error"] { color: #a83d3d; background: rgba(212,84,84,.08); }
.panel-message[data-kind="success"] { color: var(--green-dark); background: rgba(31,157,104,.08); }
.panel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.secondary-button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; font-size: 12px; font-weight: 650; cursor: pointer; transition: border-color .18s, transform .18s; }
.secondary-button:hover { border-color: #9eaaa4; transform: translateY(-1px); }
.secondary-button.danger { color: #9b4545; }
.secondary-button[hidden] { display: none; }
.secondary-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 25px 0 90px; }
.feature-grid article { position: relative; min-height: 205px; padding: 27px; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,255,255,.58); }
.feature-number { color: var(--green-dark); font-size: 11px; font-weight: 750; letter-spacing: .1em; }
.feature-grid h2 { margin: 39px 0 10px; font-size: 19px; letter-spacing: -.03em; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.feature-grid article::after { content: ""; position: absolute; width: 80px; height: 80px; right: -35px; top: -35px; border: 1px solid rgba(31,157,104,.18); border-radius: 50%; }

.site-footer { display: flex; justify-content: space-between; align-items: center; min-height: 80px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer > span { color: var(--ink); font-weight: 700; letter-spacing: -.03em; }
.site-footer p { margin: 0; }
.noscript { position: fixed; inset: auto 20px 20px; z-index: 10; padding: 14px; border-radius: 10px; color: white; background: var(--red); text-align: center; }

@keyframes pulse { 50% { opacity: .35; transform: scale(.82); } }
@keyframes indeterminate { from { transform: translateX(-120%); } to { transform: translateX(850%); } }

@media (max-width: 760px) {
  .shell { width: min(100% - 26px, 1120px); }
  .site-header { min-height: 72px; }
  .header-pill { display: none; }
  .hero { padding: 55px 0 38px; }
  .hero h1 { font-size: clamp(36px, 11.5vw, 46px); white-space: nowrap; }
  .hero-copy { font-size: 15px; }
  .download-form { margin-top: 34px; }
  .input-row { display: grid; grid-template-columns: 40px 1fr; padding: 7px; border-radius: 18px; }
  .input-row input { height: 51px; padding-right: 6px; font-size: 14px; }
  .primary-button { grid-column: 1 / -1; justify-content: center; width: 100%; margin-top: 5px; }
  .download-panel { padding: 24px 18px; border-radius: 22px; }
  .file-heading { align-items: flex-start; }
  .file-icon { width: 46px; height: 46px; }
  .status-badge { position: absolute; right: 18px; top: 20px; }
  .file-copy { padding-top: 55px; margin-left: -62px; }
  .file-copy h2 { white-space: normal; overflow-wrap: anywhere; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .thread-grid { grid-template-columns: repeat(16, 1fr); height: 55px; }
  .thread { height: 25px; }
  .feature-grid { grid-template-columns: 1fr; padding-bottom: 60px; }
  .feature-grid article { min-height: 175px; }
  .feature-grid h2 { margin-top: 25px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
  .site-footer p { line-height: 1.5; }
}

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