:root {
  color-scheme: light;
  color: #171717;
  background: white;
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  scroll-behavior: smooth;
  --quiet: #626262;
  --serif: "Times New Roman", "Songti SC", "Noto Serif CJK SC", serif;
}
* { box-sizing: border-box; }
body { width: min(85%, 1320px); margin: auto; }
h1, h2, p, figure, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
a:hover { text-decoration: underline; text-underline-offset: .25em; }
img { display: block; }
.skip { position: fixed; top: -5rem; left: 1rem; z-index: 1; padding: .6em; background: white; }
.skip:not(:focus) { clip-path: inset(50%); }
.skip:focus { top: 1rem; }
header, nav, footer { display: flex; align-items: center; }
header { min-height: 72px; justify-content: flex-end; }
nav { gap: clamp(20px, 3vw, 40px); }
nav a { padding-block: .65rem; font: 18px var(--serif); }
nav span { font: .85em system-ui, sans-serif; }
.hero, .process-head { display: grid; grid-template-columns: minmax(0, 43fr) minmax(0, 57fr); }
.hero { align-items: center; padding: 6px 0 clamp(28px, 2.7vw, 48px); }
.intro { padding-right: 1.5rem; }
h1 { font: italic 400 clamp(52px, 6.15vw, 101px)/1 var(--serif); letter-spacing: -.055em; }
.intro p { margin-top: 14px; font-size: clamp(15px, 1.35vw, 22px); letter-spacing: .035em; }
.cta { display: inline-flex; align-items: center; gap: .45em; margin-top: clamp(38px, 4.2vw, 66px); padding: 6px 0; font-size: 15px; }
.cta:hover { color: var(--quiet); text-decoration: none; }
figure a { display: block; cursor: zoom-in; }
figure img { width: 100%; height: auto; }
figcaption { color: var(--quiet); font-size: 13px; line-height: 1.6; }
.plate figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; }
#process { border-top: 1px solid #c9c9c9; padding-top: clamp(28px, 3vw, 50px); scroll-margin-top: 18px; }
.process-head { align-items: center; gap: 0; }
h2 { font: 500 clamp(28px, 2.55vw, 42px)/1.25 var(--serif); }
.process-head p { font-size: 14px; line-height: 1.7; color: var(--quiet); margin: 8px 24px 0 0; }
.steps { display: flex; list-style: none; justify-content: space-between; padding: 0; }
.steps a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; font-size: 16px; color: var(--quiet); }
.steps a:hover, .steps a[aria-current] { color: #111; text-decoration: none; }
.steps a::after { content: ""; position: absolute; bottom: 5px; height: 1px; inset-inline: 5px; background: currentColor; opacity: 0; }
.steps a[aria-current]::after, .steps a:hover::after { opacity: 1; }
.workspace { width: min(78%, 980px); margin: clamp(24px, 2.5vw, 42px) auto 0; }
.workspace img { border-radius: 6px; }
.workspace figcaption { margin-top: 10px; }
footer { flex-wrap: wrap; gap: 28px; padding-block: clamp(38px, 4vw, 64px) 26px; color: var(--quiet); font-size: 13px; }
footer a { padding-block: 6px; }
@media (max-width: 880px) {
  body { width: 90%; }
  h1 { font-size: clamp(48px, 6.7vw, 60px); }
  .workspace { width: 90%; }
}
@media (max-width: 680px) {
  body { width: auto; margin-inline: 6vw; }
  header { min-height: 58px; }
  nav a { font-size: 16px; }
  .hero, .process-head { grid-template-columns: 1fr; }
  .hero { padding-top: 30px; gap: 28px; }
  .intro { padding-right: 0; }
  h1 { font-size: clamp(55px, 12vw, 78px); }
  .intro p { margin-top: 10px; font-size: 15px; }
  .cta { margin-top: 15px; font-size: 14px; }
  .plate figcaption, .workspace figcaption { font-size: 12px; }
  .process-head p { margin-right: 0; }
  .steps { margin-top: 14px; }
  .steps a { font-size: 14px; }
  .workspace { width: 100%; margin-top: 13px; }
  footer { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

/* Select the matching plate, steps and screenshot as a single example. */
main:has(#example-mosaic:checked) [data-example="m31"],
main:not(:has(#example-mosaic:checked)) [data-example="mosaic"] { display: none; }
.example-heading, .examples { display: flex; align-items: center; }
.example-heading { flex-wrap: wrap; gap: 4px 24px; }
.examples { border: 0; padding: 0; margin: 0; gap: 16px; }
.examples label { position: relative; cursor: pointer; color: var(--quiet); font-size: 14px; }
.examples input { position: absolute; opacity: 0; }
.examples span { display: inline-flex; align-items: center; min-height: 44px; }
.examples input:checked + span, .examples label:hover span {
  color: #111; text-decoration: underline; text-underline-offset: 6px;
}
.examples input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 2px; }

.plate .finish-link { cursor: pointer; text-decoration: underline; text-underline-offset: .25em; }
.plate figcaption { flex-wrap: wrap; }
.workspace [hidden] { display: none; }
.workspace.full-image img { max-height: 72vh; object-fit: contain; }
.compare-image { position: relative; overflow: hidden; border-radius: 6px; background: #111; }
.compare-image img { width: 100%; height: auto; border-radius: 0; }
.compare-image .before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.before-label, .after-label { position: absolute; top: 10px; padding: 3px 8px; font-size: 12px; color: white; background: #111b; }
.before-label { left: 10px; }
.after-label { right: 10px; }
.divider { position: absolute; inset-block: 0; left: var(--split); width: 2px; transform: translateX(-50%); background: white; }
.divider::after { content: '↔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); border-radius: 50%; width: 30px; line-height: 30px; text-align: center; background: white; color: #171717; }
.split { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-image:focus-within { outline: 2px solid currentColor; outline-offset: 3px; }
.finish-stages { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 6px; }
.finish-stages button { background: none; border: 0; padding: 0 2px; min-height: 44px; font: inherit; font-size: 14px; color: var(--quiet); cursor: pointer; }
.finish-stages button[aria-pressed="true"], .finish-stages button:hover { color: #111; text-decoration: underline; text-underline-offset: 6px; }
.recipe { font-size: 14px; line-height: 1.7; }
.recipe-detail { display: flex; align-items: center; gap: 12px; }
.recipe-detail .curve-plot { width: min(28%, 140px); height: auto; border-radius: 0; }
