/* redline.coderbdev.com: the same dark code-editor theme as demo.coderb.dev.
   Single accent (--accent) reserved for the brand redline: links, CTAs.
   No webfonts: system stacks only, on purpose. */

:root {
  --bg: #0d1117;
  --bg-elevated: #11161d;
  --bg-panel: #161b22;
  --border: #21262d;
  --border-strong: #30363d;
  --fg: #e6edf3;
  --fg-muted: #8b949e;
  --fg-dim: #7d8590;
  --accent: #ff3b30;
  --accent-strong: #d7263d;
  --accent-dim: rgba(255, 59, 48, 0.14);
  --accent-glow: rgba(255, 59, 48, 0.35);
  --green: #3fb950;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.55;
}

body {
  min-height: 100vh;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.brand,
.site-header nav a,
.btn {
  text-decoration: none;
}

code,
pre,
kbd,
.mono {
  font-family: var(--font-mono);
}

pre {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #c9d1d9;
}

code {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.85em;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
}

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.section-lede {
  color: var(--fg-muted);
  max-width: 62ch;
  margin: 0 0 2rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand:hover {
  text-decoration: none;
  color: var(--fg);
}

.brand-mark {
  display: block;
  border-radius: 5px;
}

.brand-sub {
  font-weight: 400;
  color: var(--fg-muted);
}

@media (max-width: 560px) {
  .brand-sub {
    display: none;
  }
}

.site-header nav a {
  margin-left: 1.25rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.site-header nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 3rem;
  color: var(--fg-dim);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: var(--fg-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.footer-nav a + a::before {
  content: "·";
  display: inline-block;
  margin-right: 0.75rem;
  color: var(--fg-dim);
  text-decoration: none;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.footer-brand:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 16px var(--accent-glow);
}

.footer-brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

.footer-brand strong {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  margin: 0 0 1rem;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 56ch;
  margin: 0 auto 1.75rem;
}

.hero .lede strong {
  color: var(--fg);
}

/* ---------- Badges / callouts ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.badge-vanilla {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.badge + .badge {
  margin-left: 0.4rem;
}

.badge-ok {
  border-color: rgba(63, 185, 80, 0.35);
  color: var(--green);
}

.badge-down {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin: 0 auto;
  max-width: 62ch;
}

.callout-icon {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

.callout p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.callout strong {
  color: var(--fg);
}

/* ---------- Stat tiles ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}

.stat-tile {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.stat-tile .stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  margin: 0 0 0.35rem;
  /* Reserves room for two lines on every tile, not just the ones that
     actually wrap ("Pages served (all-time)") — otherwise a wrapped
     label pushes its .stat-value down relative to single-line siblings. */
  min-height: calc(0.7rem * 1.3 * 2);
}

.stat-tile .stat-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--fg);
}

.stat-tile .stat-value.is-live {
  color: var(--accent);
}

/* ---------- Comparison table ---------- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.compare-table td.this-site {
  color: var(--green);
  font-family: var(--font-mono);
}

.compare-table td.bloated {
  color: var(--fg-muted);
  font-family: var(--font-mono);
}

.table-source {
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-top: 0.75rem;
}

/* ---------- CTA ---------- */

.cta {
  text-align: center;
  padding: 4rem 0 4.5rem;
}

.cta h2 {
  font-size: 1.9rem;
}

.btn {
  display: inline-block;
  margin-top: 1.2rem;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.hero-alt {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.cta-lede {
  margin: 0 auto;
}

/* ---------- Content pages ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.feature-card .price {
  margin: 0 0 0.75rem;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.feature-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.feature-card li + li {
  margin-top: 0.35rem;
}

.site-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.75rem;
}

.site-list li {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}

.site-list a {
  font-family: var(--font-mono);
  font-weight: 600;
}

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

.plain-list {
  max-width: 62ch;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--fg-muted);
}

.plain-list li + li {
  margin-top: 0.6rem;
}

.plain-list strong {
  color: var(--fg);
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  max-width: 70ch;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1.2rem 1rem 3.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.section .feature-grid {
  margin-top: 0.5rem;
}

.faq {
  max-width: 70ch;
  display: grid;
  gap: 0.6rem;
}

.faq details {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1.1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details[open] summary {
  margin-bottom: 0.5rem;
}

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

blockquote.callout {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .site-header nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.3rem 0.75rem;
  }

  .site-header nav a {
    margin: 0;
    font-size: 0.85rem;
  }

  .footer-nav {
    gap: 0.5rem 1.25rem;
  }

  .footer-nav a + a::before {
    content: none;
  }
}
