@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/fonts/source-sans-3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/fonts/source-sans-3-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/fonts/source-serif-4-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/fonts/source-serif-4-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  /* Preserve the approved palette and transparent navy logo under browser auto-darkening. */
  color-scheme: only light;
  --navy: #032B4C;
  --navy-900: #011D54;
  --navy-800: #032B4C;
  --blue: #3a5c80;
  --steel: #627e9a;
  --sky: #B6D6F2;
  --coral: #E8494F;
  --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: "Source Sans 3", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", 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; flex-wrap: wrap; min-width: 0; 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: 28px 0 16px;
  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: 8px 0 16px; 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 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero-trust { margin-top: 20px; 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, minmax(0, 1fr)); }
.stats-grid > *, .footer-grid > * { min-width: 0; }
.stat-value, .stat-label, .footer-copy, .footer-title, .footer-links a { overflow-wrap: anywhere; }
.stat {
  position: relative; padding: 19px 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: none; opacity: 1; 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: 12px 0 8px; background: linear-gradient(180deg, #f5f9fc, #fff); }
.search-hero .section-title { margin: 4px 0 8px; }
.search-hero .section-copy { margin: 0; max-width: none; }
.search-shell { padding: 4px 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(4, 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); }
.approval-filter-status { display: block; margin-top: 5px; color: var(--danger); font-size: .76rem; }
.approval-filter-status[hidden] { display: none; }
.certificate-scope-note, .hero .certificate-scope-note { margin: 8px 0 0; padding: 0; border: 0; border-radius: 0; background: none; color: #465b6f; font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.certificate-scope-note[hidden] { display: none; }

.search-verification-note { margin: 14px 0 0; color: #465b6f; font-size: .84rem; line-height: 1.55; }
.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); }
.search-context { padding: 12px 22px; border-bottom: 1px solid var(--line); background: #f7fafc; overflow-wrap: anywhere; }
.applied-query, .filter-context-note { margin: 0 0 6px; color: #465b6f; font-size: .86rem; }
.filter-context-note { margin-bottom: 0; }
.applied-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 7px 0 0; padding: 0; list-style: none; }
.filter-chip { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; max-width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid #bacbd9; border-radius: 18px; background: #fff; color: var(--navy); font: inherit; font-size: .8rem; cursor: pointer; overflow-wrap: anywhere; }
.filter-chip:hover { background: #eaf1f7; }
.filter-chip:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.empty-state .applied-filters { justify-content: center; }
.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; overflow-wrap: anywhere; }
.contact-card a:not(.contact-email-cta):hover { color: #fff; text-decoration-thickness: 2px; }
.contact-card a:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.contact-data-note { margin: 8px 0 0; font-size: .8rem; line-height: 1.55; overflow-wrap: anywhere; }
.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-card .contact-email-cta { margin-top: 20px; background: #fff; color: var(--navy); border-color: rgba(255,255,255,.7); }
.contact-card .contact-email-cta:hover, .contact-card .contact-email-cta:focus-visible { 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: minmax(0,1.5fr) repeat(3,minmax(0,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, minmax(0, 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: minmax(0,1.5fr) repeat(2,minmax(0,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: 12px 0 8px; }
  .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: repeat(2,minmax(0,1fr)); }
  .stat { padding: 20px 15px; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,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: none;
  opacity: 1;
}
.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:#032B4C;}
.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:#032B4C;color:white;box-shadow:0 3px 8px #032B4C25;}
@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:#032B4C;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:#032B4C;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 #032B4C;border-radius:.55rem;padding:.55rem .8rem;background:#fff;color:#032B4C;cursor:pointer}.consent-banner button[data-consent="granted"]{background:#032B4C;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:#032B4C;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 #032B4C;border-radius:.55rem;padding:.55rem .8rem;background:#fff;color:#032B4C;cursor:pointer}.consent-banner button[data-consent="granted"]{background:#032B4C;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; } }

/* Keep the mobile contact email action clear of the floating assistant label. */
@media (max-width: 480px) {
  html[data-cf-page="contact"] .chat-launcher { width:58px; padding:0; }
  html[data-cf-page="contact"] .chat-launcher-label { display:none; }
}

/* Public visual refresh: marine navy, pale blue and a restrained coral accent. */
:root {
  --ink: #142c40; --muted: #526779; --line: #d4e0e9;
  --surface-alt: #f3f7fa; --surface-soft: #edf4fa;
  --shadow-sm: 0 3px 12px #032b4c08; --shadow-md: 0 12px 36px #032b4c14;
  --radius-sm: 5px; --radius: 8px; --radius-lg: 10px; --content: 1240px;
}
body { font-size: 17px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
.header-inner { min-height: 88px; gap: 26px; }
.brand img { width: 235px; height: 58px; }
.nav { margin-left: auto; flex: 0 1 auto; gap: 12px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.nav a, .nav summary { font-size: 1.06rem; font-weight: 600; color: var(--navy); padding: 13px 8px; border-radius: 0; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--navy-900); background: none; box-shadow: none; }
.nav a[aria-current="page"]::after { left: 8px; right: 8px; bottom: 6px; background: var(--coral); }
.nav-databases { position: relative; }
.nav-databases summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; line-height: 1.2; }
.nav-databases summary::-webkit-details-marker { display: none; }
.nav-chevron { display: block; width: 8px; height: 8px; flex: 0 0 8px; align-self: center; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; margin-top: -4px; transform: rotate(45deg); transition: transform .15s; }
.nav-databases[open] .nav-chevron { transform: rotate(225deg); margin-top: 4px; }
.nav-databases[open] summary { color: var(--navy-900); }
.nav-dropdown { position: absolute; top: calc(100% + 3px); left: 0; width: 224px; padding: 8px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--coral); border-radius: 0 0 6px 6px; box-shadow: var(--shadow-md); z-index: 90; }
.nav .nav-dropdown a { display: block; padding: 13px 14px; font-size: 1rem; }
.nav .nav-dropdown a:hover, .nav .nav-dropdown a[aria-current="page"] { background: var(--surface-soft); }
.nav .nav-dropdown a::after { display: none; }
.language-control { margin-left: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.language-control select { border: 0; border-radius: 0; min-height: 44px; background: #fff; padding: 8px 2px; font-size: .9rem; font-weight: 600; min-width: 98px; }
.menu-toggle { border-radius: 5px; }
.mobile-nav { background: #fff; }
.mobile-nav .nav-databases { border-bottom: 1px solid var(--line); }
.mobile-nav summary { padding: 15px 12px; list-style: none; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav .nav-dropdown { position: static; width: 100%; box-shadow: none; border: 0; border-left: 2px solid var(--coral); border-radius: 0; padding: 0 0 5px 12px; margin-left: 12px; }
.mobile-nav .nav-dropdown a { border: 0; padding: 12px; font-weight: 500; }
.hero { padding: 54px 0 34px; min-height: 555px; border-bottom: 0; background: #f4f8fb; isolation: isolate; }
.hero::before { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; background: url('/assets/images/marine-shipyard-hero.webp') 76% 52% / cover no-repeat; opacity: .78; z-index: -2; }
.hero::after { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; background: linear-gradient(90deg,#fff 0%,#ffffffed 27%,#ffffffb3 48%,#ffffff30 72%,#ffffff18 100%); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 710px) 1fr; gap: 0; align-items: center; }
.hero-copy { max-width: 710px; }
.eyebrow { font-size: .75rem; letter-spacing: .16em; font-weight: 700; color: var(--navy); }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.hero .eyebrow::before { content: ''; width: 28px; height: 3px; background: var(--coral); }
.hero h1 { font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif; font-weight: 600; font-size: clamp(2.9rem, 4.4vw, 4.15rem); line-height: 1.07; letter-spacing: -.036em; color: var(--navy); margin: 17px 0; max-width: 710px; }
.hero p { font-size: 1.05rem; line-height: 1.55; max-width: 610px; color: #344d62; margin: 0 0 24px; }
.hero-search { max-width: 635px; display: flex; padding: 5px; gap: 5px; border: 1px solid #a6bacc; background: #fff; border-radius: 6px; box-shadow: 0 5px 18px #032b4c08; }
.hero-search input { min-width: 0; min-height: 48px; border: 0; border-radius: 3px; padding: 0 14px; font-size: 1rem; }
.hero-search input:focus { box-shadow: none; outline: 2px solid var(--navy); outline-offset: -2px; }
.hero-search .btn { min-width: 106px; border-radius: 3px; background: var(--coral); color: var(--navy-900); font-size: 1.25rem; font-weight: 700; box-shadow: none; }
.hero-search .btn:hover { background: #f06469; }
.hero-actions { margin-top: 16px; }
.guide-link { display: inline-flex; gap: 9px; align-items: center; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .92rem; }
.guide-link::before { content: '▶'; font-size: .55rem; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--navy); border-radius: 50%; padding-left: 2px; }
.guide-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.guide-play { display: none; }
.guide-duration { font-size: .84rem; font-weight: 400; color: #41586c; padding-left: 9px; border-left: 1px solid #a6bacc; }
.hero-trust { margin-top: 28px; gap: 12px 26px; color: var(--navy); font-size: .95rem; font-weight: 600; }
.hero-trust span { gap: 0; }
.hero-trust span::before { display: none; }
.hero-trust > span + span { border-left: 1px solid #91acc0; padding-left: 26px; }
.hero-trust .last-updated { flex-basis: 100%; color: #526779; font-size: .73rem; font-weight: 400; }
.stats-strip { transform: none; border-top: 1px solid var(--line); }
.stat { padding: 21px 24px; }
.stat-value { font-size: 2rem; font-weight: 600; color: var(--navy); }
.stat-label { font-size: .9rem; }
.stat-link:hover, .stat-link:focus-visible { transform: none; box-shadow: none; background: var(--surface-soft); }
.section { padding: 64px 0; }
.section-title { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; font-size: clamp(2rem, 3.5vw, 2.8rem); letter-spacing: -.025em; line-height: 1.15; color: var(--navy); max-width: 950px; }
.search-hero .section-title { font-family: var(--font); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; }
.section-copy { font-size: 1.08rem; line-height: 1.7; }
.feature-card, .info-card { background: #fff; border-color: var(--line); border-radius: 5px; box-shadow: none; }
.feature-card { padding: 25px; border-top: 2px solid var(--sky); }
.feature-card::before { display: none; }
.feature-card:hover { transform: none; box-shadow: none; border-color: #96b2c9; }
.feature-icon { width: auto; height: auto; display: block; background: none; color: var(--navy); font-size: .8rem; letter-spacing: .1em; margin-bottom: 24px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
.feature-card h3 { font-size: 1.2rem; font-weight: 600; margin: 0 0 9px; }
.feature-card p { font-size: 1rem; line-height: 1.65; }
.class-logo-card { border-radius: 4px; background: #fff; box-shadow: none; }
.class-logo-card:hover { transform: none; box-shadow: none; border-color: #8faac0; }
.class-logo-card img { filter: none; opacity: 1; }
.class-logo-card:hover img { transform: none; }
.certificate-scope-note { color: var(--muted); line-height: 1.65; }
.btn { border-radius: 5px; font-weight: 600; }
.btn-primary { background: var(--navy); box-shadow: none; }
.btn:hover { transform: none; }
.btn-secondary:hover { box-shadow: none; }
.search-hero { background: var(--surface-alt); padding: 24px 0 20px; }
.search-shell { padding-top: 20px; }
.search-card { border-radius: 7px; box-shadow: none; }
.type-tabs { border-radius: 5px; gap: 4px; box-shadow: none; background: var(--surface-soft); }
.type-tab { border-radius: 3px; font-weight: 600; }
.type-tab[aria-selected="true"] { background: var(--navy); box-shadow: none; }
.result-card { border-radius: 0; }
.result-card:hover { box-shadow: none; }
.search-input, .filter-field select, .results-controls select, .country-combobox input { border-radius: 5px; }
.page-hero { background: var(--surface-alt); }
.chat-launcher { border-radius: 6px; background: var(--navy); box-shadow: 0 4px 16px #032b4c24; border: 1px solid #fff; }
.chat-panel { border-radius: 8px; box-shadow: var(--shadow-md); }
.chat-header { background: var(--navy); }
.chat-send { background: var(--navy); border-radius: 5px; }
.site-footer { background: var(--navy); }
.footer-brand { width: 235px; height: auto; background: transparent; filter: none; opacity: 1; border-radius: 0; padding: 0; }
.footer-copy, .footer-links a { color: #d7e5f1; }
.footer-bottom { color: #c2d4e4; }
.footer-utilities { margin-top: 22px; }
.footer-utilities .pwa-install { position: static; z-index: auto; color: #d7e5f1; background: transparent; border: 0; border-bottom: 1px solid #8aabc4; border-radius: 0; box-shadow: none; padding: 5px 0; max-width: 100%; font: inherit; font-size: .85rem; }
.footer-utilities .pwa-install:hover { color: #fff; }
.footer-utilities + .install-hint { color: #d7e5f1; max-width: 240px; font-size: .85rem; }
.footer-language-links button { min-height: 36px; border: 0; padding: 4px 0; border-bottom: 1px solid #8aabc4; border-radius: 0; }
.consent-banner { border-radius: 6px; border-color: #90a9bc; border-top: 3px solid var(--coral); box-shadow: var(--shadow-md); max-width: 1130px; padding: 16px 18px; gap: 12px; }
.consent-banner p { font-size: .85rem; line-height: 1.45; }
.consent-banner button { border-radius: 4px; min-height: 42px; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.consent-banner button[data-consent="granted"] { background: var(--navy); }
.keyboard-user :focus-visible, :focus-visible { outline: 3px solid var(--navy-900); outline-offset: 4px; }
.site-footer :focus-visible, .chat-header :focus-visible { outline-color: var(--sky); }
[dir="rtl"] .nav-dropdown { left: auto; right: 0; }
[dir="rtl"] .mobile-nav .nav-dropdown { border-left: 0; border-right: 2px solid var(--coral); margin-left: 0; margin-right: 12px; padding-left: 0; padding-right: 12px; }
[dir="rtl"] .language-control { border-left: 0; border-right: 1px solid var(--line); padding-left: 0; padding-right: 20px; }
[dir="rtl"] .hero-trust > span + span { border-left: 0; border-right: 1px solid #91acc0; padding-left: 0; padding-right: 26px; }
@media (min-width: 1181px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}
@media (max-width: 1280px) and (min-width: 1181px) {
  .header-inner { gap: 14px; }
  .brand img { width: 195px; }
  .nav { gap: 4px; }
  .nav a, .nav summary { font-size: 1rem; padding: 13px 6px; }
  .language-control { padding-left: 10px; }
}
@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; margin-left: 0; }
  .language-control { margin-left: auto; }
  .hero-grid { grid-template-columns: minmax(0, 660px); }
  .hero { min-height: 0; padding: 42px 0 30px; }
  .hero-visual { display: none; }
  .hero::after { background: linear-gradient(90deg,#fffffff5,#ffffffd9 60%,#ffffff78); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 72px; gap: 8px; }
  .brand img { width: 164px; height: 45px; }
  .language-control { padding-left: 8px; }
  .language-control select { min-width: 78px; max-width: 92px; font-size: .8rem; }
  .menu-toggle { width: 38px; height: 40px; min-width: 38px; }
  .mobile-nav { inset: 72px 0 0; }
  .hero { padding: 28px 0 22px; }
  .hero::before { background-position: 64% center; opacity: .45; }
  .hero::after { background: linear-gradient(90deg,#fffffff7,#ffffffcf 70%,#ffffff91); }
  .hero-copy { display: flex; flex-direction: column; }
  .hero .eyebrow { font-size: .65rem; }
  .hero h1 { font-size: clamp(2.3rem, 8.8vw, 3.35rem); line-height: 1.08; margin: 14px 0; letter-spacing: -.035em; }
  .hero p { font-size: .96rem; line-height: 1.45; margin-bottom: 18px; }
  .hero-search { width: 100%; display: flex; gap: 3px; padding: 4px; }
  .hero-search input { min-height: 45px; padding: 0 8px; font-size: .88rem; }
  .hero-search .btn { min-width: 78px; padding: 8px 12px; font-size: 1.2rem; }
  .hero-actions { margin-top: 13px; display: block; order: 2; }
  .guide-link { font-size: .88rem; gap: 7px; flex-wrap: wrap; }
  .guide-duration { display: none; }
  .hero-trust { margin-top: 16px; gap: 8px 14px; font-size: .8rem; order: 1; }
  .hero-trust > span + span { padding-left: 14px; }
  .hero-trust > span:nth-child(3) { display: none; }
  .hero-trust .last-updated { font-size: .68rem; }
  .section { padding: 42px 0; }
  .section-title { font-size: 2rem; }
  .stat { padding: 14px; }
  .stat-value { font-size: 1.55rem; }
  .stat-label { font-size: .8rem; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .consent-banner { left: 10px; right: 10px; bottom: 10px; gap: 9px; padding: 12px; }
  .consent-banner p { flex-basis: 100%; font-size: .76rem; }
  .consent-banner button { font-size: .82rem; min-height: 39px; padding: 8px 12px; }
  .chat-launcher { right: 14px; bottom: 14px; }
  .chat-launcher-label small { display: none; }
  [dir="rtl"] .language-control { padding-right: 8px; }
  [dir="rtl"] .hero-trust > span + span { padding-right: 14px; }
}
@media (max-width: 380px) {
  .brand img { width: 143px; }
  .language-control select { min-width: 72px; max-width: 78px; }
  .hero h1 { font-size: 2.25rem; }
}

/* Product type is source data: wrap long values without widening result rows. */
.result-product-type { overflow-wrap: anywhere; min-width: 0; }
.hero h1, .section-title, .page-hero h1 { overflow-wrap: anywhere; hyphens: auto; }

/* Search usability: readable results, compact mobile spacing and touch targets. */
body[data-database-type] main h2 { overflow-wrap: anywhere; hyphens: auto; }
[data-search-app] .result-card { grid-template-columns: minmax(0,1fr) 190px; }
[data-search-app] .result-card > div { min-width: 0; }
[data-search-app] .result-title, [data-search-app] .result-subtitle,
[data-search-app] .result-cert { overflow-wrap: anywhere; }
[data-search-app] .result-subtitle { color: var(--navy); font-weight: 600; }
[data-search-app] .result-actions { flex-wrap: wrap; justify-content: flex-end; }
body[data-database-type] .detail-verification-note { margin: 0 0 14px; padding: 12px 14px; border-inline-start: 4px solid var(--coral); background: #fff5ee; color: #4c3825; line-height: 1.55; }
.search-scope-disclosure { margin-top: 8px; }
.search-scope-disclosure summary { display: list-item; width: fit-content; min-height: 44px; padding: 10px 0; color: var(--navy); font-size: .88rem; font-weight: 600; cursor: pointer; }
.search-scope-disclosure .certificate-scope-note { margin-top: 0; }
.menu-toggle,
body[data-database-type] [data-modal-close] { width: 44px; min-width: 44px; height: 44px; min-height: 44px; flex-shrink: 0; }
[data-search-app] .type-tab, [data-search-app] .filter-chip,
[data-search-app] .btn, [data-search-app] select,
[data-search-app] .country-combobox input, [data-search-app] .autocomplete button,
[data-search-app] .country-options [role="option"], body[data-database-type] .modal-actions .btn { min-height: 44px; }
[data-search-app] .page-btn { min-width: 44px; height: 44px; }
[data-search-app] .search-clear { top: 5px; right: 5px; width: 44px; height: 44px; }

@media (max-width: 700px) {
  body[data-database-type] .search-hero { padding: 14px 0 10px; }
  body[data-database-type] .search-hero .eyebrow { font-size: .7rem; }
  body[data-database-type] .search-hero .section-title { font-size: clamp(1.5rem,6.5vw,2rem); margin: 4px 0 6px; line-height: 1.18; }
  body[data-database-type] .search-hero .section-copy { font-size: .94rem; line-height: 1.45; }
  [data-search-app] { padding-top: 10px; }
  [data-search-app] .search-top { padding: 12px; }
  [data-search-app] .type-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 12px; padding: 3px; }
  [data-search-app] .type-tab { padding: 8px; font-size: .84rem; }
  [data-search-app] .search-row { gap: 8px; }
  [data-search-app] .search-verification-note { margin-top: 8px; font-size: .84rem; line-height: 1.45; }
  [data-search-app] .filter-row { padding: 12px; gap: 10px; }
  [data-search-app] .filter-row > div { min-width: 0; }
  [data-search-app] .filter-row label { font-size: .8rem; letter-spacing: 0; text-transform: none; }
  [data-search-app] .filter-actions { grid-column: 1 / -1; }
  [data-search-app] .search-context { padding: 10px 12px; }
  [data-search-app] .results-toolbar { min-height: 0; gap: 8px 12px; padding: 10px 12px; }
  [data-search-app] .results-controls { width: auto; max-width: 100%; flex-shrink: 1; flex-wrap: wrap; min-width: 0; }
  [data-search-app] .results-controls select { min-width: 0; max-width: 100%; }
  [data-search-app] .results-toolbar .chat-note { width: 100%; margin: 0; font-size: .8rem; }
  /* Flatten only structural wrappers: all record text stays visible and in the DOM. */
  [data-search-app] .result-card { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 12px; padding: 12px; align-items: start; }
  [data-search-app] .result-card > div,
  [data-search-app] .result-details { display: contents; }
  [data-search-app] .result-meta,
  [data-search-app] .result-title,
  [data-search-app] .result-subtitle,
  [data-search-app] .result-product-type,
  [data-search-app] .result-actions { grid-column: 1 / -1; }
  [data-search-app] .result-meta { gap: 5px; margin-bottom: 2px; }
  [data-search-app] .result-title { margin: 0; font-size: 1.06rem; line-height: 1.25; }
  [data-search-app] .result-subtitle { margin: 0 0 2px; font-size: .95rem; line-height: 1.3; }
  [data-search-app] .result-details { font-size: .88rem; line-height: 1.35; }
  [data-search-app] .result-details > span { min-width: 0; overflow-wrap: anywhere; }
  [data-search-app] .result-expiry { grid-column: 1; }
  [data-search-app] .result-cert { grid-column: 2; min-width: 0; margin: 0; font-size: .88rem; line-height: 1.35; text-align: end; }
  [data-search-app] .result-actions { width: 100%; gap: 6px; margin-top: 4px; justify-content: flex-start; }
  [data-search-app] .result-actions .btn { flex: 1 1 0; min-width: 0; padding: 7px 8px; font-size: .875rem; line-height: 1.2; white-space: normal; text-align: center; overflow-wrap: anywhere; }
  [data-search-app] .result-actions .btn[data-detail-id] { flex: 0 1 30%; }
  [data-search-app] .pagination { flex-wrap: wrap; gap: 6px; padding: 14px 10px; }
  body[data-database-type] .modal { padding: 10px; }
  body[data-database-type] .modal-card { max-height: calc(100dvh - 20px); border-radius: 10px; }
  body[data-database-type] .modal-head { padding: 12px; }
  body[data-database-type] .modal-title { min-width: 0; overflow-wrap: anywhere; font-size: 1.05rem; }
  body[data-database-type] .modal-body { padding: 14px 12px; }
  body[data-database-type] .detail-grid { gap: 10px; }
  body[data-database-type] .detail-item { padding-bottom: 9px; }
  body[data-database-type] .detail-label { font-size: .8rem; letter-spacing: .025em; }
  body[data-database-type] .detail-verification-note { padding: 10px; font-size: .9rem; }
}
@media (min-width: 360px) and (max-width: 700px) {
  [data-search-app] .filter-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 359px) {
  .brand img { width: 128px; }
}
@media (max-width: 319px) {
  .header-inner .brand { min-width: 0; flex-shrink: 1; }
}

/* Keep the home introduction fluid at normal browser zoom. Content may grow at large text sizes. */
[data-cf-page="home"] .site-header .container,
.home-overview .container { width: min(1680px, calc(100% - clamp(32px, 6vw, 96px))); }
.home-overview { display: grid; grid-template-rows: minmax(min-content, 1fr) auto; min-height: min(960px, calc(100vh - 89px)); min-height: min(960px, calc(100svh - 89px)); }
.home-overview .hero { display: grid; align-items: center; min-height: 0; }
@media (min-width: 701px) {
  .home-overview .hero { padding-block: clamp(24px, 4vh, 54px); padding-block: clamp(24px, 4svh, 54px); }
  .home-overview .hero h1 { font-size: clamp(2.4rem, min(4.4vw, 6vh), 4.15rem); font-size: clamp(2.4rem, min(4.4vw, 6svh), 4.15rem); margin-block: 14px; }
  .home-overview .hero p { margin-bottom: 20px; }
  .home-overview .hero-actions { margin-top: 12px; }
  .home-overview .hero-trust { margin-top: 20px; }
}
@media (max-width: 700px) {
  .home-overview { min-height: 0; }
}
/* Search recovery uses the existing controls and palette. */
.search-recovery, .source-recovery { line-height: 1.6; }
.search-recovery:empty { display: none; }
.search-recovery .btn, .source-recovery .btn { min-height: 44px; white-space: normal; }
.source-recovery { margin-top: 20px; }
.source-recovery input { display: block; width: 100%; padding: 10px; font: inherit; }
.copy-status { margin-inline-start: 10px; }
