:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #b91c1c;
  --accent-dark: #991b1b;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(185, 28, 28, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(15, 23, 42, 0.06), transparent 50%),
    var(--bg);
  line-height: 1.65;
}

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

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

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(248, 250, 252, 0.88);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--accent);
  font-size: 0.9rem;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.hero {
  padding: 3.5rem 0 2rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 1.5rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.article {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  margin-bottom: 2rem;
}

.article h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 2rem 0 0.75rem;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 1.4rem 0 0.5rem;
}

.article p,
.article li {
  color: #334155;
}

.article ul,
.article ol {
  padding-left: 1.2rem;
}

.article li + li {
  margin-top: 0.45rem;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: #fff5f5;
  border-radius: 0 0.75rem 0.75rem 0;
}

.callout strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
}

.cta-box {
  margin: 2rem 0 0;
  padding: 1.25rem;
  border-radius: 1rem;
  background: #0f172a;
  color: #e2e8f0;
}

.cta-box h2 {
  color: #fff;
  margin-top: 0;
}

.cta-box p {
  color: #cbd5e1;
}

.cta-box .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.related {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 3rem;
}

.related h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-size: 1.2rem;
}

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

.related a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem;
  transition: 0.2s ease;
}

.related a:hover {
  border-color: #fecaca;
  box-shadow: 0 8px 20px rgba(185, 28, 28, 0.08);
}

.related a span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.related a strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 1.5rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer .wrap {
  width: min(1100px, calc(100% - 2rem));
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

@media (max-width: 640px) {
  .top-actions .btn-ghost {
    display: none;
  }
}
