/* Rust Design page, its own parts: the header on the page grid, the status with its dot, the passport and the role
   of the first screen, and the block "How the mark is built". The page itself is laid out by case.css.
   Loaded after base.css, which holds the typefaces and the six colours. */
/* The page grid: the gutter on each side, 1680 px at most, in the middle of wider windows. */
.rd{--wide:max(var(--gut),calc((100% - 1680px)/2))}

/* The header (x-bar of base.css): the way in to the section on the left, the portfolio on the right. */
.rd-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;height:56px;padding:0 var(--wide)}

/* The status with its dot. */
.rd-status{position:relative;display:flex;align-items:center;gap:9px;font:11px/1.4 var(--mono);letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}
.rd-status::before{content:'';flex:none;width:8px;height:8px;border-radius:50%;background:var(--accent)}
/* The status dot breathes: a ring of the same colour leaves it every two seconds. Only transform and opacity move,
   so the text beside it stays. With prefers-reduced-motion base.css stops the animation and the ring is not seen. */
.rd-status::after{content:'';position:absolute;left:0;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:var(--accent);opacity:0;pointer-events:none;animation:rd-pulse 2s cubic-bezier(.22,1,.36,1) infinite}
@keyframes rd-pulse{0%{transform:scale(1);opacity:.6}70%,100%{transform:scale(3.25);opacity:0}}

/* ---------- The role and the passport ---------- */
.rd-role{grid-column:1;display:grid;grid-template-columns:120px minmax(0,1fr);align-items:baseline;max-width:765px;margin-top:52px;padding-top:16px;border-top:1px solid var(--line)}
.rd-role p{font-size:16px;line-height:1.5}
.rd-label{color:var(--muted);font:10px/1.5 var(--mono);font-weight:400;letter-spacing:.07em;text-transform:uppercase}
.rd-pass>div{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:baseline;padding:13px 0 14px;border-top:1px solid var(--line)}
.rd-pass dd{font-size:19px;line-height:1.25;font-weight:500;letter-spacing:-.02em}
.rd-pass>div:last-child{border-bottom:1px solid var(--line)}

/* ---------- How the mark is built ----------
   The drawing has no paper of its own: its grid, lines
   and fills take the page's ink, and it grows with the block. Beside it stand all six steps at once, one row each: the column is filled by the build itself,
   and the row of the step on the drawing is lit. Nothing is dragged.
   The drawing is one square on every step and every caption keeps its room, so a change of step moves nothing. */
.rd-mark{padding:0 var(--wide) 128px}
.rd .xp-block{border:1px solid var(--line)}
.rd .xp-block-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:18px 12px 18px 20px}
.rd .xp-block-head h3{margin:0;font-size:21px;line-height:1.2;font-weight:500;letter-spacing:-.03em}
.rd .xp-block-head p{max-width:62ch;margin-top:6px;color:var(--muted);font-size:14px;line-height:1.5}
.mk-play{appearance:none;-webkit-appearance:none;flex:none;display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:-10px;padding:0 10px;border:0;border-radius:0;background:none;color:var(--muted);font:11px/1 var(--mono);letter-spacing:.07em;text-transform:uppercase;cursor:pointer;touch-action:manipulation}
.mk-play:hover{color:var(--ink)}
.mk-play svg{flex:none;width:14px;height:14px}
.rd .xp-mark{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
.rd .xp-mark-art{align-self:center;aspect-ratio:1;color:var(--ink)}
.rd .xp-mark-art svg{width:100%;height:100%}
.xp-mark-art text{font-family:Space,sans-serif;stroke:var(--paper)}
.xp-mark-art .mk-f4{fill:color-mix(in srgb,var(--ink) 42%,var(--paper))}
.xp-mark-art .mk-f5{fill:color-mix(in srgb,var(--ink) 26%,var(--paper))}
.rd .xp-steps{display:grid;grid-template-rows:repeat(6,minmax(min-content,1fr));min-width:0;list-style:none}
.rd .xp-steps>li{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;min-width:0}
.rd .xp-steps>li+li{border-top:1px solid var(--line)}
.rd .xp-steps[data-live]>li{cursor:pointer}
.rd .xp-steps .xp-btn{justify-self:center;width:44px;height:44px;padding:0;border:0;color:var(--muted);font-size:13px}
.rd .xp-steps .xp-btn:hover{color:var(--ink)}
.rd .xp-steps .xp-btn[aria-current]{background:var(--accent);color:var(--paper)}
.mk-cap{position:relative;min-width:0;padding:12px 20px 12px 0}
.mk-cap small{display:block;color:var(--muted);font:10px/1.8 var(--mono);letter-spacing:.07em;text-transform:uppercase}
.mk-cap b{display:block;font-size:21px;line-height:1.2;font-weight:500;letter-spacing:-.03em}
.mk-cap p{margin-top:4px;color:var(--muted);font-size:14px;line-height:1.45}
/* With JS: the row of the current step is lit, the others stand back; "Step n of 6" shows on the current row only. */
.rd .xp-steps[data-live] .mk-cap small{position:absolute;right:20px;top:12px;color:var(--accent);visibility:hidden}
.rd .xp-steps[data-live] .mk-cap b{color:var(--muted)}
.rd .xp-steps[data-live] .mk-cap p{opacity:.72}
.rd .xp-steps[data-live]>li.is-current .mk-cap small{visibility:visible}
.rd .xp-steps[data-live]>li.is-current .mk-cap b{color:var(--ink)}
.rd .xp-steps[data-live]>li.is-current .mk-cap p{color:var(--ink);opacity:1}
/* Without JS the step buttons are not shown: every caption keeps its own column, and "Step n of 6" stands in the
   corner of its row as it does with JS, so the block is the same height. */
.rd .xp-steps:not([data-live]) .mk-cap{grid-column:2}
.rd .xp-steps:not([data-live]) .mk-cap small{position:absolute;right:20px;top:12px}

@media(max-width:900px){
  .rd-pass>div{grid-template-columns:104px minmax(0,1fr)}
  .rd-pass dd{font-size:17px}
  .rd-role{grid-template-columns:minmax(0,1fr);row-gap:6px;margin-top:40px}
  .rd-role p{font-size:15px}
  .rd-mark{padding:0 var(--gut) 72px}
  .rd .xp-mark{grid-template-columns:minmax(0,1fr)}
  .rd .xp-block-head{padding:14px 4px 14px 14px}
  /* A phone shows one caption at a time: the six numbers in a row under the drawing, the caption of the step below. */
  .rd .xp-steps{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:auto auto;padding:6px 6px 14px}
  .rd .xp-steps>li{display:contents}
  .rd .xp-steps .xp-btn{grid-row:1;width:100%;height:48px}
  .mk-cap{grid-area:2/1/3/7;padding:10px 8px 0}
  .rd .xp-steps[data-live] .mk-cap{visibility:hidden}
  .rd .xp-steps[data-live]>li.is-current .mk-cap{visibility:visible}
  .rd .xp-steps[data-live] .mk-cap small{position:static}
  .rd .xp-steps:not([data-live]) .mk-cap{grid-area:auto;grid-column:1/-1}
  .rd .xp-steps:not([data-live]) .mk-cap small{position:static}
}
