/* The published site's one stylesheet, copied to assets/showcase.css by pages_index.py.
   Colour marks who did a step: code, a model or a person. A run is drawn as a strip of its steps. */
:root {
  --bg: #f6f7f8; --surface: #ffffff; --raised: #eef0f2; --fg: #16191c; --muted: #5a6269; --line: #d9dde1; --link: #1557b8;
  --code: #a3adb6; --code-ink: #3f4a54; --code-soft: #e6eaed;
  --model: #b0306f; --model-soft: #f8e1ec;
  --human: #b56500; --human-soft: #fbe9cc;
  --ok: #24744a; --ok-soft: #dff1e6;
  --stop: #a23b2e; --stop-soft: #f8e2de;
  --shadow: 0 1px 2px rgba(20,25,30,.06), 0 6px 20px rgba(20,25,30,.07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131517; --surface: #1b1e21; --raised: #24282c; --fg: #e9ecee; --muted: #9ba3aa; --line: #2f3439; --link: #8ab4f8;
    --code: #586470; --code-ink: #b9c3cc; --code-soft: #262b30;
    --model: #ea7fb6; --model-soft: #3b1f2e;
    --human: #f2aa3c; --human-soft: #3a2b10;
    --ok: #6fd09a; --ok-soft: #173024;
    --stop: #f08a7c; --stop-soft: #3a1d19;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--sans); }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px 3rem; }
a { color: var(--link); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; line-height: 1.2; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .86em; overflow-wrap: anywhere; }
svg { display: block; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; }

.top { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; padding-block: 1.1rem; }
.top .name { font-family: var(--mono); font-weight: 700; display: flex; align-items: center; gap: .55rem; color: var(--fg); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .95rem; }
.mark .c { fill: var(--code); } .mark .m { fill: var(--model); } .mark .h { fill: var(--human); }

.hero { display: grid; gap: 1.75rem; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; padding-block: 1.5rem 1rem; }
.hero.alone { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero .say { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.015em; }
.hero h1 em { font-style: normal; color: var(--model); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 44em; }
.cta, .links { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.links { font-size: .93rem; }
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 8px; background: var(--fg); color: var(--bg);
       text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid var(--fg); cursor: pointer; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.small { padding: .35rem .7rem; font-size: .88rem; }
.btn svg { width: 16px; height: 16px; }
.note { color: var(--muted); font-size: .88rem; }

/* the playable run */
.player { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 1.1rem;
          display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; min-width: 0; }
.player .bar { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; justify-content: space-between; }
.player .bar b { font-size: .95rem; }
.player .bar span { font-size: .82rem; color: var(--muted); }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(6.6rem, 100%), 1fr)); gap: .4rem; }
.stage { display: grid; gap: .3rem; justify-items: start; align-content: start; padding: .6rem .6rem .65rem; border-radius: 10px; background: var(--raised);
         border: 2px solid transparent; transition: border-color .15s, background .15s; min-width: 0; }
.stage svg { width: 26px; height: 26px; color: var(--code-ink); }
.stage.m svg { color: var(--model); } .stage.h svg { color: var(--human); }
.stage b { font-size: .82rem; line-height: 1.2; }
.stage span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stage.on { border-color: var(--code-ink); background: var(--code-soft); }
.stage.m.on { border-color: var(--model); background: var(--model-soft); }
.stage.h.on { border-color: var(--human); background: var(--human-soft); }

.strip { display: flex; flex-wrap: wrap; gap: 3px; }
.strip > * { width: 12px; height: 26px; border-radius: 2.5px; background: var(--code); border: 0; padding: 0; display: block; flex: none; }
.strip > .m { background: var(--model); }
.strip > .h { background: var(--human); }
.strip > .w { background: transparent; border: 2px dashed var(--human); }
.strip > button { cursor: pointer; transition: transform .1s; }
.strip > button:hover { transform: scaleY(1.2); }
.strip > button.cur { outline: 2px solid var(--fg); outline-offset: 1px; transform: scaleY(1.2); }
.strip.playing > button:not(.past):not(.cur) { opacity: .35; }
.strip.mini { gap: 2px; } .strip.mini > * { width: 7px; height: 13px; border-radius: 1.5px; }
.strip.mini > .w { border-width: 1.5px; }

.now { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .7rem .8rem; border-radius: 10px;
       background: var(--raised); min-height: 4.2rem; }
.now .who { width: 2.4rem; height: 2.4rem; border-radius: 8px; display: grid; place-items: center; background: var(--code-soft); color: var(--code-ink); }
.now .who.m { background: var(--model-soft); color: var(--model); }
.now .who.h { background: var(--human-soft); color: var(--human); }
.now .who svg { width: 22px; height: 22px; }
.now .txt { min-width: 0; display: grid; gap: .1rem; }
.now .txt b { font-size: .92rem; } .now .txt span { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 480px) { .now { grid-template-columns: auto minmax(0, 1fr); } .now .btn { grid-column: 1 / -1; justify-self: start; } }
.ctl { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ctl input[type=range] { flex: 1; min-width: 6rem; accent-color: var(--model); }
.legend { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: .75rem; height: .75rem; border-radius: 2px; display: inline-block; flex: none; }
.dot.c { background: var(--code); } .dot.m { background: var(--model); } .dot.h { background: var(--human); }

.sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 2.25rem 0; }
.sec > h2 { font-size: 1.4rem; }
.sub { color: var(--muted); max-width: 44em; }

.ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: .9rem; }
.idea { display: grid; gap: .5rem; align-content: start; padding: 1.1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.idea .ic { width: 2.6rem; height: 2.6rem; border-radius: 10px; display: grid; place-items: center; }
.idea .ic svg { width: 24px; height: 24px; }
.idea.c .ic { background: var(--code-soft); color: var(--code-ink); } .idea.m .ic { background: var(--model-soft); color: var(--model); }
.idea.h .ic { background: var(--human-soft); color: var(--human); } .idea.r .ic { background: var(--ok-soft); color: var(--ok); }
.idea h3 { font-size: 1.02rem; } .idea p { font-size: .93rem; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 1rem; }
.tile { display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); text-align: left; padding: 0; border-radius: 14px; background: var(--surface);
        border: 1px solid var(--line); color: var(--fg); text-decoration: none; overflow: hidden; transition: transform .15s, box-shadow .15s; min-width: 0; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile .pic { background: var(--raised); padding: 1rem; border-bottom: 1px solid var(--line); display: grid; align-items: center; min-height: 7rem; }
.tile .pic svg { width: 100%; height: auto; max-height: 9rem; }
.tile .body { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; padding: 1rem 1.1rem 1.1rem; align-content: start; }
.tile h3 { font-size: 1.12rem; } .tile p { font-size: .94rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 99px; }
.tag.m { background: var(--model-soft); color: var(--model); } .tag.h { background: var(--human-soft); color: var(--human); }
.tag.c { background: var(--code-soft); color: var(--code-ink); }
.nums { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; font-variant-numeric: tabular-nums; }
.nums div { display: grid; } .nums b { font-size: 1.15rem; } .nums span { font-size: .78rem; color: var(--muted); }
.open { font-weight: 600; color: var(--link); font-size: .93rem; }

.runs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.runs li { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.runs li > a { font-weight: 600; justify-self: start; }
.runs li span { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }

.cmd { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cmd pre { margin: 0; overflow-x: auto; flex: 1; min-width: 0; font-family: var(--mono); font-size: .84rem; line-height: 1.6; }
footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }

/* dialogs */
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg); padding: 0; box-shadow: var(--shadow);
         width: min(54rem, calc(100vw - 24px)); max-width: none; max-height: min(46rem, calc(100vh - 24px)); }
dialog::backdrop { background: rgba(10,12,14,.55); }
dialog.narrow { width: min(34rem, calc(100vw - 24px)); }
.dlg { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); max-height: inherit; }
.dlg > header { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: 1.1rem 1.25rem .9rem; border-bottom: 1px solid var(--line); }
.dlg > header h2 { font-size: 1.25rem; } .dlg > header p { color: var(--muted); font-size: .93rem; margin-top: .25rem; }
.x { border: 0; background: var(--raised); width: 2.1rem; height: 2.1rem; border-radius: 8px; cursor: pointer; font-size: 1.1rem; flex: none; }
.dlg .in { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-content: start; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: transparent; padding: .4rem .85rem; border-radius: 99px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--muted); }
.tabs button[aria-pressed=true] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.seg { display: inline-flex; justify-self: start; background: var(--raised); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: .4rem .85rem; border-radius: 8px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1rem; font-size: .93rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv { grid-template-columns: minmax(0, 1fr); gap: .1rem; } .kv dd { margin-bottom: .45rem; } }
.given { padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.time { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--line); }
.time span { display: block; } .time .c { background: var(--code); min-width: 3px; } .time .m { background: var(--model); } .time .h { background: var(--human); }
.tl { display: grid; gap: .3rem; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cmp { display: grid; gap: .55rem; font-size: .88rem; font-variant-numeric: tabular-nums; }
.cmp .r { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.4rem; gap: .6rem; align-items: center; }
.cmp .r .time { height: 14px; background: transparent; }
.tblwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; font-size: .84rem; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .4rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { background: var(--raised); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* a demonstration page */
.crumb { font-size: .9rem; }
.head { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; padding-block: 1rem 0; }
.head h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr)); gap: .75rem; counter-reset: st; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: st; display: grid; gap: .3rem; align-content: start; padding: .85rem .95rem; border: 1px solid var(--line);
            border-top: 4px solid var(--code); border-radius: 8px; background: var(--surface); min-width: 0; }
.steps li.m { border-top-color: var(--model); } .steps li.h { border-top-color: var(--human); }
.steps li h3 { font-size: .98rem; }
.steps li h3::before { content: counter(st) ". "; color: var(--muted); font-weight: 400; }
.steps li p { font-size: .9rem; color: var(--muted); }
.steps li .by { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--code-ink); }
.steps li.m .by { color: var(--model); } .steps li.h .by { color: var(--human); }
.variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: 1rem; }
.var { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; align-content: start; padding: 1.05rem 1.1rem; background: var(--surface);
       border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.var h3 { font-size: 1.05rem; }
.var .how { font-size: .92rem; color: var(--muted); }
.cap { font-size: .92rem; overflow-wrap: anywhere; } .cap span { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.models { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.excerpt, .paper { padding: 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; max-width: 46rem; overflow-wrap: anywhere; }
.excerpt { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.excerpt h1, .excerpt h3 { font-size: 1.15rem; } .excerpt h2, .excerpt h4 { font-size: 1rem; margin-top: .3rem; }
.excerpt p { font-size: .95rem; }
.paper { box-shadow: var(--shadow); }
.paper h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: .8rem; }
.paper h2 { font-size: 1.2rem; margin: 1.6rem 0 .3rem; }
.paper h3, .paper h4 { font-size: 1.05rem; margin: 1.2rem 0 .3rem; }
.paper p { margin: .5rem 0 1rem; }
.paper ul.text { padding-left: 1.4rem; margin: .5rem 0 1rem; }
.deeper { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: .9rem 1.5rem; padding: 0; margin: 0; list-style: none; }
.deeper li { display: grid; gap: .15rem; align-content: start; } .deeper span { color: var(--muted); font-size: .9rem; }

/* the question of a waiting run */
.route { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(8rem, 100%), 1fr)); gap: .4rem; }
.f4 { padding: .55rem .6rem; border-radius: 10px; background: var(--raised); border: 2px solid transparent; display: grid; gap: .15rem; align-content: start; min-width: 0; }
.f4 b { font-size: .84rem; } .f4 span { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.f4.todo { opacity: .5; } .f4.done { border-color: var(--code-ink); } .f4.wait { border-color: var(--human); background: var(--human-soft); }
.f4.ok { border-color: var(--ok); background: var(--ok-soft); } .f4.stop { border-color: var(--stop); background: var(--stop-soft); }
.q { border: 2px solid var(--human); border-radius: 12px; padding: 1rem 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; background: var(--surface); max-width: 46rem; }
.q .lab { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--human); }
.q h3, .q h4 { font-size: 1.05rem; } .q p { font-size: .94rem; overflow-wrap: anywhere; }
.q label { font-size: .85rem; color: var(--muted); display: grid; gap: .25rem; max-width: 18rem; }
.q input { font: inherit; padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); min-width: 0; }
.q .acts { display: flex; gap: .5rem; flex-wrap: wrap; }
.q .btn.ok { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.q .btn.stop { background: transparent; border-color: var(--stop); color: var(--stop); }
.out { padding: .8rem 1rem; border-radius: 10px; font-size: .93rem; max-width: 46rem; overflow-wrap: anywhere; }
.out.ok { background: var(--ok-soft); } .out.stop { background: var(--stop-soft); } .out.idle { background: var(--raised); color: var(--muted); }
.states { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: .5rem; max-width: 46rem; }
.state { display: grid; gap: .2rem; padding: .6rem .7rem; border-radius: 8px; font-size: .88rem; min-width: 0; text-decoration: none; color: var(--fg); background: var(--raised); }
.state b { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.state.wait { background: var(--human-soft); } .state.wait b { color: var(--human); }
.state.ok { background: var(--ok-soft); } .state.ok b { color: var(--ok); }
.state.stop { background: var(--stop-soft); } .state.stop b { color: var(--stop); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* several playable runs behind one row of buttons; a played run inside a section, its stages lit as it goes */
.plays { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; min-width: 0; }
.plays > .panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.player.flat { box-shadow: none; }
.steps li { transition: box-shadow .15s; }
.steps li.on { box-shadow: 0 0 0 2px var(--code-ink); }
.steps li.m.on { box-shadow: 0 0 0 2px var(--model); }
.steps li.h.on { box-shadow: 0 0 0 2px var(--human); }

/* the published runs listed as cards of the same make as the ways compared above them */
.variants.listed { list-style: none; padding: 0; margin: 0; }
.variants.listed .row { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; justify-content: space-between; }
.variants.listed .when { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.variants.listed h3 a { color: inherit; text-decoration: none; }
.variants.listed h3 a:hover { text-decoration: underline; }
.variants.listed .pages a { display: block; overflow-wrap: anywhere; }
.over { font-size: 1.1rem; margin-top: .75rem; }
