/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --black: #000;
  --white: #fff;
  --grey-50: #fafafa;
  --grey-100: #f3f3f3;
  --grey-200: #e8e8e8;
  --grey-300: #d1d1d1;
  --grey-400: #a3a3a3;
  --grey-600: #525252;
  --sidebar-w: 260px;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 0;
  --transition: 0.2s ease;
}

/* ── Dark Mode ────────────────────────────────────────────── */
[data-theme="dark"] {
  --black: #e8e8e8;
  --white: #111111;
  --grey-50: #181818;
  --grey-100: #202020;
  --grey-200: #2e2e2e;
  --grey-300: #3e3e3e;
  --grey-400: #6a6a6a;
  --grey-600: #a0a0a0;
}
[data-theme="dark"] img:not(.sidebar-logo-img):not(.mobile-nav-logo):not(.user-nav-avatar) {
  opacity: 0.88;
}
[data-theme="dark"] .modal-card { box-shadow: 0 20px 60px rgba(0,0,0,.6); }
[data-theme="dark"] .resource-card-coming-soon { background: #fff; color: #000; opacity: 1; }

/* ── Dark mode full button ────────────────────────────────── */
.dark-mode-full-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--grey-600); padding: 8px 4px; text-align: left;
  transition: color var(--transition);
  white-space: nowrap; overflow: hidden;
}
.dark-mode-full-btn:hover { color: var(--black); }
.dark-mode-full-btn i { font-size: 16px; flex-shrink: 0; }
.dark-mode-full-btn span { transition: opacity 0.15s ease; }

html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: 0.7; }
img { max-width: 100%; }
code, pre { font-family: var(--font-mono); }

/* ── Layout ───────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow: hidden;
  border-right: 1.5px solid var(--grey-200);
  background: var(--white);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: width 0.22s ease, transform var(--transition);
}
.sidebar-header {
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--grey-200);
  display: flex;
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: 100%;
}
.sidebar-logo-img {
  width: 34px; height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0;
}
.sidebar-logo-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.15s ease, width 0.22s ease;
}
.sidebar-lite-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  background: var(--black);
  padding: 2px 6px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.15s ease, width 0.22s ease;
}
.sidebar-nav { padding: 12px 8px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-400);
  padding: 8px 12px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.15s ease;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 0;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--grey-600);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), padding var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}
.nav-link i { font-size: 16px; flex-shrink: 0; }
.nav-link span { overflow: hidden; transition: opacity 0.15s ease; }
.nav-link:hover { background: var(--grey-100); color: var(--black); }
.nav-link.active { background: var(--black); color: var(--white); }
.sidebar-footer {
  padding: 16px 16px 24px;
  flex-shrink: 0;
}
.sidebar-footer-author {
  padding-bottom: 0;
  overflow: hidden;
  transition: opacity 0.15s ease;
}
.sidebar-footer-divider {
  border: none;
  border-top: 1.5px solid var(--grey-200);
  margin: 12px 0;
  transition: opacity 0.15s ease;
}
.sidebar-footer-text {
  font-size: 11px;
  color: var(--grey-400);
  line-height: 1.5;
  white-space: nowrap;
}

/* ── Main ─────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  transition: margin-left 0.22s ease;
}

/* ── Mobile Header ────────────────────────────────────────── */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--grey-200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
  gap: 10px;
}
.mobile-header-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.mobile-nav-logo { width: 32px; height: 32px; object-fit: contain; display: none; flex-shrink: 0; }
.mobile-header-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-menu-btn {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--black);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}
.sidebar-overlay.visible { display: block; }

/* ── Prose Content ────────────────────────────────────────── */
.content-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 48px 80px;
}
.page-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-400);
  margin-bottom: 12px;
}
.page-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.page-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--grey-600);
  margin-bottom: 40px;
  font-weight: 400;
}
.prose h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
.prose h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 8px;
}
.prose p {
  margin-bottom: 18px;
  font-size: 15.5px;
  line-height: 1.75;
}
.prose ul, .prose ol {
  margin: 0 0 18px 20px;
}
.prose li {
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 6px;
}
.prose strong { font-weight: 700; }
.divider {
  border: none;
  border-top: 1.5px solid var(--grey-200);
  margin: 40px 0;
}

/* ── Callout Block ────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--black);
  background: var(--grey-50);
  padding: 18px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}
.callout p { margin: 0; font-size: 15px; }
.callout .callout-stat {
  font-size: 28px;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition);
  border: 1.5px solid transparent;
}
.btn:hover { opacity: 0.8; }
.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-secondary {
  background: var(--white);
  color: var(--black);
  border-color: var(--black);
}
.btn-sm { height: 34px; padding: 0 10px; font-size: 13px; }

/* ── Tags / Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-solid { background: var(--black); color: var(--white); }
.badge-outline { background: var(--white); color: var(--black); border: 1.5px solid var(--black); }
.badge-grey { background: var(--grey-100); color: var(--grey-600); border: 1.5px solid var(--grey-200); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--grey-100);
  color: var(--grey-600);
  border: 1px solid var(--grey-200);
}
/* Audience tag color variants */
.tag-blind        { background: #f0f0f0; color: #444;    border-color: #d0d0d0; }
.tag-vi-mild      { background: #ddeeff; color: #1a5c99; border-color: #b3d4f5; }
.tag-vi-severe    { background: #b8d6f0; color: #0d3d70; border-color: #7db0da; }
.tag-hoh          { background: #d0f0ee; color: #1a6460; border-color: #8ecfcc; }
.tag-motor-mild   { background: #d4f5f9; color: #0b5860; border-color: #7dd8e3; }
.tag-motor-severe { background: #e8d8f5; color: #5a2a85; border-color: #c4a3e0; }
.tag-neurodiverse { background: #fff0d0; color: #7a4800; border-color: #f0cc80; }
.tag-elderly      { background: #d6f0d6; color: #1f6b1f; border-color: #8fd08f; }
/* Role pill variants */
.role-pill {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px;
  border-radius: 0;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  white-space: nowrap;
}
.role-pill-designers     { background: #ede9fe; color: #5b21b6; }
.role-pill-design-system { background: #ffedd5; color: #9a3412; }
.role-pill-content-team  { background: #cffafe; color: #155e75; }
.role-pill-engineering   { background: #dcfce7; color: #166534; }
/* Guideline list: roles column */
.guideline-roles-col {
  display: flex; flex-wrap: wrap; gap: 4px;
  align-items: center; flex-shrink: 0;
  padding-right: 28px;
}
/* Detail hero: vertical separator between badges and role pills */
.meta-separator {
  display: inline-block; width: 1px; height: 18px;
  background: var(--grey-300); flex-shrink: 0;
}

/* ── Filter drawer toggle button (desktop: hidden) ─────────── */
.gl-filter-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}

/* Filter backdrop overlay (mobile) */
.filter-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 280;
}
.filter-overlay.visible { display: block; }

/* Filter drawer inner chrome (shown only on mobile) */
.filter-drawer-handle {
  display: none;
  width: 36px; height: 4px;
  background: var(--grey-300);
  border-radius: 0;
  margin: 0 auto 16px;
}
.filter-drawer-title-row { display: block; }
.filter-drawer-close-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--grey-600);
  align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
}
.filter-drawer-close-btn:hover { color: var(--black); }

/* ── Mobile fixed-bottom detail nav ────────────────────────── */
.mobile-detail-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 310;
  background: var(--white);
  border-top: 1.5px solid var(--grey-200);
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  display: none; /* always hidden on desktop */
}
@media (max-width: 640px) {
  .mobile-detail-nav.visible { display: flex; }
}

/* ── Home Page ────────────────────────────────────────────── */
.home-hero {
  padding: 72px 64px 56px;
  border-bottom: 1.5px solid var(--grey-200);
  max-width: 100%;
}
.home-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-400);
  margin-bottom: 20px;
}
.home-title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.home-title span { display: block; }
.home-subtitle {
  font-size: 17px;
  color: var(--grey-600);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 32px;
}
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1.5px solid var(--grey-200);
}
.stat-item {
  padding: 28px 40px;
  border-right: 1.5px solid var(--grey-200);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: block;
}
.stat-label {
  font-size: 13px;
  color: var(--grey-400);
  font-weight: 500;
  margin-top: 2px;
}

/* ── Chapter Cards Grid ───────────────────────────────────── */
.chapters-section { padding: 48px 64px 64px; }
.section-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-400);
  margin-bottom: 24px;
}
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.chapter-card {
  border: 1.5px solid var(--grey-200);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
  background: var(--white);
  display: block;
}
.chapter-card:hover {
  border-color: var(--black);
  box-shadow: 4px 4px 0 var(--black);
  transform: translate(-2px, -2px);
}
.chapter-card-header {
  height: 100px;
  background: var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border-bottom: 1.5px solid var(--grey-200);
}
.chapter-card-body { padding: 20px; }
.chapter-card-number {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-400);
  margin-bottom: 6px;
}
.chapter-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.chapter-card-desc {
  font-size: 13.5px;
  color: var(--grey-600);
  line-height: 1.6;
}

/* ── Info Cards / Pillars ─────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.info-card {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 20px;
}
.info-card-icon {
  font-size: 24px;
  margin-bottom: 12px;
  display: block;
}
.info-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.info-card-desc {
  font-size: 13px;
  color: var(--grey-600);
  line-height: 1.6;
}

/* ── Compliance Levels ────────────────────────────────────── */
.level-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.level-table th, .level-table td {
  padding: 12px 16px;
  text-align: left;
  border: 1.5px solid var(--grey-200);
  font-size: 14px;
}
.level-table th {
  background: var(--grey-50);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── WCAG Guidelines Section ──────────────────────────────── */
/* ── Guidelines Two-Column Layout ─────────────────────────── */
.guidelines-page {
  padding: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Left: Filters column — sticky, non-scrolling (Amazon-style) */
.gl-filters-col {
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--grey-200);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 28px 20px 20px;
}
.guidelines-title {
  font-size: 18px; font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 3px; line-height: 1.25;
}
.guidelines-count {
  font-size: 11.5px;
  color: var(--grey-400);
  font-weight: 500;
  margin-bottom: 20px;
}
.gl-filters-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1.5px solid var(--grey-200);
  flex-shrink: 0;
}

/* Right: Content column — independently scrollable */
.gl-content-col {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.gl-search-bar {
  padding: 14px 28px;
  border-bottom: 1.5px solid var(--grey-200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
  flex-shrink: 0;
}
.guidelines-body { padding: 24px 28px 64px; }

/* ── Filters Area — vertical sidebar layout ────────────────── */
.filters-area { display: flex; flex-direction: column; gap: 0; }
/* Each filter section: label on top, pills below */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1.5px solid var(--grey-100);
}
.filter-section:last-child { border-bottom: none; }
.filter-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-400);
  width: auto; /* override old fixed width */
  flex-shrink: 0;
  padding-top: 0;
}
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Component multiselect dropdown ─────────────────────────── */
.component-dropdown__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border-radius: 0;
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-600);
  cursor: pointer;
  transition: all var(--transition);
  gap: 4px;
  text-align: left;
}
.component-dropdown__trigger:hover { border-color: var(--black); color: var(--black); }
.component-dropdown__trigger.has-selection { background: var(--black); color: var(--white); border-color: var(--black); }
.component-dropdown__trigger i { font-size: 15px; flex-shrink: 0; margin-left: auto; transition: transform var(--transition); }
.component-dropdown.open .component-dropdown__trigger i { transform: rotate(180deg); }
.component-dropdown__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
  margin-top: 6px;
}
.component-dropdown.open .component-dropdown__body { max-height: 320px; }
.component-dropdown__list {
  max-height: 260px;
  overflow-y: auto;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 4px;
}
.component-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-600);
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.component-dropdown__item:hover { background: var(--grey-100); color: var(--black); }
.component-dropdown__item input[type="checkbox"] {
  accent-color: var(--black);
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  cursor: pointer;
}
.component-dropdown__footer { padding: 6px 8px 2px; display: none; }
.component-dropdown__footer.visible { display: block; }
.component-dropdown__clear {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--grey-400);
  cursor: pointer;
  padding: 0;
  transition: color var(--transition);
}
.component-dropdown__clear:hover { color: var(--black); }
.filter-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 0;
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--grey-600);
  transition: all var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.filter-btn i { font-size: 13px; }
.filter-btn:hover { border-color: var(--black); color: var(--black); }
.filter-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }
/* Audience is multi-select — uses .selected instead of .active */
.filter-btn.selected { background: var(--black); color: var(--white); border-color: var(--black); }
.search-wrap {
  position: relative;
  margin-left: 0;
  width: 100%;
}
.search-wrap i {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--grey-400);
  font-size: 16px;
}
.search-input {
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1.5px solid var(--grey-200);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--black); }
.search-wrap i { font-size: 17px; }
.principle-group { margin-bottom: 48px; }
.principle-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--grey-200);
}
.principle-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.principle-count {
  font-size: 13px;
  color: var(--grey-400);
  font-weight: 500;
}
.guidelines-list { display: flex; flex-direction: column; gap: 10px; }
.guideline-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  position: relative;
}
.guideline-row:hover {
  border-color: var(--black);
  box-shadow: 3px 3px 0 var(--black);
  transform: translate(-1px, -1px);
}
.guideline-row-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-300);
  font-size: 18px;
  transition: color var(--transition), transform var(--transition);
}
.guideline-row:hover .guideline-row-arrow {
  color: var(--black);
  transform: translateY(-50%) translateX(2px);
}
.guideline-id-col { width: 68px; flex-shrink: 0; }
.guideline-id {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--grey-400);
}
.guideline-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 20px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.level-a { background: var(--black); color: var(--white); }
.level-aa { background: var(--white); color: var(--black); border: 1.5px solid var(--black); }
.guideline-main { flex: 1; min-width: 0; }
.guideline-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.guideline-name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
}
.not-applicable-tag {
  font-size: 11px;
  color: var(--grey-400);
  display: flex;
  align-items: center;
  gap: 3px;
}
.guideline-desc {
  font-size: 13.5px;
  color: var(--grey-600);
  line-height: 1.6;
  margin-bottom: 8px;
}
.guideline-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey-400);
  font-size: 15px;
}
.no-results i { font-size: 32px; display: block; margin-bottom: 12px; }

/* ── Guideline Detail Page ────────────────────────────────── */
.detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 48px;
  border-bottom: 1.5px solid var(--grey-200);
  gap: 12px;
}
.detail-nav-bar .back-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--grey-600); padding: 0;
}
.detail-nav-bar .back-btn:hover { color: var(--black); }
.detail-prev-next { display: flex; gap: 8px; }
.detail-hero {
  padding: 48px 64px 40px;
  border-bottom: 1.5px solid var(--grey-200);
}
.detail-meta-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.principle-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: 0;
  border: 1.5px solid var(--black);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.level-pill {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 10px;
  border-radius: 0;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
}
.level-pill-a { background: var(--black); color: var(--white); }
.level-pill-aa { background: var(--white); color: var(--black); border: 1.5px solid var(--black); }
.ownership-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 10px;
  border-radius: 0;
  background: var(--grey-100); color: var(--grey-600);
  border: 1.5px solid var(--grey-200);
  font-size: 11px; font-weight: 600;
}
.designer-pill { background: var(--black); color: var(--white); border-color: var(--black); }
.not-applicable-pill { background: var(--grey-100); color: var(--grey-400); border-color: var(--grey-200); }
.detail-hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 12px;
}
.detail-id {
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500; color: var(--black);
  display: block;
}
.detail-title {
  font-size: 34px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 20px;
}
.detail-desc {
  font-size: 17px; line-height: 1.75; color: var(--grey-600);
  max-width: 680px;
}
.detail-body {
  max-width: 760px;
  padding: 44px 64px 72px;
}
.detail-body--wide { max-width: 100%; padding: 44px 48px 72px; }
.detail-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 32px;
}
.detail-col-left { padding-right: 44px; }
.detail-col-right {
  border-left: 1.5px solid var(--grey-200);
  padding-left: 44px;
}
.detail-roles-header {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--grey-400);
  margin-bottom: 24px;
}
.detail-role-heading {
  font-size: 20px; font-weight: 700;
  color: #d4447a;
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}
.detail-role-heading:first-of-type { margin-top: 0; }
.detail-section { margin-bottom: 44px; }
.detail-section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--grey-400);
  margin-bottom: 16px; display: flex; align-items: center; gap: 6px;
}
.detail-section-label i { font-size: 14px; }
.steps-list { display: flex; flex-direction: column; gap: 10px; }
.step-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
}
.step-num {
  width: 22px; height: 22px;
  background: var(--black); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0; margin-top: 1px;
}
.step-text { font-size: 14.5px; line-height: 1.65; }
.pitfalls-list { display: flex; flex-direction: column; gap: 10px; }
.pitfall-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  background: var(--grey-50);
}
.pitfall-item i { font-size: 16px; flex-shrink: 0; margin-top: 2px; color: var(--grey-400); }
.pitfall-text { font-size: 14px; line-height: 1.6; color: var(--grey-600); }
.detail-list { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.detail-list li { font-size: 15px; line-height: 1.7; color: var(--grey-700); }
.detail-context-para { font-size: 16px; line-height: 1.75; color: var(--grey-700); margin-bottom: 16px; }
.detail-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.detail-table th { text-align: left; padding: 8px 12px; background: var(--grey-100); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid var(--grey-200); color: var(--grey-600); }
.detail-table td { padding: 8px 12px; border-bottom: 1px solid var(--grey-200); color: var(--grey-600); line-height: 1.5; }
.detail-table tr:last-child td { border-bottom: none; }
.detail-context-para:last-child { margin-bottom: 0; }
.detail-callout {
  padding: 24px 28px;
  background: var(--white);
  border-left: 3px solid var(--black);
  margin-bottom: 20px;
}
.detail-callout p { font-size: 16px; line-height: 1.7; color: var(--black); margin: 0; }
.detail-figure { margin: 4px 0 24px; }
.detail-img {
  width: 100%; border-radius: var(--radius);
  display: block;
}
.detail-img-caption { font-size: 13px; color: var(--grey-400); margin-top: 8px; line-height: 1.5; }
.detail-audience-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-wcag-ref {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--grey-600);
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid var(--grey-200);
  border-radius: 0;
  transition: border-color var(--transition), color var(--transition);
}
.detail-wcag-ref:hover { border-color: var(--black); color: var(--black); opacity:1; }

/* ── Resource Cards ───────────────────────────────────────── */
.resource-card {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.resource-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.resource-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.resource-desc { font-size: 13.5px; color: var(--grey-600); line-height: 1.6; }

/* ── Impairment Glossary ──────────────────────────────────── */
.impairment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.impairment-item {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.impairment-item-icon { font-size: 20px; margin-bottom: 8px; display: block; }
.impairment-item-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.impairment-item-desc { font-size: 12px; color: var(--grey-600); line-height: 1.5; }

/* ── Full-bleed image (breaks out of content-wrapper max-width) ── */
.full-bleed {
  width: calc(100% + 96px);
  margin-left: -48px;
  margin-right: -48px;
  display: block;
}

/* ── Resource Cards (image-based 2-col grid) ──────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.resource-card-new {
  border: 1.5px solid var(--grey-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
a.resource-card-new:hover {
  border-color: var(--black);
  opacity: 1;
}
.resource-card-coming-soon {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--black);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  pointer-events: none;
}
.resource-card-new--disabled {
  cursor: default;
}
.resource-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--grey-100);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1.5px solid var(--grey-200);
}
.resource-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resource-card-cover-placeholder {
  font-size: 32px;
  color: var(--grey-300);
}
.resource-card-body {
  padding: 18px 20px 20px;
  flex: 1;
}
.resource-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
}
.resource-card-desc {
  font-size: 13px;
  color: var(--grey-600);
  line-height: 1.6;
}

/* ── About Author ─────────────────────────────────────────── */
.author-photo-wrap {
  margin-bottom: 28px;
}
.author-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.author-photo-placeholder {
  width: 120px;
  height: 120px;
  background: var(--grey-100);
  border: 1.5px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--grey-400);
}
.author-avatar {
  width: 80px; height: 80px;
  background: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 32px;
  margin-bottom: 24px;
}

/* ── Back to top / breadcrumb ─────────────────────────────── */
.page-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 48px;
  border-bottom: 1.5px solid var(--grey-200);
  font-size: 13px;
  color: var(--grey-400);
}
.page-nav-bar button {
  background: none; border: none; cursor: pointer;
  color: var(--grey-600);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.page-nav-bar button:hover { color: var(--black); }

/* ── Guideline Drawer ─────────────────────────────────────── */
.guideline-drawer {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none; visibility: hidden;
}
.guideline-drawer.open { pointer-events: auto; visibility: visible; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.25);
  opacity: 0; transition: opacity 0.25s ease;
}
.guideline-drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 60%; background: var(--white);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 32px rgba(0,0,0,0.1);
}
.guideline-drawer.open .drawer-panel { transform: translateX(0); }
.kbd-hint {
  font-size: 11px; color: var(--grey-400);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.kbd-hint kbd {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: var(--grey-100); border: 1px solid var(--grey-200);
  border-radius: 0; font-size: 10px; font-family: var(--font-body);
  color: var(--grey-500);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open { transform: translateX(0) !important; }
  .main-content { margin-left: 0 !important; }
  .mobile-header { display: flex; }
  .home-hero { padding: 40px 24px 36px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1.5px solid var(--grey-200); }
  .chapters-section { padding: 32px 24px 48px; }
  .content-wrapper { padding: 32px 24px 60px; }
  .full-bleed { width: calc(100% + 48px); margin-left: -24px; margin-right: -24px; }
  .resource-grid { grid-template-columns: 1fr; }
  .page-nav-bar { padding: 12px 24px; }
  .page-title { font-size: 28px; }
  .detail-hero { padding: 32px 24px 28px; }
  .detail-body { padding: 28px 24px 48px; }
  .detail-body--wide { padding: 28px 24px 48px; }
  .detail-two-col { grid-template-columns: 1fr; }
  .detail-col-left { padding-right: 0; margin-bottom: 32px; }
  .detail-col-right { border-left: none; border-top: 1.5px solid var(--grey-200); padding-left: 0; padding-top: 32px; }
  .detail-nav-bar { padding: 12px 24px; }
  .detail-title { font-size: 26px; }
  .drawer-panel { width: 92%; }
  .kbd-hint { display: none; }
  /* Guidelines page: stack columns at mobile */
  .guidelines-page { flex-direction: column; height: auto; overflow: visible; }
  .gl-filters-col {
    width: 100%; min-width: 0;
    border-right: none; border-bottom: 1.5px solid var(--grey-200);
    padding: 20px 20px 16px;
    overflow-y: visible;
  }
  .gl-filters-footer { display: none; }
  .gl-content-col { overflow-y: visible; height: auto; min-height: 50vh; }
  .gl-search-bar { padding: 14px 20px; position: sticky; top: 60px; }
  .guidelines-body { padding: 20px 20px 48px; }
  /* Filters: 2-column grid on tablet for the stacked state */
  .gl-filters-col .filters-area { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; }
  .gl-filters-col .filter-section { border-bottom: none; padding: 12px 12px 12px 0; }
  .filter-section-label { font-size: 9px; }
}
@media (max-width: 640px) {
  .mobile-nav-logo { display: block; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1.5px solid var(--grey-200); }
  .stat-item:last-child { border-bottom: none; }
  .home-actions { flex-direction: column; }
  .home-actions .btn { width: 100%; justify-content: center; }
  .guideline-row { flex-direction: column; gap: 8px; }
  .guideline-id-col { width: auto; display: flex; gap: 8px; align-items: center; }

  /* ── Filter drawer (bottom sheet) ── */
  .gl-filters-col {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 290;
    width: auto;
    min-width: 0;
    background: var(--white);
    border-right: none;
    border-bottom: none;
    border-top: 1.5px solid var(--grey-200);
    border-radius: 0 0 0;
    padding: 16px 20px 48px;
    max-height: 82vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.14);
  }
  .gl-filters-col.filters-open { transform: translateY(0); }
  .filter-drawer-handle { display: block; }
  .filter-drawer-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
  .filter-drawer-close-btn { display: flex; }
  .gl-filters-col .filters-area { display: flex; flex-direction: column; gap: 0; }
  .gl-filters-col .filter-section { border-bottom: 1.5px solid var(--grey-100); padding: 10px 0; }
  .gl-filters-footer { display: none; }

  /* ── Search bar row with filter button ── */
  .gl-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .gl-filter-toggle-btn { display: flex; }

  .guidelines-body { padding: 14px 14px 80px; }

  /* ── Detail: full-page on mobile ── */
  .guideline-drawer { z-index: 250; }
  .drawer-backdrop { display: none !important; }
  .drawer-panel {
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-bottom: 72px;
  }

  /* ── Detail nav bar: hide inline top bar ── */
  .detail-nav-bar { display: none; }
}
@media print {
  .sidebar, .mobile-header { display: none !important; }
  .main-content { margin-left: 0; }
}

/* ── Auth & Payment Modals ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: #fff;
  border-radius: 0;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal-logo {
  width: 40px;
  height: 40px;
  border-radius: 0;
  object-fit: contain;
}
.modal-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #000;
}
.modal-subtitle {
  font-size: 14px;
  color: #525252;
  line-height: 1.6;
}
.modal-price-tag {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.modal-price {
  font-size: 32px;
  font-weight: 800;
  color: #000;
}
.modal-price-note {
  font-size: 13px;
  color: #a3a3a3;
}
.modal-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-features li {
  font-size: 14px;
  color: #000;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-features li::before {
  content: "✓";
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  color: #000;
  border: 1.5px solid #d1d1d1;
  border-radius: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn-google:hover { background: #f3f3f3; border-color: #a3a3a3; opacity: 1; }
.btn-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-pay:hover { opacity: 0.85; }
.btn-pay:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 0;
}
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #a3a3a3;
  font-size: 20px;
  padding: 4px;
  line-height: 1;
}
.modal-close-btn:hover { color: #000; }
.modal-card-wrap { position: relative; }
.modal-legal {
  font-size: 12px;
  color: #a3a3a3;
  text-align: center;
}

/* ── User nav chip (signed-in state) ────────────────────── */
.user-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 0;
  background: #f3f3f3;
  cursor: default;
  flex-shrink: 0;
}
.user-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8e8e8;
}
.user-nav-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-nav-signout {
  font-size: 12px;
  color: #a3a3a3;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.user-nav-signout:hover { color: #000; }
.btn-signin-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid #d1d1d1;
  border-radius: 0;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-signin-header:hover { background: #f3f3f3; }
