/* ============================================================
   Dual Dictionary blog — vi/blog/blog.css
   Self-contained: blog pages load ONLY this file (no app css/js).
   Colors copied from the app design tokens (css/style.css :root)
   so the blog reads as the same product. System font stack only.
   ============================================================ */
:root {
  --accent: #0f766e;
  --accent-soft: #14b8a6;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1f2937;
  --text-2: #646b78;
  --border: #e5e7eb;
  --shadow-1: 0 1px 3px rgba(0,0,0,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --surface: #1a1e26;
    --text: #e7eaee;
    --text-2: #9aa3af;
    --border: #2b313c;
    --accent: #2dd4bf;
    --accent-soft: #0f766e;
    --shadow-1: 0 1px 3px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
a:visited { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- article column: one measure, works on phones first ---------- */
article, .page {
  max-width: 70ch;
  margin: 0 auto;
  padding: 20px 20px 8px;
}
h1 { font-size: 1.7rem; line-height: 1.3; margin: .2em 0 .4em; }
h2 { font-size: 1.35rem; line-height: 1.35; margin: 1.8em 0 .5em; }
h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }
img { max-width: 100%; height: auto; border-radius: 10px; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: .95em; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
th { background: var(--surface); }
blockquote {
  margin: 0 0 1em; padding: 4px 16px;
  border-left: 3px solid var(--accent-soft); color: var(--text-2);
}

/* ---------- breadcrumb + byline + TOC ---------- */
.breadcrumb {
  max-width: 70ch; margin: 0 auto; padding: 14px 20px 0;
  font-size: .85rem; color: var(--text-2);
}
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.byline { color: var(--text-2); font-size: .9rem; }
.toc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 20px; margin: 0 0 1.6em; box-shadow: var(--shadow-1);
}
.toc p { margin: .2em 0 .4em; font-weight: 600; }
.toc ul { margin: 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- figures ---------- */
figure { margin: 0 0 1.4em; }
figure img { display: block; margin: 0 auto; box-shadow: var(--shadow-1); }
figcaption {
  text-align: center; font-size: .85rem; color: var(--text-2);
  margin-top: 6px; line-height: 1.5;
}

/* ---------- CTA box: exactly one per page, end of article ---------- */
.cta-box {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 18px 20px; margin: 2em 0; box-shadow: var(--shadow-1);
}
.cta-box p { margin: 0 0 .6em; }
.cta-box p:last-of-type { margin-bottom: 0; }
.cta-button {
  display: inline-block; margin-top: 6px;
  background: var(--accent); color: #fff !important;
  padding: 10px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 600;
}
.cta-button:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .cta-button { color: #06251f !important; } }

/* ---------- author box ---------- */
.author-box {
  max-width: 70ch; margin: 2.4em auto; padding: 18px 20px;
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-1);
  font-size: .95rem; line-height: 1.6;
}
.author-avatar { width: 72px; height: 72px; border-radius: 50%; flex: 0 0 auto; }
.author-info p { margin: 0 0 .5em; }
.author-name { font-weight: 600; }
.author-title { color: var(--text-2); font-weight: 400; }
.author-link { font-size: .9rem; text-decoration: none; }
.author-link:hover { text-decoration: underline; }
@media (max-width: 480px) { .author-box { flex-direction: column; gap: 10px; } }

/* ---------- sources ---------- */
.sources {
  max-width: 70ch; margin: 0 auto 2em; padding: 0 20px;
  font-size: .9rem; color: var(--text-2);
}
.sources h2 { font-size: 1.05rem; margin: 0 0 .5em; }
.sources ol { margin: 0; }

/* ---------- footer ---------- */
.blog-footer {
  max-width: 70ch; margin: 0 auto; padding: 18px 20px 40px;
  border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--text-2);
}

/* ---------- hub (vi/blog/index.html) ---------- */
.hub-intro { margin-bottom: 2em; }
.hub-cats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 2em;
}
@media (max-width: 640px) { .hub-cats { grid-template-columns: 1fr; } }
.cat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-1);
}
.cat-card h2 { margin: 0 0 .4em; font-size: 1.2rem; }
.cat-card p { margin: 0; color: var(--text-2); font-size: .95rem; }
.cat-soon {
  display: inline-block; margin-top: 8px; font-size: .8rem;
  color: var(--text-2); border: 1px dashed var(--border);
  border-radius: 999px; padding: 2px 10px;
}
.post-list { list-style: none; padding: 0; margin: 0 0 2em; }
.post-list li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow-1);
}
.post-list h2 { margin: 0 0 .3em; font-size: 1.15rem; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list .post-meta { font-size: .85rem; color: var(--text-2); margin: 0 0 .4em; }
.post-list p.post-desc { margin: 0; font-size: .95rem; }
