/* ---------- The home page below the opening ----------
   The opening's seven strokes carry on down the page as one painted spine:
   each chapter is cut from its own bar's image, in the bar's own proportions,
   and its bristles lie over the end of the chapter before. The words are the
   same as ever; only the cards and the sidebar have gone. */
.layout:not(.sub) { display: block; max-width: none; padding: 0; margin-top: clamp(3rem, 7vw, 6rem); }
.layout:not(.sub) .prose.flow { display: block; }
.layout:not(.sub) { --u: .22px; --lead: calc(132 * var(--u) + 1.25rem); }
@media (min-width: 760px) { .layout:not(.sub) { --u: .085vw; --lead: calc(132 * var(--u) + clamp(2.5rem, 6vw, 6.5rem)); } }

.layout:not(.sub) .flow-col:first-child > .group-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.layout:not(.sub) .flow-col:first-child .section {
  position: relative; margin: 0; background: none; box-shadow: none; border-radius: 0;
  min-height: clamp(19rem, 32vw, 30rem);
  padding: clamp(3rem, 6vw, 6rem) clamp(var(--gutter), 4vw, 3.5rem) clamp(3rem, 6vw, 6rem) var(--lead);
  scroll-margin-top: 4rem;
}
.layout:not(.sub) .flow-col:first-child .section::before {
  content: ""; position: absolute; left: 0; top: -2.75rem; bottom: 0;
  width: calc(132 * var(--u));
  /* --sy enlarges the image past its empty top, so the bristles start at the
     element's edge however tall the chapter is, and no gap opens above them. */
  background: var(--bar) calc(var(--x) * var(--u) * var(--squeeze, 1) * -1) 100% / calc(1024 * var(--u) * var(--squeeze, 1)) var(--sy) no-repeat;
  pointer-events: none;
}
#start { --x: 0; --squeeze: 1; --sy: 116.58%; --bar: url(/img/opening/bar-1.webp); }
#adding { --x: 132; --squeeze: 1; --sy: 126.05%; --bar: url(/img/opening/bar-2.webp); }
#writing { --x: 264; --squeeze: 1; --sy: 113.92%; --bar: url(/img/opening/bar-3.webp); }
#kits { --x: 396; --squeeze: 0.569; --sy: 108.04%; --bar: url(/img/opening/bar-4.webp); }
#backups { --x: 628; --squeeze: 1; --sy: 116.58%; --bar: url(/img/opening/bar-5.webp); }
#sharing { --x: 760; --squeeze: 1; --sy: 124.65%; --bar: url(/img/opening/bar-6.webp); }
#library { --x: 892; --squeeze: 1; --sy: 112.08%; --bar: url(/img/opening/bar-7.webp); }
.layout:not(.sub) .flow-col:first-child .section > * { position: relative; }

/* Headings speak in the opening's voice, language by language. */
.layout:not(.sub) .section h2 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; line-height: 1.14;
  font-size: clamp(2.1rem, 4.5vw, 4.1rem); margin: 0 0 1.2rem; text-wrap: balance;
}
.layout:not(.sub) .section h2 a { color: inherit; text-decoration: none; }
.layout:not(.sub) :lang(zh-Hant).section h2, :lang(zh-Hant) .layout:not(.sub) .section h2 { font-family: "Songti TC", "Noto Serif TC", var(--serif); }
:lang(zh-Hans) .layout:not(.sub) .section h2 { font-family: "Songti SC", "Noto Serif SC", var(--serif); }
:lang(ja) .layout:not(.sub) .section h2 { font-family: "Hiragino Mincho ProN", "Noto Serif JP", var(--serif); }
:lang(ko) .layout:not(.sub) .section h2 { font-family: "AppleMyungjo", "Noto Serif KR", var(--serif); }
.layout:not(.sub) .flow-col:first-child .section p,
.layout:not(.sub) .flow-col:first-child .section li { font-size: clamp(1.06rem, 1.35vw, 1.22rem); line-height: 1.7; }
.layout:not(.sub) .section .more a { color: var(--accent-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .layout:not(.sub) .section .more a { color: var(--accent); } }
:root[data-theme="dark"] .layout:not(.sub) .section .more a { color: var(--accent); }

@media (min-width: 1000px) {
  .layout:not(.sub) .flow-col:first-child .section {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2.5rem, 5vw, 6rem); align-content: start;
  }
  .layout:not(.sub) .flow-col:first-child .section > * { grid-column: 2; }
  .layout:not(.sub) .flow-col:first-child .section > h2 { grid-column: 1; grid-row: 1 / span 12; margin: 0; }
  .layout:not(.sub) .flow-col:first-child .section > p:first-of-type,
  .layout:not(.sub) .flow-col:first-child .section > ol:first-of-type { margin-top: .5rem; }
}

/* The rest is the colophon: same type, no paint. */
.layout:not(.sub) .flow-col:last-child {
  display: grid; gap: clamp(2.5rem, 5vw, 5rem) clamp(2.5rem, 6vw, 7rem);
  padding: clamp(4rem, 8vw, 8rem) clamp(var(--gutter), 4vw, 3.5rem) 2rem;
}
@media (min-width: 900px) { .layout:not(.sub) .flow-col:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.layout:not(.sub) .flow-col:last-child > .group-label {
  grid-column: 1 / -1; margin: 0; text-transform: none; letter-spacing: -.01em; color: var(--ink);
  font: 700 clamp(2.5rem, 6.2vw, 5.4rem)/1.12 var(--serif);
}
:lang(zh-Hant) .layout:not(.sub) .flow-col:last-child > .group-label { font-family: "Songti TC", "Noto Serif TC", var(--serif); }
:lang(zh-Hans) .layout:not(.sub) .flow-col:last-child > .group-label { font-family: "Songti SC", "Noto Serif SC", var(--serif); }
:lang(ja) .layout:not(.sub) .flow-col:last-child > .group-label { font-family: "Hiragino Mincho ProN", "Noto Serif JP", var(--serif); }
:lang(ko) .layout:not(.sub) .flow-col:last-child > .group-label { font-family: "AppleMyungjo", "Noto Serif KR", var(--serif); }
.layout:not(.sub) .flow-col:last-child .section { margin: 0; padding: 1.4rem 0 0; background: none; box-shadow: none; border-radius: 0; border-top: .5px solid var(--hairline); scroll-margin-top: 5rem; }
.layout:not(.sub) .flow-col:last-child #cameras { grid-column: 1 / -1; }
.layout:not(.sub) .flow-col:last-child #cameras > p { max-width: 58rem; }
.layout:not(.sub) .flow-col:last-child .section h2 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); margin-bottom: .8rem; }

/* The demonstration stands on the wall like the headline, not in a spotlight. */
.intro.demo::before { display: none; }
.intro.demo .intro-head, .intro.demo .intro-foot { text-align: left; }
.intro.demo .display { font-size: clamp(2.5rem, 6.2vw, 5.4rem); line-height: 1.12; margin-bottom: clamp(1.5rem, 3vw, 2.8rem); }
/* In the dark the post is a dark post, so the share card is the one piece of paper. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot { background: var(--surface); color: var(--ink); color-scheme: dark; box-shadow: 0 0 0 .5px var(--hairline); } }
:root[data-theme="dark"] .shot { background: var(--surface); color: var(--ink); color-scheme: dark; box-shadow: 0 0 0 .5px var(--hairline); }
