/* The workings article: Stepdrum's sheet (products/stepdrum/site.css, loaded first, gives the
   tokens, the header and footer, and the drum's parts) set as a long read. One column of text;
   the figures are plates of the app's near-black stage, a little wider than the text. */

.article-head { max-width: 760px; margin-inline: auto; padding-block: 48px 40px; }
.article-head h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -0.022em; margin: 20px 0 0; }
:lang(zh-Hans) .article-head h1 { line-height: 1.3; letter-spacing: 0; }
.article-head .lead { margin-top: 28px; max-width: none; font-size: clamp(19px, 2vw, 24px); }
.byline { margin-top: 24px; font-size: 14px; color: var(--soft); }
.byline a { text-decoration-color: var(--ruby); text-underline-offset: 3px; }

.prose { max-width: 680px; margin-inline: auto; padding-bottom: 32px; }
.prose > * + * { margin-top: 20px; }
.prose p, .prose li { color: var(--soft); font-size: 17px; line-height: 1.75; }
:lang(zh-Hans) .prose p, :lang(zh-Hans) .prose li { font-size: 17px; line-height: 1.85; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration-color: var(--ruby); text-underline-offset: 3px; }
.prose h2 { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--rule); font-size: clamp(26px, 3vw, 34px); }
.prose h2 + * { margin-top: 18px; }
.prose > h2:first-child { margin-top: 8px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--ruby); }
/* a sum worked on paper: figures in Garamond, lined up by place */
.sum {
  margin-block: 28px;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sheet);
  background: var(--paper-deep);
  font-family: var(--garamond);
  font-size: 21px;
  line-height: 1.6;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
  width: max-content;
  min-width: 9em;
  max-width: 100%;
  overflow-x: auto;
}
.sum div { display: flex; justify-content: flex-end; gap: 0.6em; white-space: nowrap; }
.sum .sum-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.sum .gone { color: var(--ruby); }
.sum-note { font-size: 14px !important; color: var(--faint) !important; margin-top: -12px !important; }

/* a figure: the stage's near-black, the drum on it, the crank and buttons under it */
.fig { margin: 40px auto; max-width: 760px; }
.fig-plate {
  color: var(--table-ink);
  padding: 20px 20px 18px;
  border-radius: 4px;
  background:
    radial-gradient(90% 120% at 50% -20%, oklch(100% 0 0 / 0.07), transparent 60%),
    linear-gradient(180deg, var(--table), var(--table-deep));
  -webkit-user-select: none;
  user-select: none;
}
.fig-machine { display: block; width: 100%; max-width: var(--w); height: auto; margin-inline: auto; overflow: visible; }
.fig-machine text { font-family: var(--sans); text-anchor: middle; font-variant-numeric: tabular-nums lining-nums; }
.fig-machine text.sd-start { text-anchor: start; }
.fig-machine .sd-layer { font-size: 15px; }
.fig-machine .sd-word { font-size: 12px; }
.fig-lever { fill: oklch(100% 0 0 / 0.1); stroke: oklch(100% 0 0 / 0.22); stroke-width: 1; transition: fill 120ms linear; }
.fig-lever[data-on] { fill: var(--lamp); stroke: var(--lamp); }
.fig-desk { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; }
.fig-crank { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-height: 44px; font-size: 13px; color: var(--table-faint); }
.fig-crank input { flex: 1; min-width: 120px; accent-color: var(--lamp); height: 44px; margin: 0; cursor: pointer; }
.fig-crank input:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; border-radius: var(--r-pill); }
.fig-crank input[data-refused] { animation: knock 220ms linear; }
.fig-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.fig-buttons .pill { min-width: 0; padding: 0 16px; font-size: 14px; }
.fig-buttons .pill:focus-visible { outline-color: var(--lamp); border-radius: var(--r-pill); }
.fig-reading { width: 100%; font-family: var(--garamond); font-size: 18px; line-height: 1.4; font-variant-numeric: tabular-nums lining-nums; color: var(--table-ink); }
main:not([data-live]) .fig-desk { display: none; }
.fig figcaption { max-width: 640px; margin-inline: auto; }

.closing { max-width: 680px; margin: 56px auto 0; padding-top: 28px; border-top: 1px solid var(--rule); }
.closing p { font-size: 15px; color: var(--soft); }
.closing .to-app { font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink); }
:lang(zh-Hans) .closing .to-app { font-weight: 700; }
.closing > * + * { margin-top: 14px; }
.closing .to-app { margin-top: 32px; }
.closing .to-app a { text-decoration-color: var(--ruby); text-underline-offset: 4px; }
.sources { max-width: 680px; margin: 40px auto 96px; font-size: 14px; color: var(--soft); }
.sources h2 { font-size: 20px; }
.sources ol { list-style: decimal; padding-left: 22px; margin-top: 12px; }
.sources li + li { margin-top: 6px; }
.sources a { text-decoration-color: var(--line); word-break: break-word; }

@media (max-width: 760px) {
  .article-head { padding-block: 24px 28px; }
  .prose p, .prose li { font-size: 16px; }
  .fig { margin-inline: -20px; }
  .fig-plate { border-radius: 0; padding: 16px 12px 14px; }
  .fig figcaption { padding-inline: 20px; }
  .sum { font-size: 17px; padding: 14px 14px; }
}
