:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-light: #334155;
  --muted: #64748b;
  --primary: #16a34a;
  --primary-dark: #15803d;
  --secondary: #2563eb;
  --danger: #ef4444;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  line-height: 1.7;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

body > header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border) !important;
  padding: 14px 0;
  margin-bottom: 28px;
}

article > header {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
}

article > header h1 {
  color: var(--text) !important;
}

article > header p,
article > header time,
article > header div,
article > header small {
  color: var(--text-light) !important;
}

body > header a {
  color: var(--text) !important;
}

body > header a span {
  color: var(--primary) !important;
}

body > header nav a {
  color: var(--muted) !important;
  text-decoration: none !important;
}

body > header nav a:hover {
  color: var(--text) !important;
  text-decoration: underline !important;
}

.container a {
  color: var(--secondary);
}

.logo {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo::before {
  content: "";
  width: 34px;
  height: 34px;
  background:
    linear-gradient(var(--surface) 0 0) center / 2px 14px no-repeat,
    linear-gradient(var(--surface) 0 0) center / 14px 2px no-repeat,
    var(--primary);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  display: inline-block;
}

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

h1 {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  color: var(--text) !important;
  font-size: clamp(1.9rem, 3vw, 2.6rem) !important;
  margin-bottom: 18px;
  line-height: 1.15;
}

h2 {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 800 !important;
  color: var(--secondary) !important;
  font-size: 1.55rem !important;
  margin: 32px 0 14px;
  line-height: 1.25;
}

h3 {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  font-size: 1.15rem !important;
  margin: 20px 0 12px;
  line-height: 1.25;
}

p {
  color: var(--text-light) !important;
  margin-bottom: 14px;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

ul,
ol {
  padding-left: 1.25rem;
  margin-bottom: 18px;
}

li {
  margin: 0.35rem 0;
  color: var(--text-light);
}

:where(
  .highlight,
  .article-nav,
  .protocol,
  .protocol-box,
  .macro-box,
  .metric-box,
  .metric-card,
  .management,
  .monitoring,
  .mechanism,
  .phase,
  .story,
  .meal-card,
  .workout-card,
  .table-container,
  .comparison,
  .protocol-table,
  .checklist,
  .severity-scale,
  .caution-box,
  .alert,
  .important,
  .warning,
  .yes-box,
  .no-box,
  .step
) {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px;
  margin: 18px 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.highlight {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.07), rgba(37, 99, 235, 0.04));
  border-left: 4px solid var(--primary);
}

.protocol,
.protocol-box,
.protocol-table {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
  border-left: 4px solid var(--secondary);
}

.do,
.dos,
.yes-box,
.safe {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.08), rgba(22, 163, 74, 0.02));
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin: 12px 0;
}

.dont,
.donts,
.no-box,
.critical,
.severe {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.09), rgba(239, 68, 68, 0.02));
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin: 12px 0;
}

.cta,
.btn-primary {
  background: var(--primary);
  color: var(--surface);
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

.cta:hover,
.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.article-nav a {
  display: inline-block;
  margin-right: 14px;
  font-weight: 700;
}

.table-container,
.comparison {
  overflow-x: auto;
}

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 26px 0;
  margin-top: 48px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  header {
    padding: 12px 0;
    margin-bottom: 22px;
  }

  h1 {
    font-size: 1.8rem;
  }
}
