/* Academic Block Writer blog: one small stylesheet, matching the main site's colours and type */
:root {
  --bg: #ffffff;
  --card: #f8fafc;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #374151;
  --heading: #111827;
  --muted: #6b7280;
  --brand: #4f46e5;
  --brand-soft: #4338ca;
  --good: #059669;
  --bad: #dc2626;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--brand-soft); text-underline-offset: 3px; }
a:hover { color: var(--heading); }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .bar { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-header nav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; }
.site-header nav a { color: #374151; text-decoration: none; }
.site-header nav a:hover { color: var(--heading); }
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; background: #4f46e5; color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none; }
.btn:hover { background: var(--brand); }
@media (max-width: 640px) { .site-header nav .hide-sm { display: none; } .brand span { display: none; } }

.site-footer { border-top: 1px solid var(--border); margin-top: 72px; padding: 28px 16px; font-size: 13px; color: #6b7280; }
.site-footer .bar { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--heading); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Article layout */
main { max-width: 740px; margin: 0 auto; padding: 32px 16px 72px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--heading); }
.kicker { font-family: "Fira Code", ui-monospace, monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #4f46e5; }
h1 { color: var(--heading); font-size: clamp(30px, 5vw, 42px); line-height: 1.15; letter-spacing: -.02em; margin: 8px 0 16px; }
h2 { color: var(--heading); font-size: 26px; line-height: 1.25; letter-spacing: -.01em; margin: 56px 0 12px; scroll-margin-top: 80px; }
h3 { color: var(--heading); font-size: 19px; margin: 32px 0 8px; }
p, ul, ol { margin: 0 0 18px; }
li { margin-bottom: 6px; }
.meta { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.lede { font-size: 19px; color: #374151; }
code { font-family: "Fira Code", ui-monospace, monospace; font-size: .88em; background: var(--card); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* The short answer, written to be quoted */
.answer { background: rgba(79, 70, 229, .1); border: 1px solid rgba(99, 102, 241, .35); border-radius: 12px; padding: 20px 22px; margin: 28px 0; }
.answer p:last-child, .answer ul:last-child { margin-bottom: 0; }
.answer strong:first-child { color: var(--heading); }

/* Footnote examples, set like the bottom of a page */
.notes { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 20px 0 24px; font-family: "Times New Roman", Times, serif; font-size: 17px; line-height: 1.5; color: var(--text); }
.notes .fn { display: grid; grid-template-columns: 2.2em 1fr; gap: 0 4px; padding: 5px 0; }
.notes .n { color: var(--muted); font-family: Inter, system-ui, sans-serif; font-size: 13px; padding-top: 3px; }
.notes .why { display: block; font-family: Inter, system-ui, sans-serif; font-size: 13px; color: var(--brand-soft); margin-top: 2px; }
.notes .wrong { display: block; font-family: Inter, system-ui, sans-serif; font-size: 13px; color: var(--bad); margin-top: 2px; }
.notes-label { font-size: 13px; color: var(--muted); margin: -12px 0 24px; }
.notes .ref { padding: 5px 0 5px 2em; text-indent: -2em; }
.notes .ref .why, .notes .ref .wrong { text-indent: 0; }
.notes .ref, .notes .fn > span { overflow-wrap: anywhere; min-width: 0; }
article p, article li { overflow-wrap: break-word; }

/* Contents, checklist, table */
.toc { border-left: 2px solid var(--border-strong); padding: 4px 0 4px 18px; margin: 0 0 32px; font-size: 15px; }
.toc ol { margin: 0; padding-left: 18px; }
.toc a { color: #374151; text-decoration: none; }
.toc a:hover { color: var(--heading); }
.check { list-style: none; padding: 0; }
.check li { position: relative; padding-left: 28px; }
.check li::before { content: "✕"; position: absolute; left: 4px; top: 0; color: var(--bad); font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--heading); background: var(--card); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.serif { font-family: "Times New Roman", Times, serif; font-size: 16px; white-space: nowrap; }

/* FAQ */
details { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: var(--card); }
summary { cursor: pointer; color: var(--heading); font-weight: 600; }
details p { margin: 10px 0 0; }

/* Sources and the product note */
.sources { font-size: 15px; color: var(--muted); }
.cta { margin: 48px 0 0; padding: 22px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--card); }
.cta h2 { margin-top: 0; font-size: 21px; }
.cta p:last-child { margin-bottom: 0; }

/* Blog index: styles > topics > compact rows, so dozens of guides stay scannable */
[hidden] { display: none !important; }
main.index { max-width: 860px; }
.guide-search { margin: 8px 0 8px; }
.guide-search label { display: block; font-size: 14px; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.guide-search input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 14px; }
.guide-search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.guide-search .no-match { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 28px 0 0; }
.style-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--muted); font-size: 14px; line-height: 1.45; }
.style-card strong { color: var(--heading); font-size: 18px; }
.style-card .count { color: var(--brand-soft); margin-top: 6px; }
.style-card:hover { border-color: var(--brand); color: var(--muted); }
.style-section { margin-top: 48px; scroll-margin-top: 80px; }
.style-section > h2 { margin: 0 0 4px; }
.style-full { display: block; font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.style-section > .meta { margin-bottom: 16px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.cat-chips a { font-size: 14px; padding: 5px 12px; border: 1px solid var(--border-strong); border-radius: 999px; color: #374151; text-decoration: none; }
.cat-chips a:hover { border-color: var(--brand); color: var(--heading); }
.cat { scroll-margin-top: 80px; }
.cat h3 { font-family: "Fira Code", ui-monospace, monospace; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #4f46e5; margin: 32px 0 10px; }
.guide-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.guide-list li { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.guide-list li:last-child { border-bottom: 0; }
.guide-list a { color: var(--heading); font-weight: 600; font-size: 17px; line-height: 1.4; text-decoration: none; }
.guide-list a:hover { color: var(--brand-soft); text-decoration: underline; }
.guide-list p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.sc { font-variant: small-caps; }
.shot { margin: 8px 0 28px; }
.shot img { display: block; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; box-sizing: border-box; }
.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
