/* ///styles.css - Static, accessible, WCAG 2.2 AA-compliant layout (light theme) */

/* =========================
   Theme Tokens (required)
   ========================= */
:root{
  --bg:#FAFBFC;
  --surface:#FFFFFF;
  --text:#0F172A;
  --muted:#475569;
  --line:#E5E7EB;
  --blue:#2563EB;
  --green:#16A34A;
  --orange:#F59E0B;
  --red:#DC2626;
  --grey:#64748B;
  --pill-bg:#F1F5F9;
  --focus:#60A5FA;
  --topbar-h:72px;
  --radius:12px;
  --shadow:0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --header-h:72px;
}

/* =========================
   Base / Typography
   ========================= */
*,
*::before,
*::after{ box-sizing:border-box; }

html{
  line-height:1.5;
  -webkit-text-size-adjust:100%;
  color-scheme: light;
   scroll-padding-top:calc(var(--topbar-h) + 12px);
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, Apple Color Emoji, Segoe UI Emoji;
  font-size:16px;
}

h1,h2,h3,h4{
  line-height:1.2;
  margin:0 0 .5rem 0;
}

h1{ font-size:clamp(1.4rem, 2.2vw + .8rem, 2rem); }
h2{ font-size:clamp(1.2rem, 1.2vw + .8rem, 1.5rem); }
h3{ font-size:1.1rem; }
p{ margin:.5rem 0 1rem 0; }

ul,ol{ margin:.25rem 0 1rem 1.25rem; }
li{ margin:.25rem 0; }

a{
  color:var(--blue);
  text-decoration:underline;
  text-underline-offset:2px;
}
a:hover,
a:focus-visible{
  text-decoration-thickness:3px;
}

/* Accessible selection */
::selection{
  background:var(--focus);
  color:#000;
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  position:fixed;
  left:1rem;
  top:1rem;
  width:auto;
  height:auto;
  padding:.5rem .75rem;
  background:var(--surface);
  border:2px solid var(--focus);
  border-radius:8px;
  z-index:10000;
}

/* =========================
   Buttons & Form Controls
   ========================= */
.btn{
  --_bg: var(--blue);
  --_fg: #fff;
  --_bd: transparent;
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.5rem .75rem;
  background:var(--_bg);
  color:var(--_fg);
  border:1px solid var(--_bd);
  border-radius:10px;
  box-shadow:none;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{ filter:brightness(0.95); }
.btn:active{ transform:translateY(1px); }
.btn:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:2px;
}

.btn-ghost{
  --_bg: transparent;
  --_fg: var(--text);
  --_bd: var(--line);
  background:var(--_bg);
  color:var(--_fg);
  border:1px solid var(--_bd);
}

.header-actions .btn{ background:var(--grey); }
.header-actions .btn:hover{ filter:brightness(0.95); }

input[type="search"],
input[type="text"],
select{
  appearance:none;
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  padding:.5rem .75rem;
  min-width:10rem;
}
input::placeholder{ color:var(--muted); }
input:focus-visible,
select:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:2px;
}

[disabled],
[aria-disabled="true"]{
  opacity:.6;
  pointer-events:none;
}

/* =========================
   Header
   ========================= */
.site-header{
  position:relative; /* container only */
  z-index:auto;
  background:transparent;
  box-shadow:none;
  border:none;
}

/* New sticky topbar */
.site-topbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:var(--surface);
  border-bottom:1px solid var(--line);
  box-shadow:var(--shadow);
  min-height:var(--topbar-h);
}

/* Keep your grid, but use the topbar height token */
.header-inner{
  display:grid;
  grid-template-columns: auto 1fr auto auto;
  gap:.75rem 1rem;
  align-items:center;
  min-height:var(--topbar-h);
  padding:.5rem 1rem;
}


.header-inner{
  display:grid;
  grid-template-columns: auto 1fr auto auto;
  gap:.75rem 1rem;
  align-items:center;
  min-height:var(--header-h);
  padding:.5rem 1rem;
}

.title-wrap{
  display:flex;
  align-items:center;
  gap:.5rem;
  min-width:0;
}
#report-title{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:.4ch;
  padding:.2rem .6rem;
  border-radius:999px;
  font-weight:700;
  background:var(--pill-bg);
  border:1px solid var(--line);
  color:var(--grey);
}
.pill.tlp{ color:var(--orange); border-color:var(--orange); background:color-mix(in oklab, var(--orange) 12%, var(--pill-bg)); }

#globalSearchForm{
  display:flex;
  align-items:center;
  gap:.5rem;
  justify-self:center;
  /* width:min(780px, 100%); */
}
#globalSearch{ flex:1; min-width:12rem; }
#clearSearch{ line-height:1; }

.integrity{
  border-top:1px solid var(--line);
  padding:.5rem 1rem .75rem 1rem;
  background:var(--surface);
}
.integrity-bar{
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}
.integrity h2{
  font-size:0.95rem;
  margin:0 0 .25rem 0;
}
.integrity ul{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem 1.25rem;
  list-style:none;
  padding:0;
  margin:.25rem 0 .5rem 0;
}
.integrity li{ font-size:.9rem; }
.integrity-status{ margin:0; color:var(--muted); }

/* =========================
   Layout
   ========================= */
.layout{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:1rem;
  align-items:start;
  padding:1rem;
}

.toc{
  position:sticky;
  top:calc(var(--topbar-h) + .5rem);
  align-self:start;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1rem;
  max-height:calc(100dvh - var(--header-h) - 2rem);
  overflow:auto;
}
.toc ol{
  padding-left:1rem;
  margin:.25rem 0 0 0;
}
.toc > ol{ padding-left:10px; }
.toc a{
  color:inherit;
  text-decoration:underline;
  text-underline-offset:2px;
}
.toc--collapsed{ display:none; }

.content{
  min-width:0;
}

/* Cards */
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1rem 1.25rem;
  box-shadow:var(--shadow);
  margin-bottom:1rem;
}
.subcard{
  background:var(--surface);
  border:1px dashed var(--line);
  border-radius:10px;
  padding:1rem;
  margin:.75rem 0 0 0;
}

.section-header,
.subheader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.25rem;
}
.copy-link.btn-ghost{ font-size:1rem; }

/* Text helpers */
.muted{ color:var(--muted); }
.hint{ color:var(--muted); font-size:.9rem; }
.visually-hidden{
  position:absolute !important;
  width:1px; height:1px;
  overflow:hidden; clip:rect(0 0 0 0);
  white-space:nowrap; clip-path:inset(50%); border:0; padding:0; margin:-1px;
}

/* Target highlight */
:target{
   scroll-margin-top:calc(var(--topbar-h) + 12px);
  outline:3px solid var(--focus);
  outline-offset:2px;
  border-radius:8px;
}

/* Mark (search highlight) */
mark{
  background:color-mix(in oklab, var(--focus) 35%, #fff);
  padding:0 .15em;
  border-radius:4px;
}

/* =========================
   Tables & Data Regions
   ========================= */
.table-wrap{
  border:1px solid var(--line);
  border-radius:10px;
  /* No scrollbars; content wraps instead */
  overflow:visible;
  background:var(--surface);
}

.table-wrap[aria-busy="true"]{
  opacity:.75;
}

table{
 width:100%;
  /* Fixed layout lets cells shrink and wrap to fit the container */
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
  font-size:.95rem;
}
thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:var(--pill-bg);
  color:var(--text);
  text-align:left;
  border-bottom:1px solid var(--line);
  padding:.6rem .75rem;
}
tbody td{
  border-top:1px solid var(--line);
  padding:.55rem .75rem;
  vertical-align:top;
}
tbody tr:hover td{
  background:color-mix(in oklab, var(--blue) 6%, var(--surface));
}
/* Hard wrap long strings (URLs, hashes, file paths) so there’s no horizontal scroll */
th, td{
  white-space:normal;
  overflow-wrap:anywhere;   /* modern */
  word-break:break-word;    /* fallback */
  hyphens:auto;
}

/* Make inline code and links wrap too */
td code, td a{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Sort indicators via aria-sort */
th[aria-sort="ascending"]::after{ content:" ▲"; }
th[aria-sort="descending"]::after{ content:" ▼"; }
th[role="columnheader"]{ cursor:pointer; }

/* Pagination & table actions */
.table-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  align-items:center;
  margin-bottom: 10px;
}
.pagination{
  display:flex;
  gap:.25rem;
  align-items:center;
  justify-content:flex-end;
  padding:.5rem;
  border-top:1px solid var(--line);
}
.page-btn{
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:8px;
  padding:.25rem .5rem;
  cursor:pointer;
}
.page-btn[aria-current="true"],
.page-btn:hover{ background:var(--pill-bg); }

/* Status badges that JS may add */
.badge{
  display:inline-block;
  padding:.15rem .5rem;
  border-radius:999px;
  font-size:.8rem;
  border:1px solid var(--line);
  background:var(--pill-bg);
}
.badge--confirmed{ border-color:var(--green); color:var(--green); }
.badge--likely{ border-color:var(--orange); color:var(--orange); }
.badge--possible{ border-color:var(--blue); color:var(--blue); }
.badge--disproven{ border-color:var(--red); color:var(--red); }

/* Evidence row utilities */
.copyable{
  user-select:all;
}

/* Noscript */
.noscript-warning{
  margin:1rem;
  padding:.75rem 1rem;
  border:2px solid var(--red);
  border-radius:10px;
  background:color-mix(in oklab, var(--red) 10%, var(--surface));
}

/* =========================
   Footer
   ========================= */
.site-footer{
  border-top:1px solid var(--line);
  background:var(--surface);
  padding:1rem;
}
#generatedAt{ margin:.25rem 0 0 0; }

/* =========================
   Responsive
   ========================= */
@media (max-width: 1024px){
  .layout{
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 900px){
  .header-inner{
    grid-template-columns: auto 1fr auto;
  }
  #globalSearchForm{
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .layout{
    grid-template-columns: 1fr;
  }
  .toc{
    position:static;
    max-height:none;
    order:-1;
    margin-bottom:.5rem;
  }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}

/* =========================
   Focus styles (WCAG 2.2)
   ========================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:2px;
  border-radius:6px;
}

/* =========================
   Print Styles (A4/Letter)
   ========================= */
@media print{
  :root{ --bg:#fff; --surface:#fff; --text:#000; --line:#000; }
  @page{ margin:16mm; size:auto; }

  body{ background:#fff; color:#000; }
  .site-header,
  .toc,
  .header-actions,
  #globalSearchForm,
  .integrity{ display:none !important; }

  .card,
  .subcard{
    box-shadow:none;
    border-color:#000;
  }

  /* Expand collapsibles */
  details{ display:block; }
  summary{ display:none; }

  /* Show link URLs after text for external links */
  a[href^="http"]::after{ content:" (" attr(href) ")"; font-size:.9em; }
  a[href^="mailto:"]::after{ content:" (" attr(href) ")"; font-size:.9em; }

  /* Avoid breaking table rows */
  table{ page-break-inside:auto; }
  tr{ page-break-inside:avoid; page-break-after:auto; }
  thead{ display:table-header-group; }
  tfoot{ display:table-footer-group; }
}

/* =========================
   Utility / States
   ========================= */
[hidden]{ display:none !important; }
[aria-live]{ min-height:1.25rem; }
code,kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.925em;
  background:var(--pill-bg);
  border:1px solid var(--line);
  border-radius:6px;
  padding:0 .25rem;
}

/* Hover treatments for clarity */
.header-actions .btn:hover,
.btn-ghost:hover{
  background:color-mix(in oklab, var(--blue) 6%, var(--surface));
}

/* Clear search button minimal footprint */
#clearSearch{
  padding:.5rem;
  width:2.2rem;
  justify-content:center;
}

/* Hint separators */
.hint::before{
  content:"ℹ️ ";
  aria-hidden:true;
  margin-right:.25rem;
}
/* Local-file access banner */
.fs-banner{
  margin-top:.5rem;
  padding:.75rem 1rem;
  border:1px solid var(--line);
  border-radius:10px;
  background:color-mix(in oklab, var(--orange) 10%, var(--surface));
}
.fs-banner p{ margin:.25rem 0 .75rem 0; }
#tocToggle{
    display:none;
}
/* --- Topbar improved grid --- */
.topbar-grid{
  display:grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "menu brand actions"
    "menu search actions";
  column-gap:1rem;
  row-gap:.5rem;
  align-items:center;
}

/* Regions */
.topbar-menu{ grid-area: menu; }
.topbar-brand{
  grid-area: brand;
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width:0;
}
.topbar-brand #report-title{
  font-weight:700;
  font-size:clamp(1rem, 1.1vw + .9rem, 1.4rem);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar-search{ grid-area: search; }
.topbar-actions{
  grid-area: actions;
  display:flex;
  gap:.5rem;
  align-items:center;
  justify-self:end;
}
/* --- Icon-style buttons (menu & clear) --- */
.icon-btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px; height:42px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:10px;
  cursor:pointer;
  font-size:1rem;
}
.icon-btn.small{ width:32px; height:32px; }
.icon-btn:hover{ background:color-mix(in oklab, var(--blue) 6%, var(--surface)); }
.icon-btn:focus-visible{ outline:3px solid var(--focus); outline-offset:2px; }

/* Compact action buttons on the right */
.topbar-actions .btn{
  padding:.45rem .6rem;
  border-radius:8px;
}
.topbar-actions .btn.btn-ghost{
  background:transparent;
  color:var(--text);
  border:1px solid var(--line);
}
/* --- Collapse nicely on small screens --- */
@media (max-width: 900px){
  .topbar-grid{
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "menu actions"
      "brand brand"
      "search search";
  }
  .topbar-actions{ justify-self:end; }
  .topbar-brand{ flex-wrap:wrap; align-items:flex-start; }
  .topbar-brand #report-title{ white-space:normal; }
}
/* --- Beautiful sticky topbar --- */
.site-topbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:
    linear-gradient(180deg, #FFFFFF 0%, #FBFBFD 60%, #F9FAFB 100%);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  min-height:var(--topbar-h);
}

/* thin accent line that matches AMBER without hurting contrast */
.site-topbar::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background: color-mix(in oklab, var(--orange) 65%, #fff);
  opacity:.8;
  pointer-events:none;
}

/* NEW grid layout (single row on desktop) */
/* One-row desktop layout: menu | brand (flex) | search (narrow) | actions */
.topbar-grid.v2{
  display:grid;
  grid-template-columns: auto minmax(0,1fr) minmax(22ch, 28ch) auto !important;
  grid-template-areas: "menu brand search actions";
  align-items:center;
  column-gap:.75rem;  /* tighter gap so search doesn't look detached */
  row-gap:.25rem;
  padding:.5rem 1rem;
}
/* map areas (no HTML change needed) */
#tocToggle{ grid-area: menu; }
.topbar-brand{ grid-area: brand; min-width:0; }
.topbar-search{ grid-area: search; justify-self:stretch; max-width:28ch; }
.topbar-actions{ grid-area: actions; justify-self:end; gap:.4rem; }



/* Brand cluster */
.topbar-brand{
  min-width:0;
}
.brand-row{
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width:0;
}
#report-title{
  font-weight:800;
  letter-spacing:.1px;
  font-size:clamp(1.05rem, 1.1vw + .9rem, 1.5rem);
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brand-sub{
  margin:.15rem 0 0 0;
  color:var(--muted);
  font-size:.92rem;
}

/* Search lane */
/* Search lane: smaller radius + tighter look */
.search-input{ position:relative; }
.search-input input{
  width:100%;
  padding:.55rem .85rem;
  padding-right:2.2rem;             /* space for the clear button */
  border:1px solid var(--line);
  border-radius:12px;               /* less pill-y */
  background:#fff;
  box-shadow:inset 0 1px 0 rgba(15,23,42,.03);
}
.search-input input::placeholder{ color:var(--muted); }

/* Clear X button */
.search-input .icon-btn.small{
  position:absolute;
  right:6px; top:50%;
  transform:translateY(-50%);
  width:28px; height:28px;
  border-color:transparent;
  background:transparent;
}

/* Actions area */
.topbar-actions{
  display:flex;
  gap:.5rem;
  justify-self:end;
}
.topbar-actions .btn{
  padding:.45rem .65rem;
  border-radius:10px;
}
.topbar-actions .btn.btn-ghost{
  background:#fff;
  border:1px solid var(--line);
}
.topbar-actions #printBtn{
  background:var(--grey);
  color:#fff;
}

/* Compact, high-contrast menu/clear buttons */
.icon-btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px; height:42px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  cursor:pointer;
}
.icon-btn.small{ width:32px; height:32px; }
.icon-btn:hover{ background:color-mix(in oklab, var(--blue) 6%, #fff); }
.icon-btn:focus-visible{ outline:3px solid var(--focus); outline-offset:2px; }

/* High-contrast chip with orange accent dot */
/* Subtle, compact chip with an accent dot; AA-safe text color */
.chip{
  display:inline-flex;
  align-items:center;
  gap:.5ch;
  padding:.15rem .5rem;
  border-radius:999px;
  background:color-mix(in oklab, var(--orange) 10%, var(--pill-bg));
  border:1px solid color-mix(in oklab, var(--orange) 45%, var(--line));
  color:var(--text);
  font-weight:700;
  font-size:.87rem;
  line-height:1.1;
}
.chip--tlp .chip-dot{
  width:.55rem; height:.55rem; border-radius:50%;
  background:var(--orange);
  box-shadow:0 0 0 2px #fff, 0 0 0 3px color-mix(in oklab, var(--orange) 35%, #fff);
}

@media (max-width: 900px){
  .topbar-grid.v2{
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "menu brand actions"
      "menu search actions";
  }
  .topbar-brand{ grid-area: brand; }
  .topbar-search{ grid-area: search; }
  .topbar-actions{ grid-area: actions; }
  #report-title{ white-space:normal; }
}
/* Let the title truncate before it pushes the search down */
#report-title{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

/* Make the brand flex row not grow beyond its cell */
.brand-row{
 display:flex;
  align-items:baseline;
  gap:.5rem .75rem;
  flex-wrap:wrap;       /* allow chip to flow to next line if needed */
  min-width:0;          /* critical so children can shrink */
  width:100%;
}
#report-title{
  margin:0;
  font-weight:800;
  letter-spacing:.1px;
  font-size:clamp(1.05rem, 1.1vw + .9rem, 1.5rem);
  white-space:normal;   /* was nowrap */
  overflow:visible;     /* was hidden */
  text-overflow:clip;   /* was ellipsis */
  max-width:100%;
}
.brand-sub{ margin:.15rem 0 0 0; color:var(--muted); font-size:.92rem; }
@media (max-width: 980px){
  .topbar-grid.v2{
    grid-template-areas:
      "menu brand actions"
      "menu search actions";
    grid-template-columns: auto minmax(0,1fr) auto !important;
  }
}
@media (max-width: 980px){
  .topbar-grid.v2{
    grid-template-areas:
      "menu brand actions"
      "menu search actions";
    grid-template-columns: auto minmax(0,1fr) auto !important;
  }
  /* allow multi-line title comfortably */
  #report-title{ font-size:clamp(1rem, 1vw + .85rem, 1.35rem); }
}
/* --- Chips --------------------------------------------------------------- */
.chip{ display:inline-flex; align-items:center; gap:.4ch;
  padding:.15rem .5rem; border-radius:999px; line-height:1.15;
  border:1px solid var(--line); background:var(--pill-bg); color:var(--text);
  font-size:.85rem; font-weight:700;
}
.chip--status{ padding:.18rem .55rem; }
.chip--status.is-confirmed{ border-color:color-mix(in oklab,var(--green) 55%,var(--line)); background:color-mix(in oklab,var(--green) 12%,var(--pill-bg)); }
.chip--status.is-likely{    border-color:color-mix(in oklab,var(--orange) 55%,var(--line)); background:color-mix(in oklab,var(--orange) 12%,var(--pill-bg)); }
.chip--status.is-possible{  border-color:color-mix(in oklab,var(--blue) 45%,var(--line));  background:color-mix(in oklab,var(--blue) 10%,var(--pill-bg)); }
.chip--status.is-disproven{ border-color:color-mix(in oklab,var(--red) 60%,var(--line));   background:color-mix(in oklab,var(--red) 12%,var(--pill-bg)); }

.chip--time{ font-weight:600; }
.chip--time.chip--local{ opacity:.9; }

.chip--evidence{
  text-decoration:none; cursor:pointer; font-weight:800;
  border-color:color-mix(in oklab,var(--blue) 55%,var(--line));
  background:color-mix(in oklab,var(--blue) 10%,var(--pill-bg));
}
.chip--evidence:focus-visible{ outline:3px solid var(--focus); outline-offset:2px; }
/* Risk chips */
.chip--risk {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  border: 1px solid transparent;
  padding: .125rem .5rem;
  border-radius: 999px;
  line-height: 1.2;
}
.chip--risk.is-high   { color:#b91c1c; background:#fee2e2; border-color:#fecaca; }  /* red */
.chip--risk.is-medium { color:#b45309; background:#ffedd5; border-color:#fed7aa; }  /* orange */
.chip--risk.is-low    { color:#166534; background:#dcfce7; border-color:#bbf7d0; }  /* green */
.chip--risk.is-unknown{ color:#334155; background:#e2e8f0; border-color:#cbd5e1; }  /* gray */

/* Highlight targeted Evidence row when navigated to via #ev-E-### */
tr[id^="ev-"]:target{
  outline:2px solid var(--blue);
  background:color-mix(in oklab,var(--blue) 7%, #fff);
  scroll-margin-top:calc(var(--topbar-h) + 12px);
}

/* --- Bulleted narrative lists ------------------------------------------- */
.bullet-list{ padding-inline-start:1.2rem; margin:.6rem 0 .2rem; }
.bullet-list li{
  margin:.35rem 0; padding-left:.35rem;
}
.bullet-list li strong{ color:var(--text); }

/* Optional subtle left accent per section card */
.card .section-header + p,
.card .section-header + ul.bullet-list{
  border-left:4px solid var(--line);
  padding-left:.75rem;
}
.callout { border:1px solid var(--line); background:#F8FAFF; padding:1rem 1rem 0.75rem; border-radius:12px; margin:0 0 1rem; }
.callout--info { border-color: var(--blue); }
.callout h3 { margin:0 0 .25rem; font-size:1rem; }
.callout-sub { margin:.75rem 0 .25rem; font-size:.95rem; color:var(--muted); }
.mono-list { margin:.25rem 0 .25rem 1.25rem; }
.mono-list code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.muted { color: var(--muted); font-style: italic; }

.row-highlight{outline:2px solid var(--accent,#0ea5e9) !important;background:color-mix(in srgb,var(--accent,#0ea5e9) 12%,transparent)!important}

/* Keep the report readable inside a narrow portfolio preview or phone. */
@media screen and (max-width: 600px) {
  .topbar-grid.v2 {
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-areas: "menu brand" "search search" "actions actions";
    gap: .6rem;
    padding: .75rem;
  }
  #tocToggle { display: inline-flex; }
  .topbar-brand { display: block; }
  .topbar-brand #report-title { white-space: normal; overflow: visible; font-size: 1rem; }
  .brand-sub { font-size: .8rem; }
  #globalSearchForm { max-width: none; width: 100%; }
  #globalSearch { min-width: 0; }
  .topbar-actions { justify-self: start; flex-wrap: wrap; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: .75rem; }
  .card { padding: .85rem; overflow-wrap: anywhere; }
  .section-header, .subheader, .table-actions { flex-wrap: wrap; }
  .table-actions select, .table-actions input { min-width: 0; max-width: 100%; }
  .table-wrap { overflow-x: auto; }
  .table-wrap table { min-width: 580px; }
}
