html {
  color-scheme: dark;
  --bg: #090b0f;
  --surface: #12151c;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f5;
  --muted: #8a919c;
  --accent: #34d399;
  --accent-dim: rgba(52, 211, 153, 0.12);
  --radius: 12px;
  --max: 720px;
  --prose: 680px;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", var(--font-body);
  --header-bg: rgba(9, 11, 15, 0.85);
  --noise-opacity: 0.035;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #059669;
  --accent-dim: rgba(5, 150, 105, 0.14);
  --header-bg: rgba(255, 255, 255, 0.92);
  --noise-opacity: 0.018;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='Noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23Noise)'/%3E%3C/svg%3E");
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.theme-toggle {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  border-color: rgba(52, 211, 153, 0.35);
}

html[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(5, 150, 105, 0.35);
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.nav-mini a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 16px;
}

.nav-mini a:first-child {
  margin-left: 0;
}

.nav-mini a:hover {
  color: var(--text);
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.back-row {
  margin-bottom: 28px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.back:hover {
  text-decoration: underline;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 12px;
}

.page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: var(--prose);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.tags span {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

html[data-theme="light"] .tags span {
  border-color: rgba(5, 150, 105, 0.22);
}

section.block {
  margin-bottom: 44px;
}

section.block h2 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.prose {
  color: var(--muted);
  max-width: var(--prose);
}

.prose p {
  margin-bottom: 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul {
  margin: 12px 0 0 1.15em;
}

.prose li {
  margin-bottom: 8px;
}

.arch-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
  overflow-x: auto;
  white-space: pre;
  margin-top: 12px;
}

.strengths-wrap {
  margin-top: 8px;
  max-width: var(--prose);
}

.strengths-card {
  padding: 22px 24px;
}

.pc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pc-card ul {
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.pc-card li {
  position: relative;
  padding-left: 1em;
  margin-bottom: 10px;
}

.pc-card.pros-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

footer.case-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}
