/* =====================================================================
   Maggnett Design System - components.css  (v2.7, 2026-10-16)
   Swiss editorial rules:
   - structure = 1px rules in 3 tiers (faint / rule / loud), no shadows
   - one accent (lime), on paper it becomes a marker behind forest text
   - radius 4px everywhere, pill only for .label
   - display type heavy + tight, mono labels 12px uppercase .08em
   - 12-column grid, generous whitespace, left-aligned
   ===================================================================== */

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--fg);
  font: var(--fw-regular) var(--fs-body)/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--lime); color: var(--forest); }
[data-surface] { background: var(--surface); color: var(--fg); }
:where(a, button):focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 2px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--s-6); }
.sec { border-top: 1px solid var(--rule); }
.sec-pad { padding-block: var(--s-24); }

/* section head: label in cols 1-3, heading in cols 4-12 */
.sec-head { padding-block: var(--s-20) var(--s-12); }
.sec-head .lbl-col { grid-column: 1 / span 3; padding-top: 12px; }
.sec-head .txt-col { grid-column: 4 / -1; }
.sec-head p { max-width: 620px; margin: var(--s-5) 0 0; color: var(--fg-2); font-size: var(--fs-lead); line-height: 1.5; }

/* ---------- type ---------- */
h1, h2, h3, h4, .mega, .display, .h2, .h3 { margin: 0; color: var(--fg); font-family: var(--font-display); font-weight: var(--fw-display); font-optical-sizing: auto; font-variation-settings: var(--display-axes); letter-spacing: var(--ls-heading); text-wrap: balance; }
/* mono-labelled headings (footer column titles) stay mono */
h4.mlabel { font-family: var(--font-mono); font-variation-settings: normal; letter-spacing: var(--ls-label); }
/* accent inside display type = Fraunces italic: the serif's personality moment */
:is(h1, h2, h3, .mega, .display, .h2) .accent { font-style: italic; font-variation-settings: var(--display-axes-italic); letter-spacing: -.01em; }
.mega { font-size: var(--fs-mega); line-height: .92; letter-spacing: var(--ls-display); }
.display { font-size: var(--fs-display); line-height: .98; letter-spacing: var(--ls-display); }
.h2 { font-size: var(--fs-h2); line-height: 1.02; }
.h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -.02em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--fg-2); }
.muted { color: var(--fg-muted); }

/* accent: lime text on forest, forest text on a lime marker on paper */
.accent { color: var(--accent-text); background: linear-gradient(transparent 62%, var(--accent-mark) 62%, var(--accent-mark) 92%, transparent 92%); padding-inline: .04em; }

/* mono label */
.mlabel { font: var(--fw-medium) var(--fs-label)/1.5 var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-muted); }
.mlabel b { color: var(--fg); font-weight: var(--fw-medium); }
.mlabel .num { color: var(--accent-text); }

/* section label: "01  The problem" with a short rule */
.sec-label { display: inline-flex; align-items: center; gap: 10px; }
.sec-label::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 1px var(--forest); }

/* pill label (the only pill shape) - same in HTML and in field.js */
.label { display: inline-flex; align-items: center; height: 24px; padding: 0 11px; border-radius: var(--r-pill); background: var(--lime); color: var(--forest); font: var(--fw-medium) 11px var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; }
.label.line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--rule-loud); }

.chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--rule); font: 11px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--fg-muted); }
.chip.on { border-color: var(--forest); background: var(--lime); color: var(--forest); }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.nav { height: 68px; display: flex; align-items: center; gap: var(--s-8); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; font-variation-settings: var(--display-axes); }
.brand svg { width: 24px; height: 24px; }
.nav-links { display: flex; gap: var(--s-8); margin-inline: auto; font-size: 14.5px; color: var(--fg-2); }
.nav-links a { position: relative; padding-block: 4px; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--lime); transition: right var(--t-med) var(--ease); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav-right { display: flex; align-items: center; gap: var(--s-3); }
.menu-btn { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--rule-loud); border-radius: var(--r); background: transparent; cursor: pointer; }
.menu-btn span { display: block; width: 16px; height: 1.5px; margin: 4px auto; background: var(--fg); }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r); font-size: 15px; font-weight: var(--fw-ui); letter-spacing: -.01em; cursor: pointer; white-space: nowrap; transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease; }
.btn:active { transform: scale(.97); }
.btn .arr { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-ghost { background: transparent; border-color: var(--rule-loud); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-sm { height: 38px; padding: 0 15px; font-size: 14px; }
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--fw-medium); color: var(--fg); border-bottom: 1px solid var(--rule-loud); padding-bottom: 2px; transition: border-color var(--t-fast) ease; }
.link::after { content: "→"; transition: transform var(--t-fast) var(--ease); }
.link:hover { border-color: var(--fg); }
.link:hover::after { transform: translateX(4px); }

/* ---------- hero (full-bleed forest) ---------- */
.hero { position: relative; overflow: hidden; }
.hero-meta { border-bottom: 1px solid var(--rule); }
.hero-meta .grid > div { padding-block: 16px; border-left: 1px solid var(--rule); padding-left: var(--s-4); }
.hero-meta .grid > div:first-child { border-left: 0; padding-left: 0; }
.hero-meta .c3 { grid-column: span 3; }
.hero-main { position: relative; z-index: 1; padding-block: var(--s-24) var(--s-16); }
.hero-main .mega { grid-column: 1 / span 8; } /* cols 9-12 belong to the field */
.page-hero .hero-main .display { grid-column: 1 / span 8; }
.hero-foot { position: relative; z-index: 1; padding-block: var(--s-8) var(--s-12); align-items: end; }
.hero-foot .lead { grid-column: 1 / span 5; margin: 0; }
.hero-foot .actions { grid-column: 8 / -1; display: flex; justify-content: flex-end; gap: var(--s-3); flex-wrap: wrap; }

/* word-by-word reveal (ui.js wraps words in [data-split]) */
/* khung che rộng ra 4 phía (bù bằng margin âm) để đuôi chữ g/p/y của Fraunces và chữ nghiêng .accent không bị cắt (fix 2026-10-19) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .02em .12em .24em; margin: -.02em -.12em -.24em; }
.w > span { display: inline-block; transform: translateY(105%); transition: transform 900ms var(--ease); transition-delay: calc(var(--i) * 60ms); }
.split-in .w > span { transform: none; }

/* ---------- magnetic field (hero only) ---------- */
.field-arcs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.field-arcs svg { width: 100%; height: 100%; display: block; }
.field-arcs .base { fill: none; stroke: var(--rule); stroke-width: 1; }
.field-arcs .hot { fill: none; stroke: var(--lime); stroke-width: 1.4; stroke-opacity: .9; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) forwards; animation-delay: calc(400ms + var(--i, 0) * 180ms); }
.field-arcs .node { fill: var(--lime); }
.field-arcs .run { fill: var(--on-forest); }
.field-arcs .ring { fill: none; stroke: var(--rule-loud); stroke-width: 1; }
.field-arcs .pole { fill: var(--lime); }
.field-arcs .pulse { fill: none; stroke: var(--lime); stroke-width: 1; animation: pulse 3s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
.field-arcs .lbl rect { fill: var(--lime); }
.field-arcs .lbl text { fill: var(--forest); font: var(--fw-medium) 11px var(--font-mono); letter-spacing: var(--ls-label); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(4); opacity: 0; } }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ticker-track { display: flex; width: max-content; animation: slide 40s linear infinite; }
.ticker-track span { display: inline-flex; align-items: center; gap: var(--s-8); padding: 22px var(--s-8) 22px 0; font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 36px); font-weight: 400; font-style: italic; font-variation-settings: var(--display-axes-italic); letter-spacing: -.01em; white-space: nowrap; }
.ticker-track span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- columns separated by rules (Swiss replacement for cards) ---------- */
/* equal columns: every column has the same content width; the vertical rule
   is drawn in the middle of the gap, so the first column stays flush left and
   the last flush right (v2.6 fix: padding-based rules made col 1 wider) */
.cols { --cgap: var(--s-12); display: grid; column-gap: var(--cgap); border-top: 1px solid var(--rule); }
.cols.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col { position: relative; padding: var(--s-8) 0 var(--s-10); }
.col + .col::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--cgap) / -2); border-left: 1px solid var(--rule); }
.col .big-num { display: block; margin-bottom: var(--s-10); font: 300 64px/1 var(--font-display); letter-spacing: -.03em; font-variation-settings: var(--display-axes); color: var(--fg-faint); transition: color var(--t-med) ease; }
.col:hover .big-num { color: var(--fg); }
.col h3 { font-size: var(--fs-h3); letter-spacing: -.02em; }
.col p { margin: 10px 0 0; color: var(--fg-2); font-size: 15px; }

/* rows: list dividers */
.row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-6); align-items: baseline; padding: 22px 0; border-top: 1px solid var(--rule); transition: border-color var(--t-fast) ease; }
.row:last-child { border-bottom: 1px solid var(--rule); }
.row .arr { transition: transform var(--t-fast) var(--ease); }
@media (hover: hover) { a.row:hover { border-color: var(--rule-loud); } a.row:hover .arr { transform: translateX(4px); } }

/* ---------- diagrams (loop steps) ----------
   Same language as the hero field: thin lines, lime hot paths, open + filled
   nodes, pill labels, on a forest panel. Paths draw in when .in is set.     */
.diagram { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--diagram-bg); overflow: hidden; }
.diagram svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dg-grid { stroke: var(--forest-line-faint); stroke-width: 1; fill: none; }
.dg-line { stroke: var(--forest-line-loud); stroke-width: 1; fill: none; }
.dg-hot { stroke: var(--lime); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.dg-box { stroke: var(--forest-line-loud); stroke-width: 1; fill: var(--forest); }
.dg-box.on { stroke: var(--lime); fill: var(--lime); }
.dg-node { fill: var(--forest); stroke: var(--forest-line-loud); stroke-width: 1; }
.dg-node.on { fill: var(--forest); stroke: var(--lime); }
.dg-dot { fill: var(--lime); }
.dg-run { fill: var(--on-forest); }
.dg-lbl rect { fill: var(--lime); }
.dg-lbl text { fill: var(--forest); font: var(--fw-medium) 9px var(--font-mono); letter-spacing: .08em; }
.dg-txt { fill: var(--on-forest-muted); font: 9px var(--font-mono); letter-spacing: .08em; }
/* draw-in: every path has pathLength="1" */
.diagram .dg-hot, .diagram .dg-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.diagram .dg-node, .diagram .dg-dot, .diagram .dg-box, .diagram .dg-lbl { opacity: 0; transition: opacity .6s ease .5s; }
.diagram.in .dg-hot, .diagram.in .dg-line { stroke-dashoffset: 0; }
.diagram.in .dg-hot { transition-delay: .35s; }
.diagram.in .dg-node, .diagram.in .dg-dot, .diagram.in .dg-box, .diagram.in .dg-lbl { opacity: 1; }
.diagram .dg-pulse { fill: none; stroke: var(--lime); stroke-width: 1; animation: pulse 2.6s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }

.step { padding-top: var(--s-6); }
.step .diagram { margin-bottom: var(--s-5); }
.step .mlabel { display: block; margin-bottom: var(--s-2); }
.step h3 { font-size: var(--fs-h3); }
.step p { margin: 8px 0 0; color: var(--fg-2); font-size: 15px; }
.step.on .diagram { outline: 2px solid var(--lime); outline-offset: 3px; }

/* week table */
.week { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: var(--s-16); }
.week > div { grid-column: span 2; padding: var(--s-6) var(--s-5) var(--s-6) 0; font-size: 15px; color: var(--fg-2); }
.week > div:first-child { grid-column: span 4; }
.week > div + div { padding-left: var(--s-5); border-left: 1px solid var(--rule); }
.week .mlabel { display: block; margin-bottom: var(--s-2); }
.week .title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-display); letter-spacing: -.02em; color: var(--fg); }

/* ---------- engines: tabs + panel ---------- */
.tabs-row { display: flex; gap: var(--s-8); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tabs-row button { position: relative; flex: none; display: inline-flex; align-items: baseline; gap: 8px; padding: 18px 0; border: 0; background: none; color: var(--fg-muted); font-size: 16px; font-weight: var(--fw-medium); cursor: pointer; transition: color var(--t-fast) ease; }
.tabs-row button::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -1px; height: 3px; background: var(--lime); box-shadow: 0 1px 0 var(--forest); transition: right var(--t-med) var(--ease); }
.tabs-row button[aria-selected="true"] { color: var(--fg); }
.tabs-row button[aria-selected="true"]::after { right: 0; }
.tabs-row .n { font: 11px var(--font-mono); color: var(--fg-faint); }
.tabs-row .addon { font: 10px var(--font-mono); padding: 2px 6px; border-radius: 3px; border: 1px solid var(--rule); color: var(--fg-muted); text-transform: uppercase; }
.engine-panel { padding-block: var(--s-12); animation: fadeup var(--t-slow) var(--ease); }
.engine-copy { grid-column: 1 / span 5; }
.engine-copy h3 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; line-height: 1.05; }
.engine-copy > p { margin: var(--s-4) 0 var(--s-6); color: var(--fg-2); font-size: 17px; }
.engine-copy ul { list-style: none; margin: 0 0 var(--s-8); padding: 0; }
.engine-copy li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; color: var(--fg-2); }
.engine-copy li:last-child { border-bottom: 1px solid var(--rule); }
.engine-copy li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: 1px; background: var(--forest); }
.artifact { grid-column: 7 / -1; }
.artifact .mlabel { display: flex; justify-content: space-between; margin-bottom: var(--s-3); }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } }

/* doc mock: flat, 1px, radius 4 */
.doc { border: 1px solid var(--rule-loud); border-radius: var(--r); background: var(--surface-2); overflow: hidden; }
.doc-head { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--rule); font: var(--fw-medium) 12px var(--font-mono); letter-spacing: .04em; color: var(--fg); }
.doc-head .lights { display: none; }
.doc-head .right { margin-left: auto; font-weight: var(--fw-regular); color: var(--fg-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.doc-body { padding: 18px 16px 20px; font-size: 14.5px; color: var(--fg-2); }
.doc-body .k-label { font: 11px var(--font-mono); text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--fg-faint); margin: 0 0 8px; }
.doc-body p { margin: 0 0 12px; line-height: 1.55; }
.doc-body .hl { background: linear-gradient(transparent 60%, var(--lime-soft) 60%); color: var(--fg); }
.rowline { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rule-faint); font-size: 14px; }
.rowline .mono { font: 11.5px var(--font-mono); color: var(--fg-muted); }
.bar { width: 96px; height: 6px; border-radius: 1px; background: var(--rule-faint); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--forest); }
.chip.o { border-color: var(--forest); background: var(--lime); color: var(--forest); }
.seq { display: grid; gap: 0; }
.seq-step { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule-faint); }
.seq-step .mono { font: 12px var(--font-mono); color: var(--fg); }
.seq-step b { font-weight: var(--fw-ui); color: var(--fg); display: block; margin-bottom: 2px; }
.check { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule-faint); font-size: 14px; }
.check::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 3px; border: 1px solid var(--rule-loud); border-radius: 2px; }
.check.done::before { background: var(--lime); border-color: var(--forest); }
.tiny { font: 11px var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-faint); }

/* ---------- tables ---------- */
.matrix, .compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.matrix th, .matrix td, .compare th, .compare td { padding: 18px var(--s-5) 18px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.matrix th, .compare th { font: var(--fw-medium) var(--fs-label) var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-muted); border-bottom-color: var(--rule-loud); }
.matrix th + th, .matrix td + td { text-align: center; width: 16%; }
.matrix td small { display: block; color: var(--fg-muted); font-size: 13.5px; margin-top: 2px; }
.matrix tbody tr, .compare tbody tr { transition: background var(--t-fast) ease; }
.matrix tbody tr:hover, .compare tbody tr:hover { background: var(--surface-2); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot.lead { background: var(--lime); box-shadow: 0 0 0 1px var(--forest); }
.dot.help { box-shadow: inset 0 0 0 1.5px var(--forest); }
.dot.none { width: 12px; height: 1px; border-radius: 0; background: var(--rule-loud); vertical-align: 3px; }
.legend { display: flex; gap: var(--s-6); padding-top: var(--s-4); font-size: 13.5px; color: var(--fg-muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.compare { overflow-x: auto; }
.compare table { min-width: 760px; }
.compare td { color: var(--fg-muted); }
.compare td:first-child { color: var(--fg); width: 26%; }
.compare .me { color: var(--fg); font-weight: var(--fw-medium); }
.compare th.me { color: var(--fg); }
.compare th.me span { display: inline-flex; align-items: center; gap: 8px; }
.compare th.me svg { width: 18px; height: 18px; }
.compare td.me { box-shadow: inset 3px 0 0 var(--lime); padding-left: var(--s-4); }
.compare th.me { padding-left: var(--s-4); }

/* ---------- CTA band + form ---------- */
.cta-band { padding-block: var(--s-24); }
.cta-band .txt-col { grid-column: 1 / span 6; }
.cta-band .form-col { grid-column: 8 / -1; }
.cta-band p { margin: var(--s-5) 0 0; max-width: 460px; color: var(--fg-2); font-size: var(--fs-lead); }
.form { display: grid; gap: 14px; padding: var(--s-8); border-radius: var(--r); background: var(--paper-2); color: var(--ink); }
.form label { display: grid; gap: 6px; font: var(--fw-medium) 11px var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ink-muted); }
.form input, .form select, .form textarea { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font: 15px var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink); outline: 0; transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.form textarea { height: 92px; padding: 12px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px var(--lime-soft); }
.form .btn { justify-content: center; margin-top: 4px; background: var(--forest); color: var(--lime); }
.form .btn:hover { background: var(--forest-2); }
.form .tiny { text-align: center; color: var(--ink-faint); }

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero .hero-main { padding-block: var(--s-20) var(--s-16); }
.page-hero .display { grid-column: 1 / span 10; }
.page-hero .lead { grid-column: 1 / span 6; margin: var(--s-6) 0 0; }

/* service rows (engines page) */
.svc { padding-block: var(--s-10); border-top: 1px solid var(--rule); }
.svc:last-child { border-bottom: 1px solid var(--rule); }
.svc .c-num { grid-column: 1 / span 2; }
.svc .c-title { grid-column: 3 / span 4; }
.svc .c-body { grid-column: 7 / -1; }
.svc h2 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.035em; line-height: 1.05; }
.svc .sub { margin: 10px 0 0; color: var(--fg-muted); }
.svc p { margin: 0 0 14px; color: var(--fg-2); }
.svc ul { list-style: none; margin: 0; padding: 0; }
.svc li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule-faint); font-size: 15px; color: var(--fg-2); }
.svc li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 1px; background: var(--forest); }

/* ---------- footer ---------- */
.footer { padding-block: var(--s-16) 0; }
.footer .f-brand { grid-column: 1 / span 4; } /* v2.8: 4 cột link (Magnets, Free tools, Company, Start) */
.footer .f-col { grid-column: span 2; }
.footer h4 { margin: 0 0 14px; }
.footer a:not(.brand) { display: block; padding: 4px 0; color: var(--fg-2); font-size: 15px; transition: color var(--t-fast) ease; }
.footer a:not(.brand):hover { color: var(--fg); }
.footer p { margin: 14px 0 0; max-width: 300px; color: var(--fg-muted); }
.wordmark-big { margin-top: var(--s-16); padding-bottom: .08em; font-family: var(--font-display); font-size: clamp(80px, 23.5vw, 400px); font-weight: 500; font-variation-settings: var(--display-axes); letter-spacing: -.045em; line-height: 1; padding-bottom: .26em; overflow: hidden; color: var(--fg); white-space: nowrap; }
.wordmark-big span { color: var(--lime); -webkit-text-stroke: 2px var(--forest); paint-order: stroke fill; }
[data-surface="forest"] .wordmark-big { color: var(--fg); }
[data-surface="forest"] .wordmark-big span { -webkit-text-stroke: 0; }
.foot-bottom { display: flex; justify-content: space-between; padding-block: var(--s-5); border-top: 1px solid var(--rule); }

/* ---------- feedback + motion ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: var(--r); background: var(--forest); color: var(--lime); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.rv { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.rv.in { opacity: 1; transform: none; }
[data-magnet] { transition: transform 260ms var(--ease), background-color var(--t-fast) ease; will-change: transform; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  .nav-links, .nav-right .btn-ghost { display: none; }
  .menu-btn { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: var(--s-2) var(--gutter); background: var(--surface); border-bottom: 1px solid var(--rule); }
  .nav-links.open a { padding: 14px 0; border-top: 1px solid var(--rule-faint); }
  .sec-head .lbl-col, .sec-head .txt-col { grid-column: 1 / -1; }
  .sec-head .lbl-col { margin-bottom: var(--s-5); }
  .hero-foot .lead, .hero-foot .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .hero-foot .actions { margin-top: var(--s-6); }
  .hero-meta .c3 { grid-column: span 6; }
  .hero-meta .grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero-meta .grid > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .cols.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols.n4 .col:nth-child(3)::before { display: none; }
  .cols.n4 .col:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .engine-copy, .artifact, .cta-band .txt-col, .cta-band .form-col { grid-column: 1 / -1; }
  .artifact, .cta-band .form-col { margin-top: var(--s-10); }
  .week > div, .week > div:first-child { grid-column: span 6; }
  .week > div:first-child { grid-column: 1 / -1; }
  .week > div:nth-child(2), .week > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .week > div:nth-child(n+2) { border-top: 1px solid var(--rule); }
  .svc .c-num { grid-column: 1 / -1; margin-bottom: var(--s-3); }
  .svc .c-title { grid-column: 1 / -1; }
  .svc .c-body { grid-column: 1 / -1; margin-top: var(--s-5); }
  .footer .f-brand { grid-column: 1 / -1; margin-bottom: var(--s-8); }
  .footer .f-col { grid-column: span 3; }
}
@media (max-width: 680px) {
  :root { --gutter: var(--gutter-mobile); }
  .nav-right .btn-primary { display: none; }
  .hero-main { padding-block: var(--s-16) var(--s-12); }
  .hero-main .mega, .page-hero .display, .page-hero .lead { grid-column: 1 / -1; }
  .mega { font-size: 52px; }
  .hero-meta .c3 { grid-column: 1 / -1; border-left: 0 !important; padding-left: 0 !important; }
  .hero-meta .grid > div:nth-child(2), .hero-meta .grid > div:nth-child(3) { display: none; }
  .hero-meta .grid > div + div { border-top: 1px solid var(--rule); }
  .field-arcs { opacity: .38; }
  .field-arcs .lbl { display: none; }
  .cols.n3, .cols.n4 { grid-template-columns: 1fr; }
  .cols .col + .col::before { display: none; }
  .cols .col + .col { border-top: 1px solid var(--rule); }
  .week > div, .week > div:first-child { grid-column: 1 / -1; border-left: 0 !important; padding-left: 0 !important; }
  .week > div + div { border-top: 1px solid var(--rule); }
  .sec-head { padding-block: var(--s-16) var(--s-8); }
  .sec-pad, .cta-band { padding-block: var(--s-16); }
  .form { padding: var(--s-6) var(--s-4); }
  .footer .f-col { grid-column: span 6; margin-bottom: var(--s-6); }
  .foot-bottom { flex-direction: column; gap: 6px; }
  .matrix th, .matrix td { padding-right: 8px; font-size: 13.5px; }
}
/* Reduced motion = reduce, not remove. Large movement (slides, word rise,
   magnet lean, runners) is dropped; gentle fades, line draw-in and a slow
   ticker stay, so the page still feels alive for people with the OS setting on
   (macOS "Reduce motion" is common on designers' machines). */
@media (prefers-reduced-motion: reduce) {
  .w { overflow: visible; }
  .w > span { transform: none; opacity: 0; transition: opacity 700ms ease; transition-delay: calc(var(--i) * 45ms); }
  .split-in .w > span { opacity: 1; }
  .rv { transform: none; }
  .ticker-track { animation-duration: 120s; }
  .tabs-row button::after, .nav-links a::after { transition: none; }
  .engine-panel { animation: none; }
  .field-arcs .pulse { animation: none; opacity: 0; }
  .btn:active { transform: none; }
}

/* =====================================================================
   v2.2 - storytelling components (Monolog-style narrative: one idea per
   screen, big type, short copy)
   ===================================================================== */

/* eyebrow in brackets: "(Marketing studio for B2B teams)" */
.eyebrow { font: var(--fw-medium) var(--fs-label)/1.5 var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-2); }
.eyebrow::before { content: "("; color: var(--accent-text); }
.eyebrow::after { content: ")"; color: var(--accent-text); }

/* founder statement: one huge serif paragraph, signed */
.statement { padding-block: var(--s-24); }
.statement blockquote { grid-column: 2 / span 10; margin: 0; font-family: var(--font-display); font-variation-settings: var(--display-axes); font-weight: 400; font-size: clamp(28px, 3.4vw, 52px); line-height: 1.16; letter-spacing: -.015em; color: var(--fg); text-wrap: pretty; }
.statement blockquote .dim { color: var(--fg-faint); transition: color 1.2s var(--ease); }
.statement.in blockquote .dim, .statement .rv.in .dim { color: var(--fg-muted); }
.statement .sig { grid-column: 2 / span 10; display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-10); }
.statement .sig svg { width: 44px; height: 44px; }
.statement .sig b { display: block; font-weight: var(--fw-ui); }

/* the gap: two-line kinetic headline + pull visual */
.gap-head { padding-top: var(--s-24); }
.gap-head .big { grid-column: 1 / -1; font-family: var(--font-display); font-variation-settings: var(--display-axes); font-weight: 500; font-size: clamp(56px, 10vw, 168px); line-height: .92; letter-spacing: -.035em; color: var(--fg); }
.gap-head .big .ln2 { display: block; padding-left: 16.66%; }
.gap-head .big em { font-style: italic; font-variation-settings: var(--display-axes-italic); color: var(--accent-text); }
.gap-copy { padding-block: var(--s-10) var(--s-16); }
.gap-copy p { grid-column: 7 / span 5; margin: 0; font-size: var(--fs-lead); line-height: 1.55; color: var(--fg-2); }

.pull-viz { position: relative; border-radius: var(--r); background: var(--forest); overflow: hidden; aspect-ratio: 1200 / 440; }
.pull-viz svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pull-viz .pv-line { fill: none; stroke: var(--forest-line); stroke-width: 1; }
.pull-viz .pv-hot { fill: none; stroke: var(--lime); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) .9s; }
.pull-viz.in .pv-hot { stroke-dashoffset: 0; }
.pull-viz .pv-dot { fill: var(--on-forest-2); transform: translate(0, 0); transition: transform 1.8s var(--ease), fill 1.2s ease; transition-delay: calc(var(--k) * 28ms); }
.pull-viz.in .pv-dot { transform: translate(var(--tx), var(--ty)); fill: var(--lime); }
.pull-viz .pv-pole { fill: var(--lime); }
.pull-viz .pv-ghost { fill: none; stroke: var(--forest-line-loud); stroke-width: 1; opacity: 0; transition: opacity 1s ease .4s; }
.pull-viz.in .pv-ghost { opacity: 1; }
.pull-viz .pv-ring { fill: none; stroke: var(--forest-line-loud); }
.pull-viz .pv-txt { fill: var(--on-forest-muted); font: var(--fw-medium) 12px var(--font-mono); letter-spacing: .08em; }
.pull-viz .pv-lbl rect { fill: var(--lime); }
.pull-viz .pv-lbl text { fill: var(--forest); font: var(--fw-medium) 11px var(--font-mono); letter-spacing: .08em; }

/* service list: big serif words as rows */
.svc-list { border-top: 1px solid var(--rule); }
.svc-row { display: grid; grid-template-columns: 80px 1fr minmax(0, 420px) 40px; gap: var(--s-6); align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--rule); transition: padding var(--t-med) var(--ease); }
.svc-row .n { font: 12px var(--font-mono); color: var(--fg-faint); }
.svc-row .t { font-family: var(--font-display); font-variation-settings: var(--display-axes); font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -.025em; color: var(--fg); transition: color var(--t-fast) ease; }
.svc-row .t em { font-style: italic; font-variation-settings: var(--display-axes-italic); }
.svc-row .d { font-size: 15px; color: var(--fg-2); }
.svc-row .arr { justify-self: end; font-size: 22px; color: var(--fg-faint); transition: transform var(--t-fast) var(--ease), color var(--t-fast) ease; }
@media (hover: hover) {
  .svc-row:hover { padding-left: var(--s-4); }
  .svc-row:hover .t { color: var(--accent-text); background: linear-gradient(transparent 70%, var(--accent-mark) 70%); }
  .svc-row:hover .arr { transform: translateX(4px); color: var(--fg); }
}

/* FAQ: native details/summary, no JS */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { display: grid; grid-template-columns: 1fr 40px; gap: var(--s-6); align-items: center; padding: 24px 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-variation-settings: var(--display-axes); font-size: clamp(20px, 2vw, 26px); letter-spacing: -.01em; color: var(--fg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; justify-self: end; font: 300 28px/1 var(--font-sans); color: var(--fg-muted); transition: transform var(--t-med) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--fg); }
.faq .a { padding: 0 0 26px; max-width: 760px; color: var(--fg-2); font-size: 16px; }
.faq .a p { margin: 0 0 10px; }
.faq details[open] .a { animation: fadeup var(--t-slow) var(--ease); }

/* closing line */
.closing { padding-block: var(--s-24) var(--s-20); }
.closing .big { grid-column: 1 / -1; font-family: var(--font-display); font-variation-settings: var(--display-axes); font-weight: 500; font-size: clamp(48px, 8vw, 136px); line-height: .95; letter-spacing: -.035em; }
.closing .big em { font-style: italic; font-variation-settings: var(--display-axes-italic); color: var(--accent-text); }
.closing .row2 { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: var(--s-8); margin-top: var(--s-12); flex-wrap: wrap; }
.closing .row2 p { max-width: 460px; margin: 0; color: var(--fg-2); font-size: var(--fs-lead); }

@media (max-width: 1024px) {
  .statement blockquote, .statement .sig { grid-column: 1 / -1; }
  .gap-copy p { grid-column: 1 / -1; }
  .svc-row { grid-template-columns: 48px 1fr 32px; }
  .svc-row .d { grid-column: 2 / 3; }
}
@media (max-width: 680px) {
  .gap-head .big .ln2 { padding-left: 0; }
  .pull-viz { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .pull-viz .pv-dot { transition: fill 1.2s ease, opacity 1s ease; }
  .pull-viz.in .pv-dot { transform: translate(var(--tx), var(--ty)); }
  .svc-row, .svc-row:hover { padding-left: 0; }
}

/* =====================================================================
   v2.3 - colour rhythm + depth
   Page rhythm rule: forest is the dominant surface (about 60% of scroll),
   paper is for reading-heavy parts (loop, FAQ), lime is the loud accent
   (ticker + one statement band max).
   ===================================================================== */

/* depth on forest: fine film grain + a faint lime glow, never flat */
[data-surface="forest"] {
  background-color: var(--surface);
  background-image:
    radial-gradient(ellipse 60% 70% at 85% 0%, rgba(159, 232, 112, .09), transparent 70%);
}

/* lime ticker: forest dots */
.ticker[data-surface="lime"] .ticker-track span::after { background: var(--forest); }
.ticker[data-surface="lime"] { border-color: var(--forest); }

/* statement on forest: big lime quote mark */
.statement { position: relative; }
.statement blockquote { position: relative; }
.statement blockquote::before { content: "\201C"; position: absolute; left: -.62em; top: -.28em; font-family: var(--font-display); font-style: italic; font-size: 2.6em; line-height: 1; color: var(--lime); }
[data-surface="forest"] .statement blockquote .dim, .statement[data-surface="forest"] blockquote .dim { color: var(--fg-muted); }

/* lime band: the gap statement */
.gap-band .gap-head .big em { color: var(--forest); }
.gap-band .pull-viz { box-shadow: 0 0 0 1px var(--forest); }

/* engines list on forest: lime row number, lime title on hover */
[data-surface="forest"] .svc-row .n { color: var(--lime); }

@media (max-width: 1024px) {
  .statement blockquote::before { position: static; display: block; height: .5em; }
}

/* logo mark on forest: invert to a lime tile so it never disappears */
[data-surface="forest"] :is(.brand, .sig) svg rect { fill: var(--lime); }
[data-surface="forest"] :is(.brand, .sig) svg path:nth-of-type(1) { fill: var(--forest); }
[data-surface="forest"] :is(.brand, .sig) svg path:nth-of-type(2) { fill: var(--on-forest); }
/* two forest bands in a row (closing + footer) get a visible seam */
.footer[data-surface="forest"] { border-top: 1px solid var(--forest-line-loud); }

/* =====================================================================
   v2.4 - film grain overlay (same technique as The Flow website, BIZ07):
   one noise tile (brand/grain.png, ~7.5% alpha) fixed over the whole page,
   jumping 6 positions every 0.5s. Maggnett runs it at half strength.
   Injected by ui.js; opt out per page with <body data-grain="off">.
   ===================================================================== */
:root { --grain-opacity: .3; }   /* v2.5: lighter + static (Nate: moving grain strains the eyes) */
.grain { position: fixed; top: -50%; left: -50%; width: 200%; height: 200%; z-index: 9999; pointer-events: none; background: url("grain.png") repeat; opacity: var(--grain-opacity); }
.grain.live { animation: grain .5s steps(6) infinite; will-change: transform; }   /* opt-in film motion */
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 17% { transform: translate(-5%, -10%); } 33% { transform: translate(3%, -15%); } 50% { transform: translate(12%, 9%); } 67% { transform: translate(9%, 4%); } 83% { transform: translate(-1%, 7%); } }
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* =====================================================================
   v2.5 - cursor sensor, magnet graphic, contact block
   ===================================================================== */

/* hero particles (field.js v2.6): lime dots ride the hot lines; a pole flashes when one arrives */
.field-arcs .flash { fill: none; stroke: var(--lime); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.field-arcs .flash.go { animation: poleflash .7s var(--ease); }
@keyframes poleflash { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(5); } }

/* ---- the magnet graphic: leads pulled into a horseshoe magnet ----
   .mg            wrapper (aspect 1200/560), adds .in when visible
   .mg-lead       a lead chip; --tx/--ty = where the magnet pulls it
   .mg-lead.noise a wrong-fit chip: not pulled, fades out              */
.mg { position: relative; aspect-ratio: 1200 / 560; }
.mg svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mg .mg-body { fill: var(--forest); }
.mg .mg-tip-n { fill: var(--lime); stroke: var(--forest); stroke-width: 2; }
.mg .mg-tip-s { fill: var(--surface-2); stroke: var(--forest); stroke-width: 2; }
.mg .mg-letter { fill: var(--forest); font: 600 18px var(--font-mono); }
.mg .mg-field { fill: none; stroke: var(--rule-loud); stroke-width: 1; }
.mg .mg-flow { fill: none; stroke: var(--forest); stroke-width: 1.4; stroke-dasharray: 2 9; opacity: 0; transition: opacity .8s ease 1.2s; animation: mgflow 2.4s linear infinite; }
.mg.in .mg-flow { opacity: .55; }
@keyframes mgflow { to { stroke-dashoffset: -22; } }
.mg .mg-lead { transform: translate(0, 0); transition: transform 1.6s var(--ease), opacity 1s ease; transition-delay: calc(var(--k) * 90ms); }
.mg.in .mg-lead { transform: translate(var(--tx), var(--ty)); }
.mg .mg-lead rect { fill: var(--surface-2); stroke: var(--rule-loud); stroke-width: 1; transition: fill .8s ease, stroke .8s ease; transition-delay: calc(.9s + var(--k) * 90ms); }
.mg .mg-lead text { fill: var(--fg-2); font: 500 12px var(--font-mono); letter-spacing: .04em; transition: fill .8s ease; transition-delay: calc(.9s + var(--k) * 90ms); }
.mg .mg-lead circle { fill: var(--rule-loud); transition: fill .8s ease; transition-delay: calc(.9s + var(--k) * 90ms); }
.mg.in .mg-lead:not(.noise) rect { fill: var(--forest); stroke: var(--forest); }
.mg.in .mg-lead:not(.noise) text { fill: var(--on-forest); }
.mg.in .mg-lead:not(.noise) circle { fill: var(--lime); }
.mg.in .mg-lead.noise { opacity: .28; }
.mg .mg-tag { opacity: 0; transition: opacity .8s ease 2.2s; }
.mg.in .mg-tag { opacity: 1; }
.mg .mg-tag rect { fill: var(--lime); stroke: var(--forest); stroke-width: 1.5; }
.mg .mg-tag text { fill: var(--forest); font: 600 11px var(--font-mono); letter-spacing: .08em; }
.mg .mg-note { fill: var(--fg-muted); font: 500 11px var(--font-mono); letter-spacing: .08em; }
.mg .mg-pulse { fill: none; stroke: var(--forest); stroke-width: 1; animation: pulse 2.8s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }

/* ---- contact block: one aligned grid, form sits inside the forest band ---- */
.contact { padding-block: var(--s-24); }
.contact .c-copy { grid-column: 1 / span 5; }
.contact .c-form { grid-column: 7 / -1; }
.contact .big { font-family: var(--font-display); font-variation-settings: var(--display-axes); font-weight: 500; font-size: clamp(44px, 5.6vw, 92px); line-height: .96; letter-spacing: -.03em; margin: 0; }
.contact .big em { font-style: italic; font-variation-settings: var(--display-axes-italic); color: var(--accent-text); }
.contact .c-copy > p { margin: var(--s-6) 0 0; max-width: 440px; color: var(--fg-2); font-size: var(--fs-lead); }
.next-steps { list-style: none; margin: var(--s-10) 0 0; padding: 0; border-top: 1px solid var(--rule); counter-reset: ns; }
.next-steps li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-3); padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--fg-2); font-size: 15px; counter-increment: ns; }
.next-steps li::before { content: "0" counter(ns); font: 500 12px/1.9 var(--font-mono); color: var(--lime); }
.next-steps b { color: var(--fg); font-weight: var(--fw-ui); }
.c-alt { margin-top: var(--s-8); }
.c-alt a { color: var(--fg); border-bottom: 1px solid var(--lime); }

/* line form: fields drawn as underlines on forest, no white box */
.lform { display: grid; gap: var(--s-8); padding-top: 10px; }
.lform .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.lform label { display: grid; gap: 10px; }
.lform .flabel { font: var(--fw-medium) 11px var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-muted); }
.lform input, .lform textarea { width: 100%; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--rule-loud); border-radius: 0; background: transparent; color: var(--fg); font: 400 20px/1.3 var(--font-sans); outline: 0; transition: border-color var(--t-fast) ease; }
.lform textarea { min-height: 84px; resize: vertical; }
.lform input::placeholder, .lform textarea::placeholder { color: var(--fg-faint); }
.lform input:focus, .lform textarea:focus { border-bottom-color: var(--lime); }
.lform fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.lform .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lform .chips label { display: inline-flex; }
.lform .chips input { position: absolute; opacity: 0; pointer-events: none; }
.lform .chips span { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid var(--rule-loud); border-radius: var(--r-pill); color: var(--fg-2); font-size: 14px; cursor: pointer; transition: background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.lform .chips span:hover { border-color: var(--fg); color: var(--fg); }
.lform .chips input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--forest); }
.lform .chips input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.lform .submit-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; }
.lform .submit-row .tiny { color: var(--fg-faint); }

@media (max-width: 1024px) {
  .contact .c-copy, .contact .c-form { grid-column: 1 / -1; }
  .contact .c-form { margin-top: var(--s-12); }
}
@media (max-width: 680px) {
  .lform .row-2 { grid-template-columns: 1fr; }
  .mg { aspect-ratio: 1200 / 700; }
}
@media (prefers-reduced-motion: reduce) {
  .mg .mg-flow { animation: none; }
}

/* v2.6: hero cleanup - ghost CTA gets a solid fill so field lines never show through it */
.hero .btn-ghost, .page-hero .btn-ghost { background: var(--surface); }

/* =====================================================================
   v2.7 - smooth scroll (Lenis 1.3.11, same setup as The Flow website BIZ07)
   vendor/lenis.min.js is loaded before ui.js; ui.js starts it.
   ===================================================================== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- v2.7 vector block illustrations (.vb) ----------
   The house style for every graphic asset: a flat front face plus ONE solid
   side mass offset down-right (dx:dy = 24:18), two tones per colour, no
   gradients, no shadows, no gloss. Build shapes from simple primitives.
   Generator + recipe: tools/magnet/flat_svg.py, README "Graphic asset".
   .vb-face / .vb-side        forest face, forest-2 side (default)
   .lime                      signal / pole / positive thing only
   .ivory                     neutral object, face gets a forest hairline
   .vb-edge                   optional single lime hairline on the top edge   */
.vb-face { fill: var(--forest); }
.vb-side { fill: var(--forest-2); }
.vb-face.lime { fill: var(--lime); }
.vb-side.lime { fill: var(--lime-deep); }
.vb-face.ivory { fill: var(--paper-2); stroke: var(--forest); stroke-width: 1.5; }
.vb-side.ivory { fill: var(--ivory-deep); }
.vb-edge { fill: none; stroke: var(--lime); stroke-width: 1.5; opacity: .55; }

/* ---------- blog post (prose, added 2026-10-17 cho Keystatic) ---------- */
.post-head { padding-block: var(--s-20) var(--s-12); }
.post-head .lbl-col { grid-column: 1 / span 3; padding-top: 12px; }
.post-head .txt-col { grid-column: 4 / -1; }
.post-head .lead { max-width: 680px; margin: var(--s-8) 0 0; }
.post-head .display { color: var(--forest); line-height: 1.16; }
/* Tiêu đề bài: nền lime đặc ôm từng dòng (điểm nhấn duy nhất của trang, 2026-10-19). Đệm dưới đủ chứa đuôi g/p/y. */
.post-head .display > .hl { padding: .02em .1em .12em; background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 0 / 100% 100%; animation: hl-sweep 1100ms var(--ease) 250ms both; }
/* Gạch lime từ trái qua phải lúc vào trang. Để box-decoration-break mặc định (slice) nên dải nền chạy hết dòng 1 rồi mới sang dòng 2, như tay tô bút dạ.
   Giữ cả khi bật Reduce motion: chỉ là màu được tô dần, không có chuyển động bố cục (cùng nhóm với "đường tự vẽ"). */
@keyframes hl-sweep { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
.post-cover { grid-column: 4 / -1; margin: 0 0 var(--s-12); }
.post-cover img { width: 100%; height: auto; border-radius: var(--r); display: block; }
.prose { grid-column: 4 / span 7; padding-bottom: var(--s-24); font-size: 18px; line-height: 1.7; color: var(--fg-2); }
.prose > * + * { margin-top: var(--s-5); }
.prose h2 { display: inline; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.32; letter-spacing: -.02em; padding: 0 .08em; color: var(--forest); background: linear-gradient(transparent 58%, var(--lime-soft) 58%, var(--lime-soft) 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; } /* H2 kiểu marker như .accent: dải lime nhạt ở nửa dưới chữ, ôm từng dòng (Nate thử 2026-10-19, thay bản nền lime đặc) */
.prose h2 + * { margin-top: var(--s-5); }
.prose h3 { font-size: 24px; line-height: 1.25; margin-top: var(--s-8); color: var(--forest); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table { margin-block: 0; }
.prose * + :is(p, ul, ol, blockquote, table, figure, pre, aside, div) { margin-top: var(--s-5); }
.prose a:not(.btn) { color: var(--fg); text-decoration: underline; text-decoration-color: var(--lime-deep); text-underline-offset: 3px; }
.prose strong { color: var(--fg); font-weight: var(--fw-medium); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s-2); }
.prose blockquote { margin-inline: 0; border-left: 2px solid var(--lime); padding-left: var(--s-5); color: var(--fg); }
.prose img { max-width: 100%; height: auto; border-radius: var(--r); }
.prose code { font: 0.9em var(--font-mono); background: var(--surface-2); padding: 0 4px; border-radius: 2px; }
.prose pre { background: var(--surface-2); padding: var(--s-4); border-radius: var(--r); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; } /* code tự xuống dòng, không bị cắt ngang */
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { border-top: 1px solid var(--rule); padding: 10px 8px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--rule); }
.post-callout { border: 1px solid var(--rule-loud); border-radius: var(--r); padding: var(--s-5); color: var(--fg); }
.post-callout > * + * { margin-top: var(--s-3); }
.post-callout p { margin: 0; }
.prose .post-cta { margin-block: var(--s-8); }
.prose .faq summary { font-size: 20px; padding: 18px 0; }
.prose .faq .a { font-size: 17px; }
.post-video { position: relative; aspect-ratio: 16 / 9; }
.post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--r); }
.post-foot { grid-column: 4 / span 7; border-top: 1px solid var(--rule); padding-block: var(--s-8) var(--s-24); }
@media (max-width: 1024px) {
  .post-head .lbl-col, .post-head .txt-col, .post-cover, .prose, .post-foot { grid-column: 1 / -1; }
  .post-head .lbl-col { padding-top: 0; margin-bottom: var(--s-4); }
}

/* About + founder page (2026-10-19): trang dạng bài đọc dùng .prose, chỉ thêm ảnh chân dung nhỏ. */
.prose .portrait { max-width: 280px; margin: var(--s-8) 0 0; }
.prose .portrait img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: var(--r); display: block; }

/* Mục lục bài viết (2026-10-19): cột trái dính khi cuộn ở desktop, khối thu gọn ở mobile. Mục đang đọc: .is-active. */
.prose h2[id], .prose h3[id] { scroll-margin-top: 96px; }
.post-toc { grid-column: 1 / span 3; align-self: start; position: sticky; top: 96px; padding: 4px var(--s-6) var(--s-12) 0; }
.post-toc ol, .post-toc-m ol { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.post-toc li + li { margin-top: 2px; }
.post-toc a, .post-toc-m a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--rule); color: var(--fg-muted); font-size: 14px; line-height: 1.35; text-decoration: none; transition: color var(--t-fast) ease, border-color var(--t-fast) ease; }
.post-toc a:hover, .post-toc-m a:hover { color: var(--fg); }
.post-toc a.is-active, .post-toc-m a.is-active { color: var(--forest); border-left-color: var(--lime-deep); font-weight: var(--fw-medium); }
.post-toc-m { display: none; }
@media (max-width: 1024px) {
  .post-toc { display: none; }
  .post-toc-m { display: block; border: 1px solid var(--rule); border-radius: var(--r); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-8); }
  .post-toc-m summary { cursor: pointer; }
}

/* Khoảng trống phía trên H2 (H2 là inline nên margin của chính nó không có tác dụng). Đặt cuối file để thắng rule margin-block: 0 của .prose */
.prose.prose :has(+ h2) { margin-bottom: var(--s-12); }

/* =====================================================================
   v2.8 (2026-10-28) - khối nội dung từ review enjyn.ai: founder note có ảnh,
   proof (số + ảnh chụp sản phẩm), sample output trong .svc, dòng "After this"
   của gói, tool chấm điểm (.score-*). Bảng so sánh dùng lại .compare có sẵn.
   ===================================================================== */
/* founder note: ảnh thật + link sang trang founder */
.statement a.sig { color: inherit; text-decoration: none; }
.statement .sig img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
@media (hover: hover) { .statement a.sig:hover b { text-decoration: underline; text-underline-offset: 3px; } }

/* proof: số liệu của chính mình + ảnh Maggnett Studio */
.proof-stats .big-num { font-size: clamp(40px, 4.4vw, 64px); color: var(--fg); margin-bottom: var(--s-6); }
.proof-shot figure { grid-column: 1 / -1; margin: var(--s-12) 0 0; }
.proof-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--r); }
.proof-shot figcaption { margin-top: var(--s-3); color: var(--fg-muted); }

/* packages: dòng "After this" */
.svc .pkg-next { margin: var(--s-5) 0 0; font-size: 15px; color: var(--fg-muted); }
.svc .pkg-next b { color: var(--fg); font-weight: var(--fw-medium); }

/* your-maggnett: sample output của từng magnet */
.svc .sample { margin-top: var(--s-6); padding: var(--s-5) 0 var(--s-2) var(--s-5); border-left: 3px solid var(--lime); }
.svc .sample > .mlabel { display: block; margin-bottom: var(--s-3); color: var(--fg-muted); }
.svc .sample dl { margin: 0; }
.svc .sample dt { font-size: 13px; color: var(--fg-muted); }
.svc .sample dd { margin: 2px 0 var(--s-4); font-size: 15px; color: var(--fg); }
.svc .sample .matrix { font-size: 14px; }
.svc .sample .matrix th, .svc .sample .matrix td { padding: 10px var(--s-3) 10px 0; }
.svc .sample .matrix th + th, .svc .sample .matrix td + td { text-align: left; width: auto; }

/* tools: growth system score */
.score-form { border-top: 1px solid var(--rule); }
.score-area { border: 0; margin: 0; padding: var(--s-8) 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-6); }
.score-area legend { float: left; grid-column: 1 / span 3; display: flex; flex-direction: column; gap: var(--s-2); padding: 0; }
.score-q { grid-column: 4 / -1; display: grid; grid-template-columns: 1fr auto; gap: var(--s-6); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--rule-faint); }
.score-q:first-of-type { border-top: 0; }
.score-q p { margin: 0; color: var(--fg-2); font-size: 16px; }
.score-q .chips { display: flex; gap: 6px; }
.score-q .chips input { position: absolute; opacity: 0; pointer-events: none; }
.score-q .chips span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--rule-loud); border-radius: var(--r-pill); font-size: 14px; color: var(--fg-2); cursor: pointer; transition: background var(--t-fast) ease, border-color var(--t-fast) ease; }
.score-q .chips span:hover { border-color: var(--fg); color: var(--fg); }
.score-q .chips input:checked + span { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.score-q .chips input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.score-submit { display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; padding-top: var(--s-8); }
.score-submit .btn[disabled] { opacity: .45; cursor: not-allowed; }
.score-result { border-top: 1px solid var(--rule-loud); outline: 0; scroll-margin-top: 96px; }
.score-head { padding-block: var(--s-10); border-bottom: 1px solid var(--rule); }
.score-total { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: var(--s-3); }
.score-total .big-num { font: 300 clamp(72px, 9vw, 128px)/1 var(--font-display); letter-spacing: -.04em; font-variation-settings: var(--display-axes); color: var(--fg); }
.score-band { color: var(--fg-2); max-width: 36ch; }
.score-first { grid-column: 7 / -1; }
.score-first h3 { font-size: clamp(28px, 3vw, 40px); margin-top: var(--s-2); }
.score-first p { color: var(--fg-2); margin: var(--s-3) 0 var(--s-4); }
.score-first .arr-link { color: var(--fg); font-weight: var(--fw-medium); }
.score-bars { padding-block: var(--s-8); border-bottom: 1px solid var(--rule); display: grid; gap: var(--s-3); }
.score-bar { display: grid; grid-template-columns: 160px 1fr 48px; gap: var(--s-5); align-items: center; font-size: 15px; color: var(--fg-2); }
.score-bar .track { height: 6px; background: var(--rule-faint); border-radius: 3px; overflow: hidden; }
.score-bar .fill { display: block; height: 100%; background: var(--forest); }
.score-bar.is-first { color: var(--fg); font-weight: var(--fw-medium); }
.score-bar.is-first .fill { background: var(--lime); box-shadow: inset 0 0 0 1px var(--forest); }
.score-bar .val { text-align: right; font-variant-numeric: tabular-nums; }
.score-fixes { padding-block: var(--s-8); border-bottom: 1px solid var(--rule); }
.score-fixes ol { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.score-fixes li { display: grid; grid-template-columns: 220px 1fr 1fr; gap: var(--s-6); padding: var(--s-4) 0; border-top: 1px solid var(--rule-faint); font-size: 15px; }
.score-fixes li b { font-weight: var(--fw-medium); color: var(--fg); }
.score-fixes li .fix { color: var(--fg-2); }
.score-cta { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; padding-top: var(--s-8); }
.score-cta p { flex: 1 1 100%; margin: 0 0 var(--s-2); color: var(--fg-2); max-width: 620px; }
@media (max-width: 1024px) {
  .score-area legend, .score-q { grid-column: 1 / -1; }
  .score-area { display: block; }
  .score-area legend { float: none; margin-bottom: var(--s-2); }
  .score-total, .score-first { grid-column: 1 / -1; }
  .score-first { margin-top: var(--s-8); }
  .score-fixes li { grid-template-columns: 1fr; gap: var(--s-2); }
}
@media (max-width: 680px) {
  .score-q { grid-template-columns: 1fr; gap: var(--s-3); }
  .score-bar { grid-template-columns: 110px 1fr 36px; gap: var(--s-3); }
}

/* v2.8: video modal (hero "Watch the video"). Native <dialog>, nền forest mờ, không bóng đổ. */
.video-modal { width: min(1120px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; background: transparent; color: var(--on-forest); }
.video-modal::backdrop { background: color-mix(in srgb, var(--forest) 88%, transparent); }
.video-modal-inner { position: relative; }
.video-modal video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--forest); border-radius: var(--r); }
.video-modal .mlabel { margin-top: var(--s-3); color: var(--on-forest-muted); }
.video-modal-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border: 1px solid var(--forest-line-loud); border-radius: var(--r); background: transparent; color: var(--on-forest); font: 300 26px/1 var(--font-sans); cursor: pointer; }
.video-modal-close:hover { border-color: var(--lime); color: var(--lime); }
