/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f7fa;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --text: #1a1f36;
  --text-secondary: #3c4257;
  --text-muted: #6b7294;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --good: #16a34a;
  --good-bg: #f0fdf4;
  --ok: #ca8a04;
  --ok-bg: #fefce8;
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --critical-bg: #fef2f2;
  --high-bg: #fff7ed;
  --medium-bg: #fefce8;
  --low-bg: #eff6ff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--primary-gradient);
  padding: 1rem 0;
}

.site-header > .container,
.site-header > div {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* When inside the hero, the header sits on the gradient seamlessly */
.hero-header {
  background: none;
  padding: 0 0 2.5rem;
  text-align: left;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
}

.logo-icon {
  display: flex;
  align-items: center;
}

.logo-icon svg {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
}

/* ============================================
   MAIN NAV
   ============================================ */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

/* ============================================
   DESKTOP DROPDOWN NAV
   ============================================ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > .nav-link {
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 100;
}

/* Invisible hover bridge so cursor can travel from trigger to menu */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-item {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================
   MOBILE SIDEBAR DROPDOWN
   ============================================ */
.sidebar-dropdown {
  border: none;
  background: none;
}

.sidebar-dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
  transition: background 0.12s;
}

.sidebar-dropdown > summary::-webkit-details-marker {
  display: none;
}

.sidebar-dropdown > summary::after {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7294' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s;
}

.sidebar-dropdown[open] > summary::after {
  transform: rotate(180deg);
}

.sidebar-dropdown > summary:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.sidebar-link-dropdown {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.25rem 0 0.25rem 1rem;
}

.sidebar-sublink {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}

.sidebar-sublink:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-cta {
  color: var(--primary);
  background: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.15rem;
  border-radius: 7px;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn-cta:hover {
  background: #f0f4ff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lang-switcher {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.lang-btn {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.03em;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.lang-btn.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Sidebar language switcher */
.sidebar-lang-switcher {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem 0;
}

.sidebar-lang-switcher .lang-btn {
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.sidebar-lang-switcher .lang-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.sidebar-lang-switcher .lang-btn.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Hamburger button — hidden on desktop */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Animated hamburger → X */
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   MOBILE SIDEBAR OVERLAY
   ============================================ */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s;
}

.mobile-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 1000;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.mobile-sidebar.open {
  right: 0;
}

.mobile-sidebar .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-sidebar .sidebar-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mobile-sidebar .sidebar-logo svg {
  width: 32px;
  height: 32px;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  line-height: 1;
}

.mobile-sidebar .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.mobile-sidebar .sidebar-link {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0.75rem;
  border-radius: 8px;
  transition: background 0.12s;
}

.mobile-sidebar .sidebar-link:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.mobile-sidebar .sidebar-cta {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  padding: 0.8rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.mobile-sidebar .sidebar-cta:hover {
  background: var(--primary-dark);
}

.tagline {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
}

/* ============================================
   MAIN
   ============================================ */
main.has-hero { padding: 0; }
main { flex: 1; padding: 2rem 0; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--white);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: var(--primary);
}

/* ============================================
   HERO / LANDING
   ============================================ */
.hero {
  background: var(--primary-gradient);
  padding: 4rem 0 5rem;
  text-align: center;
  position: relative;
}

/* Decorative floating shapes container */
.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  display: block;
  background: #fff;
  border-radius: 3px;
}

/* Simple named keyframes — no CSS-var dependency inside keyframes */
@keyframes bob1 {
  0%, 100% { transform: translateY(0)    rotate(15deg); }
  50%      { transform: translateY(-18px) rotate(25deg); }
}
@keyframes bob2 {
  0%, 100% { transform: translateY(0)    rotate(-10deg); }
  50%      { transform: translateY(-14px) rotate(-2deg); }
}
@keyframes bob3 {
  0%, 100% { transform: translateY(0)    rotate(40deg); }
  50%      { transform: translateY(-12px) rotate(50deg); }
}
@keyframes bob4 {
  0%, 100% { transform: translate(0, 0)       rotate(5deg); }
  33%      { transform: translate(10px, -14px) rotate(12deg); }
  66%      { transform: translate(-6px, -20px) rotate(18deg); }
}
@keyframes bob5 {
  0%, 100% { transform: translate(0, 0)       rotate(-30deg); }
  33%      { transform: translate(-8px, -10px) rotate(-22deg); }
  66%      { transform: translate(6px, -16px)  rotate(-18deg); }
}
@keyframes bob6 {
  0%, 100% { transform: translateY(0)    rotate(55deg); }
  50%      { transform: translateY(-16px) rotate(62deg); }
}
@keyframes bob7 {
  0%, 100% { transform: translate(0, 0)       rotate(-20deg); }
  50%      { transform: translate(8px, -10px)  rotate(-12deg); }
}
@keyframes bob8 {
  0%, 100% { transform: translateY(0)    rotate(35deg); }
  50%      { transform: translateY(-18px) rotate(42deg); }
}

/*  Row 1 — scattered across the top  */
.shape-1  { width: 18px; height: 18px; top: 8%;  left: 3%;  opacity: 0.18; animation: bob1  7.0s ease-in-out infinite; }
.shape-2  { width: 14px; height: 14px; top: 14%; left: 12%; opacity: 0.13; animation: bob2  9.0s ease-in-out infinite 0.5s; border-radius: 50%; }
.shape-3  { width: 10px; height: 10px; top: 6%;  left: 24%; opacity: 0.15; animation: bob3 11.0s ease-in-out infinite 1.0s; }
.shape-4  { width: 20px; height: 20px; top: 18%; left: 38%; opacity: 0.10; animation: bob4  8.0s ease-in-out infinite 0.3s; border-radius: 5px; }
.shape-5  { width: 12px; height: 12px; top: 5%;  left: 52%; opacity: 0.16; animation: bob5 10.0s ease-in-out infinite 1.5s; border-radius: 50%; }
.shape-6  { width: 16px; height: 16px; top: 12%; left: 68%; opacity: 0.12; animation: bob6  7.5s ease-in-out infinite 0.8s; }
.shape-7  { width: 10px; height: 10px; top: 8%;  left: 82%; opacity: 0.17; animation: bob7  9.0s ease-in-out infinite 2.0s; }
.shape-8  { width: 14px; height: 14px; top: 15%; left: 94%; opacity: 0.13; animation: bob8 12.0s ease-in-out infinite 0.2s; }

/*  Row 2 — middle band  */
.shape-9  { width:  8px; height:  8px; top: 40%; left: 2%;  opacity: 0.22; animation: bob7  8.0s ease-in-out infinite 1.2s; border-radius: 50%; }
.shape-10 { width: 22px; height: 22px; top: 48%; left: 9%;  opacity: 0.09; animation: bob4 10.0s ease-in-out infinite 0.7s; border-radius: 5px; }
.shape-11 { width:  6px; height:  6px; top: 35%; left: 20%; opacity: 0.24; animation: bob5  6.0s ease-in-out infinite 1.8s; border-radius: 50%; }
.shape-12 { width: 12px; height: 12px; top: 50%; left: 75%; opacity: 0.11; animation: bob1 11.0s ease-in-out infinite 0.4s; }
.shape-13 { width:  8px; height:  8px; top: 42%; left: 88%; opacity: 0.19; animation: bob3  7.0s ease-in-out infinite 2.5s; }
.shape-14 { width: 16px; height: 16px; top: 38%; left: 96%; opacity: 0.12; animation: bob6  9.0s ease-in-out infinite 1.1s; }

/*  Row 3 — bottom band  */
.shape-15 { width: 14px; height: 14px; top: 72%; left: 5%;  opacity: 0.16; animation: bob5 10.0s ease-in-out infinite 0.6s; }
.shape-16 { width: 10px; height: 10px; top: 80%; left: 18%; opacity: 0.20; animation: bob2  8.0s ease-in-out infinite 1.4s; border-radius: 50%; }
.shape-17 { width: 20px; height: 20px; top: 78%; left: 32%; opacity: 0.10; animation: bob4 12.0s ease-in-out infinite 0.9s; border-radius: 5px; }
.shape-18 { width:  8px; height:  8px; top: 85%; left: 60%; opacity: 0.18; animation: bob1  7.0s ease-in-out infinite 2.2s; border-radius: 50%; }
.shape-19 { width: 16px; height: 16px; top: 75%; left: 78%; opacity: 0.14; animation: bob8  9.5s ease-in-out infinite 0.3s; }
.shape-20 { width: 12px; height: 12px; top: 88%; left: 92%; opacity: 0.17; animation: bob3 11.0s ease-in-out infinite 1.7s; }

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: #93c5fd;
}

.hero .subtitle {
  font-size: 1.15rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
}

.hero .description {
  color: rgba(255,255,255,0.7);
  margin-bottom: 2.5rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Form card floating over the hero */
.form-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.06);
}

.form-card .form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-align: left;
}

.form-card .form-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.url-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s;
}

.url-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.url-input::placeholder {
  color: #a0a6ba;
}

.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* Inline button variant for report page */
.btn-inline {
  width: auto;
  display: inline-block;
}

.form-errors .error {
  color: var(--bad);
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* ============================================
   CHECKS OVERVIEW
   ============================================ */
.checks-overview {
  padding: 3rem 0 2rem;
}

.checks-overview h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  color: var(--text);
}

.checks-overview .section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.checks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.check-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: box-shadow 0.15s, transform 0.15s;
}

.check-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.check-card .check-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.check-card .check-icon svg {
  width: 20px;
  height: 20px;
}

.check-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-weight: 600;
}

.check-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   RECENT AUDITS
   ============================================ */
.recent {
  padding: 2rem 0;
}

.recent h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.recent-list {
  list-style: none;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.recent-list li {
  border-bottom: 1px solid var(--border);
}

.recent-list li:last-child {
  border-bottom: none;
}

.recent-list a {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s;
}

.recent-list a:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.recent-list .timestamp {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex: 1;
  text-align: right;
  margin-right: 1rem;
}

.score-pill {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}

.score-pill small {
  font-weight: 500;
  opacity: 0.7;
  font-size: 0.75em;
}

.score-pill.score-good { background: var(--good-bg); color: var(--good); }
.score-pill.score-ok { background: var(--ok-bg); color: var(--ok); }
.score-pill.score-bad { background: var(--bad-bg); color: var(--bad); }

/* ============================================
   LOADING
   ============================================ */
.loading {
  text-align: center;
  padding: 5rem 0;
}

.loading h1 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.progress-bar {
  max-width: 400px;
  margin: 0 auto 1rem;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.5s ease;
}

#progress-text {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ============================================
   ERROR
   ============================================ */
.error-section {
  text-align: center;
  padding: 5rem 0;
}

.error-section h1 {
  margin-bottom: 0.5rem;
}

.error-section .domain {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.error-box {
  background: var(--bad-bg);
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem auto;
  max-width: 600px;
  color: var(--bad);
}

/* ============================================
   REPORT HEADER
   ============================================ */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.report-header h1 {
  font-size: 1.5rem;
}


/* ============================================
   SCORES GRID (circle gauges)
   ============================================ */
.scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.score-card {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.score-icon {
  display: block;
  margin: 0.4rem auto 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.score-icon svg {
  width: 100%;
  height: 100%;
}

.score-card.score-good .score-icon { color: var(--good); }
.score-card.score-ok .score-icon { color: var(--ok); }
.score-card.score-bad .score-icon { color: var(--bad); }

.score-card h3 {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 600;
}

/* Overall score highlight */
.score-card.score-overall {
  border-width: 2px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.score-card.score-overall.score-good { border-color: var(--good); }
.score-card.score-overall.score-ok { border-color: var(--ok); }
.score-card.score-overall.score-bad { border-color: var(--bad); }

a.score-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

a.score-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Report category sections */
.report-section {
  margin-bottom: 2rem;
  scroll-margin-top: 1.5rem;
}

.report-section > h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  width: 1.3em;
  height: 1.3em;
  flex-shrink: 0;
}

.report-section.score-good > h2 { border-bottom-color: var(--good); color: var(--good); }
.report-section.score-ok > h2 { border-bottom-color: var(--ok); color: var(--ok); }
.report-section.score-bad > h2 { border-bottom-color: var(--bad); color: var(--bad); }

.report-section.score-good .issue-card { border-left-color: var(--good); }
.report-section.score-good .severity-tag { background: var(--good-bg); color: var(--good); }
.report-section.score-ok .issue-card { border-left-color: var(--ok); }
.report-section.score-ok .severity-tag { background: var(--ok-bg); color: #a16207; }
.report-section.score-bad .issue-card { border-left-color: var(--bad); }
.report-section.score-bad .severity-tag { background: var(--critical-bg); color: var(--bad); }

/* Ring gauge */
.score-ring {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto;
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring .ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.score-ring .ring-fg {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.8s ease;
}

.score-card.score-good .ring-fg { stroke: var(--good); }
.score-card.score-ok .ring-fg { stroke: var(--ok); }
.score-card.score-bad .ring-fg { stroke: var(--bad); }

.ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.score-card.score-good .ring-value { color: var(--good); }
.score-card.score-ok .ring-value { color: var(--ok); }
.score-card.score-bad .ring-value { color: var(--bad); }

/* ============================================
   ISSUES
   ============================================ */
.issues-summary {
  margin-bottom: 2rem;
}

.issues-summary h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.severity-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge.critical { background: var(--critical-bg); color: var(--bad); border: 1px solid #fecaca; }
.badge.high { background: var(--high-bg); color: #c2410c; border: 1px solid #fed7aa; }
.badge.medium { background: var(--medium-bg); color: #a16207; border: 1px solid #fef08a; }
.badge.low { background: var(--low-bg); color: #1d4ed8; border: 1px solid #bfdbfe; }

.top-issues { margin-bottom: 2rem; }
.top-issues h2 { margin-bottom: 1rem; font-size: 1.25rem; }

.issues-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.issue-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.issue-card.critical { border-left: 4px solid var(--bad); }
.issue-card.high { border-left: 4px solid #ea580c; }
.issue-card.medium { border-left: 4px solid var(--ok); }
.issue-card.low { border-left: 4px solid #3b82f6; }

.issue-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.issue-header h3 {
  font-size: 0.95rem;
  color: var(--text);
}

.severity-tag {
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.severity-tag.critical { background: var(--critical-bg); color: var(--bad); }
.severity-tag.high { background: var(--high-bg); color: #c2410c; }
.severity-tag.medium { background: var(--medium-bg); color: #a16207; }
.severity-tag.low { background: var(--low-bg); color: #1d4ed8; }

.evidence {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-family: "SF Mono", Menlo, monospace;
  background: var(--surface-2);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.fix {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.issue-card.small {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.issue-card.small .fix {
  width: 100%;
  margin-top: 0.25rem;
}

/* ============================================
   DETAIL SECTIONS
   ============================================ */
.detail-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.detail-section h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* W3C validation messages */
.w3c-messages {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
}

.w3c-msg {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  flex-wrap: wrap;
}

.w3c-msg.w3c-error { background: var(--critical-bg); }
.w3c-msg.w3c-warning { background: var(--medium-bg); }

.w3c-type {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.w3c-error .w3c-type { color: var(--bad); }
.w3c-warning .w3c-type { color: #a16207; }

.w3c-text {
  color: var(--text-secondary);
}

.w3c-extract {
  width: 100%;
  font-size: 0.75rem;
  background: var(--surface-2);
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
}

.text-success { color: var(--good); font-weight: 500; }
.text-danger { color: var(--bad); font-weight: 500; }
.text-warning { color: var(--ok); font-weight: 500; }

/* ============================================
   PAGES SECTION
   ============================================ */
.pages-section { margin-bottom: 2rem; }
.pages-section h2 { margin-bottom: 1rem; font-size: 1.25rem; }

.page-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.page-detail summary {
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-detail summary:hover {
  background: var(--surface-2);
  border-radius: 10px;
}

.page-url {
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--primary);
}

.page-issues-count {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  margin-left: 1rem;
}

.page-signals {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.page-signals table {
  width: 100%;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.page-signals td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.page-signals td:first-child {
  color: var(--text-muted);
  width: 40%;
}

.page-signals h4 {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.page-signals ul {
  list-style: none;
  font-size: 0.8rem;
}

.page-signals li {
  padding: 0.2rem 0;
  color: var(--text-secondary);
}

.page-issues {
  padding: 0 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-actions {
  text-align: center;
  padding: 2rem 0;
}

/* ============================================
   INNER PAGE HERO (resources, best practices, contact)
   ============================================ */
.page-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.page-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ============================================
   CONTENT SECTIONS (inner pages)
   ============================================ */
.content-section {
  padding: 0 0 3rem;
}

/* Resource cards grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.resource-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: box-shadow 0.15s, transform 0.15s;
}

.resource-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.resource-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.resource-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

a.resource-card-link {
  text-decoration: none;
  border: 1px dashed var(--primary);
}

a.resource-card-link:hover {
  border-style: solid;
}

/* Resource hub page cards */
.resource-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.resource-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.resource-hub-card:hover {
  box-shadow: 0 6px 24px rgba(37,99,235,0.10);
  transform: translateY(-3px);
  border-color: var(--primary);
}

.resource-hub-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background 0.2s, color 0.2s;
}

.resource-hub-card:hover .resource-hub-icon {
  background: var(--primary);
  color: #fff;
}

.resource-hub-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.resource-hub-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.resource-hub-arrow {
  display: inline-flex;
  align-items: center;
  margin-top: 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}

.resource-hub-card:hover .resource-hub-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Glossary */
.glossary-content {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  max-width: 1040px;
  margin: 0 auto;
  align-items: start;
}

.glossary-toc {
  position: sticky;
  top: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1rem 1.15rem 1.5rem;
}

.glossary-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.glossary-toc li {
  padding: 0;
}

.glossary-toc a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}

.glossary-toc a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.glossary-sections > section {
  margin-bottom: 2.5rem;
}

.glossary-sections > section > h2 {
  font-size: 1.15rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.glossary-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.glossary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  transition: box-shadow 0.15s, transform 0.15s;
}

.glossary-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.glossary-card dfn {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.glossary-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.glossary-card code {
  font-size: 0.8rem;
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--text-secondary);
}

/* FAQ section */
.faq-section {
  background: #0f1a2e;
  padding: 3.5rem 0;
  margin-top: 3rem;
}

.faq-section h2 {
  color: #fff;
  font-size: 1.75rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.faq-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-top: 1px solid rgba(255,255,255,0.12);
}

.faq-item:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 1.15rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b87b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item p {
  margin: 0;
  padding: 0 0 1.25rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 600px;
}

/* Newsletter section */
.newsletter-section {
  background: var(--surface-2);
  padding: 3rem 0;
  text-align: center;
}

.newsletter-section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.newsletter-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-size: 0.95rem;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.newsletter-input::placeholder {
  color: #a0a6ba;
}

.newsletter-btn {
  width: auto;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

.newsletter-privacy {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.75rem;
}

.newsletter-msg {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.newsletter-msg.success {
  color: var(--good);
}

.newsletter-msg.error {
  color: var(--bad);
}

/* Best practices numbered list */
.practices-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.practice-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: box-shadow 0.15s;
}

.practice-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.practice-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.practice-item h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.practice-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Contact card */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.contact-card > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-list li strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.contact-list li p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Legal pages (imprint, privacy) */
.legal-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.legal-content h4 {
  font-size: 0.9rem;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.legal-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-content ul {
  margin: 0.5rem 0 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-content li {
  margin-bottom: 0.35rem;
}

/* ============================================
   FAQ PAGE (light theme)
   ============================================ */
.faq-page-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-page-group {
  margin-bottom: 2.5rem;
}

.faq-page-group h2 {
  font-size: 1.15rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.faq-page-item {
  border-top: 1px solid var(--border);
}

.faq-page-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-page-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  list-style: none;
}

.faq-page-item summary::-webkit-details-marker {
  display: none;
}

.faq-page-item summary::after {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7294' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s;
}

.faq-page-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-page-item p {
  margin: 0;
  padding: 0 0 1.15rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

/* ============================================
   GUIDE LAYOUT
   ============================================ */
.guide-content {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  max-width: 1040px;
  margin: 0 auto;
  align-items: start;
}

.guide-toc {
  position: sticky;
  top: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1rem 1.15rem 1.5rem;
}

.guide-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  counter-reset: toc;
}

.guide-toc li {
  padding: 0;
  counter-increment: toc;
}

.guide-toc a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}

.guide-toc a::before {
  content: counter(toc) ". ";
  color: var(--text-muted);
}

.guide-toc a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.guide-chapters {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.guide-chapter {
  scroll-margin-top: 1.5rem;
}

.guide-chapter h2 {
  font-size: 1.15rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.guide-chapter p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.guide-tip {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
}

.guide-tip strong {
  display: block;
  font-size: 0.85rem;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.guide-tip p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   BLOG GRID
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: box-shadow 0.15s, transform 0.15s;
}

.blog-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.blog-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.blog-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-card .blog-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============================================
   BLOG CARD LINKS
   ============================================ */
a.blog-card-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

a.blog-card-link:hover {
  border-color: var(--primary);
}

a.blog-card-link h3 {
  color: var(--text);
}

a.blog-card-link:hover h3 {
  color: var(--primary);
}

.blog-read-more {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

a.blog-card-link:hover .blog-read-more {
  text-decoration: underline;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 1.5rem 0 0;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span:last-child {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   BLOG ARTICLE PAGE
   ============================================ */
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.article-meta time {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.blog-article-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.article-excerpt {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.article-excerpt strong {
  display: block;
  font-size: 0.9rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.article-excerpt ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-excerpt li {
  margin-bottom: 0.25rem;
}

.article-body h2 {
  font-size: 1.15rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-body h3 {
  font-size: 1rem;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.article-body ul,
.article-body ol {
  margin: 0.5rem 0 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-body li {
  margin-bottom: 0.35rem;
}

.article-body code {
  background: var(--surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

.article-body pre {
  background: var(--surface-2);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0.75rem 0 1rem;
}

.article-body pre code {
  background: none;
  padding: 0;
}

.article-cta {
  background: var(--primary-gradient);
  color: #fff;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0 2rem;
}

.article-cta h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.article-cta p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.article-cta .btn-cta {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.article-cta .btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-back-nav {
  padding-top: 1rem;
}

.article-back-nav a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.article-back-nav a:hover {
  text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: hide CTA button, keep nav */
@media (max-width: 860px) {
  .btn-cta { display: none; }
  .main-nav { gap: 0; }
  .nav-link { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
}

/* Mobile: hide desktop nav, show hamburger + sidebar */
@media (max-width: 640px) {
  .main-nav { display: none; }
  .lang-switcher { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero h1 { font-size: 1.75rem; }
  .hero .subtitle { font-size: 1rem; }
  .hero { padding: 3rem 0 4rem; }
  .hero-header { padding: 0 0 1.5rem; }
  .form-card { padding: 1.5rem; margin: 0 1rem; }
  .report-header { flex-direction: column; text-align: center; }
  .checks-grid { grid-template-columns: 1fr 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-hub-grid { grid-template-columns: 1fr; }
  .resource-hub-card { padding: 1.5rem; }
  .resource-hub-arrow { opacity: 1; transform: translateX(0); }
  .glossary-content { grid-template-columns: 1fr; }
  .glossary-toc { position: static; }
  .glossary-toc ol { flex-direction: row; flex-wrap: wrap; gap: 0.25rem; }
  .glossary-toc a { font-size: 0.78rem; padding: 0.25rem 0.5rem; background: var(--surface-2); }
  .glossary-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .practice-item { flex-direction: column; gap: 0.75rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
  .legal-content { padding: 1.5rem; }

  /* Guide responsive */
  .guide-content { grid-template-columns: 1fr; }
  .guide-toc { position: static; }
  .guide-toc ol { flex-direction: row; flex-wrap: wrap; gap: 0.25rem; }
  .guide-toc a { font-size: 0.78rem; padding: 0.25rem 0.5rem; background: var(--surface-2); }

  /* Blog responsive */
  .blog-grid { grid-template-columns: 1fr; }

  /* Blog article responsive */
  .blog-article-content { padding-left: 1rem; padding-right: 1rem; }
  .article-excerpt { padding: 1rem 1.15rem; }
  .article-cta { padding: 1.5rem; }
  .breadcrumb { padding-left: 1rem; padding-right: 1rem; }
}

/* ============================================
   AI SIMULATION STYLES
   ============================================ */
.confidence-bar {
  display: inline-block;
  width: 80px;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.confidence-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.conf-good { background: var(--good); }
.conf-ok { background: var(--ok); }
.conf-bad { background: var(--bad); }

.confidence-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hallucination-indicator {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.hallucination-indicator.risk-low {
  background: var(--good-bg);
  color: var(--good);
  border: 1px solid #bbf7d0;
}

.hallucination-indicator.risk-medium {
  background: var(--ok-bg);
  color: #a16207;
  border: 1px solid #fef08a;
}

.hallucination-indicator.risk-high {
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid #fecaca;
}

.question-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.question-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.question-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.question-table tbody tr:last-child td {
  border-bottom: none;
}

.question-table tbody tr:hover {
  background: var(--surface-2);
}

.text-muted {
  color: var(--text-muted);
}
