:root {
  color-scheme: light dark;
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --border: #334155;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.25), transparent 55%),
    linear-gradient(180deg, #0b1120 0%, #020617 60%);
  color: var(--text);
}

body.splash {
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.4), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.3), transparent 35%),
    linear-gradient(180deg, #020617 0%, #0b1120 55%, #020617 100%);
}

.hero {
  position: relative;
  padding: 4rem 1.5rem 2.4rem;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.35), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.25), transparent 40%);
  filter: blur(20px);
}

.hero::after {
  top: 50%;
  left: 50%;
  width: 600px;
  height: 340px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  filter: blur(40px);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 2.5rem;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.65), rgba(2, 6, 23, 0.35));
  backdrop-filter: blur(26px);
  box-shadow: 0 25px 80px rgba(2, 6, 23, 0.65);
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.75);
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.65rem, 6vw, 4.2rem);
  letter-spacing: -0.02em;
}

.hero__lead {
  margin-top: 0.4rem;
  color: rgba(226, 232, 240, 0.85);
  font-size: 1.1rem;
  line-height: 1.8;
}

.layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding: 0 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.layout--glass .card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(3, 7, 18, 0.65));
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.card--highlight {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 25px 60px rgba(14, 165, 233, 0.35);
}

.live-preview__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 1rem;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(14, 165, 233, 0.4);
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.3);
  background: rgba(15, 23, 42, 0.6);
}

.live-preview__frame img {
  width: 100%;
  height: 100%;
  display: block;
}

.live-preview__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.85), rgba(15, 23, 42, 0.35));
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.live-preview__frame:hover .live-preview__overlay,
.live-preview__frame:focus-within .live-preview__overlay {
  opacity: 1;
}

.live-preview__overlay p {
  margin: 0 0 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}


.card h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.link-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.link-list li {
  margin-bottom: 1rem;
}

.link-list a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.link-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
  margin: 1rem 0 0;
}

.pill-list a {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Viewer */

.viewer {
  background: #020617;
}

.viewer__header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.viewer__meta {
  text-align: center;
  flex: 1;
}

.viewer__path {
  margin: 0;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 0.95rem;
  color: var(--muted);
}

.viewer__content {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

.markdown-body {
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid rgba(51, 65, 85, 0.7);
  box-shadow: var(--shadow);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: #f8fafc;
}

.markdown-body p,
.markdown-body li {
  line-height: 1.7;
  color: var(--text);
}

.markdown-body a {
  color: var(--accent);
}

.markdown-body pre {
  background: rgba(15, 23, 42, 0.9);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.5rem 0.75rem;
}

.message {
  padding: 1rem;
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .viewer__header {
    flex-direction: column;
    gap: 0.8rem;
  }

  .viewer__content {
    padding: 1rem;
  }

  .markdown-body {
    padding: 1.25rem;
  }
}

/* Public landing embellishments */
.splash--public .hero__content {
  text-align: left;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero__preview {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.hero__preview-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.8);
  max-width: 320px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(2, 6, 23, 0.55);
}

.hero__preview-card p {
  margin: 0 0 1rem;
  color: rgba(226, 232, 240, 0.85);
}

.pill-list--columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.steps {
  margin: 0;
  padding-left: 1.25rem;
}

.steps li {
  margin-bottom: 0.5rem;
}
