/* =========================================================
   i4 AI-OCR — Landing page
   Builds on ../css/style.css (tokens, nav, buttons, forms, cursor)
   and ../css/lp.css (hero shell, sections, ROI, plans, FAQ, apply form)
   ========================================================= */

.ocr {
  --paper: #fbfaf4;
  --print: #3d6694;
  --print-line: #7d9cc2;
  --ink: #1f2c6b;
  --stamp: #d23a31;
}
.hand { font-family: 'Yomogi', cursive; color: var(--ink); }
/* break Japanese text at phrase boundaries instead of leaving one character alone */
.o-step p, .o-stat__label { word-break: auto-phrase; text-wrap: pretty; }

/* ---------- Demo card ---------- */
.o-demo {
  border: 1px solid rgba(150, 185, 255, .18); border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
  padding: 14px;
}
.o-demo__tabs { display: flex; gap: 6px; padding: 2px 2px 12px; align-items: center; flex-wrap: wrap; }
.o-demo__tabs button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: rgba(214, 226, 255, .7); border: 1px solid transparent; transition: background-color .3s, color .3s, border-color .3s; }
.o-demo__tabs button:hover { color: #fff; border-color: rgba(150, 185, 255, .25); }
.o-demo__tabs button.is-active { background: rgba(94, 240, 255, .12); color: #fff; border-color: rgba(94, 240, 255, .4); }
.o-demo__replay { margin-left: auto; width: 34px; padding: 0 !important; display: grid; place-items: center; }
.o-demo__replay svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.o-demo__body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 12px; }
.o-demo__note { font-size: 11.5px; color: rgba(214, 226, 255, .45); margin: 10px 4px 0; }

.o-scan { position: relative; border-radius: 16px; background: #0b1630; border: 1px solid rgba(150, 185, 255, .14); padding: 14px 14px 34px; overflow: hidden; }
.o-scan__bed { position: relative; width: 100%; aspect-ratio: 560 / 760; }
.o-scan__doc { position: absolute; inset: 0; }
.o-scan__beam { position: absolute; left: -10%; right: -10%; height: 22%; top: -22%; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 0%, rgba(94, 240, 255, .12) 60%, rgba(160, 250, 255, .85) 97%, rgba(94, 240, 255, 0) 100%); filter: drop-shadow(0 0 12px rgba(94, 240, 255, .8)); }
.o-scan.is-scanning .o-scan__beam { animation: o-beam 1.5s cubic-bezier(.5, 0, .5, 1) forwards; }
@keyframes o-beam { 0% { top: -22%; opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.o-scan__status { position: absolute; left: 14px; right: 14px; bottom: 10px; color: var(--scan); font-size: 10.5px; text-shadow: 0 0 10px rgba(94, 240, 255, .6); display: flex; gap: 8px; align-items: center; }
.o-scan__status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: o-blink 1s steps(2) infinite; }
@keyframes o-blink { 50% { opacity: .2; } }

.o-xr { display: flex; flex-direction: column; min-width: 0; border-radius: 16px; background: rgba(4, 9, 20, .55); border: 1px solid rgba(150, 185, 255, .14); overflow: hidden; }
.o-xr__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(150, 185, 255, .12); color: rgba(214, 226, 255, .55); }
.o-xr__head .mono { font-size: 10px; }
.o-xr__form { font-size: 11.5px; color: #fff; padding: 3px 9px; border-radius: 999px; background: rgba(47, 128, 255, .22); opacity: 0; transform: translateY(-4px); transition: opacity .4s, transform .4s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-xr__form.is-on { opacity: 1; transform: none; }
/* flex: none so the fixed height wins; with flex: 1 the column grows to fit all rows */
.o-xr__list { flex: none; overflow-y: auto; padding: 4px 0; height: 340px; scrollbar-width: thin; scrollbar-color: rgba(150, 185, 255, .25) transparent; }
.o-xr__row { display: grid; grid-template-columns: 5.6em minmax(0, 1fr) 46px; gap: 1px 10px; align-items: center; padding: 5px 14px; font-size: 12.5px; animation: o-rowIn .45s var(--ease-out) both; }
.o-xr__row:nth-child(odd) { background: rgba(255, 255, 255, .02); }
@keyframes o-rowIn { from { opacity: 0; transform: translateX(10px); } }
.o-xr__label { color: rgba(214, 226, 255, .55); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-xr__val { color: #fff; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-xr__conf { position: relative; height: 4px; border-radius: 4px; background: rgba(150, 185, 255, .15); overflow: hidden; }
.o-xr__conf i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--c, 0)); background: var(--ok); border-radius: inherit; animation: o-grow .6s var(--ease-out) both; }
@keyframes o-grow { from { transform: scaleX(0); } }
.o-xr__row.is-review .o-xr__conf i { background: var(--warn); }
.o-xr__row.is-mark .o-xr__conf i { background: var(--scan); }
.o-xr__why { grid-column: 2 / -1; font-size: 10.5px; color: rgba(214, 226, 255, .45); line-height: 1.5; }
.o-xr__row.is-review { background: rgba(255, 154, 60, .08) !important; }
.o-xr__row.is-review .o-xr__why { color: var(--warn); }
.o-xr__row.is-review .o-xr__label::before { content: '●'; color: var(--warn); margin-right: 4px; font-size: 8px; vertical-align: 2px; }
.o-xr__foot { border-top: 1px solid rgba(150, 185, 255, .12); padding: 10px 14px 12px; min-height: 92px; }
.o-xr__sum { font-size: 12px; color: rgba(214, 226, 255, .8); min-height: 1.6em; }
.o-xr__sum b { color: #fff; }
.o-xr__sum .w { color: var(--warn); }
.o-xr__csv { margin: 6px 0 0; font-size: 10px; line-height: 1.6; color: var(--scan); white-space: pre; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; opacity: .9; }

/* ---------- Paper documents (shared by hero + flow) ---------- */
.o-paper { position: absolute; left: 0; top: 0; width: 560px; height: 760px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.doc {
  position: absolute; inset: 0; overflow: hidden;
  background: var(--paper);
  color: var(--print);
  font-family: 'BIZ UDPGothic', 'Zen Kaku Gothic New', sans-serif;
  letter-spacing: .02em; line-height: 1.5;
  padding: 34px 36px 28px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .04), 0 30px 60px -20px rgba(0, 0, 0, .55);
  transition: transform .9s var(--ease-out), filter .9s, opacity .5s;
}
.doc::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.2 0 0 0 0 0.25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.doc.is-raw { transform: translate(18px, 14px) rotate(-3.6deg) scale(.97); filter: contrast(.9) brightness(.96) saturate(.85); }
.doc .p { transition: opacity .6s; }
.doc .h { font-family: 'Yomogi', cursive; color: var(--ink); font-size: 21px; letter-spacing: .05em; display: inline-block; transform: rotate(var(--r, -0.6deg)); line-height: 1.3; }

.doc__top { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 16px; margin-bottom: 18px; }
.doc__code { grid-column: 1 / -1; font-size: 10px; letter-spacing: .2em; color: var(--print-line); }
.doc__title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .1em; color: var(--print); white-space: nowrap; }
.doc__date { display: flex; align-items: baseline; gap: 5px; font-size: 13px; padding: 2px 4px; }
.doc__date .h { font-size: 19px; }
.doc__tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc__tbl th, .doc__tbl td { border: 1.4px solid var(--print-line); padding: 8px 12px; transition: border-color .6s; }
.doc__tbl th { width: 104px; background: rgba(61, 102, 148, .07); text-align: left; font-weight: 700; color: var(--print); white-space: nowrap; }
.doc__tbl td { height: 54px; position: relative; color: var(--print); }
.doc__opt { position: relative; display: inline-block; margin-right: 22px; padding: 2px 4px; }
/* max-width: none overrides the global `svg { max-width: 100% }`, which would clamp the ring to the label width */
.doc__ring { position: absolute; left: -12px; top: -7px; width: calc(100% + 26px); height: calc(100% + 14px); max-width: none; pointer-events: none; overflow: visible; }
.doc__ring path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.doc__cells { display: inline-flex; vertical-align: middle; }
.doc__cells b { width: 30px; height: 38px; display: grid; place-items: center; border: 1.2px solid var(--print-line); margin-left: -1.2px; font-weight: 400; transition: border-color .6s; }
.doc__cells b .h { font-size: 22px; }
.doc__strk { position: relative; display: inline-block; text-decoration: none; }
.doc__strk::after { content: ''; position: absolute; left: -5px; right: -6px; top: 50%; height: 2.6px; border-radius: 2px; background: var(--ink); transform: rotate(-5deg); }
.doc__foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; }
.doc__fine { font-size: 11px; color: var(--print-line); max-width: 300px; line-height: 1.6; }
.doc__seal { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.doc__seal-box { position: relative; width: 78px; height: 78px; border: 1.4px solid var(--print-line); display: grid; place-items: center; transition: border-color .6s; }
.doc__stamp { width: 58px; height: 58px; border: 3px solid var(--stamp); border-radius: 50%; display: grid; place-items: center; color: var(--stamp); font-family: var(--f-serif-jp); font-weight: 800; font-size: 13px; line-height: 1.05; writing-mode: vertical-rl; letter-spacing: .1em; transform: rotate(-9deg); opacity: .86; }

/* FAX */
/* FAX look comes from colours only: a CSS filter here would also grey out the highlight boxes drawn on top */
.doc--fax { color: #1b1b1b; font-family: 'BIZ UDPGothic', sans-serif; background: #f1f1ee; }
.doc--fax::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .035) 0 1px, transparent 1px 3px), linear-gradient(90deg, transparent 22%, rgba(0, 0, 0, .05) 22.3%, transparent 22.6%, transparent 71%, rgba(0, 0, 0, .04) 71.2%, transparent 71.4%); }
.doc--fax .p { color: #1b1b1b; }
.doc--fax .h { color: #111; font-size: 19px; }
.doc--fax.is-raw { filter: blur(.3px); }
.fax-hdr { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em; padding-bottom: 8px; border-bottom: 1px dashed #555; margin: -16px -10px 18px; text-transform: none; }
.doc--fax .doc__title { color: #111; text-align: center; letter-spacing: .4em; border-bottom: 3px double #222; padding-bottom: 6px; margin-bottom: 14px; }
.fax-meta { display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; font-size: 13px; margin-bottom: 14px; align-items: baseline; }
.fax-meta .to { font-size: 15px; font-weight: 700; border-bottom: 1px solid #222; padding-bottom: 2px; }
.fax-meta span[data-f] { display: inline-flex; gap: 8px; align-items: baseline; }
.doc__grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.doc__grid th, .doc__grid td { border: 1.2px solid #333; padding: 6px 8px; height: 44px; text-align: left; transition: border-color .6s; }
.doc__grid th { height: 30px; background: rgba(0, 0, 0, .06); font-weight: 700; text-align: center; }
.doc__grid td:first-child { width: 34px; text-align: center; }
.doc__grid td:nth-child(4) { width: 64px; text-align: right; }
.doc__grid td:nth-child(5) { width: 66px; }
.fax-note { display: flex; gap: 14px; align-items: baseline; margin-top: 14px; font-size: 13px; border: 1.2px solid #333; padding: 10px 12px; min-height: 70px; }
.fax-sign { margin-top: 14px; display: flex; justify-content: flex-end; gap: 8px; font-size: 12px; }

/* Invoice */
.doc--invoice { color: #1d1d1f; font-family: 'BIZ UDPGothic', sans-serif; padding: 40px 40px 30px; }
.doc--invoice .p { color: #1d1d1f; }
.inv-title { margin: 0 0 18px; text-align: center; font-size: 28px; letter-spacing: .6em; font-weight: 700; color: #1d1d1f; }
.inv-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; font-size: 12.5px; }
.inv-to { font-size: 17px; font-weight: 700; border-bottom: 1.5px solid #1d1d1f; padding-bottom: 4px; margin-bottom: 14px; display: inline-block; }
.inv-meta { display: grid; gap: 3px; text-align: right; }
.inv-from { margin-top: 10px; font-size: 12px; line-height: 1.7; }
.inv-from b { font-size: 14px; }
.inv-total { margin: 18px 0 16px; display: flex; justify-content: space-between; align-items: baseline; border: 2px solid #1d1d1f; padding: 10px 16px; }
.inv-total span { font-size: 14px; font-weight: 700; }
.inv-total b { font-size: 27px; letter-spacing: .03em; }
.inv-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.inv-tbl th, .inv-tbl td { border-bottom: 1px solid #c9c9cc; padding: 8px 6px; text-align: right; transition: border-color .6s; }
.inv-tbl th:first-child, .inv-tbl td:first-child { text-align: left; }
.inv-tbl thead th { background: #1d1d1f; color: #fff; font-weight: 700; border: 0; }
.inv-tbl tfoot td { border-bottom: 0; padding: 5px 6px; }
.inv-tbl tfoot tr:last-child td { font-weight: 700; font-size: 14px; border-top: 1.5px solid #1d1d1f; }
.inv-due { margin-top: 18px; font-size: 13px; font-weight: 700; }
.inv-bank { margin-top: 6px; font-size: 12px; color: #444; }
.inv-regno { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .02em; text-transform: none; }

/* Highlight boxes on documents */
.o-hl { position: absolute; z-index: 5; pointer-events: none; border: 2px solid #2f80ff; background: rgba(47, 128, 255, .1); border-radius: 5px; animation: o-hlIn .35s var(--ease-out) both; }
.o-hl.is-review { border-color: var(--warn); background: rgba(255, 154, 60, .14); }
.o-hl.is-mark { border-color: #10b3a3; background: rgba(16, 179, 163, .12); }
@keyframes o-hlIn { from { opacity: 0; transform: scale(1.06); } }

/* ---------- Flow (scrollytelling) ---------- */
.o-flow__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.o-flow__sticky { position: sticky; top: calc(var(--nav-h) + 20px); height: calc(100vh - var(--nav-h) - 40px); min-height: 480px; }
.o-stage {
  position: relative; height: 100%; border-radius: 28px; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 40%, rgba(37, 96, 210, .25), transparent 70%), #0a1430;
  border: 1px solid rgba(150, 185, 255, .14);
}
.o-stage::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(150, 185, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 185, 255, .05) 1px, transparent 1px); background-size: 32px 32px; }
.o-stage__paper { position: absolute; inset: 24px 24px 76px; }
.o-stage__caption { position: absolute; left: 22px; right: 22px; bottom: 18px; display: flex; gap: 14px; align-items: baseline; color: #fff; font-size: 15px; z-index: 6; }
.o-stage__caption .mono { color: var(--scan); }
.o-stage__caption b { font-weight: 500; transition: opacity .3s; }

/* stage overlays (positioned in document coordinates by JS) */
.o-ov { position: absolute; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .45s, transform .45s var(--ease-out); transform: translateY(6px); }
.o-tag { font-family: var(--f-sans); font-size: 12.5px; line-height: 1.35; white-space: nowrap; padding: 4px 9px; border-radius: 8px; color: #fff; background: #1f5fe0; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5); letter-spacing: .02em; }
.o-tag.is-ok { background: #0f8a68; }
.o-tag.is-ng { background: #d9661c; }
.o-tag.is-mark { background: #0f8f86; }
.o-tag.is-norm { background: #2a3a6e; }
.o-tag code { font-family: var(--f-mono); font-size: 12px; }
.o-box { border: 2px dashed currentColor; border-radius: 6px; }
.o-box.is-mark { color: #10b3a3; background: rgba(16, 179, 163, .1); }
.o-box.is-ng { color: var(--warn); background: rgba(255, 154, 60, .14); border-style: solid; }
.o-ghost { position: absolute; inset: 0; z-index: 4; pointer-events: none; border: 2px dashed rgba(47, 128, 255, .8); border-radius: 2px; opacity: 0; transform: translate(-26px, 18px) rotate(4deg); transition: transform 1.1s var(--ease-out), opacity .4s; background-image: linear-gradient(rgba(47, 128, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 128, 255, .12) 1px, transparent 1px); background-size: 28px 28px; }
.o-csv { position: absolute; left: 22px; right: 22px; bottom: 64px; z-index: 7; border-radius: 16px; padding: 14px 16px; background: rgba(4, 9, 20, .92); border: 1px solid rgba(94, 240, 255, .35); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .6s var(--ease-out); }
.o-csv p { font-size: 10px; color: rgba(214, 226, 255, .55); margin-bottom: 6px; display: flex; justify-content: space-between; text-transform: none; }
.o-csv pre { margin: 0; font-family: var(--f-mono); font-size: 11px; line-height: 1.7; color: var(--scan); white-space: pre; overflow: hidden; text-overflow: ellipsis; }

/* step visual states */
.o-stage .doc { transform: translate(22px, 18px) rotate(-4.2deg) scale(.95); filter: contrast(.88) brightness(.95) saturate(.8); }
.o-stage.is-s1 .doc { transform: none; filter: none; }
.o-stage[data-step="1"] .o-ghost { opacity: 1; transform: none; }
.o-stage[data-step="2"] .doc .p, .o-stage[data-step="3"] .doc .p { opacity: .1; }
.o-stage[data-step="2"] .doc__tbl th, .o-stage[data-step="2"] .doc__tbl td, .o-stage[data-step="2"] .doc__cells b, .o-stage[data-step="2"] .doc__seal-box,
.o-stage[data-step="3"] .doc__tbl th, .o-stage[data-step="3"] .doc__tbl td, .o-stage[data-step="3"] .doc__cells b, .o-stage[data-step="3"] .doc__seal-box { border-color: rgba(125, 156, 194, .12); }
.o-stage[data-step="2"] .doc__tbl th, .o-stage[data-step="3"] .doc__tbl th { background: transparent; }
.o-stage.is-s3 .doc__strk { opacity: .18; transition: opacity .8s .6s; }
.o-stage[data-step="2"] .o-ov.ov-2, .o-stage[data-step="3"] .o-ov.ov-3, .o-stage[data-step="4"] .o-ov.ov-4,
.o-stage[data-step="5"] .o-ov.ov-5, .o-stage[data-step="1"] .o-ov.ov-1, .o-stage[data-step="0"] .o-ov.ov-0 { opacity: 1; transform: none; }
.o-stage[data-step="6"] .o-csv { opacity: 1; transform: none; }
.o-stage[data-step="6"] .doc { transform: scale(.94) translateY(-14px); filter: brightness(.82); }

.o-steps { display: grid; }
.o-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 0; opacity: .3; transition: opacity .5s; }
.o-step.is-active { opacity: 1; }
.o-step:first-child { min-height: 60vh; }
.o-step:last-child { min-height: 80vh; }
.o-step__num { color: var(--scan); }
.o-step h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.4; margin: 10px 0 16px; }
.o-step p { color: var(--muted); font-size: 15.5px; line-height: 2; max-width: 30em; }
.o-step strong { color: var(--fg); font-weight: 700; }
.o-step__tag { margin-top: 18px !important; color: var(--scan) !important; font-size: 10.5px !important; }

@media (max-width: 960px) {
  .o-flow__grid { grid-template-columns: 1fr; gap: 0; }
  .o-flow__sticky { top: calc(var(--nav-h) + 6px); height: 54vh; min-height: 0; z-index: 3; }
  .o-stage { border-radius: 20px; }
  .o-stage__paper { inset: 14px 14px 52px; }
  .o-stage__caption { font-size: 12.5px; bottom: 14px; gap: 10px; }
  .o-stage__caption .mono { white-space: nowrap; flex: none; }
  .o-stage__caption b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .o-step { min-height: 64vh; padding: 24px 0; }
  .o-step:first-child { min-height: 50vh; }
  .o-step p { font-size: 14.5px; }
  .o-csv { bottom: 44px; left: 12px; right: 12px; }
}

/* ---------- Accuracy ---------- */
.o-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.o-stat { padding: 34px 28px 30px 0; }
.o-stat + .o-stat { padding-left: 28px; border-left: 1px solid var(--line); }
.o-stat__num { display: flex; align-items: baseline; gap: 6px; }
.o-stat__num b { font-family: var(--f-serif-en); font-weight: 600; font-size: clamp(64px, 7vw, 110px); line-height: 1; letter-spacing: -.02em; background: linear-gradient(120deg, #2f80ff, #1747c8); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; font-variant-numeric: tabular-nums; }
.o-stat__num span { font-size: 20px; color: var(--muted); }
.o-stat__label { color: var(--muted); font-size: 14px; margin-top: 8px; }
@media (max-width: 760px) { .o-stats { grid-template-columns: 1fr; } .o-stat, .o-stat + .o-stat { padding: 24px 0; border-left: 0; } .o-stat + .o-stat { border-top: 1px solid var(--line); } }

.o-guards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: clamp(56px, 7vw, 90px); }
.o-guard { padding: 28px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 60px -45px rgba(10, 22, 48, .4); }
.o-guard h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 21px; margin: 22px 0 10px; }
.o-guard p { color: var(--muted); font-size: 14.5px; line-height: 1.95; }
.o-guard__viz { height: 148px; border-radius: 16px; background: #f1f5fb; border: 1px solid rgba(10, 22, 48, .06); padding: 16px 18px; display: grid; align-content: center; gap: 8px; position: relative; overflow: hidden; color: #0a1630; }
.o-cmp { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12px; padding: 10px 12px; border-radius: 10px; background: #fff; }
.o-cmp__k { color: #4a5878; }
.o-cmp b { display: flex; align-items: center; gap: 6px; font-family: 'Yomogi', cursive; font-weight: 400; font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; }
.o-cmp b i { flex: none; font-style: normal; font-family: var(--f-mono); font-size: 10px; color: #fff; background: #1f5fe0; border-radius: 4px; width: 16px; text-align: center; }
.o-cmp em { font-style: normal; font-size: 11px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.o-cmp em.ok { background: rgba(52, 211, 153, .18); color: #0f8a68; }
.o-cmp em.ng { background: rgba(255, 154, 60, .2); color: #c4560f; }
.o-cmp.is-ng { background: #fff6ee; }
.o-conf { display: grid; grid-template-columns: 4em 1fr 3em; align-items: center; gap: 10px; font-size: 12.5px; position: relative; z-index: 1; }
.o-conf i { height: 8px; border-radius: 6px; background: rgba(10, 22, 48, .08); position: relative; overflow: hidden; }
.o-conf i::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--c)); background: var(--ok); border-radius: inherit; }
.o-conf.is-low i::after { background: var(--warn); }
.o-conf b { font-family: var(--f-mono); font-size: 12px; font-weight: 500; text-align: right; }
.o-conf.is-low b { color: #c4560f; }
.o-conf__lines { position: absolute; left: calc(18px + 4em + 10px); right: calc(18px + 3em + 10px); top: 10px; bottom: 10px; pointer-events: none; }
.o-conf__lines em { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 100%); border-left: 1px dashed rgba(10, 22, 48, .35); font-style: normal; font-family: var(--f-mono); font-size: 9px; color: rgba(10, 22, 48, .55); padding-left: 3px; }
.o-ink { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; font-size: 12.5px; background: #fff; padding: 6px 10px; border-radius: 8px; }
.o-ink__box { width: 54px; height: 40px; border: 1.4px solid var(--print-line); display: grid; place-items: center; font-size: 24px; }
.o-ink em { font-style: normal; color: #4a5878; }
.o-ink b { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 154, 60, .2); color: #c4560f; font-weight: 500; }
.o-strike { font-size: 22px; background: #fff; padding: 12px 14px; border-radius: 8px; text-align: center; }
.o-strike s { text-decoration: none; position: relative; color: var(--ink); }
.o-strike s::after { content: ''; position: absolute; left: -4px; right: -4px; top: 52%; height: 2.4px; background: var(--ink); transform: rotate(-5deg); }
.o-strike s::before { content: ''; position: absolute; inset: -6px -9px; border: 2px solid var(--warn); border-radius: 6px; animation: o-pulse 2s ease-in-out infinite; }
@keyframes o-pulse { 50% { opacity: .35; } }
.o-strike__res { text-align: center; color: #c4560f; font-size: 10.5px !important; }
@media (max-width: 860px) { .o-guards { grid-template-columns: 1fr; } }

/* ---------- Deploy ---------- */
.o-mode { border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)); padding: clamp(18px, 2.4vw, 32px); }
.o-mode__switch { position: relative; display: inline-grid; grid-template-columns: repeat(3, 1fr); border-radius: 999px; padding: 5px; background: rgba(4, 9, 20, .5); border: 1px solid var(--line); margin-bottom: 26px; --i: 1; }
.o-mode__switch button { position: relative; z-index: 1; height: 42px; padding: 0 24px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .3s; white-space: nowrap; }
.o-mode__switch button.is-active { color: #fff; }
.o-mode__thumb { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px; background: linear-gradient(135deg, #3b8bff, #1d56d8); box-shadow: 0 8px 24px -8px rgba(47, 128, 255, .9); transform: translateX(calc(var(--i) * 100%)); transition: transform .5s var(--ease-out); }
.o-mode__body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center; }
.o-arch__svg { width: 100%; height: auto; overflow: visible; font-family: var(--f-sans); }
.o-arch__zone { fill: rgba(47, 128, 255, .05); stroke: rgba(143, 211, 255, .45); stroke-width: 1.4; stroke-dasharray: 6 6; transition: stroke .5s, fill .5s; }
.o-arch__zone-label { fill: rgba(214, 226, 255, .6); font-size: 15px; letter-spacing: .08em; }
.o-arch__zone-label--out { fill: rgba(214, 226, 255, .4); }
.o-arch__edge { fill: none; stroke: rgba(150, 185, 255, .22); stroke-width: 2; transition: stroke .5s, opacity .5s; }
.o-arch__node rect, .o-arch__node > path:first-child { fill: #0e1d40; stroke: rgba(143, 211, 255, .45); stroke-width: 1.4; transition: fill .5s, stroke .5s, opacity .5s; }
.o-arch__node text { fill: #e8f0ff; font-size: 14px; text-anchor: middle; }
.o-arch__node .t-big { font-size: 19px; font-weight: 700; font-family: var(--f-mono); letter-spacing: .04em; }
.o-arch__node .t-sub { fill: rgba(214, 226, 255, .6); font-size: 12.5px; }
.o-arch__node .ic { fill: none; stroke: #8fd3ff; stroke-width: 1.8; }
.n-ocr rect { fill: #13306e !important; stroke: #5aa8ff !important; stroke-width: 2 !important; filter: drop-shadow(0 0 18px rgba(47, 128, 255, .45)); }
.n-cloud > path:first-child { fill: #0e1d40; }
.o-arch__node, .o-arch__block, .o-arch__edge { transition: opacity .5s; }
.o-arch__block circle { fill: rgba(255, 100, 116, .15); stroke: var(--ng); stroke-width: 1.6; }
.o-arch__block path { stroke: var(--ng); stroke-width: 2.2; stroke-linecap: round; }
.o-arch__block text { fill: var(--ng); font-size: 13px; }
.o-arch__packets circle { fill: #bff6ff; filter: drop-shadow(0 0 6px #5ef0ff); }
/* mode states */
[data-mode-root][data-mode="onprem"] .n-cloud { opacity: .25; }
[data-mode-root][data-mode="onprem"] .e-cloud, [data-mode-root][data-mode="onprem"] .e-cloud-back { opacity: .12; }
[data-mode-root][data-mode="onprem"] .o-arch__block { opacity: 1; }
[data-mode-root]:not([data-mode="onprem"]) .o-arch__block { opacity: 0; }
[data-mode-root][data-mode="cloud"] .n-local, [data-mode-root][data-mode="cloud"] .e-local { opacity: .15; }
[data-mode-root][data-mode="cloud"] .n-cloud > path:first-child { fill: #13306e; stroke: #5aa8ff; }
[data-mode-root][data-mode="cloud"] .e-cloud, [data-mode-root][data-mode="cloud"] .e-cloud-back,
[data-mode-root][data-mode="hybrid"] .e-cloud, [data-mode-root][data-mode="hybrid"] .e-cloud-back { stroke: url(#g-edge); opacity: .9; }
[data-mode-root] .e-in, [data-mode-root] .e-out { stroke: url(#g-edge); opacity: .9; }
[data-mode-root][data-mode="onprem"] .e-local, [data-mode-root][data-mode="hybrid"] .e-local { stroke: url(#g-edge); opacity: .9; }
[data-mode-root][data-mode="onprem"] .o-arch__zone { stroke: var(--ok); fill: rgba(52, 211, 153, .05); }

.o-mode__info { position: relative; min-height: 290px; }
.o-mode__panel { position: absolute; inset: 0; opacity: 0; transform: translateY(12px); transition: opacity .45s, transform .5s var(--ease-out); pointer-events: none; }
.o-mode__panel.is-active { position: relative; opacity: 1; transform: none; pointer-events: auto; }
.o-mode__kicker { color: var(--scan); }
.o-mode__panel h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: clamp(24px, 2.2vw, 30px); margin: 8px 0 14px; }
.o-mode__panel p { color: var(--muted); font-size: 15px; line-height: 2; }
.o-mode__panel strong { color: var(--fg); }
@media (max-width: 1200px) { .o-mode__body { grid-template-columns: 1fr; } .o-mode__info { min-height: 0; } }
@media (max-width: 520px) { .o-mode__switch { display: grid; width: 100%; } .o-mode__switch button { padding: 0 8px; font-size: 13px; } }

/* ---------- Automation line ---------- */
.o-line { border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)); padding: clamp(20px, 3vw, 40px); }
.o-line__track { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding-bottom: 120px; }
.o-line__track::before { content: ''; position: absolute; left: 8%; right: 8%; top: 38px; height: 2px; background: linear-gradient(90deg, rgba(94, 240, 255, .5), rgba(47, 128, 255, .5)); }
.o-line__node { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: 6px; }
.o-line__ic { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: #0e1d40; border: 1px solid rgba(143, 211, 255, .35); transition: transform .4s var(--ease-out), box-shadow .4s, border-color .4s; }
.o-line__ic svg { width: 32px; height: 32px; fill: none; stroke: #8fd3ff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.o-line__node b, .o-line__review b { font-size: 14px; font-weight: 700; }
.o-line__node small, .o-line__review small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.o-line__node--core .o-line__ic { background: linear-gradient(135deg, #2b6cff, #1745c0); border-color: #8fd3ff; box-shadow: 0 0 30px rgba(47, 128, 255, .5); }
.o-line__node--core .o-line__ic svg { stroke: #fff; }
.o-line__node.is-hit .o-line__ic, .o-line__review.is-hit .o-line__ic { transform: scale(1.1); border-color: var(--scan); box-shadow: 0 0 0 6px rgba(94, 240, 255, .15), 0 0 30px rgba(94, 240, 255, .5); }
.o-line__review { position: absolute; z-index: 1; left: calc(50% + 5px); bottom: 0; width: calc((100% - 50px) / 6); display: grid; justify-items: center; text-align: center; gap: 4px; transform: translateX(-50%); }
.o-line__review .o-line__ic { width: 58px; height: 58px; border-radius: 18px; border-color: rgba(255, 154, 60, .6); background: rgba(255, 154, 60, .1); }
.o-line__review .o-line__ic svg { stroke: var(--warn); width: 26px; height: 26px; }
.o-line__review::before { content: ''; position: absolute; top: -66px; height: 60px; left: 50%; border-left: 2px dashed rgba(255, 154, 60, .45); }
.o-line__packets { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.o-pkt { position: absolute; left: 0; top: 0; width: 26px; height: 32px; margin: -16px 0 0 -13px; border-radius: 4px; background: #fbfaf4; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), 0 6px 18px rgba(0, 0, 0, .5), 0 0 18px rgba(94, 240, 255, .5); }
.o-pkt::before { content: ''; position: absolute; left: 5px; right: 5px; top: 7px; height: 14px; background: repeating-linear-gradient(180deg, #7d9cc2 0 1.5px, transparent 1.5px 4.5px); }
.o-pkt.is-review { box-shadow: 0 0 0 2px var(--warn), 0 6px 18px rgba(0, 0, 0, .5), 0 0 18px rgba(255, 154, 60, .6); }
.o-pkt.is-data { background: var(--scan); border-radius: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.o-pkt.is-data::before { display: none; }
.o-line__panel { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 20px 28px; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; }
.o-line__stats { display: flex; gap: 26px; }
.o-line__stats div { display: grid; }
.o-line__stats .mono { font-size: 10px; color: var(--muted); }
.o-line__stats b { font-family: var(--f-serif-en); font-size: 38px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.o-line__log { height: 112px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; font-size: 11px; color: rgba(214, 226, 255, .7); text-transform: none; letter-spacing: .02em; mask-image: linear-gradient(transparent, #000 40%); }
.o-line__log li { flex: none; line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: o-rowIn .35s var(--ease-out) both; }
.o-line__log .t { color: var(--scan); margin-right: 8px; }
.o-line__log .w { color: var(--warn); }
.o-line__log .ok { color: var(--ok); }
@media (max-width: 960px) {
  .o-line__panel { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .o-line__track { grid-template-columns: 1fr; gap: 14px; padding: 0 0 0 0; }
  .o-line__track::before { left: 37px; right: auto; top: 30px; bottom: 30px; width: 2px; height: auto; background: linear-gradient(180deg, rgba(94, 240, 255, .5), rgba(47, 128, 255, .5)); }
  .o-line__node { grid-template-columns: 76px 1fr; justify-items: start; text-align: left; column-gap: 16px; row-gap: 0; align-items: center; }
  .o-line__node .o-line__ic { grid-row: span 2; }
  .o-line__review { position: relative; left: auto; bottom: auto; width: auto; transform: none; grid-template-columns: 76px 1fr; justify-items: start; text-align: left; column-gap: 16px; row-gap: 0; margin-left: 46px; }
  .o-line__review .o-line__ic { grid-row: span 2; justify-self: center; }
  .o-line__review::before { display: none; }
  /* vertical order: FAX → folder → OCR → (review) → CSV → RPA → core */
  .o-line__review { order: 1; }
  .o-line__node[data-node="3"], .o-line__node[data-node="4"], .o-line__node[data-node="5"] { order: 2; }
}

.o-auto__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
@media (max-width: 860px) { .o-auto__cards { grid-template-columns: 1fr; } }

/* ---------- Demo responsive ---------- */
@media (max-width: 640px) {
  .o-demo { padding: 10px; border-radius: 20px; }
  .o-demo__body { grid-template-columns: 1fr; }
  .o-demo__tabs button { padding: 0 11px; font-size: 12px; }
  .o-xr__list { min-height: 0; max-height: 330px; }
}

/* Cormorant's default old-style "1" reads like a capital I — use lining figures for all numbers */
.o-line__stats b, .o-stat__num b { font-variant-numeric: lining-nums tabular-nums; }
