/* Shared marketing modules: section intros, tabs, a scrolling card rail,
   feature cards with drawn product miniatures, a knowledge-graph diagram,
   step rows, comparison tables and FAQ accordions. Used by the home,
   product and pricing pages in both languages.

   Visual language (public.css): white ground, neutral grays, no accent
   colour, Geist at weight 500 for headings, pill controls, 16-24px card
   radii. Product miniatures are drawn with HTML/CSS/SVG only (no bitmap
   screenshots) and are labelled as illustrations. Motion only animates
   transform and opacity on cubic-bezier(.22, 1, .36, 1); reduced motion
   turns every transition off. */
[data-site-public] {
  --m-ease: cubic-bezier(.22, 1, .36, 1);
  --m-ink: var(--site-color-ink);
  --m-copy: var(--site-color-copy);
  --m-muted: var(--site-color-muted);
  --m-quiet: var(--site-color-quiet);
  --m-line: var(--site-color-line);
  --m-line-strong: var(--site-color-line-strong);
  --m-surface: var(--site-color-surface);
  --m-surface-strong: var(--site-color-surface-strong);
  --m-subtle: var(--site-color-subtle);
  --m-fill: var(--site-color-fill);
  --m-fill-hover: var(--site-color-fill-hover);
}
.m-section { margin-top: var(--space-900); }
.m-section :where(h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; }
.m-section :where(ul, ol) { padding: 0; list-style: none; }

/* Section intro: a centred medium heading over a short muted line. */
.m-intro { max-width: 720px; margin: 0 auto var(--space-600); text-align: center; }
.m-intro--left { margin-inline: 0; text-align: left; }
.m-kicker { display: inline-flex; align-items: center; height: 28px; margin-bottom: var(--space-200); padding-inline: 12px; border-radius: var(--radius-full); background: var(--m-fill); color: var(--m-muted); font: var(--type-caption-4); }
.m-intro h2 { color: var(--m-ink); font: var(--type-heading-2); letter-spacing: -.025em; text-wrap: balance; }
:lang(zh) .m-intro h2 { letter-spacing: 0; line-height: 1.3; }
.m-intro p { max-width: 600px; margin: var(--space-200) auto 0; color: var(--m-muted); font: var(--type-body-7); text-wrap: balance; }
.m-intro--left p { margin-inline: 0; }

.m-link { position: relative; display: inline-flex; height: 36px; align-items: center; gap: var(--space-50); padding-inline: 14px 12px; border-radius: var(--radius-full); background: var(--m-fill); color: var(--m-ink); font: var(--type-button-sm); text-decoration: none; white-space: nowrap; transition: background-color 150ms var(--m-ease), transform 200ms var(--m-ease); }
.m-link::before { content: ''; position: absolute; inset: -4px -2px; }
.m-link::after { content: '→'; font-size: var(--fs-13); transition: transform 200ms var(--m-ease); }
.m-link:hover { background: var(--m-fill-hover); }
.m-link:hover::after { transform: translateX(2px); }
.m-link:active { transform: scale(.98); }

.m-panel-copy { max-width: 420px; }
.m-panel-copy h3 { font: var(--type-heading-3); letter-spacing: -.015em; text-wrap: balance; }
:lang(zh) .m-panel-copy h3 { letter-spacing: 0; line-height: 1.35; }
.m-panel-copy p { margin-top: var(--space-200); color: var(--m-copy); font: var(--type-body-7); text-wrap: pretty; }
.m-points { display: grid; gap: var(--space-100); margin-top: var(--space-300) !important; color: var(--m-copy); font: var(--type-body-6); font-size: var(--fs-15); }
.m-points li { display: flex; align-items: baseline; gap: var(--space-100); }
.m-points li::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--m-ink); transform: translateY(-2px); }
.m-panel-copy .m-link { margin-top: var(--space-400); }
@keyframes m-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Product miniatures: a white window on the gray stage. Text inside is
   decorative (aria-hidden) and set in spans, never paragraphs. */
.ui { position: relative; min-width: 0; color: var(--m-ink); font: var(--type-body-6); }
.ui-window { overflow: hidden; border-radius: var(--radius-2xl); background: var(--m-surface); border: 1px solid var(--m-line); box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.7); }
.ui-bar { display: flex; height: 44px; align-items: center; gap: var(--space-100); padding-inline: var(--space-200); border-bottom: 1px solid var(--m-line); }
.ui-dots { display: flex; gap: 6px; }
.ui-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--m-line-strong); }
.ui-title { overflow: hidden; color: var(--m-muted); font: var(--type-caption-4); white-space: nowrap; text-overflow: ellipsis; }
.ui-bar .ui-tag { margin-left: auto; }
.ui-body { display: grid; gap: var(--space-200); padding: var(--space-300); }
.ui-tag { display: inline-flex; flex: none; align-items: center; height: 24px; padding-inline: 10px; border-radius: var(--radius-full); background: var(--m-fill); color: var(--m-muted); font: var(--type-caption-5); white-space: nowrap; }
.ui-tag--ink { background: var(--m-ink); color: var(--site-color-paper); }
.ui-tag--line { background: var(--m-subtle); color: var(--m-muted); box-shadow: inset 0 0 0 1px var(--m-line-strong); }
.ui-btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding-inline: 14px; border-radius: var(--radius-full); background: var(--m-ink); color: var(--site-color-paper); font: var(--type-caption-4); white-space: nowrap; }
.ui-btn--soft { background: var(--m-fill); color: var(--m-ink); }
.ui-row { display: flex; align-items: center; gap: var(--space-100); min-width: 0; }
.ui-grow { flex: 1; min-width: 0; }
.ui-muted { color: var(--m-muted); }
.ui-small { font: var(--type-caption-5); }
.ui-strong { font-weight: 500; }

/* Chat */
.ui-bubble { justify-self: end; max-width: 78%; padding: 8px 14px; border-radius: 18px; background: var(--m-surface); border: 1px solid var(--m-line); font: var(--type-body-6); }
.ui-reply { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-100); max-width: 88%; }
.ui-avatar { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--m-ink) 0 3px, transparent 3.5px), var(--m-surface); box-shadow: inset 0 0 0 1px var(--m-line-strong); }
.ui-name { display: block; margin-bottom: 2px; color: var(--m-muted); font: var(--type-caption-4); }
.ui-text { display: block; font: var(--type-body-6); }
.ui-composer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-100); height: 44px; margin-top: var(--space-75); padding-inline: var(--space-200) 6px; border-radius: var(--radius-full); box-shadow: inset 0 0 0 1px var(--m-line-strong); color: var(--m-quiet); font: var(--type-caption-2); }
.ui-send { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--m-ink); }
.ui-send::before { content: ''; width: 10px; height: 10px; border-left: 1.6px solid var(--site-color-paper); border-top: 1.6px solid var(--site-color-paper); transform: translateY(2px) rotate(45deg); }

/* Recall cards */
.ui-stack { position: relative; padding-top: 20px; }
.ui-stack::before, .ui-stack::after { content: ''; position: absolute; left: 8%; right: 8%; top: 0; height: 40px; border-radius: var(--radius-xl); background: var(--m-subtle); }
.ui-stack::after { left: 4%; right: 4%; top: 10px; background: var(--m-surface); }
.ui-flash { position: relative; z-index: 1; display: grid; gap: var(--space-100); min-height: 168px; align-content: center; padding: var(--space-300); border-radius: var(--radius-xl); background: var(--m-surface); box-shadow: 0 0 0 1px var(--m-line-strong); text-align: center; }
.ui-flash .ui-q { font: var(--type-heading-5); text-wrap: balance; }
.ui-meter { display: flex; gap: 4px; }
.ui-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--m-line-strong); }
.ui-meter i.on { background: var(--m-ink); }

/* Exam options and list rows */
.ui-options { display: grid; gap: var(--space-75); }
.ui-option { display: flex; align-items: center; gap: var(--space-100); min-height: 44px; padding: 8px 14px; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--m-line); font: var(--type-body-6); }
.ui-option::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--m-line-strong); }
.ui-option.on { background: var(--m-subtle); box-shadow: inset 0 0 0 1.5px var(--m-ink); }
.ui-option.on::before { box-shadow: inset 0 0 0 5px var(--m-ink); }
.ui-list { display: grid; }
.ui-list > span { display: flex; align-items: center; gap: var(--space-100); min-height: 52px; border-top: 1px solid var(--m-line); }
.ui-list > span:first-child { border-top: 0; }
.ui-check { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--m-ink); }
.ui-check::before { content: ''; width: 8px; height: 4px; border-left: 1.6px solid var(--site-color-paper); border-bottom: 1.6px solid var(--site-color-paper); transform: translateY(-1px) rotate(-45deg); }
.ui-ring { width: 20px; height: 20px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--m-line-strong); }
.ui-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-full); background: var(--m-fill); }
.ui-seg span { display: inline-flex; align-items: center; height: 26px; padding-inline: 10px; border-radius: var(--radius-full); color: var(--m-muted); font: var(--type-caption-4); white-space: nowrap; }
.ui-seg span.on { background: var(--m-surface); color: var(--m-ink); box-shadow: 0 0 0 1px var(--m-line-strong); }

/* Mini knowledge map inside a window */
.ui-map svg { display: block; width: 100%; height: auto; }

/* Math, set in HTML: a stacked fraction with a hairline bar. */
.ui-math { display: inline-block; font: 400 var(--fs-24)/1.2 var(--site-font); font-style: normal; letter-spacing: 0; white-space: nowrap; }
.ui-math i { font-style: italic; font-family: var(--font-serif, 'Newsreader', serif); font-size: 1.12em; }
.ui-frac { display: inline-grid; justify-items: center; margin-left: .3em; vertical-align: middle; }
.ui-frac > span:first-child { padding: 0 .2em .12em; border-bottom: 1.5px solid currentColor; }
.ui-frac > span:last-child { padding-top: .12em; }
.ui-lines { display: grid; gap: 8px; }
.ui-lines i { display: block; height: 8px; border-radius: 4px; background: var(--m-fill); }
.ui-lines i.mark { background: var(--m-line-strong); }
.ui-lines i:nth-child(2) { width: 92%; } .ui-lines i:nth-child(3) { width: 84%; } .ui-lines i:nth-child(4) { width: 64%; }
.ui-file { display: flex; align-items: center; gap: var(--space-100); padding: 10px 12px; border-radius: var(--radius-lg); background: var(--m-subtle); box-shadow: inset 0 0 0 1px var(--m-line); }
.ui-file-icon { position: relative; width: 28px; height: 34px; flex: none; border-radius: 4px; background: var(--m-surface); box-shadow: inset 0 0 0 1px var(--m-line-strong); }
.ui-file-icon::after { content: ''; position: absolute; left: 6px; right: 6px; top: 10px; height: 12px; background: repeating-linear-gradient(var(--m-line-strong) 0 1.5px, transparent 1.5px 5px); }

/* Feature cards: a bento of soft gray cards, each with a miniature over a
   short title and line. */
.m-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-200); }
.m-card { display: flex; min-width: 0; flex-direction: column; border-radius: var(--radius-3xl); background: var(--m-subtle); box-shadow: var(--site-elevation-card); color: inherit; text-decoration: none; transition: background-color 150ms var(--m-ease); }
a.m-card:hover { background: var(--m-surface); }
.m-card--wide { grid-column: span 2; }
.m-card-media { display: grid; flex: 1; place-items: center; min-height: 240px; padding: var(--space-400) var(--space-400) var(--space-200); }
.m-card-media > * { width: min(100%, 360px); transition: transform 400ms var(--m-ease); }
.m-card--wide .m-card-media > * { width: min(100%, 520px); }
a.m-card:hover .m-card-media > * { transform: translateY(-4px); }
.m-card-copy { padding: var(--space-200) var(--space-400) var(--space-400); }
.m-card-copy h3 { font: var(--type-heading-5); letter-spacing: -.01em; text-wrap: balance; }
.m-card-copy p { margin-top: var(--space-75); color: var(--m-muted); font: var(--type-body-6); font-size: var(--fs-15); line-height: 1.5rem; text-wrap: pretty; }

/* Knowledge graph: thin gray lines, small points, one inked centre. */
.m-graph { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--space-700); }
.m-graph-copy { max-width: 440px; }
.m-graph-copy h2 { font: var(--type-heading-2); letter-spacing: -.025em; text-wrap: balance; }
:lang(zh) .m-graph-copy h2 { letter-spacing: 0; line-height: 1.3; }
.m-graph-copy > p { margin-top: var(--space-200); color: var(--m-copy); font: var(--type-body-7); text-wrap: pretty; }
.m-graph-copy .m-link { margin-top: var(--space-400); }
.m-graph-stage { position: relative; overflow: hidden; border-radius: var(--radius-3xl); background: var(--m-subtle); box-shadow: var(--site-elevation-card); }
.m-graph-stage svg { display: block; width: 100%; height: auto; font-family: var(--site-font); }
.kg-edge { stroke: rgba(255, 255, 255, .22); stroke-width: 1; transition: opacity 400ms var(--m-ease), stroke 150ms var(--m-ease); }
.kg-node { cursor: pointer; pointer-events: bounding-box; transition: opacity 400ms var(--m-ease); }
.kg-node circle { fill: var(--m-surface-strong); stroke: rgba(255, 255, 255, .34); stroke-width: 1.25; transition: transform 300ms var(--m-ease); transform-box: fill-box; transform-origin: center; }
.kg-node text { fill: var(--m-copy); font-size: var(--fs-13); font-weight: 500; }
.kg-node--core circle { fill: var(--m-ink); stroke: none; }
.kg-node--core text { fill: var(--m-ink); font-size: var(--fs-15); }
.kg-node--soft text { fill: var(--m-muted); font-weight: 400; }
.kg-halo { fill: none; stroke: var(--m-line); }
.m-graph-stage.is-hovering .kg-edge { opacity: .25; }
.m-graph-stage.is-hovering .kg-node { opacity: .35; }
.m-graph-stage.is-hovering .kg-edge.is-lit { opacity: 1; stroke: var(--m-ink); }
.m-graph-stage.is-hovering .kg-node.is-lit { opacity: 1; }
.kg-node.is-lit circle { transform: scale(1.35); }
.kg-why { display: flex; align-items: baseline; gap: var(--space-100); min-height: 3em; margin: calc(-1 * var(--space-200)) var(--space-300) var(--space-300); border-top: 1px solid var(--site-hairline); padding-top: var(--space-200); color: var(--m-copy); font: 400 var(--fs-14)/1.5 var(--site-font); text-wrap: pretty; }
.kg-why-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--m-ink); transform: translateY(-1px); }
:root:not([data-site-js]) .kg-why { display: none; }
.kg-node:focus { outline: none; }
.kg-node:focus-visible circle { stroke: var(--m-ink); stroke-width: 2; }
.kg-node:focus-visible text { fill: var(--m-ink); text-decoration: underline; text-underline-offset: 3px; }
.m-graph-legend { position: absolute; left: var(--space-300); top: var(--space-300); display: flex; flex-wrap: wrap; gap: var(--space-75); }
/* Entrance: points and lines fade in one after another, once. */
.js .m-graph-stage[data-graph]:not(.is-in) :is(.kg-node, .kg-edge) { opacity: 0; }
.js .m-graph-stage[data-graph].is-in :is(.kg-node, .kg-edge) { transition-delay: calc(var(--i, 0) * 45ms); }
.js .m-graph-stage[data-graph].is-in.is-settled :is(.kg-node, .kg-edge) { transition-delay: 0ms; }

/* Card rail: horizontally scrolling cards with round arrow buttons. */
.m-rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-300); margin-bottom: var(--space-300); }
.m-rail-head h2 { font: var(--type-heading-4); letter-spacing: -.01em; text-wrap: balance; }
:lang(zh) .m-rail-head h2 { letter-spacing: 0; }
.m-rail-head p { margin-top: var(--space-50); color: var(--m-muted); font: var(--type-body-6); }
.m-rail-controls { display: flex; flex: none; gap: var(--space-75); }
.m-rail-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--m-fill); color: var(--m-ink); cursor: pointer; transition: background-color 150ms var(--m-ease), opacity 150ms var(--m-ease), transform 200ms var(--m-ease); }
.m-rail-btn::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; }
.m-rail-btn:hover { background: var(--m-fill-hover); }
.m-rail-btn:active { transform: scale(.94); }
.m-rail-btn[disabled] { opacity: .35; cursor: default; }
.m-rail-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:root:not(.js) .m-rail-controls { display: none; }
.m-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--space-200)) / 3.4); gap: var(--space-200); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 0; scrollbar-width: none; margin: 0; padding: 0; list-style: none; border-radius: var(--radius-3xl); }
.m-rail::-webkit-scrollbar { display: none; }
.m-rail:focus-visible { outline: 2px solid var(--m-ink); outline-offset: 4px; }
.m-rail > li { min-width: 0; scroll-snap-align: start; }
.m-rail-card { display: flex; height: 100%; flex-direction: column; color: inherit; text-decoration: none; }
.m-rail-art { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-2xl); background: var(--m-subtle); }
.m-rail-art svg { width: 46%; height: auto; fill: none; stroke: var(--m-line-strong); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 400ms var(--m-ease); }
.m-rail-art svg .ink { fill: var(--m-ink); stroke: none; }
.m-rail-art svg .dot { fill: var(--m-line-strong); stroke: none; }
.m-rail-art svg .inkline { stroke: var(--m-ink); fill: var(--m-surface); }
.m-rail-card:hover .m-rail-art { background: var(--m-surface); }
.m-rail-card:hover .m-rail-art svg { transform: scale(1.04); }
.m-rail-copy { padding: var(--space-200) var(--space-50) 0; }
.m-rail-meta { display: flex; flex-wrap: wrap; gap: var(--space-50) var(--space-200); color: var(--m-muted); font: var(--type-caption-5); }
.m-rail-meta span:first-child { color: var(--m-ink); font-weight: 500; }
.m-rail-copy h3 { margin-top: var(--space-75); font: var(--type-heading-5); letter-spacing: -.01em; text-wrap: balance; }
.m-rail-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Steps: three numbered columns joined by a hairline. */
.m-steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-300); counter-reset: m-step; }
.m-step { position: relative; min-width: 0; padding: var(--space-400); border-radius: var(--radius-3xl); background: var(--m-subtle); counter-increment: m-step; }
.m-step::before { content: counter(m-step, decimal-leading-zero); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: var(--space-400); border-radius: 50%; background: var(--m-surface); box-shadow: 0 0 0 1px var(--m-line); color: var(--m-muted); font: var(--type-caption-4); font-variant-numeric: tabular-nums; }
.m-step h3 { font: var(--type-heading-5); letter-spacing: -.01em; text-wrap: balance; }
.m-step p { margin-top: var(--space-75); color: var(--m-muted); font: var(--type-body-6); font-size: var(--fs-15); line-height: 1.5rem; text-wrap: pretty; }

/* Comparison table: hairline rows, check marks drawn in CSS. */
.m-table-wrap { overflow-x: auto; border-radius: var(--radius-3xl); background: var(--m-surface); box-shadow: inset 0 0 0 1px var(--m-line); }
.m-table { width: 100%; min-width: 640px; border-collapse: collapse; font: var(--type-body-6); }
.m-table caption { padding: var(--space-200) var(--space-300) 0; color: var(--m-muted); font: var(--type-caption-5); text-align: left; caption-side: bottom; padding-bottom: var(--space-200); }
.m-table th, .m-table td { padding: 14px var(--space-300); border-top: 1px solid var(--m-line); text-align: left; vertical-align: middle; }
.m-table thead th { border-top: 0; padding-block: var(--space-300) var(--space-200); color: var(--m-ink); font: var(--type-title-3); }
.m-table thead th small { display: block; margin-top: 2px; color: var(--m-muted); font: var(--type-caption-5); }
.m-table tbody th { color: var(--m-copy); font-weight: 400; }
.m-table td { color: var(--m-ink); }
.m-table .m-group th { padding-top: var(--space-400); color: var(--m-ink); font: var(--type-caption-4); border-top: 0; }
.m-table .is-featured { background: var(--m-subtle); }
.m-yes, .m-no { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; }
.m-yes { position: relative; background: var(--m-ink); }
.m-yes::after { content: ''; position: absolute; left: 6px; top: 4.5px; width: 4px; height: 7px; border-right: 1.6px solid var(--site-color-paper); border-bottom: 1.6px solid var(--site-color-paper); transform: rotate(45deg); }
.m-no { width: 12px; height: 1.5px; border-radius: 1px; background: var(--m-line-strong); }

/* FAQ accordion: rounded rows that open in place. */
.m-faq { display: grid; gap: var(--space-75); max-width: 880px; margin-inline: auto; }
.m-faq details { border-radius: var(--radius-xl); background: var(--m-subtle); transition: background-color 150ms var(--m-ease); }
.m-faq details:hover, .m-faq details[open] { background: var(--m-surface); }
.m-faq summary { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-200); min-height: 60px; padding: var(--space-200) var(--space-300); color: var(--m-ink); font: var(--type-title-3); cursor: pointer; list-style: none; }
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::after { content: ''; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--m-surface) linear-gradient(var(--m-ink), var(--m-ink)) center / 10px 1.5px no-repeat; box-shadow: 0 0 0 1px var(--m-line-strong); }
.m-faq summary::before { content: ''; position: absolute; right: calc(var(--space-300) + 11.25px); top: 50%; width: 1.5px; height: 10px; margin-top: -5px; background: var(--m-ink); z-index: 1; transition: transform 300ms var(--m-ease), opacity 300ms var(--m-ease); }
.m-faq details[open] summary::before { transform: rotate(90deg); opacity: 0; }
.m-faq summary:focus-visible { outline: 2px solid var(--m-ink); outline-offset: 2px; border-radius: var(--radius-xl); }
.m-faq details > div { padding: 0 var(--space-300) var(--space-300); color: var(--m-copy); font: var(--type-body-6); font-size: var(--fs-15); line-height: 1.5rem; }
.m-faq details[open] > div { animation: m-panel-in 400ms var(--m-ease) both; }
.m-faq details > div p + p { margin-top: var(--space-100); }

/* Responsive */
@media (max-width: 1080px) {
  .m-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-card--wide { grid-column: 1 / -1; }
  .m-graph { gap: var(--space-500); }
  .m-rail { grid-auto-columns: calc((100% - var(--space-200)) / 2.3); }
}
@media (max-width: 760px) {
  .m-section { margin-top: var(--space-700); }
  .m-intro { margin-bottom: var(--space-400); }
  .m-intro h2, .m-graph-copy h2 { font: var(--type-heading-3); }
  .m-intro p { font: var(--type-body-3); }
  .m-panel-copy { padding-inline: var(--space-100); }
  .m-panel-copy h3 { font: var(--type-heading-4); }
  .m-panel-copy p { font: var(--type-body-3); }
  .m-panel-copy .m-link { margin-top: var(--space-300); }
  .ui-body { padding: var(--space-200); }
  .ui-bubble { max-width: 88%; }
  .ui-reply { max-width: 100%; }
  .m-cards { grid-template-columns: minmax(0, 1fr); gap: var(--space-100); }
  .m-card { border-radius: var(--radius-2xl); }
  .m-card-media { min-height: 0; padding: var(--space-300) var(--space-200) var(--space-100); }
  .m-card-copy { padding: var(--space-200) var(--space-300) var(--space-300); }
  .ui-math { font-size: var(--fs-22); }
  .m-graph { grid-template-columns: minmax(0, 1fr); gap: var(--space-300); }
  .m-graph-stage { border-radius: var(--radius-2xl); }
  .kg-node text { font-size: var(--fs-22); }
  .kg-node--core text { font-size: var(--fs-24); }
  .kg-node circle { stroke-width: 2; }
  .m-graph-legend { position: static; padding: 0 var(--space-200) var(--space-200); }
  .m-rail-head h2 { font: var(--type-heading-5); }
  .m-rail-head p { display: none; }
  .m-rail { grid-auto-columns: 78%; gap: var(--space-100); border-radius: var(--radius-2xl); }
  .m-rail-art { border-radius: var(--radius-xl); }
  .m-rail-copy h3 { font: var(--type-title-3); }
  .m-steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-100); }
  .m-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: var(--space-200); padding: var(--space-200); border-radius: var(--radius-2xl); }
  .m-step::before { grid-row: 1 / 3; margin-bottom: 0; }
  .m-step p { margin-top: var(--space-50); }
  .m-faq summary { padding-inline: var(--space-200); }
  .m-faq summary::before { right: calc(var(--space-200) + 11.25px); }
  .m-faq details > div { padding-inline: var(--space-200); }
  .m-table-wrap { border-radius: var(--radius-2xl); }
  .m-table { min-width: 0; table-layout: fixed; }
  .m-table th, .m-table td { padding: 12px var(--space-200); }
  .m-table thead th { padding-block: var(--space-200) var(--space-100); font: var(--type-title-4); }
  .m-table thead th:first-child { width: 46%; }
  .m-table thead th small { display: none; }
  .m-table td { text-align: center; }
  .m-table thead th:not(:first-child) { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  [data-site-public] :is(.m-link, .m-link::after, .m-card, .m-card-media > *, .kg-edge, .kg-node, .kg-node circle, .m-rail-btn, .m-rail-art svg, .m-faq details, .m-faq summary::before) { transition: none !important; animation: none !important; }
  .m-faq details[open] > div { animation: none; }
  a.m-card:hover .m-card-media > *, .m-rail-card:hover .m-rail-art svg, .m-link:hover::after, .m-rail-btn:active, .m-link:active, .kg-node.is-lit circle { transform: none; }
  .js .m-graph-stage[data-graph]:not(.is-in) :is(.kg-node, .kg-edge) { opacity: 1; }
  .m-rail { scroll-behavior: auto; }
}
.ui-row--center { justify-content: center; padding-block: var(--space-100); }
.ui-composer--flat { margin-top: 0; }
.ui { font-family: 'Geist Sans', 'Socrates Locale', var(--site-font); }
.m-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.m-faq a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ───────── Round 4: motion and texture ─────────
   Everything below only animates transform / opacity (plus clip-path for
   the tab glider and stroke-dashoffset for drawn lines), on --m-ease, and
   falls back to the finished state under reduced motion or without JS. */

/* Raised surfaces: layered shadows and a faint top highlight. */
.ui-window { box-shadow: var(--site-shadow-2), var(--site-inner-highlight); }
.m-graph-stage { box-shadow: inset 0 0 0 1px var(--m-line); }
.m-step::before { box-shadow: var(--site-shadow-1); }

/* Cards lift 2px and their shadow deepens. The shadow lives on ::after so
   only its opacity changes; nothing is repainted at a new size. */
.m-card, .m-step { position: relative; box-shadow: inset 0 0 0 1px var(--m-line); }
.m-card { transition: background-color 300ms var(--m-ease), transform 500ms var(--m-ease); }
.m-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--site-shadow-2); opacity: 0; pointer-events: none; transition: opacity 300ms var(--m-ease); }
.m-rail-art { position: relative; transition: background-color 300ms var(--m-ease), transform 500ms var(--m-ease); }
@media (hover: hover) and (pointer: fine) {
  a.m-card:hover { transform: translateY(-2px); background: var(--m-surface); }
  a.m-card:hover::after { opacity: 1; }
  .m-rail-card:hover .m-rail-art { transform: translateY(-2px); }
}
a.m-card:active { transform: translateY(0) scale(.99); }


/* Miniature conversations: a thin caret blinks in the composer while the
   miniature is on screen (the class is removed off screen and when the
   page is hidden). */
.ui-composer > span:first-child { position: relative; }
.ui.is-live .ui-composer > span:first-child::before { content: ''; position: absolute; left: -5px; top: 50%; width: 1.5px; height: 16px; margin-top: -8px; border-radius: 1px; background: var(--m-ink); animation: m-caret 1.1s steps(1, end) infinite; }
@keyframes m-caret { 50% { opacity: 0; } }

/* Knowledge graph: lines draw one after another (pathLength = 1 is set by
   modules.js), then points scale up and light in order. */
.js .m-graph-stage.is-drawable .kg-edge { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 1; transition: stroke-dashoffset 800ms var(--m-ease) var(--d, 0ms), opacity 300ms var(--m-ease), stroke 150ms var(--m-ease); }
.js .m-graph-stage.is-drawable.is-in .kg-edge { stroke-dashoffset: 0; }
.js .m-graph-stage.is-drawable .kg-node { transition: opacity 300ms var(--m-ease) var(--d, 0ms); }
.js .m-graph-stage.is-drawable .kg-node circle { transition: transform 500ms var(--m-ease) var(--d, 0ms); }
.js .m-graph-stage.is-drawable:not(.is-in) .kg-node circle { transform: scale(.4); }
.js .m-graph-stage.is-drawable.is-settled :is(.kg-edge, .kg-node, .kg-node circle) { transition-delay: 0ms; }
.js .m-graph-stage.is-drawable .kg-halo { transition: opacity 800ms var(--m-ease) 600ms; }
.js .m-graph-stage.is-drawable:not(.is-in) .kg-halo { opacity: 0; }
/* The small map inside the tabs draws when its panel is shown. */
.js .ui-map.is-drawable svg > g:first-child path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .ui-map.is-drawable.is-drawn svg > g:first-child path { stroke-dashoffset: 0; transition: stroke-dashoffset 1400ms var(--m-ease) 150ms; }

/* Card rail: drag with a mouse; snapping pauses while dragging and the
   momentum glide, then settles on a card. */
@media (hover: hover) and (pointer: fine) {
  .m-rail[data-draggable] { cursor: grab; }
  .m-rail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  .m-rail.is-dragging a { pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .m-card, .m-card::after, .m-rail-art,
  .js .m-graph-stage.is-drawable :is(.kg-edge, .kg-node, .kg-node circle, .kg-halo) { transition: none !important; }
  a.m-card:hover, .m-rail-card:hover .m-rail-art, a.m-card:active { transform: none; }
  .js .m-graph-stage.is-drawable .kg-edge, .js .ui-map.is-drawable svg > g:first-child path { stroke-dashoffset: 0; }
  .js .m-graph-stage.is-drawable:not(.is-in) .kg-node circle { transform: none; }
  .js .m-graph-stage.is-drawable:not(.is-in) .kg-halo { opacity: 1; }
  .ui.is-live .ui-composer > span:first-child::before { animation: none; display: none; }
}

/* Question-chain echo: an open answer hangs from its question on the same
   hairline-and-dot thread as the home page chain. The line draws once as
   the answer opens; reduced motion shows it already drawn. */
@keyframes qc-thread { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes qc-thread-dot { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.m-faq details > div { position: relative; padding-left: calc(var(--space-300) + 22px); }
.m-faq details > div::before { content: ''; position: absolute; left: calc(var(--space-300) + 3px); top: 2px; bottom: calc(var(--space-300) + 12px); width: 1px; background: var(--site-color-line-strong); transform-origin: top; animation: qc-thread 500ms cubic-bezier(.22,1,.36,1) both; }
.m-faq details > div::after { content: ''; position: absolute; left: var(--space-300); bottom: calc(var(--space-300) + 8px); width: 7px; height: 7px; border-radius: 50%; background: var(--site-color-ink); animation: qc-thread-dot 400ms cubic-bezier(.22,1,.36,1) 380ms both; }
@media (prefers-reduced-motion: reduce) { .m-faq details > div::before, .m-faq details > div::after { animation: none; } }
@media (max-width: 760px) {
  .m-faq details > div { padding-left: calc(var(--space-200) + 22px); }
  .m-faq details > div::before { left: calc(var(--space-200) + 3px); }
  .m-faq details > div::after { left: var(--space-200); }
}

/* Steps thread (modules.js): a hairline through the numbered points, drawn
   in black up to the last step reached. Scale only, from the first point. */
.m-thread { position: absolute; z-index: 1; background: var(--m-line, #e5e5e5); pointer-events: none; }
.m-thread::after { content: ''; position: absolute; inset: 0; background: var(--m-ink); transform: scaleX(var(--thread, 0)); transform-origin: left center; transition: transform 900ms cubic-bezier(.22,1,.36,1); }
.m-steps.is-vertical .m-thread::after { transform: scaleY(var(--thread, 0)); transform-origin: center top; }
[data-thread] .m-step::before { position: relative; z-index: 2; transition: background-color 400ms cubic-bezier(.22,1,.36,1) 300ms, color 400ms cubic-bezier(.22,1,.36,1) 300ms, box-shadow 400ms cubic-bezier(.22,1,.36,1); }
[data-thread] .m-step.is-reached::before { background: var(--m-ink); color: #000; box-shadow: 0 0 0 4px var(--m-subtle); }
@media (prefers-reduced-motion: reduce) {
  .m-thread::after, [data-thread] .m-step::before { transition: none; }
}

/* Round 8 · B. The mode deck.
   Meaning: each card you lift is one more way of learning you have met.
   Five large cards, each a real miniature of one mode. Without scripts or
   with reduced motion they are a plain vertical list under a row of anchor
   pills, closed by the end line. With scripts and motion the layout is
   decided by CSS at first paint (no shift when modules.js arrives): the
   cards stack in one grid cell, and even at rest it reads as a deck: the
   next cards sit a little lower, smaller and grayer behind the front one.
   Turning lifts the front card up and away and the next one steps forward.
   On wide, tall screens the stage is sticky and the scroll position turns
   the cards; one last step past the fifth card folds the deck into a row of
   five dots, "you have met them all", with the way into the product.
   Elsewhere the arrows, pills or a swipe turn the cards and the end row
   below the deck fills one dot per mode met. Only transform and opacity
   move. */
.home-modes { overflow-x: clip; }
.deck-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-200); margin-bottom: var(--space-300); }
.deck-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-pill { display: inline-flex; align-items: center; height: 36px; padding-inline: var(--space-200); border-radius: var(--radius-full); background: var(--m-fill); color: var(--m-copy); font: var(--type-button-sm); white-space: nowrap; transition: background-color 300ms var(--m-ease), color 300ms var(--m-ease), transform 200ms var(--m-ease); }
.deck-pill:hover { background: var(--m-fill-hover); color: var(--m-ink); }
.deck-pill:active { transform: scale(.98); }
.deck-pill[aria-selected='true'] { background: var(--m-ink); color: #000; }
.deck-pill:focus-visible, .deck-step:focus-visible, .deck-card:focus-visible { outline: 2px solid var(--m-ink); outline-offset: 2px; }
.deck-controls { display: flex; align-items: center; gap: 6px; }
.deck-count { min-width: 3.5em; margin-right: var(--space-100); color: var(--m-muted); font: var(--type-caption-4); font-variant-numeric: tabular-nums; text-align: right; }
.deck-count [data-deck-index] { color: var(--m-ink); }
.deck-step { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--m-fill); color: var(--m-ink); transition: background-color 300ms var(--m-ease), transform 200ms var(--m-ease), opacity 300ms var(--m-ease); }
.deck-step:hover { background: var(--m-fill-hover); }
.deck-step:active { transform: scale(.96); }
.deck-step:disabled { opacity: .35; cursor: default; }
.deck-step[data-deck-prev] .home-icon { transform: rotate(180deg); }
.deck-step .home-icon { width: 16px; height: 16px; }
.deck-cards { display: grid; gap: var(--space-200); margin: 0; padding: 0; list-style: none; }
.deck-card { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--space-700); min-height: 480px; padding: var(--space-600); border-radius: var(--radius-3xl); background: var(--m-subtle); box-shadow: inset 0 0 0 1px var(--m-line); scroll-margin-top: calc(var(--site-header-height) + var(--space-300)); }
.deck-kicker { display: flex; align-items: center; gap: var(--space-100); margin: 0 0 var(--space-200) !important; color: var(--m-muted) !important; font: var(--type-caption-4) !important; }
.deck-kicker span { color: var(--m-ink); font-variant-numeric: tabular-nums; }
.deck-controls[hidden] { display: none; }
/* The end line: five dots, one per mode, and the way into the product. */
.deck-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100) var(--space-300); margin-top: var(--space-400); }
.deck-end-dots { display: flex; gap: 8px; margin: 0; }
.deck-end-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--m-ink); transition: background-color 400ms var(--m-ease), box-shadow 400ms var(--m-ease), transform 500ms var(--m-ease), opacity 400ms var(--m-ease); }
.deck-end-title { margin: 0; color: var(--m-ink); font: var(--type-body-6); }
.deck-end-link { margin-left: auto; }

@media (prefers-reduced-motion: no-preference) {
  [data-site-js] .deck-controls[hidden] { display: flex; visibility: hidden; }
  [data-site-js] .deck-cards { gap: 0; padding-bottom: 36px; touch-action: pan-y; }
  /* Round 10 (performance): no will-change and only 2D transforms, so at
     rest the stack paints into the pinned stage's one layer instead of five
     card-sized layers the software compositor re-blends every frame; a
     turn's transition still runs on the compositor while it plays. */
  [data-site-js] .deck-card { grid-area: 1 / 1; z-index: 1; background: var(--m-surface); border: 1px solid var(--m-line); box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.8); transform-origin: 50% 100%; transition: transform 700ms var(--m-ease), opacity 450ms var(--m-ease), visibility 0s linear 0s; }
  /* A veil grays the cards waiting behind, so their edges read as a stack. */
  [data-site-js] .deck-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--m-subtle); opacity: 0; pointer-events: none; transition: opacity 500ms var(--m-ease); }
  [data-site-js] :is(.deck-card[data-k='0'], .deck-card:not([data-k]):nth-child(1)) { z-index: 5; transform: none; }
  [data-site-js] :is(.deck-card[data-k='1'], .deck-card:not([data-k]):nth-child(2)) { z-index: 4; transform: translate(0, 12px) scale(.965); }
  [data-site-js] :is(.deck-card[data-k='2'], .deck-card:not([data-k]):nth-child(3)) { z-index: 3; transform: translate(0, 24px) scale(.93); }
  [data-site-js] :is(.deck-card[data-k='3'], .deck-card:not([data-k]):nth-child(4)) { z-index: 2; transform: translate(0, 36px) scale(.895); }
  [data-site-js] :is(.deck-card[data-k='4'], .deck-card:not([data-k]):nth-child(5)) { z-index: 1; transform: translate(0, 36px) scale(.895); opacity: 0; }
  [data-site-js] :is(.deck-card[data-k='1'], .deck-card:not([data-k]):nth-child(2))::after { opacity: .5; }
  [data-site-js] :is(.deck-card[data-k='2'], .deck-card:not([data-k]):nth-child(3))::after { opacity: .8; }
  [data-site-js] :is(.deck-card[data-k='3'], .deck-card[data-k='4'], .deck-card:not([data-k]):nth-child(n+4))::after { opacity: 1; }
  /* A turned card slides up off the deck and fades. */
  [data-site-js] .deck-card[data-k='-1'] { z-index: 6; transform: translate(0, -64px); opacity: 0; visibility: hidden; transition: transform 700ms var(--m-ease), opacity 400ms var(--m-ease), visibility 0s linear 700ms; }
  [data-site-js] .deck-card :is(.m-panel-copy, .ui) { transition: opacity 400ms var(--m-ease); }
  [data-site-js] :is(.deck-card[data-k]:not([data-k='0']), .deck-card:not([data-k]):nth-child(n+2)) :is(.m-panel-copy, .ui) { opacity: 0; }
  /* Unpinned: the end row counts the modes met, one dot each. */
  [data-site-js] .deck-end-dots i { background: transparent; box-shadow: inset 0 0 0 1.25px var(--m-line-strong); }
  [data-site-js] .deck-end-dots i.is-on { background: var(--m-ink); box-shadow: inset 0 0 0 1.25px var(--m-ink); }
}
/* Wide and tall enough: the stage pins and scrolling turns the cards, then
   one more step folds the deck into its end state. */
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) and (min-height: 700px) {
  [data-site-js] .deck { height: 280vh; }
  [data-site-js] .deck-stage { position: sticky; top: var(--site-header-height); display: flex; height: calc(100vh - var(--site-header-height)); flex-direction: column; justify-content: center; }
  [data-site-js] .deck-end { position: absolute; left: 0; right: 0; top: 50%; z-index: 7; flex-direction: column; justify-content: center; gap: var(--space-300); margin: 0; text-align: center; pointer-events: none; visibility: hidden; transform: translateY(-50%); transition: visibility 0s linear 500ms; }
  [data-site-js] .deck-end-title { font: 500 var(--fs-32)/1.25 var(--site-font); letter-spacing: -.02em; opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--m-ease), transform 500ms var(--m-ease); }
  [data-site-js] .deck-end-link { margin: 0; opacity: 0; transition: opacity 500ms var(--m-ease); }
  [data-site-js] .deck-end-dots { gap: 12px; }
  [data-site-js] .deck-end-dots i { width: 12px; height: 12px; opacity: 0; transform: translateY(-80px) scale(3); }
  [data-site-js] .deck[data-done] .deck-end { pointer-events: auto; visibility: visible; transition: none; }
  [data-site-js] .deck[data-done] .deck-end-title { opacity: 1; transform: none; transition-delay: 300ms; }
  [data-site-js] .deck[data-done] .deck-end-link { opacity: 1; transition-delay: 450ms; }
  [data-site-js] .deck[data-done] .deck-end-dots i { opacity: 1; transform: none; background: var(--m-ink); box-shadow: none; }
  [data-site-js] .deck[data-done] .deck-end-dots i:nth-child(2) { transition-delay: 50ms; }
  [data-site-js] .deck[data-done] .deck-end-dots i:nth-child(3) { transition-delay: 100ms; }
  [data-site-js] .deck[data-done] .deck-end-dots i:nth-child(4) { transition-delay: 150ms; }
  [data-site-js] .deck[data-done] .deck-end-dots i:nth-child(5) { transition-delay: 200ms; }
  /* Each card folds down into its dot. */
  [data-site-js] .deck[data-done] .deck-card { opacity: 0; visibility: hidden; transform: scale(.12); transform-origin: 50% 50%; transition: transform 600ms var(--m-ease), opacity 350ms var(--m-ease) 150ms, visibility 0s linear 600ms; }
}
@media (min-width: 1920px) {
  .deck-card { min-height: 540px; }
}
@media (max-width: 1080px) {
  .deck-card { gap: var(--space-500); padding: var(--space-500); }
}
@media (max-width: 760px) {
  .deck-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; margin-bottom: var(--space-200); }
  .deck-nav { flex-wrap: nowrap; margin-inline: calc(-1 * var(--site-gutter, 24px)); padding-inline: var(--site-gutter, 24px); overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--site-gutter, 24px); }
  .deck-nav::-webkit-scrollbar { display: none; }
  .deck-controls { justify-content: flex-end; }
  .deck-card { grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-300); min-height: 0; padding: var(--space-300) var(--space-200) var(--space-200); border-radius: var(--radius-2xl); }
  .deck-card .m-points { display: none; }
  [data-site-js] .deck-card .ui-window { max-height: 300px; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
  .deck-card .m-panel-copy .m-link { margin-top: var(--space-200); }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  [data-site-js] .deck-cards { padding-bottom: 24px; }
  [data-site-js] :is(.deck-card[data-k='1'], .deck-card:not([data-k]):nth-child(2)) { transform: translate(0, 8px) scale(.96); }
  [data-site-js] :is(.deck-card[data-k='2'], .deck-card:not([data-k]):nth-child(3)) { transform: translate(0, 16px) scale(.92); }
  [data-site-js] :is(.deck-card[data-k='3'], .deck-card[data-k='4'], .deck-card:not([data-k]):nth-child(n+4)) { transform: translate(0, 24px) scale(.88); }
}
@media (max-width: 760px) {
  .deck-end { gap: var(--space-100) var(--space-200); margin-top: var(--space-300); }
  .deck-end-title { flex: 1 1 100%; order: 2; }
  .deck-end-link { order: 3; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .deck-pill, .deck-step, .deck-card, .deck-card::after, .deck-end-dots i { transition: none !important; }
}
