/* Sawlist: the board store. Melamine-white sheets, racking blue, navy ink and one lumber-crayon yellow, square corners,
   one typeface (Schibsted Grotesk, self-hosted, SIL OFL: fonts/OFL-Schibsted-Grotesk.txt). Spacing steps follow the
   cabinet maker's 32 mm system: 8, 16, 32, 64, 96, 128. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ground: #f1f2f3;      /* melamine white: the page */
  --paper: #ffffff;       /* the printed list */
  --ink: #0f2747;         /* navy: text */
  --ink-2: #3f4d66;       /* secondary text on the ground (7.9:1) */
  --rack: #1d4e89;        /* racking blue: whole fields */
  --rack-ink: #ffffff;
  --rack-2: #d3deee;      /* secondary text on rack blue (6.3:1) */
  --night: #0f2747;       /* the footer's field */
  --crayon: #f2c12e;      /* lumber-crayon yellow: the action, the active mark */
  --accent: var(--crayon);   /* the action's fill: Sawlist's yellow, or a workshop's own colour (web/workshop.js) */
  --accent-hover: #ffd255;
  --on-accent: var(--ink);
  --board: #dcc7a1;       /* birch ply */
  --room: #e9e5df;        /* the 3D stage (web/furniture.js paints the same) */
  --line: #cfd4dc;        /* table rules only */
  --tint: #e2e5ea;        /* a step down from the ground */
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --step-head: clamp(2rem, 1.3rem + 2.8vw, 3.75rem);
  --step-display: clamp(2.25rem, 0.9rem + 4.6vw, 5.5rem);
  --gutter: clamp(16px, 3.2vw, 48px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-move: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--step-body)/1.5 var(--font); letter-spacing: -0.01em;
  font-kerning: normal; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; text-wrap: balance; }
h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-size: var(--step-lead); }
p { margin: 0 0 16px; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
::selection { background: var(--crayon); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
button, a, [role="button"], label { touch-action: manipulation; }
button { font: inherit; }
input, select, textarea { font: inherit; font-size: max(16px, 1em); }

.sl-wrap { width: 100%; max-width: 1520px; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); }
.sl-skip { position: absolute; left: 16px; top: -64px; z-index: 50; padding: 12px 16px; background: var(--ink); color: #fff; font-weight: 700; }
.sl-skip:focus { top: 16px; }

/* ---------- buttons: square, one fill ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 0;
  font: 700 1rem/1.1 var(--font); letter-spacing: -0.01em; text-decoration: none; color: var(--on-accent); background: var(--accent);
  cursor: pointer; user-select: none; -webkit-user-select: none; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.btn:active { transform: scale(0.97); }
.btn-quiet { background: transparent; color: inherit; border: 2px solid currentColor; padding: 10px 20px; }
.btn-small { min-height: 40px; padding: 8px 16px; }
.btn:disabled { opacity: 0.6; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-hover); }
  .btn-quiet:hover { background: rgba(255, 255, 255, 0.12); }
}
.sl-arrow { font-weight: 700; text-decoration: none; }
.sl-arrow::after { content: " →"; display: inline-block; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sl-arrow:hover::after { transform: translateX(4px); } .sl-arrow:hover { text-decoration: underline; } }

/* ---------- the bar ---------- */
.sl-bar { position: relative; z-index: 20; padding-top: env(safe-area-inset-top, 0px); }
.sl-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.sl-word { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800;
  font-size: 1.5rem; letter-spacing: -0.05em; }
.sl-mark { width: 30px; height: 24px; fill: var(--ink); flex: none; }
.sl-mark .sl-mark-cut { fill: var(--crayon); }
.sl-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); font-weight: 600; font-size: 1rem; }
.sl-nav a:not(.btn) { text-decoration: none; padding-block: 8px; }
.sl-nav a[aria-current="page"] { text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .sl-nav a:not(.btn):hover { text-decoration: underline; } }
@media (max-width: 520px) { .sl-nav a[href$="#makers"] { display: none; } .sl-word { font-size: 1.3125rem; } }

/* a workshop's preview (web/workshop.js): its initial in its colour, and a quiet line above the bar to say so */
.sl-initial { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; background: var(--accent); color: var(--on-accent);
  font-size: 1rem; font-weight: 800; letter-spacing: 0; line-height: 1; }
.sl-word { min-width: 0; }
.sl-nav { flex: none; }
.sl-word-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
@media (max-width: 520px) { .sl-as-more { display: none; } [data-workshop] .sl-word { font-size: var(--step-body); } }
.sl-as { background: var(--ink); color: #fff; font-size: var(--step-small); padding-top: env(safe-area-inset-top, 0px); }
.sl-as + .sl-bar { padding-top: 0; }
.sl-as-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; min-height: 44px; padding-block: 6px; }
.sl-as p { margin: 0; }
.sl-as-do { display: flex; gap: 16px; align-items: center; }
.sl-as a, .sl-as-off { color: #fff; font-weight: 700; }
.sl-as-off { padding: 8px 0; background: none; border: 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em;
  cursor: pointer; font-size: inherit; }
.sl-as :focus-visible { outline-color: var(--crayon); }
[data-workshop] .fc-side .btn:not(.btn-quiet) { border: 2px solid #fff; }

/* ---------- the first screen ---------- */
.sl-hero { padding-block: 16px 0; }
.sl-hero-product { --above: 300px; }
.sl-hero-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 64px; align-items: end; padding-block: 8px 32px; }
.sl-hero h1 { font-size: var(--step-display); max-width: 12.5em; }
.sl-lead { font-size: var(--step-lead); line-height: 1.4; max-width: 38em; margin: 0; }
.sl-lead a { font-weight: 600; }
@media (max-width: 640px) {
  .sl-hero-head { padding-bottom: 24px; gap: 12px; }
  .sl-hero .sl-lead { font-size: var(--step-body); }
}
@media (min-width: 1000px) {
  .sl-hero-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .sl-hero h1 { max-width: 9.6em; }
  .sl-lead { font-size: var(--step-body); padding-bottom: 6px; }
}
/* ---------- the configurator: stage beside the choices ---------- */
.fc-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 48px; padding-bottom: 64px; align-items: start; }
@media (min-width: 1000px) {
  .fc-app { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); padding-bottom: 96px; }
  .fc-stage-wrap { position: sticky; top: 16px; }
}
.fc-stage { position: relative; height: clamp(400px, calc(100svh - var(--above, 280px)), 780px); overflow: hidden; background: var(--room); isolation: isolate; }
.fc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fc-gl { touch-action: none; cursor: grab; }
.fc-gl:active { cursor: grabbing; }
.fc-fade { pointer-events: none; opacity: 0; z-index: 1; }
.fc-stage.no-gl::after { content: "This browser can't draw the 3D view. The cut list and the files below still are this unit's."; position: absolute;
  inset: auto 16px 16px; color: var(--ink); font-weight: 600; }
.fc-noscript { position: absolute; inset: auto 16px 16px; margin: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 999px) {
  .fc-stage-wrap { position: sticky; top: 0; z-index: 5; margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px)));
    background: var(--ground); padding-bottom: 8px; }
  .fc-stage { height: clamp(260px, 44svh, 520px); }
  .fc-caption { padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); }
}

.fc-tools { position: absolute; z-index: 2; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.fc-tool { min-height: 40px; padding: 8px 14px; font: 600 var(--step-small)/1 var(--font); color: var(--ink); background: var(--paper); border: 0;
  cursor: pointer; user-select: none; -webkit-user-select: none; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.fc-tool:active { transform: scale(0.97); }
.fc-tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
.fc-tool:disabled { opacity: 0.45; cursor: default; }
.fc-tool:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .fc-tool:not([aria-pressed="true"]):not(:disabled):hover { background: var(--crayon); } }
@media (pointer: coarse) { .fc-tool { min-height: 44px; } }
@media (max-width: 520px) { .fc-tools { left: 8px; bottom: 8px; gap: 6px; } .fc-tool { padding: 8px 12px; font-size: 0.875rem; } }

.fc-dim { position: absolute; z-index: 2; left: 0; top: 0; padding: 3px 8px; font: 700 0.875rem/1.2 var(--font);
  color: var(--ink); background: var(--paper); white-space: nowrap; pointer-events: none; }
.fc-status { position: absolute; z-index: 2; left: 16px; top: 16px; margin: 0; max-width: calc(100% - 32px); padding: 6px 12px 6px 32px;
  font-size: var(--step-small); font-weight: 600; color: var(--ink); background: var(--paper); }
.fc-status:empty { display: none; }
.fc-status::before { content: ""; position: absolute; left: 11px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border: 2px solid var(--rack); border-right-color: transparent; border-radius: 50%; animation: fc-spin 0.7s linear infinite; }
@keyframes fc-spin { to { transform: rotate(1turn); } }
.fc-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 12px 0 0; font-size: 1rem; color: var(--ink-2); }
.fc-caption strong { color: var(--ink); font-weight: 700; }

/* the choices */
.fc-panel { min-width: 0; }
.fc-group { margin: 0 0 32px; padding: 0; border: 0; min-width: 0; }
.fc-group > legend { padding: 0; margin: 0 0 16px; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.035em; line-height: 1; }
.fc-group > legend small, .fc-choices legend small { font-weight: 400; font-size: var(--step-small); color: var(--ink-2); letter-spacing: 0; margin-left: 6px; }
.fc-choices { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.fc-choices > legend { padding: 0; margin: 0 0 8px; font-weight: 700; font-size: 1rem; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-chip { position: relative; display: flex; cursor: pointer; min-width: 0; user-select: none; -webkit-user-select: none; }
.fc-chip input, .fc-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fc-chip span { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 14px; font-weight: 600;
  font-size: 1rem; background: var(--paper); transition: background-color 140ms ease, color 140ms ease; }
.fc-chip small { font-weight: 400; font-size: var(--step-small); color: var(--ink-2); white-space: nowrap; }
.fc-chip input:checked + span { background: var(--ink); color: #fff; }
.fc-chip input:checked + span small { color: var(--rack-2); }
.fc-chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.fc-chip input:disabled + span { color: #556074; background: var(--tint); cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.fc-chip input:disabled + span small { color: #556074; }
@media (hover: hover) and (pointer: fine) { .fc-chip input:not(:checked):not(:disabled) + span:hover { background: #fdf0c6; } }
.fc-note { margin: 8px 0 0; font-size: 1rem; color: var(--ink-2); }
.fc-note:empty { display: none; }
.fc-note.is-said { color: var(--ink); font-weight: 600; }
.fc-note.is-said::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; background: var(--crayon); }
.fc-choices.is-idle .fc-chips, [data-fronts].is-idle .fc-swatches { opacity: 0.5; }
.fc-group:disabled { opacity: 0.5; }
.fc-group:disabled .fc-range, .fc-group:disabled .fc-chip { cursor: not-allowed; }

.fc-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 4px; }
.fc-swatch { position: relative; cursor: pointer; min-width: 0; user-select: none; -webkit-user-select: none; }
.fc-swatch span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 2px; font-size: var(--step-small);
  line-height: 1.2; text-align: center; color: var(--ink-2); }
.fc-swatch i { display: block; width: 44px; height: 44px; background-size: 160% 240%; background-position: center;
  outline: 1px solid rgba(15, 39, 71, 0.16); outline-offset: -1px; transition: transform 160ms var(--ease-out); }
.fc-swatch input:checked + span { color: var(--ink); font-weight: 700; }
.fc-swatch input:checked + span i { outline: 3px solid var(--ink); outline-offset: 3px; }
.fc-swatch input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.fc-swatch:active i { transform: scale(0.94); }
@media (max-width: 420px) { .fc-swatch i { width: 40px; height: 40px; } }

/* sizes: a slider and a number field, to the millimetre */
.fc-size { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label label" "range num" "note note";
  align-items: center; gap: 4px 16px; margin: 0 0 16px; }
.fc-size-label { grid-area: label; font-weight: 700; font-size: 1rem; }
.fc-range { grid-area: range; width: 100%; height: 32px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.fc-range:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.fc-num { grid-area: num; position: relative; display: flex; align-items: center; }
.fc-num input { width: 6.5em; min-height: 48px; padding: 8px 40px 8px 12px; font-weight: 700;
  text-align: right; color: var(--ink); background: var(--paper); border: 0; border-radius: 0; -moz-appearance: textfield; appearance: textfield; }
.fc-num input::-webkit-inner-spin-button, .fc-num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.fc-num input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.fc-num span { position: absolute; right: 12px; color: var(--ink-2); font-size: var(--step-small); pointer-events: none; }
.fc-size .fc-note { grid-area: note; margin: 0; }

/* the engine's line: calm, a thin bar while it loads */
.fc-engine { position: relative; margin: 0 0 24px; padding: 12px 16px 14px; font-size: var(--step-small); color: var(--ink-2); background: var(--tint);
  overflow: hidden; --done: 0%; }
.fc-engine-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.fc-engine-bar i { display: block; height: 100%; width: var(--done); background: var(--rack); transition: width 200ms linear; }
.fc-engine:not(.is-loading) .fc-engine-bar { display: none; }
.fc-engine.is-ready { color: var(--ink); background: var(--paper); }
.fc-engine.is-ready .fc-engine-text::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; background: #1f8a54; }
.fc-engine.is-off { color: var(--ink); background: #fdf0c6; }
.fc-presets .fc-chips { display: grid; grid-template-columns: minmax(0, 1fr); }
.fc-presets .fc-chip small { white-space: normal; }

/* the sum under the choices */
.fc-sum { padding: 24px; background: var(--ink); color: #fff; }
.fc-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 16px; }
.fc-price-label { font-weight: 600; }
.fc-price-label small { display: block; font-weight: 400; color: var(--rack-2); font-size: var(--step-small); }
.fc-price strong { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.fc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin: 0 0 16px; }
.fc-facts dt { font-size: var(--step-small); color: var(--rack-2); }
.fc-facts dd { margin: 2px 0 0; font-weight: 700; }
.fc-demo { margin: 0 0 16px; font-size: var(--step-small); font-weight: 600; color: #fff; }
.fc-demo::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; background: var(--crayon); }
.fc-to-files { margin: 0; }
.fc-to-files a { font-weight: 700; color: var(--crayon); text-decoration: none; }
.fc-to-files a::after { content: " ↓"; }
@media (hover: hover) and (pointer: fine) { .fc-to-files a:hover { text-decoration: underline; } }
.fc-sum :focus-visible { outline-color: var(--crayon); }
/* a fact that just changed says by how much (web/site.js) */
.sl-delta { display: inline-block; margin-left: 8px; font-size: var(--step-small); font-weight: 700; color: var(--crayon);
  letter-spacing: 0; animation: sl-delta 2.4s var(--ease-out) forwards; }
.fc-price .sl-delta { order: 3; flex-basis: 100%; text-align: right; margin: 0; }
@keyframes sl-delta { 0% { opacity: 0; transform: translateY(4px); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { @keyframes sl-delta { 0%, 85% { opacity: 1; } 100% { opacity: 0; } } }

/* ---------- what the workshop receives: the printed list on the rack ---------- */
.fc-proof { background: var(--rack); color: var(--rack-ink); padding-block: clamp(64px, 8vw, 128px); scroll-margin-top: 16px; }
.fc-proof-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px 64px; align-items: start; }
@media (min-width: 1100px) { .fc-proof-in { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.fc-sheet { background: var(--paper); color: var(--ink); padding: clamp(20px, 3.2vw, 48px); min-width: 0; }
.fc-sheet-title { font-size: var(--step-head); margin: 0 0 16px; }
.fc-sub { margin: 0 0 24px; color: var(--ink-2); max-width: 60ch; font-size: 1rem; }
.fc-side .fc-sub { color: var(--rack-2); }
.fc-total-line { margin: 16px 0 0; color: var(--ink); font-weight: 600; }
.fc-table { overflow-x: auto; }
.fc-table:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.fc table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.fc th, .fc td { text-align: left; padding: 10px 16px 10px 0; vertical-align: top; }
.fc-sheet td, .fc-sheet tbody th { border-bottom: 1px solid var(--line); }
.fc thead th { font-size: var(--step-small); color: var(--ink-2); font-weight: 600; border-bottom: 3px solid var(--ink); white-space: nowrap; }
.fc tbody th { font-weight: 700; }
.fc .num { white-space: nowrap; }
.fc-sheet table { min-width: 560px; }
.fc-sheet tbody tr { transition: background-color 1.4s ease; }
/* a cut-list row's number: the sheet layout labels its parts with it */
.fc-id { display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; padding-inline: 4px; margin: -2px 10px 0 0;
  vertical-align: middle; background: var(--ink); color: #fff; font-size: 0.875rem; font-weight: 700; letter-spacing: 0; }
/* the sheet layout: each board as a drawing, its parts numbered as the cut list */
.fc-nest { margin-top: clamp(48px, 6vw, 64px); }
.fc-nest-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; margin: 0 0 8px; }
.fc-nest-sum { margin: 0 0 8px; font-weight: 600; max-width: 60ch; }
.fc-nest-groups { margin: 0 0 16px; color: var(--ink-2); font-size: 1rem; }
.fc-nest-groups:empty { display: none; }
.fc-legend { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--step-small); color: var(--ink-2); }
.fc-legend li { display: flex; align-items: center; gap: 8px; }
.fc-legend i { width: 16px; height: 16px; flex: none; border: 2px solid var(--ink); }
.fc-key-part { background: #ffffff; } .fc-key-offcut { background: #ead9b6; } .fc-key-waste { background: #c9d3e1; }
.fc-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px 16px; }
.fc-board { margin: 0; min-width: 0; }
.fc-board svg { display: block; width: 100%; height: auto; }
.fc-board figcaption { margin-top: 8px; font-size: var(--step-small); color: var(--ink-2); line-height: 1.35; }
.fc-board figcaption strong { color: var(--ink); margin-right: 4px; }
.fc-nest-note { margin: 24px 0 0; font-size: 1rem; }
.fc-sheet tbody tr.is-new { background: #fdf0c6; transition: none; }
@media (max-width: 600px) {
  .fc-sheet table { min-width: 0; font-size: var(--step-small); }
  .fc-sheet th:nth-child(n+4), .fc-sheet td:nth-child(n+4) { display: none; }
  .fc th, .fc td { padding-right: 8px; }
}
.fc-side { display: grid; gap: 48px; min-width: 0; }
.fc-side h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; margin: 0 0 16px; }
.fc-pack { width: 100%; min-height: 56px; }
.fc-pack small { font-weight: 500; font-size: var(--step-small); }
.fc-pack-what { margin: 12px 0 24px; font-size: 1rem; color: var(--rack-2); }
.fc-demo-files { color: #fff; }
.fc-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 8px; }
.fc-actions .btn { padding-inline: 12px; }
.fc-side .btn-quiet { color: #fff; }
.fc-side :focus-visible { outline-color: var(--crayon); }
.fc-file-note { margin: 16px 0 0; font-size: var(--step-small); color: var(--rack-2); }
.fc-file-note:empty { display: none; }
.fc-open-line { margin: 16px 0 0; }
.fc-open { font-weight: 700; }
.fc-open::after { content: " ↗"; }
.fc-breakdown { color: #fff; }
.fc-breakdown th { font-weight: 400; }
.fc-breakdown td { text-align: right; padding-right: 0; }
.fc-breakdown th, .fc-breakdown td { border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.fc-breakdown .fc-total th, .fc-breakdown .fc-total td { font-weight: 800; border-bottom: 0; border-top: 3px solid #fff; font-size: var(--step-body); }
.fc-live p { margin: 0 0 12px; color: var(--rack-2); }
.fc-live strong { color: #fff; }
.fc-params { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fc-params li { padding: 6px 10px; background: rgba(255, 255, 255, 0.1); font-size: var(--step-small); }
.fc-params code { font: inherit; font-weight: 800; color: var(--crayon); }
.fc[data-card] .fc-tools, .fc[data-card] .fc-status { display: none; }
.fc[data-card] .fc-stage { width: 800px; height: 600px; }

/* ---------- for makers ---------- */
.sl-makers { padding-block: clamp(96px, 12vw, 192px) clamp(64px, 8vw, 128px); }
.sl-makers-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(64px, 8vw, 128px); }
.sl-makers h2 { font-size: clamp(2.25rem, 1rem + 3.9vw, 4.5rem); max-width: 10em; }
.sl-statement { font-size: clamp(1.375rem, 1.05rem + 1.1vw, 2.125rem); line-height: 1.3; letter-spacing: -0.025em; font-weight: 500; max-width: 26em; margin: 0; }
@media (min-width: 1000px) { .sl-makers-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sl-how-title { font-size: var(--step-head); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 0 0 32px; }
/* the stages as one bar, the order a workshop knows: from its product to the order with files */
.sl-stages { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; min-height: clamp(220px, 24vw, 320px); }
.sl-stages li { flex: 1 1 0; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 20px; min-width: 0; }
.sl-stages li:nth-child(1) { background: var(--board); color: var(--ink); flex-grow: 0.9; }
.sl-stages li:nth-child(2) { background: var(--rack); color: #fff; flex-grow: 1.3; }
.sl-stages li:nth-child(3) { background: var(--ink); color: #fff; flex-grow: 1.1; }
.sl-stages li:nth-child(4) { background: var(--crayon); color: var(--ink); flex-grow: 1.2; }
.sl-stage-name { font-size: clamp(1.375rem, 1rem + 1.2vw, 2.25rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.sl-stage-text { font-size: 1rem; max-width: 26ch; }
@media (max-width: 860px) {
  .sl-stages { flex-direction: column; min-height: 0; }
  .sl-stages li { flex: none; min-height: 132px; gap: 16px; }
}

/* "your workshop": the form beside a piece of the site in the workshop's name and colour */
.sl-shop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 64px; margin-top: clamp(64px, 8vw, 128px); padding: clamp(20px, 3.2vw, 48px);
  background: var(--paper); scroll-margin-top: 16px; }
@media (min-width: 900px) { .sl-shop { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; } }
.sl-shop-title { font-size: var(--step-head); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 0 0 16px; }
.sl-shop-text > p { max-width: 46ch; margin-bottom: 32px; }
.sl-shop-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 640px) { .sl-shop-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .sl-field-name, .sl-field-colour { grid-column: 1 / -1; } }
.sl-field { display: grid; gap: 8px; min-width: 0; }
.sl-field label { font-weight: 700; font-size: 1rem; }
.sl-field label small { font-weight: 400; color: var(--ink-2); font-size: var(--step-small); margin-left: 4px; }
.sl-field input[type="text"] { width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 0; color: var(--ink);
  background: var(--ground); border-bottom: 2px solid var(--ink); font-weight: 600; }
.sl-field input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sl-field-initial input { max-width: 6em; text-transform: uppercase; }
.sl-colour { display: flex; align-items: center; gap: 8px; }
.sl-colour input[type="color"] { width: 48px; height: 48px; flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.sl-colour input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.sl-colour input[type="color"]::-webkit-color-swatch { border: 0; }
.sl-colour input[type="text"] { max-width: 8.5em; text-transform: lowercase; }
.sl-colour-used { width: 48px; height: 48px; flex: none; }
.sl-field-note { margin: 0; font-size: var(--step-small); color: var(--ink-2); }
.sl-field-note.is-said { color: var(--ink); font-weight: 600; }
.sl-field-note.is-said::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; background: var(--crayon); }
.sl-shop-actions { margin: 0; grid-column: 1 / -1; }
.sl-shop-actions .btn:disabled { opacity: 0.4; cursor: default; }
/* the preview: the bar and the price as a customer of that workshop would see them */
.sl-shop-preview { --p-accent: #2f6b4f; padding: 8px; background: var(--tint); color: var(--ink); min-width: 0; }
.sl-p-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--paper); font-weight: 800; letter-spacing: -0.03em; }
.sl-p-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; background: var(--p-accent); color: #fff; font-size: 1rem; }
.sl-p-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.sl-p-btn { padding: 6px 12px; background: var(--p-accent); color: #fff; font-size: var(--step-small); font-weight: 700; letter-spacing: 0; }
.sl-p-body { padding: 20px 16px 16px; display: grid; gap: 12px; background: var(--ground); }
.sl-p-body p { margin: 0; }
.sl-p-piece { font-weight: 700; }
.sl-p-price { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; background: var(--ink); color: #fff; }
.sl-p-price strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; }
.sl-p-pack { display: grid; place-items: center; min-height: 48px; background: var(--p-accent); color: #fff; font-weight: 700; }
.sl-p-note { font-size: var(--step-small); color: var(--ink-2); }
.sl-shop-preview * { transition: background-color 200ms ease; }

/* what the shop gets: the claim, its list and its pictures */
.sl-gets { padding-block: clamp(64px, 8vw, 128px); background: var(--paper); }
.sl-gets-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 64px; align-items: start; }
@media (min-width: 1000px) { .sl-gets-in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sl-gets h2 { font-size: var(--step-head); margin: 0 0 32px; }
.sl-gets .sl-statement { margin-bottom: 64px; }
.sl-gets-list { list-style: none; margin: 0 0 64px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 48px; }
@media (min-width: 640px) { .sl-gets-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sl-gets-list h3 { font-size: 1.5rem; margin: 0 0 8px; }
.sl-gets-list p { margin: 0; }
.sl-gets-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin: 0; }
.sl-gets-pics { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sl-gets-pics img { width: 100%; height: 100%; object-fit: cover; background: var(--board); }
.sl-pic-a { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.sl-pic-b { grid-column: 2 / -1; aspect-ratio: 4 / 5; }
.sl-gets-pics figcaption { grid-column: 1 / -1; font-size: var(--step-small); color: var(--ink-2); margin-top: 8px; max-width: 48ch; }


.sl-store { padding-top: clamp(64px, 8vw, 128px); }
.sl-store-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 48px; margin-bottom: 32px; }
.sl-store h2 { font-size: var(--step-head); max-width: 14em; }
.sl-store p { margin: 0; }
.sl-rack { list-style: none; margin: 0 0 64px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .sl-rack { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sl-rack { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sl-rack a { display: grid; gap: 8px; text-decoration: none; font-weight: 700; color: var(--ink); }
.sl-rack img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--room); transition: transform 400ms var(--ease-out); }
.sl-rack span { padding-bottom: 4px; }
.sl-rack a:active img { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .sl-rack a:hover span { text-decoration: underline; } }
.sl-store-pic { width: 100%; height: clamp(280px, 52vw, 720px); object-fit: cover; object-position: 50% 60%; background: var(--board); }

/* ---------- the collection: the pieces in a rack ---------- */
.sl-page-head { padding-block: 16px clamp(32px, 5vw, 64px); }
.sl-page-head h1 { font-size: var(--step-display); max-width: 10em; }
.sl-page-head .sl-hero-head { padding-block: 8px 0; }
@media (min-width: 1000px) { .sl-page-head .sl-hero-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sl-pieces-wrap { padding-bottom: clamp(96px, 12vw, 160px); }
.sl-pieces { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sl-piece a { display: grid; grid-template-columns: minmax(0, 1fr); color: inherit; text-decoration: none; background: var(--paper); }
@media (min-width: 760px) { .sl-piece a { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sl-piece-pic { display: block; overflow: hidden; background: var(--room); aspect-ratio: 4 / 3; }
@media (min-width: 760px) { .sl-piece-pic { aspect-ratio: 16 / 9; } }
.sl-piece-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.sl-piece-text { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: clamp(20px, 3vw, 40px); }
.sl-piece-name { font-size: var(--step-head); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.sl-piece-name::after { content: "→"; margin-left: 0.18em; display: inline-block; transition: transform 240ms var(--ease-out); }
.sl-piece-line { max-width: 34ch; }
.sl-piece-range { font-weight: 700; }
.sl-piece a:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.sl-piece a:active .sl-piece-text { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .sl-piece a:hover .sl-piece-pic img { transform: scale(1.03); }
  .sl-piece a:hover .sl-piece-name::after { transform: translateX(6px); }
  .sl-piece a:hover { background: #fdf0c6; }
}
@media (prefers-reduced-motion: reduce) { .sl-piece a:hover .sl-piece-pic img { transform: none; } }

/* ---------- a product page's close ---------- */
.sl-more { padding-block: clamp(64px, 8vw, 128px); }
.sl-more-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px 64px; }
@media (min-width: 900px) { .sl-more-in { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.sl-more h2 { font-size: var(--step-head); margin-bottom: 16px; }
.sl-more-in { margin-bottom: 64px; align-items: end; }
.sl-more-in p { margin: 0; }
.sl-more-sub { margin: 0 0 16px; }
@media (min-width: 1200px) { .sl-rack-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sl-more p { font-size: var(--step-lead); max-width: 30em; }
.sl-404 { min-height: 50svh; }

/* ---------- the footer: the contact, the small print, the name cut by the edge ---------- */
.sl-foot { background: var(--night); color: #fff; overflow: hidden; padding-top: clamp(64px, 8vw, 128px); scroll-margin-top: 0; }
.sl-foot-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px 64px; padding-bottom: 64px; }
@media (min-width: 900px) { .sl-foot-in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sl-foot h2 { font-size: var(--step-display); max-width: 9em; margin-bottom: 24px; }
.sl-foot-lead { font-size: var(--step-lead); max-width: 30em; color: var(--rack-2); margin: 0; }
.sl-foot-who { margin: 0; display: grid; gap: 24px; align-content: start; }
.sl-foot-who dt { font-size: var(--step-small); color: var(--rack-2); margin-bottom: 4px; }
.sl-foot-who dd { margin: 0; }
.sl-email { font-size: clamp(1.375rem, 1rem + 1.4vw, 2.25rem) !important; font-weight: 800; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.sl-email a { color: var(--crayon); }
.sl-foot :focus-visible { outline-color: var(--crayon); }
.sl-foot-small { display: grid; gap: 8px; padding-bottom: 32px; font-size: var(--step-small); color: var(--rack-2); }
.sl-foot-small p { margin: 0; max-width: 90ch; }
.sl-foot-small strong { color: #fff; }
.sl-foot-demo::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; background: var(--crayon); }
.sl-foot-word { margin: 0 0 calc(-0.26 * clamp(6rem, 26vw, 26rem)); padding-inline: var(--gutter); font-size: clamp(6rem, 26vw, 26rem); font-weight: 900;
  letter-spacing: -0.07em; line-height: 0.8; white-space: nowrap; color: #4f7dbd; user-select: none; }
.sl-foot-word::before { content: attr(data-word); }

/* ---------- entrances (web/site.js marks what starts below the first screen; without it everything shows) ---------- */
.sl-in { opacity: 0; transform: translateY(24px); }
.sl-in.is-in { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .sl-in { transform: none; }
  .sl-in.is-in { transition: opacity 300ms ease; }
}

/* ---------- the first screen settles in once (CSS only: it shows without script; no travel when motion is reduced) ---------- */
@keyframes sl-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sl-fade { from { opacity: 0; } to { opacity: 1; } }
.sl-hero h1, .sl-page-head h1 { animation: sl-rise 700ms var(--ease-out) both; }
.sl-hero .sl-lead, .sl-page-head .sl-lead { animation: sl-rise 700ms var(--ease-out) 90ms both; }
.sl-hero .fc-stage { animation: sl-fade 900ms var(--ease-out) 160ms both; }
.sl-hero .fc-panel > * { animation: sl-rise 600ms var(--ease-out) both; }
.sl-hero .fc-panel > :nth-child(2) { animation-delay: 60ms; } .sl-hero .fc-panel > :nth-child(3) { animation-delay: 120ms; }
.sl-hero .fc-panel > :nth-child(4) { animation-delay: 180ms; } .sl-hero .fc-panel > :nth-child(5) { animation-delay: 240ms; }
.sl-hero .fc-panel > :nth-child(6) { animation-delay: 300ms; }
.sl-bar .sl-word, .sl-bar .sl-nav { animation: sl-fade 500ms ease both; }
.sl-pieces .sl-piece:nth-child(-n+2) { animation: sl-rise 700ms var(--ease-out) 160ms both; }
@media (prefers-reduced-motion: reduce) {
  .sl-hero h1, .sl-page-head h1, .sl-hero .sl-lead, .sl-page-head .sl-lead, .sl-hero .fc-panel > *, .sl-pieces .sl-piece:nth-child(-n+2) { animation-name: sl-fade; }
}

/* on a phone a statement stays a paragraph: set at the lead size it reads in three or four lines */
@media (max-width: 520px) { .sl-statement { font-size: var(--step-lead); } .sl-stage-name { font-size: var(--step-lead); } }

/* ---------- credits and licences ---------- */
.sl-credits { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-bottom: clamp(96px, 12vw, 160px); }
@media (min-width: 900px) { .sl-credits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sl-credit { padding: clamp(20px, 3vw, 40px); background: var(--paper); min-width: 0; }
.sl-credit:first-child { grid-column: 1 / -1; }
.sl-credit h2 { font-size: 1.5rem; letter-spacing: -0.035em; margin: 0 0 16px; }
.sl-credit p { max-width: 70ch; }
.sl-credit ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.sl-credit a { font-weight: 600; overflow-wrap: anywhere; }
.sl-credit code { font: inherit; font-weight: 600; }
