/* DataLookout dashboard -- components: badges, cards, tables, buttons, forms, nav pieces. Needs tokens.css. */
/* === Badges (DESIGN.md §5 Severity): sentence case, ink on tint, three severities. No other coloured pills. === */
.badge {
  font-family: var(--dl-font-sans);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0;
  padding: 0.15em 0.5em;
  border-radius: var(--dl-radius-sm);
  line-height: 1.4;
  text-transform: none;
}
/* Plan badges: neutral, no purple */
.badge-free    { background: var(--dl-minor-tint); color: var(--dl-minor-ink); }
.badge-starter { background: var(--dl-action-tint); color: var(--dl-action-ink); }
.badge-pro     { background: var(--dl-action-tint); color: var(--dl-action-ink); }
/* Trial status: a word in ink with a small graphite square. Filled = open (recruiting, active,
   enrolling, not yet recruiting), outlined = closed (completed, terminated, withdrawn, suspended).
   Colour is reserved for severity (an EVENT); status is a STATE. */
[class*="badge-status-"] {
  background: transparent;
  color: var(--dl-ink-1);
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
[class*="badge-status-"]::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 1px;
  background: var(--dl-ink-3);
  flex: none;
}
.badge-status-completed::before, .badge-status-terminated::before,
.badge-status-withdrawn::before, .badge-status-suspended::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--dl-ink-3);
}
.badge-status-terminated, .badge-status-suspended, .badge-status-withdrawn { color: var(--dl-ink-2); }
.badge-change {
  background: var(--dl-notable-tint);
  color: var(--dl-notable-ink);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15em 0.45em;
  letter-spacing: 0;
}
/* Change severity badges — sentence case is applied at the PRODUCER (dlSevWord / |capitalize),
   never by CSS text-transform, which would Title Case a multi-word chip like "3 protocol changes". */
.badge-severity-critical, .badge-severity-notable, .badge-severity-minor { display: inline-block; text-transform: none; }
.badge-severity-critical { background: var(--dl-critical-tint); color: var(--dl-critical-ink); }
.badge-severity-notable  { background: var(--dl-notable-tint); color: var(--dl-notable-ink); }
.badge-severity-minor    { background: var(--dl-minor-tint); color: var(--dl-minor-ink); }

/* Severity square mark (DESIGN.md §5 Docket): the row-level severity signal. Carries its word
   as visually-hidden text (`<span class="dl-mark critical"><span class="visually-hidden">critical</span></span>`)
   so screen readers, curl and crawlers still read the severity — colour is never the only channel. */
.dl-mark { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--dl-minor); vertical-align: 1px; flex: none; position: relative; overflow: hidden; }
/* Typed entity hits above a result list (search_results.html): kind eyebrow, name in link colour, count. */
.dl-feed-scope { font-weight: 400; font-size: var(--dl-fs-xs); color: var(--dl-ink-3); margin-left: 8px; }
.dl-feed-more { font-weight: 400; font-size: var(--dl-fs-xs); margin-left: 10px; white-space: nowrap; }
.dl-hits { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.dl-hit { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 12px; border: 1px solid var(--dl-rule-strong); border-radius: var(--dl-radius-sm); background: var(--dl-panel); color: var(--dl-ink-1); text-decoration: none; font-size: var(--dl-fs-sm); }
.dl-hit:hover { background: var(--dl-action-tint); border-color: var(--dl-action); text-decoration: none; color: var(--dl-ink-1); }
.dl-hit b { font-weight: 600; color: var(--dl-link); }
.dl-hit-kind { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dl-ink-3); }
.dl-hit-count { font-size: 0.78rem; color: var(--dl-ink-3); font-variant-numeric: tabular-nums; }
.dl-empty { font-size: .875rem; color: var(--dl-ink-2); padding: 12px 0; }
.dl-empty small { display: block; color: var(--dl-ink-3); margin-top: 4px; }
.dl-mark.critical { background: var(--dl-critical); }
.dl-mark.notable  { background: var(--dl-notable); }
.dl-mark.minor    { background: var(--dl-minor); }

/* Watchlist cards: no coloured side stripes (DESIGN.md §5 Card). The classes stay for JS. */
.sponsor-card.severity-critical, .sponsor-card.severity-notable { border-left: 1px solid var(--dl-rule); }

/* Change timeline (trial detail) */
.change-timeline { position: relative; padding-left: 24px; }
.change-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--dl-rule-strong);
}
.change-timeline-item { position: relative; padding: 8px 0; }
.change-timeline-item + .change-timeline-item { border-top: none; }
.change-timeline-dot {
  position: absolute;
  left: -20px;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 1px;
  z-index: 1;
}
.change-timeline-dot.critical { background: var(--dl-critical); }
.change-timeline-dot.notable  { background: var(--dl-notable); }
.change-timeline-dot.minor    { background: var(--dl-minor); }
.change-date-header {
  font-family: var(--dl-font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--dl-ink-3);
  padding: 12px 0 4px;
  position: relative;
}
/* Old -> new values (DESIGN.md §4): no green verdicts. Old is struck in ink-3, new is ink-1 500. */
.change-old { color: var(--dl-ink-3); text-decoration: line-through; text-decoration-color: var(--dl-ink-mute); font-size: 0.875rem; }
.change-new { color: var(--dl-ink-1); font-weight: 500; font-size: 0.875rem; }
.change-delta-up, .change-delta-down { color: var(--dl-ink-1); font-weight: 600; font-size: 0.84rem; }

/* === Page head + snapshot caption + CTA (DESIGN.md §5; used by the demo partials, 3.3) === */
.dl-page-title { font-size: var(--dl-fs-xl); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; margin: 2px 0 8px; }
.dl-demo-head { margin: 8px 0 12px; padding: 16px 20px; background: var(--dl-action-tint); border: 1px solid #cfe4d7; border-radius: var(--dl-radius-sm); display: flex; flex-wrap: wrap; align-items: flex-start; }
.dl-demo-head .text-label { color: var(--dl-action); }
/* Entity (disease/sponsor) headers run larger than the generic 22px page title: 28px
   keeps the trial page (30px) the largest while lifting the entity pages clearly above
   list/utility pages. Scoped: bumping .dl-page-title itself would resize 14
   templates (Pulse, watchlist, account, ...). */
.dl-demo-head .dl-page-title { margin-top: 4px; font-size: var(--dl-fs-xxl); }
/* Header CTA layout: the head's
   children are reordered by breakpoint. Mobile (default, no media query): title,
   snapshot, CTA, as-of -- CTA sits below the snapshot line. Desktop (>=640px): title
   and CTA share the first line (both non-100%-width flex items), snapshot/as-of drop
   to their own full-width lines below. */
.dl-demo-head-top { order: 1; flex: 1 1 100%; }
.dl-demo-head-cta { order: 3; flex: 0 0 auto; margin-top: 10px; white-space: nowrap; }
.dl-snapshot { order: 2; }
.dl-asof { order: 4; }
@media (min-width: 640px) {
  .dl-demo-head-top { flex: 1 1 auto; }
  .dl-demo-head-cta { order: 2; margin-top: 2px; margin-left: auto; align-self: center; }
  .dl-snapshot { order: 3; }
  .dl-asof { order: 4; }
}
.dl-snapshot { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.875rem; color: var(--dl-ink-3); margin: 0 0 4px; flex: 1 1 100%; }
.dl-snapshot b { font-weight: 600; color: var(--dl-action); font-variant-numeric: tabular-nums; }
.dl-asof { font-size: var(--dl-fs-xs); color: var(--dl-ink-3); flex: 1 1 100%; }
.dl-muted { color: var(--dl-ink-3); }
/* Plan-limit CTA: the button IS the upgrade action, so it keeps full primary
   weight; the note below it drops the xs/muted treatment that made it easy to
   miss. Rendered by dlRenderPlanLimit() in static/js/app.js. */
.dl-limit-note { font-size: var(--dl-fs-sm); color: var(--dl-ink-2); }
/* Right-aligned ONLY inside the disease/sponsor header action stack, which is itself
   flex-end. The trial page's track block is left-aligned body content, so alignment
   belongs to the container, not to the shared note class. */
.dl-head-actions .dl-limit-note { max-width: 26ch; text-align: right; }
@media (max-width: 640px) {
  .dl-head-actions .dl-limit-note { text-align: left; max-width: none; }
}
.dl-tag { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dl-notable-ink); margin-left: 4px; }
.dl-footnote { font-size: var(--dl-fs-xs); color: var(--dl-ink-3); padding: 8px 0 0; }
.dl-linklist { font-size: 0.875rem; line-height: 1.9; margin: 6px 0 0; }
.table tr.dl-group-row td { background: var(--dl-panel-2); font-size: var(--dl-fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--dl-ink-3); padding: 0.3rem 0.75rem; }
.dl-phase-table td { border-bottom: 1px solid var(--dl-rule); }
.dl-phase-table .dl-phase-label { width: 130px; font-weight: 500; }
.dl-phase-table .dl-phase-bar { padding-top: 0.6rem; }
.dl-phase-table .dl-phase-bar > div { height: 8px; min-width: 2px; background: var(--dl-ink-2); border-radius: 1px; }
.dl-phase-table .dl-num { width: 72px; }
.dl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dl-cta { margin: 32px 0 40px; padding: 16px 20px; border: 1px solid var(--dl-rule); border-radius: var(--dl-radius-sm); background: var(--dl-panel-2); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dl-cta-title { font-weight: 600; margin-bottom: 2px; }
.dl-cta-sub { font-size: 0.84rem; color: var(--dl-ink-2); }

/* === Cards (DESIGN.md §5 Section): a bounded surface only where it earns it. Bootstrap .card
   becomes a section — a 2px ink rule on top, no shadow, no border box, no uppercase header. === */
.card {
  border: 0;
  border-top: 2px solid var(--dl-ink-1);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
  --bs-card-bg: transparent;
  --bs-card-cap-bg: transparent;
}
/* Bootstrap's gray count pill (.bg-secondary) reads as a button; render it as the quiet count chip. */
.badge.bg-secondary, .badge.text-bg-secondary, .badge.bg-light, .badge.bg-dark {
  background: transparent !important;
  color: var(--dl-ink-3) !important;
  border: 1px solid var(--dl-rule-strong);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.card-header {
  background: transparent;
  color: var(--dl-ink-1);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 0.6rem 0 0.5rem;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--dl-rule);
}
.card-header a { color: var(--dl-link); font-size: 0.8rem; font-weight: 400; }
.card-header a:hover { color: var(--dl-link-hover); }
.card-header .badge { font-size: 0.72rem; vertical-align: middle; text-transform: none; }
.card-body { padding: 0.75rem 0; }
.card-footer { background: transparent; border-top: 1px solid var(--dl-rule); padding: 0.6rem 0; }
.card + .card, .card.mt-3, .card.mt-4 { margin-top: 1.75rem !important; }
/* A card INSIDE a card (amendment items, list rows) is a quiet box, never a second section rule. */
.card .card { border: 1px solid var(--dl-rule); border-radius: var(--dl-radius-sm); background: var(--dl-panel); margin-top: 0 !important; }
.card .card + .card { margin-top: 6px !important; }
.card .card .card-body { padding: 0.5rem 0.75rem; }
/* A form still wants a boundary: opt in with .dl-boxed */
.card.dl-boxed { border: 1px solid var(--dl-rule); border-top: 2px solid var(--dl-ink-1); border-radius: var(--dl-radius-sm); background: var(--dl-panel); }
.card.dl-boxed .card-header, .card.dl-boxed .card-body, .card.dl-boxed .card-footer { padding-left: 1rem; padding-right: 1rem; }

/* === Tables (DESIGN.md §5 Table): panel-2 header band, 2px ink rule under it, no zebra === */
.table {
  font-size: var(--dl-fs-sm);
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  --bs-table-bg: var(--dl-panel);
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: var(--dl-panel-2);
}
.table thead {
  background: var(--dl-panel-2);
  font-size: var(--dl-fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dl-ink-3);
}
.table thead th {
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--dl-ink-1);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--dl-panel-2);
  z-index: 1;
  font-weight: 500;
}
.table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--dl-rule);
  vertical-align: middle;
  color: var(--dl-ink-1);
}
.table tbody tr:last-child td { border-bottom: 1px solid var(--dl-rule); }
.table-hover tbody tr:hover, .table-hover tbody tr:hover td { background: var(--dl-panel-2); }
.table tbody tr:nth-child(even), .table-striped tbody tr:nth-of-type(odd) > * { background: transparent; }
.table tbody tr:nth-child(even):hover { background: var(--dl-panel-2); }
.table-sm td, .table-sm th { padding: 0.35rem 0.6rem; }
.table-borderless td, .table-borderless th { border: none; }
.table td.dl-num, .table th.dl-num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.dl-date { font-family: var(--dl-font-mono); font-size: 0.78rem; color: var(--dl-ink-3); white-space: nowrap; }

/* Opt-in row-stacking primitive (DESIGN.md §5 Table): for tables whose rows are records
   a phone user reads one at a time. Default table behavior stays horizontal scroll
   inside .dl-scroll; add class="table dl-stack" and a data-th on every <td> to opt in. */
@media (max-width: 640px) {
  .table.dl-stack, .table.dl-stack thead, .table.dl-stack tbody,
  .table.dl-stack th, .table.dl-stack td, .table.dl-stack tr { display: block; }
  .table.dl-stack thead { display: none; }
  .table.dl-stack tbody tr { border-bottom: 1px solid var(--dl-rule); padding: 8px 0; }
  .table.dl-stack tbody td { border: none; padding: 2px 0; }
  .table.dl-stack td.dl-num, .table.dl-stack td.dl-date { text-align: left; }
  .table.dl-stack tbody td[data-th]:not([data-th=""])::before {
    content: attr(data-th); display: block; font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--dl-ink-3); margin-bottom: 1px;
  }
}

/* NCT ID monospace links */
/* Registry-verbatim value: mono. A plain span is ink-2; when it is the link, it is link blue (DESIGN.md §3). */
.nct-id {
  font-family: var(--dl-font-mono);
  font-size: 0.8125rem;
  color: var(--dl-ink-2);
  font-weight: 500;
  letter-spacing: 0;
}
a.nct-id { color: var(--dl-link); text-decoration: none; }
a.nct-id:hover { color: var(--dl-link-hover); text-decoration: underline; }

/* === Hero Search: paper, not a dark band === */
.hero {
  background: linear-gradient(180deg, var(--dl-action-tint) 0%, var(--dl-canvas) 100%);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--dl-rule);
}
.hero h1 {
  color: var(--dl-ink-1);
  font-weight: 600;
  font-size: var(--dl-fs-xxl);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.hero p {
  color: var(--dl-ink-3);
  font-size: 0.95rem;
  line-height: 1.5;
}
.search-input {
  font-family: var(--dl-font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--dl-rule-strong);
  border-radius: var(--dl-radius-sm);
  background: var(--dl-panel);
  transition: border-color var(--dl-transition), box-shadow var(--dl-transition);
}
.search-input:focus {
  border-color: var(--dl-link);
  box-shadow: var(--dl-focus-ring);
  outline: none;
}
.search-input::placeholder { color: var(--dl-ink-3); font-weight: 400; }
.search-results-dropdown {
  position: absolute;
  width: 100%;
  z-index: 1000;
  border: 1px solid var(--dl-rule-strong);
  border-top: none;
  border-radius: 0 0 var(--dl-radius-sm) var(--dl-radius-sm);
  background: var(--dl-panel);
  max-height: 320px;
  overflow-y: auto;
  box-shadow: var(--dl-shadow-lg);
}
.search-result-item {
  padding: 0.55rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--dl-rule);
  transition: background var(--dl-motion) ease;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--dl-panel-2); }
.search-result-item .sponsor-name { font-weight: 500; font-size: 0.875rem; color: var(--dl-ink-1); }
.search-result-item .trial-count {
  font-size: 0.76rem;
  color: var(--dl-ink-3);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* === Sponsor Card === */
.sponsor-card {
  border: 1px solid var(--dl-rule);
  border-radius: var(--dl-radius-sm);
  padding: 1rem;
  background: var(--dl-panel);
  transition: border-color var(--dl-transition);
}
.sponsor-card:hover { border-color: var(--dl-rule-strong); }

/* === Buttons (DESIGN.md §5): primary = action; everything else is the quiet button === */
.btn {
  font-family: var(--dl-font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
  border-radius: var(--dl-radius-sm);
  transition: background var(--dl-transition), border-color var(--dl-transition), color var(--dl-transition);
  padding: 0.4rem 0.9rem;
}
.btn:focus-visible { box-shadow: var(--dl-focus-ring); }
.btn-primary, .btn-success {
  background: var(--dl-action);
  border-color: var(--dl-action);
  color: var(--dl-on-action);
}
.btn-primary:hover, .btn-success:hover, .btn-primary:focus, .btn-primary:active {
  background: var(--dl-action-hover);
  border-color: var(--dl-action-hover);
  color: var(--dl-on-action);
}
/* Bootstrap's :disabled falls back to its own blue; DESIGN.md §5: 50% opacity, no colour change */
.btn-primary:disabled, .btn-primary.disabled, .btn-success:disabled {
  background: var(--dl-action);
  border-color: var(--dl-action);
  color: var(--dl-on-action);
  opacity: .5;
}
.btn-outline-primary, .btn-outline-secondary, .btn-light, .btn-outline-dark {
  background: var(--dl-panel);
  color: var(--dl-ink-1);
  border-color: var(--dl-rule-strong);
}
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-light:hover, .btn-outline-dark:hover,
.btn-outline-primary:focus, .btn-outline-secondary:focus {
  background: var(--dl-panel-2);
  border-color: var(--dl-rule-strong);
  color: var(--dl-ink-1);
}
.btn-outline-primary.active, .btn-outline-secondary.active, .btn-check:checked + .btn-outline-primary, .btn-check:checked + .btn-outline-secondary {
  background: var(--dl-ink-1);
  border-color: var(--dl-ink-1);
  color: #fff;
}
.btn-outline-danger { background: var(--dl-panel); color: var(--dl-critical-ink); border-color: var(--dl-rule-strong); }
.btn-outline-danger:hover { background: var(--dl-critical-tint); color: var(--dl-critical-ink); border-color: var(--dl-rule-strong); }
.btn:disabled, .btn.disabled { opacity: .5; }
.btn-sm { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
.btn-group-sm .btn { font-size: 0.76rem; padding: 0.25rem 0.6rem; }
.btn-link { font-weight: 400; text-decoration: none; color: var(--dl-link); }
.btn-link:hover { text-decoration: underline; color: var(--dl-link-hover); }

/* === Spinner === */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  color: var(--dl-text-secondary);
  font-size: 0.84rem;
}

/* === Tab Nav === */
.nav-tabs {
  border-bottom: 1px solid var(--dl-border);
}
.nav-tabs .nav-link {
  color: var(--dl-text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color var(--dl-transition), border-color var(--dl-transition);
  margin-bottom: -1px;
}
.nav-tabs .nav-link:hover {
  color: var(--dl-text);
  border-bottom-color: var(--dl-rule-strong);
}
.nav-tabs .nav-link.active {
  color: var(--dl-text);
  font-weight: 600;
  border-bottom: 2px solid var(--dl-action);
  background: transparent;
}

/* === Plan Cards === */
.plan-card {
  border: 1px solid var(--dl-rule);
  border-radius: var(--dl-radius-sm);
  padding: 1.25rem;
  background: var(--dl-panel);
  transition: border-color var(--dl-transition);
}
.plan-card:hover { border-color: var(--dl-rule-strong); }
.plan-card.current {
  border-color: var(--dl-action);
  background: var(--dl-action-tint);
}
.plan-card .price {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--dl-text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.plan-card .price span {
  font-size: 0.9rem;
  color: var(--dl-text-secondary);
  font-weight: 400;
}

/* === Breadcrumb === */
.breadcrumb {
  font-size: 0.82rem;
  margin-bottom: 0;
}
.breadcrumb-item a { color: var(--dl-text-secondary); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--dl-blue); }
.breadcrumb-item.active { color: var(--dl-text); font-weight: 500; }

/* === List Group (sidebar lists) === */
.list-group-flush .list-group-item {
  padding: 0.5rem 0;
  font-size: 0.84rem;
  border-color: var(--dl-rule);
  background: transparent;
}
.list-group-flush .list-group-item:last-child { border-bottom: none; }

/* === Form Controls === */
.form-control, .form-select {
  background-color: var(--dl-panel);
  font-family: var(--dl-font-sans);
  font-size: 0.875rem;
  border-color: var(--dl-rule-strong);
  border-radius: var(--dl-radius-sm);
  color: var(--dl-ink-1);
  transition: border-color var(--dl-transition), box-shadow var(--dl-transition);
}
.form-control::placeholder { color: var(--dl-ink-3); }
.form-control:focus, .form-select:focus {
  border-color: var(--dl-link);
  box-shadow: var(--dl-focus-ring);
}
.form-control.is-invalid { border-color: var(--dl-critical); }
.invalid-feedback { color: var(--dl-critical-ink); }
.form-select-sm { font-size: 0.8rem; padding: 0.3rem 1.75rem 0.3rem 0.6rem; }
.form-label { font-size: 0.84rem; font-weight: 500; color: var(--dl-text); }

/* === Alerts === */
.alert { font-size: 0.84rem; border-radius: var(--dl-radius-sm); }
.alert-info, .alert-secondary, .alert-light { background: var(--dl-panel-2); border-color: var(--dl-rule); color: var(--dl-ink-2); }
.alert-warning { background: var(--dl-notable-tint); border-color: var(--dl-notable-tint); color: var(--dl-notable-ink); }
.alert-danger { background: var(--dl-critical-tint); border-color: var(--dl-critical-tint); color: var(--dl-critical-ink); }
.alert-success { background: var(--dl-action-tint); border-color: var(--dl-action-tint); color: var(--dl-action-ink); }

/* === Dropdown Menu === */
.dropdown-menu {
  font-size: 0.84rem;
  border: 1px solid var(--dl-rule);
  border-radius: var(--dl-radius-sm);
  box-shadow: var(--dl-shadow-md);
  padding: 0.35rem 0;
}
.dropdown-item { padding: 0.4rem 0.85rem; font-size: 0.84rem; }
.dropdown-item:hover { background: var(--dl-gray-50); }
.dropdown-divider { margin: 0.25rem 0; border-color: var(--dl-gray-100); }

/* === Search Mode Toggle === */
.search-mode-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--dl-border);
  background: var(--dl-surface);
  color: var(--dl-slate);
  border-radius: var(--dl-radius);
  transition: all var(--dl-transition);
}
.search-mode-btn:hover { border-color: var(--dl-rule-strong); color: var(--dl-ink-1); }
.search-mode-btn.active { background: var(--dl-ink-1); border-color: var(--dl-ink-1); color: #fff; }

/* === Responsive Tightening === LAST in this file on purpose: these override the
   unconditional .hero/.table/.card-body rules above, so they must come after them
   in cascade order (same specificity). */
@media (max-width: 768px) {
  .hero { padding: 2rem 0 1.75rem; }
  .hero h1 { font-size: 1.5rem; }
  .table { font-size: 0.8rem; }
  .table thead th { padding: 0.5rem 0.6rem; }
  .table tbody td { padding: 0.45rem 0.6rem; }
  .card-body { padding: 0.6rem 0; }
}

/* Sign-up intent line on entity pages (plan step 6, 2026-09-29): one line under the header.
   Neutral panel, not the action tint: it sits directly under the green .dl-demo-head, and
   green-on-green read as one block (Paul, 2026-09-29, chose this over an in-header or bare-line
   placement from rendered mockups). The buttons carry the colour. */
.dl-intent-bar { border: 1px solid var(--dl-rule-strong); border-radius: var(--dl-radius-sm); background: var(--dl-panel); padding: 10px 14px; margin: 12px 0 4px; font-size: .9rem; line-height: 1.5; }
.dl-intent-bar .btn { margin-left: 6px; }
