/* 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:      #e32527;   /* accent: links, underline of current menu item */
  --brand-dark: #b81d1f;
  --ink:        #32489c;   /* header bar, headings */
  --accent2:    #d4990a;   /* example boxes */
  --bg:         #f5f5f5;
  --bg-card:    #ffffff;
  --bg-alt:     #eef2f8;
  --text:       #212529;
  --muted:      #555555;
  --border:     #ddddd5;
  --radius:     12px;
  --space:      1;         /* spacing scale: 0.9 tight ... 1.2 airy */
  --font-body:  'Roboto', sans-serif;
  --font-head:  'Roboto', sans-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; }

/* ---- WordPress migrations only (tools/wp_render.py appends this file to site.css; theme.json "migration_css"). New pages
   built by hand or by Hermes never use these classes. Same variables as above. ---- */
.logo svg { display: block; height: 38px; width: auto; }
/* menu item with a drop-down list (desktop: on hover or focus; phones: the hub page lists its guides) */
header nav ul li.has-sub { position: relative; }
header nav ul li.has-sub > a::after { content: " \25BE"; font-size: 0.75em; }
header nav ul.sub-menu { display: none; position: absolute; top: 100%; left: -16px; min-width: 230px; gap: 0; padding: 8px 0; background: var(--ink); border-top: 2px solid var(--brand); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 10px 22px rgba(0,0,0,0.25); z-index: 110; }
header nav ul li.has-sub:hover > ul.sub-menu, header nav ul li.has-sub:focus-within > ul.sub-menu { display: block; }
header nav ul.sub-menu li a { padding: 7px 16px; border-bottom: 0; }
header nav ul.sub-menu li a:hover { background: rgba(255,255,255,0.08); }
@media (max-width: 900px) { header nav ul.sub-menu, header nav ul li.has-sub:hover > ul.sub-menu, header nav ul li.has-sub:focus-within > ul.sub-menu { display: none; } header nav ul li.has-sub > a::after { content: none; } }
/* blocks the extractor keeps from WordPress (wpm-* classes, mapped in theme.json "migration_classes") */
.note-box { background: var(--bg-card); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 14px 18px 2px; margin: 12px 0 18px; }
.faq-list { margin: 0 0 18px; }
.qa-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 10px; }
.qa-item > summary { cursor: pointer; list-style: none; padding: 12px 40px 12px 16px; font-weight: 600; color: var(--ink); position: relative; }
.qa-item > summary::-webkit-details-marker { display: none; }
.qa-item > summary::after { content: "+"; position: absolute; right: 16px; top: 8px; font-size: 1.4rem; color: var(--brand); }
.qa-item[open] > summary::after { content: "\2212"; }
.qa-item > :not(summary) { margin-left: 16px; margin-right: 16px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 18px; }
.pros-cons > div { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 2px; }
.pros-cons > div > p:first-child { font-family: var(--font-head); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.article .pros-cons ul { list-style: none; margin-left: 0; }
.pros-col { border-top: 4px solid #2e9e44 !important; }
.cons-col { border-top: 4px solid #c62828 !important; }
.pros-col li::before { content: "+ "; color: #2e9e44; font-weight: 700; }
.cons-col li::before { content: "\2212 "; color: #c62828; font-weight: 700; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 8px 0 24px; }
.card-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card-item img { width: 88px; height: 88px; object-fit: contain; }
.article .card-item ul { list-style: none; margin-left: 0; }
.cta-link { display: inline-block; padding: 10px 20px; background: var(--brand); color: #fff !important; font-weight: 600; text-decoration: none; border-radius: var(--radius); }
.cta-link:hover { background: var(--brand-dark); }
.article img { max-width: 100%; height: auto; }
.article figure { margin: 0 0 16px; }
@media (max-width: 700px) { .pros-cons { grid-template-columns: 1fr; } }
/* "Related guides" after the text */
section > .hub-children { padding: 22px 0 0; }   /* the hub's guide list, rendered inside the text section */
.related-guides { max-width: 800px; margin: 28px auto 0; padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--brand); border-radius: var(--radius); }
.related-title { display: block; font-family: var(--font-head); font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.article .related-guides ul { margin: 0 0 0 20px; }
/* trust pages linked in the footer */
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; }
.footer-legal a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.82rem; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }
