:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #091018;
  color: #e6edf3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(34, 211, 238, 0.11), transparent 34rem),
    radial-gradient(circle at 90% 30%, rgba(240, 202, 99, 0.06), transparent 28rem),
    #091018;
  color: #e6edf3;
}

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

.shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 18px 18px 48px;
}

.topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #e6edf3;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img { width: 28px; height: 28px; }

.top-action,
button,
.recording-link {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #30363d;
  border-radius: 12px;
  background: rgba(22, 27, 34, 0.9);
  color: #e6edf3;
  font-weight: 750;
  text-decoration: none;
}

button { cursor: pointer; }
button:hover,
button:focus-visible,
.top-action:hover,
.top-action:focus-visible,
.recording-link:hover,
.recording-link:focus-visible {
  border-color: #58a6ff;
  outline: none;
}

button.primary {
  border-color: rgba(88, 166, 255, 0.7);
  background: linear-gradient(180deg, #2382d9, #1f6fba);
  color: white;
}

button.quiet {
  min-height: 38px;
  padding: 8px 11px;
  background: transparent;
  color: #9ecbff;
}

.hero {
  padding: 62px 0 30px;
}

.eyebrow,
.step-label {
  margin: 0 0 8px;
  color: #67e8f9;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.5rem, 10vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.hero > p:last-child {
  max-width: 620px;
  margin: 20px 0 0;
  color: #9aa6b2;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.6;
}

.flow {
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  list-style: none;
}

.flow li {
  min-height: 44px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #21262d;
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.55);
  color: #77818c;
  font-size: 0.85rem;
  font-weight: 750;
}

.flow li span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #161b22;
  color: #8b949e;
  font-size: 0.76rem;
}

.flow li.active {
  border-color: rgba(88, 166, 255, 0.42);
  color: #e6edf3;
}
.flow li.active span { color: #dff8ff; background: #173452; }

.panel {
  margin-top: 16px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid #30363d;
  border-radius: 20px;
  background: rgba(13, 17, 23, 0.78);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.16);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.section-heading > div { flex: 1; }
.section-heading h2 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.8rem); letter-spacing: -0.035em; }
.section-copy { margin: 10px 0 18px; color: #8b949e; line-height: 1.55; }

.privacy-badge,
.status-badge {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.08);
  color: #8ef2dd;
  font-size: 0.72rem;
  font-weight: 800;
}

.status-badge {
  border-color: rgba(240, 202, 99, 0.3);
  background: rgba(240, 202, 99, 0.07);
  color: #f0ca63;
}

.field-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label > span:first-child,
.full-field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #c9d1d9;
  font-size: 0.85rem;
  font-weight: 750;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #30363d;
  border-radius: 12px;
  background: #0d1117;
  color: #e6edf3;
  outline: none;
}

input[type="text"] { min-height: 46px; }
textarea { resize: vertical; line-height: 1.5; }
input[type="text"]:focus,
textarea:focus { border-color: #58a6ff; box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.08); }

.check-row {
  margin-top: 16px;
  padding: 13px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #21262d;
  border-radius: 14px;
  background: rgba(22, 27, 34, 0.5);
  cursor: pointer;
}
.check-row input { margin-top: 3px; accent-color: #2f81f7; }
.check-row strong,
.check-row small { display: block; }
.check-row small { margin-top: 3px; color: #8b949e; line-height: 1.4; }

.capture-stage {
  position: relative;
  min-height: 300px;
  margin-top: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px dashed #30363d;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(88, 166, 255, 0.04), transparent 42%),
    #080d13;
}

.capture-stage video {
  width: 100%;
  max-height: 500px;
  display: block;
  object-fit: contain;
  background: #000;
}

.capture-placeholder {
  max-width: 330px;
  padding: 40px 20px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #c9d1d9;
  text-align: center;
}
.capture-placeholder span { color: #77818c; font-size: 0.88rem; line-height: 1.45; }
.capture-orb {
  width: 74px;
  height: 74px;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.14), rgba(88, 166, 255, 0.03));
  color: #67e8f9;
  font-size: 2rem;
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.08);
}

.recording-status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  min-height: 42px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  font-size: 0.83rem;
}
.recording-status time { margin-left: auto; color: #8b949e; font-variant-numeric: tabular-nums; }
.recording-dot { width: 8px; height: 8px; border-radius: 50%; background: #6e7681; }
.capture-stage[data-state="recording"] .recording-dot { background: #f85149; box-shadow: 0 0 0 4px rgba(248, 81, 73, 0.12); }
.capture-stage[data-state="paused"] .recording-dot { background: #f0ca63; }

.capture-actions,
.skill-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.capture-actions .primary { flex: 1 1 190px; }

.hint {
  margin: 12px 0 0;
  color: #768390;
  font-size: 0.8rem;
  line-height: 1.45;
}

.recording-link {
  width: fit-content;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
}

.steps { margin: 0 0 16px; display: grid; gap: 10px; }
.step-card {
  padding: 14px;
  border: 1px solid #21262d;
  border-radius: 14px;
  background: rgba(22, 27, 34, 0.5);
}
.step-card__head { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.step-card__head strong { flex: 1; }
.step-card__head button { min-height: 34px; padding: 6px 9px; color: #8b949e; font-size: 0.78rem; }
.step-card__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.step-card textarea { min-height: 82px; }

.full-field { margin-top: 12px; display: block; }

.skill-output {
  min-height: 330px;
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}
.skill-actions .primary { margin-left: auto; }

footer {
  padding: 28px 2px 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #6e7681;
  font-size: 0.8rem;
}
footer a { color: #8b949e; }

[hidden] { display: none !important; }

@media (max-width: 620px) {
  .shell { padding-inline: 14px; }
  .hero { padding-top: 44px; }
  .brand span { font-size: 0.94rem; }
  .flow { grid-template-columns: 1fr; }
  .flow li { min-height: 38px; }
  .field-grid,
  .step-card__fields { grid-template-columns: 1fr; }
  .capture-stage { min-height: 240px; }
  .section-heading { align-items: center; }
  .skill-actions > * { flex: 1 1 140px; }
  .skill-actions .primary { margin-left: 0; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
