/* ==========================================================================
   ExtractHelp — Lead database (/database/…)
   1. Navy hero band   2. Hub   3. Dataset tabs & layout   4. Filters
   5. Results          6. Record page   7. Removal page   8. Motion   9. Small screens
   ========================================================================== */

/* 1. Navy hero band (matches the inner-page hero) --------------------------- */
.db-hero, .db-head {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--hero-bg); color: var(--hero-text);
}
.db-hero::before, .db-head::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .4; pointer-events: none;
  background-image: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  background-size: 52px 52px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 72% 30%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 72% 30%, #000 15%, transparent 75%);
}
.db-hero::after, .db-head::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
  width: 620px; height: 620px; inset-inline-end: -200px; top: -300px;
  background: radial-gradient(circle, rgba(248, 98, 25, .30), transparent 62%);
}
.db-hero .breadcrumbs ol, .db-head .breadcrumbs ol { margin-block-end: 22px; color: var(--hero-muted); }
.db-hero .breadcrumbs a, .db-head .breadcrumbs a { color: var(--hero-muted); }
.db-hero .breadcrumbs a:hover, .db-head .breadcrumbs a:hover { color: #fff; }
.db-hero .breadcrumbs li + li::before, .db-head .breadcrumbs li + li::before { color: rgba(255, 255, 255, .3); }
.db-hero .breadcrumbs [aria-current], .db-head .breadcrumbs [aria-current] { color: #fff; }
.db-hero h1, .db-head h1 { color: #fff; }
.db-hero .lead, .db-head .lead { color: var(--hero-muted); }
.db-hero .eyebrow, .db-head .eyebrow { color: #FFB48A; }

.db-hero { padding-block: clamp(24px, 3.5vw, 44px) clamp(56px, 6vw, 88px); }
.db-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.db-hero h1 { max-width: 14em; margin-block-end: 18px; font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.35rem); }
.db-hero .lead { max-width: 34em; margin-block-end: 28px; }

.db-search {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center;
  max-width: 640px; padding: 6px; border-radius: 18px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.db-search .select, .db-search .input { min-height: 52px; border-color: transparent; background-color: var(--surface); }
.db-search__type { width: auto; max-width: 210px; font-weight: 650; }
.db-search .btn { min-height: 52px; padding-inline: 22px; }
.db-search .btn .icon { width: 18px; height: 18px; }

.db-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 22px 0 0; padding: 0; color: #E6EBF8; font-size: .9rem; font-weight: 600; }
.db-trust li { display: inline-flex; align-items: center; gap: 8px; }
.db-trust .icon { width: 17px; height: 17px; color: #FFA066; }

.db-hero__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.db-stat {
  position: relative; display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #E6EBF8; text-decoration: none;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease);
}
a.db-stat:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 160, 102, .5); transform: translateY(-2px); }
.db-stat--total { padding: 16px 18px; background: linear-gradient(135deg, rgba(248, 98, 25, .22), rgba(255, 255, 255, .06)); border-color: rgba(255, 160, 102, .35); }
.db-stat__icon { display: grid; place-items: center; width: 34px; height: 34px; margin-block-end: 6px; border-radius: 10px; background: rgba(248, 98, 25, .18); color: #FFA066; }
.db-stat__icon .icon { width: 18px; height: 18px; }
.db-stat__label { display: flex; align-items: center; gap: 8px; color: var(--hero-muted); font-size: .84rem; font-weight: 600; }
.db-stat__num { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.db-stat--total .db-stat__num { font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.4rem); line-height: 1.15; }
.db-stat--total .db-stat__label { flex-wrap: wrap; }
.db-stat .pill { background: rgba(255, 255, 255, .1); color: #fff; }

/* 2. Hub sections ---------------------------------------------------------- */
.db-sets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.db-set { grid-column: span 2; }
.db-set:nth-child(n+4) { grid-column: span 3; }
.db-set {
  position: relative; display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.db-set::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0;
  background: var(--grad-accent); transition: opacity .25s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.db-set:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); border-color: transparent; }
.db-set:hover::before { opacity: 1; }
.db-set__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad-navy); color: #fff; box-shadow: 0 10px 20px -10px rgba(5, 28, 94, .7); }
.db-set__icon .icon { width: 24px; height: 24px; }
.db-set__count { position: absolute; top: 24px; inset-inline-end: 24px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: .76rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.db-set__title { margin: 6px 0 0; font-size: 1.2rem; }
.db-set__text { margin: 0; color: var(--muted); font-size: .95rem; }
.db-set__fields { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.db-set__fields li { padding: 3px 9px; border-radius: 999px; background: var(--navy-soft); color: var(--heading); font-size: .76rem; font-weight: 600; }
.db-set__more { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 6px; color: var(--accent-text); font-weight: 700; font-size: .92rem; }
.db-set__more .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.db-set:hover .db-set__more .icon { transform: translateX(4px); }
.db-set:hover .db-set__more .icon:dir(rtl) { transform: translateX(-4px) scaleX(-1); }

.db-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.db-step { position: relative; padding: 28px 24px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.db-step__num { position: absolute; top: 18px; inset-inline-end: 20px; color: var(--line-strong); font-size: 2.6rem; font-weight: 800; line-height: 1; }
.db-step__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-block-end: 14px; border-radius: 50%; background: var(--grad-accent); color: #fff; box-shadow: 0 10px 22px -10px rgba(248, 98, 25, .9); }
.db-step__icon .icon { width: 22px; height: 22px; }
.db-step h3 { margin: 0 0 6px; font-size: 1.08rem; }
.db-step p { margin: 0; color: var(--muted); font-size: .95rem; }
.db-cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-block-start: 28px; }
.db-cta-row--start { justify-content: flex-start; }
.db-footnote { margin: 28px 0 0; color: var(--muted); }

.db-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 18px; }
.db-fields__col { padding: 20px; border-radius: var(--r); background: var(--bg-soft); border: 1px solid var(--line); }
.db-fields__col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 1rem; }
.db-fields__col h3 .icon { width: 18px; height: 18px; color: var(--accent); }
.db-fields__col .check-list { gap: 7px; font-size: .9rem; }
.db-fields__col .check-list .icon { width: 16px; height: 16px; margin-block-start: 2px; }

.db-rules__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.db-rules h2 { margin-block-end: 14px; }
.db-rules p { color: var(--ink-muted); }
.db-rules__list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.db-rules__list li { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: var(--ink-surface); border: 1px solid var(--ink-line); color: var(--ink-text); }
.db-rules__list .icon { flex: none; width: 20px; height: 20px; margin-block-start: 2px; color: #FFA066; }
.db-rules__list b { color: #fff; }

/* 3. Dataset header, tabs and layout --------------------------------------- */
.db-head { padding-block: clamp(22px, 3vw, 36px) 0; }
.db-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; }
.db-head h1 { margin-block-end: 10px; font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); }
.db-head .lead { max-width: 40em; margin: 0; }
.db-head__copy { min-width: 0; }
.db-head__count { display: grid; justify-items: end; padding: 14px 20px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); }
.db-head__count strong { color: #fff; font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.db-head__count span { color: var(--hero-muted); font-size: .84rem; font-weight: 600; }
.db-head--record { padding-block-end: clamp(28px, 3.5vw, 44px); }
.db-head__place { display: flex; align-items: center; gap: 8px; }
.db-head__place .icon { width: 18px; height: 18px; color: #FFA066; }
.db-head .btn--ghost { border-color: rgba(255, 255, 255, .28); color: #fff; background: transparent; }
.db-head .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.db-tabs { display: flex; gap: 4px; margin-block-start: 26px; overflow-x: auto; scrollbar-width: none; }
.db-tabs::-webkit-scrollbar { display: none; }
.db-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 14px 14px 0 0; white-space: nowrap;
  color: var(--hero-muted); font-size: .93rem; font-weight: 650; text-decoration: none; transition: color .15s, background-color .15s;
}
.db-tab .icon { width: 17px; height: 17px; }
.db-tab:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.db-tab.is-active { background: var(--bg); color: var(--heading); }
.db-tab.is-active .icon { color: var(--accent); }

.db-body { padding-block-start: 28px; }
.db-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }

/* 4. Filters --------------------------------------------------------------- */
.db-filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; overscroll-behavior: auto; scrollbar-width: thin; }
.db-filters__form { display: grid; gap: 16px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.db-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.db-filters__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.db-filters__head h2 .icon { width: 18px; height: 18px; color: var(--accent); }
.db-filters__reset { color: var(--accent-text); font-size: .86rem; font-weight: 650; }
.db-filters .field label { font-size: .86rem; }
.db-filters .input, .db-filters .select { min-height: 42px; padding-block: 8px; font-size: .93rem; }
.db-check { padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); font-weight: 600; }
.db-check:hover { border-color: var(--muted); }
.db-filters__toggle { display: none; }

/* Filter groups: a quiet heading and a hairline between groups */
.db-fgroup { display: grid; gap: 12px; padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.db-fgroup__title { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .01em; }
.db-fgroup .db-check { padding: 7px 10px; }
/* The Apply button stays in reach while the list of filters scrolls */
.db-filters__apply { position: sticky; bottom: 0; margin: 0 -20px -20px; padding: 14px 20px 20px; background: linear-gradient(to bottom, transparent, var(--surface) 14px); border-end-start-radius: var(--r-lg); border-end-end-radius: var(--r-lg); }
.db-filters .badge[hidden], .db-filters__reset[hidden] { display: none; }

/* Type-ahead box */
.db-combo__box { position: relative; }
.db-combo .input { padding-inline-end: 38px; text-overflow: ellipsis; }
.db-combo__clear {
  position: absolute; inset-block-start: 50%; inset-inline-end: 6px; width: 28px; height: 28px; margin-block-start: -14px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.db-combo__clear::before, .db-combo__clear::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; border-radius: 1px; background: currentColor; }
.db-combo__clear::before { transform: rotate(45deg); }
.db-combo__clear::after { transform: rotate(-45deg); }
.db-combo__clear:hover { background: var(--bg-soft); color: var(--heading); }
.db-combo__clear[hidden] { display: none; }
.db-combo[data-loading] .db-combo__clear { visibility: hidden; }
.db-combo[data-loading] .db-combo__box::after {
  content: ""; position: absolute; inset-block-start: 50%; inset-inline-end: 13px; width: 14px; height: 14px; margin-block-start: -7px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-block-start-color: var(--accent); animation: db-spin .7s linear infinite;
}
.db-combo__list {
  position: absolute; z-index: 20; inset-inline: 0; inset-block-start: calc(100% + 6px); max-height: 264px; overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px; list-style: none; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg, var(--shadow)); scrollbar-width: thin;
}
.db-combo__list[hidden] { display: none; }
.db-combo__list [role="option"] { padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .9rem; line-height: 1.35; cursor: pointer; overflow-wrap: anywhere; }
.db-combo__list [role="option"] b { color: var(--heading); font-weight: 750; }
.db-combo__list [role="option"]:hover { background: var(--bg-soft); }
.db-combo__list [role="option"][aria-selected="true"] { background: var(--navy-soft); color: var(--heading); }
.db-combo__none { padding: 8px 10px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
@keyframes db-spin { to { transform: rotate(360deg); } }

/* 5. Results ---------------------------------------------------------------- */
.db-results { display: grid; gap: 16px; min-width: 0; }
.db-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.db-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--navy-soft); color: var(--heading); font-size: .84rem; text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.db-chip:hover { border-color: var(--heading); }
.db-chip .icon { width: 14px; height: 14px; padding: 2px; border-radius: 50%; background: var(--surface); }

.db-gate {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.db-gate__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-accent); color: #fff; }
.db-gate__icon .icon { width: 20px; height: 20px; }
.db-gate p { margin: 0; font-size: .93rem; }
.db-gate__actions { display: flex; gap: 8px; }

.db-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.db-toolbar__info { margin: 0; color: var(--muted); font-size: .9rem; }
.db-export { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.db-export__count { width: 6.5em; min-height: 36px; padding-block: 6px; }
.db-export__format { width: auto; min-height: 36px; padding-block: 6px; }
.db-export__wallet { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.db-export__wallet .icon { width: 14px; height: 14px; }

.db-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.db-rec {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding: 16px 20px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.db-rec:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }
.db-rec__main { min-width: 0; display: grid; gap: 4px; }
.db-rec__name { color: var(--heading); font-size: 1.02rem; font-weight: 750; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.db-rec__name:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.db-rec__meta { margin: 0; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-rec__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 4px; }
.db-rec__contacts { display: grid; justify-items: end; gap: 6px; }
.db-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); font-size: .78rem; font-weight: 600; }
.db-tag .icon { width: 13px; height: 13px; color: var(--muted); }
.db-tag small { color: var(--muted); font-weight: 500; }
.db-tag--accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.db-tag--accent .icon { color: var(--accent-text); }
.db-tag--rating .icon { color: #F59E0B; fill: #F59E0B; }

.db-contact { display: inline-flex; align-items: center; gap: 7px; max-width: 260px; padding: 5px 11px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--heading); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.db-contact > span { overflow: hidden; text-overflow: ellipsis; }
.db-contact .icon { flex: none; width: 15px; height: 15px; color: var(--accent); }
a.db-contact:hover { border-color: var(--accent); }
.db-contact--masked { position: relative; overflow: hidden; color: var(--muted); letter-spacing: .02em; user-select: none; }
.db-contact__lock { color: var(--muted) !important; width: 13px !important; height: 13px !important; }

.db-results { transition: opacity .18s; }
.db-results[aria-busy="true"] { opacity: .55; pointer-events: none; }
.db-toolbar__info { margin-inline-end: auto; }
.db-per { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 3px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: .84rem; }
.db-per span { padding-inline: 9px 5px; color: var(--muted); }
.db-per a { min-width: 34px; padding: 4px 9px; border-radius: 999px; color: var(--text); font-weight: 650; text-align: center; text-decoration: none; font-variant-numeric: tabular-nums; }
.db-per a:hover { color: var(--heading); background: var(--surface); }
.db-per a[aria-current] { background: var(--heading); color: var(--bg); }

.db-pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-block-start: 6px; }
.db-pager__nums { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.db-pager__num, .db-pager__step {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 42px; min-height: 42px; padding: 0 13px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line); color: var(--heading); font-size: .92rem; font-weight: 650; text-decoration: none; font-variant-numeric: tabular-nums;
  transition: border-color .15s, background-color .15s, color .15s;
}
.db-pager__step .icon { width: 16px; height: 16px; }
a.db-pager__num:hover, a.db-pager__step:hover { border-color: var(--heading); }
.db-pager__num[aria-current] { background: var(--heading); border-color: var(--heading); color: var(--bg); }
.db-pager__step[aria-disabled] { color: var(--muted); background: transparent; opacity: .6; }
.db-pager__cap { margin: 0; color: var(--muted); font-size: .86rem; text-align: center; }
.db-empty { padding: 44px 24px; text-align: center; border-radius: var(--r-lg); background: var(--bg-soft); border: 1px dashed var(--line-strong); }
.db-empty__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-block-end: 12px; border-radius: 50%; background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm); }
.db-empty__icon .icon { width: 24px; height: 24px; }
.db-empty h2 { margin: 0 0 8px; font-size: 1.2rem; }
.db-empty p { margin: 0 auto; max-width: 30em; color: var(--muted); }
.db-note { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--muted); font-size: .86rem; }
.db-note .icon { width: 16px; height: 16px; flex: none; }

/* 6. Record page ------------------------------------------------------------- */
.db-record { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.db-record__main { display: grid; gap: 18px; min-width: 0; }
.db-dl { margin: 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.db-dl__row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 14px 20px; border-block-end: 1px solid var(--line); }
.db-dl__row:last-child { border-block-end: 0; }
.db-dl__row:nth-child(even) { background: var(--bg-soft); }
.db-dl dt { color: var(--muted); font-size: .9rem; font-weight: 650; }
.db-dl dd { margin: 0; color: var(--heading); font-weight: 600; overflow-wrap: anywhere; }
.db-dl dd a { color: var(--accent-text); }
.db-ext { width: 13px; height: 13px; margin-inline-start: 4px; vertical-align: -1px; }
.db-muted { color: var(--muted); font-weight: 500; }
.db-sub { margin: 10px 0 0; font-size: 1.15rem; }
.db-techs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.db-techs li { display: inline-flex; align-items: center; gap: 6px; }
.db-techs small { color: var(--muted); font-size: .78rem; }
.db-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.db-people a { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s; }
.db-people a:hover { border-color: var(--accent); }
.db-people b { color: var(--heading); }
.db-people span { color: var(--muted); font-size: .86rem; }
.db-record__side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
.db-side-card { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.db-side-card h2 { margin: 0 0 12px; font-size: 1.02rem; }
.db-side-card p { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.db-side-card--accent { background: var(--grad-navy); border-color: transparent; color: #fff; }
.db-side-card--accent h2 { color: #fff; }
.db-side-card--accent p { color: #C3CCE6; }
.db-side-list { display: grid; gap: 10px; list-style: none; margin: 0 0 14px; padding: 0; font-size: .9rem; }
.db-side-list li { display: flex; align-items: center; gap: 8px; }
.db-side-list .icon { width: 16px; height: 16px; color: var(--accent); flex: none; }
.db-side-note { margin: 0 !important; padding-block-start: 12px; border-block-start: 1px dashed var(--line); font-size: .86rem !important; }

/* 7. Removal page ------------------------------------------------------------ */
.db-form { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.db-form .btn { justify-self: start; }
.db-done { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 28px; border-radius: var(--r-lg); background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.db-done__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--success); color: #fff; }
.db-done__icon .icon { width: 24px; height: 24px; }
.db-done h2 { margin: 0 0 8px; font-size: 1.25rem; }
.db-done p { margin: 0 0 16px; }
.form-status--error { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-weight: 600; }

/* 8. Motion ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.motion-paused) .db-hero::after, :root:not(.motion-paused) .db-head::after { animation: db-orb 18s ease-in-out infinite alternate; }
  :root:not(.motion-paused) .db-rec { animation: db-rise .5s var(--ease) backwards; }
  :root:not(.motion-paused) .db-rec:nth-child(1) { animation-delay: .02s; }
  :root:not(.motion-paused) .db-rec:nth-child(2) { animation-delay: .05s; }
  :root:not(.motion-paused) .db-rec:nth-child(3) { animation-delay: .08s; }
  :root:not(.motion-paused) .db-rec:nth-child(4) { animation-delay: .11s; }
  :root:not(.motion-paused) .db-rec:nth-child(5) { animation-delay: .14s; }
  :root:not(.motion-paused) .db-rec:nth-child(6) { animation-delay: .17s; }
  :root:not(.motion-paused) .db-rec:nth-child(7) { animation-delay: .2s; }
  :root:not(.motion-paused) .db-rec:nth-child(8) { animation-delay: .23s; }
  :root:not(.motion-paused) .db-rec:nth-child(n+9) { animation-delay: .26s; }
  :root:not(.motion-paused) .db-stat { animation: db-rise .6s var(--ease) backwards; }
  :root:not(.motion-paused) .db-stat:nth-child(2) { animation-delay: .08s; }
  :root:not(.motion-paused) .db-stat:nth-child(3) { animation-delay: .14s; }
  :root:not(.motion-paused) .db-stat:nth-child(4) { animation-delay: .2s; }
  :root:not(.motion-paused) .db-stat:nth-child(5) { animation-delay: .26s; }
  :root:not(.motion-paused) .db-stat:nth-child(6) { animation-delay: .32s; }
  :root:not(.motion-paused) .db-contact--masked::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 70%);
    transform: translateX(-100%); animation: db-shine 3.6s ease-in-out infinite;
  }
  :root:not(.motion-paused) .db-stat--total .pill--live::before { animation: db-ping 1.8s ease-out infinite; }
  :root:not(.motion-paused) .db-set__icon { transition: transform .3s var(--ease); }
  :root:not(.motion-paused) .db-set:hover .db-set__icon { transform: rotate(-6deg) scale(1.06); }
}
@keyframes db-orb { to { transform: translate(-70px, 60px) scale(1.1); } }
@keyframes db-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes db-shine { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
@keyframes db-ping { 0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, .55); } 100% { box-shadow: 0 0 0 9px rgba(21, 128, 61, 0); } }

/* 9. Small screens ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .db-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .db-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-set, .db-set:nth-child(n+4) { grid-column: auto; }
  .db-set:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .db-hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .db-record { grid-template-columns: minmax(0, 1fr); }
  .db-record__side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .db-layout { grid-template-columns: minmax(0, 1fr); }
  .db-filters { position: static; max-height: none; overflow: visible; }
  .db-filters__apply { position: static; }
  /* Phones: filters start folded (set in the HTML, so nothing moves when the page loads).
     Without JavaScript the toggle cannot work, so the filters simply stay open. */
  .js .db-filters__toggle { display: inline-flex; }
  .js .db-filters__form[data-collapsed] > :not(.db-filters__head) { display: none; }
  .db-steps { grid-template-columns: minmax(0, 1fr); }
  .db-rules__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .db-search { grid-template-columns: minmax(0, 1fr) auto; }
  .db-search__type { grid-column: 1 / -1; max-width: none; }
  .db-search .btn span { display: none; }
  .db-hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-sets { grid-template-columns: minmax(0, 1fr); }
  .db-head__count { justify-items: start; }
  .db-rec { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .db-rec__contacts { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; }
  .db-gate { grid-template-columns: auto minmax(0, 1fr); }
  .db-gate__actions { grid-column: 1 / -1; }
  .db-pager__step { padding-inline: 11px; }
  .db-filters__apply { position: static; }
  .db-dl__row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 16px; }
  .db-record__side { grid-template-columns: minmax(0, 1fr); }
  .db-done { grid-template-columns: minmax(0, 1fr); }
}

/* Flash message after an export redirect */
.db-flash { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: .93rem; font-weight: 600; }
.db-flash .icon { flex: none; width: 18px; height: 18px; margin-block-start: 1px; }
.db-stat__num--none { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .db-results { transition: none; } .db-combo[data-loading] .db-combo__box::after { animation-duration: 2s; } }

/* Email verification on the database pages (results: assets/css/verify.css) */
.db-vslot:empty { display: none; }
.db-verify-all .icon { width: 15px; height: 15px; }
.db-verify-msg[hidden] { display: none; }
.db-verify { display: grid; gap: 12px; justify-items: start; }
.db-verify__out { width: 100%; }
.db-verify__line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: .95rem; }

/* Export dialog (assets/js/database.js, 2b) */
.dbx { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg, var(--shadow)); overflow: auto; }
.dbx::backdrop { background: rgba(3, 12, 40, .55); }
.dbx__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.dbx__head h2 { margin: 0; font-size: 1.25rem; }
.dbx__x { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.dbx__x:hover { background: var(--bg-soft); color: var(--heading); }
.dbx__x .icon { width: 18px; height: 18px; }
.dbx__step { display: grid; gap: 16px; padding: 14px 22px 22px; }
.dbx__step[hidden] { display: none; }
.dbx__error { margin: 12px 22px 0; padding: 10px 14px; border-radius: 10px; background: var(--v-warn-soft); color: var(--v-warn); font-size: .92rem; font-weight: 600; }
.dbx__error[hidden] { display: none; }
.dbx__lead, .dbx__note { margin: 0; }
.dbx__note { color: var(--muted); font-size: .9rem; }
.dbx__q { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.dbx__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dbx__choice { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.dbx__choice legend { margin-block-end: 6px; padding: 0; color: var(--heading); font-size: .9rem; font-weight: 650; }
.dbx__facts { display: grid; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dbx__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; font-size: .94rem; }
.dbx__facts div + div { border-block-start: 1px solid var(--line); }
.dbx__facts dt { color: var(--muted); }
.dbx__facts dd { margin: 0; color: var(--heading); font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
.dbx__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.dbx__actions--stack { justify-content: stretch; }
.dbx__actions--stack .btn { flex: 1 1 240px; }
.dbx__bar { height: 10px; border-radius: 5px; background: var(--bg-soft); overflow: hidden; }
.dbx__bar i { display: block; width: 0; height: 100%; border-radius: 5px; background: var(--accent); transition: width .3s; }
.dbx__sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dbx__sum .vsum { padding: 9px 12px; }
.dbx__sum .vsum b { font-size: 1.3rem; }
.dbx__pick summary { width: fit-content; color: var(--accent-text); font-size: .92rem; font-weight: 700; cursor: pointer; }
.dbx__pickbar { display: flex; gap: 8px; margin-block: 10px 8px; }
.dbx__table { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
.dbx__table table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.dbx__table th { position: sticky; inset-block-start: 0; background: var(--bg-soft); color: var(--heading); font-weight: 700; text-align: start; }
.dbx__table th, .dbx__table td { padding: 7px 10px; border-block-end: 1px solid var(--line); vertical-align: top; }
.dbx__num { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .dbx__row { grid-template-columns: 1fr; } .dbx__sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Import-list filter (Include / Exclude) and One person per company -------------------------- */
.db-mlist { display: grid; gap: 10px; }
.db-mlist__hint { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.db-mlist__hint--warn { color: var(--v-warn, #b45309); }
.db-mlist__card { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 12px; background: var(--navy-soft); border: 1px solid var(--line); }
.db-mlist__icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); color: var(--accent); }
.db-mlist__icon .icon { width: 18px; height: 18px; }
.db-mlist__meta { display: grid; min-width: 0; flex: 1; }
.db-mlist__meta b { overflow: hidden; color: var(--heading); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.db-mlist__meta small { color: var(--muted); font-size: .8rem; }
.db-mlist__remove { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); }
.db-mlist__remove:hover { background: var(--surface); color: var(--heading); }
.db-mlist__remove .icon { width: 16px; height: 16px; }
.db-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.db-seg__opt { position: relative; margin: 0; cursor: pointer; }
.db-seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.db-seg__opt span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border-radius: 9px; color: var(--muted); font-size: .85rem; font-weight: 650; white-space: nowrap; }
.db-seg__opt span .icon { width: 15px; height: 15px; }
.db-seg__opt input:checked + span { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }
.db-seg__opt input:checked + span .icon { color: var(--accent); }
.db-seg__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.db-check--switch { align-items: flex-start; }
.db-check--switch span { display: grid; gap: 2px; }
.db-check--switch small { color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.35; }

.dbl { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg, var(--shadow)); overflow: auto; }
.dbl::backdrop { background: rgba(3, 12, 40, .55); }
.dbl__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.dbl__head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.2rem; }
.dbl__head h2 .icon { width: 20px; height: 20px; color: var(--accent); }
.dbl__close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.dbl__close:hover { background: var(--bg-soft); color: var(--heading); }
.dbl__close .icon { width: 18px; height: 18px; }
.dbl__body { display: grid; gap: 16px; padding: 16px 22px; }
.dbl__drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); border: 2px dashed var(--line-strong); background: var(--bg-soft); cursor: pointer; transition: border-color .15s, background .15s; }
.dbl__drop:hover, .dbl__drop.is-drop { border-color: var(--accent); background: var(--accent-soft); }
.dbl__drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dbl__drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dbl__drop-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); color: var(--accent); }
.dbl__drop-icon .icon { width: 22px; height: 22px; }
.dbl__drop span:last-child { display: grid; gap: 2px; min-width: 0; }
.dbl__drop b { overflow: hidden; color: var(--heading); text-overflow: ellipsis; white-space: nowrap; }
.dbl__drop small { color: var(--muted); font-size: .84rem; }
.dbl__paste summary { width: fit-content; color: var(--accent-text); font-size: .9rem; font-weight: 700; cursor: pointer; }
.dbl__paste textarea { margin-block-start: 8px; width: 100%; resize: vertical; }
.dbl__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dbl__cols[hidden] { display: none; }
.dbl__cols .field { display: grid; gap: 6px; align-content: start; }
.dbl__cols .check { font-size: .84rem; }
.dbl__sample { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--bg-soft); color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.dbl__mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.dbl__mode legend { grid-column: 1 / -1; margin-block-end: 8px; padding: 0; color: var(--heading); font-size: .9rem; font-weight: 650; }
.dbl__choice { display: flex; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.dbl__choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.dbl__choice input { margin-block-start: 3px; accent-color: var(--accent); }
.dbl__choice span { display: grid; gap: 3px; }
.dbl__choice b { color: var(--heading); font-size: .93rem; }
.dbl__choice small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.dbl__msg { min-height: 1.2em; margin: 0; color: var(--muted); font-size: .88rem; }
.dbl__msg.is-error { color: var(--v-warn, #b45309); font-weight: 600; }
.dbl__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }
@media (max-width: 560px) { .dbl__cols, .dbl__mode { grid-template-columns: 1fr; } }
.num-short { cursor: help; text-decoration: none; }
