/* AURIFORTH /aimotion/document-ai/ — Document AI (module of the AI Motion suite).
   Loads after /aimotion/suite.css (tokens, header, .section, .card, .seg, .table …). Apple visual language: light surfaces,
   #1d1d1f text, #6e6e73 secondary, #0071e3 actions, #0066cc links, rounded cards. CSP: no inline styles; JS uses CSSOM. */

.docai { --acc-1: #0071e3; --acc-2: #af52de; --acc-3: #34c759; --acc-4: #ff2d55;
  --ink-1: #0066cc; --ink-2: #8944ab; --ink-3: #1c7a33; --ink-4: #d6003a; --orange-ink: #b25000; }

/* ---------- section furniture ---------- */
.eyebrow__num { color: var(--link); font-variant-numeric: tabular-nums; margin-right: 4px; }
.sec-tag { margin-top: 28px; font-size: 12px; color: var(--text-2); letter-spacing: 0; }
.callout { margin-top: 24px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--bg-alt); color: var(--text); font-size: 17px; line-height: 1.55; }

.callout--small { margin-top: 16px; padding: 14px 16px; font-size: 15px; background: var(--bg-alt); }
.section--alt .card .callout--small { background: var(--bg-alt); }
.panel__label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { color: var(--text); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 10px 22px; border-radius: 980px;
  font-size: 17px; line-height: 1.2; background: var(--fill); color: var(--text); text-decoration: none; }



.more { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; color: var(--link); }
.link-btn { min-height: 36px; padding: 6px 2px; background: transparent; color: var(--link); font-size: 14px; border-radius: 6px; }
.link-btn:where(:hover:not(:disabled)) { background: transparent; text-decoration: underline; }
.caution { margin-top: 14px; padding-left: 14px; border-left: 3px solid #ff9f0a; font-size: 14px; line-height: 1.55; color: var(--orange-ink); }

/* ---------- 01 overview ---------- */
.hero-doc { padding-top: 72px; }
.hero-doc .headline { max-width: 15em; }


.pipeline { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.pipe { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 22px 20px 24px; border-radius: var(--r-xl); background: var(--bg-alt);
  color: var(--acc); transition: background-color .5s var(--ease), box-shadow .5s var(--ease), transform .5s var(--ease); }
.pipe--1 { --acc: var(--acc-1); --ink: var(--ink-1); } .pipe--2 { --acc: var(--acc-2); --ink: var(--ink-2); }
.pipe--3 { --acc: var(--acc-3); --ink: var(--ink-3); } .pipe--4 { --acc: var(--acc-4); --ink: var(--ink-4); }
.pipe::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--acc); opacity: .9; }
.pipe:not(:last-child)::after { content: ""; position: absolute; z-index: 1; top: 66px; right: -17px; width: 14px; height: 14px; border: solid #86868b; border-width: 2px 2px 0 0; transform: rotate(45deg); }
.pipe.is-active { background: var(--bg); box-shadow: 0 0 0 2px var(--acc), var(--shadow); transform: translateY(-4px); }
.pipe__ico { display: block; width: 100%; height: 96px; margin-bottom: 16px; }
.pipe__chip { fill: currentColor; stroke: none; font: 600 16px var(--latin); }
.pipe__disc { fill: var(--bg-alt); }
.pipe.is-active .pipe__disc { fill: var(--bg); }
.pipe__title { color: var(--text); font-size: 21px; line-height: 1.3; margin-bottom: 10px; font-weight: 600; }
.pipe__text { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.beam { stroke-dasharray: 10 13; animation: dcflow 2s linear infinite; }
.blink { animation: dcblink 2.4s ease-in-out infinite; }
.pipe--2 .blink { animation-delay: -.8s; } .pipe--3 .blink { animation-delay: -1.6s; }
@keyframes dcflow { to { stroke-dashoffset: -92; } }
@keyframes dcblink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }

/* ---------- 02 live demo ---------- */
.demo-steps { list-style: none; margin: 34px 0 18px; padding: 4px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; background: var(--fill); border-radius: 980px; }
.demo-step { width: 100%; min-height: 40px; padding: 8px 10px; background: transparent; color: #424245; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-step:where(:hover:not(:disabled)) { background: rgba(0, 0, 0, .05); color: var(--text); }
.demo-step[aria-current="step"], .demo-step[aria-current="step"]:hover { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { min-width: 0; padding: 20px; border-radius: var(--r-lg); background: var(--bg); display: flex; flex-direction: column; }
.paper { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; max-height: 380px; padding: 0; overflow: hidden; border-radius: 14px;
  background: var(--bg-alt); cursor: zoom-in; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.paper:where(:hover:not(:disabled)) { background: var(--bg-alt); }
.paper:active:not(:disabled) { transform: none; }
.paper picture, .paper img { display: block; width: 100%; height: 100%; }
.paper img { object-fit: contain; }
.paper__scan { position: absolute; left: 0; right: 0; top: 0; height: 22%; display: none; pointer-events: none;
  background: linear-gradient(rgba(0, 113, 227, 0), rgba(0, 113, 227, .22)); border-bottom: 2px solid var(--blue); }
.is-scanning .paper__scan { display: block; animation: scanpage 1.6s linear infinite; }
@keyframes scanpage { from { transform: translateY(0); } to { transform: translateY(355%); } }
.paper__page { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 980px; background: rgba(29, 29, 31, .78); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.panel__hint { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.transfer { position: relative; flex: none; width: 46px; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.transfer i { position: absolute; top: 0; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); opacity: 0; }
.is-scanning .transfer i { animation: travel 1.4s linear infinite; }
.transfer i:nth-child(2) { animation-delay: -.5s; } .transfer i:nth-child(3) { animation-delay: -1s; }
@keyframes travel { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(40px); opacity: 0; } }
.gpu-mini { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; background: var(--bg-alt); }
.gpu-mini b { color: var(--link); font-family: var(--latin); letter-spacing: .02em; }
.cells { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; flex: 1; min-width: 0; }
.cells i { display: block; height: 14px; border-radius: 3px; background: #d2d2d7; }
.is-scanning .cells i { animation: cellblink .5s ease-in-out infinite alternate; }
.cells i:nth-child(2n) { animation-delay: -.25s; } .cells i:nth-child(3n) { animation-delay: -.12s; }
@keyframes cellblink { from { background: #d2d2d7; } to { background: var(--blue); } }
.ocr-out { margin-top: 12px; min-height: 182px; padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); font-size: 14px; line-height: 1.6;
  white-space: pre-line; overflow-wrap: anywhere; color: var(--text); font-variant-numeric: tabular-nums; }
.progress { height: 4px; margin-top: 12px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, #0071e3, #7d5bf0); }
.verify, .formats { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--text-2); transition: color .3s; }
.verify.is-on { color: var(--orange-ink); font-weight: 600; }
.formats.is-on { color: var(--ink-3); font-weight: 600; }
.vault { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 14px 16px; border-radius: 14px; background: var(--bg-alt); font-size: 17px; font-weight: 600; }
.vault__count { font-size: 13px; font-weight: 400; color: var(--text-2); align-self: center; }
.query { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 15px; color: var(--text-2); min-height: 48px; }
.query.is-on { color: var(--text); border-color: var(--blue); }
.answer { margin-top: 14px; font-size: 18px; line-height: 1.5; font-weight: 600; min-height: 4.5em; }
.source-ref { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--link); opacity: 0; transition: opacity .3s; }
.source-ref.is-on { opacity: 1; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 20px; }
.demo-bar #pauseDemo[aria-pressed="true"] { background: var(--fill); color: var(--text); }
.speed { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.speed select { width: auto; min-height: 44px; padding: 8px 36px 8px 14px; font-size: 15px; border-radius: 980px; border-color: var(--line); }
.demo-status { flex: 1 1 260px; min-width: 0; font-size: 14px; color: var(--text-2); }
.timeline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.timeline input[type="range"] { flex: 1 1 220px; min-width: 0; min-height: 44px; margin: 0; accent-color: var(--blue); cursor: pointer; background: transparent; }
.timeline__time { font-variant-numeric: tabular-nums; min-width: 6.5em; text-align: right; }

/* ---------- 03 / 04 two-column cards ---------- */
.io { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.io__card { display: flex; flex-direction: column; padding: 28px; }
.card.io__card { background: var(--bg-alt); }
.section--alt .card.io__card { background: var(--bg); }
.io__title { font-size: 24px; line-height: 1.3; margin-bottom: 10px; }
.io__text { font-size: 16px; line-height: 1.6; color: var(--text); }
.io__text--muted { margin-top: 16px; color: var(--text-2); font-size: 15px; }
.thumbs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.thumb { display: block; width: 100%; padding: 0; min-height: 0; background: transparent; border-radius: 10px; text-align: center; cursor: zoom-in; }
.thumb:where(:hover:not(:disabled)) { background: transparent; }
.thumb picture { display: block; aspect-ratio: 1131 / 1600; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), var(--shadow-sm); transition: transform .3s var(--ease); }
.thumb:hover picture { transform: translateY(-2px); }
.thumb__img { width: 100%; height: 100%; object-fit: cover; }
.thumb__cap { display: block; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.quote-box, .dc-query { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--bg); font-size: 16px; line-height: 1.7; }
.section--alt .card .dc-query { background: var(--bg-alt); }
.fmt { margin: 6px 0 14px; align-self: flex-start; }
.fmt-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.editor { display: block; width: 100%; min-height: 178px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  font: inherit; font-size: 16px; line-height: 1.65; color: var(--text); resize: vertical; letter-spacing: 0; }
.editor:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 125, 250, .25); }
.fmt-view .link-btn { margin-top: 6px; }
.json { margin: 0; padding: 14px 16px; border-radius: 14px; background: #1d1d1f; color: #f5f5f7; font-family: var(--mono); font-size: 13px; line-height: 1.6;
  overflow: auto; max-height: 300px; white-space: pre; letter-spacing: 0; }
.json:focus-visible { outline-offset: 2px; }

/* Q&A */
.qa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.qa-chip { min-height: 40px; padding: 8px 16px; font-size: 14px; line-height: 1.35; text-align: left; background: var(--bg-alt); }
.qa-chip[aria-pressed="true"], .qa-chip[aria-pressed="true"]:hover { background: var(--text); color: #fff; }
.qa-search { margin-top: 18px; }
.qa-search__row { display: flex; gap: 8px; }
.qa-search input[type="search"] { flex: 1; min-width: 0; min-height: 44px; padding: 10px 16px; border: 1px solid #86868b; border-radius: 980px; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); -webkit-appearance: none; appearance: none; letter-spacing: 0; }
.qa-search input[type="search"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 125, 250, .25); }
.qa-search .btn-primary { flex: none; }
.qa-results { list-style: none; margin: 6px 0 0; padding: 0; }
.qa-item { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid #e8e8ed; }
.qa-item:last-child { border-bottom: 0; }
.qa-item__a { flex: 1 1 220px; min-width: 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
.qa-item__ref { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-2); }
.qa-empty { padding: 14px 0; font-size: 15px; color: var(--text-2); }

/* structured conditions */
.conds { list-style: none; margin: 8px 0 18px; padding: 0; }
.cond { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid #e8e8ed; }
.cond:last-child { border-bottom: 0; }
.cond__op { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tint-blue); color: var(--link); font: 600 22px var(--latin); }
.cond__body { flex: 1; min-width: 0; }
.cond__name { color: var(--text-2); }
.cond__val { font-size: 19px; }
.cond__ref { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.cond__open { flex: none; }

/* ---------- 05 capacity ---------- */
.cap-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: 32px; padding: 26px 28px; background: var(--bg-alt); }
.cap-input { display: grid; grid-template-columns: auto auto; align-items: center; gap: 10px 18px; }
.cap-input__label { font-size: 17px; font-weight: 600; }
.cap-input__row { display: flex; align-items: center; gap: 10px; }
.cap-input input[type="number"] { width: 170px; font-size: 28px; font-weight: 600; min-height: 56px; padding: 8px 14px; }
.cap-input input[aria-invalid="true"] { border-color: var(--alert); box-shadow: 0 0 0 4px rgba(255, 59, 48, .18); }
.cap-input__unit { font-size: 17px; color: var(--text-2); }
.presets { grid-column: 1 / -1; justify-self: start; }
.presets .seg__btn { font-variant-numeric: tabular-nums; }
.cap-input__help { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); }
.cap-input__help.is-error { color: #c4271d; font-weight: 600; }
.gpu-badge { display: flex; align-items: center; gap: 14px; }
.gpu-badge b { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.01em; font-family: var(--latin); white-space: nowrap;
  background: linear-gradient(90deg, #0071e3, #7d5bf0); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.gpu-badge span { max-width: 200px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.cap-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 20px; margin-top: 20px; }
.cap-panel { padding: 26px; background: var(--bg-alt); }
.cap-panel__title { font-size: 21px; margin-bottom: 14px; }
.cap-table { font-variant-numeric: tabular-nums; }
.cap-table td:last-child { color: var(--text); }
.cap-table td:first-child { color: var(--text-2); }
.cap-table .cap-highlight td { background: var(--tint-blue); color: var(--text); }
.cap-small { margin-top: 14px; font-size: 12px; line-height: 1.7; color: var(--text-2); }
.cap-note { margin-top: 20px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--tint-blue); font-size: 16px; line-height: 1.6; }
.cap-source { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.cap-source a { text-decoration: underline; text-underline-offset: 2px; }
.dgx-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 28px; padding: 24px 28px; background: var(--bg-alt); }
.dgx-link p:first-child { font-size: 19px; font-weight: 600; }
.dgx-link__p { margin-top: 4px; font-size: 15px; color: var(--text-2); }

/* ---------- original-page viewer (dialog) ---------- */
dialog:not([open]) { display: none; }
.viewer { width: min(940px, calc(100vw / var(--z, 1) - 24px)); max-width: none; max-height: calc(100vh / var(--z, 1) - 24px); max-height: calc(100dvh / var(--z, 1) - 24px); margin: auto; padding: 0; border: 0;
  border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(0, 0, 0, .55); }
.viewer.is-fallback[open] { position: fixed; inset: 0; z-index: 100; height: max-content; }
.viewer-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(0, 0, 0, .55); }
.viewer__bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #e8e8ed; }
.viewer__count { flex: 1; min-width: 0; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.viewer__btn { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; flex: none; }
.viewer__zoom, .viewer__close { flex: none; font-size: 14px; padding: 8px 14px; }
.viewer__zoom[aria-pressed="true"] { background: var(--text); color: #fff; }
.viewer__stage { flex: 1; min-height: 0; overflow: auto; background: var(--bg-alt); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.viewer__stage picture { display: block; }
.viewer__stage img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh / var(--z, 1) - 150px); max-height: calc(100dvh / var(--z, 1) - 150px); margin: 0 auto; cursor: zoom-in; background: #fff; }
.viewer.is-zoomed .viewer__stage img { max-width: none; max-height: none; width: 1131px; cursor: zoom-out; }
.viewer__note { padding: 8px 14px 10px; font-size: 12px; color: var(--text-2); text-align: center; border-top: 1px solid #e8e8ed; }

/* ---------- chapter picker (floating bar; same component on /aimotion/dgx-b300/) ---------- */
.chapters { position: fixed; z-index: 40; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 980px; font-family: var(--font);
  background: rgba(255, 255, 255, .96); box-shadow: 0 4px 20px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .chapters { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}


.chapters__jump select { width: auto; max-width: 260px; min-height: 40px; padding: 6px 34px 6px 14px; font-size: 14px; border: 0; border-radius: 980px; background-color: var(--fill); background-position: right 13px center; }







.suite-foot { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }

/* ---------- responsive ---------- */
@media (max-width: 1068px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe:nth-child(2)::after { display: none; }
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel--vault { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .io, .cap-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 734px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero-doc { padding-top: 48px; }
  .pipeline { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 36px; }
  .pipe:not(:last-child)::after, .pipe:nth-child(2)::after { display: block; top: auto; bottom: -21px; right: auto; left: 50%; margin-left: -7px; transform: rotate(135deg); }
  .pipe__ico { height: 84px; }
  .demo-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); border-radius: 18px; }
  .demo-step { font-size: 12px; padding: 6px 4px; white-space: normal; line-height: 1.25; min-height: 44px; }
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .paper { max-height: 340px; }
  .io__card, .cap-panel { padding: 22px 18px; }
  .card { border-radius: var(--r-lg); }
  .cap-banner { padding: 22px 18px; }
  .cap-input { grid-template-columns: minmax(0, 1fr); }
  .cap-input input[type="number"] { width: 100%; max-width: 220px; }
  .presets { max-width: 100%; }
  .gpu-badge b { font-size: 34px; }
  .callout { padding: 16px 18px; font-size: 16px; }
  .cond__op { width: 38px; height: 38px; font-size: 19px; }
  .cond { flex-wrap: wrap; }
  .cond__open { margin-left: 52px; }
  .chapters { left: 12px; right: 12px; transform: none; width: auto; max-width: none; justify-content: space-between; gap: 6px; padding: 6px; }
  .chapters__count { display: none; }
  .chapters__jump { flex: 1 1 auto; }
  .chapters__jump select { width: 100%; max-width: none; min-height: 44px; }
  .chapters__toast { white-space: normal; width: max-content; max-width: calc(100vw - 48px); text-align: center; }
  .viewer__zoom { display: none; }
}
@media (max-width: 420px) {
  .demo-step { font-size: 11px; }
  .thumbs { gap: 6px; }
  .qa-search__row { flex-wrap: wrap; }
  .qa-search .btn-primary { width: 100%; }
  .viewer__close { padding: 8px 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .chapters { bottom: calc(8px + var(--safe-b)); }
  .paper { max-height: 300px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .beam, .blink, .transfer i, .is-scanning .transfer i { animation: none !important; }
  .blink { opacity: .7; }
  .pipe, .thumb picture, .source-ref, .verify, .formats { transition: none; }
  .pipe.is-active { transform: none; }
  .is-scanning .paper__scan { animation-duration: 4s; }
  .is-scanning .cells i { animation-duration: 1.5s; }
}

/* ---------- print ---------- */
@media print {
  .chapters, .demo-bar, .timeline, .presets, .qa-search, .viewer, .viewer-backdrop, .actions, .link-btn, .fmt, .demo-steps { display: none !important; }
  .section { padding: 0 0 8mm !important; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe, .panel, .card, .callout, .cap-note { box-shadow: none !important; border: 1px solid var(--line); break-inside: avoid; transform: none !important; }
  .pipe::after { display: none !important; }
  .demo-grid, .io, .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel--vault { grid-column: auto; }
  .paper { max-height: 260px; }
  .editor { border: 1px solid var(--line); min-height: 0; resize: none; }
  #fmtJson { display: block !important; margin-top: 10px; }
  .json { background: #fff; color: var(--text); border: 1px solid var(--line); max-height: none; white-space: pre-wrap; }
  .source-ref, .verify, .formats { opacity: 1 !important; }
  .suite-foot { padding-bottom: 0; }
  .gpu-badge b { -webkit-text-fill-color: currentColor; color: var(--link); background: none; }
}

/* demo held by its own pause button */
.demo-paused, .demo-paused * { animation-play-state: paused !important; }
.viewer__stage { touch-action: pan-y pinch-zoom; }
.viewer.is-zoomed .viewer__stage { touch-action: pan-x pan-y pinch-zoom; }

/* ---------- polish ---------- */
.io__card .chip { background: var(--bg); }
.section--alt .io__card .chip { background: var(--bg-alt); }
.io__card .callout--small { background: var(--bg); }
.section--alt .io__card .callout--small { background: var(--bg-alt); }

.more > span[aria-hidden], .pill > span[aria-hidden] { margin-left: .3em; }
/* iOS zooms into form fields under 16px: keep touch-device selects at 16px */
@media (pointer: coarse) { .chapters__jump select, .speed select { font-size: 16px; } }
@media print { .eyebrow, .title, .headline, .lead, .panel__label, .rag__label { break-after: avoid; page-break-after: avoid; } }

/* One baseline per text row (owner rule; qa/baseline_scan.js). Icon-only controls and sliders stay centred. */
.chapters, .demo-bar, .cond, .vault, .gpu-badge, .cap-banner, .speed { align-items: baseline; }
.chapters__btn, .chapters__jump select, .demo-bar input[type="range"], .cond__op { align-self: center; }
.cond__op { align-self: baseline; }
