/* Open Factory Floor: the one stylesheet of both sites. The colours are the factory app's own
   (factory/app_page.html), so that the sites and the app look like one thing, in light and in dark. */
:root {
  --floor: #efece3; --card: #fffdf8; --ink: #23211d; --soft: #5f5a50; --rule: #d6d0c0;
  --steel: #8f96a3; --steel-dark: #5d6470; --steel-light: #c9ced6; --belt: #3b3f47; --belt-mark: #7a808c; --on-steel: #2b2e34;
  --crate: #ead9b8; --crate-edge: #9a7b45; --crate-ink: #2c2110;
  --go: #2e9e63; --wait: #e0a12b; --stop: #d2493b; --idle: #a9a59a;
  --plate: #23211d; --plate-ink: #f4f1e8; --accent: #1f4e79; --accent-ink: #fffdf8;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wide: 1120px; --read: 46rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --floor: #17181c; --card: #1f2127; --ink: #ecebe6; --soft: #acaaa2; --rule: #353842;
    --steel: #6f7684; --steel-dark: #474c57; --steel-light: #969ca8; --belt: #3f4552; --belt-mark: #9aa1b0; --on-steel: #15161a;
    --crate: #d8c39a; --crate-edge: #8a6c3a; --crate-ink: #20180a;
    --plate: #ecebe6; --plate-ink: #17181c; --accent: #8fbce6; --accent-ink: #10161d; color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--floor); color: var(--ink); font: 17px/1.6 var(--sans); overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--card); color: var(--ink); padding: 8px 12px; border: 2px solid var(--accent); border-radius: 6px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* The top: the name as a plate on a belt, and the way round. */
.top { border-bottom: 1px solid var(--rule); background: var(--card); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 15px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font: 500 11px/1.2 var(--mono); letter-spacing: .1em; color: var(--soft); }
nav.ways { margin-left: auto; }
nav.ways ul { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
nav.ways a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px; }
nav.ways a:hover { background: var(--floor); }
nav.ways a[aria-current] { background: var(--floor); font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent); }
nav.ways a.other { color: var(--accent); font-weight: 600; }
@media (max-width: 699px) { nav.ways { margin-left: -10px; width: calc(100% + 10px); } nav.ways a { padding: 4px 10px; } }

main { display: block; padding: 0 0 56px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(30px, 5.2vw, 50px); letter-spacing: -.015em; margin-top: .6em; }
h2 { font-size: clamp(23px, 3vw, 30px); }
h3 { font-size: 20px; }
p, ul, ol { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2.2vw, 21px); max-width: 40em; }
.eyebrow { font: 600 12.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin: 0 0 .6em; }
.quiet { color: var(--soft); }
.crumbs { margin-top: 18px; }

/* Buttons are plates. */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.button { display: inline-block; padding: 11px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid var(--accent); color: var(--accent); background: var(--card); line-height: 1.2; }
.button.main { background: var(--accent); color: var(--accent-ink); }
.button:hover { filter: brightness(1.08); }

/* The hero. */
.hero { padding: 20px 0 8px; }
.hero h1 { max-width: 17em; }
figure.floor { margin: 26px 0 10px; padding: 14px 10px 4px; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; }
figure.floor figcaption { font-size: 14.5px; color: var(--soft); padding: 4px 8px 8px; }
.drawing { display: block; width: 100%; height: auto; font-family: var(--sans); }
.drawing.narrow { display: none; max-width: 420px; margin: 0 auto; }
@media (max-width: 640px) { .drawing.wide { display: none; } .drawing.narrow { display: block; } }

/* Sections and cards. */
section { padding: 8px 0; }
.band { background: var(--card); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 36px 0; padding: 8px 0 26px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin: 18px 0; padding: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px 6px; }
.band .card { background: var(--floor); }
.card h3 { margin: 6px 0 6px; font-size: 18.5px; }
.card p { font-size: 16px; }
.card .mini { display: block; width: 112px; height: auto; margin: 0 0 4px; }
.steps { list-style: none; padding: 0; margin: 20px 0; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 22px 58px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 30px; border-radius: 4px; background: var(--plate); color: var(--plate-ink);
  font: 700 15px/30px var(--mono); text-align: center; }
.steps > li::after { content: ""; position: absolute; left: 18px; top: 36px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--belt); opacity: .55; }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 0 0 6px; font-size: 19px; }
.plates { display: grid; gap: 12px 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; padding: 0; margin: 18px 0; }
.plates li { padding-left: 0; }
.plates b { display: inline-block; font: 700 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--plate); color: var(--plate-ink);
  padding: 4px 8px; border-radius: 3px; margin: 0 0 6px; }
.plates p { margin: 0; font-size: 16px; }
.split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.split > * { min-width: 0; }
@media (min-width: 860px) { .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.callout { border: 2px dashed var(--steel); border-radius: 12px; padding: 16px 20px; margin: 26px 0; background: var(--card); }
.callout h2 { margin-top: .2em; }
.callout p:last-child { margin-bottom: 0; }

/* Code, tables and the words of the guides. */
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: color-mix(in srgb, var(--steel-light) 38%, var(--card)); padding: .08em .32em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--belt); border-radius: 8px; padding: 12px 14px; overflow-x: auto; line-height: 1.45; margin: 0 0 1.1em; }
pre code { font-size: 14px; }
.table { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
th { font: 600 12.5px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--soft); background: color-mix(in srgb, var(--steel-light) 22%, var(--card)); }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; } td.center, th.center { text-align: center; }
blockquote { margin: 0 0 1.1em; padding: 6px 16px; border-left: 4px solid var(--wait); background: var(--card); border-radius: 0 8px 8px 0; }
hr { border: 0; border-top: 2px dashed var(--rule); margin: 2em 0; }

.guide { display: grid; gap: 10px 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .guide { grid-template-columns: 240px minmax(0, var(--read)); } }
.guide article { min-width: 0; max-width: var(--read); }
.guide article h2, .guide article h3, .guide article h4 { scroll-margin-top: 12px; position: relative; }
a.here { position: absolute; left: -1.1em; width: 1.1em; color: var(--soft); text-decoration: none; opacity: 0; }
h2:hover a.here, h3:hover a.here, h4:hover a.here, a.here:focus { opacity: 1; }
@media (max-width: 699px) { a.here { display: none; } }
.side { font-size: 15px; }
.side details { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 14px; margin: 18px 0 0; }
.side summary { cursor: pointer; font: 600 13px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.side ul { list-style: none; padding: 0; margin: 8px 0 6px; }
.side li { margin: 0; }
.side li a { display: block; padding: 3px 0; text-decoration: none; }
.side li a[aria-current] { font-weight: 700; color: var(--ink); }
.side li.sub a { padding-left: 12px; font-size: 14px; color: var(--soft); }
.side .group { font: 600 11.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin: 12px 0 2px; }
.source { font-size: 14.5px; color: var(--soft); border-top: 1px solid var(--rule); margin-top: 2.4em; padding-top: 12px; }
.guides-list { list-style: none; padding: 0; margin: 10px 0 24px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.guides-list li a { display: block; height: 100%; padding: 12px 16px; background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--crate-edge); border-radius: 8px; text-decoration: none; color: var(--ink); }
.guides-list li a:hover { border-color: var(--soft); border-left-color: var(--accent); }
.guides-list strong { display: block; color: var(--accent); font-size: 17.5px; }
.guides-list span { display: block; font-size: 15px; color: var(--soft); line-height: 1.45; margin-top: 3px; }

/* The form. */
form.interest { display: grid; gap: 14px; max-width: 34rem; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 18px 20px; margin: 18px 0; }
form.interest label { display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 4px; }
form.interest .hint { font-weight: 400; color: var(--soft); }
form.interest input, form.interest textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--floor); border: 1.5px solid var(--steel); border-radius: 7px; padding: 9px 11px; }
form.interest textarea { min-height: 7.5em; resize: vertical; }
form.interest input:focus-visible, form.interest textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
form.interest button { font: inherit; font-weight: 700; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 8px; padding: 11px 20px; cursor: pointer; justify-self: start; }
form.interest button:disabled { opacity: .6; cursor: default; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.said { margin: 0; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.said:empty { display: none; }
.said.ok { background: color-mix(in srgb, var(--go) 20%, var(--card)); border: 1.5px solid var(--go); }
.said.no { background: color-mix(in srgb, var(--stop) 16%, var(--card)); border: 1.5px solid var(--stop); }
.closed { margin: 0; padding: 12px 14px; border: 2px dashed var(--wait); border-radius: 8px; background: color-mix(in srgb, var(--wait) 12%, var(--card)); }
.needs-script { margin: 0; color: var(--soft); font-size: 15px; }

/* The bottom: who made it, and the way to the other site. */
footer.bottom { border-top: 1px solid var(--rule); background: var(--card); padding: 22px 0 30px; font-size: 15px; }
footer.bottom .wrap { display: grid; gap: 10px; }
footer.bottom ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; margin: 0; }
.credit { margin: 0; }
.belt-rule { height: 10px; background: var(--belt); background-image: repeating-linear-gradient(90deg, transparent 0 14px, var(--belt-mark) 14px 22px, transparent 22px 36px);
  background-size: 100% 2px; background-position: 0 4px; background-repeat: no-repeat; }

/* The drawings: the app's own classes. */
.steel { fill: var(--steel); } .steel-dark { fill: var(--steel-dark); } .steel-light { fill: var(--steel-light); }
.outline { stroke: var(--steel-dark); stroke-width: 2; fill: none; stroke-linejoin: round; }
.belt { fill: var(--belt); } .roller { fill: var(--steel-light); stroke: var(--steel-dark); stroke-width: 1.5; }
.run { stroke: var(--belt-mark); stroke-width: 2.5; stroke-dasharray: 10 14; fill: none; stroke-linecap: round; }
.belt.rework { fill: color-mix(in srgb, var(--stop) 38%, var(--belt)); }
.glass { fill: color-mix(in srgb, var(--accent) 30%, var(--card)); stroke: var(--steel-dark); stroke-width: 1.5; }
.plate { fill: var(--plate); } .plate-text { fill: var(--plate-ink); font: 600 11px var(--mono); letter-spacing: .06em; }
.plate-text.big { font-size: 12px; }
.small { fill: var(--soft); font-size: 12px; } .small.on-steel { fill: var(--on-steel); font-weight: 600; }
.zone { fill: var(--soft); font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.lamp { stroke: var(--steel-dark); stroke-width: 1.5; } .go { fill: var(--go); } .wait { fill: var(--wait); } .stop { fill: var(--stop); } .idle { fill: var(--idle); }
.funnel { fill: var(--steel-light); stroke: var(--steel-dark); stroke-width: 2; stroke-linejoin: round; }
.skip { fill: var(--steel-dark); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.arm-up { fill: var(--go); } .arm-down { fill: var(--stop); }
.livebox { fill: color-mix(in srgb, var(--go) 16%, var(--card)); stroke: var(--go); stroke-width: 2; }
.turntable circle { fill: var(--steel); stroke: var(--card); stroke-width: 2; } .turntable .hub { fill: var(--card); stroke: none; } .turntable path { fill: none; stroke: var(--card); stroke-width: 2; stroke-linecap: round; }
.crate rect { fill: var(--crate); stroke: var(--crate-edge); stroke-width: 1.5; }
.crate .slat { stroke: var(--crate-edge); stroke-width: 1.2; }
.crate text { fill: var(--crate-ink); font: 600 11px var(--mono); }
.crate.c-stop rect { fill: color-mix(in srgb, var(--stop) 55%, var(--card)); stroke: var(--stop); stroke-width: 2; }
.crate.c-wait rect { fill: color-mix(in srgb, var(--wait) 70%, var(--card)); stroke: color-mix(in srgb, var(--wait) 60%, var(--ink)); stroke-width: 2; }
.crate.c-go rect { fill: color-mix(in srgb, var(--go) 45%, var(--card)); stroke: var(--go); stroke-width: 2; }
@media (prefers-color-scheme: dark) { .crate.c-go text, .crate.c-stop text { fill: var(--ink); } }
.mark-rule { stroke: var(--steel); stroke-width: 3; stroke-linecap: round; }
.screen { fill: var(--floor); stroke: var(--steel-dark); stroke-width: 2; }
.shed { fill: color-mix(in srgb, var(--steel-light) 22%, var(--card)); stroke: var(--steel-dark); stroke-width: 2.5; stroke-linejoin: round; }
.shed-floor { fill: var(--steel-dark); }
.tumble { transform: rotate(18deg); transform-origin: 258px 58px; transform-box: view-box; }
.mark .crate rect { stroke-width: 1.8; }
.mark .run { stroke-width: 1.5; stroke-dasharray: 4 3; }
@media (prefers-reduced-motion: no-preference) {
  .drawing .run { animation: belt 1.6s linear infinite; }
  @keyframes belt { to { stroke-dashoffset: -24; } }
}
.drawing.lost { max-width: 360px; margin: 10px 0 0; }
.drawing.hosted { max-width: 460px; margin: 0 auto; }
/* A guide's contents: beside it on a wide screen, folded above it on a narrow one. */
details.toc { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 14px; margin: 0 0 1.4em; }
details.toc summary { cursor: pointer; font: 600 13px/1.8 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
details.toc ul { margin: 6px 0 4px; padding-left: 1.2em; font-size: 15.5px; }
@media (max-width: 979px) { .guide .side { display: none; } }
@media (min-width: 980px) { details.toc { display: none; } .guide .side { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow-y: auto; padding: 0 6px 20px 0; } }
