/* =========================================================================
   DialAnHuman design system (trial build). Single file, CSS custom properties.
   Breakpoints: 640px (sm), 900px (md), 1100px (lg). Mobile-first.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --navy: #173B63;
  --navy-700: #122f50;
  --navy-50: #eaf0f7;
  --teal: #16A6A1;
  --teal-700: #0f7f7b;   /* AA text contrast on white */
  --teal-50: #e6f6f5;
  --white: #FFFFFF;
  --bg: #F4F7FA;
  --text: #253247;
  --muted: #64748B;
  --border: #E2E8F0;
  --border-strong: #cbd5e1;
  --danger: #b42318;
  --danger-50: #fdecea;
  --warning: #9a6700;
  --warning-50: #fff6db;
  --success: #12715b;
  --success-50: #e5f6f0;
  --info: #1d4f8a;
  --info-50: #eaf2fb;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(23, 59, 99, .06);
  --shadow: 0 1px 3px rgba(23, 59, 99, .08), 0 4px 12px rgba(23, 59, 99, .05);
  --shadow-lg: 0 8px 28px rgba(23, 59, 99, .12);
  --focus: 0 0 0 3px rgba(22, 166, 161, .45);
  --container: 1200px;
  --gutter: 20px;
  --tap: 44px;
  --header-h: 68px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--teal-700); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--navy-50); padding: .1em .35em; border-radius: 4px; }
mark { background: var(--teal-50); color: inherit; padding: 0 1px; border-radius: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }

/* Focus */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; box-shadow: var(--focus); border-radius: 4px; }
.input:focus-visible, .search-input:focus-visible { outline: none; }

/* Accessibility helpers */
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px;
  background: var(--navy); color: var(--white); border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 820px; }
.container-mid { max-width: 1000px; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-white { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-navy { background: var(--navy); color: #dbe6f2; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.page-header { padding: 32px 0 24px; }
.page-header h1 { margin-bottom: .35em; }
.page-header .lead { margin-bottom: 0; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 70ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.section-head h2 { margin-bottom: .25em; }
.section-head p { color: var(--muted); margin: 0; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; min-height: var(--tap); }
.layout-sidebar { display: grid; gap: 32px; }
@media (min-width: 900px) { .layout-sidebar { grid-template-columns: minmax(0, 1fr) 320px; } }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 24px; }

/* Grids */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------- Demo strip ---------- */
.demo-strip { background: var(--warning-50); color: #5c4400; border-bottom: 1px solid #f1dfa6; font-size: .875rem; }
.demo-strip .container { display: flex; align-items: center; gap: 8px; padding-top: 6px; padding-bottom: 6px; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; min-height: var(--tap); flex-shrink: 0; }
.logo img { display: block; height: 34px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap;
}
.main-nav a:hover { background: var(--bg); color: var(--navy); }
.main-nav a.is-active, .main-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--navy); cursor: pointer;
}
.icon-btn:hover { background: var(--bg); border-color: var(--border-strong); }
.icon-btn[aria-expanded="true"] { background: var(--navy-50); border-color: var(--navy); }
.country-select { position: relative; display: inline-flex; align-items: center; }
.country-select-icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; display: flex; }
.country-select select {
  appearance: none; -webkit-appearance: none; min-height: var(--tap); padding: 0 32px 0 34px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-size: .9rem; cursor: pointer; color: var(--text); width: 190px; max-width: 100%; text-overflow: ellipsis;
}
.country-select select:hover { border-color: var(--border-strong); }
.header-search { border-top: 1px solid var(--border); background: var(--white); padding: 14px 0; box-shadow: var(--shadow); }
.country-select-mobile { display: none; }

/* Desktop nav >= 1100 ; compact header below */
@media (max-width: 1099.98px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 8px var(--gutter) 16px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 0 8px; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 1rem; }
  .main-nav a.is-active, .main-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--teal); padding-left: 14px; }
  .country-select-mobile { display: flex; margin-top: 12px; }
  .country-select-mobile select { width: 100%; }
  .country-select-desktop { display: none; }
  .header-inner { position: static; }
  .site-header { position: sticky; }
}
@media (min-width: 1100px) {
  .menu-toggle { display: none; }
  .main-nav { margin-left: 16px; }
}
@media (max-width: 639.98px) {
  :root { --gutter: 16px; --header-h: 60px; }
  .logo img { height: 30px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d6e6; margin-top: 48px; padding: 48px 0 24px; font-size: .95rem; }
.site-footer a { color: #e6eef7; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer .logo img { filter: brightness(0) invert(1); height: 30px; }
.footer-brand { margin-bottom: 32px; max-width: 460px; }
.footer-brand p { margin: 8px 0 0; color: #b4c4d8; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-title { color: var(--white); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .875rem; color: #a9bbd0;
}
.footer-bottom p { margin: 0; }
.site-footer .country-select select { width: 220px; background-color: var(--navy-700); color: var(--white); border-color: rgba(255,255,255,.25); }
.site-footer .country-select-icon { color: #a9bbd0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radius-pill); font-weight: 600; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--navy-700); color: var(--white); }
.btn-secondary { background: var(--teal-700); color: var(--white); }
.btn-secondary:hover:not(:disabled) { background: #0b6966; color: var(--white); }
.btn-outline { background: var(--white); color: var(--navy); border-color: var(--border-strong); }
.btn-outline:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); background: var(--navy-50); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover:not(:disabled) { background: var(--navy-50); color: var(--navy); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: #8f1c13; color: var(--white); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; }
@media (pointer: coarse) { .btn-sm { min-height: var(--tap); } }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; min-height: var(--tap); color: var(--teal-700); }
.link-arrow:hover { color: var(--navy); }

/* ---------- Search ---------- */
.search-form { display: flex; gap: 10px; align-items: stretch; width: 100%; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.search-input {
  width: 100%; min-height: 56px; padding: 0 18px 0 48px; border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  background: var(--white); font-size: 1.05rem; color: var(--text); box-shadow: var(--shadow-sm);
}
.search-input::placeholder { color: #8391a7; }
.search-input:focus { border-color: var(--teal); box-shadow: var(--focus); }
.search-form .btn { min-height: 56px; border-radius: var(--radius); padding: 0 24px; }
.search-form-compact .search-input, .search-form-compact .btn { min-height: 48px; }
.search-lg .search-input { min-height: 62px; font-size: 1.1rem; }
.search-lg .btn { min-height: 62px; }
@media (max-width: 639.98px) {
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; }
  .search-form-compact { flex-direction: row; }
  .search-form-compact .btn { width: auto; }
}

/* Autocomplete */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 360px; overflow-y: auto; text-align: left;
}
.ac-option { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.ac-option:hover, .ac-option[aria-selected="true"] { background: var(--navy-50); }
.ac-icon { display: flex; color: var(--teal-700); }
.ac-text { display: flex; flex-direction: column; min-width: 0; }
.ac-name { font-weight: 600; color: var(--navy); }
.ac-meta { font-size: .8rem; color: var(--muted); }
.ac-empty { padding: 12px; color: var(--muted); font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 56px 0 48px; text-align: center; }
.hero h1 { margin-bottom: .4em; }
.hero .lead { margin: 0 auto 28px; }
.hero-search { max-width: 760px; margin: 0 auto; }
.hero-note { margin: 18px auto 0; font-size: .875rem; color: var(--muted); max-width: 640px; }
.quick-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; list-style: none; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--bg); border: 1px solid var(--border); color: var(--navy); font-size: .9rem; font-weight: 500; text-decoration: none;
}
.chip:hover { border-color: var(--teal); color: var(--navy); background: var(--teal-50); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
@media (pointer: coarse) { .chip { min-height: var(--tap); } }
@media (max-width: 639.98px) { .hero { padding: 36px 0 32px; } }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.card h3 { margin: 0; font-size: 1.075rem; }
.card h3 a { text-decoration: none; color: var(--navy); }
.card h3 a:hover { color: var(--teal-700); text-decoration: underline; }
.card-text { color: var(--muted); font-size: .935rem; margin: 0; }
.card-actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-link:hover, a.card:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.card-pad-lg { padding: 28px; }
.card-flat { box-shadow: none; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .85rem; color: var(--muted); }
.meta > span { display: inline-flex; align-items: center; gap: 4px; }
.company-card-top { display: flex; align-items: center; gap: 14px; }
.company-card-title { min-width: 0; }
.company-card-title h3 { overflow-wrap: anywhere; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
  width: 48px; height: 48px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: contain; }
.avatar-initials { background: var(--navy-50); color: var(--navy); font-weight: 700; font-size: 1rem; letter-spacing: .02em; border-color: #d3deeb; }
.avatar-sm { width: 40px; height: 40px; font-size: .875rem; border-radius: 10px; }
.avatar-lg { width: 80px; height: 80px; font-size: 1.6rem; border-radius: var(--radius-lg); }

a.category-card { flex-direction: row; align-items: flex-start; gap: 14px; text-decoration: none; color: var(--text); }
.category-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0;
  border-radius: var(--radius); background: var(--teal-50); color: var(--teal-700);
}
.category-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.category-card-title { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
a.category-card:hover .category-card-title { color: var(--teal-700); }
.category-count { font-size: .825rem; font-weight: 600; color: var(--teal-700); margin-top: 2px; }
/* Two-level categories: homepage card with subcategory links, subcategory chips on category pages */
.category-card.has-subs { gap: 10px; }
.category-card-main { display: flex; flex-direction: row; align-items: flex-start; gap: 14px; text-decoration: none; color: var(--text); }
.category-card-main:hover .category-card-title { color: var(--teal-700); }
.category-sub-links { list-style: none; margin: 0; padding: 0 0 0 62px; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .875rem; }
.category-sub-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--teal-700); font-weight: 600; text-decoration: none; }
.category-sub-links a:hover { text-decoration: underline; }
@media (pointer: coarse) { .category-sub-links a { min-height: var(--tap); } }
.chip-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--white); border: 1px solid var(--border); font-size: .775rem; font-weight: 700; color: var(--teal-700); }
/* Category icons: Lucide SVGs (assets/icons/lucide/) drawn as masks in currentColor (components/icons.js categoryIcon);
   emoji fallback when a category has no (known) icon. */
.licon {
  display: inline-block; flex-shrink: 0; vertical-align: middle; background-color: currentColor;
  -webkit-mask: var(--licon) center / contain no-repeat; mask: var(--licon) center / contain no-repeat;
}
.cat-emoji { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; vertical-align: middle; }
.chip .licon, .chip .cat-emoji { margin-right: 2px; }
/* /categories/ index (pages/categories.js) */
.cat-letter { margin-bottom: 28px; scroll-margin-top: 80px; }
.cat-letter-h { font-size: 1.25rem; color: var(--navy); border-bottom: 2px solid var(--border); padding-bottom: 6px; margin: 0 0 14px; }
.cat-index-item { gap: 10px; scroll-margin-top: 80px; }
.cat-index-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .cat-index-title a { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.cat-index-title .category-icon { width: 40px; height: 40px; }
.cat-index-subs { list-style: none; margin: 0; padding: 0 0 0 52px; display: flex; flex-direction: column; gap: 2px; font-size: .925rem; }
.cat-index-subs a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; color: var(--teal-700); font-weight: 600; text-decoration: none; }
.cat-index-subs a:hover { text-decoration: underline; }
@media (pointer: coarse) { .cat-index-subs a { min-height: var(--tap); } }

.guide-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--navy-50); color: var(--navy); }

.step-card { text-align: left; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: var(--white); font-weight: 700;
}

/* Row lists */
.row-list { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.row-item:last-child { border-bottom: 0; }
.row-item:hover { background: #fafcfd; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; text-decoration: none; color: var(--navy); }
.row-title:hover { text-decoration: underline; color: var(--teal-700); }
.row-text { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 639.98px) { .row-item .btn { display: none; } }

/* Info / contact detail list (company profile) */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list > li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-list > li:last-child { border-bottom: 0; }
.info-list .icon { color: var(--teal-700); margin-top: 3px; }
.info-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.info-value { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.phone-number { font-size: 1.35rem; font-weight: 700; color: var(--navy); letter-spacing: .01em; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
dl.kv dt { color: var(--muted); font-weight: 500; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: .775rem; font-weight: 600; line-height: 1.4; border: 1px solid transparent; white-space: nowrap; vertical-align: middle;
}
.badge-neutral { background: var(--bg); color: var(--muted); border-color: var(--border); }
.badge-navy { background: var(--navy-50); color: var(--navy); }
.badge-teal { background: var(--teal-50); color: var(--teal-700); }
.badge-demo { background: var(--warning-50); color: #6b4d00; border-color: #f0d998; }
.badge-verified { background: var(--success-50); color: var(--success); border-color: #bfe5d7; }
.badge-pending { background: var(--info-50); color: var(--info); border-color: #c9dcf2; }
.badge-unverified { background: var(--bg); color: var(--muted); border-color: var(--border); }
.badge-outdated { background: var(--danger-50); color: var(--danger); border-color: #f5c6c1; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .875rem; margin: 20px 0 8px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.breadcrumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: var(--border-strong); }
.breadcrumbs a { color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 500; }

/* ---------- Pagination ---------- */
.pagination { margin: 32px 0 8px; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination a, .pagination span.is-disabled, .pagination-gap {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: var(--tap); min-height: var(--tap);
  padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white);
  color: var(--navy); text-decoration: none; font-weight: 500;
}
.pagination a:hover { border-color: var(--navy); background: var(--navy-50); }
.pagination a.is-current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pagination .is-disabled { color: #a0abbb; cursor: not-allowed; }
.pagination-gap { border: 0; background: transparent; min-width: 24px; padding: 0; }
@media (max-width: 639.98px) { .pagination a[rel] span, .pagination .is-disabled span { display: none; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .925rem; color: var(--text); }
.req { color: var(--danger); }
.optional { color: var(--muted); font-weight: 400; font-size: .85rem; }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text); font-size: 1rem; line-height: 1.4;
}
textarea.input, .field textarea { min-height: 120px; resize: vertical; }
select.input, .field select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: var(--focus); outline: none; }
.input:disabled { background: var(--bg); color: var(--muted); }
.help { margin: 0; font-size: .85rem; color: var(--muted); }
.field-error { margin: 0; font-size: .85rem; color: var(--danger); font-weight: 500; }
.has-error .input, .has-error input, .has-error select, .has-error textarea, .input[aria-invalid="true"] { border-color: var(--danger); }
.field-check label { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 500; cursor: pointer; }
.field-check input, input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--navy); }
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 0; }
legend { font-weight: 600; padding: 0 6px; color: var(--navy); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Alerts / toasts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: .95rem; }
.alert > div > :last-child { margin-bottom: 0; }
.alert .icon { margin-top: 2px; }
.alert-info { background: var(--info-50); border-color: #c9dcf2; color: #183f6d; }
.alert-success { background: var(--success-50); border-color: #bfe5d7; color: #0e5a48; }
.alert-warning { background: var(--warning-50); border-color: #f0d998; color: #5c4400; }
.alert-error { background: var(--danger-50); border-color: #f5c6c1; color: #8a1c13; }
.toasts { position: fixed; z-index: 500; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 12px 16px; border-radius: var(--radius); background: var(--navy); color: var(--white); box-shadow: var(--shadow-lg); font-size: .95rem; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

/* ---------- Loading / empty / error ---------- */
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px 16px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #edf1f6 25%, #f6f8fb 50%, #edf1f6 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card { min-height: 170px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: var(--radius); }
.skeleton-line { height: 12px; width: 100%; }
.skeleton-row { height: 64px; border-radius: var(--radius); }
.w-60 { width: 60%; } .w-80 { width: 80%; }
.empty-state, .error-state {
  text-align: center; padding: 48px 24px; background: var(--white); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.error-state { border-style: solid; border-color: #f5c6c1; }
.empty-state p, .error-state p { max-width: 52ch; margin: 0 0 12px; }
.empty-state-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--navy-50); color: var(--navy); margin-bottom: 8px; }
.error-state .empty-state-icon { background: var(--danger-50); color: var(--danger); }
.empty-state-title { font-size: 1.2rem; margin: 0 0 4px; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.table { width: 100%; border-collapse: collapse; font-size: .935rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: #f8fafc; font-weight: 600; color: var(--navy); font-size: .825rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- A–Z bar ---------- */
.az-bar { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.az-bar a, .az-bar button, .az-bar span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); color: var(--navy);
  font-weight: 600; font-size: .875rem; text-decoration: none; cursor: pointer;
}
.az-bar a:hover, .az-bar button:hover { border-color: var(--navy); background: var(--navy-50); }
.az-bar .is-active, .az-bar [aria-current="true"], .az-bar [aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.az-bar .is-disabled, .az-bar [aria-disabled="true"] { color: #b0bac8; background: var(--bg); cursor: default; }
@media (pointer: coarse) { .az-bar a, .az-bar button, .az-bar span { min-width: var(--tap); height: var(--tap); } }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: grid; gap: 12px; padding: 16px; margin-bottom: 20px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-lg); align-items: end;
}
@media (min-width: 640px) { .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .filter-bar { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.filter-bar .field > label { font-size: .825rem; color: var(--muted); }
.results-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--muted); font-size: .925rem; }

/* ---------- Prose (Markdown content) ---------- */
.prose { color: var(--text); font-size: 1.0625rem; line-height: 1.75; max-width: 72ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 .6em; }
.prose h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose pre { margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose a { color: var(--teal-700); font-weight: 500; }
.prose a:hover { color: var(--navy); }
.prose blockquote { border-left: 4px solid var(--teal); background: var(--teal-50); margin-left: 0; padding: 12px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose pre { background: #0f2741; color: #e6eef7; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.prose th { background: #f8fafc; }
.prose img { border-radius: var(--radius); }
.prose hr { margin: 2em 0; }

/* ---------- FAQ (details/summary) ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 600; color: var(--navy); list-style: none; position: relative; min-height: var(--tap); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--teal-700); }
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-answer { padding: 0 18px 16px; color: var(--text); }

/* ---------- Notices ---------- */
.disclaimer { font-size: .875rem; color: var(--muted); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.callout { background: var(--navy-50); border-radius: var(--radius-lg); padding: 24px; }

/* 404 */
.notfound { text-align: center; padding-top: 72px; padding-bottom: 72px; }
.notfound .code { font-size: 4.5rem; font-weight: 800; color: var(--teal); line-height: 1; margin-bottom: 12px; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; } .text-right { text-align: right; }
.muted, .text-muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.fw-600 { font-weight: 600; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 40px; }
.w-100 { width: 100%; }
.hide-sm { } @media (max-width: 639.98px) { .hide-sm { display: none !important; } }
.show-sm { display: none !important; } @media (max-width: 639.98px) { .show-sm { display: initial !important; } }
