@font-face { font-family: "Figtree"; src: url(assets/fonts/Figtree-latin.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
/* Font: Figtree (SIL Open Font License 1.1, see assets/fonts/Figtree-OFL.txt). Standalone copy of the Playground styles (tokens, shelf, viewer) + library-only rules at the end. */

/* Tokens copied from the console's src/colors.js */
:root {
  --violet-900: #16004D; --violet-700: #3600A6; --violet-600: #4900C3; --violet-500: #5E15D4;
  --violet-400: #8E5BE1; --violet-200: #CFB9F2; --violet-100: #ECE3FA; --violet-50: #F5F1FC;
  --gray-900: #030024; --gray-700: #1C1B50; --gray-600: #50507D; --gray-500: #6B6B92; --gray-400: #8585A7;
  --gray-300: #BABACF; --gray-200: #D5D5E2; --gray-100: #F0F0F5; --gray-50: #FBFBFF;
  --green-600: #059669; --green-100: #D1FAE5; --red-600: #DC2626; --red-100: #FEE2E2;
  --amber-600: #D97706; --amber-100: #FEF3C7; --blue-600: #2563EB; --blue-100: #DBEAFE;

  --bg: var(--gray-50); --surface: #fff; --text: var(--gray-900); --muted: var(--gray-500);
  --border: var(--gray-200); --subtle: var(--gray-100);
  --accent: var(--violet-600); --ink-2: var(--gray-600);
  /* Confidence: very likely = red, likely = yellow, possible = grey */
  --c-vl-bg: #DC2626; --c-vl-fg: #fff; --c-vl-hl: #FEE2E2;
  --c-l-bg: #FDE68A; --c-l-fg: #78350F; --c-l-hl: #FEF3C7; --c-l-bd: #D97706;
  --c-p-bg: #E5E7EB; --c-p-fg: #374151; --c-p-hl: #F3F4F6; --c-p-bd: #9CA3AF;

  /* Highlight families */
  --h-pii: #E7DCF9;     --h-pii-b: #8E5BE1;
  --h-fin: #D1FAE5;     --h-fin-b: #059669;
  --h-sec: #FEF3C7;     --h-sec-b: #D97706;
  --h-phi: #FCE7F3;     --h-phi-b: #DB2777;
  --h-net: #DBEAFE;     --h-net-b: #2563EB;
  --h-doc: #F0F0F5;     --h-doc-b: #6B6B92;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0930; --surface: #14123E; --text: #F0F0F5; --muted: #9A99BD; --border: #2A2860; --subtle: #1C1B50; --accent: #C7ADF0; --ink-2: #BABACF; --c-vl-hl: #4A1414; --c-l-bg: #FBBF24; --c-l-fg: #3B2303; --c-l-hl: #4A3508; --c-p-bg: #4B5563; --c-p-fg: #F3F4F6; --c-p-hl: #2A2C3A;
    --violet-50: #1E1454; --violet-100: #2A1A6E;
    --h-pii: #3A2475; --h-fin: #0B3B2E; --h-sec: #4A3508; --h-phi: #4A1433; --h-net: #102A5C; --h-doc: #2A2860;
    --green-100: #0B3B2E; --red-100: #4A1414; --amber-100: #4A3508; --blue-100: #102A5C;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0930; --surface: #14123E; --text: #F0F0F5; --muted: #9A99BD; --border: #2A2860; --subtle: #1C1B50; --accent: #C7ADF0; --ink-2: #BABACF; --c-vl-hl: #4A1414; --c-l-bg: #FBBF24; --c-l-fg: #3B2303; --c-l-hl: #4A3508; --c-p-bg: #4B5563; --c-p-fg: #F3F4F6; --c-p-hl: #2A2C3A;
  --violet-50: #1E1454; --violet-100: #2A1A6E;
  --h-pii: #3A2475; --h-fin: #0B3B2E; --h-sec: #4A3508; --h-phi: #4A1433; --h-net: #102A5C; --h-doc: #2A2860;
  --green-100: #0B3B2E; --red-100: #4A1414; --amber-100: #4A3508; --blue-100: #102A5C;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 "Figtree", -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h2 { font-size: 16px; font-weight: 700; margin: 0; }
h3 { font-size: 14px; font-weight: 700; margin: 0; }
p { margin: 2px 0 0; }
.muted { color: var(--muted); }
.sm { font-size: 12px; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: var(--violet-900); color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { display: block; height: 28px; width: auto; }
.brand-divider { width: 1px; height: 20px; background: rgba(255,255,255,.25); }
.brand-product { font-weight: 600; font-size: 16px; letter-spacing: .01em; }
.status { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.status:hover { background: rgba(255,255,255,.14); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-400); }
.status.live .dot { background: #34D399; box-shadow: 0 0 0 3px rgba(52,211,153,.25); }
.status.demo .dot { background: #FBBF24; }

.banner { margin: 16px 24px 0; padding: 10px 14px; border-radius: 8px; background: var(--amber-100); color: var(--text); border: 1px solid color-mix(in srgb, var(--amber-600) 35%, transparent); font-size: 13px; }
.banner code { background: color-mix(in srgb, var(--amber-600) 14%, transparent); padding: 1px 5px; border-radius: 4px; }


input[type=search] { width: 100%; font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
input[type=search]:focus, textarea:focus { outline: 2px solid var(--violet-400); outline-offset: -1px; border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--violet-400); }
.chip.on { background: var(--violet-500); border-color: var(--violet-500); color: #fff; }
.chip .n { opacity: .65; margin-left: 4px; font-weight: 400; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }

.group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 8px 6px; }
.sample { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 8px; cursor: pointer; }
.sample:hover { background: var(--violet-50); }
.sample.active { background: var(--violet-100); }
.ftype { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .03em; background: var(--subtle); color: var(--ink-2); }
.ftype.snippet { background: var(--violet-100); color: var(--accent); }
.ftype.img { background: var(--blue-100); color: var(--blue-600); }
.ftype.zip { background: var(--amber-100); color: var(--amber-600); }
.sample-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-sub { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--subtle); color: var(--ink-2); white-space: nowrap; }
.tag.neg { background: var(--red-100); color: var(--red-600); }
.tag.proto { background: var(--blue-100); color: var(--blue-600); }
.sample-actions { display: flex; gap: 2px; opacity: .55; }
.sample:hover .sample-actions, .sample.active .sample-actions { opacity: 1; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 18px; text-decoration: none; }
.icon-btn:hover { background: var(--surface); color: var(--accent); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }

/* Scanner */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 12px; font-weight: 600; padding: 5px 10px; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--violet-100); color: var(--accent); }
textarea { width: 100%; min-height: 200px; resize: vertical; font: 13px/1.55 ui-monospace, "SF Mono", Menlo, monospace; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row.gap { gap: 8px; justify-content: flex-end; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.primary { background: var(--violet-500); color: #fff; }
.btn.primary:hover { background: var(--violet-600); }
.btn.primary:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--violet-400); color: var(--accent); }

/* Results */
.result.stale { opacity: .45; }
.result.stale::before { content: "Input changed. Press Scan to update these results."; font-size: 12px; font-weight: 600; color: var(--accent); }
.result { padding: 16px; display: grid; gap: 16px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.stats { display: flex; gap: 20px; flex-wrap: wrap; }
.stat b { display: block; font-size: 22px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--subtle); color: var(--ink-2); }
.pill.ok { background: var(--green-100); color: var(--green-600); }
.pill.bad { background: var(--red-100); color: var(--red-600); }
.pill.warn { background: var(--amber-100); color: var(--amber-600); }

.expect { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 8px; }
.expect-list { display: flex; flex-wrap: wrap; gap: 6px; }
.expect-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); }
.expect-item.hit { border-color: color-mix(in srgb, var(--green-600) 40%, transparent); background: var(--green-100); }
.expect-item.miss { border-color: color-mix(in srgb, var(--red-600) 30%, transparent); background: var(--red-100); }
.expect-item.pending { border-style: dashed; }

.hl { white-space: pre-wrap; word-break: break-word; font: 13px/1.7 ui-monospace, "SF Mono", Menlo, monospace; padding: 14px; background: var(--gray-50); border: 1px solid var(--border); border-radius: 8px; max-height: 420px; overflow: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl { background: var(--bg); } }
mark { color: inherit; border-radius: 3px; padding: 1px 0; border-bottom: 2px solid; cursor: help; }
mark.pii { background: var(--h-pii); border-color: var(--h-pii-b); }
mark.fin { background: var(--h-fin); border-color: var(--h-fin-b); }
mark.sec { background: var(--h-sec); border-color: var(--h-sec-b); }
mark.phi { background: var(--h-phi); border-color: var(--h-phi-b); }
mark.net { background: var(--h-net); border-color: var(--h-net-b); }
mark.doc { background: var(--h-doc); border-color: var(--h-doc-b); }
mark.VERY_LIKELY { background: var(--c-vl-hl); border-color: var(--c-vl-bg); }
mark.LIKELY { background: var(--c-l-hl); border-color: var(--c-l-bd); }
mark.POSSIBLE { background: var(--c-p-hl); border-color: var(--c-p-bd); }
mark.flash { outline: 2px solid var(--violet-500); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid var(--subtle); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.det-name { font-weight: 600; }
.det-id { font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.fam { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.fam.pii { background: var(--h-pii-b); } .fam.fin { background: var(--h-fin-b); } .fam.sec { background: var(--h-sec-b); }
.fam.phi { background: var(--h-phi-b); } .fam.net { background: var(--h-net-b); } .fam.doc { background: var(--h-doc-b); }
.conf { font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 6px; border-radius: 4px; background: var(--subtle); color: var(--ink-2); white-space: nowrap; }
.conf.LIKELY { background: var(--c-l-bg); color: var(--c-l-fg); }
.conf.POSSIBLE { background: var(--c-p-bg); color: var(--c-p-fg); }
.conf.VERY_LIKELY { background: var(--c-vl-bg); color: var(--c-vl-fg); }
.finding-list { display: grid; gap: 4px; }
.finding { font-family: ui-monospace, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.finding .ctx { color: var(--muted); }
.finding .path { display: block; font-family: inherit; font-size: 11px; color: var(--muted); }
.finding { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.finding .conf { justify-self: start; }
.why { color: var(--muted); margin-top: 6px; max-width: 360px; }
.expect-item.weak { border-color: color-mix(in srgb, var(--amber-600) 35%, transparent); background: var(--amber-100); }
.legend { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.legend-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.legend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.legend-item { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 8px; align-items: center; }
.legend-item p { grid-column: 1 / -1; margin: 0; color: var(--ink-2); }
.legend-item .muted { justify-self: end; }
.legend-item.dim { opacity: .55; }
@media (max-width: 720px) { .legend-grid { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }

.loading { display: flex; align-items: center; gap: 12px; padding: 20px 16px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--violet-200); border-top-color: var(--violet-500); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { padding: 14px 16px; color: var(--red-600); background: var(--red-100); border-radius: 12px; }


/* Drawer */
/* Pages */
.page { max-width: 1040px; margin: 0 auto; padding: 28px 24px 64px; display: grid; gap: 16px; align-content: start; }
.page-head h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.page-head .muted { font-size: 15px; margin-top: 4px; }
.page-head.row { align-items: flex-end; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }

.nav { display: flex; gap: 4px; margin-right: auto; margin-left: 20px; }
.nav a { color: rgba(255,255,255,.72); text-decoration: none; font-weight: 600; padding: 6px 12px; border-radius: 8px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.on { color: #fff; background: rgba(255,255,255,.14); }

/* Composer — the single input */
.composer { overflow: hidden; }
.composer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.loaded { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--violet-100); color: var(--accent); }
.icon-btn.xs { width: 20px; height: 20px; font-size: 15px; color: inherit; }
.composer-body { position: relative; }
.composer-body textarea { display: block; border: 0; border-radius: 0; min-height: 170px; padding: 16px; }
.dropzone { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 12px 12px; padding: 16px; border: 1.5px dashed var(--border); border-radius: 10px; color: var(--ink-2); cursor: pointer; text-align: left; line-height: 1.4; }
.dropzone:hover { border-color: var(--violet-400); background: var(--violet-50); color: var(--accent); }
.dropzone u { text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 2px; }
.dropzone svg { flex: none; }
.composer-body textarea:focus { outline: none; }
.attached { padding: 20px 16px; display: grid; gap: 8px; min-height: 240px; align-content: center; justify-items: center; text-align: center; }
.file-chip { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; width: min(520px, 100%); background: var(--surface); }
.drop-hint { display: none; position: absolute; inset: 8px; border: 2px dashed var(--violet-400); border-radius: 10px; background: color-mix(in srgb, var(--violet-50) 92%, transparent); color: var(--accent); font-weight: 700; place-items: center; }
.composer-body.over .drop-hint { display: grid; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--subtle); flex-wrap: wrap; }
.btn.link { background: none; border: 0; color: var(--accent); padding-left: 4px; }
.btn.link:hover { text-decoration: underline; }
.welcome { display: grid; gap: 8px; padding: 4px 2px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Sample shelf (Scan page) */
.shelf { display: grid; gap: 18px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.shelf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.shelf-head h2 { font-size: 18px; }
.surprise { background: linear-gradient(135deg, var(--violet-500), #DB2777); color: #fff; border: 0; padding: 9px 16px; font-size: 14px; box-shadow: 0 4px 14px rgba(94,21,212,.25); }
.surprise:hover { filter: brightness(1.08); transform: translateY(-1px); }
.surprise .dice { display: inline-block; font-size: 16px; }
.surprise.roll .dice { animation: roll .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes roll { from { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.35); } to { transform: rotate(360deg) scale(1); } }
.shelf-block { display: grid; gap: 10px; }
.shelf-block.tn { padding-top: 16px; border-top: 1px dashed var(--border); }
.shelf-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shelf-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px; align-items: start; }
.shelf-cat { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; padding-top: 5px; color: var(--ink-2); }
.shelf-cat .emo { font-size: 17px; width: 22px; text-align: center; }
.shelf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.schip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: transform .12s, border-color .12s, background .12s; }
.schip:hover { transform: translateY(-2px) rotate(-1.5deg); border-color: var(--violet-400); background: var(--violet-50); }
.schip:active { transform: scale(.96); }
.schip.on { background: var(--violet-500); border-color: var(--violet-500); color: #fff; }
.schip .fmt { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 4px; border-radius: 3px; background: var(--subtle); color: var(--muted); }
.schip.on .fmt { background: rgba(255,255,255,.2); color: #fff; }
.schip.negative { border-style: dashed; border-color: color-mix(in srgb, var(--amber-600) 45%, var(--border)); }
.schip.negative:hover { background: var(--amber-100); border-color: var(--amber-600); transform: translateY(-2px) rotate(1.5deg); }
.schip.negative.on { background: var(--amber-600); border-color: var(--amber-600); }
.shelf-foot { display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .shelf-row { grid-template-columns: 1fr; gap: 4px; } .shelf { padding: 14px; } }

/* Sample data page */
.pol-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; padding: 3px; background: var(--surface); gap: 3px; justify-self: start; flex-wrap: wrap; }
.pol-switch button { font: inherit; font-weight: 700; font-size: 14px; padding: 8px 16px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); cursor: pointer; }
.pol-switch button .n, .pick-pol button .n { font-weight: 400; opacity: .7; margin-left: 6px; }
.pol-switch button.on { background: var(--violet-500); color: #fff; }
.pol-switch button:not(.on):hover { background: var(--violet-50); }
.pol-explain { margin: -6px 0 0; max-width: 720px; }
.pick-pol { align-self: start; }
.lib-controls { display: grid; gap: 10px; }
/* TP / lookalike icons */
.pol-ico { width: 16px; height: 16px; flex: none; }
.pol-ico.tp circle { fill: var(--green-600); }
.pol-ico.tn { stroke: var(--amber-600); }
.pol-switch button { display: inline-flex; align-items: center; gap: 8px; }
.pol-switch button.on .pol-ico.tp circle { fill: #fff; } .pol-switch button.on .pol-ico.tp path { stroke: var(--violet-500); }
.pol-switch button.on .pol-ico.tn { stroke: #fff; }
.pick-pol button { display: inline-flex; align-items: center; gap: 6px; }
.pol-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--green-600); }
.pol-pill.negative { color: var(--amber-600); }
.ico-h { display: inline-flex; align-items: center; gap: 8px; }

/* Sections */
.lib-section { display: grid; gap: 14px; margin-top: 20px; }
.lib-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.lib-section-head h2 { font-size: 20px; }
.contains { margin: 0; font-size: 13px; color: var(--ink-2); }
.contains span { font-weight: 700; color: var(--text); margin-right: 2px; }

/* Copy & paste cards */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.tcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.tcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tcard-head h3 { font-size: 16px; margin-top: 4px; }
.tcard-text { margin: 0; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, monospace; background: var(--subtle); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; max-height: 190px; overflow: auto; color: var(--text); }
.tcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }

/* File cards */
.fgroup { display: grid; gap: 10px; }
.fgroup-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.fcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-width: 0; }
.fcard:hover { border-color: var(--violet-200); box-shadow: 0 4px 16px rgba(22,0,77,.06); }
.fprev { height: 170px; background: var(--subtle); border-bottom: 1px solid var(--border); overflow: hidden; position: relative; }
.fprev img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; background: #fff; }
.fprev img.whole { object-fit: contain; object-position: center; padding: 8px; background: var(--subtle); }
.fprev .noprev { height: 100%; display: grid; place-items: center; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.text-prev { height: 100%; background: var(--surface); }
.text-prev pre { margin: 0; padding: 10px 12px; font: 11px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); height: 100%; overflow: hidden; }
.text-prev table { font: 10.5px/1.3 ui-monospace, Menlo, monospace; width: 100%; }
.text-prev th, .text-prev td { padding: 4px 6px; border-bottom: 1px solid var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; text-align: left; text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.text-prev th { font-weight: 700; color: var(--text); background: var(--subtle); }
.fprev::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 85%, transparent)); pointer-events: none; }
.fbody { padding: 12px 14px 4px; display: grid; gap: 6px; }
.fmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fbody h3 { font-size: 14.5px; line-height: 1.3; }
.fname { font: 11px ui-monospace, Menlo, monospace; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.factions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 14px; margin-top: auto; }

/* Bundles */
.blist { display: grid; gap: 8px; }
.brow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
@media (max-width: 720px) { .tgrid { grid-template-columns: 1fr; } }

/* Sample data: shelf + viewer on one screen */
body.view-samples { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.view-samples .banner { flex: none; }
.lib-page { flex: 1; min-height: 0; width: 100%; max-width: 1560px; display: flex; flex-direction: column; gap: 12px; padding: 14px 24px 16px; }
.lib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lib-head h1 { font-size: 20px; margin: 0; font-weight: 700; }
.lib-head h1 .muted { font-size: 14px; font-weight: 400; margin-left: 8px; }
.lib-head { align-items: center; }
.dl-group { display: flex; gap: 8px; align-items: center; }
.dl-size { font-weight: 400; opacity: .75; }
.dl-menu { position: relative; }
.dl-menu summary { list-style: none; }
.dl-menu summary::-webkit-details-marker { display: none; }
.dl-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(3,0,36,.18); padding: 6px; display: grid; }
.dl-menu .menu a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; }
.dl-menu .menu a:hover { background: var(--violet-50); color: var(--accent); }
.lib-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.lib-shelf { min-height: 0; overflow-y: auto; border-radius: 14px; }
.shelf.compact { gap: 10px; padding: 12px 16px; min-height: 100%; }
.shelf.compact .shelf-head h2 { font-size: 16px; }
.shelf.compact .shelf-head .muted { font-size: 12px; }
.shelf.compact .surprise { padding: 6px 12px; font-size: 13px; }
.shelf.compact .shelf-block { gap: 5px; }
.shelf.compact .shelf-row + .shelf-row { margin-top: 1px; }
.shelf.compact .shelf-block.tn { padding-top: 8px; }
.lib-head .surprise { padding: 7px 14px; font-size: 13px; }
.shelf.compact .shelf-row { grid-template-columns: 124px minmax(0, 1fr); gap: 6px; }
.shelf.compact .shelf-cat { font-size: 12px; padding-top: 3px; }
.shelf.compact .shelf-cat .emo { font-size: 14px; width: 18px; }
.shelf.compact .shelf-chips { gap: 4px; }
.shelf.compact .schip { font-size: 12px; padding: 2px 9px; line-height: 1.5; }
.shelf.compact .schip .fmt { font-size: 8.5px; }
.shelf-bundles { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; }
.blink { color: var(--accent); text-decoration: none; font-weight: 600; }
.blink:hover { text-decoration: underline; }

.viewer { min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.v-head { padding: 16px 18px 12px; display: grid; gap: 6px; border-bottom: 1px solid var(--border); }
.v-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.v-head h2 { font-size: 19px; line-height: 1.25; }
.v-body { flex: 1; min-height: 0; overflow: auto; background: var(--subtle); }
.v-text { margin: 0; padding: 16px 18px; font: 13px/1.65 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-word; color: var(--text); background: var(--surface); min-height: 100%; }
.v-img { height: 100%; display: grid; place-items: center; padding: 16px; }
.v-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 2px 12px rgba(3,0,36,.12); background: #fff; }
.v-img.doc { place-items: start center; }
.v-img.doc img { max-height: none; }
.v-pdf { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.v-csv { padding: 12px; }
.v-csv table { background: var(--surface); border-radius: 8px; font: 12px/1.4 ui-monospace, Menlo, monospace; }
.v-csv th, .v-csv td { padding: 6px 10px; white-space: nowrap; border-bottom: 1px solid var(--subtle); text-transform: none; letter-spacing: 0; font-size: 12px; }
.v-csv th { position: sticky; top: 0; background: var(--subtle); color: var(--text); }
.v-loading { height: 100%; display: grid; place-items: center; }
.v-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.v-fname { font: 11px ui-monospace, Menlo, monospace; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }

@media (max-width: 900px) {
  body.view-samples { height: auto; overflow: visible; display: block; }
  .lib-page { padding: 16px; }
  .lib-split { grid-template-columns: 1fr; }
  .lib-shelf { overflow: visible; }
  .viewer { height: 75vh; }
  .shelf.compact .shelf-row { grid-template-columns: 1fr; gap: 3px; }
}

/* Picker modal */
.modal { position: fixed; z-index: 21; top: 8vh; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); max-height: 80vh; display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border-radius: 14px; box-shadow: 0 24px 64px rgba(3,0,36,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-body { overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.pick-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; }
.pick-row:hover, .pick-row:focus-visible { background: var(--violet-50); outline: none; }
.pick-row .sample-title { display: block; }
.pick-cta { font-size: 12px; font-weight: 600; color: var(--accent); opacity: 0; }
.pick-row:hover .pick-cta, .pick-row:focus-visible .pick-cta { opacity: 1; }

.scrim { position: fixed; inset: 0; background: rgba(3,0,36,.35); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); z-index: 21; display: flex; flex-direction: column; gap: 12px; padding: 20px; box-shadow: -8px 0 32px rgba(3,0,36,.2); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-body { overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.det-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--subtle); }
.det-row .desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.det-row.fired { background: var(--green-100); border-radius: 6px; }

@media (max-width: 720px) {
  .page { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 21px; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin: 4px 0 0; }
  .banner { margin: 12px 16px 0; }
  .bar-right { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) { .brand img { height: 22px; } .brand { gap: 8px; } .status { font-size: 12px; padding: 5px 10px; } .st-long { display: none; } }


/* ---------------- Library-only ---------------- */
.brand { text-decoration: none; color: inherit; }
.top-cta { color: #fff; text-decoration: none; font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); }
.top-cta:hover { background: rgba(255,255,255,.18); }
.lib-shelf .shelf-label b { font-size: 14px; }
.v-err { padding: 20px; color: var(--red-600); }

/* Nightfall ad: sponsored leaderboard. Fully clickable; keeps Nightfall's own violet. */
.ad { flex: none; display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 8px 20px; border-radius: 14px; cursor: pointer; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(90% 160% at 0% 0%, #4900C3 0%, #250079 45%, #16004D 100%); box-shadow: 0 8px 28px rgba(22,0,77,.3); transition: transform .15s, box-shadow .15s; font-family: "Figtree", -apple-system, sans-serif; }
.ad::before { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(142,91,225,.45), transparent 65%); pointer-events: none; }
.ad:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(22,0,77,.4); }
.ad > * { position: relative; z-index: 1; }
.ad-brand { display: grid; gap: 6px; justify-items: start; padding-right: 20px; border-right: 1px solid rgba(255,255,255,.15); }
.ad-brand img { height: 26px; width: auto; display: block; }
.ad-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.25); border-radius: 3px; padding: 1px 5px; }
.ad-copy { display: grid; gap: 3px; }
.ad-copy b { font-size: 16px; letter-spacing: -.01em; line-height: 1.2; }
.ad-copy span { font-size: 12.5px; color: rgba(255,255,255,.78); line-height: 1.4; }
.ad-shot { background: rgba(255,255,255,.97); color: #030024; border-radius: 10px; padding: 6px 10px; display: grid; gap: 2px; box-shadow: 0 6px 18px rgba(3,0,36,.35); transform: rotate(-1deg); font-size: 11.5px; }
.shot-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 7px; align-items: center; }
.shot-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-name em { font-style: normal; font-weight: 400; color: #6B6B92; }
.shot-dot { width: 8px; height: 8px; border-radius: 50%; }
.shot-dot.vl { background: #DC2626; } .shot-dot.ok { background: #059669; }
.shot-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.shot-badge.vl { background: #DC2626; color: #fff; } .shot-badge.ok { background: #D1FAE5; color: #047857; }
.shot-sub { padding-left: 15px; font-size: 10px; color: #6B6B92; margin-bottom: 1px; }
.ad-actions { display: grid; gap: 4px; justify-items: center; }
.ad-primary { background: #fff; color: #3600A6; padding: 9px 22px; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.ad-primary:hover { background: #F5F1FC; }
.ad-secondary { color: rgba(255,255,255,.8); font-size: 12px; text-decoration: none; }
.ad-secondary:hover { color: #fff; text-decoration: underline; }
@media (max-width: 1100px) { .ad-shot { display: none; } .ad { grid-template-columns: auto minmax(0, 1fr) auto; } }
@media (max-width: 720px) { .ad { grid-template-columns: 1fr; } .ad-brand { border-right: 0; padding-right: 0; } .ad-actions { justify-items: start; } }

.lib-page { gap: 10px; }
.lib-shelf .shelf.compact { padding: 10px 14px; gap: 8px; }
.lib-shelf .shelf.compact .shelf-block.tn { padding-top: 6px; }
.lib-shelf .shelf.compact .shelf-block { gap: 4px; }
.lib-shelf .shelf.compact .schip { padding: 1px 9px; }

/* ---------------- Neutral DLP Samples header + intro ---------------- */
.site-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.site-mark { width: 30px; height: 30px; }
.intro { display: grid; gap: 4px; max-width: 1180px; }
.intro h1 { font-size: 22px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.intro p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.intro p b { color: var(--text); }
.lib-page { padding-top: 14px; }
@media (max-width: 720px) { .site-head { padding: 10px 16px; flex-wrap: wrap; } }

/* DLP Samples brand: teal accents (the Nightfall ad keeps its own violet) */
:root {
  --violet-700: #115E59; --violet-600: #0F766E; --violet-500: #0F766E; --violet-400: #14B8A6;
  --violet-200: #99F6E4; --violet-150: #CCFBF1; --violet-100: #CCFBF1; --violet-50: #F0FDFA;
  --accent: #0F766E;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --violet-50: #0B2A28; --violet-100: #0F3B38; --accent: #5EEAD4; }
}
:root[data-theme="dark"] { --violet-50: #0B2A28; --violet-100: #0F3B38; --accent: #5EEAD4; }
.lib-page { padding-bottom: 12px; }

/* Negative samples: red X, red accents */
.pol-ico.tn { stroke: none; }
.pol-ico.tn circle { fill: #DC2626; }
.pol-pill.negative { color: #DC2626; }
.schip.negative { border-color: color-mix(in srgb, #DC2626 40%, var(--border)); }
.schip.negative:hover { background: #FEF2F2; border-color: #DC2626; }
.schip.negative.on { background: #DC2626; border-color: #DC2626; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .schip.negative:hover { background: #3A1212; } }

/* Entities vs Documents: a labelled rail beside each group of rows (adds no height) */
.sgroup { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.sgroup + .sgroup { margin-top: 6px; }
.sgroup-rows { display: grid; gap: 3px; min-width: 0; }
.rail { border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: help; }
.rail span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.sgroup.entity .rail { background: #E0F2FE; color: #075985; }
.sgroup.document .rail { background: #EDE9FE; color: #5B21B6; }
.lib-shelf .shelf.compact .shelf-row { grid-template-columns: 112px minmax(0, 1fr); }
.kind-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.kind-tag.entity { background: #E0F2FE; color: #075985; }
.kind-tag.document { background: #EDE9FE; color: #5B21B6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sgroup.entity .rail, :root:not([data-theme="light"]) .kind-tag.entity { background: #0C2F44; color: #7DD3FC; }
  :root:not([data-theme="light"]) .sgroup.document .rail, :root:not([data-theme="light"]) .kind-tag.document { background: #2E1F5E; color: #C4B5FD; }
}

.sgroup.prompt .rail, .kind-tag.prompt { background: #FCE7F3; color: #9D174D; }
.sgroup.idimage .rail, .kind-tag.idimage { background: #FEF3C7; color: #92400E; }
.sgroup + .sgroup { margin-top: 5px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sgroup.prompt .rail, :root:not([data-theme="light"]) .kind-tag.prompt { background: #4A1433; color: #F9A8D4; }
  :root:not([data-theme="light"]) .sgroup.idimage .rail, :root:not([data-theme="light"]) .kind-tag.idimage { background: #4A3508; color: #FCD34D; }
}

/* More room for chips now that rows sit in labelled groups */
.lib-split { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.lib-shelf .shelf.compact .shelf-row { grid-template-columns: 100px minmax(0, 1fr); }

/* ---------------- Links in the shelf ---------------- */
a.schip { text-decoration: none; }
.shelf-cat a { color: inherit; text-decoration: none; }
.shelf-cat a:hover { color: var(--accent); text-decoration: underline; }

/* ---------------- Inner pages (sample, category, about): normal scrolling documents ---------------- */
body.doc { min-height: 100vh; }
.doc-page { max-width: 1200px; margin: 0 auto; padding: 18px 24px 28px; display: grid; gap: 22px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.doc-page h1 { font-size: 28px; line-height: 1.2; margin: 6px 0 0; letter-spacing: -.01em; }
.doc-page h2 { font-size: 17px; margin: 0 0 10px; }
.lead { font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 8px 0 0; max-width: 820px; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.doc-main { display: grid; gap: 10px; min-width: 0; }
.doc-viewer { height: 560px; margin-top: 8px; }
.doc-side { display: grid; gap: 16px; }
.card.pad { padding: 16px 18px; }
.det-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.det-list li { border-left: 3px solid var(--border); padding-left: 10px; }
.det-list p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.det-list code { font-size: 11px; color: var(--muted); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.steps a, .related a, .prose a, .ccard h3 a { color: var(--accent); }
.related .shelf-chips { margin-bottom: 8px; }
.cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ccard { display: grid; gap: 8px; align-content: start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.ccard h3 { font-size: 15px; line-height: 1.3; }
.ccard h3 a { text-decoration: none; }
.ccard h3 a:hover { text-decoration: underline; }
.ico-h .muted { font-weight: 400; margin-left: 4px; }
.prose { max-width: 820px; display: grid; gap: 12px; font-size: 15px; line-height: 1.6; }
.prose h2 { margin-top: 12px; font-size: 19px; }
.prose ol { margin: 0; padding-left: 22px; }
.facts { width: auto; min-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.facts td, .facts th { padding: 7px 14px; }
.faq { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--ink-2); }
.site-foot { display: grid; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; }
.site-foot a { color: var(--ink-2); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 14px; }
@media (max-width: 900px) { .doc-grid { grid-template-columns: 1fr; } .doc-viewer { height: 420px; } .facts { min-width: 0; width: 100%; } }

/* Tabular samples are download-only: no text selection in the table preview */
.v-csv, .text-prev table { user-select: none; -webkit-user-select: none; }

/* Fit 20 prompt samples on one screen: wider shelf, tighter rows */
.lib-split { grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); }
.lib-shelf .shelf.compact .shelf-row { grid-template-columns: 96px minmax(0, 1fr); }
.lib-shelf .shelf.compact .schip { padding: 0 8px; line-height: 1.55; }
.lib-shelf .shelf.compact .shelf-chips { gap: 3px 4px; }
.lib-shelf .sgroup-rows { gap: 2px; }
.intro p { font-size: 14px; }

/* Header actions: plain nav link, outlined secondary, one filled primary on the right */
.dl-group { gap: 10px; }
.nav-link { color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; padding: 8px 6px; }
.nav-link:hover { color: var(--accent); text-decoration: underline; }
.dl-menu .menu { right: 0; }

/* ======================= Overview (home) ======================= */
.site-nav { display: flex; gap: 2px; margin-right: 6px; }
.site-nav .nav-link { padding: 8px 10px; border-radius: 8px; }
.site-nav .nav-link.on { color: var(--text); background: var(--subtle); text-decoration: none; }
.btn.lg { padding: 13px 22px; font-size: 16px; border-radius: 10px; }

.home-page { max-width: none; padding: 0 0 36px; gap: 0; }
.home-page > .band, .home-page > .stats, .home-page > .ad, .home-page > .site-foot { width: min(1200px, calc(100% - 48px)); margin-left: auto; margin-right: auto; }
.home-page > .ad { margin-top: 56px; }
.home-page > .site-foot { margin-top: 28px; }

/* Hero */
.hero { position: relative; overflow: hidden; color: #E8FFFB;
  background: radial-gradient(900px 480px at 85% 10%, rgba(20,184,166,.35), transparent 60%),
              radial-gradient(700px 500px at 5% 100%, rgba(99,102,241,.28), transparent 60%), #071A1F; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000 40%, transparent); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 84px 0 92px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5EEAD4; background: rgba(94,234,212,.1); border: 1px solid rgba(94,234,212,.25); padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.04; letter-spacing: -.025em; margin: 18px 0 0; color: #fff; font-weight: 800; }
.hero h1 .grad { display: block; background: linear-gradient(90deg, #5EEAD4, #A5B4FC); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 19px; line-height: 1.55; color: rgba(232,255,251,.78); margin: 22px 0 0; max-width: 560px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero .btn.primary { background: #14B8A6; color: #04201D; box-shadow: 0 10px 30px rgba(20,184,166,.35); }
.hero .btn.primary:hover { background: #2DD4BF; }
.hero .btn.primary .dl-size { color: #04201D; opacity: .7; }
.hero-ghost { color: #fff; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.04); }
.hero-ghost:hover { background: rgba(255,255,255,.1); }
.hero-note { margin: 16px 0 0; font-size: 13.5px; color: rgba(232,255,251,.55); }
.hero-note code { color: #99F6E4; background: rgba(153,246,228,.1); padding: 1px 6px; border-radius: 4px; }

/* Hero visual: the positive/negative idea in one picture */
.hero-visual { position: relative; padding: 26px 0; }
.mock { background: #fff; color: #0F172A; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; transform: rotate(-1.2deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #F1F5F9; border-bottom: 1px solid #E2E8F0; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #CBD5E1; }
.mock-bar em { margin-left: 8px; font-style: normal; font: 12px ui-monospace, Menlo, monospace; color: #64748B; }
.mock-text { margin: 0; padding: 20px 22px 14px; font: 15px/1.75 ui-monospace, "SF Mono", Menlo, monospace; }
.mock mark { padding: 1px 3px; border-radius: 4px; color: inherit; }
.m-hit { background: #FEE2E2; box-shadow: inset 0 -2px #DC2626; animation: pulse 2.4s ease-in-out infinite; }
.m-miss { background: #F1F5F9; box-shadow: inset 0 -2px #94A3B8; text-decoration: line-through; text-decoration-color: rgba(100,116,139,.6); }
@keyframes pulse { 50% { background: #FECACA; } }
.mock-res { display: flex; align-items: center; gap: 10px; margin: 0 16px 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.mock-res:last-child { margin-bottom: 18px; }
.mock-res .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mock-res em { font-style: normal; color: #64748B; font-size: 13px; }
.mock-res .tag { margin-left: auto; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 6px; }
.mock-res.hit { background: #FEF2F2; } .mock-res.hit .dot { background: #DC2626; } .mock-res.hit .tag { background: #DC2626; color: #fff; }
.mock-res.miss { background: #F0FDF4; } .mock-res.miss .dot { background: #16A34A; } .mock-res.miss .tag { background: #DCFCE7; color: #15803D; }
.float { position: absolute; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 8px 13px; border-radius: 999px; background: rgba(7,26,31,.85); border: 1px solid rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(6px); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.float .pol-ico { width: 16px; height: 16px; }
.float.f1 { top: -2px; right: 6%; } .float.f2 { bottom: -4px; left: 4%; }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: -34px; position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 16px 40px rgba(15,23,42,.08); }
.stats div { padding: 20px 16px; text-align: center; display: grid; gap: 2px; }
.stats div + div { border-left: 1px solid var(--border); }
.stats b { font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.stats span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* Sections */
.band { margin-top: 72px; display: grid; gap: 24px; }
.band-head { max-width: 760px; }
.band-head h2 { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.band-head p { margin: 10px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }

.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pn-card { padding: 26px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); display: grid; gap: 14px; align-content: start; }
.pn-card.pos { background: linear-gradient(180deg, #F0FDF9, var(--surface) 60%); border-color: #99F6E4; }
.pn-card.neg { background: linear-gradient(180deg, #FEF2F2, var(--surface) 60%); border-color: #FECACA; }
.pn-top { display: flex; gap: 14px; align-items: center; }
.pn-top .pol-ico { width: 40px; height: 40px; }
.pn-card h3 { font-size: 22px; margin: 0; }
.pn-metric { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pn-card.pos .pn-metric { color: #0F766E; } .pn-card.neg .pn-metric { color: #B91C1C; }
.pn-card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.ex { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-chip { font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.ex-chip:hover { border-color: var(--accent); color: var(--accent); }
.ex-chip.negative { border-style: dashed; border-color: #FCA5A5; }

.cat-grid-home { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.cat-card { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15,23,42,.1); border-color: var(--g, var(--accent)); }
.cat-ico-wrap { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gbg); color: var(--g); }
.cat-ico { width: 24px; height: 24px; }
.cat-name { font-weight: 800; font-size: 16.5px; margin-top: 6px; }
.cat-desc { color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.cat-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; font-weight: 700; }
.cat-counts .pc { color: #0F766E; } .cat-counts .nc { color: #B91C1C; }
.g-entity { --g: #0369A1; --gbg: #E0F2FE; } .g-prompt { --g: #BE185D; --gbg: #FCE7F3; }
.g-idimage { --g: #B45309; --gbg: #FEF3C7; } .g-document { --g: #6D28D9; --gbg: #EDE9FE; }

.chan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.chan li { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 22px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 14.5px; }
.chan svg { width: 30px; height: 30px; color: var(--accent); }

.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: st; }
.steps3 li { position: relative; padding: 24px 22px 22px 70px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 6px; counter-increment: st; }
.steps3 li::before { content: counter(st); position: absolute; left: 20px; top: 22px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #0F766E; color: #fff; font-weight: 800; }
.steps3 b { font-size: 18px; }
.steps3 span { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.steps3 a { color: var(--accent); }

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 72px; gap: 40px; }
  .cat-grid-home { grid-template-columns: repeat(3, 1fr); }
  .chan { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(3, 1fr); } .stats div:nth-child(4) { border-left: 0; }
  .pn, .steps3 { grid-template-columns: 1fr; }
  .cat-grid-home, .chan { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .band-head h2 { font-size: 26px; }
}
.hero-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.hero h1 { font-size: clamp(36px, 4.4vw, 56px); }
.mock mark { white-space: nowrap; }
@media (max-width: 1100px) { .hero-inner { grid-template-columns: 1fr; } .hero-visual { max-width: 560px; } }
@media (max-width: 560px) {
  .site-head .btn.primary { padding: 7px 11px; font-size: 13px; }
  .site-head .btn.primary .dl-size { display: none; }
  .site-brand span { font-size: 16px; }
  .hero-inner, .home-page > .band, .home-page > .stats, .home-page > .ad, .home-page > .site-foot { width: calc(100% - 32px); }
  .hero-inner { padding: 40px 0 64px; }
  .float { position: static; margin-top: 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); } .stats div { border-left: 0 !important; border-top: 1px solid var(--border); } .stats div:first-child { grid-column: 1 / -1; border-top: 0; }
  .mock { transform: none; }
}

/* Ad example: Nightfall's own look (translucent violet event feed), deliberately unlike the site's red/green finding cards */
.ad-shot { background: rgba(255,255,255,.07) !important; color: #fff !important; border: 1px solid rgba(207,185,242,.28); border-radius: 12px; padding: 8px 10px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important; transform: none !important; backdrop-filter: blur(6px); display: grid; gap: 6px !important; }
.nf-evt { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 4px 4px 4px 8px; border-left: 2px solid rgba(207,185,242,.35); }
.nf-evt.act { border-left-color: #CFB9F2; }
.nf-glyph { width: 18px; height: 18px; color: #CFB9F2; }
.nf-evt.pass .nf-glyph { color: rgba(207,185,242,.6); }
.nf-txt { display: grid; min-width: 0; line-height: 1.25; }
.nf-txt b { font-size: 12.5px; color: #fff; }
.nf-txt small { font-size: 10.5px; color: rgba(231,220,249,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.nf-pill.act { background: #CFB9F2; color: #250079; }
.nf-pill.pass { border: 1px solid rgba(207,185,242,.45); color: #E7DCF9; }
.nf-txt b em { font-style: normal; font-weight: 500; color: rgba(231,220,249,.7); }

/* Entity vs document context callout */
.ctx { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ctx-card { padding: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 12px; align-content: start; }
.ctx-card.entity { border-top: 4px solid #0369A1; } .ctx-card.document { border-top: 4px solid #6D28D9; }
.ctx-num { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; display: flex; align-items: baseline; gap: 10px; }
.ctx-card.entity .ctx-num { color: #0369A1; } .ctx-card.document .ctx-num { color: #6D28D9; }
.ctx-num span { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ctx-card h3 { font-size: 21px; margin: 0; }
.ctx-card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.cat-grid-home { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 720px) { .ctx { grid-template-columns: 1fr; } }
/* Browse all: keep one screen with the Personal row */
.lib-shelf .sgroup + .sgroup { margin-top: 2px; }
.lib-shelf .shelf.compact .schip { line-height: 1.42; }
.lib-shelf .shelf.compact .shelf-chips { gap: 2px 4px; }
.lib-shelf .shelf.compact .shelf-block { gap: 3px; }
.lib-shelf .shelf.compact { padding: 8px 14px; gap: 6px; }
.cat-grid-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat-card.all { background: linear-gradient(135deg, #0F766E, #134E4A); color: #fff; border-color: transparent; align-content: center; }
.cat-card.all .cat-desc { color: rgba(255,255,255,.8); }
.cat-card.all .cat-name { font-size: 20px; margin-top: 0; }
.cat-go { font-weight: 800; margin-top: 6px; color: #5EEAD4; }
@media (max-width: 1100px) { .cat-grid-home { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .cat-grid-home { grid-template-columns: repeat(2, 1fr); } }
/* Long shelf rows: first 10 chips, then "+N more" expands the row in place */
.shelf-chips:not(.open) .xtra { display: none; }
.more-btn { font: inherit; font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 999px; border: 1px solid transparent; background: var(--violet-50); color: var(--accent); cursor: pointer; }
.more-btn:hover { border-color: var(--accent); }
/* Hero mock: a whole PHI clause is the finding, so let the highlight wrap */
.mock .m-hit { white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; line-height: 1.9; }
.mock-text { font-size: 14.5px; }

/* Hero: two separate prompts, each with its own verdict */
.hero-visual { display: grid; gap: 18px; padding: 0; }
.pcard { background: #fff; color: #0F172A; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; }
.pcard.pos { transform: rotate(-1deg) translateX(-8px); }
.pcard.neg { transform: rotate(.8deg) translateX(18px); }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: #F8FAFC; border-bottom: 1px solid #E2E8F0; }
.pc-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; }
.pcard.pos .pc-kind { color: #0F766E; } .pcard.neg .pc-kind { color: #B91C1C; }
.pc-kind .pol-ico { width: 15px; height: 15px; }
.pc-app { font: 11.5px ui-monospace, Menlo, monospace; color: #64748B; }
.pc-text { margin: 0; padding: 14px 16px 12px; font-size: 15px; line-height: 1.65; }
.pc-text mark { padding: 1px 2px; border-radius: 4px; color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pc-verdict { display: flex; align-items: baseline; gap: 10px; padding: 10px 16px; font-size: 14px; border-top: 1px solid #F1F5F9; }
.pc-verdict .dot { width: 9px; height: 9px; border-radius: 50%; align-self: center; flex: none; }
.pc-verdict em { font-style: normal; color: #64748B; font-size: 13px; }
.pc-verdict.block { background: #FEF2F2; } .pc-verdict.block .dot { background: #DC2626; } .pc-verdict.block b { color: #B91C1C; }
.pc-verdict.allow { background: #F0FDF4; } .pc-verdict.allow .dot { background: #16A34A; } .pc-verdict.allow b { color: #15803D; }
@media (max-width: 560px) { .pcard.pos, .pcard.neg { transform: none; } }
.pc-text .m-miss { text-decoration: none; }

/* Share button + menu (share.js) */
.share-wrap { position: relative; display: inline-flex; }
.share-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(3,0,36,.18); padding: 6px; display: grid; }
.share-menu[hidden] { display: none; }
.share-menu a, .share-menu button { display: block; text-align: left; font: inherit; font-weight: 600; font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 0; background: none; color: var(--text); text-decoration: none; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--violet-50); color: var(--accent); }
@media (max-width: 720px) { .site-head .share-btn .share-label { display: none; } .site-head .share-btn { padding: 7px 10px; } }
