:root {
  color-scheme: light;
  --ink: #0b1324;
  --ink-secondary: #475569;
  --muted: #64748b;
  --blue: #1769f6;
  --blue-hover: #0f52c6;
  --line: #e2e8f0;
  --card-bg: #f8fafc;
  --field: #f8fafc;
  --field-border: #cbd5e1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
button, textarea, a, input { -webkit-tap-highlight-color: transparent; font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Header */
.header {
  height: 72px;
  padding: 0 max(20px, 5vw);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand svg { width: 30px; height: 30px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color .15s ease;
}

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

/* Main layout */
main { flex: 1; padding: 48px max(20px, 5vw) 64px; }
.container { max-width: 860px; margin: 0 auto; }

/* Hero */
.hero { text-align: center; margin-bottom: 36px; }
h1 { margin: 0; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.18; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.tagline { margin: 14px 0 0; color: var(--blue); font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; letter-spacing: -.01em; }
.hero-desc { margin: 12px auto 0; max-width: 620px; color: var(--muted); font-size: clamp(15px, 1.8vw, 17px); line-height: 1.55; }

/* Workspace Downloader */
.workspace {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 20px -2px rgba(11, 19, 36, 0.04);
}

.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
label { font-size: 16px; font-weight: 600; color: var(--ink); }
.text-button { color: var(--blue); background: transparent; border: 0; padding: 4px 0; font-size: 15px; font-weight: 500; }
.text-button:hover { text-decoration: underline; }

textarea {
  width: 100%;
  display: block;
  resize: vertical;
  min-height: 110px;
  max-height: 260px;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea::placeholder { color: #94a3b8; opacity: 1; }
textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 246, 0.15); background: #ffffff; }

.primary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease;
}

form > .primary { margin-top: 18px; }
.primary:hover { background: var(--blue-hover); }
:is(button, a):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

#status { margin: 14px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; overflow-wrap: anywhere; }
#status.error { color: #dc2626; font-weight: 500; }
#verification { margin-top: 16px; }

/* Result */
#result { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.result-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
#result-platform { background: #e0e7ff; color: #3730a3; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .03em; }
#result h2 { font-size: 18px; font-weight: 600; line-height: 1.45; margin: 12px 0 20px; overflow-wrap: anywhere; color: var(--ink); }
.actions { display: flex; gap: 12px; }
.actions .primary { flex: 1; min-height: 48px; font-size: 16px; }
.secondary { background: #fff; border: 1px solid var(--field-border); border-radius: 10px; padding: 10px 20px; color: var(--ink); font-size: 15px; font-weight: 500; transition: background .15s ease; }
.secondary:hover { background: #f8fafc; }
video { width: 100%; max-height: 440px; margin-top: 20px; border-radius: 10px; background: #000; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff66;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Section styling */
.content-section { margin-top: 56px; }
.section-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; color: var(--ink); text-align: left; }
.section-lead { color: var(--muted); font-size: 16px; margin: 0 0 24px; line-height: 1.5; }

/* Popular Tools Cards */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; }
.tool-card {
  display: block;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 6px 16px -2px rgba(11, 19, 36, 0.06); }
.tool-card-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; display: flex; align-items: center; justify-content: space-between; }
.tool-card-desc { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.45; }

/* How It Works Steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.step-num { font-size: 22px; font-weight: 800; color: var(--blue); margin-bottom: 8px; }
.step-title { font-size: 16px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.step-desc { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.feature-card h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.feature-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Platforms Pill tags */
.platform-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.platform-tag {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
}

/* FAQ List */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.faq-question { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.faq-answer { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }

/* Editorial prose for terms/privacy/about */
.prose { font-size: 15px; line-height: 1.7; color: var(--ink-secondary); }
.prose h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 32px 0 12px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  background: var(--card-bg);
  padding: 40px max(20px, 5vw) 32px;
  margin-top: 60px;
}
.footer-content { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .brand { font-size: 20px; }
.footer-tagline { font-size: 13px; color: var(--muted); margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s ease; }
.footer-links a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Responsive */
@media (max-width: 680px) {
  .header { height: 64px; }
  .header-nav { display: none; }
  main { padding: 32px 16px 48px; }
  .workspace { padding: 20px 16px; }
  h1 { font-size: 30px; }
  .tagline { font-size: 18px; margin-top: 10px; }
  .hero-desc { font-size: 14px; }
  .section-title { font-size: 20px; }
  .section-lead { font-size: 14px; }
  .tools-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
}

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