/* Same paper-and-ink look as the console, fonts self-hosted. */
@font-face { font-family: "Fraunces"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --paper: #f4f0e8;
  --panel: #faf7f1;
  --ink: #1d1b17;
  --ink-2: #55503f;
  --ink-3: #8a8371;
  --rule: #d9d2c0;
  --rule-2: #c3bba5;
  --accent: #c2391a;
  --accent-ink: #fffaf3;
  --r: 3px;
  --serif: "Fraunces", "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans: "Instrument Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151410; --panel: #1b1a14; --ink: #efeadd; --ink-2: #b8b09b; --ink-3: #7d7663;
    --rule: #2e2b21; --rule-2: #413d2f; --accent: #ee6a47; --accent-ink: #1a1007;
  }
  figure img { filter: brightness(0.92); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--rule-2); }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
b { font-weight: 600; }
code { font: 13px/1.5 var(--mono); background: var(--panel); border: 1px solid var(--rule); padding: 1px 5px; border-radius: var(--r); word-break: break-all; }

/* language: both texts are in the page, one is shown */
html[data-lang="zh"] .en, html[data-lang="en"] .zh { display: none !important; }

.mast { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.mast-in { max-width: 880px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 58px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 600 22px/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.wordmark i { font-style: normal; color: var(--accent); }
.mast-in { gap: 14px; }
.mast-link { margin-left: auto; margin-right: 16px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.lang { font-size: 14px; color: var(--rule-2); }
.lang button { border: 0; background: none; padding: 4px 2px; color: var(--ink-3); cursor: pointer; font: inherit; }
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.lang span { margin: 0 6px; }

.page { max-width: 880px; margin: 0 auto; padding: 40px 20px 72px; }
.eyebrow { color: var(--ink-3); font-size: 14px; margin: 0 0 10px; }
h1 { font: 500 clamp(28px, 5vw, 42px)/1.15 var(--serif); letter-spacing: -0.02em; margin: 0; }
h1 em { font-style: italic; color: var(--accent); }
html[data-lang="zh"] h1 { letter-spacing: 0; line-height: 1.3; }
html[data-lang="zh"] h1 em { font-style: normal; }
.lead { color: var(--ink-2); margin: 14px 0 0; max-width: 56ch; }

h2 { font: 500 22px/1.25 var(--serif); letter-spacing: -0.01em; margin: 0 0 14px; }
html[data-lang="zh"] h2 { letter-spacing: 0; }
h3 { font: 600 17px/1.35 var(--sans); margin: 0 0 8px; }
p { margin: 0 0 10px; }
.hint { font-size: 14px; color: var(--ink-3); }

.need, .block { margin-top: 40px; }
.plain { margin: 0; padding: 0; list-style: none; }
.plain li { padding: 12px 0; border-top: 1px solid var(--rule); }
.plain li:last-child { border-bottom: 1px solid var(--rule); }
.url { display: block; margin-top: 8px; padding: 9px 12px; }
.url i { font-style: normal; color: var(--ink-3); }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--rule); margin: 44px 0 6px; flex-wrap: wrap; position: sticky; top: 58px; background: var(--paper); z-index: 5; }
.tabs button { border: 0; background: none; padding: 12px 0 10px; color: var(--ink-3); font: 500 16px/1 var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps > li { counter-increment: s; position: relative; padding: 26px 0 26px 56px; border-bottom: 1px solid var(--rule); }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 22px; font: 500 34px/1 var(--serif); color: var(--accent); width: 40px; }
.steps figure { margin: 14px 0 0; }
.steps img { display: block; width: 100%; height: auto; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--panel); }

.walk { margin: 22px 0 6px; padding-bottom: 22px; border-bottom: 1px solid var(--rule); }
.walk video { display: block; width: 100%; max-width: 296px; height: auto; border: 1px solid var(--rule-2); border-radius: 18px; background: #000; }
.walk.wide video { max-width: 760px; border-radius: 10px; }
.walk figcaption { font-size: 14px; color: var(--ink-3); margin-top: 10px; max-width: 56ch; }
.shots { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 0; }
.shots img { width: calc(50% - 6px); max-width: 260px; height: auto; border: 1px solid var(--rule-2); border-radius: 14px; background: var(--panel); }
.copyline { display: block; margin: 0 0 4px; padding: 9px 12px; font-size: 12.5px; user-select: all; }
.dl { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border: 1px solid var(--ink); border-radius: var(--r); font-weight: 600; text-decoration: none; color: var(--ink); background: none; transition: background 0.12s, color 0.12s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dl .alt { align-self: center; font-size: 14px; color: var(--ink-3); }
.files .alt { font-size: 13px; color: var(--ink-3); }
.btn small { font-weight: 400; opacity: 0.75; font-size: 13px; }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.files code { font-size: 11.5px; border: 0; background: none; padding: 0; color: var(--ink-3); }

.foot { border-top: 1px solid var(--rule); }
.foot-in { max-width: 880px; margin: 0 auto; padding: 22px 20px 40px; color: var(--ink-3); font-size: 14px; }
.foot-in span:first-child { font: 600 16px/1 var(--serif); color: var(--ink); margin-right: 8px; }
.foot-in i { font-style: normal; color: var(--accent); }

@media (max-width: 560px) {
  .steps > li { padding-left: 40px; }
  .steps > li::before { font-size: 28px; width: 30px; }
  .btn { width: 100%; justify-content: space-between; }
  .tabs { gap: 18px; }
}
@media print {
  .mast, .tabs, .lang { display: none; }
  .pane[hidden] { display: block !important; }
}
