:root {
  --chassis: #1c1e1d;
  --field: #111312;
  --field-2: #151817;
  --surface: #242827;
  --surface-2: #303533;
  --surface-3: #3c4440;
  --paper: #f0f2e9;
  --text: #edf0e8;
  --muted: #b7c0b9;
  --quiet: #89958e;
  --dim: #5d6a63;
  --rule: #3f4944;
  --yellow: #e9ef58;
  --cyan: #58bac3;
  --magenta: #ce7caf;
  --orange: #d99765;
  --green: #8dbf95;
  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --display: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
/* Long unbreakable tokens (an email address, a format name) must not push a
   grid or flex track wider than the viewport on narrow screens. */
p, li, summary, h1, h2, h3, figcaption, code { overflow-wrap: anywhere; }
html { background: var(--field); color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--field); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.65; text-rendering: optimizeLegibility; }
html[lang="zh-CN"] body, html[lang="ja"] body { line-break: strict; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, summary:focus-visible, .button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-weight: 500; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 50; padding: .65rem .9rem; background: var(--yellow); color: var(--field); font-weight: 700; }
.skip-link:focus { top: 1rem; }

.site-header { width: min(100% - (var(--gutter) * 2), var(--max)); min-height: 4.5rem; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; letter-spacing: 0; font-family: var(--display); font-size: .78rem; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; background: var(--yellow); color: var(--field); font-size: .95rem; letter-spacing: 0; }
.site-nav { display: flex; align-items: center; gap: 1.35rem; justify-content: center; font-size: .82rem; color: var(--muted); }
.site-nav a, .language-link, .footer-bottom a { text-decoration: none; transition: color 140ms ease; }
.site-nav a:hover, .site-nav a[aria-current="page"], .language-link:hover, .language-link.is-current, .footer-bottom a:hover { color: var(--yellow); }
.language-switcher { display: flex; gap: .65rem; align-items: center; justify-content: end; font-family: var(--display); font-size: .64rem; letter-spacing: 0; white-space: nowrap; }
.language-link { color: var(--quiet); padding: .2rem 0; }
.language-link + .language-link { border-left: 1px solid var(--rule); padding-left: .65rem; }

.section-wrap { width: min(100% - (var(--gutter) * 2), var(--max)); margin-inline: auto; }
.hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--rule); background: #090a09; }
.hero-copy { width: min(100% - (var(--gutter) * 2), var(--max)); margin-inline: auto; }
.hero-product { width: min(100% - (var(--gutter) * 2), var(--max)); margin: clamp(2.5rem, 5vw, 4rem) auto 0; background: #090a09; }
.hero-product img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border: 1px solid var(--surface-3); background: #090a09; }
.hero-product figcaption { margin-top: .7rem; color: var(--quiet); font-family: var(--display); font-size: .58rem; letter-spacing: 0; }
.eyebrow { color: var(--quiet); font-family: var(--display); font-size: .66rem; line-height: 1.4; letter-spacing: 0; text-transform: uppercase; }
.signal-dot { display: inline-block; width: .46rem; height: .46rem; margin-right: .55rem; background: var(--yellow); vertical-align: .05rem; }
.hero h1 { max-width: 13em; margin-top: 1.8rem; color: var(--paper); font-size: 4.5rem; font-weight: 300; letter-spacing: 0; line-height: 1.03; text-wrap: balance; }
.document-hero h1 { max-width: 13em; margin-top: 1.8rem; color: var(--paper); font-size: 4.6rem; font-weight: 300; letter-spacing: 0; line-height: 1.03; text-wrap: balance; }
/* CJK headlines are set per line in the content model, so each locale gets a width
   that fits those lines instead of wrapping a single trailing character. */
html[lang="zh-CN"] .hero h1 { max-width: 9em; font-size: 5.25rem; }
html[lang="ja"] .hero h1 { max-width: 8.6em; font-size: 4.25rem; }
html[lang="zh-CN"] .document-hero h1, html[lang="ja"] .document-hero h1 { max-width: 12em; }
.lede { max-width: 35rem; margin-top: 2rem; color: var(--muted); font-size: 1.2rem; line-height: 1.55; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem; margin-top: 2.4rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.05rem; padding: .65rem 1.15rem; border: 1px solid var(--yellow); color: var(--field); background: var(--yellow); font-family: var(--display); font-size: .67rem; letter-spacing: 0; text-decoration: none; }
.button-primary.is-disabled { cursor: not-allowed; opacity: .72; }
.button-state { display: block; margin-left: .7rem; padding-left: .7rem; border-left: 1px solid rgba(17, 19, 18, .4); color: rgba(17, 19, 18, .72); font-size: .55rem; letter-spacing: 0; }
.text-link { display: inline-flex; gap: .7rem; align-items: center; color: var(--paper); font-size: .83rem; text-underline-offset: .35rem; text-decoration-color: var(--dim); }
.text-link:hover { color: var(--yellow); text-decoration-color: var(--yellow); }
.hero-note { max-width: 26rem; margin-top: 2.3rem; color: var(--quiet); font-family: var(--display); font-size: .62rem; letter-spacing: 0; line-height: 1.55; }

.manifesto { display: grid; grid-template-columns: 1fr minmax(0, 3fr); gap: 1.5rem; align-items: start; padding-block: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--rule); }
.manifesto-mark { color: var(--yellow); font-family: var(--display); font-size: .65rem; letter-spacing: 0; }
.manifesto-copy { max-width: 42rem; color: var(--paper); font-size: 3rem; font-weight: 300; letter-spacing: 0; line-height: 1.12; }

.story-section, .roll-section, .gallery-section, .edit-section, .output-section, .document-section { padding-block: clamp(4.5rem, 9vw, 8rem); border-top: 1px solid var(--rule); }
.story-section, .edit-section, .output-section { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.25fr); gap: clamp(2.5rem, 8vw, 8rem); }
.section-row { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.25fr); gap: clamp(2.5rem, 8vw, 8rem); align-items: end; }
.product-media-wide { margin-top: clamp(2.5rem, 5vw, 4rem); }
.section-heading h2, .closing h2 { max-width: 13ch; margin-top: 1.2rem; color: var(--paper); font-size: 4.5rem; font-weight: 300; letter-spacing: 0; line-height: 1.06; text-wrap: balance; }
.section-lede { max-width: 37rem; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.principle-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.principle { display: flex; flex-direction: column; min-height: 12rem; padding: 1rem 1rem 1.2rem; border-top: 2px solid var(--surface-3); background: var(--surface); }
.principle:nth-child(2) { border-top-color: var(--magenta); }
.principle:nth-child(3) { border-top-color: var(--cyan); }
.index, .feature-index, .step-index { color: var(--yellow); font-family: var(--display); font-size: .63rem; letter-spacing: 0; }
.principle h3 { margin-top: 2.6rem; font-size: 1.02rem; }
.principle p, .feature p, .workflow-card p, .step p, .privacy-item p { margin-top: .55rem; color: var(--muted); font-size: .9rem; line-height: 1.55; }

.micro-note { margin-top: 1.45rem; color: var(--quiet); font-family: var(--display); font-size: .6rem; letter-spacing: 0; line-height: 1.55; }
.product-media { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--surface-3); background: #0a0b0a; }
.product-media::before { position: absolute; inset: 0; z-index: 1; content: ""; border-top: 2px solid var(--yellow); opacity: .8; pointer-events: none; }
.product-media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #090a09; }
.product-media figcaption { padding: .7rem .8rem .75rem; color: var(--quiet); font-family: var(--display); font-size: .58rem; letter-spacing: 0; }

.gallery-section .section-heading h2 { max-width: 15ch; }

.showcase-section { padding-block: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--rule); }
.showcase-head { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.25fr); gap: clamp(2.5rem, 8vw, 8rem); align-items: end; }
.showcase-intro { display: flex; flex-direction: column; gap: 1.5rem; }
.showcase-nav { display: flex; gap: .5rem; }
.showcase-button { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 1px solid var(--rule); background: var(--surface); color: var(--paper); font-size: 1rem; line-height: 1; cursor: pointer; transition: border-color 140ms ease, color 140ms ease; }
.showcase-button:hover:not(:disabled) { border-color: var(--yellow); color: var(--yellow); }
.showcase-button:disabled { opacity: .35; cursor: default; }
.showcase-stage { margin-top: clamp(2rem, 4vw, 3rem); }
.showcase-frame { margin: 0; }
.showcase-frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border: 1px solid var(--surface-3); background: #090a09; }
.showcase-frame figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: .8rem; color: var(--muted); font-family: var(--display); font-size: .6rem; letter-spacing: 0; }
.showcase-strip-wrap { margin-top: 1.5rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: #0d0f0e; }
.showcase-strip { display: flex; gap: .45rem; padding-block: .8rem; overflow-x: auto; scrollbar-color: var(--surface-3) transparent; }
.showcase-thumb { position: relative; flex: 0 0 auto; width: 6.4rem; padding: 0; border: 0; background: none; cursor: pointer; }
.showcase-thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border: 1px solid var(--surface-3); background: #090a09; opacity: .42; transition: opacity 140ms ease, border-color 140ms ease; }
.showcase-thumb span { position: absolute; left: 0; bottom: 0; padding: .12rem .3rem; background: rgba(9, 10, 9, .72); color: var(--quiet); font-family: var(--display); font-size: .52rem; letter-spacing: 0; }
.showcase-thumb:hover img { opacity: .78; }
.showcase-thumb[aria-current="true"] img { opacity: 1; border-color: var(--yellow); }
.showcase-thumb[aria-current="true"] span { color: var(--yellow); }
.showcase-thumb:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.edit-section { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.3fr); gap: clamp(2.5rem, 8vw, 8rem); }
.edit-section .section-lede { margin-top: 2rem; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.feature { min-height: 10rem; padding: 1.2rem; background: var(--surface); }
.feature:nth-child(2) { background: #252827; }
.feature:nth-child(3) .feature-index { color: var(--cyan); }
.feature:nth-child(4) .feature-index { color: var(--magenta); }
.feature:nth-child(5) .feature-index { color: var(--orange); }
.feature h3 { margin-top: 2rem; font-size: 1rem; }

.output-section { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.3fr); gap: clamp(2.5rem, 8vw, 8rem); }
.output-section .section-lede { margin-top: 2rem; }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.workflow-card { min-height: 18rem; padding: 1.25rem; border: 1px solid var(--surface-3); background: var(--surface); }
.workflow-card-accent { border-color: var(--cyan); background: #202827; }
.workflow-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--quiet); font-family: var(--display); font-size: .6rem; letter-spacing: 0; }
.workflow-card h3 { margin-top: 4.2rem; color: var(--paper); font-size: 1.2rem; font-weight: 500; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.5rem; }
.chip-row span { padding: .28rem .45rem; border: 1px solid var(--rule); color: var(--quiet); font-family: var(--display); font-size: .57rem; letter-spacing: 0; }
.workflow-rule { width: 4.5rem; margin-top: 3.2rem; border-top: 2px solid var(--cyan); }

.closing { padding-block: clamp(6rem, 15vw, 13rem); text-align: center; }
.closing h2 { max-width: 11ch; margin-inline: auto; }
.closing > p:not(.eyebrow) { margin: 1.5rem auto 2rem; color: var(--muted); }

.document-hero { padding-block: clamp(5.5rem, 12vw, 10rem) clamp(4rem, 8vw, 7rem); }
.document-hero h1 { max-width: 12ch; }
.document-section { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.45fr); gap: clamp(2.5rem, 8vw, 8rem); }
.step-list, .privacy-list { display: grid; border-top: 1px solid var(--rule); }
.step { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.35rem 0; border-bottom: 1px solid var(--rule); }
.step h3 { color: var(--paper); font-size: 1.05rem; }
.step-index { padding-top: .15rem; }
.document-section > .workflow-grid, .document-section > .faq-list { grid-column: 2; }
.document-section:has(.workflow-grid), .document-section:has(.faq-list) { display: grid; }
.faq-list { border-top: 1px solid var(--rule); }
details { border-bottom: 1px solid var(--rule); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; color: var(--paper); cursor: pointer; font-size: 1.02rem; list-style: none; }
.faq-question { min-width: 0; }
summary::-webkit-details-marker { display: none; }
summary span { color: var(--yellow); font-family: var(--display); font-size: 1.2rem; font-weight: 300; }
details[open] summary span { transform: rotate(45deg); }
details p { max-width: 48rem; padding: 0 2rem 1.4rem 0; color: var(--muted); font-size: .96rem; }
.contact-panel { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; padding-block: clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--rule); }
.contact-panel h2 { max-width: 30rem; margin-top: 1rem; color: var(--paper); font-size: 2.5rem; font-weight: 300; letter-spacing: 0; line-height: 1.12; }
.contact-state { display: flex; align-items: center; gap: .6rem; color: var(--yellow); font-family: var(--display); font-size: .6rem; }
.contact-state .signal-dot { margin-right: 0; }
.contact-state code { white-space: normal; }
.contact-state a { color: inherit; text-decoration: underline; text-underline-offset: .25rem; }
.contact-state a:hover { color: var(--paper); }

.policy-notice { max-width: 44rem; margin-top: 2.5rem; padding: 1rem 1.15rem; border-left: 2px solid var(--yellow); background: var(--surface); }
.policy-notice h2 { color: var(--yellow); font-family: var(--display); font-size: .72rem; font-weight: 500; letter-spacing: 0; }
.policy-notice p { margin-top: .55rem; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.privacy-intro { grid-column: 2; max-width: 46rem; margin-bottom: 2.8rem; color: var(--paper); font-size: 1.5rem; font-weight: 300; line-height: 1.35; }
.privacy-page .document-section { display: grid; }
.privacy-list { grid-column: 2; }
.privacy-item { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; padding: 1.65rem 0; border-bottom: 1px solid var(--rule); }
.privacy-item > div, .step > div, .workflow-card { min-width: 0; }
.privacy-item h2 { color: var(--paper); font-size: 1.1rem; font-weight: 500; }
.effective { grid-column: 2; margin-top: 2rem; color: var(--quiet); font-family: var(--display); font-size: .63rem; letter-spacing: 0; }

.site-footer { width: min(100% - (var(--gutter) * 2), var(--max)); margin: 0 auto; padding-block: 2rem 2.5rem; border-top: 1px solid var(--rule); color: var(--quiet); font-family: var(--display); font-size: .62rem; letter-spacing: 0; }
.footer-top, .footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand { color: var(--paper); font-size: .8rem; letter-spacing: 0; }
.footer-dot { margin-left: .45rem; color: var(--yellow); }
.footer-signal { color: var(--quiet); }
.footer-bottom { margin-top: 2.2rem; color: var(--quiet); }
.footer-bottom nav { display: flex; gap: 1.1rem; }

@media (max-width: 900px) {
  /* The product visual leads on small screens so the workbench is visible
     before any scrolling, then the copy follows underneath it. */
  .hero { display: flex; flex-direction: column; align-items: stretch; padding-block: 0; }
  .hero-product { order: -1; width: 100%; margin: 0; }
  .hero-product img { border-left: 0; border-right: 0; border-top: 0; }
  .hero-product figcaption { margin-top: .6rem; padding-inline: var(--gutter); }
  .hero-copy { order: 0; width: auto; padding: 2.2rem var(--gutter) 3rem; }
}

@media (max-width: 1050px) {
  .manifesto-copy { font-size: 2.5rem; }
  .section-heading h2, .closing h2 { font-size: 3.5rem; }
  .contact-panel h2 { font-size: 2.2rem; }
  .principle-list { grid-template-columns: 1fr; }
  .principle { min-height: auto; }
  .story-section, .edit-section, .output-section, .document-section, .showcase-head, .section-row { gap: 3rem; }
}

@media (max-width: 760px) {
  :root { --gutter: 1.15rem; }
  .site-header { min-height: auto; grid-template-columns: 1fr auto; gap: .8rem; padding-block: 1rem; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: start; gap: 1rem; overflow-x: auto; padding-top: .75rem; border-top: 1px solid var(--rule); }
  .language-switcher { justify-content: end; }
  .hero h1, .document-hero h1 { font-size: 3.4rem; }
  html[lang="zh-CN"] .hero h1, html[lang="ja"] .hero h1 { font-size: 3.1rem; }
  .manifesto { grid-template-columns: 1fr; gap: 1rem; }
  .manifesto-copy { font-size: 2.25rem; }
  .section-heading h2, .closing h2 { font-size: 2.9rem; }
  .contact-panel h2 { font-size: 1.9rem; }
  .privacy-intro { font-size: 1.3rem; }
  .story-section, .roll-section, .gallery-section, .edit-section, .output-section, .document-section, .section-row { display: block; }
  .showcase-head { display: block; }
  .showcase-intro { margin-top: 2.5rem; }
  .showcase-thumb { width: 5rem; }
  .showcase-strip { gap: .35rem; }
  .section-row .section-body { margin-top: 2rem; }
  .story-content, .feature-grid, .output-section > .workflow-grid, .document-section > .workflow-grid, .document-section > .faq-list { margin-top: 2.5rem; }
  .product-media { margin-top: 2.5rem; }
  .edit-section .section-lede, .output-section .section-lede { margin-top: 1.5rem; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-card { min-height: auto; }
  .document-hero { padding-top: 4.5rem; }
  .privacy-intro, .privacy-list, .effective { margin-top: 2.5rem; }
  .privacy-intro, .privacy-list, .effective { display: block; }
  .privacy-item { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .contact-panel { display: block; }
  .contact-state { margin-top: 2rem; }
  .footer-top, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-bottom { gap: 1rem; }
}

@media (max-width: 480px) {
  .brand-word { display: none; }
  .language-switcher { font-size: .58rem; gap: .45rem; }
  .language-link + .language-link { padding-left: .45rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .text-link { width: fit-content; }
  .hero h1, .document-hero h1 { font-size: 2.8rem; }
  html[lang="zh-CN"] .hero h1, html[lang="ja"] .hero h1 { font-size: 2.6rem; }
  .manifesto-copy { font-size: 2rem; }
  .section-heading h2, .closing h2 { font-size: 2.45rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 2.2rem minmax(0, 1fr); }
  details p { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
