/* Rust Design case: four to five screens. Loaded after x/base.css (typefaces, the site's dark values) and
   rd.css (the path bar, the passport, the live construction block). Every colour here is one of base.css's six
   (--paper, --panel, --ink, --muted, --line, --accent), except: the approved mark and the sketches' own three colours,
   the two marks of a drawing, a miss and a hit, which are set in the drawings themselves, and the wiki window, which keeps the wiki's own theme. No picture has a sheet of its
   own: drawings are inline SVG and take their ink from the page (--ink, --muted, --line, --paper).
   Each part: a heading with a short paragraph, then its pictures in one dense row. */
.cs{--note:448px;--cg:112px}

/* ---------- The head of the case ---------- */
.cs-hero{padding:56px var(--wide) 0}
.cs-hero>.w-eyebrow{margin-bottom:22px;color:var(--muted)}
.cs-hero h1{margin-left:-.055em;font-size:clamp(64px,10vw,152px);line-height:.84;font-weight:600;letter-spacing:-.065em}
.cs-lead{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,var(--note));column-gap:var(--cg);align-items:start;margin-top:40px}
.cs-lead>p{max-width:24em;font-size:28px;line-height:1.24;letter-spacing:-.035em}
.cs-pass>div{grid-template-columns:120px minmax(0,1fr)}
.cs-role{max-width:none;margin-top:36px}

/* ---------- A part ---------- */
.cs-part{padding:112px var(--wide) 0}
.cs-part-n{margin-bottom:12px;color:var(--accent);font:11px/1.4 var(--mono);letter-spacing:.07em;text-transform:uppercase}
.cs-head h2{margin-left:-.05em;font-size:clamp(48px,6vw,96px);line-height:.9;font-weight:600;letter-spacing:-.06em}
.cs-head>p{margin-top:24px;max-width:30em;font-size:18px;line-height:1.45;letter-spacing:-.01em}
.cs-head-wide{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,560px);column-gap:var(--cg);align-items:end;padding-bottom:32px;margin-bottom:48px;border-bottom:1px solid var(--line)}
.cs-head-wide>p{margin:0}
.cs-step-n{margin-bottom:16px;color:var(--muted);font:11px/1.4 var(--mono);letter-spacing:.07em;text-transform:uppercase}
.cs h3{font-size:24px;line-height:1.1;font-weight:600;letter-spacing:-.035em}
.cs article>p,.cs-approved-text>p{margin-top:12px;color:var(--muted);font-size:15px;line-height:1.55}

/* The mark: heading on the left, the three sketches on the right */
.cs-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,780px);column-gap:56px;align-items:start;padding-bottom:48px;border-bottom:1px solid var(--line)}
.cs-picks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;list-style:none}
.cs-picks li{display:flex;flex-direction:column;min-width:0}
.cs-art{display:block;aspect-ratio:1;padding:12%;box-shadow:inset 0 0 0 1px var(--line);color:var(--ink)}
.cs-sk{width:100%;height:100%}
.cs-picks b{margin-top:12px;font-size:15px;line-height:1.3;font-weight:500;letter-spacing:-.015em}
.cs-picks span{margin-top:4px;color:var(--muted);font-size:13px;line-height:1.45}

/* The approved mark and its live construction, side by side */
.cs-approved{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,860px);column-gap:56px;align-items:start;padding:48px 0}
.cs-approved h3{font-size:36px;line-height:1;letter-spacing:-.045em}
.cs-icon{display:grid;width:200px;margin-top:32px;color:var(--ink)}
.cs-icon>*{grid-area:1/1;width:100%;height:auto}
/* Three versions of the marks, one switch for the block (case.js sets data-marks on the section). Colour is what the
   HTML shows by itself. Mono: one ink of the page, no plate. Grid: outlines and faint fills over a grid; for the
   sketches the grid is their 256 field in equal steps, for the approved mark the kit's unit grid. The versions share
   one box, so the switch moves nothing. */
.cs-defs{position:absolute}
.cs-ver{max-width:320px;margin-top:28px}
.cs-sk .g,.cs-icon>svg{visibility:hidden}
.cs-sk .g,.v-grid .g{fill:none;stroke:currentColor;stroke-opacity:.22;stroke-width:1px;vector-effect:non-scaling-stroke}
[data-marks=mono] .cs-sk .t{fill:none}
[data-marks=mono] .cs-sk .f{fill:currentColor}
[data-marks=mono] .cs-sk .s{stroke:currentColor}
[data-marks=grid] .cs-sk .g{visibility:visible}
[data-marks=grid] .cs-sk .t,.v-grid .t{fill:none;stroke:var(--muted);stroke-width:1px}
[data-marks=grid] .cs-sk .f,.v-grid .f{fill:currentColor;fill-opacity:.14;stroke:currentColor;stroke-width:1.2px;vector-effect:non-scaling-stroke}
[data-marks=grid] .cs-sk .s{stroke:currentColor;stroke-opacity:.35}
[data-marks=mono] .cs-icon>img,[data-marks=grid] .cs-icon>img{visibility:hidden}
[data-marks=mono] .cs-icon>.v-mono,[data-marks=grid] .cs-icon>.v-grid{visibility:visible}
.cs-live{padding:0}
/* All six captions stay in place on every step (the others stand back): the block and the page keep one height. */
.cs .xp-steps[data-live] .mk-cap p{opacity:1}
@media(min-width:901px){.cs .mk-cap{padding:6px 16px 6px 0}.cs .mk-cap b{font-size:18px}.cs .xp-steps>li{grid-template-columns:64px minmax(0,1fr)}}

/* After approval: one dense band of four */
.cs-band{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.cs-fig{min-width:0}
.cs-fig img{display:block;width:100%;height:auto}
.cs-fig figcaption{margin-top:10px;color:var(--muted);font-size:13px;line-height:1.45}
.cs-fig figcaption b{display:block;margin-bottom:2px;color:var(--ink);font-size:15px;font-weight:500;letter-spacing:-.015em}
.cs-sizes{display:flex;align-items:center;justify-content:center;gap:8px;aspect-ratio:5/4;padding:8px}
.cs-sizes>div{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:10px;height:122px}
.cs-fig .cs-sizes img{width:auto;image-rendering:pixelated}
.cs-sizes small,.cs-app small{color:var(--muted);font:11px/1 var(--mono);letter-spacing:.04em}
/* The one-colour marks: the kit's own renders used as a mask, painted with the page's ink */
.cs-mono{display:block;background:currentColor;-webkit-mask:center/100% 100% no-repeat;mask:center/100% 100% no-repeat;image-rendering:pixelated}
/* Four appearances of the icon, each with its caption as page text */
.cs-app{display:grid;grid-template-columns:repeat(2,28%);justify-content:center;align-content:center;gap:8px 24px;aspect-ratio:5/4}
.cs-app>div{min-width:0}
.cs-fig .cs-app img{border-radius:2.5%}
.cs-app small{display:block;margin-top:6px;line-height:1.3;letter-spacing:0}
/* Before-and-after drawings: no sheet, the ink of the page; the parts of the mark are three strengths of it */
.cs-draw{display:block;width:100%;height:auto;color:var(--ink)}
.cs-draw text{font-family:var(--sans);font-variant-numeric:tabular-nums}
.cs-draw .d-grid{fill:none;stroke:currentColor;stroke-opacity:.12}
.cs-draw .d-frame{fill:none;stroke:var(--line)}
.cs-draw .d-g{fill:currentColor;fill-opacity:.72}
.cs-draw .d-l{fill:currentColor;fill-opacity:.46}
.cs-draw .d-b{fill:currentColor;fill-opacity:.24}
.cs-draw .d-m{fill:var(--muted)}
.cs-draw .d-h{paint-order:stroke;stroke:var(--paper);stroke-width:7px;stroke-linejoin:round}
.cs-line{border:1px solid var(--line)}

/* Nothing invented */
.cs-cols3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px;margin-bottom:56px}
.cs-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px}
.cs-three figcaption{margin-top:6px;font-size:12px}
/* What changes on the way: three examples in one row */
.cs-way{margin-bottom:0}
.cs-way .cs-fig{margin-top:20px}
/* One picture, two states. Without JS both stand one under the other; with it they share one cell. */
.cs-swap-keys{display:flex;margin-top:20px;border:1px solid var(--line)}
.cs-swap-keys .xp-btn{flex:1;min-height:44px;padding:0 8px;border:0;color:var(--muted);font-size:11px;letter-spacing:.04em;text-transform:uppercase}
.cs-swap-keys .xp-btn+.xp-btn{border-left:1px solid var(--line)}
.cs-swap-keys .xp-btn:hover{color:var(--ink)}
.cs-swap-keys .xp-btn[aria-pressed=true]{background:var(--accent);color:var(--paper)}
.cs-swap .cs-fig+.cs-fig{margin-top:14px}
.cs-swap[data-live] .cs-swap-panes{display:grid}
.cs-swap[data-live] .cs-fig{grid-area:1/1;margin-top:12px}
.cs-swap[data-live] .cs-fig[data-off]{visibility:hidden}
.cs-swap[data-live] figcaption b{display:none}
/* The import report, set here in the page's mono face: the editor's own codes and wording, not a screenshot. */
.cs-report{border:1px solid var(--line);background:var(--panel);font:11px/1.55 var(--mono)}
.cs-report-head{padding:9px 12px 8px;border-bottom:1px solid var(--line);color:var(--muted);letter-spacing:.07em;text-transform:uppercase}
.cs-report ol{list-style:none}
.cs-report li{display:grid;grid-template-columns:38px minmax(0,1fr);column-gap:10px;padding:9px 12px}
.cs-report li+li{border-top:1px solid var(--line)}
.cs-report i{color:var(--muted);font-style:normal}
.cs-report .is-error i{color:var(--accent)}
.cs-report b{display:block;color:var(--ink);font-weight:400}
.cs-report span{display:block;color:var(--muted);overflow-wrap:anywhere}
.cs-report .cs-report-on{color:var(--ink)}

/* One wiki: a cut-down English copy of the home page of the real Rust Design wiki (a Starlight site), in a window that
   scrolls inside. Everything inside the frame is the wiki's own, taken from its build and its theme (rust.css): the header,
   the navigator, «In this article», the title bar, the cards, the colours, sizes and spacing. Its faces are Bebas Neue,
   Open Sans and Roboto Condensed, cut to Latin (assets/wiki, licences beside them). The window is an exhibit: it keeps the
   wiki's dark theme whatever the page does, only the frame is the page's token. It answers its own width the way the wiki
   answers the viewport: three columns from 1152px, navigator and the bar from 800px, one column below. The navigator
   scrolls with the page here (in the wiki it stays put). Nothing in it is a link or a field. */
@font-face{font-family:'RD Bebas';src:url('assets/wiki/BebasNeue-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'RD Open Sans';src:url('assets/wiki/OpenSans-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'RD Open Sans';src:url('assets/wiki/OpenSans-SemiBold.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:'RD Open Sans';src:url('assets/wiki/OpenSans-Bold.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:'RD Roboto Condensed';src:url('assets/wiki/RobotoCondensed-Bold.woff2') format('woff2');font-weight:700;font-display:swap}
.wk{--wk-page:#151413;--wk-section:#1f1f1f;--wk-card:#272524;--wk-line:#363230;--wk-hair:#221f1d;--wk-bar:rgba(12,11,11,.94);--wk-key:#33302d;
  --wk-title:#e4dad1;--wk-text:#bab1a8;--wk-muted:#8a827a;--wk-red:#cd412b;
  --wk-head:'RD Bebas',Impact,'Arial Narrow',sans-serif;--wk-body:'RD Open Sans',Arial,sans-serif;--wk-ui:'RD Roboto Condensed','Arial Narrow',sans-serif;
  container:wk/inline-size;height:480px;overflow-y:scroll;border:1px solid var(--line);background:var(--wk-page);color:var(--wk-text);font:400 16px/24px var(--wk-body);letter-spacing:0;scrollbar-width:thin;scrollbar-color:var(--wk-muted) transparent}
.wk:focus-visible{outline-offset:3px}
/* The lower edge fades: there is more below. */
.wk::after{content:'';position:sticky;bottom:0;z-index:1;display:block;height:56px;margin-top:-56px;background:linear-gradient(transparent,var(--wk-page));pointer-events:none}
.wk-defs{position:absolute;width:0;height:0}
.wk svg{flex:none;fill:currentColor}
/* header: logo block, search, the way back to the editor */
.wk-head{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:32px;height:56px;padding:0 32px;border-bottom:1px solid var(--wk-hair);background:var(--wk-bar);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.wk-logo{display:flex;flex:none;align-items:center;gap:10px}
.wk-logo .wk-mark{display:block;flex-shrink:0;position:relative;top:-1.5px;width:auto;height:30px}
.wk-logo b{padding-top:2px;color:var(--wk-title);font:400 26px/1 var(--wk-head);letter-spacing:.03em}
.wk-logo small{padding:4px 6px;border:1px solid var(--wk-line);color:var(--wk-muted);font:700 12px/1 var(--wk-ui);letter-spacing:.08em;text-transform:uppercase}
.wk-search{display:flex;flex:0 1 320px;align-items:center;gap:8px;min-width:0;height:40px;margin-left:auto;padding:0 8px 0 12px;background:#1d1b1a;box-shadow:inset 0 0 0 1px var(--wk-line);color:var(--wk-muted);font:400 14px/1 var(--wk-body);white-space:nowrap}
.wk-search svg{width:14px;height:14px}
.wk-search kbd{margin-left:auto;padding:3px 7px;border-radius:2px;background:var(--wk-key);color:var(--wk-title);font:600 13px/1 var(--wk-body)}
.wk-editor{flex:none;padding:9px 14px 8px;background:var(--wk-red);color:#fff;font:400 18px/1 var(--wk-head);letter-spacing:.05em;white-space:nowrap}
.wk-menu{display:none;flex:none;align-items:center;justify-content:center;width:32px;height:32px;margin-left:52px;background:var(--wk-section);box-shadow:inset 0 0 0 1px var(--wk-line);color:var(--wk-title)}
.wk-menu svg,.wk-bar svg{width:16px;height:16px}
/* «In this article» as a bar under the header: the wiki shows it when there is no room for the right column */
.wk-bar{display:none;position:sticky;top:55px;z-index:2;align-items:center;height:49px;margin-top:-1px;padding:0 16px;border-top:1px solid var(--wk-line);border-bottom:1px solid #0c0b0b;background:var(--wk-bar);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.wk-bar span{display:flex;align-items:center;gap:16px;height:34px;padding:0 8px 0 12px;border:1px solid var(--wk-line);background:var(--wk-section);color:var(--wk-title);font:700 12px/1 var(--wk-ui);letter-spacing:.08em;text-transform:uppercase}
.wk-frame{display:grid;grid-template-columns:264px calc(760px + (100% - 1288px)/2) minmax(0,1fr)}
/* left navigator: the game's side menu */
.wk-nav{padding:16px 31px 24px 16px;border-right:1px solid var(--wk-hair)}
.wk-nav p,.wk-toc p{color:var(--wk-muted);font:700 12px/22px var(--wk-ui);letter-spacing:.08em;text-transform:uppercase}
.wk-nav p{padding-bottom:8px}
.wk-nav ul,.wk-toc ul{list-style:none}
.wk-nav ul+p{margin-top:20px}
.wk-nav li{padding:8px 12px 7px;background:rgba(255,255,255,.035);font:700 13px/18px var(--wk-ui);letter-spacing:.06em;text-transform:uppercase}
.wk-nav li+li{margin-top:2px}
.wk-nav .on{background:var(--wk-red);color:#fff}
.wk-main{min-width:0;padding:32px 32px 51px}
/* page title: the game's header bar */
.wk-title{padding:24px 24px 24px 21px;border-left:3px solid var(--wk-red);background:linear-gradient(90deg,rgba(39,37,36,.95),rgba(39,37,36,.55) 45%,rgba(39,37,36,0))}
.wk-h1{color:var(--wk-title);font:400 56px/52px var(--wk-head);letter-spacing:.01em}
.wk-lead{max-width:640px;margin-top:16px;color:var(--wk-title);font-size:18px;line-height:28px}
.wk-md{margin-top:24px}
.wk-md>*+*{margin-top:16px}
.cs .wk h3{margin:48px 0 0;color:var(--wk-title);font:400 36px/36px var(--wk-head);letter-spacing:.01em}
.wk-md h3+*{margin-top:16px}
.wk-md>p b,.wk-md li b{color:var(--wk-title);font-weight:700}
.wk-a{color:var(--wk-title);text-decoration:underline 1px var(--wk-red);text-underline-offset:3px}
.wk-md ul,.wk-md ol{padding-left:40px}
.wk-md li+li{margin-top:4px}
.wk-md li::marker{color:var(--wk-red)}
.wk code{margin:-2px 0;padding:3px 6px;border-radius:2px;background:var(--wk-key);color:var(--wk-title);font:600 .8125em/1 var(--wk-body)}
.wk-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.wk-cards div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:24px;border-top:3px solid transparent;background:var(--wk-card)}
.wk-cards b{color:var(--wk-title);font:400 30px/30px var(--wk-head);letter-spacing:.01em}
.wk-cards svg{width:21.33px;height:21.33px;color:var(--wk-red)}
.wk-cards p{grid-column:1;font-size:14px;line-height:21px}
.wk-next{display:flex;flex-direction:row-reverse;align-items:center;justify-content:end;gap:8px;margin-top:96px;padding:16px 24px;background:var(--wk-section);text-align:end}
.wk-next svg{width:24px;height:24px}
.wk-next b{display:block;color:var(--wk-title);font:400 24px/25px var(--wk-head);letter-spacing:.02em}
/* «In this article»: the right column */
.wk-toc{border-left:1px solid var(--wk-hair)}
.wk-toc>div{position:sticky;top:56px;padding:32px 24px}
.wk-toc p{margin-bottom:16px;line-height:16px}
.wk-toc ul{border-left:1px solid var(--wk-line)}
.wk-toc li{margin-left:-1px;padding:6px 0 6px 14px;border-left:2px solid transparent;font-size:14px;line-height:20px}
@container wk (max-width:1151px){
  .wk-frame{grid-template-columns:264px minmax(0,1fr);margin-top:-48px}
  .wk-toc{display:none}
  .wk-bar{display:flex;margin-left:264px}
  .wk-main{padding-top:80px}
  .wk-main>*{max-width:760px;margin-inline:auto}
}
@container wk (max-width:799px){
  .wk-head{gap:16px;padding:0 16px}
  .wk-logo small,.wk-editor,.wk-nav,.wk-search span,.wk-search kbd{display:none}
  .wk-search{flex:none;justify-content:center;width:44px;padding:0}
  .wk-menu{display:flex}
  .wk-bar{margin-left:0}
  .wk-frame{grid-template-columns:minmax(0,1fr);margin-top:0}
  .wk-main{padding:32px 16px 51px}
  .wk-cards{grid-template-columns:minmax(0,1fr)}
}
@container wk (max-width:640px){
  .wk-title{padding:16px 16px 16px 13px}
  .wk-h1{font-size:44px;line-height:42px}
  .wk-lead{font-size:16px;line-height:24px}
}

.cs-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:80px;margin-top:96px;padding:0 var(--wide);border-top:1px solid var(--line)}

@media(max-width:1200px){
  .cs{--note:360px;--cg:56px}
  .cs-top,.cs-approved{grid-template-columns:minmax(0,1fr)}
  .cs-picks{margin-top:32px}
  .cs-band{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .cs-hero{padding-top:40px}
  .cs-hero>.w-eyebrow{margin-bottom:18px}
  .cs-lead{grid-template-columns:minmax(0,1fr);row-gap:32px;margin-top:28px}
  .cs-lead>p{font-size:22px;line-height:1.28;letter-spacing:-.03em}
  .cs-pass>div{grid-template-columns:104px minmax(0,1fr)}
  .cs-role{margin-top:28px}
  .cs-part{padding-top:88px}
  .cs-head h2{font-size:clamp(44px,13vw,64px)}
  .cs-head>p{font-size:16px}
  .cs-head-wide{grid-template-columns:minmax(0,1fr);row-gap:20px;padding-bottom:24px;margin-bottom:36px}
  .cs-picks{grid-template-columns:minmax(0,1fr);gap:28px}
  .cs-art{max-width:240px}
  .cs-approved{padding:36px 0}
  .cs-approved h3{font-size:30px}
  .cs-icon{width:140px;margin:24px 0 32px}
  .cs-band,.cs-cols3{grid-template-columns:minmax(0,1fr);gap:36px}
  .wk{height:62vh;max-height:520px}
  .cs-foot{margin-top:72px}
}

/* Blocks come in as they enter the screen: from clear and blurred to sharp, once. case.js puts .rv only on what is
   below the first screen and takes both classes off when the move is over, so nothing keeps a filter. Only opacity,
   filter and transform move: no box changes its size or place. Without JS, with prefers-reduced-motion and in print
   everything is simply there. */
.rv{opacity:0;filter:blur(10px);transform:translateY(12px);will-change:opacity,filter,transform}
/* The fade is slower than the focus: a block stays half-clear for a while, so the coming-in is seen */
.rv.rv-in{opacity:1;filter:blur(0);transform:none;transition:opacity 1.1s cubic-bezier(.45,0,.3,1) var(--rv-d,0ms),filter .8s cubic-bezier(.3,0,.3,1) var(--rv-d,0ms),transform .8s cubic-bezier(.22,1,.36,1) var(--rv-d,0ms)}
.cs-foot.rv{transform:none}
@media(prefers-reduced-motion:reduce){.rv{opacity:1;filter:none;transform:none}}
@media print{.rv{opacity:1!important;filter:none!important;transform:none!important}}
