/*
 * /slop-by-year (public/slop.php, 2026-11-15). The page itself uses the site's tokens (audit-remaster.css). The three
 * exhibits are drawn in the look the AI check measured each year, so their colours stay inside the .sl-spec frame and
 * never reach the page around them. Every exhibit scales with its column (container queries), and an element of the
 * legend lights up its part of the drawing on hover or keyboard focus, with no script.
 */

.sl-years {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
@media (max-width: 1099px) {
  .sl-years { grid-template-columns: minmax(0, 1fr); gap: 44px; max-width: 760px; margin-inline: auto; }
  .sl-year { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .sl-year-h { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .sl-year { display: block; }
}

.sl-year { margin: 0; min-width: 0; }
.sl-year-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; }
.sl-year-n { font-family: var(--mono); font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.02em; color: var(--fg); }
.sl-year-note { color: var(--fg-subtle); font-size: var(--t-sm); line-height: 1.4; }

/* The legend: what was measured that year, as a share of the sites measured. */
.sl-legend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
@media (max-width: 1099px) and (min-width: 641px) { .sl-legend { margin-top: 0; } }
.sl-legend li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 3.2em;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin-inline: -8px;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  color: var(--fg-muted);
  line-height: 1.35;
  cursor: default;
}
.sl-legend li:hover, .sl-legend li:focus-visible { background: var(--bg-3); color: var(--fg); outline: none; }
.sl-legend li:focus-visible { box-shadow: 0 0 0 2px var(--acid); }
.sl-legend--plain li { grid-template-columns: minmax(0, 1fr); }
.sl-l-bar { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.sl-l-bar i { display: block; height: 100%; width: var(--p); background: var(--fg-subtle); border-radius: 3px; }
.sl-legend li:hover .sl-l-bar i, .sl-legend li:focus-visible .sl-l-bar i { background: var(--acid); }
.sl-l-pct { font-family: var(--mono); font-size: var(--t-micro); text-align: right; color: var(--fg); font-variant-numeric: tabular-nums; }
.sl-l-extra { border-top: 1px dashed var(--border); border-radius: 0; margin-top: 4px; padding-top: 8px; }
.sl-l-extra ~ .sl-l-extra { border-top: 0; margin-top: 0; padding-top: 6px; }

/* ---- The exhibit ---- */
.sl-spec {
  container-type: inline-size;
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  overflow: hidden;
  background: oklch(0.99 0.002 260);
  color: oklch(0.21 0.01 260);
  isolation: isolate;
}
.sl-s-url {
  display: block;
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-subtle);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Inside, every size is a share of the frame's width, so the drawing keeps its proportions in any column. */
.sl-s-page {
  position: relative;
  padding: 5cqw 6cqw 4cqw;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 3.6cqw;
  line-height: 1.45;
  overflow: hidden;
  z-index: 0;
}
.sl-s-page b, .sl-s-page strong { font-weight: 650; }
.sl-s-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 3cqw;
  margin-bottom: 7cqw;
  font-size: 3.2cqw;
}
.sl-s-logo { font-weight: 750; letter-spacing: -0.02em; font-size: 3.8cqw; }
.sl-s-links { display: flex; gap: 3.4cqw; opacity: 0.7; }
.sl-s-btn {
  display: inline-block;
  padding: 1.6cqw 3.4cqw;
  border-radius: 1.8cqw;
  background: oklch(0.21 0.01 260);
  color: oklch(0.99 0.002 260);
  font-weight: 600;
  white-space: nowrap;
}
.sl-s-btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px oklch(0.85 0.01 260); }
.sl-s-nav--pill {
  margin-inline: auto; width: fit-content;
  padding: 1.4cqw 1.6cqw 1.4cqw 3.4cqw;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px oklch(0.88 0.01 260), 0 1cqw 3cqw oklch(0.2 0.02 260 / 0.08);
  background: oklch(1 0 0 / 0.75);
}
.sl-s-kicker {
  margin: 0 0 2.4cqw; text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 2.5cqw; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6;
}
.sl-s-h1 {
  margin: 0 0 2.6cqw; text-align: center;
  font-size: 8.4cqw; line-height: 1.04; letter-spacing: -0.035em; font-weight: 760;
}
.sl-s-h1 em { font-style: italic; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.sl-s-h1--grad, .sl-s-h1--grad em {
  background: linear-gradient(90deg, oklch(0.55 0.24 290), oklch(0.6 0.2 250));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sl-s-sub { margin: 0 auto 4cqw; max-width: 86%; text-align: center; opacity: 0.68; font-size: 3.4cqw; }
.sl-s-cta { display: flex; justify-content: center; gap: 2.4cqw; margin-bottom: 3.6cqw; }
.sl-s-dots { margin: 0 0 6cqw; text-align: center; font-size: 2.9cqw; opacity: 0.66; }
.sl-s-orb {
  position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(9cqw); opacity: 0.55; pointer-events: none;
}
.sl-s-orb--a { width: 50cqw; height: 50cqw; left: -12cqw; top: 6cqw; background: oklch(0.7 0.2 300); }
.sl-s-orb--b { width: 44cqw; height: 44cqw; right: -12cqw; top: 22cqw; background: oklch(0.75 0.16 220); }

.sl-s-cards, .sl-s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4cqw; margin-bottom: 6cqw; }
.sl-s-card {
  padding: 3cqw 2.6cqw;
  border-radius: 2.6cqw;
  box-shadow: inset 0 0 0 1px oklch(0.9 0.01 260);
  background: oklch(1 0 0);
  font-size: 2.7cqw; line-height: 1.35;
}
.sl-s-card b { display: block; margin: 1.6cqw 0 0.8cqw; font-size: 2.9cqw; }
.sl-s-card span.sl-s-line { display: block; height: 1.2cqw; margin-top: 1cqw; border-radius: 1cqw; background: oklch(0.9 0.01 260); }
.sl-s-card span.sl-s-line + span.sl-s-line { width: 70%; }
.sl-spec .sl-s-cards--plain .sl-s-card { box-shadow: none; background: transparent; padding: 0; }
.sl-s-ico { display: inline-grid; place-items: center; width: 6.6cqw; height: 6.6cqw; }
.sl-s-ico svg { width: 5cqw; height: 5cqw; }
.sl-s-ico--tile { border-radius: 1.8cqw; background: oklch(0.55 0.2 270 / 0.12); color: oklch(0.5 0.2 270); }
.sl-s-emoji { font-size: 1.15em; line-height: 1; }
.sl-s-steps { list-style: none; margin: 0 0 6cqw; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4cqw; }
.sl-s-steps li { font-size: 2.8cqw; }
.sl-s-steps li span { display: block; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 5.2cqw; font-weight: 700; opacity: 0.3; line-height: 1.1; }
.sl-s-faq { margin-bottom: 5cqw; }
.sl-s-faq-h { margin: 0 0 2cqw; font-size: 4.2cqw; font-weight: 720; letter-spacing: -0.02em; text-align: center; }
.sl-s-faq-q { display: flex; justify-content: space-between; align-items: center; padding: 2cqw 0; border-bottom: 1px solid oklch(0.9 0.01 260); font-size: 2.9cqw; }
.sl-s-faq-q svg { width: 3.4cqw; height: 3.4cqw; opacity: 0.55; }
.sl-s-faq-text { margin: 0; padding: 0.8cqw 0; font-size: 2.9cqw; opacity: 0.6; border-bottom: 1px solid oklch(0.9 0.01 260); }
.sl-s-foot { padding-top: 3cqw; border-top: 1px solid oklch(0.92 0.01 260); text-align: center; font-size: 2.6cqw; opacity: 0.55; }
.sl-s-code {
  margin: 0; padding: 9px 12px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.55;
  color: var(--fg-subtle); background: var(--bg-2);
  border-top: 1px solid var(--border);
  white-space: pre-wrap; word-break: break-word;
}
.sl-s-code span { display: block; }

/* The palettes the check measured (worker discipline.ts lanes): one per year, the most common that year. */
.sl-pal--purple .sl-s-btn:not(.sl-s-btn--ghost) { background: linear-gradient(135deg, oklch(0.55 0.24 295), oklch(0.55 0.22 265)); }
.sl-pal--purple .sl-s-ico--tile { background: oklch(0.6 0.2 295 / 0.14); color: oklch(0.5 0.22 295); }
.sl-pal--purple .sl-s-page { background: linear-gradient(180deg, oklch(0.97 0.02 295), oklch(0.99 0.004 260) 55%); }
.sl-pal--blue .sl-s-btn:not(.sl-s-btn--ghost) { background: oklch(0.52 0.19 255); }
.sl-pal--blue .sl-s-ico--tile { background: oklch(0.6 0.17 255 / 0.13); color: oklch(0.5 0.19 255); }
.sl-pal--electric { background: oklch(0.15 0.01 260); color: oklch(0.95 0.005 260); }
.sl-pal--electric .sl-s-btn:not(.sl-s-btn--ghost) { background: oklch(0.88 0.2 130); color: oklch(0.18 0.02 130); }
.sl-pal--electric .sl-s-btn--ghost { box-shadow: inset 0 0 0 1px oklch(0.4 0.01 260); }
.sl-pal--electric .sl-s-card { background: oklch(0.2 0.01 260); box-shadow: inset 0 0 0 1px oklch(0.3 0.01 260); }
.sl-pal--electric .sl-s-card span.sl-s-line { background: oklch(0.32 0.01 260); }
.sl-pal--electric .sl-s-ico--tile { background: oklch(0.88 0.2 130 / 0.14); color: oklch(0.88 0.2 130); }
.sl-pal--electric .sl-s-nav--pill { background: oklch(0.2 0.01 260 / 0.8); box-shadow: inset 0 0 0 1px oklch(0.32 0.01 260); }
.sl-pal--electric .sl-s-faq-q, .sl-pal--electric .sl-s-faq-text { border-color: oklch(0.3 0.01 260); }
.sl-pal--electric .sl-s-foot { border-color: oklch(0.28 0.01 260); }
.sl-pal--electric .sl-s-h1--grad, .sl-pal--electric .sl-s-h1--grad em { background-image: linear-gradient(90deg, oklch(0.9 0.2 130), oklch(0.85 0.14 190)); }
.sl-pal--electric .sl-s-h1 em:not(.sl-s-h1--grad em) { color: oklch(0.88 0.2 130); }

/* Hover or focus on a legend line lights up that part of the drawing. */
.sl-spec [data-el] { transition: outline-color 0.15s ease-out; outline: 2px solid transparent; outline-offset: 0.6cqw; border-radius: 1cqw; }
/* One rule per element id: keep the list in step with $SL_ELEMENTS in public/slop.php. */
.sl-year:has(.sl-legend li[data-el="E02"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E02"],
.sl-year:has(.sl-legend li[data-el="E03"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E03"],
.sl-year:has(.sl-legend li[data-el="E04"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E04"],
.sl-year:has(.sl-legend li[data-el="E06"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E06"],
.sl-year:has(.sl-legend li[data-el="E14"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E14"],
.sl-year:has(.sl-legend li[data-el="E14c"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E14c"],
.sl-year:has(.sl-legend li[data-el="E15"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E15"],
.sl-year:has(.sl-legend li[data-el="E17"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E17"],
.sl-year:has(.sl-legend li[data-el="E21"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E21"],
.sl-year:has(.sl-legend li[data-el="E21b"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E21b"],
.sl-year:has(.sl-legend li[data-el="E28"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E28"],
.sl-year:has(.sl-legend li[data-el="E29b"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E29b"],
.sl-year:has(.sl-legend li[data-el="E30"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E30"],
.sl-year:has(.sl-legend li[data-el="E32"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E32"],
.sl-year:has(.sl-legend li[data-el="E35"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E35"],
.sl-year:has(.sl-legend li[data-el="E36"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E36"],
.sl-year:has(.sl-legend li[data-el="E36b"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E36b"],
.sl-year:has(.sl-legend li[data-el="E38"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E38"],
.sl-year:has(.sl-legend li[data-el="E40"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E40"],
.sl-year:has(.sl-legend li[data-el="E42"]:is(:hover, :focus-visible)) .sl-spec [data-el~="E42"] {
  outline-color: var(--acid);
}

/* ---- Prose around the exhibits ---- */
.sl-intro { max-width: 640px; margin: 0 auto; }
.sl-shift { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.sl-shift li { color: var(--fg-muted); line-height: 1.6; }
.sl-shift strong { color: var(--fg); font-weight: 600; }
.sl-own { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 20px; align-items: baseline; margin: 18px 0 0; }
.sl-own dt { font-family: var(--mono); font-size: var(--t-sm); color: var(--fg-subtle); white-space: nowrap; }
.sl-own dd { margin: 0; color: var(--fg-muted); line-height: 1.6; }
@media (max-width: 560px) { .sl-own { grid-template-columns: minmax(0, 1fr); } .sl-own dd { margin-bottom: 10px; } }

@media (prefers-reduced-motion: reduce) { .sl-spec [data-el] { transition: none; } }
