:root {
  --bg: #07090c;
  --bg-2: #0c1016;
  --surface: #121820;
  --ink: #e8ecef;
  --muted: #8b959e;
  --line: rgba(232, 236, 239, 0.1);
  --accent: #3dffb0;
  --accent-ink: #04120c;
  --warn: #ff7a59;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --display: "Syne", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: var(--bg);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(61, 255, 176, 0.12), transparent 50%),
    linear-gradient(165deg, #0a0d12 0%, #07090c 40%, #0b1018 100%);
}

.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 236, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 236, 239, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 10%, transparent 70%);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 6vw;
  gap: 1rem;
  border-bottom: 1px solid transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #0c1016;
  border: 1px solid rgba(61, 255, 176, 0.25);
  padding: 4px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
}

nav a, .linkish {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

nav a:hover, .linkish:hover { color: var(--ink); }

.nav-cta {
  color: var(--accent-ink) !important;
  background: var(--accent) !important;
  border-radius: 6px;
  padding: 0.4rem 0.85rem !important;
  font-weight: 500;
  font-size: 0.92rem;
}

.nav-cta:hover { filter: brightness(1.06); color: var(--accent-ink) !important; }

/* —— Hero: one composition —— */
.hero-stage {
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 2rem 3rem;
  padding: 4vh 6vw 8vh;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  max-width: 34rem;
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(61, 255, 176, 0.5);
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(61, 255, 176, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(61, 255, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 176, 0); }
}

.brand-hero {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 5.75rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0 0 1rem;
  color: var(--ink);
}

.hero h1 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.35;
  margin: 0 0 0.85rem;
  max-width: 28ch;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.lede {
  max-width: 42ch;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.fine { color: var(--muted); font-size: 0.88rem; }
.fine a { color: var(--accent); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.signup {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  max-width: 480px;
}

.signup.stacked {
  flex-direction: column;
  align-items: stretch;
}

.signup label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: -0.15rem;
}

.signup input,
.signup select {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

.signup input:focus,
.signup select:focus {
  border-color: rgba(61, 255, 176, 0.45);
}

.signup input::placeholder { color: #5a646e; }

.signup.stacked input,
.signup.stacked select,
.signup.stacked button {
  width: 100%;
  border-radius: 6px;
}

.signup details {
  width: 100%;
}

.signup details summary {
  cursor: pointer;
  color: var(--muted);
}

button, .btn, .ghost, a.btn {
  border: 0;
  border-radius: 6px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}

button, .btn, a.btn {
  background: var(--accent);
  color: var(--accent-ink);
}

button:hover, .btn:hover, a.btn:hover { filter: brightness(1.06); }

.ghost, .ghost-btn {
  background: transparent !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
}

.ghost:hover, .ghost-btn:hover {
  border-color: rgba(61, 255, 176, 0.35) !important;
  color: var(--accent) !important;
  filter: none;
}

.ghost.block { display: inline-flex; margin-top: 0.85rem; }

.cta-secondary {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.msg {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.92rem;
}

.key-box {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
  color: var(--accent);
}

.hidden { display: none; }

/* —— Product visual: live change event —— */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  animation: rise 1s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.event-panel {
  border: 1px solid rgba(61, 255, 176, 0.22);
  border-radius: 10px;
  background: rgba(12, 16, 22, 0.92);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.event-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.event-chrome .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 2.4s ease-out infinite;
}

.event-chrome .badge {
  margin-left: auto;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.event-body {
  padding: 1rem 1.1rem 1.15rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
  white-space: pre-wrap;
}

.event-body .k { color: #7ec8ff; }
.event-body .s { color: var(--accent); }
.event-body .n { color: #ffb86b; }

.event-radar {
  position: absolute;
  right: -18%;
  top: -22%;
  width: 70%;
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
  animation: sweep-slow 12s linear infinite;
}

@keyframes sweep-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* —— Sections —— */
.section {
  padding: 4.5rem 6vw;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.section > .lede { margin-bottom: 0; }

.steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1.25rem;
  max-width: 52rem;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  color: var(--muted);
  line-height: 1.6;
}

.steps strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.steps a { color: var(--accent); }

.step-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(61, 255, 176, 0.3);
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
  min-width: 2.2rem;
  text-align: center;
}

.plans {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 2rem;
}

.plans article,
.panel,
.check-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.plans h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.plans .featured {
  border-color: rgba(61, 255, 176, 0.35);
  background: linear-gradient(160deg, rgba(61, 255, 176, 0.08), var(--surface) 45%);
}

.price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  margin: 0.55rem 0 1rem;
  letter-spacing: -0.03em;
}

.price span {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}

ul {
  padding-left: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1rem;
}

.faq details {
  max-width: 60ch;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
}

.faq details p {
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.faq a { color: var(--accent); }
.faq code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--accent);
}

/* —— App pages —— */
.auth, .dash, .hero {
  padding: 5vh 6vw 4vh;
  max-width: 960px;
  animation: rise 0.7s ease-out both;
}

.auth h1, .dash h1, .hero h1:not(.brand-hero) {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.dash {
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.dash .signup { max-width: 640px; }
.dash .lede { max-width: none; }

.panel h1, .panel h2 {
  margin-top: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.checks { display: grid; gap: 0.75rem; }

.check-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.check-actions button {
  width: auto;
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
}

.empty-check {
  padding: 0.25rem 0;
}

.warn-line { color: var(--warn); }

.pill.pill-ok {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
  font-weight: 500;
}

.pill.pill-warn {
  color: #3a1208;
  background: var(--warn);
  border-color: transparent;
  font-weight: 500;
}

.mono {
  font-family: var(--mono);
  font-size: 0.88rem;
  word-break: break-all;
}

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}

footer {
  padding: 2.5rem 6vw 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

.prose-page { max-width: 860px; }
.prose-page .lede { max-width: 62ch; }
.prose-page h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 2rem 0 0.5rem;
}
.prose-page p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0.75rem 0 0;
  max-width: 68ch;
}
.prose-page a { color: var(--accent); }
.prose-page a.btn { color: var(--accent-ink); }
.prose-page a.btn:hover { color: var(--accent-ink); }
.prose-page code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--accent);
}
.prose-page .panel p { max-width: none; }
.compare-wrap {
  overflow-x: auto;
  margin: 1.75rem 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare th, .compare td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.compare thead th {
  color: var(--ink);
  font-weight: 500;
  background: rgba(61, 255, 176, 0.06);
}
.compare tbody th {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}
.compare td { color: var(--muted); }
.compare .yes { color: var(--accent); }
.compare tr:last-child th,
.compare tr:last-child td { border-bottom: 0; }

@media (max-width: 720px) {
  .compare { min-width: 620px; }
}

/* —— Dashboard: edit, history, diffs —— */
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--ink);
  font-size: 0.95rem;
  margin: 0.15rem 0;
}
.checkline input[type="checkbox"] {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  margin-top: 0.3rem;
  accent-color: var(--accent);
}
.signup details { margin: 0.15rem 0; }
.signup details summary { padding: 0.25rem 0; }
.signup details label { display: block; margin-top: 0.6rem; }
.signup details input, .signup details select { margin-top: 0.3rem; }
.upgrade-box {
  margin: 1rem 0 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(61, 255, 176, 0.25);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(61, 255, 176, 0.07), transparent 60%);
}
.check-card .mono a { color: var(--ink); text-decoration: none; }
.check-card .mono a:hover { color: var(--accent); }
.check-card code { font-family: var(--mono); color: var(--accent); font-size: 0.85em; }
.edit-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  max-width: none;
}
.edit-form label { display: block; }
.edit-form label input, .edit-form label select { margin-top: 0.3rem; }
.edit-form .row button { width: auto; }
.events {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 0.75rem;
}
.event .fine { font-size: 0.82rem; }
pre.diff {
  margin: 0.45rem 0 0;
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  max-height: 22rem;
  overflow: auto;
}
.d-add { color: var(--accent); }
.d-del { color: var(--warn); }
.d-hunk { color: #7ec8ff; }
.d-meta { color: #5a646e; }
.msg.warn-line { border-color: rgba(255, 122, 89, 0.4); }

/* —— Pricing toggle —— */
.billing-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin: 1.25rem 0 0;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.billing-toggle button {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  background: transparent;
  color: var(--muted);
}
.billing-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.price .was {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 0.4rem;
  font-family: var(--sans);
  font-weight: 400;
}
.plans .save {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid rgba(61, 255, 176, 0.35);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  vertical-align: middle;
}

/* —— Code samples on marketing pages —— */
.prose-page pre.code {
  margin: 0.75rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
  max-width: none;
}
.prose-page h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 1.5rem 0 0.25rem;
  color: var(--ink);
}
.prose-page ul { max-width: 68ch; }
.prose-page ol { color: var(--muted); line-height: 1.7; max-width: 68ch; padding-left: 1.2rem; }
.prose-page li strong { color: var(--ink); font-weight: 500; }
.prose-page .fine { max-width: 68ch; }

@media (max-width: 900px) {
  .hero-stage {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 3vh;
  }
  .hero-visual {
    order: -1;
    max-width: 280px;
    margin-bottom: 0.5rem;
  }
  .brand-hero { font-size: clamp(2.8rem, 14vw, 4rem); }
}

@media (max-width: 640px) {
  nav a:not(.nav-cta) { display: none; }
}
