/* NEURA caregiver brief layout: namabots brief standard (hero band, details table,
   abbreviation key, sticky contents with % read, numbered sections, numbered sources).
   Uses each page's own theme tokens (--bg, --fg, --muted, --surface, --sep, --violet, --violet2). */
:root { --brief-rail: 236px; --brief-gut: clamp(16px, 4vw, 48px); }
.wrap { max-width: 1200px; }
.b-hero {
  position: relative; overflow: hidden;
  width: 100vw; margin-left: calc(50% - 50vw);
  background:
    radial-gradient(ellipse 60% 120% at 88% 10%, color-mix(in srgb, var(--violet2) 32%, transparent), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--fg) 5%, transparent) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, color-mix(in srgb, var(--fg) 5%, transparent) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--surface);
  border-block: 1px solid var(--sep);
  margin-top: 12px;
}
.b-hero-in {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--brief-gut) clamp(28px, 4vw, 48px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
}
.b-hero .eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet);
}
.b-hero h1 {
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1.12; letter-spacing: -0.025em;
  margin: 12px 0 14px; max-width: 22ch; text-wrap: balance;
}
.b-hero .lede { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; max-width: 64ch; color: color-mix(in srgb, var(--fg) 86%, var(--bg)); }
.b-hero .bot { display: block; }
.b-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.b-chips span, .b-chips a {
  font-size: 13px; line-height: 1.3; padding: 6px 11px; border-radius: 8px;
  border: 1px solid var(--sep); background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--fg);
  text-decoration: none;
}
.b-chips .state { border-color: color-mix(in srgb, var(--violet) 55%, transparent); color: var(--violet); font-weight: 600; }
.b-chips a:hover { border-color: var(--violet); }

.b-layout { display: grid; grid-template-columns: var(--brief-rail) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); margin-top: 8px; }
.b-toc {
  position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto;
  padding: 24px 4px 24px 0; min-width: 0;
}
.b-toc .pct { font-family: Sora, system-ui, sans-serif; font-weight: 800; font-size: 26px; color: var(--violet); line-height: 1; font-variant-numeric: tabular-nums; }
.b-toc .pctl { font-size: 12px; color: var(--muted); margin: 3px 0 8px; }
.b-toc .bar { height: 3px; background: var(--sep); border-radius: 3px; margin-bottom: 14px; }
.b-toc .bar i { display: block; height: 3px; width: 0; background: var(--violet); border-radius: 3px; }
.b-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.b-toc li a {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px;
  border-radius: 8px; color: var(--fg); text-decoration: none; font-size: 14px; line-height: 1.35;
}
.b-toc li a::before {
  counter-increment: t; content: counter(t, decimal-leading-zero);
  flex: none; width: 22px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.b-toc li.pre a::before { content: "·"; counter-increment: none; text-align: center; }
.b-toc li a:hover { color: var(--violet); }
.b-toc li a.on { background: var(--surface); color: var(--violet); font-weight: 700; box-shadow: inset 3px 0 0 var(--violet); }
.b-toc-m { display: none; }

.b-main { min-width: 0; padding-bottom: 56px; }
.b-main > section, .b-main .article > section {
  padding: 40px 0 28px; border-bottom: 1px solid var(--sep); scroll-margin-top: 16px;
}
.b-main .kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.b-main h2 { font-size: clamp(22px, 2.4vw, 30px); text-wrap: balance; margin-bottom: 14px; }
.b-main h2 .num { display: none; }
.b-main p, .b-main li { max-width: 72ch; }
.b-main .article p, .b-main .article li { color: color-mix(in srgb, var(--fg) 84%, var(--bg)); }
.b-main p + p { margin-top: 12px; }
.b-main a { color: var(--violet); text-underline-offset: 3px; }

.b-details table { width: 100%; border-collapse: collapse; font-size: 14px; }
.b-details th, .b-details td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--sep); }
.b-details th { width: 150px; color: var(--muted); font-weight: 600; }
.b-tablewrap { overflow-x: auto; border: 1px solid var(--sep); border-radius: 10px; background: var(--surface); }
.b-abbr { margin-top: 18px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--sep); font-size: 14px; line-height: 1.6; }
.b-abbr strong { display: block; margin-bottom: 6px; }
.b-abbr dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
.b-abbr dt { font-weight: 700; font-variant-numeric: tabular-nums; }
.b-abbr dd { margin: 0; color: color-mix(in srgb, var(--fg) 85%, var(--bg)); }
.b-history { margin-top: 14px; font-size: 14px; }
.b-history summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.b-history ul { margin: 4px 0 0; padding-left: 18px; }
.b-history li + li { margin-top: 6px; }

sup.ref { font-size: 0.72em; line-height: 0; margin-left: 1px; }
sup.ref a { text-decoration: none; font-weight: 700; padding: 0 1px; }
code.card a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.b-main .sources ol { padding-left: 0; list-style: none; counter-reset: s; }
.b-main .sources ol li { counter-increment: s; position: relative; padding: 10px 0 10px 42px; border-bottom: 1px solid var(--sep); scroll-margin-top: 16px; }
.b-main .sources ol li::before {
  content: counter(s); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface); color: var(--violet);
}
.b-main .sources ol li:target { background: color-mix(in srgb, var(--violet) 10%, transparent); }
.b-main .sources a { word-break: break-word; display: inline-block; padding-block: 6px; }

@media (max-width: 900px) {
  .b-layout { grid-template-columns: minmax(0, 1fr); }
  .b-toc { display: none; }
  .b-toc-m {
    display: block; position: sticky; top: 0; z-index: 5;
    background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--sep);
    padding: 0 2px;
  }
  .b-toc-m summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; cursor: pointer; }
  .b-toc-m .pct-m { color: var(--violet); font-variant-numeric: tabular-nums; }
  .b-toc-m .bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
  .b-toc-m .bar i { display: block; height: 2px; width: 0; background: var(--violet); }
  .b-toc-m ol { list-style: none; margin: 0; padding: 0 0 10px; max-height: 60vh; overflow-y: auto; }
  .b-toc-m li a { display: flex; align-items: center; min-height: 44px; color: var(--fg); text-decoration: none; font-size: 15px; }
  .b-main > section, .b-main .article > section { scroll-margin-top: 60px; }
  .b-hero-in { grid-template-columns: minmax(0, 1fr); }
  .b-hero .bot { display: none; }
  .b-details th { width: 110px; }
}
@media (max-width: 480px) {
  .b-details th, .b-details td { display: block; width: auto; border-bottom: 0; padding: 4px 12px; }
  .b-details tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--sep); }
  .b-abbr dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .b-abbr dd { margin-bottom: 8px; }
}
