/* InfoHub50 shared stylesheet - light theme, mobile-first, WCAG-friendly */
:root {
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --brand-soft: #eff6ff;
  --on-brand: #ffffff;
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #5b6472;
  --line: #e3e7ee;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --focus: #b45309;
  --maxw: 1180px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 60; }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.16rem; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto;
  background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}
.brand-sub { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; line-height: 1.1; }
.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .7rem; font-size: .9rem; color: var(--ink-soft); cursor: pointer;
}
.primary-nav { display: none; width: 100%; }
.primary-nav.open { display: block; }
.primary-nav ul { list-style: none; margin: 0 0 .8rem; padding: .4rem 0 0; border-top: 1px solid var(--line); }
.primary-nav li { margin: 0; }
.primary-nav a { display: block; padding: .55rem .2rem; color: var(--ink-soft); font-size: .95rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.primary-nav a[aria-current="page"] { color: var(--brand-dark); }
.header-actions { display: none; align-items: center; gap: .75rem; margin-left: auto; }
.header-actions .search-link, .header-actions .cta { font-size: .9rem; font-weight: 600; }
.header-actions .cta { background: var(--brand); color: var(--on-brand); padding: .5rem .85rem; border-radius: 8px; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .primary-nav { display: block; width: auto; }
  .primary-nav ul { display: flex; gap: 1.1rem; border: 0; padding: 0; margin: 0; }
  .primary-nav a { border: 0; padding: .3rem 0; font-size: .92rem; }
  .header-actions { display: flex; }
}

/* Hero / home */
.hero { padding: 2.4rem 0 1.6rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--brand-soft), var(--surface)); }
.eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--brand-dark); margin: 0 0 .6rem; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 .8rem; max-width: 20ch; }
.hero p.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 62ch; margin: 0 0 1.2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; font-size: .84rem; color: var(--muted); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--line); padding: .2rem .55rem; border-radius: 999px; }

main { padding: 2rem 0 3.5rem; min-height: 55vh; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.2rem; flex-wrap: wrap; }
.section-head h2 { font-size: 1.45rem; letter-spacing: -.02em; margin: 0; }
.section-head .more { font-size: .88rem; font-weight: 600; }

/* Cards */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 620px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16,24,40,.10); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-alt); }
.card-body { padding: 1rem 1.05rem 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); }
.card h3 { font-size: 1.12rem; line-height: 1.32; letter-spacing: -.015em; margin: 0; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--brand-dark); }
.card p { margin: 0; font-size: .92rem; color: var(--muted); }
.card-meta { margin-top: auto; padding-top: .5rem; font-size: .78rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; }

.featured { display: grid; gap: 1.25rem; margin-bottom: 2.2rem; }
@media (min-width: 860px) { .featured { grid-template-columns: 1.35fr 1fr; } }
.featured .lead-card img { aspect-ratio: 16 / 9; }
.featured .lead-card h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.side-list { display: grid; gap: .85rem; align-content: start; }
.side-item { border-bottom: 1px solid var(--line); padding-bottom: .8rem; }
.side-item:last-child { border-bottom: 0; }
.side-item h3 { font-size: 1rem; margin: 0 0 .25rem; line-height: 1.35; }
.side-item a { color: var(--ink); }

/* Breadcrumbs */
.breadcrumbs { font-size: .82rem; color: var(--muted); margin: 0 0 1.2rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.breadcrumbs li::after { content: "/"; margin-left: .4rem; color: #aab2bf; }
.breadcrumbs li:last-child::after { content: ""; }

/* Article */
.article { max-width: 760px; margin: 0 auto; }
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; margin-bottom: 1.6rem; }
.article-header h1 { font-size: clamp(1.9rem, 4.4vw, 2.85rem); line-height: 1.14; letter-spacing: -.035em; margin: 0 0 .8rem; }
.standfirst { font-size: 1.14rem; color: var(--ink-soft); margin: 0 0 1rem; line-height: 1.6; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .84rem; color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 0; }
.tag-row a { font-size: .76rem; background: var(--surface-alt); border: 1px solid var(--line); color: var(--ink-soft); padding: .22rem .6rem; border-radius: 999px; }

.figure { margin: 1.6rem 0; }
.figure img { width: 100%; max-height: 680px; object-fit: contain; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--line); }
.figure figcaption { font-size: .82rem; color: var(--muted); margin-top: .5rem; line-height: 1.5; }
.figure figcaption .credit { display: block; font-size: .76rem; color: #7a8493; margin-top: .2rem; overflow-wrap: anywhere; }
.hero-figure { margin: 0 0 1.6rem; }
.hero-figure img { width: 100%; border-radius: var(--radius); }

.prose h2 { font-size: 1.5rem; letter-spacing: -.02em; margin: 2.2rem 0 .7rem; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.18rem; margin: 1.6rem 0 .5rem; scroll-margin-top: 90px; }
.prose p { margin: 0 0 1.15rem; }
.prose ul { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose code { background: var(--surface-alt); padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
.editorial-note {
  margin: 0 0 1.5rem; padding: .85rem 1rem; border-left: 4px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 8px 8px 0; font-size: .9rem; color: var(--ink-soft);
}
.editorial-note p { margin: 0; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 1.4rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: .82rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .6rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-alt); }

.key-takeaways { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.8rem 0; }
.key-takeaways h2 { margin-top: 0; font-size: 1.2rem; }

.related-box { border-top: 1px solid var(--line); margin-top: 2.4rem; padding-top: 1.4rem; }
.related-box h2 { margin-top: 0; }
.related-box ul { padding-left: 1.2rem; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: .4rem; flex-wrap: wrap; margin: 2.4rem 0 0; }
.pagination a, .pagination span {
  min-width: 40px; text-align: center; padding: .5rem .7rem; border: 1px solid var(--line);
  border-radius: 8px; font-size: .9rem; color: var(--ink-soft); background: var(--surface);
}
.pagination a:hover { border-color: var(--brand); text-decoration: none; }
.pagination .current { background: var(--brand); color: var(--on-brand); border-color: var(--brand); font-weight: 700; }
.pagination .disabled { opacity: .45; }

/* Search */
.search-panel { max-width: 720px; }
.search-field { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.search-field input[type="search"] {
  flex: 1 1 260px; padding: .8rem 1rem; font-size: 1rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink);
}
.search-field button { padding: .8rem 1.2rem; border: 0; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-weight: 700; cursor: pointer; }
.search-status { color: var(--muted); font-size: .9rem; }
.search-results { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.search-results li { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.search-results h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.search-results p { margin: 0; font-size: .9rem; color: var(--muted); }

/* Forms */
.form-grid { display: grid; gap: 1rem; max-width: 640px; }
.form-grid label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: .98rem; background: var(--surface); color: var(--ink);
}
.form-grid textarea { min-height: 150px; resize: vertical; }
.form-grid .checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.form-grid .checkbox input { width: auto; margin-top: .3rem; }
.form-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.btn-primary { background: var(--brand); color: var(--on-brand); border: 0; border-radius: 8px; padding: .8rem 1.3rem; font-weight: 700; cursor: pointer; font-size: .98rem; }
.btn-secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 8px; padding: .8rem 1.1rem; font-weight: 600; }
.form-note { font-size: .84rem; color: var(--muted); max-width: 62ch; }
.notice-card { background: var(--brand-soft); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; padding: .9rem 1.1rem; margin: 0 0 1.6rem; font-size: .9rem; }

/* Policy / static page */
.static-page { max-width: 780px; }
.static-page h2 { font-size: 1.4rem; margin: 2rem 0 .6rem; }
.static-page h3 { font-size: 1.12rem; margin: 1.4rem 0 .5rem; }
.static-page ul { padding-left: 1.3rem; }
.static-page li { margin-bottom: .45rem; }
.toc { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.3rem; margin: 1.4rem 0 2rem; }
.toc h2 { font-size: 1rem; margin: 0 0 .5rem; }
.toc ol { margin: 0; padding-left: 1.3rem; font-size: .9rem; }

/* Category chips */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); padding: .4rem .8rem; border-radius: 999px; font-size: .86rem; font-weight: 600; }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* 404 */
.error-page { text-align: center; padding: 4rem 0; }
.error-page h1 { font-size: clamp(3rem, 12vw, 6rem); margin: 0; letter-spacing: -.06em; color: var(--brand); }
.error-page p { color: var(--muted); font-size: 1.05rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-alt); padding: 2.6rem 0 1.6rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 1.8rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-col h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .8rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .45rem; font-size: .9rem; }
.footer-col a { color: var(--ink-soft); }
.footer-about p { font-size: .9rem; color: var(--muted); max-width: 38ch; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.2rem; font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: space-between; }
.footer-bottom a { color: var(--muted); }

/* Cookie notice */
.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 120;
  max-width: 720px; margin: 0 auto; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(16,24,40,.18);
  padding: 1.1rem 1.2rem; display: none; gap: .9rem; align-items: flex-start;
}
.cookie-notice.show { display: flex; }
.cookie-notice p { margin: 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.55; }
.cookie-notice .cookie-actions { display: flex; gap: .5rem; flex-wrap: wrap; flex: 0 0 auto; }
.cookie-notice button { border-radius: 8px; padding: .55rem .9rem; font-size: .86rem; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.cookie-notice button.accept { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .cookie-notice, .pagination, .nav-toggle { display: none !important; }
  body { font-size: 12pt; }
}
