/* ==========================================================================
   DocketWatch — theme.css
   BEA Bold Monochromatic applied to the regulatory research portal.
   Tokens mirror /srv/web/src/styles/global.css.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Open Sans';
  src: url('/static/fonts/OpenSans-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('/static/fonts/OpenSans-ExtraBold.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --bea-purple:       #4F3D63;
  --bea-purple-dark:  #3D2E4E;
  --bea-purple-mid:   #6B5A7E;
  --bea-purple-light: #7A6B8A;
  --bea-purple-faint: #E8E4ED;
  --bea-bg-alt:       #F0EDF4;
  --bea-amber:        #C17F47;
  --bea-amber-dark:   #A86B3A;
  --bea-amber-light:  #D4A373;
  --bea-text:         #333333;
  --bea-text-light:   #666666;
  --bea-border:       #E0DDE3;
  --bea-white:        #FFFFFF;
  --accent-teal:      #47A68C;
  --font-heading: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

}

/* ---------- DEV environment recolor (docketwatch-q31p) ----------
   When DOCKETWATCH_ENV != 'prod', base.html sets <body class="env-dev">.
   Remapping the brand purple family to a teal ramp here recolors the entire
   chrome — everything (including the help tour) reads var(--bea-purple*), and
   custom properties cascade to all of <body>. Makes dev (bae:8096)
   unmistakable from prod (bae:8095). Same lightness steps as the purple ramp;
   the primary teal holds AA contrast (>=4.5:1) on white for text/links. The
   amber accent is intentionally left unchanged. */
body.env-dev {
  --bea-purple:       #15725F;
  --bea-purple-dark:  #0E4A3E;
  --bea-purple-mid:   #2E9580;
  --bea-purple-light: #5FB3A1;
  --bea-purple-faint: #DDEFE9;
  --bea-bg-alt:       #E9F5F1;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 112.5%; scroll-behavior: smooth; color-scheme: light; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--bea-text); background: var(--bea-white); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--bea-purple); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--bea-purple-dark); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; color: var(--bea-purple); line-height: 1.0; letter-spacing: -0.025em; text-wrap: balance; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100%; left: 1rem; z-index: 1000; padding: 0.5rem 1rem; background: var(--bea-amber); color: var(--bea-white); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 0.5rem; }

:focus-visible { outline: 2px solid var(--bea-amber); outline-offset: 2px; }
.site-nav :focus-visible { outline-color: var(--bea-white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Nav ---------- */
.site-nav { position: fixed; top: 0; left: 0; right: 0; background: var(--bea-purple-dark); z-index: 100; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 1rem clamp(1.5rem,4vw,5rem); gap: 1.5rem; }
.nav-logo-group { display: flex; align-items: baseline; gap: 10px; }
.nav-logo { font-family: var(--font-heading); font-size: 1rem; font-weight: 800; color: var(--bea-white); text-decoration: none; text-transform: uppercase; letter-spacing: -0.01em; }
.nav-logo:hover { color: var(--bea-white); }
.nav-product { font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.18em; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.2); }
.nav-links { display: flex; gap: 2rem; list-style: none; margin-left: 2rem; padding: 0; }
.nav-links a { font-family: var(--font-body); font-size: 0.78rem; font-weight: 400; color: var(--bea-white); text-decoration: none; opacity: 0.7; transition: opacity 0.2s ease; padding: 0.25rem 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; color: var(--bea-white); }
.nav-search { margin-left: auto; position: relative; }
.nav-search input { font-family: var(--font-body); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); color: var(--bea-white); font-size: 0.82rem; padding: 0.5rem 1rem 0.5rem 2.5rem; width: 340px; outline: none; appearance: none; -webkit-appearance: none; transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.nav-search input::placeholder { color: rgba(255,255,255,0.6); font-style: italic; }
.nav-search input:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }
.nav-search input:focus { background: rgba(255,255,255,0.16); border-color: var(--bea-amber); box-shadow: 0 0 0 3px rgba(193,127,71,0.25); }
/* Defang the WebKit/Chrome default search-input clear button + decoration
   so the input stays visually clean (no inner empty box on the right). */
.nav-search input::-webkit-search-cancel-button,
.nav-search input::-webkit-search-decoration,
.nav-search input::-webkit-search-results-button,
.nav-search input::-webkit-search-results-decoration { -webkit-appearance: none; appearance: none; display: none; }
.nav-search-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.85); font-size: 1rem; font-weight: 600; pointer-events: none; transition: color 0.15s ease; }
.nav-search:focus-within .nav-search-icon { color: var(--bea-white); }

/* ---------- Layout ---------- */
main { padding-top: 4.5rem; }
.wrap { max-width: 80rem; margin: 0 auto; padding: 0 clamp(1.5rem,4vw,5rem); }

/* ---------- Shared: eyebrow, section headings, crumbs ---------- */
.eyebrow { display: block; font-family: var(--font-body); font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bea-amber); margin-bottom: 0.5rem; }
.section-heading { font-family: var(--font-heading); font-weight: 800; color: var(--bea-purple); font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.0; margin-bottom: 2rem; }
.section-title { font-family: var(--font-heading); font-weight: 800; color: var(--bea-purple); font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 1.25rem; }

.crumbs { font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--bea-text-light); margin-bottom: 1.25rem; }
.crumbs a { color: var(--bea-text-light); transition: color 0.15s ease; }
.crumbs a:hover { color: var(--bea-purple); }
.crumbs .sep { margin: 0 0.4rem; opacity: 0.4; }

/* ---------- Home: continue-your-research + active docket + browse ---------- */
.continue-section { padding: 4rem 0 2rem; }
.continue-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.matter-card {
  background: var(--bea-white); border: 1px solid var(--bea-border);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  min-height: 210px; position: relative; overflow: hidden;
  cursor: pointer; text-decoration: none; color: inherit;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.matter-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--bea-amber);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.25s ease;
}
.matter-card:hover { background-color: var(--bea-purple-faint); border-color: var(--bea-purple); color: inherit; }
.matter-card:hover::before { transform: scaleY(1); }

.matter-num { font-family: var(--font-body); font-size: 0.65rem; font-weight: 600; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.1em; }
.matter-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--bea-purple); }
.chip-row { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chip { font-family: var(--font-body); font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: var(--bea-purple-faint); color: var(--bea-purple); padding: 0.15rem 0.55rem; }
.matter-meta { font-family: var(--font-body); font-size: 0.8rem; color: var(--bea-text-light); line-height: 1.4; margin-top: auto; }

.two-col-section { padding: 3rem 0 4rem; border-top: 1px solid var(--bea-border); margin-top: 2rem; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 4rem; padding-top: 3rem; }

.docket-list { list-style: none; padding: 0; margin: 0; }
.docket-item { display: grid; grid-template-columns: 70px 90px 1fr; gap: 1rem; align-items: baseline; padding: 0.9rem 0; border-bottom: 1px solid var(--bea-border); cursor: pointer; transition: padding-left 0.2s ease, background-color 0.2s ease; }
.docket-item:hover { padding-left: 0.5rem; }
.docket-date { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.08em; }
.docket-matter { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; color: var(--bea-purple); text-transform: uppercase; letter-spacing: 0.12em; }
.docket-text { font-family: var(--font-body); font-size: 0.92rem; color: var(--bea-text); line-height: 1.45; transition: color 0.15s ease; }
.docket-item:hover .docket-text { color: var(--bea-purple); }

.see-all { margin-top: 1.25rem; font-family: var(--font-body); font-size: 0.9rem; font-weight: 700; color: var(--bea-purple); display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; transition: gap 0.2s ease; }
.see-all:hover { gap: 0.8rem; color: var(--bea-purple-dark); }

.browse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.browse-card { background: var(--bea-white); border: 1px solid var(--bea-border); padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; cursor: pointer; text-decoration: none; color: inherit; transition: background-color 0.2s ease, border-color 0.2s ease; position: relative; }
.browse-card::before { content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--bea-amber); transform: scaleY(0); transform-origin: top; transition: transform 0.2s ease; }
.browse-card:hover { background-color: var(--bea-purple-faint); border-color: var(--bea-purple); color: inherit; }
.browse-card:hover::before { transform: scaleY(1); }
.browse-count { font-family: var(--font-heading); font-weight: 800; font-size: 2.5rem; color: var(--bea-purple); letter-spacing: -0.03em; line-height: 1; }
.browse-label { font-family: var(--font-body); font-size: 0.65rem; font-weight: 600; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.1em; }
.browse-desc { font-family: var(--font-body); font-size: 0.78rem; color: var(--bea-text-light); line-height: 1.4; }

/* ---------- Matter page ---------- */
.matter-header { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--bea-border); }
.matter-header-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.matter-num-big { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.14em; }
.status-pill { font-family: var(--font-body); font-size: 0.6rem; font-weight: 700; padding: 0.2rem 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; }
.status-pill.open { background: var(--accent-teal); color: var(--bea-white); }
.status-pill.type { background: var(--bea-purple-faint); color: var(--bea-purple); }
.matter-title-big { font-family: var(--font-heading); font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 800; color: var(--bea-purple); letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 1rem; max-width: 62rem; }
.matter-meta-bar { display: flex; gap: 0; flex-wrap: wrap; font-family: var(--font-body); font-size: 0.85rem; color: var(--bea-text-light); }
.matter-meta-bar > span + span::before { content: '·'; margin: 0 0.6rem; color: var(--bea-border); font-weight: 700; }
.matter-meta-bar b { font-weight: 700; color: var(--bea-text); }

.hearing-banner { display: flex; align-items: center; gap: 1rem; background: var(--bea-amber); color: var(--bea-white); padding: 0.85rem 1.25rem; margin: 1.5rem 0 0; flex-wrap: wrap; }
.hearing-banner-label { font-family: var(--font-body); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.85; }
.hearing-banner-text { font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; }
.hearing-banner a { color: var(--bea-white); margin-left: auto; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; }

.body-grid { display: grid; grid-template-columns: minmax(0,1fr) 22rem; gap: 3.5rem; padding: 3rem 0; align-items: start; }
.main-col > section { margin-bottom: 3.5rem; }

.ai-overview { border: 1px solid var(--bea-border); border-left: 3px solid var(--bea-amber); padding: 0; background: var(--bea-white); }
.ai-overview summary { padding: 0.9rem 1.25rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-body); font-size: 0.85rem; color: var(--bea-text-light); }
.ai-overview summary::-webkit-details-marker { display: none; }
.ai-overview summary::after { content: '+'; font-size: 1.2rem; color: var(--bea-purple); font-weight: 400; }
.ai-overview[open] summary::after { content: '−'; }
.ai-overview summary strong { color: var(--bea-purple); font-weight: 700; }
.ai-label { font-family: var(--font-body); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bea-amber); margin-right: 0.5rem; }

.timeline { list-style: none; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 82px; top: 8px; bottom: 8px; width: 1px; background: var(--bea-border); }
.tl-item { display: grid; grid-template-columns: 74px 1fr; gap: 1.25rem; padding: 0.85rem 0; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 79px; top: 1.15rem; width: 7px; height: 7px; background: var(--bea-purple); border-radius: 50%; }
.tl-date { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 0.1rem; text-align: right; }
.tl-body { padding-left: 1rem; }
.tl-type { font-family: var(--font-body); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bea-amber); }
/* Expected empty state for matters whose documents aren't indexed yet
   (docketwatch-cdc) — subtle/informational, deliberately not an error look. */
.docs-pending { background: var(--bea-purple-faint); border: 1px solid var(--bea-purple); border-left: 3px solid var(--bea-purple); padding: 1rem 1.25rem; }
.docs-pending-title { font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; color: var(--bea-purple-dark); }
.docs-pending-sub { font-family: var(--font-body); font-size: 0.85rem; color: var(--bea-purple); margin: 0.35rem 0 0; line-height: 1.45; }
/* Unconfident events (the classifier's catch-all) show a neutral 'Document'
   label — muted, not the amber reserved for confident classifications. */
.tl-type-neutral { color: var(--bea-text-light); }
/* Events beyond the first 10 stay hidden until JS adds .is-expanded to the
   list (mirrors .topic-row-extra on the Topics list). */
.timeline:not(.is-expanded) .tl-item-extra { display: none; }
.tl-text { font-family: var(--font-body); font-size: 0.95rem; line-height: 1.45; color: var(--bea-text); margin-top: 0.2rem; cursor: pointer; transition: color 0.15s ease; }
.tl-text:hover { color: var(--bea-purple); }

.topic-row { display: grid; grid-template-columns: 1fr auto; padding: 0.9rem 1rem; border: 1px solid var(--bea-border); border-bottom-width: 0; cursor: pointer; align-items: center; gap: 1rem; transition: background 0.15s ease; background: var(--bea-white); text-decoration: none; color: inherit; }
.topic-row:last-of-type:not(.is-open) { border-bottom-width: 1px; }
.topic-row:hover { background: var(--bea-purple-faint); color: inherit; }
.topic-row.is-open { border-bottom-width: 0; background: var(--bea-purple-faint); border-left: 3px solid var(--bea-purple); padding-left: calc(1rem - 3px); }
.topic-name { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: var(--bea-purple); letter-spacing: -0.01em; }
.topic-stats { font-family: var(--font-body); font-size: 0.8rem; color: var(--bea-text-light); font-weight: 500; }
.topic-stats b { color: var(--bea-text); font-weight: 700; }

.topic-expand { border: 1px solid var(--bea-border); border-top: 0; padding: 1.5rem 1.75rem 1.25rem; background: var(--bea-bg-alt); }
.topic-expand-actions { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.topic-action-link { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; color: var(--bea-purple); text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 0.3rem; transition: gap 0.15s ease; }
.topic-action-link:hover { gap: 0.5rem; }

/* "Show all N topics" toggle — the top 10 topics render directly; rows beyond
   that carry .topic-row-extra and stay hidden until JS adds .is-expanded to
   the list. The toggle is an outlined pill matching .topics-landing-pill on
   the /topics landing page; a CSS chevron flips with aria-expanded so the
   button reads the same in both states. */
.topic-list:not(.is-expanded) .topic-row-extra { display: none; }
.topics-toggle { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; background: var(--bea-purple); color: var(--bea-white); border: 0; padding: 0.6rem 1.1rem; font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: background 0.15s ease; }
.topics-toggle::after { content: '↓'; font-size: 0.9rem; }
.topics-toggle[aria-expanded="true"]::after { content: '↑'; }
.topics-toggle:hover { background: var(--bea-purple-dark); }

.evidence-doc { margin-bottom: 1.1rem; }
.evidence-doc > summary { cursor: pointer; display: flex; align-items: center; list-style: none; padding: 0.5rem 0; border-bottom: 1px solid var(--bea-border); gap: 0.75rem; }
.evidence-doc > summary::-webkit-details-marker { display: none; }
.evidence-doc > summary::after { content: '+'; font-size: 1.2rem; line-height: 1; color: var(--bea-purple); font-weight: 400; margin-left: 0.5rem; }
.evidence-doc[open] > summary::after { content: '−'; }
.evidence-doc-title { font-family: var(--font-body); font-weight: 700; font-size: 0.92rem; color: var(--bea-text); }
.evidence-doc-title .exhibit { color: var(--bea-purple); font-weight: 800; margin-right: 0.4rem; letter-spacing: 0.05em; }
.evidence-doc-stats { font-family: var(--font-body); font-size: 0.75rem; color: var(--bea-text-light); white-space: nowrap; margin-left: auto; }

.section-evidence { margin: 0.9rem 0 0 1.25rem; padding: 0.75rem 0.9rem; background: var(--bea-purple-faint); border-radius: 4px; }
.section-ev-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.35rem; }
.section-ev-title { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--bea-text); }
.section-page-label { font-family: var(--font-body); font-size: 0.7rem; color: var(--bea-text-light); white-space: nowrap; letter-spacing: 0.05em; }
.section-excerpt { border-left: 3px solid var(--bea-purple); background: var(--bea-white); padding: 0.7rem 0.9rem; font-size: 0.83rem; line-height: 1.55; margin: 0.35rem 0; color: var(--bea-text); font-style: italic; }
.section-ai-summary { font-size: 0.8rem; color: var(--bea-text-light); margin-top: 0.35rem; line-height: 1.5; }
.section-ai-summary b { color: var(--bea-amber-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.65rem; margin-right: 0.35rem; }
.section-actions { display: flex; gap: 1rem; margin-top: 0.5rem; font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; flex-wrap: wrap; }
.section-actions a { color: var(--bea-purple); text-transform: uppercase; letter-spacing: 0.05em; }

.docgroup { border-bottom: 1px solid var(--bea-border); padding: 0.25rem 0 1rem; }
.docgroup-header { display: flex; justify-content: space-between; align-items: baseline; padding: 0.85rem 0 0.5rem; }
.docgroup-title { font-family: var(--font-heading); font-size: 0.78rem; font-weight: 800; color: var(--bea-purple); text-transform: uppercase; letter-spacing: 0.08em; }
.docgroup-count { font-family: var(--font-body); font-size: 0.75rem; color: var(--bea-text-light); font-weight: 600; }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-item { display: grid; grid-template-columns: 70px 1fr auto; gap: 1rem; align-items: baseline; padding: 0.45rem 0; cursor: pointer; transition: padding-left 0.15s ease; }
.doc-item:hover { padding-left: 0.25rem; }
.doc-ex { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; color: var(--bea-purple); letter-spacing: 0.05em; }
.doc-title { font-family: var(--font-body); font-size: 0.88rem; color: var(--bea-text); line-height: 1.35; }
.doc-meta { font-family: var(--font-body); font-size: 0.7rem; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.06em; }
/* docketwatch-dmqv: a newly-filed doc still processing — visible but not linkable yet. */
.doc-item--processing { cursor: default; opacity: 0.6; }
.doc-item--processing:hover { padding-left: 0; }
.doc-processing-badge { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Pivot rail ---------- */
.rail { position: sticky; top: 5.25rem; }
.rail-card { background: var(--bea-white); border: 1px solid var(--bea-border); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.rail-search { background: var(--bea-bg-alt); }
.rail-search-header { font-family: var(--font-body); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bea-amber); margin-bottom: 0.5rem; }
.rail-search-label { font-family: var(--font-heading); font-size: 1rem; font-weight: 800; color: var(--bea-purple); letter-spacing: -0.015em; margin-bottom: 0.6rem; line-height: 1.2; }
.rail-search input { font-family: var(--font-body); font-size: 0.85rem; width: 100%; padding: 0.5rem 0.6rem 0.5rem 2rem; border: 1px solid var(--bea-border); background: var(--bea-white); }
.rail-search-wrap { position: relative; }
.rail-search-wrap::before { content: '⌕'; position: absolute; left: 0.6rem; top: 0.35rem; color: var(--bea-text-light); font-size: 0.95rem; pointer-events: none; z-index: 1; }
.rail-search-examples { font-family: var(--font-body); font-size: 0.72rem; color: var(--bea-text-light); margin-top: 0.55rem; line-height: 1.45; }
.rail-search-examples b { color: var(--bea-text); font-weight: 600; }

.rail-heading { font-family: var(--font-body); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bea-amber); margin-bottom: 0.85rem; }
.rail-list { list-style: none; padding: 0; margin: 0; }
.rail-item { padding: 0.55rem 0; border-bottom: 1px solid var(--bea-border); cursor: pointer; transition: padding-left 0.15s ease; }
.rail-item:last-child { border-bottom: 0; }
.rail-item:hover { padding-left: 0.3rem; }
.rail-item-num { font-family: var(--font-body); font-size: 0.65rem; font-weight: 700; color: var(--bea-text-light); letter-spacing: 0.1em; text-transform: uppercase; }
.rail-item-title { font-family: var(--font-body); font-size: 0.82rem; color: var(--bea-text); line-height: 1.35; margin-top: 0.1rem; }
.rail-item:hover .rail-item-title { color: var(--bea-purple); }
.rail-item-meta { font-family: var(--font-body); font-size: 0.7rem; color: var(--bea-text-light); margin-top: 0.15rem; }

.rail-entity { display: flex; justify-content: space-between; align-items: baseline; padding: 0.4rem 0; border-bottom: 1px solid var(--bea-border); cursor: pointer; }
.rail-entity:last-child { border-bottom: 0; }
.rail-entity-name { font-family: var(--font-body); font-size: 0.85rem; color: var(--bea-text); font-weight: 500; }
.rail-entity:hover .rail-entity-name { color: var(--bea-purple); }
.rail-entity-role { font-family: var(--font-body); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bea-text-light); }

.rail-chip-row { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.rail-chip { font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; background: var(--bea-purple-faint); color: var(--bea-purple); cursor: pointer; transition: background 0.15s ease; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.rail-chip:hover { background: var(--bea-purple); color: var(--bea-white); }
.rail-chip-count { font-family: var(--font-body); font-size: 0.62rem; opacity: 0.7; font-weight: 700; }

/* _filter_sort facet chip-groups (docketwatch-0ez): each dimension (Status,
   Category) renders a small eyebrow heading above a grid of scoped-browse
   chips with counts — the same chip pattern as _scoped_browse.html, so all
   three pages look like the same component. */
.filter-sort-facets { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.1rem; }
.filter-sort-facet-group .scoped-browse-eyebrow { margin-bottom: 0.5rem; }
/* Compact pills (NOT the stretched 14rem grid the horizontal mode would
   otherwise impose) — small, white, count beside the label, default chip size,
   matching the pill style used elsewhere. The .filter-sort-bar prefix raises
   specificity above the .scoped-browse-horizontal grid rule. */
.filter-sort-bar .filter-sort-facet-group .scoped-browse-chips { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-sort-bar .filter-sort-facet-group .scoped-browse-chip { justify-content: flex-start; flex: 0 0 auto; }

/* ---------- Topic page ---------- */
.topic-header { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--bea-border); }
.topic-kicker { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; color: var(--bea-amber); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.5rem; }
.topic-title-big { font-family: var(--font-heading); font-size: clamp(2.4rem, 4.4vw, 3.75rem); font-weight: 800; color: var(--bea-purple); letter-spacing: -0.03em; line-height: 1.0; margin-bottom: 1.25rem; }
.topic-stats-bar { display: flex; gap: 0; flex-wrap: wrap; align-items: baseline; font-family: var(--font-body); font-size: 0.9rem; color: var(--bea-text-light); margin-bottom: 1rem; }
.topic-stats-bar > span + span::before { content: '·'; margin: 0 0.75rem; color: var(--bea-border); font-weight: 700; }
.topic-stats-bar b { font-weight: 700; color: var(--bea-text); }

.time-strip { margin-top: 1.25rem; background: var(--bea-bg-alt); padding: 1rem 1.25rem; border-left: 3px solid var(--bea-purple); }
.time-strip-label { font-family: var(--font-body); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bea-amber); margin-bottom: 0.75rem; }
.time-strip-viz { display: flex; align-items: flex-end; gap: 2px; height: 40px; }
.time-tick { flex: 1; background: var(--bea-purple-light); position: relative; transition: background 0.2s ease; cursor: pointer; min-height: 2px; }
.time-tick:hover { background: var(--bea-purple-dark); }
.time-tick.peak { background: var(--bea-amber); }
.time-tick-label { position: absolute; bottom: -1.2rem; left: 50%; transform: translateX(-50%); font-family: var(--font-body); font-size: 0.6rem; color: var(--bea-text-light); font-weight: 600; white-space: nowrap; }
.time-strip-axis { display: flex; justify-content: space-between; margin-top: 1.5rem; font-family: var(--font-body); font-size: 0.65rem; color: var(--bea-text-light); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }

.key-rulings { background: var(--bea-bg-alt); padding: 1.5rem 1.75rem; border-left: 3px solid var(--bea-amber); }
.key-rulings-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; flex-wrap: wrap; }
.key-rulings-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: var(--bea-purple); letter-spacing: -0.015em; }
.key-rulings-count { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.1em; }
.ruling-item { padding: 0.9rem 0; border-top: 1px solid var(--bea-border); cursor: pointer; display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: baseline; transition: padding-left 0.15s ease; text-decoration: none; color: inherit; }
.ruling-item:hover { padding-left: 0.3rem; color: inherit; }
.ruling-item:first-child { border-top: 0; padding-top: 0; }
.ruling-cite { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; color: var(--bea-purple); letter-spacing: 0.1em; text-transform: uppercase; }
.ruling-year { color: var(--bea-text-light); font-weight: 600; }
.ruling-text { font-family: var(--font-body); font-size: 0.92rem; color: var(--bea-text); line-height: 1.45; }
.ruling-text .bold { font-weight: 700; color: var(--bea-purple); }

.matter-controls { display: flex; gap: 1rem; align-items: center; padding: 0.75rem 1rem; background: var(--bea-bg-alt); border: 1px solid var(--bea-border); margin-bottom: 0; font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; color: var(--bea-text-light); flex-wrap: wrap; }
.matter-controls .sort-label { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.65rem; }
.matter-controls a { color: var(--bea-text-light); padding: 0.15rem 0.5rem; }
.matter-controls a.active { color: var(--bea-purple); background: var(--bea-white); font-weight: 700; }

/* docketwatch-ludg: admin section tabs (whiteboard-style top tabs) + BEA tables */
.admin-tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--bea-border); margin: 1.25rem 0 1.5rem; font-family: var(--font-body); flex-wrap: wrap; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.6rem 1.1rem; color: var(--bea-text-light); font-weight: 600; font-size: 0.92rem; border-bottom: 2px solid transparent; margin-bottom: -2px; text-decoration: none; }
.admin-tabs a:hover { color: var(--bea-purple); background: var(--bea-bg-alt); }
.admin-tabs a.active { color: var(--bea-purple); border-bottom-color: var(--bea-purple); font-weight: 700; }
.admin-tab-count { font-size: 0.72rem; font-weight: 700; background: var(--bea-purple-faint); color: var(--bea-purple); padding: 0.05rem 0.5rem; border-radius: 999px; min-width: 1.1rem; text-align: center; }
.admin-tabs a.active .admin-tab-count { background: var(--bea-purple); color: var(--bea-white); }

.admin-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 0.85rem; }
.admin-table thead th { text-align: left; padding: 0.55rem 0.7rem; background: var(--bea-bg-alt); color: var(--bea-purple); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 2px solid var(--bea-border); }
.admin-table tbody td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--bea-border); vertical-align: top; }
.admin-table tbody tr:hover { background: var(--bea-bg-alt); }
.admin-table .col-reason { color: var(--bea-amber-dark); }
.admin-table .col-num { text-align: center; font-variant-numeric: tabular-nums; }
.admin-table .col-muted { color: var(--bea-text-light); white-space: nowrap; }
.admin-table .mono { font-variant-numeric: tabular-nums; }
.admin-table .col-actions { white-space: nowrap; }

/* docketwatch-ludg: one-click triage action buttons + flash banner.
   Share the pill shape of .btn-approve/.btn-reject (uppercase, no border,
   0.45/0.85 padding); distinct colours — amber = File as bead (the Claude
   action), purple-light = Archive (mirrors the feedback Archive button). */
.btn-archive { background: var(--bea-purple-light); color: var(--bea-white); border: 0; padding: 0.45rem 0.85rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.btn-archive:hover { background: var(--bea-purple); }
.btn-file-bead { background: var(--bea-amber); color: var(--bea-white); border: 0; padding: 0.45rem 0.85rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.btn-file-bead:hover { background: var(--bea-amber-dark); }
.admin-flash { font-family: var(--font-body); font-size: 0.9rem; padding: 0.6rem 1rem; margin: 0 0 1rem; border-radius: 4px; }
.admin-flash-ok { background: #E6F4EA; color: #1E6B33; border: 1px solid #A8D5B5; }
.admin-flash-err { background: #FCEBEA; color: #B3261E; border: 1px solid #F2B8B5; }

.matter-row { display: grid; grid-template-columns: 120px 1fr auto auto; padding: 1rem; border: 1px solid var(--bea-border); border-top-width: 0; cursor: pointer; align-items: center; gap: 1.25rem; background: var(--bea-white); transition: background 0.15s ease; text-decoration: none; color: inherit; }
/* Author `display: grid` above overrides the UA stylesheet's
   [hidden] { display: none } rule, so JS toggling .hidden alone
   doesn't visually hide the row. This explicit selector restores
   that behaviour with class+attribute specificity, beating the
   plain .matter-row rule above. */
.matter-row[hidden] { display: none; }
.matter-row:hover { background: var(--bea-purple-faint); color: inherit; }
.matter-row.is-open { background: var(--bea-purple-faint); border-left: 3px solid var(--bea-purple); padding-left: calc(1rem - 3px); border-bottom-width: 0; }
.matter-row-num { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; color: var(--bea-text-light); letter-spacing: 0.1em; text-transform: uppercase; }
/* 4-digit year stacked on its own line beneath the matter number (ay7) */
.matter-row-num .year { display: block; color: var(--bea-purple); font-weight: 800; margin-top: 0.15rem; }
.matter-row-title { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--bea-text); line-height: 1.35; }
.matter-row-title .applicant { color: var(--bea-text-light); font-weight: 400; font-size: 0.78rem; display: block; margin-top: 0.15rem; text-transform: uppercase; letter-spacing: 0.08em; }
.matter-row-stats { font-family: var(--font-body); font-size: 0.78rem; color: var(--bea-text-light); white-space: nowrap; font-weight: 600; }
.matter-row-stats b { color: var(--bea-text); font-weight: 700; }
.matter-row-exp { color: var(--bea-text-light); font-size: 1.1rem; font-weight: 400; }
.matter-row.is-open .matter-row-exp { color: var(--bea-purple); font-weight: 700; }

.matter-expand { border: 1px solid var(--bea-border); border-top: 0; padding: 1.5rem 1.75rem 1.25rem; background: var(--bea-bg-alt); }
.matter-expand-actions { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--bea-border); flex-wrap: wrap; }
.matter-action-link { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; color: var(--bea-purple); text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 0.3rem; transition: gap 0.15s ease; }
.matter-action-link:hover { gap: 0.5rem; }

/* ---------- Admin buttons ---------- */
.btn-approve { background: var(--accent-teal); color: var(--bea-white); border: 0; padding: 0.45rem 0.85rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.btn-approve:hover { filter: brightness(0.92); }
.btn-reject { background: var(--bea-purple-light); color: var(--bea-white); border: 0; padding: 0.45rem 0.85rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.btn-reject:hover { background: var(--bea-purple); }
.btn-merge { background: var(--bea-purple); color: var(--bea-white); border: 0; padding: 0.45rem 0.85rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.btn-merge:hover { background: var(--bea-purple-dark); }

/* Document detail page — scoped via :has(.btn-download), which appears
   only on /document/{doc_id}. Keeps all polish out of the way of the
   shared matter / topic / entity surfaces. */

/* Download CTA — solid BEA purple, white text. Compact (this stays
   visually subordinate to the AI overview), but unambiguously the
   primary action via the brand fill. */
.btn-download { display: inline-flex; gap: 0.7rem; align-items: center; padding: 0.7rem 1.2rem; background: var(--bea-purple); color: var(--bea-white); border: 0; font-family: var(--font-body); text-decoration: none; transition: background 0.15s ease; }
.btn-download:hover { background: var(--bea-purple-dark); color: var(--bea-white); }
.btn-download-icon { font-size: 1.05rem; line-height: 1; }
.btn-download-label { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bea-white); }
.btn-download-sub { color: var(--bea-white); opacity: 0.75; font-size: 0.78rem; font-family: var(--font-body); }

.doc-no-summary-note { color: var(--bea-text-light); font-style: italic; font-size: 0.95rem; margin: 1.25rem 0 0; padding: 1rem 1.25rem; background: var(--bea-purple-faint); border-left: 3px solid var(--bea-text-light); font-family: var(--font-body); }

/* Two-column body-grid layout (main + rail). Main column is FIXED at
   56rem — the same reading width the page had before the sidebar
   landed. Sidebar is a generous 32rem so each doc card has room to
   present as a substantial block. .wrap bumped wide enough to fit
   both side-by-side with breathing room. */
.wrap:has(.btn-download) { max-width: 96rem; }
.wrap:has(.btn-download) .body-grid { grid-template-columns: minmax(0, 56rem) 32rem; gap: 4rem; }

/* Header sits inside .main-col, so its padding stacks on top of
   .body-grid's 3rem padding. Zero out matter-header's own padding
   and let body-grid handle the page's top inset. Dial the H1 down a
   notch since this page doesn't have the matter-page's metadata bar
   to anchor it. */
.wrap:has(.btn-download) .matter-header { padding: 0; border-bottom: 0; }
.wrap:has(.btn-download) .matter-header-top { gap: 0.45rem; margin-top: 0.9rem; }
/* H1 keeps the project's standard .matter-title-big size — the wider
   main column has the room for it now. */
.wrap:has(.btn-download) .matter-title-big { margin-top: 0.9rem; margin-bottom: 0; }

/* Crumbs — slightly dimmer here so the H1 reads first */
.wrap:has(.btn-download) .crumbs { margin-bottom: 1rem; opacity: 0.85; }

/* Status pills — a touch more padding for visual balance against
   the bolder solid-purple download CTA below */
.wrap:has(.btn-download) .status-pill { padding: 0.25rem 0.65rem; font-size: 0.62rem; }

/* Tighten the download-CTA section margins. Inline `style="margin: ..."`
   on the section wins specificity, so override with !important. The
   bottom margin is deliberately generous (2rem) to give the AI
   overview below it more "stage." Targets the first <section> inside
   .main-col (the CTA section). */
.wrap:has(.btn-download) .main-col > section:first-of-type { margin: 1.25rem 0 2rem !important; }

/* AI overview — visual centerpiece on this page. Beef up the amber
   stripe, give the summary a comfortable reading column, add a subtle
   lift so it presents as the page's substance, and emphasize the
   first paragraph as the lead sentence. */
.wrap:has(.btn-download) .ai-overview { border-left-width: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); transition: box-shadow 0.2s ease; }
.wrap:has(.btn-download) .ai-overview[open] { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); }
.wrap:has(.btn-download) .ai-overview summary { padding: 1.1rem 1.5rem; }
.wrap:has(.btn-download) .ai-overview summary:hover { background: var(--bea-bg-alt); }
.wrap:has(.btn-download) .ai-overview summary strong { font-size: 1.05rem; }
.wrap:has(.btn-download) .ai-overview > div { padding: 0.25rem 1.75rem 1.75rem !important; font-size: 1rem; line-height: 1.7; color: var(--bea-text); font-family: var(--font-body); }
.wrap:has(.btn-download) .ai-overview > div > p:first-child { font-weight: 500; color: var(--bea-text); }
.wrap:has(.btn-download) .ai-overview > div > p + p { margin-top: 0.85rem; }

/* Footer (Filed in / Filing event) — discrete supporting block with
   hairline above and slightly refined typography. Lives inside the
   main-col, so the selector targets the main-col's last section. */
.wrap:has(.btn-download) .main-col > section:last-of-type { margin-top: 3rem !important; padding-top: 1.5rem; border-top: 1px solid var(--bea-border); font-size: 0.85rem !important; color: var(--bea-text-light); }
.wrap:has(.btn-download) .main-col > section:last-of-type p { margin: 0 0 0.4rem; }

/* "More from this matter" sidebar — each doc is a bordered card
   stacked vertically (modeled on .matter-card / .doc-item patterns).
   Hover lifts the card with a soft shadow + amber side accent so the
   cards feel interactive, not like a bare list. Sticky-position keeps
   the rail in view as the main column scrolls. */
/* Single-column body-grid when no .rail child is present (topic +
   entity pages after the design pivot — widget moved horizontal
   above the matter list, no right sidebar). */
.body-grid:not(:has(.rail)) { grid-template-columns: 1fr; }

/* Shared sticky rail behaviour for every body-grid page that still
   has a rail (document, matter). The rail pins to the top below the
   fixed site-nav (4.5rem tall) and gets its own internal scrollbar
   when the rail content exceeds the viewport height. */
.body-grid .rail {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
  align-self: start;
  /* Subtle scroll affordance: gutter on the right edge of the rail
     so content doesn't slam into the viewport edge. */
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
}

/* Scoped-browse card outer — applies wherever the partial renders.
   Compound `.rail-card.scoped-browse` ensures higher specificity than
   the global `.rail-card` so its padding/border-top win without
   needing !important. */
.rail-card.scoped-browse { padding: 1.5rem 1.25rem 1.25rem; background: var(--bea-white); border: 1px solid var(--bea-border); border-top: 3px solid var(--bea-amber); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); }

/* Tiny search box under the heading */
/* Search-input styling lives on .scoped-browse (see scoped-browse
   block below) so it applies on every page the partial renders.
   Webkit clear-button polish stays scoped to the doc page where it
   was first introduced. */
.wrap:has(.btn-download) .rail-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; height: 0.85rem; width: 0.85rem; background: var(--bea-text-light); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' fill='none'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' fill='none'/></svg>") center / contain no-repeat; cursor: pointer; }

/* Item list + cards — scoped to .scoped-browse so the matter / topic /
   entity rails (which also have non-scoped rail-cards with their own
   .rail-item styling) keep their existing item treatment OUTSIDE the
   scoped-browse card, but get the card style INSIDE it. */
.scoped-browse .rail-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.scoped-browse .rail-list li { margin: 0; padding: 0; }
.scoped-browse .rail-item { position: relative; display: flex; flex-direction: column; gap: 0.45rem; padding: 0.95rem 1.05rem 0.95rem 1.15rem; background: var(--bea-white); border: 1px solid var(--bea-border); text-decoration: none; color: inherit; cursor: pointer; min-height: 4.5rem; transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.scoped-browse .rail-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bea-amber); transform: scaleY(0); transform-origin: top; transition: transform 0.2s ease; }
.scoped-browse .rail-item:hover { background: var(--bea-purple-faint); border-color: var(--bea-purple); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(79, 61, 99, 0.08); color: inherit; }
.scoped-browse .rail-item:hover::before { transform: scaleY(1); }
.scoped-browse .rail-item-num { font-family: var(--font-body); font-size: 0.68rem; font-weight: 700; color: var(--bea-purple); letter-spacing: 0.12em; text-transform: uppercase; }
.scoped-browse .rail-item-title { font-family: var(--font-body); font-size: 0.92rem; line-height: 1.4; color: var(--bea-text); font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; transition: color 0.18s ease; }
.scoped-browse .rail-item:hover .rail-item-title { color: var(--bea-purple-dark); }

.scoped-browse .rail-empty { font-family: var(--font-body); font-size: 0.85rem; color: var(--bea-text-light); font-style: italic; text-align: center; margin: 1rem 0 0; padding: 1rem 0; }

.scoped-browse .rail-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--bea-border); font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; }
.scoped-browse .rail-pagination a { color: var(--bea-purple); text-decoration: none; padding: 0.35rem 0.55rem; transition: color 0.15s ease; }
.scoped-browse .rail-pagination a:hover { color: var(--bea-purple-dark); }
.scoped-browse .rail-page-indicator { color: var(--bea-text-light); font-weight: 600; letter-spacing: 0.05em; font-size: 0.72rem; }

/* ============================================================
   Scoped-browse card — shared rail pattern across document /
   matter / topic / entity pages. All rules below are class-name
   scoped (not page-scoped) so they apply wherever the partial
   renders.
   ============================================================ */

/* Eyebrow + heading — tighter pair than the existing .rail-search-
   header/.rail-search-label, more breathing room before the input */
.scoped-browse-eyebrow { font-family: var(--font-body); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--bea-amber); margin: 0 0 0.45rem; }
.scoped-browse-heading { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; color: var(--bea-purple); margin: 0 0 1.35rem; line-height: 1.2; letter-spacing: -0.01em; }

/* Search input — sit inside .rail-search wrapper, override the
   global .rail-search input rule. Bigger touch target, focus ring. */
.scoped-browse .rail-search { position: relative; margin: 0 0 1.1rem; }
.scoped-browse .rail-search-input { width: 100%; padding: 0.78rem 0.95rem 0.78rem 2.5rem; font-family: var(--font-body); font-size: 0.92rem; color: var(--bea-text); background: var(--bea-white); border: 1px solid var(--bea-border); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.scoped-browse .rail-search-input::placeholder { color: var(--bea-text-light); font-style: italic; }
.scoped-browse .rail-search-input:hover { border-color: var(--bea-purple-mid); }
.scoped-browse .rail-search-input:focus { outline: 0; border-color: var(--bea-purple); box-shadow: 0 0 0 3px var(--bea-purple-faint); }
.scoped-browse .rail-search-icon { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--bea-purple); font-size: 1.1rem; pointer-events: none; transition: color 0.15s ease; font-weight: 600; }
.scoped-browse .rail-search:focus-within .rail-search-icon { color: var(--bea-purple-dark); }

/* Chip filter row — full BEA button treatment. Bold, padded, with
   the same purple-faint→purple progression as .matter-card and
   .docket-item hover patterns. */
.scoped-browse-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.2rem; }
.scoped-browse-chip { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 1rem; background: var(--bea-white); border: 1px solid var(--bea-border); font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; color: var(--bea-text); letter-spacing: 0.02em; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.scoped-browse-chip:hover { background: var(--bea-purple); border-color: var(--bea-purple); color: var(--bea-white); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(79, 61, 99, 0.18); }
.scoped-browse-chip:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(79, 61, 99, 0.1); }
.scoped-browse-chip.is-active { background: var(--bea-purple); border-color: var(--bea-purple); color: var(--bea-white); box-shadow: 0 2px 6px rgba(79, 61, 99, 0.22); }
.scoped-browse-chip.is-active:hover { background: var(--bea-purple-dark); border-color: var(--bea-purple-dark); color: var(--bea-white); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(79, 61, 99, 0.28); }
.scoped-browse-chip-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; padding: 0 0.4rem; height: 1.15rem; font-size: 0.7rem; font-weight: 700; background: var(--bea-bg-alt); color: var(--bea-text-light); transition: background 0.15s ease, color 0.15s ease; }
.scoped-browse-chip:hover .scoped-browse-chip-count { background: rgba(255, 255, 255, 0.22); color: var(--bea-white); }
.scoped-browse-chip.is-active .scoped-browse-chip-count { background: rgba(255, 255, 255, 0.22); color: var(--bea-white); }

/* Filing-event dropdown — labeled select with custom chevron, same
   focus ring as the search input */
.scoped-browse-dropdown { display: flex; flex-direction: column; gap: 0.45rem; margin: 0 0 1.25rem; }
.scoped-browse-dropdown-label { font-family: var(--font-body); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--bea-text-light); }
.scoped-browse-dropdown-select { font-family: var(--font-body); font-size: 0.87rem; font-weight: 600; padding: 0.52rem 2.15rem 0.52rem 0.9rem; background: var(--bea-white); border: 1px solid var(--bea-border); color: var(--bea-text); cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%234F3D63' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 0.72rem; }
.scoped-browse-dropdown-select:hover { border-color: var(--bea-purple); }
.scoped-browse-dropdown-select:focus { outline: 0; border-color: var(--bea-purple); box-shadow: 0 0 0 3px var(--bea-purple-faint); }

/* Indent levels — future-proof for documents.parent_exhibit_no
   nesting. Always 0 today. */
.rail-list li[data-indent="1"] { margin-left: 1.2rem; }
.rail-list li[data-indent="1"] .rail-item-num::before { content: '↳ '; opacity: 0.5; font-weight: 400; }
.rail-list li[data-indent="2"] { margin-left: 2.4rem; }
.rail-list li[data-indent="2"] .rail-item-num::before { content: '↳ '; opacity: 0.5; font-weight: 400; }

/* Horizontal layout — used on topic + entity pages where the widget
   sits above the matter list (no right sidebar). Spans the full
   width; same colors, typography, hover behaviour as vertical.
   Arrangement:
     row 1: eyebrow
     row 2: heading
     row 3: search input (full width)
     row 4 (.scoped-browse-meta-row): dropdowns + escape hatch
            (right-aligned, wrap-aware)
     row 5+ (.scoped-browse-chips): chips on their own row(s),
            wrap freely with consistent gaps */
/* Horizontal panel gets --bea-bg-alt to feel like a unified control
   surface (chips + dropdowns lift off it). Vertical sidebar keeps
   white because it's already visually distinct via the amber-stripe
   top border. */
.scoped-browse-horizontal { padding: 1.6rem 1.85rem 1.5rem; margin-bottom: 2.5rem; display: flex; flex-direction: column; gap: 1.1rem; background: var(--bea-bg-alt); border: 1px solid var(--bea-border); border-top: 3px solid var(--bea-amber); box-shadow: none; }
.scoped-browse-horizontal .scoped-browse-eyebrow { margin: 0; }
.scoped-browse-horizontal .scoped-browse-heading { margin: 0; }
.scoped-browse-horizontal .rail-search { margin: 0; }

/* Meta-row: dropdowns + escape hatch on one line, left-aligned with
   the chips and search box above. */
.scoped-browse-meta-row { display: flex; flex-wrap: wrap; gap: 0.85rem 1.75rem; align-items: center; justify-content: flex-start; }
.scoped-browse-horizontal .scoped-browse-dropdown { margin: 0; flex-direction: row; align-items: center; gap: 0.6rem; }
.scoped-browse-horizontal .scoped-browse-dropdown-label { margin: 0; font-size: 0.62rem; }
.scoped-browse-horizontal .scoped-browse-dropdown-select { padding: 0.42rem 1.95rem 0.42rem 0.75rem; font-size: 0.84rem; background-position: right 0.65rem center; }

/* Chips row: full-width grid below the meta-row.
   Auto-fill columns with min 14rem keep chips at consistent widths
   and aligned in a clean grid. */
.scoped-browse-horizontal .scoped-browse-chips { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.55rem; }
.scoped-browse-horizontal .scoped-browse-chip { justify-content: space-between; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .body-grid { grid-template-columns: 1fr; }
  .rail { position: static; }
  .continue-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  .nav-search input { width: 180px; }
  .nav-links { gap: 1rem; margin-left: 1rem; }
  .browse-grid { grid-template-columns: 1fr; }
}

/* ---------- Print ---------- */
@media print {
  .site-nav, .rail, .skip-link { display: none !important; }
  .forward-banner { display: none !important; }
  body { font-size: 10pt; color: #000; background: #fff; }
  main { padding-top: 0 !important; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; }
  a[href^="/"]::after, a[href^="#"]::after, a[href^="mailto:"]::after { content: ""; }
  .body-grid, .continue-grid, .two-col { grid-template-columns: 1fr; }
  .section-excerpt, .ruling-item, .tl-item { page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; color: #000; }
  .hearing-banner { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- Feedback widget (docketwatch-56y) ---------- */
/* Global, fixed bottom-right. Button mirrors the .btn-download pattern
   (purple, uppercase, letter-spaced, square corners). Panel opens above it. */
.dw-feedback { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 900; font-family: var(--font-body); }

.dw-feedback-toggle {
  display: inline-flex; align-items: center;
  padding: 0.7rem 1.2rem;
  background: var(--bea-purple); color: var(--bea-white);
  border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.dw-feedback-toggle:hover { background: var(--bea-purple-dark); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); }

.dw-feedback-panel {
  position: absolute; bottom: calc(100% + 0.6rem); right: 0;
  width: 320px; max-width: calc(100vw - 3rem);
  background: var(--bea-white); border: 1px solid var(--bea-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  padding: 1.5rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.dw-feedback-panel.is-open { opacity: 1; transform: translateY(0); }
.dw-feedback-panel[hidden] { display: none; }

.dw-feedback-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.dw-feedback-eyebrow { font-family: var(--font-body); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--bea-amber); }
.dw-feedback-close { background: 0; border: 0; cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--bea-text-light); padding: 0 0.2rem; }
.dw-feedback-close:hover { color: var(--bea-purple); }

.dw-feedback-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bea-text); margin: 0.6rem 0 0.3rem; }
.dw-feedback-label span { color: var(--bea-text-light); font-weight: 400; text-transform: none; letter-spacing: 0; }

.dw-feedback-input {
  width: 100%; box-sizing: border-box;
  padding: 0.6rem 0.7rem;
  font-family: var(--font-body); font-size: 0.92rem; color: var(--bea-text);
  background: var(--bea-white); border: 1px solid var(--bea-border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dw-feedback-input:hover { border-color: var(--bea-purple-mid); }
.dw-feedback-input:focus { outline: 0; border-color: var(--bea-purple); box-shadow: 0 0 0 3px var(--bea-purple-faint); }
.dw-feedback-textarea { resize: vertical; min-height: 5rem; }

.dw-feedback-error { color: var(--bea-amber-dark); font-size: 0.8rem; margin: 0.5rem 0 0; }

.dw-feedback-submit {
  width: 100%; margin-top: 1rem;
  padding: 0.7rem 1.2rem;
  background: var(--bea-purple); color: var(--bea-white);
  border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.15s ease;
}
.dw-feedback-submit:hover { background: var(--bea-purple-dark); }

.dw-feedback-micro { color: var(--bea-text-light); font-size: 0.72rem; text-align: center; margin: 0.7rem 0 0; }
.dw-feedback-thanks { color: var(--bea-purple); font-weight: 700; text-align: center; padding: 1.5rem 0; }

/* Honeypot — off-screen and AT-hidden, but not display:none (bots skip those). */
.dw-feedback-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* -------- Nav autocomplete suggest dropdown (docketwatch-ams search epic) -------- */
.nav-suggest {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--bea-white);
  border: 1px solid var(--bea-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  z-index: 200;
  list-style: none;
  margin: 0; padding: 0.25rem 0;
  max-height: 22rem;
  overflow-y: auto;
}
.nav-suggest[hidden] { display: none; }

.nav-suggest-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--bea-text);
  transition: background 0.1s ease;
  flex-wrap: wrap;
}
.nav-suggest-row:hover,
.nav-suggest-row.is-active { background: var(--bea-purple-faint); }

.nav-suggest-label {
  flex: 1 1 auto;
  font-weight: 600;
  color: var(--bea-purple);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-suggest-sub {
  font-size: 0.75rem;
  color: var(--bea-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
  max-width: 40%;
}

.nav-suggest-all {
  display: block;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--bea-text-light);
  cursor: pointer;
  border-top: 1px solid var(--bea-border);
  margin-top: 0.25rem;
  transition: background 0.1s ease, color 0.1s ease;
}
.nav-suggest-all:hover { background: var(--bea-purple-faint); color: var(--bea-purple); }

/* -------- Result-type badge pills (used in dropdown + search results page) -------- */
.result-tag {
  display: inline-block;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.45rem;
  line-height: 1.4;
  border-radius: 2px;
  vertical-align: middle;
}
.result-tag--matter   { background: var(--bea-purple-faint); color: var(--bea-purple-dark); }
.result-tag--document { background: #E8F4F0; color: #2A6B56; }
.result-tag--entity   { background: #FEF4E8; color: #9A5A1A; }
.result-tag--topic    { background: #F0ECF8; color: #5C3D7A; }

/* -------- Search tabs + section layout (W3 redesign) -------- */
.search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--bea-border);
  padding-bottom: 0;
}
.search-tab {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bea-text-light);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.1s ease, border-color 0.1s ease;
}
.search-tab:hover { color: var(--bea-purple); }
.search-tab.is-active { color: var(--bea-purple); border-bottom-color: var(--bea-purple); }
.search-section { margin-bottom: 2.5rem; }
.search-section-h {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bea-text-light);
  margin: 0 0 0.75rem 0;
}
.search-seeall {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--bea-purple);
  font-weight: 600;
}
.n {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bea-text-light);
  background: var(--bea-bg-alt);
  border-radius: 10px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.2rem;
}

/* -------- Result card (used in search results + typeahead) -------- */
.result-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--bea-border);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  background: var(--bea-white);
  transition: border-color 0.1s ease, background 0.1s ease;
}
.result-card:hover { border-color: var(--bea-purple); background: var(--bea-purple-faint); }
.result-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.result-title { font-weight: 700; font-size: 0.9rem; color: var(--bea-text); }
.result-sub { font-size: 0.78rem; color: var(--bea-text-light); }
.result-snippet { font-size: 0.78rem; color: var(--bea-text); line-height: 1.5; margin-top: 0.1rem; }

/* docketwatch-j86 — Option E labeled lines for document results.
   Small amber uppercase label + value; Matter line bold, Exhibit/Section
   regular weight. Keeps the page's Inter register (no new font/weight). */
.result-line { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.8rem; line-height: 1.45; }
.result-label {
  flex-shrink: 0;
  min-width: 3.6rem;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bea-amber);
}
.result-line-text { color: var(--bea-text-light); min-width: 0; }
.result-line--matter .result-line-text { font-weight: 700; color: var(--bea-text); }
.result-matter { color: var(--bea-purple); }

/* ============================================================
   UI polish pass (docketwatch-1mb): rounded corners + unified
   solid-purple hover (white text) across cards, inputs,
   dropdowns, buttons, chips — matching the theme-card + pop-up
   styling. Pure presentation; no data/markup behaviour changes.
   The global nav search is intentionally left as-is.
   ============================================================ */

/* --- rounded corners: bring square components up to the slicker look --- */
.matter-card,
.browse-card,
.result-card,
.scoped-browse .rail-item,
.scoped-browse-horizontal,
.rail-card.scoped-browse,
.scoped-browse .rail-search-input,
.scoped-browse-dropdown-select,
.topics-toggle,
.btn-download,
.btn-approve, .btn-reject, .btn-merge { border-radius: 10px; }

.scoped-browse-chip,
.chip,
.status-pill { border-radius: 8px; }
.scoped-browse-chip-count { border-radius: 6px; }

/* --- unified hover: solid purple fill + white text + lift ---
   (replaces the light purple-faint wash on these card-like elements) --- */
.matter-card:hover,
.browse-card:hover,
.result-card:hover,
.scoped-browse .rail-item:hover {
  background-color: var(--bea-purple);
  border-color: var(--bea-purple);
  color: var(--bea-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 61, 99, 0.18);
}
/* invert inner text on hover so everything stays legible on purple */
.matter-card:hover .matter-num,
.matter-card:hover .matter-title,
.matter-card:hover .matter-meta,
.matter-card:hover .matter-meta b,
.browse-card:hover .browse-count,
.browse-card:hover .browse-label,
.browse-card:hover .browse-desc,
.result-card:hover .result-title,
.result-card:hover .result-sub,
.result-card:hover .result-snippet,
.result-card:hover .result-label,
.result-card:hover .result-line-text,
.result-card:hover .result-matter,
.scoped-browse .rail-item:hover .rail-item-num,
.scoped-browse .rail-item:hover .rail-item-title { color: var(--bea-white); }
/* chips inside a hovered matter card → translucent white so they read on purple */
.matter-card:hover .chip { background: rgba(255, 255, 255, 0.2); color: var(--bea-white); }
/* the thin amber/accent ::before bar is redundant under a full fill — hide it */
.matter-card:hover::before,
.browse-card:hover::before { opacity: 0; }

/* --- buttons: refine the Show-all toggle (was a hard square block) --- */
.topics-toggle { letter-spacing: 0.06em; box-shadow: 0 2px 6px rgba(79, 61, 99, 0.18); }
.topics-toggle:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(79, 61, 99, 0.24); }

/* --- matter list rows (/matters, topic + entity pages): solid-purple hover
   with EVERY text element inverted to white. Without this the row went purple
   but the matter number, year, applicant + stats stayed dark = unreadable. --- */
.matter-row:hover { background: var(--bea-purple); border-color: var(--bea-purple); color: var(--bea-white); }
.matter-row:hover .matter-row-num,
.matter-row:hover .matter-row-num .year,
.matter-row:hover .matter-row-title,
.matter-row:hover .matter-row-title .applicant,
.matter-row:hover .matter-row-stats,
.matter-row:hover .matter-row-stats b,
.matter-row:hover .matter-row-exp { color: var(--bea-white); }

/* docketwatch-5gm / docketwatch-gro6: forward-attribution banner — amber
   "sign up" nudge shown on a session that differs from the token owner's
   first-seen session. Sits as the first child of <main>, below the fixed
   nav. tour.js adds .is-front when the first-run tour auto-launches, which
   lifts it above the tour backdrop (tour z-index: 9000) until dismissed. */
.forward-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--bea-amber-light);
  color: var(--bea-purple-dark);
  padding: 0.6rem 1.25rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--bea-amber-dark);
}
.forward-banner a { color: var(--bea-purple-dark); font-weight: 600; }
.forward-banner-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--bea-purple-dark);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}
.forward-banner-close:hover { opacity: 0.7; }
.forward-banner.is-front {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9100;            /* above .tour-overlay (9000) */
  box-shadow: 0 2px 12px rgba(36, 28, 46, 0.35);
}
.forward-banner.is-hidden { display: none; }

/* ---------- Admin: pipeline sessions (docketwatch-sii2) ---------- */
:root {
  --stoplight-red: #B5644A; --stoplight-yellow: #C7A04A; --stoplight-green: #6F8F65;
  --stoplight-red-bg: #F4DDD2; --stoplight-yellow-bg: #F5E8C5; --stoplight-green-bg: #DCE6D5;
}
.pipeline-h3 { font-family: var(--font-heading); font-weight: 800; color: var(--bea-purple); font-size: 1.05rem; letter-spacing: -0.02em; margin: 1.6rem 0 0.7rem; }
.backlog-strip { display: flex; gap: 0.8rem; flex-wrap: wrap; max-width: 70rem; margin-bottom: 0.5rem; }
.backlog-tile { flex: 1; min-width: 10.5rem; border: 1px solid var(--bea-border); padding: 0.75rem 1rem; position: relative; }
.backlog-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stoplight-green); }
.backlog-tile.warn::before { background: var(--stoplight-yellow); }
.backlog-tile.bad::before { background: var(--stoplight-red); }
.backlog-n { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; color: var(--bea-purple); line-height: 1; font-variant-numeric: tabular-nums; }
.backlog-l { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--bea-text-light); margin-top: 0.3rem; }
.backlog-tile a { font-size: 0.7rem; font-weight: 600; }
.pipeline-crash-banner { display: flex; align-items: center; gap: 0.8rem; background: var(--stoplight-red-bg); border-left: 3px solid var(--stoplight-red); padding: 0.6rem 1rem; font-size: 0.8rem; max-width: 70rem; margin: 1rem 0; }
.pipeline-row { cursor: pointer; }
.pipeline-row:hover td { background: var(--bea-purple-faint); }
.run-pill { display: inline-block; padding: 0.1rem 0.55rem; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.p-ok { background: var(--stoplight-green-bg); color: var(--stoplight-green); }
.p-warn { background: var(--stoplight-yellow-bg); color: #8a6d2a; }
.p-fail { background: var(--stoplight-red-bg); color: var(--stoplight-red); }
.p-run { background: var(--bea-purple-faint); color: var(--bea-purple); }
.p-crash { background: var(--stoplight-red); color: #fff; }
.cell-warn { color: #8a6d2a; font-weight: 600; }

/* docketwatch-sii2: pipeline session detail page */
.run-meta { display: flex; gap: 2.2rem; flex-wrap: wrap; border-top: 1px solid var(--bea-border); border-bottom: 1px solid var(--bea-border); padding: 0.8rem 0; margin: 1.1rem 0 1.4rem; font-size: 0.8rem; }
.run-meta b { display: block; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bea-text-light); margin-bottom: 0.1rem; }
.run-meta code { font-size: 0.74rem; background: var(--bea-bg-alt); padding: 0.1rem 0.4rem; }
.run-steps { display: flex; gap: 0.8rem; flex-wrap: wrap; max-width: 62rem; }
.run-sbox { flex: 1; min-width: 11rem; background: var(--bea-bg-alt); padding: 0.8rem 1rem; border-top: 3px solid var(--stoplight-green); }
.run-sbox.warn { border-top-color: var(--stoplight-yellow); }
.run-sbox.skip { border-top-color: var(--bea-border); }
.run-sbox .nm { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bea-text-light); margin-bottom: 0.25rem; }
.run-sbox .val { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--bea-purple); font-variant-numeric: tabular-nums; }
.run-sbox .det { font-size: 0.72rem; color: var(--bea-text-light); margin-top: 0.25rem; }
.run-err summary { cursor: pointer; color: var(--bea-purple); font-size: 0.72rem; font-weight: 600; margin-top: 0.3rem; }
.run-err pre { font-size: 0.66rem; line-height: 1.45; background: var(--bea-bg-alt); border-left: 3px solid var(--stoplight-red); padding: 0.6rem 0.8rem; margin-top: 0.35rem; white-space: pre-wrap; max-width: 46rem; }
.backlog-u { font-family: var(--font-body); font-size: 0.62rem; font-weight: 600; color: var(--bea-text-light); text-transform: uppercase; letter-spacing: 0.09em; margin-left: 0.3rem; }

/* ---------- Admin: Config tab (docketwatch-15g0) ---------- */

/* Card-style section wrapping a group of related settings — matches
   the backlog-tile / rail-card pattern: white bg, border, left accent. */
.config-section {
  background: var(--bea-white);
  border: 1px solid var(--bea-border);
  border-left: 3px solid var(--bea-purple);
  padding: 1.5rem 1.75rem 1.25rem;
  margin-bottom: 1.5rem;
}
.config-section h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--bea-purple);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.config-section button[type="submit"] {
  margin-top: 1rem;
  background: var(--bea-purple);
  color: var(--bea-white);
  border: 0;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.config-section button[type="submit"]:hover { background: var(--bea-purple-dark); }

/* One setting row: label / input / meta — flex layout with sensible
   spacing, vertically centered. Matches the row density of admin-table. */
.config-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--bea-border);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--bea-text);
}
.config-row:last-of-type { border-bottom: 0; }
.config-row label {
  flex: 0 0 14rem;
  font-weight: 600;
  color: var(--bea-text);
}
.config-row label small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--bea-text-light);
  margin-top: 0.1rem;
}
.config-row input[type="number"],
.config-row select {
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--bea-border);
  background: var(--bea-white);
  color: var(--bea-text);
  width: 10rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.config-row input[type="number"]:focus,
.config-row select:focus {
  outline: 0;
  border-color: var(--bea-purple);
  box-shadow: 0 0 0 3px var(--bea-purple-faint);
}

/* "default: X" helper text — muted, smaller, sits to the right of the input. */
.config-meta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--bea-text-light);
  flex: 1;
}

/* Small inline badge showing an overridden value — mirrors .admin-tab-count /
   .run-pill: tight padding, small caps, colored bg. */
.config-changed {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bea-amber-light);
  color: var(--bea-purple-dark);
  vertical-align: middle;
}

/* Notice box for read-only "pending feature" message — muted warning tone
   matching .docs-pending: purple-faint bg, left accent, restrained. */
.config-callout {
  background: var(--bea-bg-alt);
  border-left: 3px solid var(--bea-amber);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--bea-text-light);
  line-height: 1.5;
}

/* Small muted audit line below the rows — same visual register as
   .backlog-l / .run-meta secondary labels. */
.config-audit {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--bea-text-light);
  margin-top: 0.9rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--bea-border);
}
