:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e6e9f2;
  --surface: #ffffff;
  --soft: #f7f7fc;
  --purple: #7c3aed;
  --purple-deep: #5b21b6;
  --blue: #667eea;
  --green: #12b76a;
  --danger: #d92d20;
  --shadow: 0 18px 60px rgba(70, 48, 126, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 12%, rgba(124, 58, 237, .08), transparent 25rem),
    radial-gradient(circle at 5% 42%, rgba(102, 126, 234, .08), transparent 28rem),
    #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.minimal-page { min-height: 100vh; display: flex; flex-direction: column; }
.minimal-home { flex: 1; display: grid; place-content: center; justify-items: center; gap: 24px; padding: 64px 20px 120px; }
.minimal-logo { width: min(480px, 80vw); }
button, input, textarea { font: inherit; }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 76px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, .97), rgba(118, 75, 162, .97));
  box-shadow: 0 8px 30px rgba(57, 36, 108, .22);
  backdrop-filter: blur(18px);
}
.nav-wrap { width: min(1180px, calc(100% - 40px)); margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand img { display: block; width: 154px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link, .lang-button {
  color: rgba(255,255,255,.86);
  border: 1px solid transparent;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  transition: .2s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.13); }
.lang-button { cursor: pointer; background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.22); }
.lang-button:hover { background: rgba(255,255,255,.22); }
.menu-button { display: none; border: 0; color: white; background: transparent; font-size: 25px; cursor: pointer; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 96px 0 62px; text-align: center; }
.hero-logo { width: min(420px, 80vw); }
.eyebrow { margin: 20px 0 12px; color: var(--purple); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0 auto; font-size: clamp(38px, 6vw, 70px); line-height: 1.06; letter-spacing: -.045em; }
.hero-copy { max-width: 760px; margin: 24px auto 0; color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero-actions.actions-left { justify-content: flex-start; margin-top: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 13px; cursor: pointer; font-weight: 750; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 10px 24px rgba(124, 58, 237, .25); }
.button-secondary { color: var(--purple-deep); background: #fff; border: 1px solid #ddd6fe; box-shadow: 0 8px 25px rgba(70, 48, 126, .08); }
.button[disabled] { cursor: not-allowed; opacity: .55; transform: none; }
.full-submit { width: 100%; margin-top: 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 88px; }
.stat { padding: 24px; background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 35px rgba(30,41,59,.05); }
.stat strong { display: block; font-size: 29px; line-height: 1.2; color: var(--purple-deep); }
.stat span { color: var(--muted); font-size: 14px; }

.section { padding: 72px 0; }
.section-soft { background: linear-gradient(180deg, rgba(247,247,252,.8), rgba(255,255,255,.8)); border-block: 1px solid #f0eff8; }
.section-heading { max-width: 700px; margin-bottom: 36px; }
.section-heading h2, .page-title { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.13; letter-spacing: -.035em; }
.section-heading p { color: var(--muted); font-size: 18px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.9); box-shadow: 0 14px 42px rgba(30,41,59,.06); }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); font-size: 21px; }
.card h3 { margin: 18px 0 8px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }
.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; counter-reset: pipeline; }
.pipeline-step { position: relative; min-height: 160px; padding: 18px 15px; border-radius: 17px; color: #fff; background: linear-gradient(145deg, #667eea, #764ba2); counter-increment: pipeline; }
.pipeline-step::before { content: counter(pipeline, decimal-leading-zero); display: block; margin-bottom: 20px; font-size: 12px; font-weight: 800; opacity: .65; letter-spacing: .1em; }
.pipeline-step { font-size: 14px; font-weight: 700; line-height: 1.4; }

.page-hero { padding: 78px 0 32px; text-align: center; }
.page-hero p { max-width: 720px; margin: 16px auto 0; color: var(--muted); font-size: 18px; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr); gap: 24px; padding: 24px 0 90px; align-items: start; }
.upload-card { padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 750; }
.field small { color: var(--muted); }
.input { width: 100%; border: 1px solid #d7dbea; border-radius: 12px; padding: 12px 14px; color: var(--ink); background: #fff; outline: none; transition: border .2s, box-shadow .2s; }
.input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 4px rgba(139,92,246,.12); }
textarea.input { min-height: 88px; resize: vertical; }
.dropzone { display: grid; place-items: center; min-height: 240px; padding: 28px; border: 2px dashed #c8c9e8; border-radius: 18px; text-align: center; background: linear-gradient(145deg, #fafaff, #f6f2ff); cursor: pointer; transition: .25s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--purple); background: #f5f0ff; transform: translateY(-2px); }
.dropzone-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 15px; border-radius: 18px; color: white; background: linear-gradient(135deg, #667eea, #764ba2); box-shadow: 0 12px 28px rgba(102,126,234,.25); font-size: 28px; }
.dropzone strong { display: block; font-size: 18px; }
.dropzone span { color: var(--muted); font-size: 14px; }
.file-summary { display: none; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; padding: 14px; border: 1px solid #ddd6fe; border-radius: 13px; background: #faf8ff; }
.file-summary.visible { display: flex; }
.file-details { min-width: 0; }
.file-name { min-width: 0; font-weight: 720; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: 13px; }
.remove-file { flex: none; border: 0; color: var(--danger); background: transparent; cursor: pointer; font-weight: 750; }
.progress-panel { display: none; margin-top: 24px; padding: 20px; border-radius: 17px; background: #f8f7ff; }
.progress-panel.visible { display: block; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; font-size: 14px; font-weight: 700; }
.progress-track { height: 13px; overflow: hidden; border-radius: 999px; background: #e9e7f5; }
.progress-fill { position: relative; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #667eea, #8b5cf6, #d946ef); transition: width .15s linear; }
.progress-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.55) 45%, transparent 70%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-details { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 13px; }
.result-box { display: none; margin-top: 22px; padding: 18px; border-radius: 15px; word-break: break-word; }
.result-box.visible { display: block; }
.result-box.success { color: #05603a; border: 1px solid #a6f4c5; background: #ecfdf3; }
.result-box.error { color: #912018; border: 1px solid #fecdca; background: #fef3f2; }
.result-box code { font-size: 12px; }
.aside-card { padding: 25px; border-radius: 21px; color: #fff; background: linear-gradient(150deg, #667eea, #764ba2); box-shadow: 0 18px 45px rgba(79,56,139,.22); }
.aside-card h2 { margin-top: 0; font-size: 21px; }
.check-list { padding: 0; margin: 18px 0 0; list-style: none; }
.check-list li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid rgba(255,255,255,.16); font-size: 14px; }
.check-list li::before { content: "✓"; position: absolute; left: 2px; color: #c4b5fd; font-weight: 900; }

.table-card { margin: 22px 0 90px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 17px 20px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: #5b6477; background: #fafaff; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:hover { background: #fcfbff; }
.rank { color: var(--purple); font-weight: 850; }
.metric { font-variant-numeric: tabular-nums; font-weight: 760; }
.empty-state { padding: 64px 20px; color: var(--muted); text-align: center; }
.table-note { padding: 15px 20px; color: var(--muted); background: #fafaff; font-size: 13px; }

.site-footer { padding: 34px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--purple); }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .upload-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .site-header { height: 68px; }
  .nav-wrap, .container { width: min(100% - 28px, 1120px); }
  .brand img { width: 132px; }
  .menu-button { display: block; }
  .nav-links { display: none; position: absolute; top: 62px; right: 14px; left: 14px; padding: 12px; flex-direction: column; align-items: stretch; border-radius: 15px; background: #6850b2; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-link, .lang-button { text-align: left; }
  .hero { padding-top: 68px; }
  .minimal-home { padding-bottom: 80px; }
  .stat-grid, .pipeline { grid-template-columns: 1fr; }
  .pipeline-step { min-height: 110px; }
  .upload-card { padding: 20px; }
  .dropzone { min-height: 205px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
