/* assets/style.css */
:root {
  --text: #111;
  --muted: #666;
  --line: #eee;
  --bg: #fff;
  --card-bg: #fafafa;
  --accent-bg: #f6f8fb;
  --accent-line: #dbe4f0;
}

* { box-sizing: border-box; }

html, body { width: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 18px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-weight: 650;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.2px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  margin-left: 12px;
  font-size: 14px;
}

.nav a:hover { color: var(--text); }

h1 { font-size: 30px; margin: 18px 0 10px; line-height: 1.25; }
h2 { font-size: 20px; margin: 22px 0 10px; line-height: 1.3; }
h3 { font-size: 16px; margin: 16px 0 8px; line-height: 1.35; color: var(--text); }

p { margin: 10px 0; }

.list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }

.list a {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
}

.list a:hover { background: #fafafa; }

.meta {
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 12px;
}

.footer-links a:hover { color: var(--text); }

article .disclaimer {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ---------------------------------------
   Article content
---------------------------------------- */
.article-content {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Prevent any child from forcing horizontal overflow */
.article-content * {
  max-width: 100%;
}

/* Tighten typography a bit */
.article-content p {
  margin: 10px 0;
}

.article-content h2 {
  margin-top: 22px;
}

.article-content h3 {
  margin-top: 16px;
}

/* Lists: consistent spacing + guardrails */
.article-content ul,
.article-content ol {
  margin: 12px 0;
  padding-left: 1.2rem;
  padding-inline-start: 1.2rem;
  list-style-position: outside;
}

.article-content li {
  margin: 6px 0;
}

/* Stop nested lists from compounding indentation too much */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
  margin: 6px 0;
  padding-left: 1.2rem;
  padding-inline-start: 1.2rem;
}

/* HARD GUARDRAIL:
   If a bad article leaks everything into a list, reduce the visual "drift" by
   limiting padding on very deep nesting (you should still fix HTML at source). */
.article-content ul ul ul,
.article-content ol ol ol,
.article-content ul ul ul ul,
.article-content ol ol ol ol {
  padding-left: 1.0rem;
  padding-inline-start: 1.0rem;
}

/* Make emphasis readable but not “sticky” */
.article-content strong { font-weight: 650; }
.article-content em { font-style: italic; }

/* If any pre/code blocks exist, don't force horizontal scrolling */
.article-content pre {
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Links inside article content */
.article-content a {
  color: var(--text);
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: #000;
}

/* ---------------------------------------
   80 Engagement Engine blocks
---------------------------------------- */
.ee80-box,
.ee80-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 18px 0;
  background: var(--card-bg);
}

.ee80-box {
  background: var(--accent-bg);
  border-color: var(--accent-line);
}

.ee80-box h2,
.ee80-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.ee80-box p,
.ee80-card p {
  margin: 8px 0 10px;
  color: var(--muted);
}

.ee80-box ul,
.ee80-card ul {
  margin: 8px 0 0;
  padding-left: 1.15rem;
  padding-inline-start: 1.15rem;
}

.ee80-box li,
.ee80-card li {
  margin: 6px 0;
}

.ee80-box a,
.ee80-card a {
  color: var(--text);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.ee80-box a:hover,
.ee80-card a:hover {
  color: #000;
}

/* Slight visual breathing room if inserted near headings */
.article-content .ee80-box + h2,
.article-content .ee80-card + h2 {
  margin-top: 24px;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .wrap { padding: 16px; }

  h1 { font-size: 26px; }
  h2 { font-size: 19px; }
  h3 { font-size: 16px; }

  .article-content ul,
  .article-content ol {
    padding-left: 1.0rem;
    padding-inline-start: 1.0rem;
  }

  .ee80-box,
  .ee80-card {
    padding: 13px 14px;
    margin: 16px 0;
    border-radius: 10px;
  }

  .ee80-box h2,
  .ee80-card h2 {
    font-size: 17px;
  }
}