/* Hydra theme family: classic. Re-skin per site by changing ONLY the variables below, using the variation printed by
   tools/assign_theme.py (the home page's own colours win when it has them). Everything else stays identical. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand:      #0f8b8d;   /* accent: links, underline of current menu item */
  --brand-dark: #0b6e70;
  --ink:        #1e2a2f;   /* header bar, headings */
  --accent2:    #e07a1f;   /* example boxes */
  --bg:         #f2f6f6;
  --bg-card:    #ffffff;
  --bg-alt:     #e6eded;
  --text:       #1a2224;
  --muted:      #56636a;
  --border:     #d3dfe0;
  --radius:     10px;
  --space:      0.9;         /* spacing scale: 0.9 tight ... 1.2 airy */
  --font-body:  'Open Sans', sans-serif;
  --font-head:  'Libre Baskerville', serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.75; }
a { color: var(--brand-dark); }

/* Header: logo + pillars as plain text links (never buttons) */
header { background: var(--ink); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: #fff; text-decoration: none; }
header nav ul { list-style: none; display: flex; gap: 26px; }
header nav ul li a { display: block; padding: 6px 0; color: rgba(255,255,255,0.82); font-weight: 500; font-size: 0.92rem; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
header nav ul li a:hover, header nav ul li a[aria-current="page"] { color: #fff; border-bottom-color: var(--brand); }
@media (max-width: 900px) {
  .header-inner { height: auto; flex-wrap: wrap; padding: 10px 16px 8px; gap: 8px; }
  .header-inner nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .header-inner nav::-webkit-scrollbar { display: none; }
  header nav ul { gap: 20px; }
  header nav ul li a { padding: 4px 0; font-size: 0.86rem; }
}

/* Home page only: hero */
.hero { background: var(--ink); color: #fff; padding: 56px 24px 46px; text-align: center; }
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.25; margin-bottom: 18px; }
.hero .lede { font-size: 1.05rem; color: rgba(255,255,255,0.85); max-width: 680px; margin: 0 auto 20px; }
.hero .byline { justify-content: center; color: rgba(255,255,255,0.65); }
.hero .byline a { color: rgba(255,255,255,0.85); }

/* Articles and pillars: light header block with the toplist inside */
.article-head { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 22px 24px 6px; }
.article-head-inner { max-width: 800px; margin: 0 auto; }
.breadcrumb { margin: 0 0 14px; color: var(--muted); font-size: 0.8rem; }
.article .breadcrumb ol, .breadcrumb ol { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { text-decoration: none; }
.article-head h1 { font-family: var(--font-head); font-size: clamp(1.55rem, 3.4vw, 2.25rem); line-height: 1.25; color: var(--ink); margin-bottom: 10px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.lede { font-size: 1.06rem; line-height: 1.7; margin-bottom: 18px; }
.toplist-wrap { margin: 0 0 18px; }

/* Body */
section { padding: calc(30px * var(--space)) 24px calc(36px * var(--space)); }
.content-wrap { max-width: 800px; margin: 0 auto; }
.article h2 { font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 1.85rem); color: var(--ink); margin: calc(34px * var(--space)) 0 16px; padding-bottom: 10px; border-bottom: 3px solid var(--brand); }
.article h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--ink); margin: 22px 0 10px; }
.article p { margin-bottom: calc(14px * var(--space)); }
.article ol, .article ul { margin: 0 0 16px 22px; }
.article li { margin-bottom: 6px; }
.table-scroll { overflow-x: auto; margin-bottom: 8px; }
.article table { width: 100%; border-collapse: collapse; background: var(--bg-card); font-size: 0.92rem; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: var(--ink); color: #fff; }
.source-line { font-size: 0.82rem; color: var(--muted); }
.example-box { background: var(--bg-card); border-left: 4px solid var(--accent2); padding: 14px 18px; border-radius: var(--radius); margin: 12px 0 16px; }

/* Pillar pages: list of guides (hidden while empty) */
.hub-children { max-width: 800px; margin: 0 auto; padding: 0 24px 24px; }
.aside-title { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.hub-children ul, .guide-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0 !important; padding: 0; }
.hub-children li a, .guide-list a { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; color: var(--ink); text-decoration: none; font-weight: 600; }
.hub-children li a:hover, .guide-list a:hover { border-color: var(--brand); color: var(--brand-dark); }
.hub-children:has(ul:empty) { display: none; }

/* Author box (person author only) and author page */
.author-box { max-width: 800px; margin: 0 auto 24px; padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box p { margin: 0 0 4px; }
.author-name a { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.author-role { font-size: 0.82rem; color: var(--brand-dark); font-weight: 600; }
.author-text { font-size: 0.9rem; color: var(--muted); }
.author-profile { display: flex; gap: 22px; align-items: center; margin-bottom: 18px; }
.author-profile img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
@media (max-width: 900px) { .author-box { margin: 0 16px 24px; } }

/* Sources and footer */
.sources { max-width: 800px; margin: 0 auto; padding: 0 24px 36px; font-size: 0.85rem; color: var(--muted); }
.sources ul { margin-left: 20px; }
footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 36px 24px; font-size: 0.85rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-logo { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.1rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0; }
.footer-nav a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-badges { display: flex; gap: 8px; margin-bottom: 14px; }
.footer-badge { border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; padding: 2px 8px; font-size: 0.75rem; }
.footer-divider { border: 0; border-top: 1px solid rgba(255,255,255,0.15); margin: 14px 0; }
.footer-disclaimer { font-size: 0.78rem; line-height: 1.6; }

/* Home page section illustrations (flat SVG, home page only) */
.section-illustration { display: block; width: 100%; max-width: 800px; height: auto; margin: 4px 0 24px; border-radius: 16px; }
