/* ═══════════════════════════════════════════════════════════════
   MARMO — home. Loaded after marmo.css and marmo-demo.css (demo diagrams).
   The script in index.php adds .is-js: without it every alternative (the four ledger examples, the four service
   families, each demo) stays on the page, one under the other.
   ═══════════════════════════════════════════════════════════════ */
.home-m { line-height: normal; }
.home-m button { cursor: pointer; }
.home-m:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }

/* ── Opening ── */
.home-m .hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px var(--pad) 48px; }
.home-m .hero .display { font-size: clamp(44px, 4.4vw, 62px); margin-top: 20px; }
.home-m .hero .lead { max-width: 640px; margin-top: 24px; }
.home-m .hero .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ── Work ledger over the picture (fallen columns, 2026-11-29) ── */
.home-m .ledger-sec { position: relative; padding: 16px var(--pad) 160px; }
.home-m .ledger-art { position: absolute; left: 0; bottom: 0; width: 100%; max-width: none; height: 740px; object-fit: cover; object-position: 50% 40%; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 52%, #000 84%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 52%, #000 84%, transparent 100%); pointer-events: none; }
.home-m .ledger { position: relative; max-width: 1120px; margin: 0 auto; min-height: 600px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.home-m .lg-top { min-height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.home-m .lg-name { font-size: 19px; color: var(--ink); }
.home-m .lg-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); flex: 1; }
.home-m .lg-tabs { border-right: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.home-m .lg-tab { display: none; align-items: center; gap: 6px; width: 100%; min-height: 52px; flex: none; border: 0; border-radius: 4px; padding: 0 12px; font-size: 15px; font-weight: 600; text-align: left; background: transparent; color: var(--text); }
.home-m.is-js .lg-tab { display: flex; }
.home-m .lg-tab.on { background: var(--inv-bg); color: var(--inv-fg); }
.home-m .lg-num { font-style: italic; font-size: 17px; font-weight: 400; width: 30px; flex: none; }
.home-m .lg-all { margin-top: auto; padding: 14px 12px; font-size: 14px; font-weight: 600; color: var(--red-text); }
.home-m .lg-stage { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.home-m .lg-panel { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(108px, auto) 1fr minmax(66px, auto); padding: 0 36px; min-width: 0; }
.home-m .lg-panel + .lg-panel { border-top: 1px solid var(--rule); }
/* With the script the four sit in the same cell: the card is as tall as the tallest, so a tab never moves the page */
.home-m.is-js .lg-panel { grid-area: 1 / 1; border-top: 0; visibility: hidden; }
.home-m.is-js .lg-panel.on { visibility: visible; }
/* ...and the entrance plays again each time one is picked */
.home-m.is-js .lg-panel:not(.on) :is(.up, .flow, .grow, .stamp) { animation: none; }
.home-m .lg-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--rule); padding: 10px 0; }
.home-m .lg-title { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.home-m .lg-kick { font-size: 13px; color: var(--muted); }
.home-m .lg-title h2 { font-weight: 400; font-size: 23px; line-height: 1.18; }
.home-m .stamp { flex: none; transform: rotate(-7deg); animation: mvstamp .45s ease .9s both; border: 2px solid var(--red-text); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--red-text); color: var(--red-text); border-radius: 50%; min-width: 132px; height: 62px; padding: 0 14px; display: flex; align-items: center; justify-content: center; font-style: italic; font-size: 21px; white-space: nowrap; }
@keyframes mvstamp { from { opacity: 0; transform: rotate(-7deg) scale(1.4); } to { opacity: 1; transform: rotate(-7deg) scale(1); } }
.home-m .lg-body { min-width: 0; display: flex; flex-direction: column; padding: 12px 0; }
.home-m .lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; color: var(--muted); }
.home-m .lg-foot a { flex: none; font-weight: 600; color: var(--red-text); padding: 10px 0; }
.home-m .lg-caption { display: none; }

/* Agent */
.home-m .agent-row { display: grid; grid-template-columns: 44px minmax(0, 210px) minmax(0, 160px) minmax(0, 1fr); gap: 14px; align-items: center; flex: 1; border-bottom: 1px solid var(--line); font-size: 15px; padding: 5px 0; }
.home-m .agent-row:last-child { border-bottom: 0; }
.home-m .agent-row.th { flex: none; min-height: 30px; font-size: 12px; color: var(--muted); padding: 0; }
.home-m .agent-row > i { font-family: var(--serif); color: var(--red-text); font-size: 20px; }
.home-m .agent-row strong { font-weight: 600; }
.home-m .tool { justify-self: start; max-width: 100%; font-size: 12px; border: 1px solid var(--fc); color: var(--fc); border-radius: 3px; padding: 3px 9px; overflow-wrap: anywhere; }

/* RAG */
.home-m .rag { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 350px); gap: 36px; }
.home-m .rag-answer { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.home-m .rag-answer .rag-text { font-weight: 300; font-size: 23px; line-height: 1.38; }
.home-m .rag-answer em { color: var(--red-text); white-space: nowrap; }
.home-m .rag-answer sup { color: var(--red-text); font-size: 14px; }
.home-m .rag-cite { margin-top: auto; font-size: 14px; color: var(--muted); line-height: 1.6; padding-bottom: 6px; }
.home-m .sheet { position: relative; align-self: stretch; background: var(--paper); border: 1px solid var(--line); box-shadow: 9px 9px 0 -1px var(--surface), 9px 9px 0 0 var(--line); padding: 18px 26px; margin: 4px 10px 10px 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.home-m .sheet-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.home-m .sheet h3 { font-weight: 400; font-size: 20px; text-align: center; }
.home-m .skel { height: 6px; flex: none; background: var(--skel); }
.home-m .mark { margin: 4px -10px; background: var(--mark); color: var(--ink); border-left: 3px solid var(--red-text); padding: 11px 12px; font-size: 16px; line-height: 1.45; }

/* Predictive */
.home-m .chart { flex: 1; min-height: 130px; position: relative; }
.home-m .chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-m .chart .axis { position: absolute; bottom: 2px; font-size: 12px; color: var(--muted); }
.home-m .stock { border-top: 1px solid var(--rule); margin-top: 10px; }
.home-m .stock-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 200px; gap: 18px; align-items: center; min-height: 36px; border-bottom: 1px solid var(--line); font-size: 14px; }
.home-m .stock-row:last-child { border-bottom: 0; }
.home-m .stock-row strong { font-weight: 600; }
.home-m .stock-row .short { display: none; }
.home-m .bar { display: block; height: 8px; background: var(--track); }
.home-m .bar span { display: block; height: 8px; background: var(--red); }
.home-m .stock-row .low { color: var(--red-deep); }
.home-m .stock-row .watch { color: var(--c-data); }
.home-m .bar.amber span { background: var(--c-data); }

/* Automation */
.home-m .auto-flow { position: relative; min-height: 168px; flex: none; margin-top: 6px; }
.home-m .auto-flow > svg { position: absolute; inset: 0 0 auto 0; width: 100%; max-width: none; height: 168px; }
.home-m .arches { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 60px; }
.home-m .arch { height: 112px; border: 1px solid var(--red-text); border-radius: 62px 62px 4px 4px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 8px 6px 0; text-align: center; }
.home-m .arch svg { flex: none; stroke: var(--red-text); }
.home-m .arch.end { background: var(--red); color: var(--on-red); border-color: var(--red); }
.home-m .arch.end svg { stroke: #fffaf4; }
.home-m .warn-box { position: absolute; right: 0; top: 126px; width: 150px; min-height: 40px; border: 1px solid var(--warn); background: var(--warn-bg); color: var(--warn); border-radius: 4px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 6px; font-size: 14px; font-weight: 600; }
.home-m .warn-label { position: absolute; right: 178px; top: 128px; font-size: 12px; color: var(--warn); }
.home-m .log { margin-top: auto; border-top: 1px solid var(--rule); }
.home-m .log-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 130px; gap: 16px; align-items: center; min-height: 42px; border-bottom: 1px solid var(--line); font-size: 14px; }
.home-m .log-row:last-child { border-bottom: 0; }
.home-m .log-row .t { color: var(--muted); }
.home-m .log-row b { text-align: right; }
.home-m .log-row .ok { color: var(--ok); }
.home-m .log-row .wn { color: var(--warn); }

/* ── Service families ── */
.home-m .fams { padding-top: 88px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 56px; }
.home-m .sec-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.home-m .sec-head p { font-size: 17px; color: var(--text); }
.home-m .fam-tabs { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.home-m.is-js .fam-tabs { display: grid; }
.home-m .fam-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 20px 22px 14px; border: 0; border-top: 6px solid var(--fc); border-radius: 10px 10px 0 0; min-height: 116px; background: var(--ft); color: var(--ink); transition: min-height .25s, background .25s; text-align: left; }
.home-m .fam-tab .num { font-style: italic; font-size: 20px; color: var(--fc); }
.home-m .fam-tab .name { max-width: 100%; font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }
.home-m .fam-tab.on { min-height: 132px; background: var(--fd); color: #fdf9f2; }
.home-m .fam-tab.on .num { color: #fdf9f2; }
/* the open tab's title has moved down into its spread (owner, 2026-11-28: never the same title twice); the words stay in the button */
.home-m.is-js .fam-tab .num, .home-m.is-js .fam-tab .name { transition: opacity .18s; }
.home-m.is-js .fam-tab.on .num, .home-m.is-js .fam-tab.on .name { opacity: 0; }
.home-m .spreads { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home-m .spread { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 340px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--fd); border-radius: 10px; overflow: hidden; }
.home-m.is-js .spreads { gap: 0; }
.home-m.is-js .spread { grid-area: 1 / 1; border-radius: 0 0 10px 10px; visibility: hidden; }
.home-m.is-js .spread.on { visibility: visible; }
.home-m.is-js .spread:not(.on) .up { animation: none; }
.home-m .spread .plate { padding: 30px 34px; display: flex; flex-direction: column; gap: 12px; background: var(--fd); color: #fdf9f2; }
.home-m .plate .num { font-style: italic; font-size: 52px; line-height: 1; opacity: .75; }
.home-m .plate .name { margin-top: auto; font-weight: 300; font-size: 28px; line-height: 1.1; overflow-wrap: anywhere; hyphens: auto; }
.home-m .plate p { font-size: 16px; line-height: 1.6; }
.home-m .spread ul { padding: 8px 36px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.home-m .spread li { border-top: 1px solid var(--line); margin-top: -1px; }
.home-m .srv { display: grid; grid-template-columns: 44px 230px minmax(0, 1fr) 20px; gap: 18px; align-items: center; min-height: 78px; padding: 6px 0; transition: background .2s, padding .2s; }
.home-m .srv:hover { background: var(--surface2); padding-left: 12px; }
.home-m .dot { width: 40px; height: 40px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; font-size: 19px; background: var(--fd); color: #fdf9f2; }
.home-m .srv .name { font-size: 20px; min-width: 0; }
.home-m .srv .txt { font-size: 15px; line-height: 1.5; color: var(--text); }
.home-m .srv .go { font-size: 20px; color: var(--fc); }

/* Phone accordion (shown by .m-only.flex from marmo.css) */
.home-m .acc { flex-direction: column; gap: 10px; }

/* ── Demos band ── */
.home-m .band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 104px 0 112px; }
.home-m .demos { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 56px; align-items: start; }
.home-m .demos-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.home-m .demos-side > p { font-size: 17px; line-height: 1.6; color: var(--text); }
.home-m .demo-list { display: none; flex-direction: column; margin-top: 14px; }
.home-m.is-js .demo-list { display: flex; }
.home-m .demo-pick { text-align: left; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; background: transparent; color: var(--ink); transition: background .25s; }
.home-m .demo-pick .name { font-size: 21px; display: flex; align-items: center; gap: 12px; }
.home-m .demo-pick .name::before { content: ''; width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--a); }
.home-m .demo-pick .line { font-size: 14px; line-height: 1.5; color: var(--text); padding-left: 24px; }
.home-m .demo-pick.on { background: var(--bg); box-shadow: inset 0 -3px 0 var(--ai); }
.home-m .stages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.home-m .stage { margin-top: 12px; min-width: 0; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; padding: 10px 10px 0; box-shadow: var(--shadow-s); background: var(--a); }
.home-m.is-js .stage { grid-area: 1 / 1; visibility: hidden; opacity: 0; }
.home-m.is-js .stage.on { visibility: visible; opacity: 1; transition: opacity .3s; }
.home-m.is-js .stage:not(.on) :is(.up, .flow, .grow) { animation: none; }
.home-m .stage-paper { min-height: 470px; flex: 1; background: var(--paper); display: flex; flex-direction: column; justify-content: center; padding: 36px 48px; }
.home-m .stage-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 26px; color: #fffaf4; }
.home-m .stage-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-m .stage-name { font-size: 22px; }
.home-m .stage-line { font-size: 14px; line-height: 1.5; }
.home-m.is-js .stage-line { display: none; }
/* the name is already in the list that picks the demo: under the preview only its button */
.home-m.is-js .stage-text { display: none; }
.home-m.is-js .stage-foot a { flex: 1; text-align: center; }
.home-m .stage-foot a { flex: none; background: #fbf9f5; color: #1c1715; border-radius: 3px; padding: 12px 22px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.home-m .stage-foot a:hover { color: #b01e26; }
.home-m .stage-foot a:focus-visible { outline-color: #fffaf4; }
.home-m .stage-note { font-size: 13px; opacity: .85; padding: 12px 0; }

/* ── Method: the four steps light up in turn ── */
.home-m .method { padding-top: 104px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 52px; align-items: center; }
.home-m .method .h2 { font-size: 40px; text-align: center; }
.home-m .steps { --sg: 40px; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sg); text-align: center; }
.home-m .steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.home-m .steps li:not(:last-child)::after,
.home-m .steps li:not(:last-child)::before { content: ''; position: absolute; top: 27px; left: calc(50% + 40px); width: calc(100% - 80px + var(--sg)); height: 2px; }
.home-m .steps li:not(:last-child)::after { background: var(--line); }
.home-m .steps li:not(:last-child)::before { background: var(--red-text); z-index: 1; transform-origin: left center; transform: scaleX(0); }
.home-m .ring { position: relative; z-index: 1; width: 56px; height: 56px; flex: none; border: 1px solid var(--red-text); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: italic; font-size: 22px; color: var(--red-text); background: var(--bg); }
.home-m .steps h3 { font-weight: 400; font-size: 22px; }
.home-m .steps .price { font-size: 13px; font-weight: 700; color: var(--bronze); }
.home-m .steps p { font-size: 15px; line-height: 1.6; color: var(--text); }
@keyframes mvstep1 { 0%, 2% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(176,30,38,0); } 5% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.18); box-shadow: 0 0 0 0 rgba(200,50,58,.55); } 16% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 18px rgba(200,50,58,0); } 90% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 0 rgba(200,50,58,0); } 96%, 100% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(200,50,58,0); } }
@keyframes mvstep2 { 0%, 21% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(176,30,38,0); } 24% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.18); box-shadow: 0 0 0 0 rgba(200,50,58,.55); } 35% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 18px rgba(200,50,58,0); } 90% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 0 rgba(200,50,58,0); } 96%, 100% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(200,50,58,0); } }
@keyframes mvstep3 { 0%, 40% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(176,30,38,0); } 43% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.18); box-shadow: 0 0 0 0 rgba(200,50,58,.55); } 54% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 18px rgba(200,50,58,0); } 90% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 0 rgba(200,50,58,0); } 96%, 100% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(200,50,58,0); } }
@keyframes mvstep4 { 0%, 59% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(176,30,38,0); } 62% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.18); box-shadow: 0 0 0 0 rgba(200,50,58,.55); } 73% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 18px rgba(200,50,58,0); } 90% { background: var(--red); color: #fffaf4; border-color: var(--red); transform: scale(1.06); box-shadow: 0 0 0 0 rgba(200,50,58,0); } 96%, 100% { background: var(--bg); color: var(--red-text); border-color: var(--red-text); transform: scale(1); box-shadow: 0 0 0 0 rgba(200,50,58,0); } }
.home-m .steps li:nth-child(1) .ring { animation: mvstep1 8s ease-in-out infinite; }
.home-m .steps li:nth-child(2) .ring { animation: mvstep2 8s ease-in-out infinite; }
.home-m .steps li:nth-child(3) .ring { animation: mvstep3 8s ease-in-out infinite; }
.home-m .steps li:nth-child(4) .ring { animation: mvstep4 8s ease-in-out infinite; }
@keyframes mvlineX1 { 0%, 10% { transform: scaleX(0); opacity: 1; } 23%, 90% { transform: scaleX(1); opacity: 1; } 96% { transform: scaleX(1); opacity: 0; } 97%, 100% { transform: scaleX(0); opacity: 0; } }
@keyframes mvlineX2 { 0%, 29% { transform: scaleX(0); opacity: 1; } 42%, 90% { transform: scaleX(1); opacity: 1; } 96% { transform: scaleX(1); opacity: 0; } 97%, 100% { transform: scaleX(0); opacity: 0; } }
@keyframes mvlineX3 { 0%, 48% { transform: scaleX(0); opacity: 1; } 61%, 90% { transform: scaleX(1); opacity: 1; } 96% { transform: scaleX(1); opacity: 0; } 97%, 100% { transform: scaleX(0); opacity: 0; } }
@keyframes mvlineY1 { 0%, 10% { transform: scaleY(0); opacity: 1; } 23%, 90% { transform: scaleY(1); opacity: 1; } 96% { transform: scaleY(1); opacity: 0; } 97%, 100% { transform: scaleY(0); opacity: 0; } }
@keyframes mvlineY2 { 0%, 29% { transform: scaleY(0); opacity: 1; } 42%, 90% { transform: scaleY(1); opacity: 1; } 96% { transform: scaleY(1); opacity: 0; } 97%, 100% { transform: scaleY(0); opacity: 0; } }
@keyframes mvlineY3 { 0%, 48% { transform: scaleY(0); opacity: 1; } 61%, 90% { transform: scaleY(1); opacity: 1; } 96% { transform: scaleY(1); opacity: 0; } 97%, 100% { transform: scaleY(0); opacity: 0; } }
.home-m .steps li:nth-child(1)::before { animation: mvlineX1 8s linear infinite; }
.home-m .steps li:nth-child(2)::before { animation: mvlineX2 8s linear infinite; }
.home-m .steps li:nth-child(3)::before { animation: mvlineX3 8s linear infinite; }

/* ── Closing invitation (no painting here) ── */
.home-m .closing { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding: 96px 24px 104px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent 0, var(--tint-red) 100%); }
.home-m .closing h2 { font-weight: 300; font-style: italic; font-size: clamp(46px, 4.6vw, 68px); line-height: 1; }
.home-m .closing p { font-size: 18px; }

@media (prefers-reduced-motion: reduce) {
    .home-m .stamp,
    .home-m .steps .ring,
    .home-m .steps li::before { animation: none !important; }
    .home-m .srv, .home-m .fam-tab, .home-m .demo-pick, .home-m.is-js .stage.on { transition: none; }
}

/* ═══ Between the two mock-up widths ═══ */
@media (max-width: 1180px) {
    .home-m .lg-grid { grid-template-columns: 230px minmax(0, 1fr); }
    .home-m .lg-panel { padding: 0 24px; }
    .home-m .agent-row { grid-template-columns: 30px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
    .home-m .rag { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px; }
    .home-m .arches { gap: 24px; }
    .home-m .stock-row { grid-template-columns: 100px minmax(0, 1fr) 160px; gap: 14px; }
    .home-m .fam-tab { padding-left: 16px; padding-right: 16px; }
    .home-m .fam-tab .name { font-size: 20px; }
    .home-m .spread { grid-template-columns: 270px minmax(0, 1fr); }
    .home-m .spread .plate { padding: 26px 22px; }
    .home-m .plate .name { font-size: 23px; }
    .home-m .spread ul { padding: 8px 24px; }
    .home-m .srv { grid-template-columns: 40px minmax(0, 190px) minmax(0, 1fr) 18px; gap: 14px; }
    .home-m .srv .name { font-size: 21px; }
    .home-m .demos { grid-template-columns: 320px minmax(0, 1fr); gap: 32px; }
    .home-m .stage-paper { padding: 32px 28px; }
    .home-m .stage-foot { flex-wrap: wrap; }
    .home-m .steps { --sg: 24px; }
}

@media (max-width: 960px) {
    .home-m .fam-tab { padding-left: 12px; padding-right: 12px; }
    .home-m .fam-tab .name { font-size: 18px; }

    /* ledger: the tabs go on top, in one row */
    .home-m .lg-grid { display: flex; flex-direction: column; }
    .home-m .lg-tabs { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .home-m .lg-tab { min-height: 48px; justify-content: center; text-align: center; font-size: 14px; padding: 4px 6px; }
    .home-m .lg-num { display: none; }
    .home-m .lg-all { grid-column: 1 / -1; margin: 0; padding: 8px 6px 2px; text-align: right; }
    .home-m .lg-panel { flex: 1; }
    .home-m .lg-stage { flex: 1; }

    .home-m .spread { grid-template-columns: 220px minmax(0, 1fr); }
    .home-m .spread .plate { padding: 24px 20px; }
    .home-m .plate .num { font-size: 46px; }
    .home-m .plate .name { font-size: 26px; }
    .home-m .plate p { font-size: 14px; }
    .home-m .spread ul { padding: 8px 20px; }
    .home-m .srv { grid-template-columns: 40px minmax(0, 1fr) 18px; row-gap: 2px; padding: 10px 0; }
    .home-m .srv .dot { grid-column: 1; grid-row: 1 / 3; }
    .home-m .srv .name { grid-column: 2; grid-row: 1; }
    .home-m .srv .txt { grid-column: 2; grid-row: 2; font-size: 14px; }
    .home-m .srv .go { grid-column: 3; grid-row: 1 / 3; }

    .home-m .demos { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .home-m .demos-side { text-align: center; gap: 14px; }
    .home-m.is-js .demo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .home-m .demo-pick { text-align: left; border: 1px solid var(--line); border-radius: 6px; }
    .home-m .stage { margin-top: 0; }

    .home-m .steps { --sg: 16px; }
    .home-m .steps h3 { font-size: 20px; }
    .home-m .steps p { font-size: 14px; }
    .home-m .method .h2 { font-size: 32px; }
}

/* ═══ Phone ═══ */
@media (max-width: 760px) {
    /* quiet opening */
    .home-m .hero { padding: 56px 26px; }
    .home-m .hero .kick { display: none; }
    .home-m .hero .display { font-size: 44px; margin-top: 0; }
    .home-m .hero .display br { display: none; }
    .home-m .hero .display em { display: block; }
    .home-m .hero .lead { margin-top: 22px; max-width: 300px; }
    .home-m .hero .actions { width: 100%; flex-direction: column; align-items: center; gap: 6px; margin-top: 34px; }
    .home-m .hero .actions .btn { width: 100%; min-height: 52px; padding: 0 12px; }
    .home-m .hero .actions .btn-line { border: 0; min-height: 44px; width: auto; color: var(--red-text); }

    /* lighter card: one row of tabs, a title, the figure, one link */
    .home-m .ledger-sec { padding: 0 14px 120px; }
    .home-m .ledger-art { height: 440px; }
    .home-m .ledger { min-height: 0; }
    .home-m .lg-top { display: none; }
    .home-m .lg-tabs { gap: 2px; padding: 4px; margin: 12px 12px 0; border: 0; border-radius: 8px; background: var(--surface2); }
    .home-m .lg-tab { min-height: 44px; min-width: 0; border-radius: 6px; font-size: 13px; padding: 0 2px; overflow-wrap: anywhere; line-height: 1.15; }
    .home-m .lg-tab.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.14); }
    .home-m:lang(ja) .lg-tabs { grid-template-columns: 1.7fr 1fr 1fr 1fr; }   /* the first word is twice as long as the others */
    .home-m:not(.is-js) .lg-tabs { display: none; }   /* without the script only the link is left: the footer has it too */
    .home-m .lg-all { display: none; }
    .home-m .lg-panel { grid-template-rows: minmax(96px, auto) minmax(300px, 1fr) minmax(58px, auto); padding: 0 18px; }
    .home-m .lg-head { justify-content: flex-start; }
    .home-m .lg-head .lg-kick, .home-m .lg-head .stamp, .home-m .lg-foot p { display: none; }
    .home-m .lg-title h2 { font-size: 21px; line-height: 1.25; }
    .home-m .lg-foot { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 0; }
    .home-m .lg-body { padding: 6px 0; }
    .home-m .agent-row.th { display: none; }
    .home-m .agent-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-content: center; }
    .home-m .agent-row > i { grid-row: 1 / 3; }
    .home-m .agent-row .tool { display: none; }
    .home-m .agent-row .found { color: var(--muted); font-size: 14px; grid-column: 2; }
    .home-m .rag { display: flex; flex-direction: column; gap: 14px; }
    .home-m .rag-answer { padding-top: 8px; gap: 6px; }
    .home-m .rag-answer .rag-text { font-size: 22px; }
    .home-m .rag-answer em { white-space: normal; }
    .home-m .rag-cite { display: none; }
    .home-m .sheet { margin: 0; box-shadow: none; padding: 14px 18px; gap: 8px; align-self: auto; }
    .home-m .sheet h3, .home-m .sheet .skel { display: none; }
    .home-m .mark { margin: 0 -6px; }
    .home-m .stock-row { grid-template-columns: 86px minmax(0, 1fr) 106px; gap: 10px; min-height: 38px; font-size: 13px; }
    .home-m .stock-row .long { display: none; }
    .home-m .stock-row .short { display: inline; }
    .home-m .auto-flow { min-height: 0; margin-top: 4px; }
    .home-m .auto-flow > svg { display: none; }
    .home-m .arches { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .home-m .arch { height: auto; min-height: 42px; border-radius: 21px 4px 4px 21px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 4px 16px; text-align: left; }
    .home-m .warn-box { position: static; width: auto; margin-top: 6px; }
    .home-m .log { margin-top: auto; }
    .home-m .log-row { grid-template-columns: 46px minmax(0, 1fr); min-height: 38px; font-size: 13px; gap: 8px; }
    .home-m .log-row b, .home-m .log-row.extra { display: none; }
    .home-m .lg-caption { display: block; position: relative; z-index: 1; text-align: center; font-size: 12px; color: #fffaf4; margin-top: 16px; text-shadow: 0 1px 8px rgba(0,0,0,.7); }

    /* families: the accordion */
    .home-m .fams { padding-top: 56px; padding-bottom: 96px; gap: 26px; }
    .home-m .sec-head p { font-size: 16px; }
    .home-m .acc-item { border-radius: 10px; overflow: hidden; background: var(--ft); border: 1px solid transparent; }
    .home-m .acc-head { width: 100%; min-height: 68px; border: 0; background: transparent; color: var(--ink); display: grid; grid-template-columns: 36px minmax(0, 1fr) 24px; gap: 8px; align-items: center; text-align: left; padding: 10px 18px; }
    .home-m .acc-head .num { font-style: italic; font-size: 19px; color: var(--fc); }
    .home-m .acc-head .name { font-size: 22px; line-height: 1.15; }
    .home-m .acc-head .sign { font-size: 24px; text-align: right; color: var(--fc); }
    .home-m .acc-head .sign::before { content: '+'; }
    .home-m .acc-head[aria-expanded="true"] .sign::before { content: '\2212'; }
    .home-m:not(.is-js) .acc-head .sign { visibility: hidden; }
    .home-m:not(.is-js) .acc-item, .home-m .acc-item.on { background: var(--surface); border-color: var(--line); }
    .home-m:not(.is-js) .acc-head, .home-m .acc-item.on .acc-head { background: var(--fd); color: #fdf9f2; }
    .home-m:not(.is-js) .acc-head .num, .home-m .acc-item.on .num, .home-m .acc-item.on .sign { color: #fdf9f2; }
    .home-m.is-js .acc-item:not(.on) .acc-body { display: none; }
    .home-m .acc-body { padding: 6px 18px 8px; }
    .home-m .acc-body a { display: grid; grid-template-columns: minmax(0, 1fr) 18px; gap: 2px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
    .home-m .acc-body a:first-child { border-top: 0; }
    .home-m .acc-body .name { font-size: 20px; grid-column: 1; }
    .home-m .acc-body .txt { grid-column: 1; font-size: 14px; line-height: 1.5; color: var(--text); }
    .home-m .acc-body .go { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--fc); }

    .home-m .band { padding: 88px 0 96px; }
    .home-m .demos { gap: 18px; }
    .home-m .demos-side { gap: 12px; }
    .home-m.is-js .demo-list { margin-top: 6px; }
    .home-m .demo-pick { min-height: 48px; padding: 8px 12px; justify-content: center; }
    .home-m .demo-pick .name { font-size: 18px; gap: 8px; overflow-wrap: anywhere; }
    .home-m .demo-pick .name::before { width: 9px; height: 9px; }
    .home-m .demo-pick .line { display: none; }
    .home-m .stage { padding: 8px 8px 0; }
    .home-m .stage-paper { min-height: 440px; padding: 20px 16px; }
    .home-m .stage-foot { flex-direction: column; align-items: stretch; text-align: center; padding: 14px 8px 16px; gap: 10px; }
    .home-m .stage-foot a { text-align: center; padding: 14px; }

    .home-m .method { padding-top: 96px; padding-bottom: 24px; gap: 36px; }
    .home-m .method .h2 { font-size: 36px; }
    .home-m .steps { grid-template-columns: minmax(0, 1fr); gap: 0; text-align: left; }
    .home-m .steps li { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 4px; align-items: start; padding-bottom: 30px; }
    .home-m .steps li:not(:last-child)::after,
    .home-m .steps li:not(:last-child)::before { left: 23px; top: 52px; bottom: 4px; width: 2px; height: auto; }
    .home-m .steps li:not(:last-child)::before { transform-origin: center top; transform: scaleY(0); }
    .home-m .steps li:nth-child(1)::before { animation-name: mvlineY1; }
    .home-m .steps li:nth-child(2)::before { animation-name: mvlineY2; }
    .home-m .steps li:nth-child(3)::before { animation-name: mvlineY3; }
    .home-m .ring { width: 48px; height: 48px; grid-row: 1 / 4; font-size: 19px; }
    .home-m .steps h3 { font-size: 24px; }
    .home-m .steps p { font-size: 15px; }
    .home-m .closing { margin-top: 48px; padding: 80px 24px 88px; gap: 18px; }
    .home-m .closing h2 { font-size: 48px; }
    .home-m .closing p { font-size: 17px; max-width: 300px; }
}

@media (max-width: 360px) {
    .home-m .hero { padding-left: 20px; padding-right: 20px; }
    .home-m .hero .display { font-size: 38px; }
    .home-m .ledger-sec { padding-left: 10px; padding-right: 10px; }
    .home-m .lg-tabs { margin: 10px 8px 0; }
    .home-m .lg-tab { font-size: 12px; }
    .home-m .lg-panel { padding: 0 12px; }
    .home-m .stock-row { grid-template-columns: 74px minmax(0, 1fr) 92px; gap: 8px; }
    .home-m .closing h2 { font-size: 42px; }
}
/* phone: the small titles keep to one line (owner, 2026-11-29) */
@media (max-width: 760px) {
    .home-m .acc-head { grid-template-columns: 24px minmax(0, 1fr) 18px; padding: 10px 14px; }
    .home-m .acc-head .num { font-size: 16px; }
    .home-m .acc-head .name { font-size: 18.5px; }
    .home-m .steps h3 { font-size: 19px; }
}
@media (max-width: 400px) {   /* the four demo names, each on one line: a column is as wide as its longest name */
    .home-m.is-js .demo-list { grid-template-columns: repeat(2, auto); }
    .home-m .demo-pick { padding: 8px 10px; }
    .home-m .demo-pick .name { white-space: nowrap; }
}
@media (max-width: 360px) {
    .home-m .acc-head .name { font-size: 16px; }
    .home-m .steps h3 { font-size: 16.5px; }
    .home-m .demo-pick .name { font-size: 16px; }
    .home-m .lg-tab { padding: 0; }
}
