:root {
  --brand: #2563eb;
  --brand-2: #1e40af;
  --accent: #3b82f6;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.logo svg {
  color: var(--brand);
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  gap: var(--space-5);
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  transition: color 150ms var(--ease-out);
}

.header-nav a:hover {
  color: var(--brand);
}

.hero {
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(3rem, 6vw, 6rem);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--brand) 4%, var(--bg)), var(--bg));
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.eyebrow {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  color: var(--brand);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: var(--space-4);
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: var(--space-4);
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero-lead {
  font-size: var(--step-1);
  color: var(--muted);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-3);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--radius-pill);
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad);
  color: white;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 24%, transparent);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--brand) 32%, transparent);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

.btn-large {
  padding: var(--space-4) var(--space-6);
  font-size: var(--step-1);
}

.upload-section {
  padding: var(--space-10) 0;
  background: var(--surface);
}

.upload-container {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.upload-section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.upload-section h2 em {
  font-style: normal;
  color: var(--brand);
}

.section-lead {
  font-size: var(--step-1);
  color: var(--muted);
  margin-bottom: var(--space-8);
}

.alert {
  padding: var(--space-4);
  border-radius: var(--radius-2);
  margin-bottom: var(--space-6);
  font-size: var(--step-0);
}

.alert-error {
  background: color-mix(in srgb, #ef4444 10%, transparent);
  color: #dc2626;
  border: 1px solid color-mix(in srgb, #ef4444 20%, transparent);
}

.upload-form {
  text-align: left;
}

.upload-zone {
  position: relative;
  margin-bottom: var(--space-6);
}

.upload-zone input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.upload-zone label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: var(--space-6);
  border: 2px dashed var(--border);
  border-radius: var(--radius-3);
  background: var(--surface-2);
  cursor: pointer;
  transition: all 200ms var(--ease-out);
}

.upload-zone label:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 4%, var(--surface-2));
}

.upload-zone svg {
  color: var(--brand);
  margin-bottom: var(--space-4);
  opacity: 0.7;
}

.upload-text {
  display: block;
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.upload-hint {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
}

.divider {
  position: relative;
  text-align: center;
  margin: var(--space-6) 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.divider span {
  position: relative;
  display: inline-block;
  padding: 0 var(--space-3);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 500;
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-size: var(--step-0);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  font-size: var(--step-0);
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: all 150ms var(--ease-out);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.form-control::placeholder {
  color: color-mix(in srgb, var(--muted) 60%, transparent);
}

.upload-form .btn-large {
  width: 100%;
  justify-content: center;
}

.how-section {
  padding: var(--space-10) 0;
}

.how-section h2,
.features-section h2,
.faq-section h2,
.cta-section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-8);
  line-height: 1.2;
}

.how-section h2 em,
.features-section h2 em,
.faq-section h2 em,
.cta-section h2 em {
  font-style: normal;
  color: var(--brand);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.step-card {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
  text-align: center;
  transition: all 200ms var(--ease-out);
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-4);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-radius: var(--radius-pill);
  color: var(--brand);
}

.step-card h3 {
  font-size: var(--step-2);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.step-card p {
  font-size: var(--step-0);
  color: var(--muted);
  line-height: 1.7;
}

.features-section {
  padding: var(--space-10) 0;
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
}

.feature-card {
  padding: var(--space-5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  transition: all 200ms var(--ease-out);
}

.feature-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-1);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-3);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: var(--radius-2);
  color: var(--brand);
}

.feature-card h3 {
  font-size: var(--step-1);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text);
}

.feature-card p {
  font-size: var(--step-0);
  color: var(--muted);
  line-height: 1.6;
}

.faq-section {
  padding: var(--space-10) 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  overflow: hidden;
  transition: all 200ms var(--ease-out);
}

.faq-item:hover {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

.faq-item summary {
  padding: var(--space-4) var(--space-5);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 150ms var(--ease-out);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  float: right;
  font-size: var(--step-2);
  color: var(--brand);
  transition: transform 200ms var(--ease-out);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  background: var(--surface-2);
}

.faq-answer {
  padding: 0 var(--space-5) var(--space-4);
}

.faq-answer p {
  font-size: var(--step-0);
  color: var(--muted);
  line-height: 1.7;
}

.cta-section {
  padding: var(--space-10) 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  text-align: center;
}

.cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.cta-section h2 {
  color: white;
}

.cta-section h2 em {
  color: color-mix(in srgb, white 85%, var(--brand));
}

.cta-section p {
  font-size: var(--step-1);
  color: color-mix(in srgb, white 90%, transparent);
  margin-bottom: var(--space-6);
}

.cta-section .btn-primary {
  background: white;
  color: var(--brand);
  box-shadow: 0 4px 16px color-mix(in srgb, black 20%, transparent);
}

.cta-section .btn-primary:hover {
  background: color-mix(in srgb, white 96%, var(--brand));
  box-shadow: 0 6px 24px color-mix(in srgb, black 24%, transparent);
}

.site-footer {
  padding: var(--space-8) 0 var(--space-4);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.footer-brand .logo {
  margin-bottom: var(--space-3);
}

.footer-brand p {
  font-size: var(--step-0);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-6);
}

.footer-col h4 {
  font-size: var(--step-0);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.footer-col a {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
  text-decoration: none;
  margin-bottom: var(--space-2);
  transition: color 150ms var(--ease-out);
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  text-align: center;
  font-size: var(--step--1);
}

.result-main {
  padding: var(--space-8) 0 var(--space-10);
  background: var(--bg);
}

.result-container {
  max-width: 900px;
  margin: 0 auto;
}

.result-head {
  margin-bottom: var(--space-8);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step-0);
  color: var(--muted);
  text-decoration: none;
  margin-bottom: var(--space-4);
  transition: color 150ms var(--ease-out);
}

.back-link:hover {
  color: var(--brand);
}

.back-link svg {
  flex-shrink: 0;
}

.result-head h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.score-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-1);
}

.score-circle {
  position: relative;
  flex-shrink: 0;
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-num {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.score-max {
  display: block;
  font-size: var(--step-0);
  color: var(--muted);
  font-weight: 600;
}

.score-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.level-high {
  background: color-mix(in srgb, #10b981 15%, transparent);
  color: #059669;
}

.level-mid {
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand);
}

.level-low {
  background: color-mix(in srgb, #f59e0b 15%, transparent);
  color: #d97706;
}

.score-info h2 {
  font-size: var(--step-3);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.feedback-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

.feedback-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  transition: all 200ms var(--ease-out);
}

.feedback-card:hover {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  box-shadow: var(--shadow-1);
}

.feedback-icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-radius: var(--radius-2);
  color: var(--brand);
}

.feedback-body h3 {
  font-size: var(--step-2);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.feedback-body p {
  font-size: var(--step-0);
  color: var(--muted);
  line-height: 1.7;
}

.result-cta {
  text-align: center;
  padding: var(--space-8);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, transparent), color-mix(in srgb, var(--brand) 2%, transparent));
  border-radius: var(--radius-3);
  border: 1px solid color-mix(in srgb, var(--brand) 15%, transparent);
}

.result-cta h2 {
  font-size: var(--step-3);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text);
}

.result-cta p {
  margin-bottom: var(--space-5);
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .hero-visual {
    order: -1;
  }
  
  .header-nav {
    gap: var(--space-3);
  }
  
  .header-nav a {
    font-size: var(--step--2);
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .score-panel {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-4);
  }
  
  .score-circle {
    justify-self: center;
  }
  
  .feedback-card {
    grid-template-columns: 1fr;
  }
}