:root {
  --navy: #083463;
  --navy-900: #06284f;
  --navy-800: #0b3f73;
  --blue: #3a5c80;
  --steel: #627e9a;
  --sky: #dceaf5;
  --ink: #142235;
  --muted: #64748b;
  --line: #dce3ea;
  --surface: #ffffff;
  --surface-alt: #f5f8fb;
  --surface-soft: #eef4f8;
  --success: #0c7a5a;
  --success-bg: #e8f7f1;
  --danger: #b42318;
  --danger-bg: #fff0ee;
  --warning: #9a6700;
  --warning-bg: #fff8df;
  --shadow-sm: 0 8px 24px rgba(8, 52, 99, .08);
  --shadow-md: 0 18px 50px rgba(8, 52, 99, .13);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --content: 1360px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9999;
  transform: translateY(-160%); background: #fff; color: var(--navy);
  border: 2px solid var(--navy); border-radius: 8px; padding: 10px 14px;
}
.skip-link:focus { transform: translateY(0); }

.container { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-alt { background: var(--surface-alt); }
.eyebrow {
  color: var(--navy); font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; font-size: .76rem;
}
.section-title {
  margin: 8px 0 14px; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08;
  letter-spacing: -.035em; color: var(--navy-900);
}
.section-copy { max-width: 760px; color: var(--muted); font-size: 1.06rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 80; background: rgba(255,255,255,.965);
  backdrop-filter: blur(18px); border-bottom: 1px solid rgba(8,52,99,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { width: 204px; height: auto; object-fit: contain; }
.brand-fallback { color: var(--navy); font-weight: 900; letter-spacing: -.03em; font-size: 1.25rem; }
.brand img + .brand-fallback { display: none; }
.nav {
  display: flex; align-items: center; gap: 3px; margin-left: auto; padding: 5px;
  border: 1px solid #e2eaf0; border-radius: 16px; background: #f5f8fb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.nav a {
  position: relative; text-decoration: none; color: #43566a; padding: 9px 10px; border-radius: 11px;
  font-weight: 760; font-size: .82rem; line-height: 1.2; white-space: nowrap; transition: .18s ease;
}
.nav a:hover { color: var(--navy); background: rgba(255,255,255,.78); box-shadow: 0 3px 10px rgba(8,52,99,.07); }
.nav a[aria-current="page"] { color: var(--navy); background: #fff; box-shadow: 0 5px 15px rgba(8,52,99,.10); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--navy); opacity: .8; }
.header-actions { display: flex; align-items: center; }
.header-search {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px;
  border-radius: 13px; background: var(--navy); color: #fff; text-decoration: none; font-size: .82rem;
  font-weight: 850; box-shadow: 0 8px 20px rgba(8,52,99,.16); white-space: nowrap; transition: .18s ease;
}
.header-search:hover { transform: translateY(-1px); background: var(--navy-900); box-shadow: 0 12px 26px rgba(8,52,99,.22); }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff;
  border-radius: 11px; align-items: center; justify-content: center; color: var(--navy);
}
.mobile-nav {
  position: fixed; inset: 82px 0 0; background: #fff; z-index: 70; padding: 24px;
  overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { display: block; text-decoration: none; padding: 15px 12px; border-bottom: 1px solid var(--line); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 17px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 750; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 18px rgba(8,52,99,.18); }
.btn-primary:hover { background: var(--navy-900); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--navy); }
.btn-secondary:hover { border-color: #b8c8d8; box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(8,52,99,.18); }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: .88rem; }

/* Hero */
.hero {
  position: relative; overflow: hidden; padding: 86px 0 74px;
  background: linear-gradient(135deg, #f8fbfd 0%, #eef5fa 48%, #e4eef6 100%);
  border-bottom: 1px solid #dfe8ef;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 999px; pointer-events: none;
}
.hero::before { width: 560px; height: 560px; right: -230px; top: -260px; border: 72px solid rgba(8,52,99,.045); }
.hero::after { width: 300px; height: 300px; left: -180px; bottom: -210px; border: 54px solid rgba(98,126,154,.08); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 64px; align-items: center; }
.hero h1 {
  margin: 10px 0 20px; color: var(--navy-900); font-size: clamp(2.75rem, 6vw, 5.25rem);
  line-height: .98; letter-spacing: -.055em; max-width: 850px;
}
.hero h1 span { color: var(--steel); }
.hero p { color: #52657a; max-width: 690px; font-size: 1.13rem; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero-trust { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 18px; color: #50657b; font-size: .9rem; }
.hero-trust span { display: inline-flex; gap: 7px; align-items: center; }
.hero-trust span::before { content: "✓"; color: var(--success); font-weight: 900; }
.hero-panel {
  background: rgba(255,255,255,.9); border: 1px solid rgba(8,52,99,.11); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 26px;
}
.hero-panel-title { font-weight: 850; color: var(--navy); font-size: 1.08rem; margin-bottom: 14px; }
.quick-search { display: flex; gap: 8px; }
.quick-search input {
  width: 100%; min-height: 52px; border: 1px solid #cbd7e2; border-radius: 11px; padding: 0 15px;
  outline: none; background: #fff; color: var(--ink);
}
.quick-search input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(8,52,99,.10); }
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.quick-link {
  text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 13px 10px;
  background: #fff; color: var(--navy); font-size: .83rem; font-weight: 800; text-align: center;
}
.quick-link:hover { border-color: #b6c8d8; background: var(--surface-soft); }

/* Stats */
.stats-strip { padding: 0; transform: translateY(-1px); background: #fff; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  position: relative; padding: 29px 24px; border-right: 1px solid var(--line); color: inherit; text-decoration: none;
  background: #fff; transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.stat:last-child { border-right: 0; }
.stat-link:hover, .stat-link:focus-visible { background: linear-gradient(145deg,#f7fbfe,#eef5fa); transform: translateY(-3px); z-index: 2; box-shadow: 0 12px 30px rgba(8,52,99,.09); }
.stat-value { color: var(--navy); font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 900; letter-spacing: -.03em; }
.stat-label { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.stat-arrow { position: absolute; right: 20px; top: 21px; color: #8aa0b4; font-weight: 900; opacity: .75; transition: transform .18s ease, color .18s ease; }
.stat-link:hover .stat-arrow { color: var(--navy); transform: translate(2px,-2px); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.feature-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: #c6d4df; }
.feature-icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: var(--surface-soft); color: var(--navy); font-weight: 900; margin-bottom: 16px;
}
.feature-card h3 { color: var(--navy-900); margin: 0 0 8px; font-size: 1.12rem; }
.feature-card p { margin: 0; color: var(--muted); }

.class-grid { display: grid; grid-template-columns: repeat(6, minmax(108px,1fr)); gap: 14px; margin-top: 32px; }
.class-logo-card {
  min-height: 92px; display: grid; place-items: center; position: relative; padding: 14px;
  border: 1px solid #d8e2ea; background: rgba(255,255,255,.88); border-radius: 16px;
  text-decoration: none; box-shadow: 0 5px 16px rgba(8,52,99,.035); transition: .18s ease;
}
.class-logo-card:hover { transform: translateY(-3px); border-color: #b9cbd9; background: #fff; box-shadow: 0 12px 28px rgba(8,52,99,.09); }
.class-logo-card img { width: 52px; height: 52px; object-fit: contain; filter: grayscale(1) contrast(1.25); opacity: .82; transition: .18s ease; }
.class-logo-card:hover img { opacity: 1; transform: scale(1.05); }
.class-logo-fallback { display: none; color: var(--navy); font-weight: 900; font-size: .8rem; }
.class-logo-card img[src=""] { display: none; }
.class-logo-card img[src=""] + .class-logo-fallback { display: block; }

/* Search app */
.search-hero { padding: 56px 0 30px; background: linear-gradient(180deg, #f5f9fc, #fff); }
.search-shell { padding: 20px 0 82px; }
.search-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: visible;
}
.search-top { padding: 22px; border-bottom: 1px solid var(--line); }
.type-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 5px; border: 1px solid #dce6ee; border-radius: 15px; background: #f3f7fa; }
.type-tab { border: 0; background: transparent; color: #52667a; border-radius: 11px; padding: 9px 15px; font-size: .86rem; font-weight: 850; transition: .18s ease; }
.type-tab:hover { background: rgba(255,255,255,.72); color: var(--navy); }
.type-tab[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 5px 15px rgba(8,52,99,.11); }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.search-input-wrap { position: relative; }
.search-input {
  width: 100%; height: 54px; border: 1px solid #bfcdda; border-radius: 12px; padding: 0 46px 0 16px;
  outline: none; color: var(--ink); font-size: 1rem; background: #fff;
}
.search-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(8,52,99,.09); }
.search-clear {
  position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border: 0; background: transparent;
  border-radius: 8px; color: var(--muted); font-size: 1.1rem;
}
.autocomplete {
  position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden;
}
.autocomplete[hidden] { display: none; }
.autocomplete button {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; border: 0; background: #fff;
  text-align: left; padding: 11px 13px; color: var(--ink); border-bottom: 1px solid #edf1f4;
}
.autocomplete button:last-child { border-bottom: 0; }
.autocomplete button:hover, .autocomplete button:focus { background: var(--surface-soft); outline: none; }
.autocomplete-kind { color: var(--muted); font-size: .77rem; text-transform: uppercase; font-weight: 800; }
.filter-row {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)) auto; gap: 10px; padding: 15px 22px 20px;
  border-bottom: 1px solid var(--line); background: #fbfcfd;
}
.filter-row label { display: block; color: #66788a; font-size: .76rem; font-weight: 800; margin: 0 0 5px; text-transform: uppercase; letter-spacing: .05em; }
.filter-row select {
  width: 100%; min-height: 42px; border: 1px solid #cbd7e2; border-radius: 9px; background: #fff;
  color: var(--ink); padding: 0 10px; outline: none;
}
.filter-row select:focus { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(8,52,99,.08); }
.filter-actions { display: flex; align-items: end; }
.results-toolbar { min-height: 58px; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 22px; }
.results-count { color: var(--muted); font-size: .92rem; }
.results-count strong { color: var(--navy); }
.results { border-top: 1px solid var(--line); }
.result-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 20px; padding: 20px 22px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.result-card:hover { background: #fbfdff; }
.result-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 850; letter-spacing: .025em; }
.badge-type { background: #eaf1f7; color: var(--navy); }
.badge-class { background: #f0f2f5; color: #44576a; }
.badge-valid { background: var(--success-bg); color: var(--success); }
.badge-expired { background: var(--danger-bg); color: var(--danger); }
.badge-special { background: var(--warning-bg); color: var(--warning); }
.result-title { color: var(--navy-900); font-size: 1.05rem; font-weight: 850; margin: 0 0 5px; }
.result-subtitle { color: #52677a; margin: 0 0 8px; }
.result-details { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 5px; color: var(--muted); font-size: .88rem; }
.result-details strong { color: #465b6f; font-weight: 750; }
.result-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 9px; }
.result-cert { color: var(--navy); font-weight: 850; text-align: right; font-size: .9rem; }
.result-actions { display: flex; gap: 7px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 22px; }
.page-btn { min-width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 9px; color: var(--navy); font-weight: 750; }
.page-btn:hover:not(:disabled), .page-btn[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-btn:disabled { opacity: .42; cursor: default; }
.empty-state, .error-state { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty-state strong, .error-state strong { display: block; color: var(--navy); font-size: 1.08rem; margin-bottom: 5px; }
.skeleton { padding: 20px 22px; border-top: 1px solid var(--line); }
.skeleton-line { height: 14px; border-radius: 999px; background: linear-gradient(90deg,#edf1f4,#f7f9fb,#edf1f4); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin-bottom: 9px; }
.skeleton-line:nth-child(1) { width: 32%; }
.skeleton-line:nth-child(2) { width: 72%; }
.skeleton-line:nth-child(3) { width: 54%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 22px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,22,40,.55); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; z-index: 1; width: min(780px, 100%); max-height: min(86vh, 820px); overflow: auto;
  background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.modal-head { position: sticky; top: 0; z-index: 1; background: #fff; padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.modal-title { margin: 0; color: var(--navy); font-size: 1.15rem; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy); }
.modal-body { padding: 22px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.detail-item { border-bottom: 1px solid #edf1f4; padding-bottom: 12px; }
.detail-item.full { grid-column: 1 / -1; }
.detail-label { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.detail-value { color: var(--ink); margin-top: 3px; overflow-wrap: anywhere; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; }

/* Chat */
.chat-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 95; min-height: 58px; border: 0;
  border-radius: 999px; background: var(--navy); color: #fff; box-shadow: 0 14px 35px rgba(8,52,99,.32);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 19px 0 13px;
  font-weight: 850; font-size: .88rem; white-space: nowrap; transition: .18s ease;
}
.chat-launcher-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); font-size: 1.1rem; }
.chat-launcher-label { letter-spacing: -.01em; }
.chat-launcher:hover { background: var(--navy-900); transform: translateY(-2px); box-shadow: 0 18px 42px rgba(8,52,99,.38); }
.chat-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 100; width: min(410px, calc(100vw - 28px)); height: min(650px, calc(100dvh - 110px));
  background: #fff; border: 1px solid #d6e0e8; border-radius: 20px; box-shadow: 0 25px 70px rgba(8,31,53,.24);
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head { background: var(--navy); color: #fff; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-head-title { font-weight: 850; }
.chat-head-sub { font-size: .76rem; color: #d7e4ef; margin-top: 1px; }
.chat-close { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; background: transparent; color: #fff; }
.chat-messages { overflow-y: auto; padding: 16px; background: #f7f9fb; }
.chat-msg { max-width: 88%; margin-bottom: 12px; border-radius: 15px; padding: 10px 12px; font-size: .91rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.user { margin-left: auto; background: var(--navy); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg.assistant { margin-right: auto; background: #fff; border: 1px solid #e0e7ed; color: #27394b; border-bottom-left-radius: 5px; }
.chat-msg.loading { color: var(--muted); }
.chat-sources { margin: -4px 0 13px; max-width: 95%; }
.chat-source {
  display: block; text-decoration: none; padding: 8px 10px; border: 1px solid #dfe6ec; border-radius: 10px;
  background: #fff; margin-bottom: 6px; font-size: .78rem;
}
.chat-source strong { color: var(--navy); display: block; }
.chat-source span { color: var(--muted); }
.chat-navigation { margin: -4px 0 13px; max-width: 95%; display: grid; gap: 6px; }
.chat-nav-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 11px; border: 1px solid #dce5ec; background: #edf4f9; color: var(--navy); text-decoration: none; font-size: .78rem; }
.chat-nav-link strong { display: block; }
.chat-nav-link small { display: block; color: #667b8e; margin-top: 2px; line-height: 1.25; }
.chat-nav-link:hover { border-color: #b8cbd9; background: #e5f0f7; }
.chat-compose { padding: 11px; background: #fff; border-top: 1px solid var(--line); }
.chat-form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; }
.chat-form [data-turnstile] { width: 100%; min-width: 0; overflow: hidden; }
.chat-form [data-turnstile] iframe { max-width: 100%; }
.chat-input { display: block; width: 100%; min-width: 0; min-height: 84px; max-height: 180px; resize: vertical; border: 1px solid #c8d5df; border-radius: 11px; padding: 10px 11px; outline: none; }
.chat-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(8,52,99,.08); }
.chat-send { align-self: flex-end; flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 11px; background: var(--navy); color: #fff; font-size: 1rem; }
.chat-note { color: #7a8b9b; font-size: .67rem; margin-top: 7px; line-height: 1.35; }

/* Content pages */
.page-hero { padding: 70px 0 54px; background: linear-gradient(135deg,#f5f9fc,#eaf2f8); border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--navy-900); font-size: clamp(2.4rem,5vw,4.5rem); letter-spacing: -.05em; line-height: 1; margin: 8px 0 14px; }
.page-hero p { color: #566b7f; max-width: 760px; font-size: 1.08rem; }
.prose { max-width: 860px; }
.prose h2 { color: var(--navy); font-size: 1.65rem; margin: 34px 0 10px; }
.prose h3 { color: var(--navy); margin: 26px 0 8px; }
.prose p, .prose li { color: #526579; }
.prose ul { padding-left: 22px; }
.prose a { color: var(--navy); font-weight: 700; }
.info-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-top: 30px; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }
.info-card h3 { color: var(--navy); margin: 0 0 7px; }
.info-card p { color: var(--muted); margin: 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.contact-card { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 30px; }
.contact-card a { color: #fff; }
.contact-list { list-style: none; padding: 0; margin: 22px 0 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.contact-list li:last-child { border-bottom: 0; }
.contact-email-cta { margin-top: 20px; background: #fff; color: var(--navy); border-color: rgba(255,255,255,.7); }
.contact-email-cta:hover { background: #f5f9fc; color: var(--navy-900); }

.contact-form { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-weight: 750; color: #42566a; font-size: .85rem; margin-bottom: 5px; }
.form-field input, .form-field textarea { width: 100%; border: 1px solid #cbd7e2; border-radius: 10px; padding: 11px 12px; outline: none; }
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(8,52,99,.08); }

/* Footer */
.site-footer { background: #071d32; color: #d6e2ec; padding: 54px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 34px; }
.footer-brand { max-width: 240px; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 13px; }
.footer-copy { color: #9fb2c4; max-width: 330px; font-size: .9rem; }
.footer-title { color: #fff; font-size: .83rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; margin-bottom: 13px; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: #b7c7d5; text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10); display: flex; justify-content: space-between; gap: 16px; color: #859db1; font-size: .78rem; }

.keyboard-user :focus-visible, :focus-visible { outline: 3px solid rgba(21,114,172,.35); outline-offset: 2px; }

@media (max-width: 1180px) {
  .nav, .header-actions { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 35px; }
  .hero { padding-top: 62px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .card-grid { grid-template-columns: 1fr; }
  .class-grid { grid-template-columns: repeat(4, minmax(100px,1fr)); }
  .filter-row { grid-template-columns: 1fr 1fr; }
  .filter-actions { align-items: center; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 2 / 4; }
}

@media (max-width: 700px) {
  .container { width: min(100% - 28px, var(--content)); }
  .header-inner { min-height: 68px; }
  .brand img { width: 176px; }
  .mobile-nav { inset: 68px 0 0; }
  .hero { padding: 30px 0 36px; }
  .hero-grid { gap: 20px; }
  .hero h1 { font-size: clamp(2.25rem, 11.5vw, 3.7rem); margin: 8px 0 14px; }
  .hero p { font-size: 1rem; margin-bottom: 18px; }
  .hero-actions { gap: 8px; }
  .hero-trust { margin-top: 18px; gap: 10px 14px; }
  .hero-panel { padding: 16px; }
  .quick-search { display: grid; }
  .quick-links { grid-template-columns: 1fr; }
  .section { padding: 62px 0; }
  .search-hero { padding: 42px 0 22px; }
  .search-row { grid-template-columns: 1fr; }
  .search-row .btn { width: 100%; }
  .filter-row { grid-template-columns: 1fr; padding: 14px; }
  .filter-actions .btn { width: 100%; }
  .search-top { padding: 16px 14px; }
  .results-toolbar { align-items: flex-start; padding: 12px 14px; }
  .result-card { grid-template-columns: 1fr; padding: 18px 14px; gap: 12px; }
  .result-side { align-items: flex-start; }
  .result-cert { text-align: left; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item.full { grid-column: auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 15px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child, .footer-grid > :last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
  .contact-grid, .info-grid { grid-template-columns: 1fr; }
  .chat-panel { right: 14px; bottom: 84px; }
  .chat-launcher { right: 14px; bottom: 14px; padding-right: 14px; }
  .class-grid { grid-template-columns: repeat(3, minmax(82px,1fr)); gap: 10px; }
  .class-logo-card { min-height: 76px; padding: 10px; }
  .class-logo-card img { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (max-width: 480px) {
  .chat-launcher { width: 58px; padding: 0; border-radius: 18px; }
  .chat-launcher-label { display: none; }
  .class-grid { grid-template-columns: repeat(3, 1fr); }
}


/* CertificateFinder classification logo asset fix */
.class-logo-card {
  min-height: 112px;
  grid-template-rows: 72px auto;
  align-content: center;
  gap: 5px;
  overflow: hidden;
}
.class-logo-image {
  width: 100%;
  height: 72px;
  display: grid;
  place-items: center;
}
.class-logo-card img {
  display: block;
  width: auto;
  height: auto;
  max-width: 88px;
  max-height: 66px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.12);
  opacity: .88;
}
.class-logo-card:hover img { opacity: 1; transform: scale(1.035); }
.class-logo-code {
  color: #506579;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .045em;
  line-height: 1;
}
.class-logo-fallback {
  width: 68px;
  height: 52px;
  place-items: center;
  border: 1px solid #cbd8e2;
  border-radius: 10px;
  background: #f3f7fa;
  color: var(--navy);
  font-size: .76rem;
  font-weight: 900;
}
@media(max-width:700px){
  .class-logo-card{min-height:94px;grid-template-rows:58px auto}
  .class-logo-image{height:58px}
  .class-logo-card img{max-width:68px;max-height:52px}
}

/* v12 navigation and mobile refinements */
.nav a {border-radius:12px; padding:10px 12px; transition:background .15s,color .15s; }
.nav a:hover, .nav a[aria-current="page"] {background:#e8f0f7;color:#083463;}
.type-tabs {gap:7px; padding:6px; border-radius:16px; background:#edf2f7;}
.type-tab {border-radius:11px; border:1px solid transparent; padding:10px 17px;}
.type-tab[aria-selected="true"] {background:#083463;color:white;box-shadow:0 3px 8px #08346325;}
@media(max-width:480px){ .chat-launcher{width:auto;padding:0 12px;gap:8px;} .chat-launcher-label{display:block;font-size:11px;} .chat-launcher-label small{display:none;} .hero{padding-top:22px;} .hero h1{font-size:2.45rem;} .hero-trust{font-size:.73rem;} }
.pwa-install{position:fixed;left:1rem;bottom:1rem;z-index:1000;border:1px solid #b9dfeb;border-radius:1rem;background:#083463;color:#fff;padding:.65rem 1rem;font:600 .9rem system-ui;box-shadow:0 .5rem 1.5rem #0003;cursor:pointer;max-width:calc(100vw - 9rem)}
.pwa-install[hidden]{display:none}
.consent-banner{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:1200;background:#fff;color:#083463;border:1px solid #b5cbde;border-radius:1rem;padding:1rem;box-shadow:0 .5rem 2rem #0004;display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;max-width:65rem;margin:auto}
.consent-banner p{flex:1 1 20rem;margin:0;font-size:.9rem}.consent-banner button{border:1px solid #083463;border-radius:.55rem;padding:.55rem .8rem;background:#fff;color:#083463;cursor:pointer}.consent-banner button[data-consent="granted"]{background:#083463;color:#fff}
.localized-main{max-width:850px;padding:3rem 1rem}.localized-nav{display:flex;flex-wrap:wrap;gap:.7rem;margin:2rem 0}
@media(max-width:700px){.chat-panel{height:min(650px,calc(100dvh - 105px))}.chat-messages{min-height:0}}

.language-control { display:inline-flex; align-items:center; gap:5px; margin-left:8px; color:var(--navy); flex:none; }
.language-control select { max-width:145px; min-width:100px; padding:9px 7px; border:1px solid #c8d5df; border-radius:10px; background:#fff; color:var(--navy); font-size:.85rem; font-weight:700; }
.language-control select:focus-visible { outline:2px solid var(--navy); outline-offset:2px; }
.localized-main > .language-control { float:right; margin:0 0 16px 16px; }
[dir="rtl"] .language-control { margin-left:0; margin-right:8px; }
[dir="rtl"] .chat-launcher,[dir="rtl"] .chat-panel { right:auto; left:22px; }
@media (max-width: 1360px) {
  .nav, .header-actions { display:none; }
  .menu-toggle { display:inline-flex; margin-left:0; }
  .language-control { margin-left:auto; }
}
@media (max-width: 700px) {
  .header-inner { gap:8px; }
  .language-control { margin-left:auto; }
  .language-control select { max-width:110px; min-width:85px; padding:8px 3px; }
  [dir="rtl"] .chat-launcher,[dir="rtl"] .chat-panel { left:14px; }
}
@media (max-width: 480px) {
  .header-inner { gap:6px; }
  .brand img { width:clamp(112px, 37vw, 148px); }
  .brand-fallback { font-size:1rem; }
  .language-control { gap:2px; margin-left:auto; }
  .language-control > [aria-hidden] { display:none; }
  .language-control select { min-width:75px; max-width:96px; padding:7px 2px; font-size:.76rem; }
  .menu-toggle { flex:none; min-width:38px; padding:7px; }
  .hero-actions { grid-template-columns:minmax(0,1fr); }
  .hero-actions .btn { width:100%; }
}

/* Keep the desktop navigation visible at common browser zoom levels. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
body.nav-open .pwa-install { display:none; }
@media (min-width: 1021px) and (max-width: 1360px) {
  .header-inner { gap:8px; }
  .brand img { width:clamp(128px,14vw,172px); }
  .nav { display:flex; flex:1; min-width:0; justify-content:space-around; margin-left:auto; padding:3px; }
  .nav a { padding:8px 5px; font-size:.72rem; white-space:normal; text-align:center; }
  .header-actions, .menu-toggle { display:none; }
  .language-control { margin-left:4px; }
  .language-control select { min-width:84px; max-width:106px; }
}
@media (min-width: 1361px) {
  .language-control { margin-left:4px; }
}
@media (max-width: 480px) {
  .language-control > [aria-hidden] { display:inline; }
}
.consent-banner{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:1200;background:#fff;color:#083463;border:1px solid #b5cbde;border-radius:1rem;padding:1rem;box-shadow:0 .5rem 2rem #0004;display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;max-width:65rem;margin:auto}
.consent-banner p{flex:1 1 20rem;margin:0;font-size:.9rem}.consent-banner button{border:1px solid #083463;border-radius:.55rem;padding:.55rem .8rem;background:#fff;color:#083463;cursor:pointer}.consent-banner button[data-consent="granted"]{background:#083463;color:#fff}
.localized-main{max-width:850px;padding:3rem 1rem}.localized-nav{display:flex;flex-wrap:wrap;gap:.7rem;margin:2rem 0}

.hero-actions .pwa-install { position:static; box-shadow:none; max-width:none; background:#fff; color:var(--navy); border-color:#b9cedf; }
.install-hint { flex-basis:100%; color:var(--navy); margin:.4rem 0 0; font-size:.9rem; }

.footer-language-links { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:20px 0 0; font-size:.82rem; }
.footer-language-links button { color:inherit; background:transparent; border:1px solid currentColor; border-radius:7px; padding:5px 9px; }

/* Balance the chat: the response area grows; the challenge appears only when needed. */
.chat-panel { height:min(730px,calc(100dvh - 110px)); grid-template-rows:auto minmax(0,1fr) auto; }
.chat-messages { min-height:0; }
.chat-compose { padding:9px 11px; }
.chat-form { display:grid; grid-template-columns:minmax(0,1fr) 42px; gap:6px; align-items:end; }
.chat-input { grid-column:1; grid-row:1; min-height:58px; max-height:110px; }
.chat-send { grid-column:2; grid-row:1; width:42px; height:42px; align-self:end; }
.chat-form [data-turnstile] { grid-column:1 / -1; grid-row:2; justify-self:center; width:auto; max-width:100%; }
.chat-form [data-turnstile]:empty { display:none; }
.chat-note { margin-top:5px; }
@media(max-width:700px) { .chat-panel{ height:min(660px,calc(100dvh - 105px)); } }
/* Restore readable tabs without stretching labels across the header. */
@media(min-width:1021px) and (max-width:1360px) {
  .nav { flex:0 1 auto; justify-content:flex-start; gap:2px; }
  .nav a { font-size:.86rem; padding:9px clamp(5px,.65vw,11px); }
}
@media(min-width:1361px) { .nav { gap:2px; } .nav a { font-size:.88rem; padding:10px 12px; } }
.last-updated { font-size:.85rem; color:var(--muted); }
.hero-trust .last-updated::before { content:none; }
.search-updated { margin:12px 0 0; text-align:right; }

/* v19: tighter editorial rhythm and a gentle blue edge on content cards. */
.section { padding:64px 0; }
.section-sm { padding:42px 0; }
.page-hero { padding:44px 0 38px; }
.page-hero + .section { padding-top:48px; }
.card-grid { margin-top:24px; gap:16px; }
.class-grid { margin-top:24px; }
.feature-card, .info-card { background:linear-gradient(145deg,#f3f8fc,#fff 65%); border-color:#d5e4ee; }
.feature-card { position:relative; padding-top:30px; }
.feature-card::before { content:""; position:absolute; top:17px; left:25px; width:32px; height:3px; background:#81aac8; border-radius:2px; }
.feature-card h3 { margin-top:13px; }
@media(min-width:1361px) { .brand img { width:250px; } }
@media(min-width:1361px) and (max-width:1500px) {
  .brand img { width:220px; }
  .header-inner { gap:10px; }
  .header-search { display:none; }
}
@media(min-width:1021px) and (max-width:1360px) { .brand img { width:clamp(160px,15vw,190px); } }
@media(max-width:700px) { .section {padding:46px 0;} .section-sm {padding:34px 0;} .page-hero {padding:34px 0 28px;} .page-hero + .section {padding-top:34px;} }

.results-controls { display:flex; align-items:center; gap:8px; margin-left:auto; flex-shrink:0; }
.results-controls label { font-size:.8rem; color:var(--muted); font-weight:700; }
.results-controls select { min-height:38px; border:1px solid #cbd7e2; border-radius:9px; padding:0 9px; background:#fff; color:var(--navy); font-weight:700; }
.country-combobox { position:relative; }
.country-combobox input { width:100%; min-height:42px; border:1px solid #cbd7e2; border-radius:9px; background:#fff; padding:0 11px; outline:none; }
.country-combobox input:focus { border-color:var(--navy); box-shadow:0 0 0 2px rgba(8,52,99,.08); }
.country-options { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:15; max-height:240px; overflow:auto; border:1px solid #cbd7e2; border-radius:10px; background:#fff; box-shadow:var(--shadow-md); }
.country-options[hidden] { display:none; }
.country-options [role="option"],.country-empty { padding:9px 12px; cursor:pointer; font-size:.9rem; }
.country-options [role="option"]:hover,.country-options [role="option"].active { background:#eaf3f9; color:var(--navy); }
.country-empty { color:var(--muted); cursor:default; }
@media(max-width:700px) { .results-toolbar { flex-wrap:wrap; } .results-controls { margin-left:0; width:100%; justify-content:flex-start; } }
