:root {
  --bg: #0b1220;
  --bg-mid: #0f172a;
  --surface: #1b2336;
  --surface-elevated: #242e42;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #e2e8f0;
  --border: rgba(100, 116, 139, 0.45);
  --radius: 14px;
  --nav-h: 56px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(148, 163, 184, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(71, 85, 105, 0.22), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 48%, #0a101c 100%);
  color: var(--text);
  line-height: 1.55;
  position: relative;
}
body > *:not(#site-atmosphere) { position: relative; z-index: 1; }
body > main { flex: 1; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff; }

#site-atmosphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  padding: 0 1.25rem;
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid rgba(71, 85, 105, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header-inner,
.site-header:not(:has(.site-header-inner)) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
}
.site-header:not(:has(.site-header-inner)) {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-header-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0.65rem 0;
}
.site-header .logo {
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #fff;
  font-size: 1.05rem;
}
.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle:hover { color: #fff; border-color: rgba(148, 163, 184, 0.7); }
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  align-items: center;
}
.site-header nav a {
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: #fff;
  background: rgba(148, 163, 184, 0.14);
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}
h2 { margin-top: 2rem; margin-bottom: 0.65rem; font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
.lead,
.wrap > p:first-of-type {
  color: var(--muted-strong);
  font-size: 1.05rem;
  max-width: 42rem;
}
.quick-nav {
  background: rgba(27, 35, 54, 0.88);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.quick-nav h2 { margin-top: 0; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
th, td { border: 1px solid #334155; padding: 0.5rem 0.65rem; text-align: left; }
th { background: var(--surface); }
.btn {
  display: inline-block;
  margin: 0.35rem 0.35rem 0.35rem 0;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 55%, #d4dce6 100%);
  color: #0f172a;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 20px rgba(0, 0, 0, 0.22);
}
.btn:hover { filter: brightness(1.04); color: #0f172a; }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: none;
}
.btn.secondary:hover { background: rgba(148, 163, 184, 0.12); color: #fff; }
.cta { margin-top: 2.5rem; }
.site-footer {
  border-top: 1px solid rgba(100, 116, 139, 0.4);
  margin-top: auto;
  padding: 1.5rem 1.25rem 2.25rem;
  background: rgba(10, 16, 28, 0.55);
}
.site-footer nav {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  font-size: 0.92rem;
}
.site-footer a {
  color: var(--muted-strong);
  text-decoration: none;
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.related {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.signup-form {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  max-width: none;
}
.signup-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted-strong);
}
.signup-form input {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.9);
  color: var(--text);
}
.signup-form input:focus,
.gen-form textarea:focus,
.gen-form select:focus {
  outline: 2px solid rgba(226, 232, 240, 0.35);
  outline-offset: 1px;
}
.signup-form input:disabled,
.signup-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.form-note { margin: 0; font-size: 0.9rem; color: var(--muted); }
button.btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font: inherit;
  text-align: center;
}
.muted { color: var(--muted); }
.app-wrap { max-width: 560px; padding-top: 1.35rem; }
.app-wrap > h1 { margin-bottom: 0.35rem; font-size: clamp(1.55rem, 3.5vw, 2rem); }
.app-wrap > .muted { margin-top: 0; margin-bottom: 1rem; font-size: 0.92rem; }
.app-card {
  margin-top: 0.85rem;
  padding: 1.1rem 1.2rem 1.25rem;
  background: rgba(27, 35, 54, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.app-card > h2 { margin-top: 0; margin-bottom: 0.75rem; font-size: 1.15rem; }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 0.85rem; }
.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-strong);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.tab.active {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #e2e8f0;
}
.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.app-toolbar p { margin: 0; font-size: 0.92rem; color: var(--muted-strong); }
.gen-form textarea,
.gen-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.9);
  color: var(--text);
  font: inherit;
}
.gen-form textarea { min-height: 4.5rem; resize: vertical; }
.task-status { margin-top: 1rem; }
.progress {
  height: 8px;
  background: rgba(11, 18, 32, 0.9);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.65rem 0;
}
#task-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #94a3b8, #e2e8f0);
  transition: width 0.3s ease;
}
#task-video {
  width: 100%;
  margin-top: 0.75rem;
  border-radius: var(--radius);
  background: #000;
}
pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  background: rgba(27, 35, 54, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.45;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.feature-list a {
  display: block;
  text-decoration: none;
  color: var(--muted-strong);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(27, 35, 54, 0.55);
}
.feature-list a:hover {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(39, 47, 66, 0.75);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding-top: 0.35rem;
  }
  .site-header nav.is-open { display: flex; }
  .site-header nav a {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
  }
  .wrap { padding: 1.35rem 1rem 2.5rem; }
  .app-wrap { padding-top: 1rem; }
  .wrap > p:has(.btn) {
    display: grid;
    gap: 0.55rem;
  }
  .wrap > p:has(.btn) .btn {
    width: 100%;
    text-align: center;
    margin: 0;
  }
  .cta {
    display: grid;
    gap: 0.55rem;
  }
  .cta .btn {
    width: 100%;
    text-align: center;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #site-atmosphere { display: none; }
  .btn, .feature-list a, .tab { transition: none; }
}
