/* ═══════════════════════════════════════════════════════════════════════════
   DOSSIER / APP RETHEME — COOL STOCK
   For scan.html, scan-lawstudents.html, scan-results.html and dashboard.html.

   Those four pages carry roughly 7,800 lines of inline JavaScript that builds
   their markup at runtime. Rewriting that markup by hand would mean rewriting
   the JavaScript, and the fastest way to break a working product is to retype
   the part that already works. So instead of new markup, this maps the classes
   they already emit onto the Dossier tokens.

   It loads AFTER dossier.css and after the Tailwind CDN, so it wins on equal
   specificity. !important is reserved for colour, radius and shadow, which
   Tailwind sets at a specificity a plain selector cannot beat.

   The colour rule from dossier.css holds here too: blue is structure and
   action, oxblood is risk only. Tailwind's blue/sky/cyan families map to
   --blue; its red/rose/pink families map to --seal; indigo/purple/violet,
   which the old design used decoratively, map to ink rather than inventing
   a third accent.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Ground the page in the field ──────────────────────────────────────────
   The scan pages carry `class="bg-white"` on <body> itself, so the utility
   remap below would otherwise turn the whole page into a glass sheet with
   nothing behind it. The body must be the field; only cards get glass. */
body,body.bg-white,body.bg-gray-50{background:var(--field)!important;color:var(--ink)!important;
  font-family:var(--sans);backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

/* Those pages also open their inline <style> with `* { font-family: IBM Plex
   Sans }`, which beats every class-based font rule here and silently undoes
   the mono docket labels and the serif headings. Restore them by component. */
.docket-in,.foot-in,.mono,.tag,.mast-cta,.btn,.f-btn,.f-idx,.f-url,
.rep-title,.rep-expiry,.panel-title,.lbl,.hint,.sec-num,.row-n,
.legal-num,.margin-label,.broker-status,.stamp{font-family:var(--mono)!important}
.wordmark{font-family:var(--sans)!important}
h1,h2,h3,.f-title,.qa summary,.hero h1,.lead-in h1{font-family:var(--serif)!important}

/* White cards become glass floating on the field. This is the single biggest
   change from the warm build: a flat white card on a blue ground reads as an
   un-styled element, not a designed one. */
.bg-white,.bg-gray-50,.bg-zinc-50,.bg-slate-50{
  background:var(--glass)!important;
  -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(150%);
  backdrop-filter:blur(var(--glass-blur)) saturate(150%)}
.bg-gray-100,.bg-zinc-100{background:var(--paper-3)!important}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .bg-white,.bg-gray-50,.bg-zinc-50,.bg-slate-50{background:var(--paper)!important}
}

/* Radii: the house has square corners. This is the single biggest visual tell
   separating the old look from the new one. */
.rounded,.rounded-md,.rounded-lg,.rounded-xl,.rounded-2xl,.rounded-\[10px\],
.rounded-\[12px\],.rounded-\[14px\],.rounded-\[18px\]{border-radius:0!important}
.rounded-full{border-radius:999px!important}   /* genuine pills stay round */

/* Borders become hairlines in the cool palette. */
.border,.border-t,.border-b,.border-l,.border-r,
.border-gray-100,.border-gray-200,.border-gray-300,
.border-zinc-100,.border-zinc-200,.border-zinc-300{border-color:var(--rule)!important}

/* Tailwind's stock shadows are replaced by the house glass shadow, so cards
   still lift off the field without the grey drop-shadow look. */
.shadow,.shadow-sm,.shadow-md,.shadow-lg,.shadow-xl,.shadow-2xl{
  box-shadow:var(--glass-shadow)!important}

/* ── Ink ─────────────────────────────────────────────────────────────────── */
.text-gray-900,.text-zinc-900,.text-slate-900,.text-black{color:var(--ink)!important}
.text-gray-700,.text-gray-800,.text-zinc-700,.text-zinc-800{color:var(--ink-2)!important}
/* The old greys failed WCAG AA on white, several of them badly. These are the
   accessible equivalents in the cool palette. */
.text-gray-600,.text-zinc-600,.text-slate-600{color:var(--ink-2)!important}
.text-gray-500,.text-zinc-500,.text-slate-500{color:var(--ink-3)!important}
.text-gray-400,.text-zinc-400,.text-slate-400,
.text-gray-300,.text-zinc-300{color:var(--ink-3)!important}
.text-white{color:#f4f9fd!important}

/* Blue family → the real accent. */
.text-blue-400,.text-blue-500,.text-blue-600,.text-blue-700,
.text-sky-400,.text-sky-500,.text-sky-600,.text-sky-700,
.text-cyan-600,.text-cyan-700{color:var(--blue)!important}
/* Indigo/purple/violet were decorative in the old design; they become ink
   rather than a third accent competing with blue. */
.text-indigo-400,.text-indigo-500,.text-indigo-600,.text-indigo-700,
.text-purple-400,.text-purple-500,.text-purple-600,.text-purple-700,
.text-violet-400,.text-violet-500,.text-violet-600,.text-violet-700{color:var(--ink-2)!important}
/* Risk. */
.text-red-400,.text-red-500,.text-red-600,.text-red-700,
.text-rose-400,.text-rose-500,.text-rose-600,.text-rose-700,
.text-pink-400,.text-pink-500,.text-pink-600,.text-pink-700{color:var(--seal)!important}
.text-green-400,.text-green-500,.text-green-600,.text-green-700,
.text-emerald-500,.text-emerald-600,.text-emerald-700,
.text-teal-500,.text-teal-600,.text-teal-700,
.text-lime-600,.text-lime-700{color:var(--clear)!important}
.text-amber-400,.text-amber-500,.text-amber-600,.text-amber-700,.text-amber-800,
.text-yellow-600,.text-yellow-700,.text-yellow-800,
.text-orange-500,.text-orange-600,.text-orange-700{color:var(--flag)!important}

.bg-red-50,.bg-red-100,.bg-rose-50,.bg-pink-50{background:var(--seal-soft)!important}
.bg-green-50,.bg-emerald-50,.bg-teal-50,.bg-lime-50,.bg-cyan-50{background:var(--clear-soft)!important}
.bg-amber-50,.bg-amber-100,.bg-yellow-50,.bg-orange-50{background:var(--flag-soft)!important}
.bg-blue-50,.bg-sky-50{background:var(--blue-soft)!important}
.bg-indigo-50,.bg-purple-50,.bg-violet-50{background:var(--paper-3)!important}

.border-indigo-100,.border-indigo-200,
.border-purple-100,.border-purple-200,.border-violet-100,.border-violet-200{border-color:var(--rule)!important}
.border-blue-100,.border-blue-200,.border-sky-100,.border-sky-200{border-color:rgba(26,91,147,0.32)!important}
.border-red-100,.border-red-200,.border-rose-100,.border-rose-200{border-color:rgba(138,50,48,0.32)!important}
.border-green-100,.border-green-200,.border-emerald-100,.border-emerald-200,
.border-teal-100,.border-teal-200{border-color:rgba(63,111,90,0.32)!important}
.border-amber-100,.border-amber-200,.border-yellow-100,.border-yellow-200{border-color:rgba(125,95,26,0.32)!important}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1,h2,h3,.text-2xl,.text-3xl,.text-4xl{font-family:var(--serif);font-weight:400;
  letter-spacing:-0.015em;line-height:1.14}
.font-bold,.font-semibold{font-weight:600}
h1.font-bold,h2.font-bold,h3.font-bold,
h1.font-semibold,h2.font-semibold,h3.font-semibold{font-weight:500}

/* Nothing below the 11px floor, and the scale stops sprawling. */
.text-\[10px\],.text-\[11px\]{font-size:var(--t-xs)!important}
.text-xs{font-size:var(--t-xs)!important}
.text-sm{font-size:var(--t-sm)!important}
.text-base{font-size:var(--t-base)!important}
.text-lg{font-size:var(--t-md)!important}
.text-xl{font-size:var(--t-lg)!important}
.text-2xl{font-size:var(--t-xl)!important}
.text-3xl,.text-4xl{font-size:var(--t-2xl)!important}
/* The results score is deliberately the largest figure on the page. */
.text-6xl{font-size:var(--t-3xl)!important;font-family:var(--serif);color:var(--blue)!important}

/* Eyebrows and small caps read as docket labels. */
.uppercase.tracking-widest,.uppercase.tracking-wide{font-family:var(--mono);
  letter-spacing:0.1em;color:var(--ink-3)}

/* ── Controls ────────────────────────────────────────────────────────────── */
button,.btn,a[class*="px-"][class*="py-"][style*="background"]{border-radius:0!important}

input[type=text],input[type=email],input[type=tel],input[type=date],
input[type=number],input[type=search],select,textarea{
  background:rgba(255,255,255,.72)!important;border:1px solid var(--rule)!important;
  border-radius:0!important;color:var(--ink)!important;font-family:var(--sans)}
input:focus,select:focus,textarea:focus{
  outline:2px solid var(--blue)!important;outline-offset:-1px;
  border-color:var(--blue)!important;background:#fff!important}

/* appearance:none strips the native caret, so a <select> became visually
   identical to a text input — nothing signalled it opens a list. Repaint the
   caret the same way dossier.css does for the marketing forms. */
/* Specificity note: the selects carry class="… bg-white", and .bg-white
   (0,1,0) outranks a bare `select` (0,0,1) — its `background` shorthand was
   resetting background-image to none and eating the caret. select.bg-white
   (0,1,1) wins; the bare `select` is kept for the unclassed ones. */
select,select.bg-white,select[class]{
  -webkit-appearance:none!important;appearance:none!important;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-3) 50%),
    linear-gradient(135deg,var(--ink-3) 50%,transparent 50%)!important;
  background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%!important;
  background-size:5px 5px,5px 5px!important;background-repeat:no-repeat!important;
  background-color:rgba(255,255,255,.72)!important;
  padding-right:2.2rem!important}

/* Inputs in a two-up row sat 4px apart vertically because one label wrapped
   and the other did not. Stretch makes the boxes share a baseline. */
.grid > div > label,.grid > div{align-self:stretch}

/* The old navy primary becomes the house blue, with the same lift the
   marketing buttons have so the two halves of the site match. */
[style*="background: #142c44"],[style*="background:#142c44"],
[style*="background-color: #142c44"],.bg-\[\#142c44\]{
  background:var(--blue)!important;color:#f4f9fd!important;border-radius:0!important;
  box-shadow:0 10px 26px -14px rgba(26,91,147,.95)}
[style*="background: #142c44"]:hover,[style*="background:#142c44"]:hover{
  background:var(--blue-2)!important}
/* Tailwind-classed primaries get the same treatment. */
.bg-blue-600,.bg-blue-700,.bg-indigo-600,.bg-indigo-700,
.bg-zinc-900,.bg-gray-900,.bg-slate-900,.bg-black{
  background:var(--blue)!important;color:#f4f9fd!important}
.bg-blue-600:hover,.bg-blue-700:hover,.bg-indigo-600:hover,.bg-indigo-700:hover,
.bg-zinc-900:hover,.bg-gray-900:hover,.bg-slate-900:hover,.bg-black:hover{
  background:var(--blue-2)!important}
/* A destructive action stays oxblood — it is the one place risk colour
   belongs on a control. */
.bg-red-600,.bg-red-700,.bg-rose-600{background:var(--seal)!important;color:#f4f9fd!important}

/* Full-width submit buttons on the scan forms were sans-semibold sentence
   case while every other primary on the site is mono uppercase. Same control,
   same treatment. */
button[type=submit],#submit-btn,.w-full[style*="background"],
button.w-full,a.w-full[class*="bg-"]{
  font-family:var(--mono)!important;font-size:var(--t-xs)!important;
  letter-spacing:0.07em!important;text-transform:uppercase!important}

/* Legacy brand blues used for links and accents — the site's original blue,
   so these map to the real --blue token. */
/* .brand-text is applied to display headings as well as to accents. A
   heading is ink everywhere else in the system, so headings opt back out;
   the class stays blue on the score figure and inline accents. */
h1.brand-text,h2.brand-text,h3.brand-text{color:var(--ink)!important}
.brand-text,[style*="color: #1f6ba3"],[style*="color:#1f6ba3"],
[style*="color: #3d9bd4"],[style*="color:#3d9bd4"],
[style*="color: #1a2438"],[style*="color:#1a2438"]{color:var(--blue)!important}

/* The "+ Add alias / school / username" affordances on the scan forms are
   bare text buttons, 16–20px tall — well under a comfortable thumb. Give
   them vertical room without changing how they read. */
button.text-xs,button.text-sm{min-height:32px}
button.text-xs:not([class*="px-"]),button.text-sm:not([class*="px-"]){
  padding-block:0.4rem}

/* ── Layout robustness ───────────────────────────────────────────────────── */
/* A grid or flex item defaults to min-width:auto and refuses to shrink below
   its content, which is exactly how a form blows a 320px screen open. */
.grid > *,.flex > *{min-width:0}
.grid{gap:var(--s-4)}

/* Any fixed multi-column grid becomes room-driven, so half-width and
   quarter-tile windows reflow instead of wedging. */
.grid.md\:grid-cols-2,.grid.grid-cols-2,
.grid.md\:grid-cols-3,.grid.grid-cols-3,
.grid.lg\:grid-cols-3,.grid.sm\:grid-cols-2,
.grid.md\:grid-cols-4,.grid.grid-cols-4{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))!important}

/* URLs in findings must wrap rather than widen the page. */
a,code,.break-all{overflow-wrap:anywhere}

/* Container padding follows the viewport like the rest of the system. */
.max-w-2xl,.max-w-3xl,.max-w-4xl,.max-w-5xl,.max-w-6xl,.max-w-screen-2xl{
  padding-inline:var(--pad)}
.px-4,.px-6,.px-8{padding-inline:var(--pad)}

/* The app pages sat under a floating pill nav and padded for it. The Dossier
   masthead is in normal flow, so that reserved space is now a gap. */
.pt-32,.pt-28,.pt-24{padding-top:var(--s-6)!important}

/* ── Odds and ends the retheme would otherwise miss ──────────────────────── */
hr{border:0;border-top:1px solid var(--rule)}
::selection{background:var(--blue);color:#f4f9fd}
:focus-visible{outline:2px solid var(--blue-bright);outline-offset:2px}

/* Emoji used as iconography reads as clip art on a document. */
.emoji,[data-emoji]{filter:grayscale(1) contrast(0.85);opacity:.75}

/* Tailwind's spinner border colour, used on the loading states. */
.border-t-purple-500,.border-t-blue-500,.border-t-indigo-500{
  border-top-color:var(--blue)!important}
.border-zinc-200,.border-gray-200{border-color:var(--rule)!important}

/* ── Page-level <style> leftovers ────────────────────────────────────────
   Each app page ships its own <style> block with the pre-Dossier navy
   (#1a2438 / #142c44) and brand blue (#1f6ba3) hard-coded. Those blocks sit
   earlier in <head> than this file, so equal-specificity selectors here win
   without needing to edit three 180KB files by hand. */
.brand-bg{background-color:var(--blue)!important}
.brand-border{border-color:var(--blue)!important}
.grad-text{background:var(--blue)!important}
.eyebrow{color:var(--blue)!important;font-family:var(--mono)}

/* The animated ∅ on the scan loading screen — the signature mark, and the
   one piece of motion on the site. It is painted with background-clip:text,
   so it needs a background rather than a colour. */
.null-symbol{background:var(--blue)!important}

.btn-removal{background:var(--blue)!important;color:#f4f9fd!important;border-radius:0!important}
.btn-noindex{background:var(--glass-2)!important;color:var(--blue)!important;
  border:1px solid rgba(26,91,147,0.32)!important;border-radius:0!important}
.inv-st-num,.inv-meter-num{color:var(--blue)!important}
.inv-expand{color:var(--blue)!important}

/* The ∅ tile in the results inventory: a category that came back clear.
   This is the product's own thesis rendered as a component, so it gets the
   accent rather than a neutral. */
.inv-null{color:var(--blue)!important}
