/* BroadbandInsights.co.uk – main stylesheet
   Phase 2: premium editorial, mobile-first, accessible */

:root {
  --color-bg: #f5f6f7;
  --color-bg-elevated: #ffffff;
  --color-bg-card: #ffffff;
  --color-bg-muted: #eef0f2;
  --color-text: #1a1d21;
  --color-text-muted: #4b5563;
  --color-text-soft: #6b7280;
  --color-accent: #0c6359;
  --color-accent-hover: #0a5048;
  --color-accent-light: #dcece9;
  --color-accent-badge: #0c6359;
  --color-border: #dde0e4;
  --color-border-strong: #c5cad1;
  --color-focus: #0c6359;
  --color-footer-bg: #152a28;
  --color-footer-text: #e5e7eb;
  --color-footer-link: #7dd3c8;
  --color-footer-muted: rgba(255,255,255,0.65);
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-s: 0.5rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-card: 8px;
  --radius-lg: 10px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-subtle: 0 2px 8px rgba(0,0,0,0.04);
  --line-height-tight: 1.3;
  --line-height-body: 1.6;
  --max-width-content: 720px;
  --max-width-wide: 1100px;
  --header-height: 3.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -3rem;
  left: var(--space-m);
  padding: var(--space-s) var(--space-m);
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: var(--space-m);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding-left: var(--space-m);
  padding-right: var(--space-m);
}

.container--narrow {
  max-width: var(--max-width-content);
}

/* Header & nav */
.site-header {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-top: var(--space-m);
  padding-bottom: var(--space-m);
  position: relative;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo:hover {
  color: var(--color-accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: var(--space-s) var(--space-m);
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.nav a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.nav a[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 600;
  background: var(--color-accent-light);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-card);
  color: var(--color-text);
  cursor: pointer;
  font-size: 1.25rem;
}
.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
  outline: none;
}
.nav-toggle[aria-expanded="true"] {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-card-hover);
    padding: var(--space-m);
    display: none;
  }
  .nav-wrapper.is-open { display: block; }
  .nav { flex-direction: column; align-items: stretch; }
  .nav li { border-bottom: 1px solid var(--color-border); }
  .nav li:last-child { border-bottom: 0; }
  .nav a { padding: var(--space-m); border-radius: var(--radius-sm); }
}
@media (min-width: 768px) {
  .nav-wrapper { display: block; }
}

/* Main content */
main {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  min-height: 60vh;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: var(--line-height-tight);
  margin-top: 0;
  margin-bottom: var(--space-m);
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: var(--space-l); }
h2 { font-size: clamp(1.35rem, 3vw, 1.6rem); margin-top: var(--space-xl); padding-top: var(--space-l); border-top: 1px solid var(--color-border); }
h2:first-of-type { margin-top: var(--space-l); padding-top: 0; border-top: 0; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p {
  margin-top: 0;
  margin-bottom: var(--space-m);
}

.lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-l);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--color-accent-hover);
}
a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Buttons & CTAs */
.btn {
  display: inline-block;
  padding: var(--space-m) var(--space-l);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover,
.btn--primary:active {
  background: var(--color-accent-hover);
  color: #fff;
}
.btn--secondary {
  background: var(--color-bg-card);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn--secondary:hover,
.btn--secondary:active {
  background: var(--color-accent-light);
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn:focus {
  outline: none;
}
.btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
  pointer-events: none;
}

/* Inverse / dark-surface button variants */
.btn--inverse {
  background: #fff;
  color: var(--color-accent);
  border: 2px solid #fff;
}
.btn--inverse:hover,
.btn--inverse:active {
  background: var(--color-accent-light);
  color: var(--color-accent-hover);
  border-color: var(--color-accent-light);
}
.btn--ghost-dark {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn--ghost-dark:hover,
.btn--ghost-dark:active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: #fff;
}

/* Explicit button link states to prevent generic anchor rules from overriding contrast */
a.btn.btn--primary:visited,
a.btn.btn--primary:hover,
a.btn.btn--primary:active,
a.btn.btn--primary:focus,
a.btn.btn--primary:focus-visible {
  color: #fff;
}
a.btn.btn--secondary:visited,
a.btn.btn--secondary:hover,
a.btn.btn--secondary:active,
a.btn.btn--secondary:focus,
a.btn.btn--secondary:focus-visible {
  color: var(--color-accent-hover);
}
a.btn.btn--inverse:visited,
a.btn.btn--inverse:hover,
a.btn.btn--inverse:active,
a.btn.btn--inverse:focus,
a.btn.btn--inverse:focus-visible {
  color: var(--color-accent-hover);
}
a.btn.btn--ghost-dark:visited,
a.btn.btn--ghost-dark:hover,
a.btn.btn--ghost-dark:active,
a.btn.btn--ghost-dark:focus,
a.btn.btn--ghost-dark:focus-visible {
  color: #fff;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  margin-top: var(--space-l);
}

/* Cards */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-l);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-accent);
}

.card__title {
  margin-bottom: var(--space-s);
  font-size: 1.1rem;
}
.card__title a {
  color: var(--color-text);
  text-decoration: none;
}
.card__title a:hover {
  color: var(--color-accent);
}
.card__meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-s);
}
.card__desc {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

.card-grid {
  display: grid;
  gap: var(--space-l);
}
@media (min-width: 640px) {
  .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Hero */
.hero {
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-xl);
}
.hero__inner {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1fr 340px; align-items: start; gap: var(--space-2xl); }
}
.hero__content { max-width: 42rem; }
.hero--center .hero__content { text-align: center; margin-left: auto; margin-right: auto; }
.hero--center .hero__sub { margin-left: auto; margin-right: auto; }
.hero__title {
  margin-bottom: var(--space-m);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
}
.hero__sub {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 36em;
  margin-bottom: var(--space-l);
  line-height: 1.6;
}
.hero__cred {
  font-size: 0.875rem;
  color: var(--color-text-soft);
  margin-top: var(--space-m);
}
.hero__panel {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-l);
  box-shadow: var(--shadow-subtle);
}
.hero__panel-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-m);
}
.hero__panel-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero__panel-links li { margin-bottom: var(--space-xs); }
.hero__panel-links a {
  display: block;
  padding: var(--space-s) 0;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}
.hero__panel-links a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}
.hero__panel-links a::before { content: "→ "; color: var(--color-accent); font-weight: 600; }

/* Stat / signal strip */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-l) 0;
  margin-bottom: var(--space-xl);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.stat-strip__item {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
.stat-strip__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* Icon circle (replaces emoji for consistent look) */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  flex-shrink: 0;
}
.icon-circle svg { width: 1.15rem; height: 1.15rem; }

/* Badge / chip */
.badge {
  display: inline-block;
  padding: var(--space-2xs) var(--space-s);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
}

/* Choose your route – pathway cards */
.route-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}
@media (min-width: 500px) {
  .route-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .route-grid { grid-template-columns: repeat(3, 1fr); }
}
.route-card {
  display: block;
  padding: var(--space-l);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.route-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
}
.route-card:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.route-card__title {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}
.route-card__title::after {
  content: " →";
  color: var(--color-accent);
  font-weight: 500;
}
.route-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* What we cover – pillar blocks */
.pillar-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}
@media (min-width: 500px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .pillar-grid { grid-template-columns: repeat(3, 1fr); }
}
.pillar-card {
  padding: var(--space-l);
  background: var(--color-bg-muted);
  border-radius: var(--radius-card);
  border: 1px solid transparent;
}
.pillar-card__title {
  margin: 0 0 var(--space-s);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}
.pillar-card__title a { color: inherit; text-decoration: none; }
.pillar-card__title a:hover { color: var(--color-accent); text-decoration: underline; }
.pillar-card__desc { margin: 0; font-size: 0.9375rem; color: var(--color-text-muted); }

/* Quick action grid */
.action-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .action-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .action-grid { grid-template-columns: repeat(3, 1fr); }
}

.action-card {
  display: block;
  padding: var(--space-l);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.action-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
}
.action-card:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.action-card__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--space-s);
  color: var(--color-accent);
}
.action-card__title {
  margin-bottom: var(--space-xs);
  font-size: 1rem;
  color: var(--color-text);
}
.action-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.action-card__meta {
  margin-top: var(--space-s);
  padding-top: var(--space-s);
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-soft);
}
.action-card__next {
  margin-top: var(--space-s);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
}
.action-card__next::before { content: "Next: "; font-weight: 500; color: var(--color-text-muted); }

/* Pathway list */
.pathway-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-s);
}
.pathway-list a {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-m);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}
.pathway-list a:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}
.pathway-list a::after {
  content: "→";
  margin-left: auto;
  color: var(--color-accent);
}

/* Trust strip / panel */
.trust-strip {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.trust-strip__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 var(--space-m);
  color: var(--color-text);
}
.trust-strip ul {
  margin: 0 0 var(--space-m);
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.trust-strip p {
  margin-bottom: var(--space-s);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.trust-strip p:last-child {
  margin-bottom: 0;
}
.trust-strip .trust-strip__links {
  margin-top: var(--space-m);
  font-size: 0.9375rem;
}

/* Wider network section */
.network-grid {
  display: grid;
  gap: var(--space-l);
}
@media (min-width: 640px) {
  .network-grid { grid-template-columns: repeat(2, 1fr); }
}

.network-card {
  padding: var(--space-l);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.network-card__title {
  font-size: 1rem;
  margin-bottom: var(--space-s);
}
.network-card__title a {
  color: var(--color-text);
  text-decoration: none;
}
.network-card__title a:hover {
  color: var(--color-accent);
}
.network-card__desc {
  font-size: 0.9375rem;
  margin-bottom: var(--space-m);
}
.network-card__link {
  font-size: 0.875rem;
  font-weight: 600;
}
.network-card__badge {
  display: inline-block;
  margin-bottom: var(--space-s);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-soft);
}
.network-by-category { margin-bottom: var(--space-l); }
.network-by-category .section-title { margin-top: var(--space-2xl); }

/* Final CTA strip – dark accent background */
.cta-strip {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) var(--space-l);
  background: var(--color-footer-bg);
  color: #fff;
  border-radius: var(--radius-card);
  text-align: center;
}
.cta-strip p { color: rgba(255,255,255,0.85); }
.cta-strip a { color: #fff; }
.cta-strip__title {
  margin: 0 0 var(--space-m);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.cta-strip__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m);
  margin-top: var(--space-l);
}

/* FAQ */
.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.faq-list li {
  margin-bottom: var(--space-m);
  padding-bottom: var(--space-m);
  border-bottom: 1px solid var(--color-border);
}
.faq-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.faq-list dt {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.faq-list dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* Breadcrumbs */
.breadcrumb {
  margin-bottom: var(--space-l);
  padding: var(--space-s) 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}
.breadcrumb span[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}
.breadcrumb .sep { margin: 0 var(--space-xs); color: var(--color-border-strong); }

/* Article summary block */
.summary-block {
  padding: var(--space-l);
  margin-bottom: var(--space-xl);
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.summary-block p:last-child {
  margin-bottom: 0;
}

/* Next steps */
.next-steps {
  margin-top: var(--space-xl);
  padding: var(--space-l);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.next-steps h3 {
  margin-top: 0;
}

/* Article page – meta bar */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-l);
}
.article-meta span { display: inline-flex; align-items: center; gap: var(--space-xs); }

/* Key takeaways */
.key-takeaways {
  padding: var(--space-l);
  margin-bottom: var(--space-xl);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.key-takeaways h3 {
  margin: 0 0 var(--space-m);
  font-size: 1rem;
  font-weight: 600;
}
.key-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text);
}
.key-takeaways li { margin-bottom: var(--space-xs); }

/* In-this-guide / TOC */
.article-with-sidebar {
  display: block;
}
@media (min-width: 900px) {
  .article-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: var(--space-2xl);
    align-items: start;
  }
  .article-toc {
    position: sticky;
    top: calc(var(--header-height) + var(--space-m));
  }
}
.article-toc {
  padding: var(--space-l);
  background: var(--color-bg-muted);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  font-size: 0.9375rem;
}
.article-toc__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-m);
}
.article-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.article-toc li { margin-bottom: var(--space-xs); }
.article-toc a {
  color: var(--color-text-muted);
  text-decoration: none;
  display: block;
  padding: var(--space-xs) 0;
  border-radius: var(--radius-sm);
}
.article-toc a:hover,
.article-toc a.is-active { color: var(--color-accent); }

/* Why this matters callout */
.callout {
  padding: var(--space-l);
  margin: var(--space-xl) 0;
  border-radius: var(--radius-card);
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-light);
}
.callout__title {
  margin: 0 0 var(--space-s);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}
.callout p:last-child { margin-bottom: 0; }

/* Related content / related glossary */
.related-block {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.related-block h3 { margin-top: 0; margin-bottom: var(--space-m); }
.related-links { list-style: none; margin: 0; padding: 0; }
.related-links li { margin-bottom: var(--space-s); }
.related-links a { text-decoration: none; }
.related-links a:hover { text-decoration: underline; }
.glossary-terms-inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: var(--space-s);
}
.glossary-terms-inline a {
  font-size: 0.875rem;
  padding: var(--space-xs) var(--space-s);
  background: var(--color-bg-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text);
}
.glossary-terms-inline a:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-border);
  z-index: 60;
}
.reading-progress__bar {
  height: 100%;
  background: var(--color-accent);
  width: 0%;
  transition: width 0.1s ease;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: var(--space-l);
  right: var(--space-l);
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 40;
  text-decoration: none;
}
.back-to-top.is-visible { display: flex; }
.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
  outline: none;
}
.back-to-top .visually-hidden { position: absolute; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item__question {
  width: 100%;
  padding: var(--space-m) 0;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-m);
}
.faq-item__question:hover { color: var(--color-accent); }
.faq-item__question:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.faq-item__question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.faq-item[data-open] .faq-item__question::after { content: "−"; }
.faq-item__answer {
  padding: 0 0 var(--space-m);
  display: none;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.faq-item__answer p:last-child { margin-bottom: 0; }
.faq-item[data-open] .faq-item__answer { display: block; }

/* Footer */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-xl) 0 var(--space-l);
  margin-top: var(--space-2xl);
}

.site-footer a {
  color: var(--color-footer-link);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
.footer-group__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-footer-muted);
  margin: 0 0 var(--space-s);
}
.footer-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}
.footer-group li { margin-bottom: var(--space-xs); }
.footer-group a { color: var(--color-footer-link); text-decoration: none; }
.footer-group a:hover { text-decoration: underline; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
  font-size: 0.9375rem;
}

/* Publisher social (SearchSwitchSave) — labels + readable contrast */
.footer-social {
  margin-bottom: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-social__title {
  margin: 0 0 var(--space-s);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-footer-muted);
}
.footer-social__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m) var(--space-l);
  font-size: 0.9375rem;
}
.footer-social__list a {
  color: var(--color-footer-link);
  text-decoration: none;
}
.footer-social__list a:hover {
  text-decoration: underline;
}
.footer-social__list a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  max-width: 60ch;
}
.site-footer .footer-meta {
  color: var(--color-footer-muted);
}
.site-footer .footer-meta a { color: var(--color-footer-link); }

/* Page section titles */
.section-title {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-s);
  font-size: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

/* Disclosure box */
.disclosure {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: var(--space-m);
  background: var(--color-bg);
  border-radius: var(--radius);
  margin: var(--space-l) 0;
}

/* Glossary expandable (optional) */
.glossary-term {
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.glossary-term__title {
  margin: 0 0 var(--space-s);
  font-size: 1.1rem;
}
.glossary-term__body {
  margin: 0;
  font-size: 0.9375rem;
}

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

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Focus visible for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Tool page – problem / when / result cards */
.tool-card {
  padding: var(--space-xl);
  margin-bottom: var(--space-l);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.tool-card__problem {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-s);
}
.tool-card__problem strong { color: var(--color-text); }
.tool-card__what { margin-bottom: var(--space-m); }
.tool-card__when {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-s);
}
.tool-card__result {
  font-size: 0.875rem;
  color: var(--color-text-soft);
  margin-bottom: var(--space-m);
}
.tool-card__cta { margin-top: var(--space-m); }
.tool-card .badge { margin-bottom: var(--space-s); }

/* Page section with optional background */
.page-section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}
.page-section--muted {
  background: var(--color-bg-muted);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: var(--space-m);
  padding-right: var(--space-m);
}
.page-section--muted .container { max-width: var(--max-width-wide); }

/* Glossary index – A–Z / grouped */
.glossary-index-letters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}
.glossary-index-letters a {
  display: block;
  min-width: 2rem;
  padding: var(--space-s);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  border-radius: var(--radius-sm);
}
.glossary-index-letters a:hover,
.glossary-index-letters a[aria-current="page"] {
  background: var(--color-accent-light);
  color: var(--color-accent);
}
.glossary-nav-prevnext {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
}
.glossary-nav-prevnext a { text-decoration: none; }
.glossary-nav-prevnext a:hover { text-decoration: underline; }

/* Editorial byline */
.editorial-byline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-l);
  line-height: 1.6;
}
.editorial-byline a { color: var(--color-accent); text-decoration: none; }
.editorial-byline a:hover { text-decoration: underline; }

/* Answer summary block (for AEO / GEO) */
.answer-summary {
  padding: var(--space-l);
  margin-bottom: var(--space-xl);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  font-size: 0.9375rem;
}
.answer-summary__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-s);
}
.answer-summary p:last-child { margin-bottom: 0; }

/* Disclosure / trust component */
.disclosure-box {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding: var(--space-m) var(--space-l);
  background: var(--color-bg-muted);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}
.disclosure-box p:last-child { margin-bottom: 0; }

/* Trust strip (publisher, review, links) — see TRUST-COMPONENT-SPEC.md */
.content-trust {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  padding: var(--space-m) var(--space-l);
  margin: var(--space-l) 0 var(--space-xl);
  background: var(--color-bg-muted);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content-trust p {
  margin: 0 0 var(--space-s);
}
.content-trust p:last-child {
  margin-bottom: 0;
}
.content-trust a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}
.content-trust a:hover {
  text-decoration: underline;
}
.content-trust--home {
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
}

/* Key takeaways list (guides) */
.key-takeaways {
  margin: 0 0 var(--space-xl);
  padding: var(--space-l);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.key-takeaways__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-m);
}
.key-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
}
.key-takeaways li {
  margin-bottom: var(--space-s);
}
.key-takeaways li:last-child {
  margin-bottom: 0;
}

/* Glossary sections */
.glossary-lead {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-m);
  line-height: var(--line-height-body);
}

/* Visited link safety */
a:visited { color: var(--color-accent-hover); }
.nav a:visited { color: var(--color-text-muted); }
.nav a[aria-current="page"]:visited { color: var(--color-accent); }
.site-footer a:visited { color: var(--color-footer-link); }
.cta-strip a:visited { color: #fff; }
.route-card:visited { color: inherit; }
.action-card:visited { color: inherit; }
.hero__panel-links a:visited { color: var(--color-text); }

/* High-contrast preference support */
@media (forced-colors: active) {
  .btn { border: 2px solid currentColor; }
  .back-to-top { border: 2px solid currentColor; }
  .nav-toggle { border: 2px solid currentColor; }
}

/* Print */
@media print {
  .skip-link,
  .site-header,
  .nav-toggle,
  .cta-group,
  .action-grid,
  .pathway-list,
  .back-to-top,
  .reading-progress { display: none !important; }
  body { background: #fff; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
