/* The How We Use AI skin for the AI Danger Index. Loaded after the index's own stylesheet, which the build
   scopes to .di. It re-points that stylesheet's variables at this site's tokens and sets type, rules and
   corners the way the rest of the site has them. Colours come from the site's tokens (tokens.json). */
:root {
  --hw-ink: var(--ink); --hw-soft: var(--ink-soft); --hw-muted: var(--ink-muted); --hw-paper: var(--paper);
  --hw-surface: var(--surface); --hw-rule: var(--rule); --hw-accent: var(--accent); --hw-wash: var(--accent-wash);
  --hw-ghost: var(--ghost); --hw-estimate: var(--estimate); --hw-estimate-wash: var(--estimate-wash);
}
.di {
  color-scheme: light;
  --page: var(--hw-paper); --surface: var(--hw-paper); --surface-2: var(--hw-surface); --surface-3: #ebe9e2;
  --ink: var(--hw-ink); --ink-2: var(--hw-soft); --ink-3: var(--hw-muted);
  --hairline: #e4e1da; --rule: var(--hw-rule);
  --accent: var(--hw-accent); --accent-soft: var(--hw-wash); --focus: var(--hw-accent);
  --danger-1: #e9a0a8; --danger-2: #dc5565; --danger-3: #d0021b; --danger-4: #8f0113; --danger-track: #f3ebe9;
  --use-1: #b9c6d2; --use-2: #6c9ec8; --use-3: #0369a1; --use-4: #1b4d72; --use-track: #ebeef1;
  --cat-model: #1b4d72; --cat-agent: #8b4513;
  --good: #2e5e35; --warning: #b98a0b; --serious: #8b4513; --critical: #d0021b; --neutral: #8a8a8a; --good-text: #2e5e35;
  --prov-doc: #2e5e35; --prov-doc-bg: #e9f0ea; --prov-rep: #1b4d72; --prov-rep-bg: #e6edf3; --prov-inf: #856308; --prov-inf-bg: #fbf7ee;
  --prov-dis: #d0021b; --prov-dis-bg: #fbe9eb; --prov-unk: #5f5f5f; --prov-unk-bg: #efeee9;
  --quad-shade: rgba(26, 26, 26, 0.035); --shadow: none;
  background: var(--hw-paper); color: var(--hw-ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
}
.di *, .di *::before, .di *::after { border-radius: 0 !important; box-shadow: none !important; }
.di .catdot, .di .chip .g, .di .dot, .di input[type="radio"] { border-radius: 50% !important; }
.di h1, .di h2, .di h3 { font-family: var(--font-serif); font-weight: 900; letter-spacing: -0.01em; color: var(--hw-ink); }
.di h4, .di h5, .di th, .di .eyebrow, .di .lab, .di label, .di .tag, .di .chip, .di button, .di select, .di input, .di summary {
  font-family: var(--font-cond); }
.di code, .di .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.di a { color: var(--hw-ink); text-decoration: underline; text-decoration-color: var(--hw-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.di a:hover { color: var(--hw-accent); }
.di .wrap { max-width: var(--page-max); padding: 0 var(--gutter); }

/* The section's own nav: a second bar under the site's. */
.di .topnav { position: static; background: var(--hw-ink); border: 0; backdrop-filter: none; }
.di .topnav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
.di .topnav a { color: #fff; text-decoration: none; font-family: var(--font-cond); font-weight: 700; font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase; }
.di .topnav .brand { font-family: var(--font-serif); font-weight: 900; font-size: 19px; letter-spacing: 0; text-transform: none; margin-right: 12px; }
.di .topnav .brand span { color: #fff; }
.di .topnav .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.di .topnav a[aria-current] { box-shadow: inset 0 -3px 0 var(--hw-accent) !important; padding-bottom: 3px; }
.di .topnav a:hover { color: #fff; opacity: 0.75; }

/* Mastheads: the site's title band. */
.di .mast, .di header.mast { background: var(--hw-paper); border-bottom: var(--stroke-section) solid var(--hw-ink); padding: var(--space-10) 0 var(--space-9); }
.di .mast h1, .di main > h1, .di .page-head h1 { font-size: clamp(44px, 6.4vw, 68px); line-height: 0.95; letter-spacing: -0.02em; text-transform: none; }
.di .mast h1 .thin { font-weight: 900; font-style: italic; color: var(--hw-accent); }
.di .lede, .di .mast .lede { font-family: var(--font-sans); font-size: 20px; line-height: 1.6; color: var(--hw-soft); max-width: var(--measure); }
.di .eyebrow { font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hw-muted); }
.di .eyebrow b { color: var(--hw-ink); }

/* Section heads: a heavy rule and a serif heading, as on the topic pages. */
.di section { border: 0; }
.di .sec-head { border-top: var(--stroke-section) solid var(--hw-ink); border-bottom: 0; padding-top: var(--space-4); margin-top: var(--space-10); }
.di .sec-head h2 { font-size: 32px; line-height: 1.1; text-transform: none; letter-spacing: -0.01em; }
.di .sec-note { color: var(--hw-muted); font-size: 15px; }

/* Tables. */
.di table { border-collapse: collapse; }
.di th { font-weight: 800; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hw-ink); border-bottom: var(--stroke-strong) solid var(--hw-ink); background: transparent; }
.di td { border-bottom: 1px solid var(--hw-rule); }

/* Controls. */
.di button, .di select, .di input[type="search"], .di input[type="text"] { border: 1px solid var(--hw-ink); background: var(--hw-paper); color: var(--hw-ink); font-weight: 700; letter-spacing: 0.04em; }

/* Big figures. */
.di .tile .big, .di .side-kv b, .di .big { font-family: var(--font-serif); font-weight: 900; color: var(--hw-accent); }
.di .tile .big small, .di .big small { font-family: var(--font-cond); font-weight: 700; color: var(--hw-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.di .tile, .di .card { border: 0; border-top: var(--stroke-strong) solid var(--hw-ink); background: transparent; }
.di .tile { color: var(--hw-ink); text-decoration: none; }
.di .tile:hover { background: var(--hw-surface); color: var(--hw-ink); }

/* The section's closing notes sit above the site's survey band and footer. */
.di .foot { margin-top: var(--space-11); padding: var(--space-5) var(--gutter) var(--space-9); border-top: 1px solid var(--hw-rule); color: var(--hw-muted); font-size: 14px; }
.di .foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.di h1, .di h1.h1-page { text-transform: none; font-weight: 900; }
.di h2, .di h3 { font-weight: 900; }
.di .topnav .brand, .di .topnav .brand span, .di .topnav .links a { color: #fff; background: transparent; text-decoration: none; }
.di .topnav .links a { font-size: 12.5px; padding: 4px 0; }
.di .topnav .links a:hover { background: transparent; color: #fff; opacity: 0.75; }
.di .topnav .links a[aria-current="page"] { background: transparent; color: #fff; }
.di .tile .big { font-size: 52px; }
.di .side-kv b { font-size: 26px; }
.di button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--hw-accent) !important; }
.di .deadlink small { color: var(--hw-muted); font-style: italic; }
/* A long note in a tag wraps on a phone instead of pushing the page sideways. */
.di .tag { white-space: normal; }
.di .chip { white-space: normal; }
/* Long unbroken strings (commands, addresses, file paths) break rather than widen the page. */
.di p, .di li, .di td, .di th, .di dd, .di dt, .di code, .di small, .di .chip, .di .tag, .di h1, .di h2, .di h3 { overflow-wrap: anywhere; }

/* layout only: "By the numbers" comes straight after the masthead, so the findings show on the first screen; the disclosure follows it */
.di main.wrap { display: flex; flex-direction: column; }
.di main.wrap > #numbers { order: -1; }
/* layout only: on a phone the four headline counts sit between the title and the long intro, in one compact row */
@media (max-width: 700px) {
  .di .mast, .di header.mast { padding: var(--space-4) 0 var(--space-4); }
  .di .mast-grid { display: flex; flex-direction: column; gap: var(--space-2); }
  .di .mast-grid > div { display: contents; }
  .di .mast .eyebrow { order: 1; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 11px; }
  .di .mast h1 { order: 2; margin: 0; font-size: 36px; line-height: 1; align-self: flex-start; padding: 0; text-indent: 0; }
  .di .mast .mast-side { order: 3; grid-template-columns: repeat(4, 1fr); }
  .di .mast .mast-side .side-kv { padding: var(--space-2); flex-direction: column; align-items: flex-start; gap: 2px; border-bottom: 0; font-size: 11px; line-height: 1.2; }
  .di .mast .mast-side .side-kv b { font-size: 20px; }
  .di .mast .mast-side .side-link { grid-column: 1 / -1; font-size: 13px; padding: var(--space-2); }
  .di .mast .lede { order: 4; font-size: 15px; line-height: 1.4; margin: 0; }
  .di main.wrap { padding-top: 0; }
  .di main.wrap > #numbers { padding-top: 0; margin-top: 0; }
  .di main.wrap > #numbers .sec-head { margin-top: var(--space-5); }
  /* layout only: the conflict-of-interest paragraph (same words) sits under the masthead on a phone, ahead of the findings, and the section's own bar takes less room */
  .di .topnav .wrap { gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .di .topnav .brand { display: none; }
  .di .topnav .links { gap: 4px 14px; }
  .di .topnav a { font-size: 11.5px; }
  .di main.wrap > #disclosure { order: -2; padding: var(--space-2) 0 var(--space-3); border: 0; }
  .di main.wrap > #disclosure .sec-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; padding: 0; border: 0; }
  .di main.wrap > #disclosure .lede { font-size: 13.5px; line-height: 1.4; margin: 0; }
}
