/* Louisiana query portal — UI faithfully modeled on efficiency.texas.gov (TREO/SAM).
 * Full-viewport biome photo, glass top/bottom bars, serif hero → chat layer.
 * Per-agency accents come from :root tokens set in accent.css. */

@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/eb-garamond.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans.woff2') format('woff2'); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  /* accent defaults (TREO amber) — overridden per agency in accent.css */
  --acc-300: #fcd34d; --acc-400: #fbbf24; --acc-500: #f59e0b; --acc-700: #b45309;
  --leg-100: #fef9c3; --leg-200: #fef08a; --leg-400: #facc15;
  --bar: rgba(0,0,0,.75);
  --glass-border: rgba(255,255,255,.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 16px/1.55 var(--sans); color: #fff; background: #000;
  height: 100dvh; min-height: 100dvh; overflow: hidden; position: relative;
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; top: -48px; left: 12px; z-index: 100; background: var(--acc-700); color: #fff; padding: 8px 16px; border-radius: 8px; font: 600 14px/1 var(--sans); text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--acc-300); outline-offset: 2px; }

/* ---------- background ---------- */
.biome { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.biome img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.biome::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.45) 45%, rgba(0,0,0,.55)); }
@media (min-width: 640px) { .biome::after { background: linear-gradient(to right, rgba(0,0,0,.78), rgba(0,0,0,.38) 55%, rgba(0,0,0,.6)); } }
.glow { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at top, color-mix(in srgb, var(--acc-700) 12%, transparent), transparent 60%); }

/* Chat mode: blur + dim the biome so streamed answers sit on a calm field (TREO treatment). */
.biome img, .biome::after { transition: filter .7s cubic-bezier(.16,1,.3,1), background .7s ease; }
body.chat-mode .biome img { filter: blur(16px) brightness(.55) saturate(.8); transform: scale(1.08); }
body.chat-mode .biome::after { background: rgba(0,0,0,.62); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; height: 68px; width: 100%;
  border-bottom: 1px solid var(--glass-border); background: var(--bar);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding-right: 12px; overflow: hidden;
}
.topbar__brand { display: flex; align-items: center; gap: 12px; height: 100%; min-width: 0; flex: 1; padding-left: 16px; text-decoration: none; color: #fff; }
@media (min-width: 1024px) { .topbar__brand { padding-left: 32px; } }
.topbar__seal { height: 44px; width: 44px; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
/* Official raster seals sit in a white chip so their true colors read on dark glass. */
.topbar__sealchip {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; background: #fff; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.45);
}
.topbar__sealchip img { width: 40px; height: 40px; object-fit: contain; }
/* Full horizontal agency lockups (already light-on-dark) stand alone. */
.topbar__lockup { height: 42px; width: auto; max-width: min(52vw, 340px); object-fit: contain; object-position: left center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.topbar__names { display: flex; flex-direction: column; line-height: 1.06; min-width: 0; }
.topbar__eyebrow { font: 700 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--acc-300); }
.topbar__office { font: 600 16px/1.15 var(--serif); letter-spacing: -.01em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__metrics { flex: 1; min-width: 0; display: none; align-items: center; justify-content: center; gap: 20px; }
@media (min-width: 900px) { .topbar__metrics { display: flex; } }
.topbar__metric { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; font-size: 14px; }
.topbar__metric b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--acc-300); }
.topbar__metric span { font-weight: 500; color: rgba(255,255,255,.85); }
.topbar__divider { height: 16px; width: 1px; background: rgba(255,255,255,.25); }
.topbar__link {
  flex-shrink: 0; display: inline-flex; align-items: center; white-space: nowrap;
  font: 500 14px/1 var(--sans); color: rgba(255,255,255,.75); text-decoration: none;
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  transition: color .2s, border-color .2s;
}
.topbar__link:hover { color: #fff; border-color: rgba(255,255,255,.6); }

/* ---------- landing layer ---------- */
.landing {
  position: absolute; inset: 0; z-index: 30; overflow-y: auto; overscroll-behavior: none;
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.landing.is-hidden { opacity: 0; transform: translateY(-24px); pointer-events: none; }

.hero { position: relative; display: flex; flex-direction: column; min-height: 100svh; color: #fff; }
.hero__inner { position: relative; z-index: 10; display: flex; flex-direction: column; flex: 1; width: 100%; margin: 0 auto; max-width: 80rem; padding: 0 16px; }
@media (min-width: 1024px) { .hero__inner { padding: 0 32px; } }
.hero__center { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 68px; }
.hero__h1 { font: 500 clamp(2.5rem, 6vw, 4.5rem)/1.08 var(--serif); letter-spacing: -.015em; margin: 0; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.hero__sub { margin: 20px auto 0; max-width: 42rem; font-size: clamp(.95rem, 1.5vw, 1.125rem); line-height: 1.6; color: #e5e7eb; }
.hero__sub + .hero__sub { margin-top: 6px; color: #d1d5db; }

.hero__ask { width: 100%; max-width: 48rem; margin: 40px auto 0; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.chips button {
  cursor: pointer; font: 500 13px/1 var(--sans); color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s, border-color .2s;
}
.chips button:hover { background: color-mix(in srgb, var(--acc-500) 15%, transparent); color: var(--leg-100); border-color: color-mix(in srgb, var(--acc-500) 45%, transparent); }

/* the ask box — 1.5px glass ring around a blurred black field (TREO input treatment) */
.ask { position: relative; padding: 1.5px; border-radius: 1rem; background: rgba(255,255,255,.12); transition: background .3s, box-shadow .3s; cursor: text; }
.ask:focus-within { background: color-mix(in srgb, var(--acc-500) 55%, rgba(255,255,255,.2)); box-shadow: 0 0 40px color-mix(in srgb, var(--acc-500) 25%, transparent); }
.ask__field {
  display: flex; align-items: flex-end; gap: 8px; border-radius: calc(1rem - 1.5px);
  background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  padding: 6px 6px 6px 18px;
}
.ask textarea {
  flex: 1; border: 0; outline: 0; background: transparent; resize: none; color: #fff;
  font: 400 17px/1.5 var(--sans); padding: 12px 0; max-height: 160px; min-height: 48px;
}
.ask textarea::placeholder { color: rgba(255,255,255,.55); }
.ask__send {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 2px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--acc-500); color: #111; transition: background .2s, transform .1s;
}
.ask__send:hover { background: var(--acc-400); }
.ask__send:active { transform: translateY(1px); }
.ask__send:disabled { background: rgba(255,255,255,.15); color: rgba(255,255,255,.4); cursor: default; }

/* ---------- white below-the-fold band ---------- */
.band { position: relative; z-index: 10; background: #fff; color: #111827; padding-bottom: 56px; }
.band__stats { border-bottom: 1px solid #e5e7eb; }
.band__stats-inner { max-width: 80rem; margin: 0 auto; padding: 24px 16px; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 80px); flex-wrap: wrap; }
.stat { display: flex; align-items: center; gap: 12px; }
.stat__n { font: 600 1.9rem/1 var(--serif); color: #111827; font-variant-numeric: tabular-nums; }
.stat__l { font-size: 13px; line-height: 1.35; color: #6b7280; max-width: 12rem; }
.band__tasks { border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.band__tasks-inner { max-width: 80rem; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 20px; row-gap: 6px; }
.band__tasks button { border: 0; background: none; cursor: pointer; font: 500 14px/1.6 var(--sans); color: #6b7280; transition: color .3s; padding: 4px 0; }
.band__tasks button:hover { color: #111827; }
.band__cards { max-width: 80rem; margin: 0 auto; padding: 40px 16px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.bcard { border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; background: #fff; }
.bcard h3 { font: 600 1.1rem/1.25 var(--serif); margin: 0 0 6px; color: #111827; }
.bcard p { margin: 0; font-size: 14px; color: #6b7280; }

/* ---------- chat layer ---------- */
.chat { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; min-height: 0; opacity: 0; pointer-events: none; transition: opacity .5s ease-out; }
.chat.is-active { opacity: 1; pointer-events: auto; }
.chat__scroll { flex: 1; min-height: 0; overflow-y: auto; padding-top: 68px; }
.chat__log { max-width: 48rem; margin: 0 auto; padding: 24px 16px calc(24px); display: flex; flex-direction: column; gap: 16px; }

.msg { display: flex; gap: 12px; align-items: flex-end; animation: msgIn .3s ease-out; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg--user { justify-content: flex-end; }
.msg__avatar {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc-500) 30%, transparent), color-mix(in srgb, var(--acc-700) 20%, transparent));
  border: 1px solid color-mix(in srgb, var(--acc-300) 35%, transparent);
  box-shadow: 0 2px 8px rgba(0,0,0,.3); color: var(--acc-300);
}
.msg__bubble {
  max-width: 85%; border-radius: 1rem; padding: 12px 16px; overflow-wrap: break-word;
  background: rgba(0,0,0,.65); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); color: #fff;
}
.msg--assistant .msg__bubble { border-bottom-left-radius: 6px; }
.msg--user .msg__bubble { background: color-mix(in srgb, var(--acc-700) 32%, rgba(0,0,0,.55)); border-color: color-mix(in srgb, var(--acc-500) 30%, transparent); border-bottom-right-radius: 6px; }
@media (min-width: 640px) { .msg__bubble { max-width: 78%; font-size: 17px; } }

.prose { font-size: 16px; line-height: 1.6; }
.prose p { margin: 0 0 .8em; } .prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 .8em; padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }
.prose strong { color: var(--leg-100); font-weight: 700; }
.prose a { color: var(--acc-300); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--acc-300) 45%, transparent); }
.prose a:hover { text-decoration-color: var(--acc-300); }
.prose code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: rgba(255,255,255,.08); border-radius: 4px; padding: 1px 5px; }
/* Citations render as quiet footnote markers, not filled blocks. */
.cite-n {
  display: inline-block; margin: 0 1px; padding: 0 4.5px 1px;
  vertical-align: super; line-height: 1.25;
  font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  color: var(--acc-300); text-decoration: none;
  background: color-mix(in srgb, var(--acc-500) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc-400) 28%, transparent);
  border-radius: 5px;
  transition: background .15s, color .15s, border-color .15s;
}
.cite-n:hover { color: #fff; background: color-mix(in srgb, var(--acc-500) 30%, transparent); border-color: color-mix(in srgb, var(--acc-400) 55%, transparent); }

.msg__sources { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 6px; }
.srcchip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  font: 500 12px/1.2 var(--sans); color: rgba(255,255,255,.8); text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 5px 10px;
}
.srcchip:hover { color: #fff; border-color: color-mix(in srgb, var(--acc-400) 55%, transparent); background: color-mix(in srgb, var(--acc-500) 12%, transparent); }
.srcchip b { font-weight: 700; color: var(--acc-300); }
.srcchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34ch; }

.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* chat input dock */
.dock { flex-shrink: 0; border-top: 1px solid var(--glass-border); background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: 12px 16px; }
.dock__inner { max-width: 48rem; margin: 0 auto; }
.dock__hint { margin: 6px 4px 0; font-size: 11px; color: rgba(255,255,255,.45); text-align: center; }

/* suggested actions surfaced above the ask box (e.g. "Help me fill out the …") */
.suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 10px; }
.suggest[hidden] { display: none; }
.suggest__chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--acc-400); background: rgba(0,0,0,.55); color: var(--acc-300);
  font: 600 13px/1.2 var(--sans); cursor: pointer; text-align: left;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 18px rgba(0,0,0,.35);
  transition: background .15s ease, color .15s ease, transform .15s ease;
  animation: suggestIn .35s cubic-bezier(.16,1,.3,1);
}
.suggest__chip:hover { background: var(--acc-400); color: #000; transform: translateY(-1px); }
.suggest__chip svg { flex-shrink: 0; }
@keyframes suggestIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .suggest__chip { animation: none; } }

/* ---------- bottom bar (landing) / chat footer ---------- */
.bottombar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 16px; border-top: 1px solid var(--glass-border); background: var(--bar);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 12px; color: rgba(255,255,255,.7);
}
@media (min-width: 1024px) { .bottombar { padding: 8px 32px; } }
.bottombar__brand b { font-weight: 600; color: rgba(255,255,255,.85); }
.bottombar a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 2px; }
.bottombar a:hover { color: #fff; text-decoration-color: rgba(255,255,255,.7); }
.bottombar__sep { margin: 0 6px; color: rgba(255,255,255,.3); }
.bottombar__links { display: none; align-items: center; gap: 8px; }
@media (min-width: 640px) { .bottombar__links { display: inline-flex; } }

/* chat-mode legal footer (TREO yellow disclaimer) */
.legal { flex-shrink: 0; position: relative; z-index: 10; border-top: 1px solid color-mix(in srgb, var(--leg-400) 25%, transparent); padding: 8px 16px calc(env(safe-area-inset-bottom) + 8px); background: rgba(0,0,0,.5); }
.legal p { margin: 0 auto; max-width: 1200px; text-align: center; font-size: 11px; line-height: 1.5; color: color-mix(in srgb, var(--leg-200) 80%, transparent); }
.legal b { color: var(--leg-400); font-weight: 700; }
.legal a { color: color-mix(in srgb, var(--leg-100) 90%, transparent); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { opacity: .8; }

/* ---------- static notice pages ---------- */
.page { position: relative; z-index: 10; max-width: 46rem; margin: 0 auto; padding: 108px 20px 80px; color: #f3f4f6; }
.page h1 { font: 500 2.4rem/1.15 var(--serif); margin: 0 0 16px; }
.page h2 { font: 600 1.3rem/1.2 var(--serif); margin: 28px 0 8px; }
.page p, .page li { font-size: 15px; line-height: 1.7; color: #d1d5db; }
.page a { color: var(--acc-300); }
.page .card { background: rgba(0,0,0,.55); border: 1px solid var(--glass-border); border-radius: 12px; padding: 20px 24px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.page-mode { overflow: auto; }

/* ---------- native source viewer (drawer) ---------- */
#drawer-root { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .35s ease; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  display: flex; flex-direction: column;
  background: rgba(10,10,12,.92); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-left: 1px solid var(--glass-border); box-shadow: -24px 0 60px rgba(0,0,0,.5);
  transform: translateX(102%); transition: transform .45s cubic-bezier(.16,1,.3,1);
  outline: none;
}
#drawer-root.is-open { pointer-events: auto; }
#drawer-root.is-open .drawer__backdrop { opacity: 1; }
#drawer-root.is-open .drawer { transform: none; }

.drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 14px; border-bottom: 1px solid var(--glass-border); }
.drawer__id { min-width: 0; flex: 1; }
.drawer__kind {
  display: inline-block; margin-bottom: 8px; padding: 4px 9px; border-radius: 999px;
  font: 700 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--acc-300); background: color-mix(in srgb, var(--acc-500) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc-400) 30%, transparent);
}
.drawer__title { margin: 0; font: 600 1.35rem/1.25 var(--serif); color: #fff; overflow-wrap: break-word; }
.drawer__label { margin: 4px 0 0; font-size: 12px; color: rgba(255,255,255,.6); }
.drawer__close {
  flex-shrink: 0; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.75); cursor: pointer;
}
.drawer__close:hover { color: #fff; border-color: rgba(255,255,255,.4); }

.drawer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px; }
.drawer__loading { display: flex; justify-content: center; padding: 48px 0; }
.drawer__err { color: var(--leg-200); font-size: 14px; }
.drawer__text p { margin: 0 0 .9em; font-size: 14.5px; line-height: 1.7; color: #e2e5ea; overflow-wrap: break-word; }

.drawer__foot { flex-shrink: 0; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid var(--glass-border); background: rgba(0,0,0,.4); }
.drawer__btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-decoration: none;
  font: 600 13.5px/1 var(--sans); padding: 11px 16px; border-radius: 10px; border: 1px solid transparent;
}
.drawer__btn--primary { background: var(--acc-500); color: #111; }
.drawer__btn--primary:hover { background: var(--acc-400); }
.drawer__btn--ghost { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.2); }
.drawer__btn--ghost:hover { color: #fff; border-color: rgba(255,255,255,.45); }

/* license native view + guided application prep */
.lic-view__who { font-size: 15px; line-height: 1.6; color: #e8eaee; margin: 0 0 14px; }
.lic-view__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 18px; }
.lic-view__facts > div { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px; }
.lic-view__facts dt { font: 700 10px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 5px; }
.lic-view__facts dd { margin: 0; font-size: 13px; line-height: 1.5; color: #eceef2; }
.lic-view__h { font: 600 1.05rem/1.2 var(--serif); color: var(--acc-300); margin: 20px 0 8px; }
.lic-view__note { font-size: 12.5px; color: rgba(255,255,255,.55); margin: 0 0 10px; }
.lic-reqs { list-style: none; margin: 0; padding: 0; }
.lic-reqs li { position: relative; padding-left: 18px; margin-bottom: 8px; font-size: 13.5px; line-height: 1.5; color: #e2e5ea; }
.lic-reqs li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--acc-500); }
.lic-form { display: grid; gap: 10px; }
.lic-form label { display: grid; gap: 5px; font: 600 11.5px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.lic-form input {
  font: 400 14px/1.4 var(--sans); color: #fff; padding: 10px 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 9px; outline: none;
}
.lic-form input:focus { border-color: color-mix(in srgb, var(--acc-400) 65%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc-500) 20%, transparent); }
.lic-forms { list-style: none; margin: 0; padding: 0; }
.lic-forms li { margin-bottom: 7px; font-size: 13.5px; }
.lic-forms a { color: var(--acc-300); text-decoration: underline; text-underline-offset: 2px; }
.lic-view__submitnote { margin-top: 18px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.6; color: #e8eaee; background: color-mix(in srgb, var(--acc-700) 22%, rgba(0,0,0,.4)); border: 1px solid color-mix(in srgb, var(--acc-500) 30%, transparent); }
.lic-sum { width: 100%; border-collapse: collapse; margin: 8px 0; }
.lic-sum th, .lic-sum td { text-align: left; padding: 6px 10px; border: 1px solid rgba(128,128,128,.4); font-size: 13px; }
#lic-print-summary { display: none; }

/* ---------- guided form mode: chat left, official PDF filling live on the right ---------- */
#formpane {
  position: fixed; top: 68px; right: 0; bottom: 0; width: min(54%, 880px); z-index: 45;
  display: flex; flex-direction: column;
  background: rgba(12,12,14,.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border); box-shadow: -20px 0 50px rgba(0,0,0,.45);
}
.formpane__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--glass-border); }
.formpane__kicker { display: block; font: 700 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--acc-300); margin-bottom: 4px; }
.formpane__title { margin: 0; font: 600 1.05rem/1.2 var(--serif); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.formpane__progress { flex-shrink: 0; font: 600 12px/1 var(--sans); color: rgba(255,255,255,.75); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 12px; font-variant-numeric: tabular-nums; }
.formpane__pages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; background: rgba(0,0,0,.35); scrollbar-width: thin; }
.formpane__page { display: block; margin: 0 auto 14px; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,.5); background: #fff; }
.formpane__foot { display: flex; gap: 10px; align-items: center; padding: 12px 18px calc(env(safe-area-inset-bottom) + 12px); border-top: 1px solid var(--glass-border); background: rgba(0,0,0,.4); }

/* chat squeezes to the left half while the form pane is open */
body.form-mode .chat__log, body.form-mode .dock__inner { max-width: none; margin: 0; }
body.form-mode .chat__scroll, body.form-mode .dock, body.form-mode .legal { margin-right: min(54%, 880px); }
body.form-mode .chat__log { padding-left: 24px; padding-right: 24px; }
body.form-mode .legal p { padding-right: 12px; }

@media (max-width: 900px) {
  #formpane { top: auto; height: 52vh; width: 100%; border-left: 0; border-top: 1px solid var(--glass-border); }
  body.form-mode .chat__scroll, body.form-mode .dock, body.form-mode .legal { margin-right: 0; }
  body.form-mode .chat__scroll { padding-bottom: 52vh; }
}

@media print {
  body.printing-drawer > *:not(#drawer-root) { display: none !important; }
  body.printing-drawer #drawer-root, body.printing-drawer .drawer { position: static; width: auto; transform: none; background: #fff; color: #000; box-shadow: none; border: 0; }
  body.printing-drawer .drawer__backdrop, body.printing-drawer .drawer__close, body.printing-drawer .drawer__foot,
  body.printing-drawer .lic-form, body.printing-drawer .lic-view__note { display: none !important; }
  body.printing-drawer #lic-print-summary { display: block; }
  body.printing-drawer .drawer__title, body.printing-drawer .lic-view__h { color: #000; }
  body.printing-drawer .drawer__body { overflow: visible; color: #000; }
  body.printing-drawer .lic-view__who, body.printing-drawer .lic-view__facts dd, body.printing-drawer .lic-reqs li { color: #000; }
  body.printing-drawer .lic-view__facts > div, body.printing-drawer .lic-view__submitnote { background: #fff; border-color: #999; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .topbar, .bottombar, .dock, .chips, .legal { display: none !important; }
  body { background: #fff; color: #000; overflow: auto; height: auto; }
  .biome, .glow { display: none; }
  .msg__bubble { background: #fff; border-color: #ccc; color: #000; }
}
