/* css.slopped.site: the chrome around the exhibits, the home page, the switcher and the about page. Hand-written;
   scripts/build.mjs doesn't touch it. Brand tokens and type as on slopped.site (slopped-brand). Every colour goes
   through a token, so the dark-mode exhibit can flip the whole page by redefining them. No script anywhere. */
@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; }
@font-face { font-family: "Archivo Black Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Noto Sans Bold"), local("NotoSans-Bold"); size-adjust: 112%; }
:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --ink: #171815;
  --acid: #e3ff59;
  --on-acid: #171815;
  --muted: #6b6b62;
  --line: #d4d2c9;
  --panel: #ebe7dc;
  --card: #fbf9f3;
  --code: #1d1e1a;
  --code-ink: #ecebe2;
  --focus: #728600;
  --yes: #2f6b12;
  --no: #a3301c;
  --head: "Archivo Black", "Arial Black", "Archivo Black Fallback", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
a { color: inherit; text-underline-offset: 3px; }
:where(a, button, input, select, textarea, summary, label, [tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 1000; letter-spacing: -1.5px; line-height: 1.02; font-synthesis: none; }
img { max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: .92em; }
:not(pre) > code { overflow-wrap: anywhere; }
.wrap { max-width: 1440px; margin: auto; padding: 0 5%; }
main:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* header: the masthead (slopped-brand, "Subsite header") */
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100px; border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; min-width: 0; }
.masthead .brand { display: flex; align-items: center; min-height: 42px; flex: none; }
.masthead .brand img { display: block; width: auto; height: 30px; }
.site-name { display: inline-flex; align-items: center; min-height: 42px; margin-left: 16px; padding-left: 17px; background: linear-gradient(var(--line), var(--line)) left center / 1px 22px no-repeat; color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -.3px; text-decoration: none; white-space: nowrap; }
.site-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.head nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; font-size: 14px; }
.head nav a { display: inline-flex; align-items: center; min-height: 42px; text-decoration: none; white-space: nowrap; }
.head nav a:hover, .head nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
.head nav a[aria-current] { font-weight: 700; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 700 14px Arial, Helvetica, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.pill:hover { background: var(--acid); color: var(--on-acid); }
.pill.dark { background: var(--ink); color: var(--paper); }

/* page heads */
.intro { padding: 56px 0 34px; }
.intro h1 { max-width: 12ch; font-size: clamp(48px, 7.4vw, 112px); letter-spacing: -3px; }
.intro.narrow h1 { max-width: 18ch; font-size: clamp(40px, 5.4vw, 80px); letter-spacing: -2.5px; }
.lede { max-width: 660px; margin: 20px 0 0; font-size: 21px; line-height: 1.4; letter-spacing: -.3px; }
.rules { max-width: 640px; margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.ex-no { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* home: shelves of cards */
.shelf { padding: 26px 0 50px; border-top: 1px solid var(--ink); scroll-margin-top: 10px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 16px; }
.shelf-head h2 { font-size: clamp(32px, 3.4vw, 44px); }
.shelf-head h2 small { margin-left: 4px; color: var(--muted); font: 700 14px Arial, Helvetica, sans-serif; letter-spacing: 0; vertical-align: super; }
.shelf-lede { max-width: 720px; margin: 12px 0 26px; color: var(--muted); }
.shelf-lede a { color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px 24px; margin: 0; padding: 0; list-style: none; }
.card a { display: grid; gap: 4px; text-decoration: none; }
.card .pic { display: block; overflow: hidden; aspect-ratio: 3 / 2; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); transition: transform .2s, border-color .2s; }
.card .pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card a:hover .pic { border-color: var(--ink); transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .card .pic { transition: none; } .card a:hover .pic { transform: none; } }
.card a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.no-pic { display: grid; place-items: center; width: 100%; height: 100%; color: var(--line); font: 1000 64px var(--head); }
.card b { font-size: 17px; line-height: 1.25; letter-spacing: -.3px; }
.card .sub { color: var(--muted); font-size: 14px; line-height: 1.4; }
.card .uses { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.card .uses code { padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; }
.statement { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; margin: 10px 0 56px; padding: 34px; border-radius: 16px; background: var(--acid); color: var(--on-acid); }
.statement p { max-width: 24ch; margin: 0; font: 1000 clamp(26px, 3vw, 40px)/1.08 var(--head); letter-spacing: -1.2px; font-synthesis: none; }
.statement .pill { border-color: var(--on-acid); }
.statement .pill.dark { background: var(--on-acid); color: var(--acid); }

/* the switcher */
.try { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.try-list ol { margin: 0; padding: 0; list-style: none; columns: 1; }
.try-list a { display: flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: 15px; text-decoration: none; }
.try-list a:hover { background: var(--acid); color: var(--on-acid); }
.try-list a:focus { background: var(--ink); color: var(--paper); }
.stage-frame { display: block; width: 100%; height: min(78vh, 900px); border: 1.5px solid var(--ink); border-radius: 12px; background: #fff; }
.try-note { max-width: 70ch; margin: 18px 0 50px; color: var(--muted); font-size: 14px; }

/* one exhibit */
.ex-intro { padding-bottom: 26px; }
.stage { position: relative; margin: 0 0 40px; padding: clamp(18px, 3vw, 36px); border: 1.5px solid var(--ink); border-radius: 16px; background: var(--card); }
.ex-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px 48px; padding-bottom: 20px; }
.ex-text section { min-width: 0; }
.ex-text h2 { margin-bottom: 12px; font-size: 26px; letter-spacing: -.8px; }
.ex-text p { margin: 0 0 12px; max-width: 64ch; }
.ex-text .code { grid-row: span 2; }
.code-note { color: var(--muted); font-size: 14px; }
pre { overflow: auto; max-height: 560px; margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--code); color: var(--code-ink); font: 13px/1.55 var(--mono); tab-size: 2; }
pre:focus-visible { outline: 3px solid var(--focus); }
.sups { margin: 0; padding: 0; list-style: none; }
.sup { --sup: var(--yes); padding: 10px 0 10px 18px; border-top: 1px solid var(--line); background: radial-gradient(circle at 5px 1.25em, var(--sup) 4px, transparent 5px) no-repeat; font-size: 15px; }
.sup code { font-weight: 700; }
.tested { display: block; color: var(--muted); font-size: 13px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 26px 0 56px; border-top: 1px solid var(--line); }
.pager .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* about */
.prose { max-width: 820px; padding-bottom: 40px; }
.prose section { padding: 26px 0; border-top: 1px solid var(--line); scroll-margin-top: 10px; }
.prose h2 { margin-bottom: 14px; font-size: clamp(28px, 3vw, 38px); }
.prose p { margin: 0 0 14px; font-size: 17px; }
.table-wrap { overflow-x: auto; }
.support-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.support-table th, .support-table td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.support-table thead th { border-top: 0; border-bottom: 1.5px solid var(--ink); }
.support-table tr.sup { background: none; }
.support-table .sup-yes { color: var(--yes); font-weight: 700; }
.support-table .sup-no { color: var(--no); font-weight: 700; }

/* footer, and Slop at the top without top.js: a plain link, made to appear by a scroll-driven animation where
   the browser has them, and left at the end of the page where it doesn't */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 30px 0 60px; border-top: 1px solid var(--ink); }
.foot-logo img { display: block; width: auto; height: 26px; }
.foot p { max-width: 80ch; margin: 0; color: var(--muted); font-size: 14px; }
.to-top { display: block; width: max-content; margin: -40px auto 40px; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 700; text-decoration: none; }
@supports (animation-timeline: scroll()) {
  .to-top { position: fixed; right: 18px; bottom: 18px; z-index: 5; margin: 0; opacity: 0; visibility: hidden; animation: to-top linear both; animation-timeline: scroll(root); animation-range: 0 150vh; }
  .to-top:focus-visible { opacity: 1; visibility: visible; }
}
@keyframes to-top { 0%, 99% { opacity: 0; visibility: hidden; } 100% { opacity: 1; visibility: visible; } }

@media (max-width: 860px) {
  .ex-text { grid-template-columns: minmax(0, 1fr); }
  .ex-text .code { grid-row: auto; }
  .try { grid-template-columns: minmax(0, 1fr); }
  .try-list ol { display: flex; flex-wrap: wrap; gap: 4px; }
  .try-list a { min-height: 42px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
  .stage-frame { height: 72vh; }
}
@media (max-width: 760px) {
  .head { flex-wrap: wrap; height: auto; padding: 16px 0 4px; gap: 0 16px; }
  .masthead .brand img { height: 24px; }
  .site-name { margin-left: 12px; padding-left: 13px; }
  .head nav { gap: 0 14px; }
  .intro { padding: 36px 0 26px; }
  .lede { font-size: 19px; }
  .statement { padding: 24px; }
}
/* the support table becomes one card per feature on phones */
@media (max-width: 640px) {
  .support-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .support-table tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .support-table th, .support-table td { padding: 0; border: 0; }
  .support-table th { grid-column: 1 / -1; }
  .support-table td:nth-of-type(n+2) { grid-column: 1 / -1; color: var(--muted); }
  .support-table td:nth-of-type(2)::before { content: "Checked: "; }
  .support-table td:nth-of-type(3)::before { content: "Without it: "; }
  .support-table td:nth-of-type(4)::before { content: "Used by: "; }
  .support-table td:first-of-type::before { content: "This browser: "; color: var(--muted); font-weight: 400; }
}
