/* ============================================================
   UDAP — "Aggregation Atlas" theme
   A cartographic data-instrument look: deep ink chrome, a soft
   parchment work surface, indigo→teal accents, and IBM Plex type
   (Sans for UI, Mono for data readouts). Utility hues (water /
   electric / gas) are reserved for data viz, never the chrome.
   Its own identity — no shared assets with sibling apps.
   Fonts linked from app_base.html.
   ============================================================ */

:root {
  /* Ink chrome */
  --ink:        #101728;   /* navbar, deepest */
  --ink-2:      #1b2438;
  --slate:      #33405c;

  /* Parchment work surface */
  --paper:      #eef1f6;   /* app background */
  --paper-2:    #e7ebf2;
  --surface:    #ffffff;   /* cards / tiles */
  --border:     #dbe1ec;
  --border-2:   #c7d0df;

  /* Text tokens (text never wears a series color) */
  --text:       #16203a;
  --text-2:     #55617a;
  --muted:      #8b95ab;
  --on-ink:     #f2f5fb;
  --on-ink-2:   #9aa6c2;

  /* Brand accent: indigo → teal */
  --indigo:     #4f46e5;
  --indigo-d:   #4338ca;
  --teal:       #0d9488;
  --teal-br:    #22c1b0;

  /* Data-viz ramp — utilities (applied + colorblind-validated when charts land) */
  --water:      #2563eb;
  --electric:   #d97706;
  --gas:        #dc2626;

  --radius:     14px;
  --radius-sm:  10px;
  --shadow-sm:  0 1px 2px rgba(16,24,40,.06);
  --shadow:     0 1px 3px rgba(16,24,40,.07), 0 8px 24px -8px rgba(16,24,40,.14);
  --shadow-lg:  0 12px 32px -10px rgba(16,24,40,.22);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Bootstrap retheme */
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--text);
  --bs-primary: var(--indigo);
  --bs-primary-rgb: 79,70,229;
  --bs-link-color: var(--indigo-d);
  --bs-link-hover-color: var(--indigo);
  --bs-border-color: var(--border);
  --bs-font-sans-serif: var(--font-sans);
}

body {
  background:
    url("../img/atlas-watermark.616291b4a85f.svg") repeat,
    radial-gradient(1100px 520px at 100% -10%, rgba(79,70,229,.06), transparent 60%),
    radial-gradient(900px 480px at -5% 8%, rgba(13,148,136,.06), transparent 55%),
    var(--paper);
  /* watermark scrolls with the page; the ambient glows stay fixed */
  background-attachment: scroll, fixed, fixed, fixed;
  background-size: 300px 300px, auto, auto, auto;
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { letter-spacing: -.012em; color: var(--ink); font-weight: 600; }

/* Mono for data readouts, codes, figures */
.mono, .udap-tile-value, code, .table tbody td.num { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}

/* ---- Top navbar (ink chrome) ---- */
.udap-navbar {
  background: linear-gradient(180deg, var(--ink), var(--ink-2));
  border-bottom: 1px solid rgba(34,193,176,.28);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, var(--shadow-sm);
  --bs-navbar-padding-y: .6rem;
}
.udap-brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--on-ink); font-weight: 700; letter-spacing: .06em;
  font-size: 1.15rem;
}
.udap-brand:hover { color: #fff; }
/* Wordmark: UNIT (the acronym) carries full brand weight; Track rides lighter. */
.ut-brand-track { font-weight: 500; opacity: .68; }
/* Wordmark glyph: four bars = the UNIT pillars, tinted water/electric/gas + brand indigo. */
.udap-mark {
  width: 18px; height: 18px; display: inline-block; vertical-align: -3px;
  background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.4' y='7' width='2.7' height='7.6' rx='1' fill='%232563eb'/%3E%3Crect x='5' y='4.4' width='2.7' height='10.2' rx='1' fill='%23d97706'/%3E%3Crect x='8.6' y='6' width='2.7' height='8.6' rx='1' fill='%23dc2626'/%3E%3Crect x='12.2' y='2.6' width='2.7' height='12' rx='1' fill='%234f46e5'/%3E%3C/svg%3E");
}
.udap-navbar .nav-link {
  color: var(--on-ink-2); font-weight: 500;
  padding: .35rem .95rem !important; margin-inline: .1rem;
  border-radius: 8px; position: relative;
}
.udap-navbar .nav-link:hover { color: var(--on-ink); background: rgba(255,255,255,.05); }
.udap-navbar .nav-link.active { color: #fff; }
.udap-navbar .nav-link.active::after {
  content: ""; position: absolute; left: .95rem; right: .95rem; bottom: -.62rem;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-br), var(--indigo));
}
.udap-user-badge {
  color: var(--on-ink); border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
}
.udap-user-badge:hover { color:#fff; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.28); }

/* ---- Watermark stage (aggregation atlas) ---- */
.udap-stage { position: relative; min-height: calc(100vh - 60px); }
.udap-watermark {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  color: var(--slate);
  -webkit-mask-image: radial-gradient(1200px 700px at 88% 0%, #000, transparent 78%);
          mask-image: radial-gradient(1200px 700px at 88% 0%, #000, transparent 78%);
}
.udap-stage > main { position: relative; z-index: 1; }

/* ---- Hero band ---- */
.udap-hero {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 240px at 90% -30%, rgba(79,70,229,.12), transparent 62%),
    radial-gradient(520px 220px at 0% 130%, rgba(13,148,136,.12), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.75rem;
}
.udap-hero h1 { font-size: 1.6rem; margin-bottom: .25rem; }

/* ---- Stat tiles ---- */
.udap-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
  transition: transform .12s ease, box-shadow .12s ease;
}
.udap-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.udap-tile .udap-tile-label {
  font-family: var(--font-mono);
  color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
}
.udap-tile .udap-tile-value {
  color: var(--text); font-size: 2.15rem; font-weight: 600; line-height: 1.05;
  margin-top: .25rem;
}
.udap-tile .udap-tile-hint { color: var(--text-2); font-size: .82rem; margin-top: .15rem; }
.udap-tile.accent-teal   { border-top: 3px solid var(--teal); }
.udap-tile.accent-indigo { border-top: 3px solid var(--indigo); }

/* ---- Cards ---- */
.udap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- Tables ---- */
.udap-card .table { margin-bottom: 0; --bs-table-bg: transparent; }
.udap-card .table thead th {
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
  background: var(--paper-2); border-bottom: 1px solid var(--border);
  padding-top: .7rem; padding-bottom: .7rem;
}
.udap-card .table tbody td { border-color: var(--border); vertical-align: middle; }
.udap-card .table tbody tr:hover td { background: rgba(79,70,229,.035); }
.udap-card .table tbody td.num { text-align: right; }

.badge.udap-status {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .03em;
  background: rgba(13,148,136,.12); color: var(--teal);
  border: 1px solid rgba(13,148,136,.25);
}

/* ---- Buttons ---- */
.btn { font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--indigo); --bs-btn-border-color: var(--indigo);
  --bs-btn-hover-bg: var(--indigo-d); --bs-btn-hover-border-color: var(--indigo-d);
  --bs-btn-active-bg: var(--indigo-d);
}
.btn-outline-secondary {
  --bs-btn-color: var(--text-2); --bs-btn-border-color: var(--border-2);
  --bs-btn-hover-bg: var(--paper-2); --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-border-color: var(--border-2);
}

.text-muted-2 { color: var(--text-2) !important; }

/* ============ Landing components ============ */
.udap-section { padding-block: 3.5rem; }
.udap-hero-section { padding-top: 3.5rem; padding-bottom: 1rem; }
.udap-hero-title {
  font-size: clamp(2.05rem, 4.3vw, 3.15rem);
  font-weight: 700; letter-spacing: -.022em; line-height: 1.07; color: var(--ink);
}
.udap-lead { font-size: 1.12rem; line-height: 1.6; color: var(--text-2); }
.udap-section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 700; letter-spacing: -.02em;
}

.udap-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem;
}

.udap-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .04em;
  padding: .22rem .6rem; border-radius: 999px;
  background: rgba(13,148,136,.1); color: var(--teal); border: 1px solid rgba(13,148,136,.22);
}
.udap-chip.indigo { background: rgba(79,70,229,.1); color: var(--indigo-d); border-color: rgba(79,70,229,.22); }
.udap-chip.muted  { background: var(--paper-2); color: var(--muted); border-color: var(--border); }

/* pipeline steps */
.udap-step-num {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 1.05rem;
  color: #fff; background: linear-gradient(135deg, var(--indigo), var(--teal));
  box-shadow: 0 8px 18px -8px rgba(79,70,229,.7);
}
.udap-step { display: flex; flex-direction: column; height: 100%; }
.udap-step h3 { font-size: .98rem; margin: .1rem 0 .2rem; }
.udap-step p { color: var(--text-2); font-size: .86rem; margin: 0; }
.udap-step-cite {
  display: block; margin-top: auto; padding-top: .5rem; font-size: .72rem;
  line-height: 1.35; color: var(--muted); border-top: 1px dashed var(--border);
}
.udap-step-cite b { color: var(--text-2); font-weight: 600; }

/* feature cards */
.udap-feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; height: 100%;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.udap-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.udap-feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: .9rem;
  background: rgba(79,70,229,.09); color: var(--indigo-d);
}
.udap-feature-icon.teal { background: rgba(13,148,136,.11); color: var(--teal); }
.udap-feature h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.udap-feature p { color: var(--text-2); font-size: .9rem; margin-bottom: 0; }

/* Analysis gallery — a feature card that is itself a link (icon · text · arrow) */
.udap-analysis-link {
  display: flex; align-items: flex-start; gap: .9rem; height: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
  color: inherit; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.udap-analysis-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.udap-analysis-link .udap-feature-icon { margin-bottom: 0; flex: 0 0 auto; width: 40px; height: 40px; font-size: 1.1rem; }
.udap-analysis-link h3 { font-size: .98rem; margin-bottom: .2rem; color: var(--text); }
.udap-analysis-link p { color: var(--text-2); font-size: .86rem; margin-bottom: 0; }
.udap-analysis-link > .bi-arrow-right { align-self: center; color: var(--indigo-d); opacity: .45; transition: opacity .12s ease, transform .12s ease; }
.udap-analysis-link:hover > .bi-arrow-right { opacity: 1; transform: translateX(3px); }

/* hero illustration panel */
.udap-atlas {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.1rem 1.2rem;
}

/* CTA band (dark) */
.udap-cta {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--ink), var(--ink-2));
  color: var(--on-ink); box-shadow: var(--shadow-lg); padding: 2.1rem 2.3rem;
  position: relative; overflow: hidden;
}
.udap-cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(34,193,176,.18), transparent 60%),
    radial-gradient(420px 220px at 0% 120%, rgba(79,70,229,.22), transparent 60%);
}
.udap-cta > * { position: relative; z-index: 1; }
.udap-cta h2 { color: #fff; }
.udap-cta .udap-lead { color: var(--on-ink-2); }

/* buttons */
.btn-udap-ghost {
  --bs-btn-color: var(--indigo-d); --bs-btn-border-color: var(--border-2); --bs-btn-bg: transparent;
  --bs-btn-hover-bg: rgba(79,70,229,.06); --bs-btn-hover-color: var(--indigo-d);
  --bs-btn-hover-border-color: var(--indigo);
}
.udap-cta .btn-udap-ghost {
  --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.35);
  --bs-btn-hover-bg: rgba(255,255,255,.1); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #fff;
}
.btn-lg { --bs-btn-padding-y: .6rem; --bs-btn-padding-x: 1.25rem; font-weight: 600; }

/* ============ Full-bleed section bands (break up the white) ============ */
.udap-band { padding-block: 3.75rem; }
.udap-band-tint {
  background:
    radial-gradient(760px 320px at 100% 0%, rgba(79,70,229,.09), transparent 60%),
    radial-gradient(760px 340px at 0% 100%, rgba(13,148,136,.09), transparent 60%),
    var(--paper-2);
  border-block: 1px solid var(--border);
}
.udap-band-dark {
  background: linear-gradient(180deg, var(--ink), var(--ink-2));
  color: var(--on-ink);
  position: relative; overflow: hidden;
}
.udap-band-dark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 280px at 92% -10%, rgba(34,193,176,.16), transparent 60%),
    radial-gradient(620px 300px at 5% 110%, rgba(79,70,229,.22), transparent 60%);
}
.udap-band-dark > * { position: relative; z-index: 1; }
.udap-band-dark h2 { color: #fff; }
.udap-band-dark .eyebrow { color: var(--on-ink-2); }
.udap-band-dark .text-muted-2 { color: var(--on-ink-2) !important; }
/* feature cards go translucent on the dark band */
.udap-band-dark .udap-feature {
  background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.11); box-shadow: none;
}
.udap-band-dark .udap-feature:hover {
  transform: translateY(-3px); border-color: rgba(255,255,255,.22);
  box-shadow: 0 16px 32px -14px rgba(0,0,0,.5);
}
.udap-band-dark .udap-feature h3 { color: #fff; }
.udap-band-dark .udap-feature p { color: var(--on-ink-2); }
.udap-band-dark .udap-feature-icon { background: rgba(79,70,229,.24); color: #c9cffb; }
.udap-band-dark .udap-feature-icon.teal { background: rgba(13,148,136,.26); color: #85e8dc; }

/* pricing */
.udap-price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.7rem; height: 100%; display: flex; flex-direction: column;
}
.udap-price-card.featured {
  border-color: var(--indigo);
  box-shadow: 0 0 0 1px var(--indigo), var(--shadow-lg);
}
.udap-plan-name { font-size: 1.08rem; font-weight: 600; }
.udap-price { font-family: var(--font-mono); font-weight: 600; font-size: 2.1rem; color: var(--ink); line-height: 1; }
.udap-price-unit { color: var(--muted); font-size: .85rem; }
.udap-price-features { list-style: none; padding: 0; margin: 1.1rem 0 1.4rem; }
.udap-price-features li { display: flex; gap: .55rem; align-items: flex-start; padding: .32rem 0; color: var(--text-2); font-size: .9rem; }
.udap-price-features li i { color: var(--teal); margin-top: .15rem; flex: 0 0 auto; }

/* Colored top edge on every card — a single, uniform indigo rule. */
.udap-feature,
.udap-atlas,
.udap-card,
.udap-panel,
.udap-price-card,
.udap-tile { border-top: 3px solid var(--indigo); }

/* Getting-started flow diagram — connected step nodes with arrows */
.udap-flow { display: flex; align-items: flex-start; justify-content: center; gap: .25rem; }
.udap-flow-step { flex: 1 1 0; max-width: 230px; text-align: center; }
.udap-flow-step .udap-step-num { margin-inline: auto; }
.udap-flow-step h3 { font-size: .98rem; margin: .7rem 0 .25rem; }
.udap-flow-step p { color: var(--text-2); font-size: .86rem; margin: 0; }
.udap-flow-arrow { color: var(--indigo); font-size: 1.5rem; padding-top: .55rem; flex: 0 0 auto; }
@media (max-width: 767px) {
  .udap-flow { flex-direction: column; align-items: center; gap: .25rem; }
  .udap-flow-step { max-width: 320px; }
  .udap-flow-arrow { transform: rotate(90deg); padding: 0; }
}

/* onboarding wizard progress bar */
.udap-wizard {
  list-style: none; counter-reset: wiz; display: flex; flex-wrap: wrap;
  gap: 1rem; justify-content: center; padding: 0; margin: 0 0 2rem;
}
.udap-wizard li {
  display: flex; align-items: center; gap: .45rem; color: var(--muted);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase;
}
.udap-wizard li::before {
  counter-increment: wiz; content: counter(wiz);
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: .7rem;
  background: var(--paper-2); border: 1px solid var(--border); color: var(--muted);
}
.udap-wizard li.current { color: var(--ink); }
.udap-wizard li.current::before {
  background: linear-gradient(135deg, var(--indigo), var(--teal)); color: #fff; border: 0;
}
.udap-wizard li.done { color: var(--text-2); }
.udap-wizard li.done::before { content: "\2713"; background: var(--teal); color: #fff; border: 0; }

/* billing usage meter */
.progress.udap-usage { height: 8px; background: var(--paper-2); border-radius: 999px; }
.progress.udap-usage .progress-bar {
  background: linear-gradient(90deg, var(--teal-br), var(--indigo)); border-radius: 999px;
}

/* evaluate workbench */
.udap-eval-card { color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.udap-eval-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.udap-controls { position: static; }
.udap-suppressed-row td:not(:last-child) { color: var(--muted); }
.udap-suppressed-row .mono { letter-spacing: .1em; }
.udap-htmx-indicator {
  position: absolute; top: -2px; right: 0; z-index: 5;
  font-size: .8rem; color: var(--indigo-d);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: .2rem .7rem; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .15s ease; pointer-events: none;
}
.udap-htmx-indicator.htmx-request { opacity: 1; }

/* suppression notice — why groups were dropped, with citations */
.udap-suppress-notice {
  background: rgba(180, 35, 24, .05); border: 1px solid rgba(180, 35, 24, .18);
  border-left: 3px solid #b42318; border-radius: var(--radius); padding: .9rem 1rem;
  font-size: .92rem;
}
.udap-suppress-notice.ok {
  background: rgba(13, 148, 136, .06); border-color: rgba(13, 148, 136, .22);
  border-left-color: var(--teal); color: var(--text-2);
}
.udap-suppress-ico { color: #b42318; font-size: 1.1rem; line-height: 1.4; }
.udap-suppress-list { list-style: none; padding-left: 0; margin-bottom: 0; }
.udap-suppress-list li { padding: .25rem 0; }
.udap-suppress-cite {
  font-family: var(--font-mono); font-size: .74rem; color: var(--muted);
  margin-top: .15rem;
}
/* analysis readiness panel */
.udap-chip.warn { background: rgba(217,119,6,.12); color: #b45309; border-color: rgba(217,119,6,.25); }
.udap-chip.ok { background: rgba(13,148,136,.12); color: #0f766e; border-color: rgba(13,148,136,.25); }
.udap-chip.danger { background: rgba(180,35,24,.10); color: #b42318; border-color: rgba(180,35,24,.25); }

/* Persistent disclosure-control bar */
.udap-dcbar { border-left: 4px solid var(--teal); }
.udap-dcbar.dc-yellow { border-left-color: #d97706; }
.udap-dcbar.dc-red { border-left-color: #b42318; }
.udap-readiness-row {
  display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem;
  border-top: 1px solid var(--border); border-right: 1px solid var(--border);
  text-decoration: none; color: inherit; height: 100%;
}
.udap-readiness-row:hover { background: var(--paper-2); }
.udap-state { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--border-2); }
.udap-state-ready { background: var(--teal); }
.udap-state-enrichable { background: #d97706; }
.udap-state-needs_data { background: #b42318; }
.udap-state-not_applicable { background: var(--border-2); }

/* info tooltip (ⓘ) */
.udap-info { color: var(--muted); cursor: help; font-size: .85em; margin-left: .3rem; }
.udap-info:hover, .udap-info:focus { color: var(--indigo); outline: none; }

/* dataset detail tabs */
.udap-tabs.nav-tabs { border-bottom: 1px solid var(--border); gap: .25rem; }
.udap-tabs .nav-link {
  color: var(--muted); border: 0; border-bottom: 2px solid transparent;
  padding: .6rem .9rem; font-weight: 500;
}
.udap-tabs .nav-link:hover { color: var(--ink); border-bottom-color: var(--border-2); isolation: isolate; }
.udap-tabs .nav-link.active {
  color: var(--indigo-d); background: transparent; border-bottom-color: var(--indigo);
}

/* analysis sub-nav pills */
.udap-subnav { display: flex; flex-wrap: wrap; gap: .5rem; }
.udap-pill {
  display: inline-flex; align-items: center; padding: .4rem .9rem;
  border-radius: 999px; font-size: .88rem; font-weight: 500; text-decoration: none;
  color: var(--text-2); background: var(--paper-2); border: 1px solid var(--border);
}
.udap-pill:hover { color: var(--ink); border-color: var(--border-2); }
.udap-pill.active {
  color: #fff; background: linear-gradient(135deg, var(--indigo), var(--teal)); border: 0;
}
/* Keep the readiness dot legible on the active pill's gradient. */
.udap-pill.active .udap-state { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }

/* reports */
.udap-report-summary .udap-report-metric {
  border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; height: 100%;
}
.udap-report-src { font-family: var(--font-mono); font-size: .66rem; color: var(--muted); margin-top: .15rem; }
.udap-report-methods { list-style: none; padding-left: 0; margin-bottom: 0; }
.udap-report-methods li { padding: .4rem 0; border-bottom: 1px dashed var(--border); }
.udap-report-methods li:last-child { border-bottom: 0; }

@media print {
  header, footer, .udap-navbar, .udap-tabs, .udap-report-controls { display: none !important; }
  body::before, body::after { display: none !important; }  /* kill watermark */
  body { background: #fff; }
  .udap-card { box-shadow: none; border: 1px solid #ccc; }
  a[href]::after { content: ""; }
}

.udap-row-reason { font-size: .78rem; color: var(--text-2); margin-top: .25rem; max-width: 22rem; }
.udap-row-rule { font-size: .72rem; color: var(--muted); margin-top: .15rem; }
.udap-row-cite { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); }

/* auth screens (django-allauth, themed via the shared base) */
main.udap-auth { max-width: 480px; }
.udap-auth h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.udap-auth form {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--indigo); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem;
}
.udap-auth label { display: block; font-weight: 500; font-size: .85rem;
  color: var(--text-2); margin-bottom: .25rem; }
.udap-auth input:not([type=checkbox]):not([type=radio]) {
  width: 100%; padding: .55rem .7rem; margin-bottom: .9rem;
  border: 1px solid var(--border-2); border-radius: 8px;
  font-family: var(--font-sans); font-size: .95rem; background: var(--surface);
}
.udap-auth input:focus, .udap-auth .form-control:focus { outline: none;
  border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
/* Buttons are styled by Bootstrap btn-* classes emitted by the allauth
   element override (button.html) — do NOT force a single colour here. */
.udap-auth a:not(.btn) { color: var(--indigo-d); }
.udap-auth .udap-card { max-width: none; }
.udap-auth .helptext, .udap-auth .form-text { color: var(--muted); font-size: .8rem; }
.udap-auth [role=alert], .udap-auth .errorlist {
  color: #b42318; font-size: .85rem; list-style: none; padding-left: 0;
}

/* citation block inside cards — "basis" (source) + "UDAP does more" */
.udap-cite {
  margin-top: .8rem; padding-top: .65rem; border-top: 1px dashed var(--border);
  font-family: var(--font-mono); font-size: .72rem; line-height: 1.5; color: var(--muted);
}
.udap-cite div + div { margin-top: .25rem; }
.udap-cite b { color: var(--text-2); font-weight: 600; }
.udap-cite .up { color: var(--indigo-d); font-weight: 600; }

/* FAQ */
.udap-faq p strong { color: var(--ink); }

/* footer */
.udap-footer {
  border-top: 1px solid var(--border); color: var(--text-2);
  background: linear-gradient(180deg, transparent, rgba(16,23,40,.02));
  font-size: .88rem; padding-top: 2.5rem; padding-bottom: 1.4rem; margin-top: 1rem;
}
.udap-footer h4 {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .7rem;
}
.udap-footer a { color: var(--text-2); text-decoration: none; display: block; padding: .2rem 0; }
.udap-footer a:hover { color: var(--indigo-d); }
.udap-footer .udap-foot-brand { color: var(--ink); font-weight: 700; letter-spacing: .04em; }
.udap-footer .udap-mark { display: inline-block; vertical-align: -3px; margin-right: .4rem; }
.udap-footer-bottom {
  border-top: 1px solid var(--border); margin-top: 1.6rem; padding-top: 1.1rem;
  color: var(--muted); font-size: .82rem;
}
