/* slopswap · Jumperless theme — the site default and the base every artifact links.
   <link rel="stylesheet" href="../styles/jumperless.css">   (pages live exactly one folder deep)

   Dark only, on purpose: it follows shop.jumperless.org (dark greys, never black; pink, cyan, Michroma headings)
   and carries the rainbow from docs.jumperless.org. There is no OS-preference switch; add
   data-theme="light" on <html> for the light look.

   Tokens:  --bg --surface --surface-2 --fg --muted --line --accent (pink, the J) --accent-2 (cyan) --accent-3
            --r1…--r12 (the pixel wordmark's letters, resampled at even hue steps)  --rainbow
   Links and single highlights are pink; a row of siblings cycles the rainbow (.cycle sets --c per child).
            --font-display --font-body --font-mono --font-pixel
   The palette is defined as --jl-* literals and the plain tokens reference them; a converted artifact points
   its own token names at the --jl-* aliases (localize_fonts.py --theme writes that block). Never define an
   alias in terms of a plain token: that is a cycle, and a cycle makes every colour invalid.
   body.app  = dense tool layout: no document decorations, no column width.
   Phones: a control panel (filters, toolbars) keeps at most 40% of the screen and scrolls inside
   itself; a row of chips or buttons scrolls sideways instead of wrapping into a wall. Use .capped on
   the panel and .scroll-x on each row; the converter applies the same to common artifact patterns.
   .page     = reading column;  .page.wide = 72rem.
   Fonts are self-hosted in fonts/ (Google Fonts is blocked in China). */

@font-face{font-family:Lato;font-weight:400;font-display:swap;src:url(fonts/Lato-400.woff2) format("woff2")}
@font-face{font-family:Lato;font-weight:700;font-display:swap;src:url(fonts/Lato-700.woff2) format("woff2")}
@font-face{font-family:Michroma;font-weight:400;font-display:swap;src:url(fonts/Michroma-400.woff2) format("woff2")}
@font-face{font-family:"Press Start 2P";font-weight:400;font-display:swap;src:url(fonts/PressStart2P-400.woff2) format("woff2")}

:root{
  color-scheme:dark;
  /* the palette lives in the --jl-* literals; the plain tokens point at them. A converted artifact may
     redefine the plain tokens as var(--jl-*), which is why the aliases must never reference the plain ones. */
  --jl-bg:#27272b; --jl-surface:#323238; --jl-surface-2:#3d3d44; --jl-fg:#f3f3f5; --jl-muted:#aaaab5; --jl-line:#4b4b54;
  --jl-accent:#f03060; --jl-accent-2:#00fced; --jl-accent-3:#fc0289;
  --jl-r1:#f03060;--jl-r2:#f12fbf;--jl-r3:#c728f8;--jl-r4:#7647f2;--jl-r5:#5174ed;--jl-r6:#50beeb;
  --jl-r7:#68f4d7;--jl-r8:#70f899;--jl-r9:#7af85c;--jl-r10:#c0f848;--jl-r11:#e8cb40;--jl-r12:#e86828;
  --jl-font-display:Michroma,"Avenir Next","Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  --jl-font-body:Lato,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  --jl-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --jl-font-pixel:"Press Start 2P","Courier New",monospace;
  --bg:var(--jl-bg); --surface:var(--jl-surface); --surface-2:var(--jl-surface-2); --fg:var(--jl-fg); --muted:var(--jl-muted); --line:var(--jl-line);
  --accent:var(--jl-accent); --accent-2:var(--jl-accent-2); --accent-3:var(--jl-accent-3);
  --r1:var(--jl-r1);--r2:var(--jl-r2);--r3:var(--jl-r3);--r4:var(--jl-r4);--r5:var(--jl-r5);--r6:var(--jl-r6);
  --r7:var(--jl-r7);--r8:var(--jl-r8);--r9:var(--jl-r9);--r10:var(--jl-r10);--r11:var(--jl-r11);--r12:var(--jl-r12);
  --rainbow:linear-gradient(90deg,var(--r1),var(--r2),var(--r3),var(--r4),var(--r5),var(--r6),var(--r7),var(--r8),var(--r9),var(--r10),var(--r11),var(--r12));
  --font-display:var(--jl-font-display); --font-body:var(--jl-font-body); --font-mono:var(--jl-font-mono); --font-pixel:var(--jl-font-pixel);
}
:root[data-theme=light]{
  color-scheme:light;
  --jl-bg:#ffffff; --jl-surface:#f5f3f6; --jl-surface-2:#ebe8ec; --jl-fg:#1a1414; --jl-muted:#6a606a; --jl-line:#e3dde2;
  --jl-accent:#d8204e; --jl-accent-2:#0099a8; --jl-accent-3:#d6007a;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.6 var(--font-body);
  padding-block:1.75rem 3rem;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
/* the rainbow stripe along the top edge, on every page */
body::before{content:"";position:fixed;inset:0 0 auto;height:5px;background:var(--rainbow);z-index:10}
.page{max-width:52rem;margin:0 auto;min-width:0}
.page.wide{max-width:72rem}

h1,h2,h3{font-family:var(--font-display);font-weight:400;line-height:1.25;text-wrap:balance;margin:2em 0 .6em;letter-spacing:.01em}
h1{font-size:1.85rem;margin-top:.5rem}
h2{font-size:1.2rem;padding-left:.75rem;border-left:.375rem solid var(--accent)}
h3{font-size:1rem}
h4{font-family:var(--font-pixel);font-size:.62rem;font-weight:400;letter-spacing:0;color:var(--muted);margin:2em 0 .6em}
/* sibling sections walk the rainbow, like the docs sidebar */
h2:nth-of-type(12n+1){border-color:var(--r1)} h2:nth-of-type(12n+2){border-color:var(--r2)}
h2:nth-of-type(12n+3){border-color:var(--r3)} h2:nth-of-type(12n+4){border-color:var(--r4)}
h2:nth-of-type(12n+5){border-color:var(--r5)} h2:nth-of-type(12n+6){border-color:var(--r6)}
h2:nth-of-type(12n+7){border-color:var(--r7)} h2:nth-of-type(12n+8){border-color:var(--r8)}
h2:nth-of-type(12n+9){border-color:var(--r9)} h2:nth-of-type(12n+10){border-color:var(--r10)}
h2:nth-of-type(12n+11){border-color:var(--r11)} h2:nth-of-type(12n+12){border-color:var(--r12)}
p,ul,ol,dl,table,pre,blockquote,figure{margin:0 0 1.1em}
li{margin:.25em 0}
a{color:var(--accent);text-decoration-thickness:1px;text-underline-offset:2px}
a:hover{color:var(--r2)}
/* .cycle: each child gets the next rainbow colour as --c, for rows of buttons, chips, cards */
.cycle>:nth-child(12n+1){--c:var(--r1)} .cycle>:nth-child(12n+2){--c:var(--r2)}
.cycle>:nth-child(12n+3){--c:var(--r3)} .cycle>:nth-child(12n+4){--c:var(--r4)}
.cycle>:nth-child(12n+5){--c:var(--r5)} .cycle>:nth-child(12n+6){--c:var(--r6)}
.cycle>:nth-child(12n+7){--c:var(--r7)} .cycle>:nth-child(12n+8){--c:var(--r8)}
.cycle>:nth-child(12n+9){--c:var(--r9)} .cycle>:nth-child(12n+10){--c:var(--r10)}
.cycle>:nth-child(12n+11){--c:var(--r11)} .cycle>:nth-child(12n+12){--c:var(--r12)}
strong{font-weight:700}
small,.muted{color:var(--muted)}
.eyebrow{font-family:var(--font-pixel);font-size:.6rem;line-height:1.8;color:var(--muted);margin:0 0 .75rem}
.eyebrow a{color:inherit;text-decoration:none}
.eyebrow a:hover{color:var(--accent)}
hr{border:0;height:3px;background:var(--rainbow);margin:2.5rem 0;border-radius:2px}
.logo{height:2.4rem;width:auto;display:block;margin:0 0 1.25rem}

code,kbd,pre{font-family:var(--font-mono);font-size:.9em}
code,kbd{background:var(--surface);padding:.1em .4em;border-radius:4px}
pre{background:var(--surface);border:1px solid var(--line);padding:1rem;border-radius:6px;overflow-x:auto;line-height:1.5}
pre code{background:none;padding:0;font-size:1em}

.table-wrap{overflow-x:auto;margin-bottom:1.1em}
table{border-collapse:collapse;width:100%;font-size:.95rem;font-variant-numeric:tabular-nums}
th,td{text-align:left;padding:.55em .75em;border-bottom:1px solid var(--line);vertical-align:top}
th{background:var(--surface);font-family:var(--font-pixel);font-size:.55rem;font-weight:400;color:var(--muted)}

blockquote{border-left:4px solid var(--accent-2);margin-left:0;padding:.1em 1em;color:var(--muted)}
.callout{border-left:4px solid var(--accent-2);background:var(--surface);border-radius:4px;padding:.8em 1em;margin:1em 0 1.4em}
.callout>:last-child{margin-bottom:0}
.callout .label{display:block;font-family:var(--font-pixel);font-size:.55rem;color:var(--accent-2);margin-bottom:.5em}
.pill{display:inline-block;font-family:var(--font-pixel);font-size:.5rem;padding:.35em .7em;border-radius:999px;background:var(--surface);border:1px solid var(--line);vertical-align:middle}

img,svg,video{max-width:100%;height:auto}
figcaption{font-size:.85rem;color:var(--muted)}
dl.meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:1rem}
dl.meta dt{font-family:var(--font-pixel);font-size:.55rem;color:var(--muted)}
dl.meta dd{margin:0}

/* index pages (the front page and the folder indexes build.py writes).
   .ix-label heads a group. .ix-rows is one bordered row per page or project: put .cycle on it for the rainbow
   markers; children are h2 > a, p, small (name | about | meta), or with .stack: h2, small, p (title and meta on
   one line, about underneath). .ix-files is the quieter list for downloads and for the files a page loads. */
.ix-label{font-family:var(--font-pixel);font-size:.6rem;line-height:1.8;color:var(--muted);margin:0 0 .6rem}
.ix-rows,.ix-files{list-style:none;padding:0;margin:0 0 2.5rem}
.ix-rows{border-top:1px solid var(--line)}
.ix-rows li{position:relative;display:grid;grid-template-columns:15rem minmax(0,1fr) auto;gap:.3rem 1.5rem;align-items:baseline;margin:0;padding:1rem 1rem 1rem 1.25rem;border-bottom:1px solid var(--line);border-left:.375rem solid var(--c,var(--accent))}
.ix-rows.stack li{grid-template-columns:minmax(0,1fr) auto}
.ix-rows.stack p{grid-column:1/-1}
.ix-rows li:hover,.ix-rows li:focus-within{background:var(--surface)}
.ix-rows h2{font-size:1.05rem;line-height:1.3;margin:0;padding:0;border:0;overflow-wrap:anywhere}
.ix-rows h2 a{color:var(--fg);color:color-mix(in srgb,var(--c,var(--accent)) 68%,#fff);text-decoration:none}
.ix-rows h2 a::after{content:"";position:absolute;inset:0}
.ix-rows p{margin:0;color:var(--muted);font-size:.95rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.ix-rows small,.ix-files small{font-family:var(--font-pixel);font-size:.5rem;line-height:1.8;color:var(--muted);white-space:nowrap}
.ix-rows small{text-align:right}
.ix-files{display:grid;grid-template-columns:repeat(auto-fill,minmax(18rem,1fr));gap:0 2.5rem;font-size:.9rem}
.ix-files li{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin:0;padding:.45rem 0;border-bottom:1px solid var(--line)}
.ix-files a{min-width:0;overflow-wrap:anywhere;font-family:var(--font-mono);color:var(--fg);text-decoration:none}
.ix-files a:hover{color:var(--accent);text-decoration:underline}
details.ix-more>summary{cursor:pointer;width:max-content;max-width:100%;list-style:none}
details.ix-more>summary::-webkit-details-marker{display:none}
details.ix-more>summary::before{content:"+ "}
details.ix-more[open]>summary::before{content:"- "}
details.ix-more>summary:hover{color:var(--fg)}
details.ix-more .ix-files{margin-top:.25rem}
details.ix-more .ix-files a{color:var(--muted)}
@media (max-width:760px){
  .ix-rows li,.ix-rows.stack li{grid-template-columns:1fr;padding-right:.5rem}
  .ix-rows small{text-align:left}
  .ix-rows.stack small{order:1}
}

/* DDJ splash: the artwork with the newest pages' names in the eye boxes (styles/splash.js) */
.splash{position:relative;width:100%;aspect-ratio:1449/781;margin:0 0 1.5rem}
.splash>img,.splash>svg{display:block;width:100%;height:100%;overflow:visible}
.splash text{font-family:var(--font-pixel)}
.splash a.splash-hot{cursor:pointer;outline:none}
.splash a.splash-hot>g{transition:transform .25s ease,filter .25s ease;transform-box:fill-box;transform-origin:center}
.splash a.splash-hot:hover>g,.splash a.splash-hot:focus-visible>g{transform:scale(1.06);filter:drop-shadow(0 4px 18px rgba(0,0,0,.6))}
/* on phones the eye boxes are too small to read: the same newest pages as a list */
.splash-list{display:none;list-style:none;padding:0;margin:0 0 1.5rem;font-family:var(--font-pixel);font-size:.6rem;line-height:2.2}
.splash-list a{text-decoration:none}
@media (max-width:700px){.splash-list{display:block}}

/* phones: bounded control panels, sideways-scrolling rows */
@media (max-width:700px){
  .capped{max-height:40vh;max-height:40svh;overflow-y:auto;overscroll-behavior:contain}
  .scroll-x{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .scroll-x::-webkit-scrollbar{display:none}
  .scroll-x>*{flex:0 0 auto;width:auto;max-width:none}
  .scroll-x>input,.scroll-x>select{width:11rem}
}

/* dense tool pages: the artifact brings its own layout, the theme brings fonts, colors and the stripe */
body.app{font-size:14px;padding-block:1.25rem 2.5rem}
body.app h1,body.app h2,body.app h3{margin:0 0 .4em}
body.app h1{font-size:1.35rem}
body.app h2{font-size:.95rem;border-left:0;padding-left:0}
body.app th{font-family:var(--font-body);font-size:inherit;background:none;color:var(--muted)}
body.app p,body.app ul,body.app ol,body.app table,body.app pre{margin-bottom:.6em}
body.app hr{height:1px;background:var(--line);margin:1rem 0}

:focus-visible{outline:2px solid var(--accent-2);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media print{body::before{position:static}body{padding:0}a{color:inherit}}
