/* Paper, pen marks and real experiment images. No texture or font download. */
:root {
  --ink: #34414b;
  --muted: #626b72;
  --blue: #3d648e;
  --line: #d1d4d1;
  --soft-blue: #f0f4f7;
  --paper: #fffefb;
  --hand: "KaiTi", "STKaiti", "Kaiti SC", "Microsoft YaHei", sans-serif;
}
.notebook-home { background: #f2f1ec; background-image: radial-gradient(#c8c9c044 .7px, transparent .7px); background-size: 22px 22px; }
.site-header { background: #faf9f5; border-bottom-color: #d1d4cd; }
.desktop-nav a { text-underline-offset: 7px; }
.desktop-nav a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; }
.header-action { border: 1.3px solid #81909a; border-radius: 4px 9px 5px 8px / 8px 4px 9px 5px; background: #fffefb; }
.header-action:hover { background: #f0f4f7; }
#main { padding-top: 28px; overflow-x: clip; overflow-y: visible; }
.notebook-page { width: min(1280px, calc(100% - var(--gutter) * 2)); margin: 0 auto 52px; position: relative; }
.paper-surface { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid #c5cbc8; border-radius: 4px; box-shadow: 0 3px 12px #3d423308; transform-origin: 50% 0; backface-visibility: hidden; }
.has-page-turns .notebook-page { pointer-events: none; }
.has-page-turns .notebook-page:not(:last-child) { margin-bottom: calc(-1 * var(--page-available)); }
.has-page-turns .paper-surface { position: sticky; top: var(--page-sticky-top); min-height: var(--page-available); pointer-events: auto; }
.has-page-turns .notebook-page:last-child .paper-surface { position: relative; top: auto; }
.paper-surface.is-turned, .paper-surface.is-curling { visibility: hidden; pointer-events: none; }
.page-fold { position: absolute; left: 0; width: 100%; height: var(--page-available); perspective-origin: 50% 0; transform-origin: 50% 0; transform-style: preserve-3d; pointer-events: none; }
.page-strip { position: absolute; top: 0; left: 0; width: 100%; transform-origin: 50% 0; transform-style: preserve-3d; }
.page-strip-front, .page-strip-back { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; contain: paint; pointer-events: auto; }
.page-strip-front { background: var(--paper); }
.page-strip-front::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(121 118 106 / var(--shade-start, 0)), rgb(121 118 106 / var(--shade-end, 0))); }
.page-strip-back { transform: rotateX(180deg); background: #fcfaf3; border-inline: 1px solid #d7d5ca; }
.page-strip-back::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(121 118 106 / var(--shade-start, 0)), rgb(121 118 106 / var(--shade-end, 0))); }
.has-page-turns .page-print { position: absolute !important; left: 0; margin: 0; border-radius: 4px; transform: none !important; clip-path: none !important; opacity: 1 !important; visibility: visible !important; box-shadow: none; pointer-events: none; }
.fold-video-frame { position: relative; overflow: hidden; background: #fff; }
.fold-video-frame > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.page-fold-shadow { position: absolute; left: 2%; width: 96%; height: 76px; background: linear-gradient(180deg, #77746366, #77746318 35%, transparent); pointer-events: none; }
.notebook-page:last-child .closing-section { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.paper-running-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 48px; border-bottom: 1px solid #e3e4dd; color: #6e787c; font-size: 15px; }
.paper-running-head > span:first-child { font-family: var(--hand); font-size: 19px; letter-spacing: .06em; }
.paper-running-head > span:last-child { font-family: Consolas, monospace; font-size: 14px; }
.notebook-page .section-pad, .notebook-page .page-width { width: 100%; max-width: none; margin: 0; padding: 46px 48px 32px; }
.notebook-page .hero { padding-top: 42px; padding-bottom: 20px; }
.hero-intro { gap: 42px; margin-bottom: 34px; }
.hero h1 { font-family: var(--hand); font-size: clamp(52px, 5.2vw, 76px); font-weight: 600; line-height: 1.25; letter-spacing: -.03em; }
.ink-blue { position: relative; white-space: nowrap; }
.ink-blue::after { content: ''; position: absolute; left: 1%; right: 7%; bottom: -5px; height: 8px; border-bottom: 2px solid #7292ae; border-radius: 50%; transform: rotate(-2deg); }
.hero-description { font-family: var(--hand); font-size: 25px; line-height: 1.65; }
.hero-detail { font-size: 17px; }
.hero-actions { gap: 20px; margin-top: 24px; }
.eyebrow { font-family: var(--hand); font-size: 18px; }
.eyebrow-dot { width: 9px; height: 9px; border: 1.5px solid var(--blue); border-radius: 46% 54% 48% 52%; background: transparent; }
.button, .demo-button, .play-button, .reset-button, .slide-play { border-radius: 4px 10px 5px 8px / 9px 4px 10px 5px; }
.button-primary { color: #345b83; border: 1.5px solid #60788f; background: #f0f4f7; box-shadow: 3px 3px 0 #d8e0e6; font-weight: 600; }
.button-primary:hover { color: #244b74; background: #e5eef5; box-shadow: 2px 2px 0 #cbd7e1; transform: translateY(-1px); }
.text-link { text-decoration: underline; text-decoration-color: #a7b3bd; text-underline-offset: 7px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-color: var(--blue); }
.hero-experiment { border: 1.3px solid #8f9ba3; border-radius: 8px 4px 9px 5px / 5px 8px 4px 9px; box-shadow: none; background: #fff; }
.experiment-heading { padding: 16px 22px; background: #fff; border-bottom-color: #dce1e2; }
.experiment-label { font-family: var(--hand); font-size: 21px; font-weight: 600; }
.render-label { color: var(--muted); }
.experiment-body { grid-template-columns: 240px minmax(0, 1fr); }
.experiment-story { padding: 28px; background: #fafbf8; border-right: 1px dashed #c9d2d7; }
.story-kicker { font-family: var(--hand); font-size: 28px; }
.experiment-facts strong { font-family: var(--hand); font-size: 31px; }
.actual-render { max-height: 420px; }
.experiment-controls { border-top: 1px solid #dce1e2; padding: 12px 20px; gap: 20px; }
.play-button { background: #fff; border: 1px solid #8e9eac; color: #405b74; }
.play-button:hover, .reset-button:hover { background: #f2f5f7; }
.reset-button { border-color: #aebbc4; }
.wave-control input { accent-color: #58748e; }
.hero-caption { margin-top: 15px; font-size: 15px; }
.hero-caption p { font-family: var(--hand); font-size: 18px; }
.notebook-page .possibilities { width: calc(100% - 96px); margin: 22px 48px 0; padding: 24px 0 28px; gap: 24px; border-top: 1px dashed #c8cecd; border-bottom: 0; }
.possibility { gap: 14px; }
.possibility + .possibility { border-left: 0; padding-left: 14px; }
.possibility-number { border: 1px solid #a6b3ba; width: 28px; height: 28px; flex-shrink: 0; border-radius: 48% 52% 44% 56%; display: grid; place-items: center; padding: 0; margin-top: 4px; }
.possibility h2 { font-family: var(--hand); font-size: 25px; }
.possibility p { font-size: 16px; margin-top: 7px; }
.section-heading { margin-bottom: 32px; }
.heading-row { gap: 26px; margin-top: 20px; }
.heading-row h2, .classroom-copy h2 { font-family: var(--hand); font-size: clamp(34px, 3.6vw, 50px); font-weight: 600; line-height: 1.42; letter-spacing: -.025em; }
.heading-row > p { font-size: 17px; }
.section-index { font-family: var(--hand); font-size: 21px; border: 0; padding-right: 4px; }
.muted-heading { color: #677681; }
.build-workbench { grid-template-columns: 280px minmax(0, 1fr); border-color: #a5b0b5; border-radius: 5px 9px 4px 8px / 8px 4px 9px 5px; }
.build-sidebar { background: #f9faf6; padding: 24px 18px; border-right: 1px dashed #c9d2d7; }
.build-tab { padding: 17px 10px; gap: 10px; border-radius: 4px 8px 5px 9px; }
.build-tab strong { font-family: var(--hand); font-size: 23px; font-weight: 600; }
.build-tab small { margin-top: 5px; font-size: 15px; }
.build-tab.active { background: #fff; border-color: #9caebc; box-shadow: 2px 2px 0 #e4e9e9; }
.build-tab:hover { background: #f0f4f6; }
.build-ingredients { padding: 20px 10px; margin-top: 14px; border-top-style: dashed; }
.build-sidebar > .text-link { padding-inline: 10px; font-size: 15px; }
.diagram-mode { background: none; border-bottom: 1px solid #b8c3c9; border-radius: 0; padding: 2px 0; }
.diagram-heading { padding-inline: 22px; }
.diagram-bottom { padding-inline: 22px; gap: 14px; }
.diagram-state { font-family: var(--hand); font-size: 17px; }
.demo-button { border-color: #99aab8; font-size: 15px; }
.build-footnote { margin-top: 22px; }
.build-footnote strong { font-family: var(--hand); font-size: 27px; border-bottom: 2px solid #a1b6c6; }
.notebook-page .explore-section { background: transparent; border: 0; }
.experiment-grid { gap: 24px; }
.experiment-card { position: relative; border: 1px solid #b0babe; border-radius: 5px 10px 6px 9px / 9px 4px 10px 5px; background: #fff; box-shadow: 2px 3px 0 #e9e9e1; }
.experiment-card:hover { border-color: #6f879c; box-shadow: 3px 5px 0 #e1e6e7; transform: translateY(-3px); }
.card-header { padding: 20px 24px 6px; font-family: var(--hand); font-size: 21px; }
.card-arrow { background: transparent; border: 1px solid #b8c1c8; border-radius: 47% 53% 50% 45%; font-family: var(--hand); }
.experiment-card:hover .card-arrow { background: #f1f5f7; }
.card-art { height: 240px; padding: 8px 18px; }
.card-caption { padding: 18px 24px 24px; }
.card-caption h3 { font-family: var(--hand); font-size: 26px; font-weight: 600; }
.card-caption p { font-size: 16px; }
.subjects-line { gap: 18px; }
.notebook-page .classroom-section { gap: 40px; padding-block: 60px; }
.classroom-description { font-size: 17px; }
.format-tabs { border-color: #bbc3c7; background: #f7f8f4; border-radius: 5px 8px 4px 7px; }
.format-tabs button { border-radius: 3px 7px 4px 6px; padding-inline: 12px; }
.format-tabs button.active { border-color: #9cb0bd; box-shadow: 1px 2px 0 #e1e6e8; }
.presentation-paper { border-color: #a3afb7; border-radius: 5px 9px 4px 7px; box-shadow: 4px 5px 0 #e7e9e3; }
.slide-top { background: #fafbf7; border-bottom-style: dashed; }
.presentation-paper h3 { font-family: var(--hand); font-size: 25px; }
.slide-play { background: #fff; border: 1px solid #9eafbd; }
.slide-progress { background: #e7edf1; }
.presentation-caption { font-family: var(--hand); font-size: 18px; }
.notebook-page .closing-section { padding: 80px 48px; background: transparent; border-radius: 0; }
.closing-section h2 { font-family: var(--hand); font-size: clamp(38px, 4vw, 56px); }
.closing-section h2 span { color: var(--blue); }
.paper-bottom { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 48px; padding: 22px 26px 26px 0; border-top: 1px dashed #cbd0cd; color: var(--muted); font-size: 15px; }
.paper-bottom > a { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; font-family: var(--hand); font-size: 20px; color: #486988; }
.paper-bottom > a:hover { color: #234b73; }
.paper-bottom svg { width: 36px; height: 24px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.site-footer { border-top: 0; padding-top: 4px; padding-bottom: 34px; }
.site-footer .brand small { font-family: var(--hand); font-size: 17px; }
.js-motion .notebook-page .reveal { opacity: 1; transform: none; transition: none; }
.journey-caption { top: -42px; font-family: var(--hand); font-size: 17px; }
.journey-caption-label { display: block; line-height: 1.4; white-space: nowrap; }
.journey-caption-page { display: block; margin-top: 4px; color: #5f7484; font-family: Consolas, monospace; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.journey-label, .journey-ending-label { background: #fffefb; border-radius: 4px 8px 3px 7px; }
.journey-mark { box-shadow: 0 0 0 5px #f2f1ec; }
.journey-toggle { background: #fffefb; }
#scene-dialog { background: #fffefb; border-color: #9daeb9; border-radius: 6px 9px 5px 8px; }
#scene-dialog::backdrop { background: #eeeedece; }
@media (max-width: 1100px) {
  .paper-running-head { padding-inline: 36px; }
  .notebook-page .section-pad, .notebook-page .page-width { padding-inline: 36px; }
  .notebook-page .possibilities { width: calc(100% - 72px); margin-inline: 36px; padding-inline: 0; }
  .paper-bottom { margin-inline: 36px; }
  .hero h1 { font-size: 56px; }
  .hero-description { font-size: 23px; }
  .hero-detail { font-size: 16px; }
  .hero-actions { gap: 16px; }
  .experiment-body { grid-template-columns: 210px minmax(0, 1fr); }
  .experiment-story { padding: 24px 20px; }
  .story-kicker { font-size: 25px; }
  .build-workbench { grid-template-columns: 260px minmax(0, 1fr); }
  .build-sidebar { padding-inline: 14px; }
  .build-tab strong { font-size: 21px; }
  .card-art { height: 210px; }
  .card-caption h3 { font-size: 24px; }
  .notebook-page .classroom-section { gap: 30px; }
  .format-tabs button { padding-inline: 8px; }
  .slide-top, .slide-bottom { padding-inline: 18px; }
}
@media (max-width: 900px) {
  .hero h1 { font-size: clamp(46px, 8vw, 64px); }
  .hero-intro { gap: 24px; }
  .notebook-page .possibilities { padding-top: 8px; padding-bottom: 8px; }
  .possibility + .possibility { padding-left: 0; border-top: 1px dashed #d3d8d4; }
  .build-workbench { grid-template-columns: 1fr; }
  .build-sidebar { padding: 24px; border-right: 0; border-bottom: 1px dashed #c9d2d7; }
  .build-tab strong { font-size: 23px; }
  .card-art { height: 190px; }
  .card-caption { padding-inline: 20px; }
  .card-caption h3 { font-size: 23px; }
  .notebook-page .classroom-section { padding-block: 46px; }
  .format-tabs button { padding-inline: 16px; }
  .notebook-page .closing-section { padding-block: 64px; }
}
@media (min-width: 901px) and (max-width: 1000px) {
  .hero h1 { font-size: 52px; }
}
@media (max-width: 600px) {
  #main { padding-top: 18px; }
  .notebook-page { margin-bottom: 32px; }
  .paper-surface { box-shadow: 0 2px 8px #3d423308; }
  .paper-running-head { padding: 14px 18px; gap: 14px; }
  .paper-running-head > span:first-child { font-size: 18px; }
  .notebook-page .section-pad, .notebook-page .page-width { padding: 30px 18px 24px; }
  .hero h1 { font-size: clamp(34px, 10vw, 50px); }
  .hero .eyebrow, .eyebrow { font-size: 17px; }
  .hero-description { font-size: 23px; }
  .hero-detail { font-size: 16px; }
  .hero-actions { gap: 16px; }
  .hero-actions .button { padding-inline: 14px; gap: 12px; }
  .hero-actions .text-link { font-size: 15px; }
  .hero-intro { margin-bottom: 28px; }
  .hero-caption { gap: 10px; font-size: 14px; }
  .hero-caption p { font-size: 17px; }
  .experiment-body { display: flex; }
  .experiment-heading { padding: 14px; }
  .experiment-label { font-size: 20px; }
  .experiment-story { padding: 18px; border-right: 0; }
  .story-kicker { font-size: 26px; }
  .experiment-controls { padding: 10px; gap: 10px; }
  .experiment-facts { gap: 18px; }
  .experiment-facts strong { font-size: 28px; }
  .playback-note { max-width: 76px; font-size: 14px; }
  .notebook-page .possibilities { width: calc(100% - 36px); margin: 4px 18px 0; padding: 0; }
  .possibility { gap: 16px; padding-block: 20px; }
  .possibility h2 { font-size: 24px; }
  .possibility p { font-size: 16px; }
  .heading-row h2, .classroom-copy h2 { font-size: clamp(29px, 7.4vw, 38px); }
  .heading-row > p { font-size: 16px; }
  .build-sidebar { padding: 20px 12px; }
  .workbench-caption { padding-inline: 8px; }
  .build-tab { padding: 15px 8px; }
  .build-tab strong { font-size: 23px; }
  .build-ingredients { padding-inline: 8px; }
  .diagram-heading, .diagram-bottom { padding-inline: 14px; }
  .diagram-mode { font-size: 14px; }
  .diagram-state { font-size: 17px; }
  .build-footnote { justify-content: flex-start; font-size: 15px; }
  .card-header { padding: 18px 18px 6px; }
  .card-art { height: auto; padding: 6px 8px; }
  .card-caption { padding: 14px 18px 22px; }
  .card-caption h3 { font-size: 24px; }
  .card-caption p { font-size: 15px; }
  .subjects-line { font-size: 15px; }
  .notebook-page .classroom-section { padding-block: 30px; }
  .format-tabs button { padding-inline: 4px; font-size: 14px; }
  .presentation-paper h3 { font-size: 24px; }
  .slide-bottom { flex-wrap: wrap; }
  .notebook-page .closing-section { padding-block: 48px; }
  .closing-section h2 { font-size: 35px; }
  .paper-bottom { margin-inline: 18px; padding: 18px 18px 22px 0; gap: 12px; flex-wrap: wrap; font-size: 14px; }
  .paper-bottom > a { font-size: 19px; gap: 10px; }
  .paper-bottom svg { width: 30px; }
  .has-journey .apple-journey { background: #fffefb; }
}
@media (max-width: 370px) {
  .notebook-page .section-pad, .notebook-page .page-width { padding-inline: 14px; }
  .paper-running-head { padding-inline: 14px; }
  .hero h1 { font-size: 34px; }
  .play-label { display: none; }
  .play-button { width: 44px; }
  .experiment-facts { gap: 16px; }
  .playback-note { max-width: 60px; }
  .build-tab strong { font-size: 21px; }
  .format-tabs { padding: 3px; }
  .format-tabs button { font-size: 14px; padding-inline: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .paper-surface { transform: none !important; }
  .page-fold, .page-fold-shadow { display: none; }
}

/* Small pen sketches belong to the paper margins, outside the experiment media. */
.chapter-doodle { display: flex; align-items: center; gap: 16px; max-width: 380px; margin: 20px 0 0; color: #60798b; pointer-events: none; }
.chapter-doodle > svg { display: block; flex-shrink: 0; width: 142px; height: 90px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.chapter-doodle .doodle-wash { fill: #edf3f5; stroke: none; }
.chapter-doodle .doodle-wash-warm { fill: #f7f1df; }
.chapter-doodle .doodle-faint { stroke: #9aaeba; stroke-width: 1.25; }
.chapter-doodle .doodle-dash { stroke: #91a6b3; stroke-width: 1.3; stroke-dasharray: 3 5; }
.chapter-doodle figcaption { margin: 0; font-family: var(--hand); font-size: 20px; line-height: 1.55; color: #5f7686; transform: rotate(-3deg); }
.doodle-observe { margin-top: 18px; }
.doodle-observe > svg { width: 124px; height: 82px; }
.heading-notes { min-width: 0; }
.heading-notes .chapter-doodle { margin-top: 16px; }
.heading-row:has(.heading-notes) { align-items: center; }
.doodle-explore > svg { width: 138px; height: 86px; }
.doodle-share { margin-top: 24px; }
.doodle-share > svg { width: 146px; height: 94px; }
.doodle-discover { display: block; max-width: none; margin: 0 0 20px; }
.doodle-discover > svg { width: 220px; height: 116px; margin: auto; }
.build-footnote strong { border: 1px solid #9aaebb; border-radius: 48% 52% 46% 54% / 52% 45% 55% 48%; padding: 0 9px; transform: rotate(-3deg); }
.paper-running-head > span:last-child { position: relative; }
.paper-running-head > span:last-child::after { content: ''; position: absolute; inset: -6px -11px; border: 1px solid #c0ccd0; border-radius: 47% 53% 44% 56% / 52% 44% 56% 48%; transform: rotate(-4deg); pointer-events: none; }
@media (max-width: 1100px), (max-height: 600px) {
  .journey-caption { top: 17px; display: flex; align-items: center; gap: 12px; }
  .journey-caption-page { margin-top: 0; }
}
@media (max-width: 900px) {
  .heading-row:has(.heading-notes) { align-items: flex-start; }
}
@media (max-width: 600px) {
  .chapter-doodle { max-width: 100%; gap: 12px; margin-top: 18px; }
  .chapter-doodle > svg { width: 112px; height: 78px; }
  .chapter-doodle figcaption { font-size: 18px; }
  .doodle-observe > svg { width: 96px; height: 72px; }
  .doodle-discover { margin-top: 0; margin-bottom: 18px; }
  .doodle-discover > svg { width: 190px; height: 108px; }
}
@media (max-width: 370px) {
  .chapter-doodle { gap: 8px; }
  .chapter-doodle > svg { width: 94px; height: 72px; }
  .chapter-doodle figcaption { font-size: 17px; }
  .doodle-discover > svg { width: 178px; height: 100px; }
}
@media (max-height: 500px) {
  .journey-caption { display: none; }
}
