:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eaeef3;
  --ink: #0b1119;
  --ink-2: #3d4756;
  --muted: #637083;
  --line: #d8dee6;
  --accent: #5fd4f5;
  --accent-ink: #0b1119;
  --accent-strong: #0a7aa3;
  --pink: #f06ad8;
  --night: #0b1119;
  --night-2: #131c28;
  --night-line: #243041;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --ok: #1f7a3a;
  --ok-bg: #e7f6ea;
  --info-bg: #e8f6fc;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(11 17 25 / 0.05), 0 8px 24px rgb(11 17 25 / 0.07);
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1119;
    --surface: #121a25;
    --surface-2: #1a2431;
    --ink: #eef3f8;
    --ink-2: #b8c3d1;
    --muted: #8593a5;
    --line: #243041;
    --accent-strong: #5fd4f5;
    --danger: #ff8a80;
    --danger-bg: #3a1714;
    --ok: #7ee29b;
    --ok-bg: #12301b;
    --info-bg: #12283a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, video, svg { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 16px; }

/* ---------- Header / footer ---------- */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand small { display: block; font: 500 0.72rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.brand span { line-height: 1; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 720px) {
  .site-nav a:not(.btn) { display: none; }
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner { display: grid; gap: 12px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--ink-2); }
.disclaimer { font-size: 0.82rem; margin: 0; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-ink);
  font: 600 1rem/1 var(--body);
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: var(--accent); --btn-ink: var(--accent-ink); border-color: transparent; }
.btn-dark { --btn-bg: var(--ink); --btn-ink: var(--bg); border-color: transparent; }
.btn-ghost { --btn-bg: transparent; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Landing ---------- */

.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.85rem; color: var(--ink-2); background: var(--surface);
}
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero-note { font-size: 0.9rem; color: var(--muted); margin: 0; }

.hero-visual {
  position: relative; border: 1px solid var(--night-line); aspect-ratio: 4 / 5; border-radius: 28px;
  background: radial-gradient(120% 80% at 30% 20%, rgb(95 212 245 / 0.16), transparent 60%),
    radial-gradient(90% 70% at 85% 60%, rgb(240 106 216 / 0.14), transparent 60%), var(--night);
  color: #eef3f8; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 28px;
  box-shadow: var(--shadow);
}
.eq { display: flex; align-items: flex-end; gap: 7px; height: 55%; }
.eq span {
  flex: 1; border-radius: 6px 6px 2px 2px; background: #5fd4f5;
  box-shadow: 0 0 18px rgb(95 212 245 / 0.45);
  height: var(--h); transform-origin: bottom;
  animation: eq 1.6s ease-in-out infinite alternate;
  animation-delay: var(--d);
}
.eq span:nth-child(3n) { background: var(--pink); box-shadow: 0 0 18px rgb(240 106 216 / 0.45); }
.eq span:nth-child(1) { --h: 45%; --d: -0.2s; }
.eq span:nth-child(2) { --h: 80%; --d: -0.9s; }
.eq span:nth-child(3) { --h: 60%; --d: -0.4s; }
.eq span:nth-child(4) { --h: 95%; --d: -1.3s; }
.eq span:nth-child(5) { --h: 50%; --d: -0.7s; }
.eq span:nth-child(6) { --h: 75%; --d: -0.1s; }
.eq span:nth-child(7) { --h: 40%; --d: -1.1s; }
.eq span:nth-child(8) { --h: 85%; --d: -0.5s; }
.eq span:nth-child(9) { --h: 65%; --d: -1.5s; }
@keyframes eq { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
.draft-card {
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 16px; padding: 14px 16px;
  display: flex; gap: 12px; align-items: center; font-size: 0.92rem;
}
.draft-card .dot {
  width: 36px; height: 36px; border-radius: 10px; background: #5fd4f5; flex: none;
  display: grid; place-items: center; color: #0b1119;
}
.draft-card strong { display: block; font-size: 0.95rem; }
.draft-card small { color: #9aa7b8; }

@media (prefers-reduced-motion: reduce) {
  .eq span { animation: none; }
  .btn { transition: none; }
}

.section { padding: 56px 0; }
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head p { color: var(--ink-2); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; counter-increment: step;
}
.step::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px;
  border-radius: 12px; background: var(--accent); color: var(--accent-ink);
  font: 700 1.1rem/1 var(--display);
}
.step p { color: var(--ink-2); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.ticks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.ticks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1119' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.ticks strong { display: block; }
.ticks span { color: var(--ink-2); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
code {
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-2); padding: 2px 6px; border-radius: 6px; white-space: nowrap;
}

.faq { display: grid; gap: 12px; max-width: 800px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 20px;
}
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.faq details p { color: var(--ink-2); }

.cta-band {
  background: radial-gradient(80% 140% at 100% 0%, rgb(240 106 216 / 0.18), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgb(95 212 245 / 0.16), transparent 55%), var(--night);
  color: #eef3f8; border-radius: 28px; padding: 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { margin: 0; }
.cta-band p { margin: 8px 0 0; color: #a9b5c4; }

@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: auto; min-height: 300px; gap: 28px; max-width: 560px; }
  .eq { height: 150px; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; }
}

/* ---------- Legal pages ---------- */

.legal { max-width: 760px; padding: 56px 0 0; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.legal .updated { color: var(--muted); margin-bottom: 36px; }
.legal h2 { font-size: 1.35rem; margin-top: 2.2em; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.5em; }
.legal .summary {
  background: var(--info-bg); border-radius: var(--radius-sm); padding: 18px 22px; margin-bottom: 8px;
}
.legal .summary p:last-child { margin: 0; }

/* ---------- Uploader ---------- */

.app { padding: 40px 0 0; }
.app-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
}
.app-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }

.account {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 8px;
}
.account img, .account .avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2);
}
.account .avatar-fallback { display: grid; place-items: center; font-weight: 600; }
.account .who { line-height: 1.2; font-size: 0.9rem; }
.account .who small { display: block; color: var(--muted); font-size: 0.78rem; }

.notice {
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px;
  background: var(--danger-bg); color: var(--danger); font-weight: 500;
}

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}

.signin { max-width: 620px; }
.perm-list { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 14px; }
.perm-list li {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start;
  padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2);
}
.perm-list .ico {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
}
.perm-list .ico svg { width: 20px; height: 20px; }
.perm-list strong { display: block; }
.perm-list span { color: var(--ink-2); font-size: 0.93rem; }
.fine { font-size: 0.85rem; color: var(--muted); margin: 14px 0 0; }

.upload-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .upload-grid { grid-template-columns: 1fr; } }

.dropzone {
  position: relative; display: grid; place-items: center; text-align: center; gap: 10px;
  min-height: 340px; padding: 32px 20px;
  border: 2px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent-strong); }
.dropzone:focus-within { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .big-ico {
  width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; margin-inline: auto;
}
.dropzone .big-ico svg { width: 30px; height: 30px; }
.dropzone strong { font-size: 1.1rem; }
.dropzone small { color: var(--muted); }

.preview video {
  width: 100%; max-height: 520px; border-radius: var(--radius-sm); background: #000;
}
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 18px 0; }
.meta div { min-width: 0; }
.meta dt { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.meta dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.panel h2 { font-size: 1.5rem; }
.panel p { color: var(--ink-2); }

.checks { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; font-size: 0.93rem; }
.checks li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.checks li::before { content: "○"; color: var(--muted); width: 1em; flex: none; }
.checks li.pass::before { content: "✓"; color: var(--ok); font-weight: 700; }
.checks li.fail { color: var(--danger); }
.checks li.fail::before { content: "✕"; color: var(--danger); font-weight: 700; }
.checks li.warn::before { content: "!"; color: var(--muted); font-weight: 700; }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 0.93rem; color: var(--ink-2); margin-bottom: 18px; cursor: pointer;
}
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent-strong); flex: none; }

.send { width: 100%; }

.progress { margin-top: 20px; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent-strong); transition: width 0.2s ease; }
.progress p { margin: 10px 0 0; font-size: 0.93rem; color: var(--ink-2); }

.result { margin-top: 20px; border-radius: var(--radius-sm); padding: 18px 20px; }
.result.ok { background: var(--ok-bg); }
.result.ok h3 { color: var(--ok); }
.result.err { background: var(--danger-bg); }
.result.err h3 { color: var(--danger); }
.result p { color: var(--ink-2); font-size: 0.95rem; }
.result ol { margin: 0 0 14px; padding-left: 1.2em; color: var(--ink-2); font-size: 0.95rem; }

.loading { color: var(--muted); padding: 40px 0; }

[hidden] { display: none !important; }
