/* The page between the scenes: the lattice, the headings, the cards and their small demos, the diagram and the
   closing stage. One signature: the lattice drawn from the cube in the logo (lines at 30°, 150° and 90°). It is a
   canvas behind the hero and the install section only (js/lattice.js); its facets light under the pointer. */

:root {
  --lat-line: oklch(1 0 0 / 0.07);
  --lat-lit: oklch(0.74 0.15 280);
  --tile: var(--pg-1);
  --tile-hi: oklch(1 0 0 / 0.14);
  --spot: oklch(1 0 0 / 0.045);
  --mini: oklch(0.19 0.004 285);
  --mini-row: oklch(0.235 0.004 285);
  --warn: oklch(0.8 0.15 75);
  --ok: oklch(0.78 0.15 150);
  --ease-spring: cubic-bezier(.2, .9, .25, 1.15);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}
:root[data-scheme="light"] {
  --lat-line: oklch(0.3 0.04 70 / 0.11);
  --lat-lit: oklch(0.55 0.2 280);
  --tile: oklch(0.985 0.006 80);
  --tile-hi: oklch(0.3 0.04 70 / 0.24);
  --spot: oklch(0.3 0.04 70 / 0.04);
  --mini: oklch(0.995 0.002 80);
  --mini-row: oklch(0.95 0.009 80);
  --warn: oklch(0.6 0.15 65);
  --ok: oklch(0.55 0.15 150);
}

/* ---------- the lattice ---------- */
.hero { position: relative; }
.hero-bg, .showcase-bg, .get-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero > .track, .get > .wrap, .showcase > .browser { position: relative; z-index: 1; }
.lattice { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg .lattice { -webkit-mask-image: radial-gradient(64% 56% at 50% 30%, #000 10%, transparent 75%); mask-image: radial-gradient(64% 56% at 50% 30%, #000 10%, transparent 75%); }
.get-bg .lattice { -webkit-mask-image: radial-gradient(56% 62% at 50% 34%, #000 10%, transparent 78%); mask-image: radial-gradient(56% 62% at 50% 34%, #000 10%, transparent 78%); }
/* the light lands on the top edge of the hero window */
.shot--hero::before { content: ""; position: absolute; z-index: 21; top: 0; left: 15%; right: 15%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, oklch(0.85 0.1 280 / 0.8), transparent); }
:root[data-scheme="light"] .shot--hero::before { background: linear-gradient(90deg, transparent, oklch(0.55 0.2 280 / 0.45), transparent); }

/* ---------- the headline: each word rises out of a blur, once the face is in ---------- */
.words .w { display: inline-block; }
.m .words .w { animation: word-in 1s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 90ms) both; }
.m:not(.fonts) .words .w { animation-play-state: paused; }
@keyframes word-in { from { opacity: 0; transform: translateY(.32em); filter: blur(10px); } }

/* ---------- headings in two tones: what you get, then the quieter half; labels say where you are ---------- */
.h2 em, .chap-h em { font-style: normal; color: var(--t3); }
.eyebrow { font: 500 13px/20px var(--sans); letter-spacing: -0.005em; color: var(--t3); gap: 0; margin: 0 0 -4px; }
.eyebrow::before { display: none; }
.eyebrow i { font-style: normal; margin: 0 8px; color: var(--rule); }
.eyebrow span { color: var(--t1); }
.chap-k::before { width: 20px; height: 1px; border-radius: 0; background: var(--indigo); }
.chap-h { max-width: 18ch; }

/* ---------- the chapter head: the name and heading left, the promise right ---------- */
.chap { padding-bottom: 0; }
.chap-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; align-items: end; }
.chap-head .chap-lede { margin: 0 0 6px; max-width: 44ch; }

/* ---------- cards: one surface; a light follows the pointer across it and along its edge ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 64px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 64px; }
.t-uni { grid-column: span 2; }
.tile {
  --mx: 50%; --my: -40%;
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border-radius: 16px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s var(--ease-out-quart);
}
.tile::before, .tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease-out-quart); }
.tile::before { z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), var(--spot), transparent 65%); }
.tile::after { z-index: 3; padding: 1px; background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in oklch, var(--indigo) 85%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (hover: hover) {
  .tile:hover::before, .tile:hover::after { opacity: 1; }
  .tile:hover { transform: translateY(-2px); }
}
.tile:has(.tile-a:focus-visible) { box-shadow: inset 0 0 0 1px var(--hair), 0 0 0 2px var(--indigo); }
.tile-a { color: inherit; }
.tile-a:focus-visible { outline: none; }
/* the title links the whole card; the controls in the drawing sit over the link */
.tile-a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tile button { position: relative; z-index: 2; }
.tv { position: relative; height: 256px; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden; }
.tt { position: relative; padding: 0 24px 24px; }
.tt h3 { margin: 0; font: 500 17px/24px var(--sans); letter-spacing: -0.014em; color: var(--t1); }
.tt p { margin: 4px 0 0; font-size: 15px; line-height: 22px; color: var(--t3); max-width: 46ch; text-wrap: pretty; }
.tile .go { position: absolute; right: 20px; bottom: 24px; width: 16px; height: 16px; color: var(--t3); transition: transform .3s var(--ease-spring), color .2s var(--ease-out-quart); }
.tile:hover .go { color: var(--t1); transform: translateX(4px); }
.tile:has(.tile-a) .tt { padding-right: 48px; }

/* a small app surface inside a card, in the page's own tokens */
.mini { width: 100%; max-width: 340px; border-radius: 10px; background: var(--mini); box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -24px var(--shade); padding: 6px; font-size: 12px; line-height: 16px; }
.mini-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 30px; padding: 0 4px 2px 8px; font-weight: 500; color: var(--t1); }
.mini-h em { font-style: normal; font-weight: 400; color: var(--t3); }
.mrow { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; column-gap: 8px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--t2); white-space: nowrap; overflow: hidden;
  transition: opacity .35s var(--ease-out-quart), background-color .2s var(--ease-out-quart), transform .35s var(--ease-out-quart); }
.mrow b { font-weight: 500; color: var(--t1); }
.mrow span { overflow: hidden; text-overflow: ellipsis; color: var(--t3); }
.mrow time, .mrow em { font-style: normal; color: var(--t3); font-variant-numeric: tabular-nums; }
.mrow > i:not(.av) { width: 6px; height: 6px; border-radius: 50%; }
.mrow .av { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 500 10px/1 var(--sans); font-style: normal; color: var(--t2); background: var(--mini-row); }
.mrow.on { background: var(--mini-row); }
.mrow mark { background: color-mix(in oklch, var(--indigo) 30%, transparent); color: var(--t1); border-radius: 3px; padding: 0 1px; }

/* a switch, as the app draws it */
.qsw { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 2px 0 8px; border: 0; border-radius: 6px; background: none; font: 500 12px/1 var(--sans); color: var(--t2); cursor: pointer; }
.qsw:hover { color: var(--t1); }
.qsw i { position: relative; width: 28px; height: 16px; border-radius: 9999px; background: var(--mini-row); box-shadow: inset 0 0 0 1px var(--hair); transition: background-color .2s var(--ease-out-quart); }
.qsw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--t2); transition: transform .25s var(--ease-spring), background-color .2s; }
.qsw[aria-checked="true"] i { background: var(--indigo); box-shadow: none; }
.qsw[aria-checked="true"] i::after { transform: translateX(12px); background: oklch(1 0 0); }
.qsw:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* account colors, by account */
[data-a="1"] { --c: var(--a1); } [data-a="2"] { --c: var(--a2); } [data-a="3"] { --c: var(--a4); } [data-a="4"] { --c: var(--a5); } [data-a="5"] { --c: var(--a3); }

/* unified: five accounts flow into one inbox; new mail arrives on its account's line */
.uni { display: grid; grid-template-columns: auto minmax(40px, 1fr) minmax(0, 340px); align-items: center; padding: 24px 32px; }
.uni-src { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 2; }
.uni-src li { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 9999px; font-size: 13px; color: var(--t2); background: var(--mini); box-shadow: 0 0 0 1px var(--hair); white-space: nowrap; cursor: default;
  transition: box-shadow .2s var(--ease-out-quart), color .2s, opacity .3s; }
.uni-src i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.uni-src li:hover { color: var(--t1); box-shadow: 0 0 0 1px var(--c); }
.uni-lines { width: 100%; height: 200px; overflow: visible; }
.uni-lines path { fill: none; stroke: var(--c); stroke-width: 1.25; stroke-opacity: .4; vector-effect: non-scaling-stroke; transition: stroke-opacity .3s, stroke-width .3s; }
.uni-lines path.pulse { stroke-opacity: 1; stroke-width: 2; }
.uni-rows { display: flex; flex-direction: column; height: 120px; overflow: hidden; }
.uni-rows .mrow { flex: none; }
.uni-box .mrow { grid-template-columns: auto 92px minmax(0, 1fr) auto; }
.uni-box .mrow > i { background: var(--c); }
.uni-rows .mrow.new { animation: row-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.uni-rows .mrow.new b { font-weight: 600; }
@keyframes row-in { from { height: 0; opacity: 0; } 40% { opacity: 0; } to { height: 30px; } }
.t-uni[data-hl] .uni-lines path:not(.hl), .t-uni[data-hl] .uni-rows .mrow:not(.hl), .t-uni[data-hl] .uni-src li:not(.hl) { opacity: .25; }
.t-uni[data-hl] .uni-lines path.hl { stroke-opacity: 1; stroke-width: 2; }

/* search: f, l, y; this computer's matches; the time it took */
.t-search .mrow { grid-template-columns: 60px minmax(0, 1fr) auto; }
.mq { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; margin-bottom: 4px; border-radius: 7px; box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--indigo) 70%, transparent); color: var(--t1); }
.mq svg { width: 14px; height: 14px; color: var(--t3); }
.mq .chip { font: 500 11px/1 var(--mono); padding: 4px 6px; border-radius: 4px; background: color-mix(in oklch, var(--indigo) 18%, transparent); color: var(--t1); }
.mq .caret { width: 1.5px; height: 14px; background: var(--indigo); }
html:not(.js) .typed::before { content: "fly"; }
.mfoot { display: flex; justify-content: space-between; padding: 8px 8px 2px; margin-top: 4px; border-top: 1px solid var(--hair); color: var(--t3); transition: opacity .3s var(--ease-out-quart); }
.mfoot .ms { font: 500 11px/16px var(--mono); color: var(--t1); }
.js .t-search:not(.hit) .sq-rows .mrow { opacity: 0; transform: translateY(6px); }
.js .t-search:not(.hit) .mfoot { opacity: 0; }
.t-search.hit .sq-rows .mrow:nth-child(2) { transition-delay: 50ms; } .t-search.hit .sq-rows .mrow:nth-child(3) { transition-delay: 100ms; }
.t-search.hit .mfoot { transition-delay: 180ms; }

/* people first: the switch dims mail from machines */
.t-quiet:has(.qsw[aria-checked="true"]) .mrow.auto { opacity: .38; }

/* html mail: one receipt cut in two; the cut follows the pointer, and sways while nobody points */
@property --cut { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.rcpt-pair { --cut: 50%; position: relative; width: 210px; height: 196px; transform: rotate(-3deg); transition: --cut .5s cubic-bezier(.2, .8, .2, 1); }
.t-html.track-x .rcpt-pair { transition: none; }
.m .t-html.live:not(.track-x) .rcpt-pair { animation: cut-sway 7s var(--ease-io) infinite; }
@keyframes cut-sway { 0%, 100% { --cut: 50%; } 30% { --cut: 24%; } 70% { --cut: 76%; } }
.rcpt { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 10px; box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -20px var(--shade); }
.rcpt b { font: 600 13px/16px var(--sans); }
.rcpt small { font-size: 11px; opacity: .7; }
.rcpt strong { font: 600 24px/28px var(--sans); letter-spacing: -0.02em; margin-bottom: 6px; }
.rcpt span { height: 6px; border-radius: 3px; background: currentColor; opacity: .14; }
.rcpt span:nth-of-type(2) { width: 70%; } .rcpt span:nth-of-type(3) { width: 84%; }
.rcpt--sent { background: oklch(0.985 0.002 250); color: oklch(0.2 0.01 260); clip-path: inset(0 calc(100% - var(--cut)) 0 0 round 10px); }
.rcpt--sent b { color: oklch(0.45 0.2 280); }
.rcpt--themed { background: oklch(0.235 0.006 285); color: oklch(0.93 0.004 285); clip-path: inset(0 0 0 var(--cut) round 10px); }
.rcpt--themed b { color: oklch(0.78 0.12 280); }
.rcpt-cut { position: absolute; top: -12px; bottom: -12px; left: var(--cut); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--indigo); box-shadow: 0 0 12px var(--indigo); }
.t-html { cursor: ew-resize; }

/* offline: the switch brings the network back; the two queued sends go, the scheduled one keeps its time */
.mstat { display: inline-flex; align-items: center; font-weight: 400; color: var(--t3); min-width: 0; overflow: hidden; white-space: nowrap; }
.mstat .offdot { flex: none; background: var(--warn); transition: background-color .3s; }
.t-off .mrow { grid-template-columns: 92px minmax(0, 1fr) auto; }
.t-off .q { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: var(--mini-row); color: var(--t2); transition: background-color .3s, color .3s; }
.t-off.online .offdot { background: var(--ok); }
.t-off.online .mrow:has(.wait) { opacity: .5; }
.t-off.online .q.wait { background: color-mix(in oklch, var(--ok) 18%, transparent); color: var(--t1); }

/* the palette: Ctrl, K, the palette opens, the highlight steps down */
.t-keys .tv { flex-direction: column; gap: 16px; }
.keys { display: flex; gap: 8px; }
.keys kbd { display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 14px; border-radius: 12px; font: 500 17px/1 var(--mono); color: var(--t1);
  background: linear-gradient(var(--pg-2), var(--mini)); box-shadow: inset 0 0 0 1px var(--hair), inset 0 -3px 0 oklch(0 0 0 / 0.3), 0 10px 24px -12px var(--shade);
  transition: transform .12s var(--ease-out-quart), box-shadow .12s var(--ease-out-quart), color .12s; }
.keys kbd.down { transform: translateY(2px); color: var(--indigo); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--indigo) 70%, transparent), inset 0 -1px 0 oklch(0 0 0 / 0.3), 0 4px 10px -6px var(--shade); }
:root[data-scheme="light"] .keys kbd { background: linear-gradient(oklch(1 0 0), oklch(0.96 0.008 80)); box-shadow: inset 0 0 0 1px var(--hair), inset 0 -3px 0 oklch(0.3 0.04 70 / 0.14), 0 10px 24px -12px var(--shade); }
.pal-mini { max-width: 230px; transform-origin: 50% 0; transition: opacity .2s var(--ease-out-quart), transform .25s var(--ease-spring); }
.js .t-keys:not(.open) .pal-mini { opacity: .35; transform: scale(.97); }
.pq { display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--hair); color: var(--t1); }
.pq::after { content: ""; width: 1.5px; height: 13px; margin-left: 2px; background: var(--indigo); }
.pal-mini .mrow { grid-template-columns: minmax(0, 1fr) auto; height: 28px; }
.pal-mini .mrow span { color: var(--t2); }
.pal-mini kbd { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 4px; font: 500 10px/1 var(--mono); color: var(--t3); box-shadow: inset 0 0 0 1px var(--hair); }

/* colors: pick an accent, and the palette is made from it */
.hue { --acc: oklch(0.72 0.12 165); display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.hue-pick { display: flex; gap: 14px; }
.hue-pick button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--sw); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.14); transition: transform .25s var(--ease-spring), box-shadow .2s; }
.hue-pick button:hover { transform: scale(1.12); }
.hue-pick button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--tile), 0 0 0 4px var(--t1); }
.hue-pick button:focus-visible { outline: 2px solid var(--indigo); outline-offset: 5px; }
.hue-ramp { display: grid; grid-template-columns: repeat(9, 1fr); width: 100%; max-width: 288px; height: 44px; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -24px var(--acc); transition: box-shadow .5s; }
.hue-ramp i { transition: background-color .5s cubic-bezier(.2, .8, .2, 1); }
.hue-ramp i:nth-child(2) { transition-delay: 25ms; } .hue-ramp i:nth-child(3) { transition-delay: 50ms; } .hue-ramp i:nth-child(4) { transition-delay: 75ms; }
.hue-ramp i:nth-child(5) { transition-delay: 100ms; } .hue-ramp i:nth-child(6) { transition-delay: 125ms; } .hue-ramp i:nth-child(7) { transition-delay: 150ms; }
.hue-ramp i:nth-child(8) { transition-delay: 175ms; } .hue-ramp i:nth-child(9) { transition-delay: 200ms; }
.hue-src { margin: 0; font: 400 12px/16px var(--mono); color: var(--t3); }
.hue-src::before { content: "accent "; color: var(--t3); opacity: .7; }
.hue-val { color: var(--t1); }

/* window sizes: one window at the app's three widths */
.rsz { width: 100%; max-width: 300px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.rsz-win { --w: 100%; width: var(--w); height: 124px; display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--mini); box-shadow: 0 0 0 1px var(--tile-hi), 0 18px 40px -24px var(--shade);
  transition: width .8s var(--ease-io); }
.rsz-win i { min-width: 0; border-radius: 6px; background: var(--mini-row); transition: flex-basis .8s var(--ease-io), opacity .4s, margin .8s var(--ease-io); }
.rsz-win .p-side { flex: 0 0 22%; }
.rsz-win .p-list { flex: 0 0 32%; }
.rsz-win .p-read { flex: 1 1 0; background: color-mix(in srgb, var(--indigo) 22%, var(--mini-row)); }
.t-sizes[data-s="mid"] .rsz-win { --w: 72%; }
.t-sizes[data-s="mid"] .p-side { flex-basis: 0; opacity: 0; margin-right: -3px; }
.t-sizes[data-s="mid"] .p-list { flex-basis: 42%; }
.t-sizes[data-s="narrow"] .rsz-win { --w: 34%; }
.t-sizes[data-s="narrow"] .p-side { flex-basis: 0; opacity: 0; margin-right: -3px; }
.t-sizes[data-s="narrow"] .p-list { flex-basis: 100%; }
.t-sizes[data-s="narrow"] .p-read { flex-basis: 0; flex-grow: 0; opacity: 0; margin-left: -3px; }
.rsz-w { margin: 0; font: 400 12px/16px var(--mono); color: var(--t3); }
.rsz-px { color: var(--t1); }

/* ---------- scene headers: heading left, lede right (row); copy beside the window (side) ---------- */
@media (min-width: 1101px) {
  [data-lay~="row"] .copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; row-gap: 16px; align-items: end; }
  [data-lay~="row"] .copy > .eyebrow, [data-lay~="row"] .copy > .chap-k { grid-column: 1; }
  [data-lay~="row"] .copy > .h2 { grid-column: 1; }
  [data-lay~="row"] .copy > .lede { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin-bottom: 2px; max-width: 44ch; }
  [data-lay~="row"] .stage { align-items: stretch; }
  [data-lay~="row"] .stage > .shot { align-self: center; }

  [data-lay~="side"] { overflow-x: clip; }
  [data-lay~="side"] .in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 64px; align-items: center; }
  [data-lay~="side"] .copy .lede { max-width: 40ch; }
  [data-lay~="side"] .stage { margin-top: 0; }
  [data-lay~="side"] .shot { max-width: none; border-radius: 12px 0 0 12px; }
}
/* the steps beside the window: all listed, the one that plays lit, a bar that fills while it plays */
.side-steps { display: flex !important; flex-direction: column; align-items: stretch; gap: 4px; margin: 24px 0 0; font: 400 14px/20px var(--sans); letter-spacing: -0.005em; }
.side-steps li { position: relative; display: grid !important; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 0 12px 16px; white-space: normal !important;
  box-shadow: inset 2px 0 0 var(--hair); opacity: 1 !important; transform: none !important; grid-area: auto !important; transition: color .3s var(--ease-out-quart); }
.side-steps li::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--indigo); transition: height 0s; }
.m .side-steps li { color: var(--t3); }
.m .side-steps li:not(.on) b { color: var(--t2); }
.m .side-steps li.on::before { height: 100%; transition: height 1s linear; }
.side-steps .sk { display: flex; gap: 4px; }

/* ---------- HTML mail: the wipe between as sent (left) and in your theme (right) ---------- */
.s-mt .shot { --cut: 50%; cursor: ew-resize; touch-action: pan-y; }
.s-mt .mt-themed { clip-path: inset(0 0 0 var(--cut)); }
.mt-handle { position: absolute; z-index: 25; top: 0; bottom: 0; left: var(--cut); width: 44px; margin-left: -22px; display: grid; place-items: center; cursor: ew-resize; outline: none; }
.mt-handle i { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--indigo); box-shadow: 0 0 16px oklch(0.6653 0.1809 280 / 0.6); }
.mt-handle b { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); color: var(--paper-ink); box-shadow: 0 0 0 4px oklch(0.6653 0.1809 280 / 0.35), 0 8px 20px -6px var(--shade-hi); transition: transform .25s var(--ease-spring); }
.mt-handle b svg { width: 18px; height: 18px; }
.mt-handle:hover b, .s-mt .shot.drag .mt-handle b { transform: scale(1.12); }
.mt-handle:focus-visible b { outline: 2px solid var(--indigo); outline-offset: 4px; }
.mt-tag { position: absolute; z-index: 24; top: 14px; padding: 4px 10px; border-radius: 9999px; font: 500 12px/16px var(--sans); pointer-events: none; }
.mt-tag--l { left: 16px; background: oklch(0.96 0.003 250); color: oklch(0.22 0.01 260); box-shadow: 0 0 0 1px oklch(0 0 0 / 0.08); }
.mt-tag--r { right: 16px; background: oklch(0.28 0.01 285); color: oklch(0.95 0.004 285); box-shadow: 0 0 0 1px oklch(1 0 0 / 0.1); }
/* the window's own bar sits under the tags: it steps aside */
.s-mt .hb-readerbar > * { visibility: hidden; }
.mt-cap { justify-content: center; font-family: var(--sans); font-size: 13px; color: var(--t3); }
.m .mt-cap { display: block; text-align: center; }
.m .s-mt .shot:not(.user) { transition: --cut 1.1s cubic-bezier(.2, .8, .2, 1); }
.m [data-scene="themed"]:not(.b1) .s-mt .shot:not(.user) { --cut: 100%; }
.m [data-scene="themed"].b1:not(.b2) .s-mt .shot:not(.user) { --cut: 22%; }

/* ---------- booking: the live page on a stage, three facts under it ---------- */
.showcase { position: relative; margin-top: 48px; padding: 56px 64px 0; border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--hair);
  background: radial-gradient(60% 70% at 50% 0%, color-mix(in oklch, var(--indigo) 14%, var(--pg-1)), var(--pg-1) 70%); }
.showcase .browser { border-radius: 12px 12px 0 0; box-shadow: 0 -1px 0 0 var(--hair), 0 30px 80px -30px var(--shade-hi); }
.browser-bar { position: relative; }
.browser-try { position: absolute; right: 16px; display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--sans); color: var(--t2); }
.browser-try::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.m .browser-try::before { animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
.feats { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.feats li { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; }
.feats svg { width: 20px; height: 20px; color: var(--indigo); grid-row: 1; margin-top: 2px; }
.feats b { font-weight: 500; color: var(--t1); }
.feats span { grid-column: 2; font-size: 15px; line-height: 22px; color: var(--t3); text-wrap: pretty; }

/* ---------- AI: a soft floor of light under the window ---------- */
.ai-stage::before { content: ""; position: absolute; left: 10%; right: 10%; top: 8%; bottom: -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 40%, oklch(0.6653 0.1809 280 / 0.22), transparent 70%); filter: blur(20px); }
#ai .in { position: relative; z-index: 0; }

/* ---------- where your mail goes ---------- */
.flow-sec { padding: 0 0 160px; }
.flow { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 4fr); align-items: center; }
.fnode { padding: 24px; border-radius: 16px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--hair); }
.fnode--me { box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--indigo) 60%, transparent), 0 24px 60px -30px oklch(0.6653 0.1809 280 / 0.4); }
.fk { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; font-size: 17px; line-height: 24px; color: var(--t1); }
.fk img { width: 20px; height: 20px; }
.fv { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 22px; color: var(--t3); }
.fv li { display: flex; gap: 10px; align-items: baseline; }
.fv li::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--indigo); flex: none; transform: translateY(-2px); }
.flink { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.fline { position: relative; width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; }
.fline i { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: linear-gradient(90deg, var(--hair), var(--indigo)); }
.fline i::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--indigo); border-right: 0; }
/* mail on its way: a short light runs from the provider to the computer */
.fline i::before { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 4px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, oklch(0.85 0.12 280)); filter: blur(.5px); }
.m .fline i::before { animation: run-x 2.6s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes run-x { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 48px); opacity: 0; } }
.fline span { position: relative; padding: 4px 10px; border-radius: 9999px; background: var(--pg); box-shadow: inset 0 0 0 1px var(--hair); font: 500 12px/16px var(--mono); color: var(--t2); }
.fghost { position: absolute; bottom: calc(50% + 18px); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--rule); text-align: center; }
.fghost::after { content: ""; position: absolute; left: 50%; top: 100%; height: 18px; border-left: 1px dashed var(--rule); }
.fghost s { font-weight: 500; font-size: 14px; color: var(--t3); text-decoration-thickness: 1.5px; }
.fghost span { font-size: 13px; line-height: 18px; color: var(--t3); }
.optin { margin-top: 48px; padding-top: 24px; border-top: 1px dashed var(--rule); }
.optin-k { margin: 0 0 16px; font: 500 13px/20px var(--sans); color: var(--t3); }
.optin-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.optin-row p { margin: 0; font-size: 15px; line-height: 24px; color: var(--t3); text-wrap: pretty; }
.optin-row b { font-weight: 500; color: var(--t1); }
#privacy { padding-bottom: 96px; }

/* ---------- install: the closing stage, the lattice again ---------- */
.get { position: relative; overflow: clip; padding: 200px 0 160px; border-top-color: var(--rule); }
.get-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.get-icon { width: 112px; height: 112px; margin: 0 0 32px; filter: drop-shadow(0 20px 40px oklch(0.6653 0.1809 280 / 0.35)); }
.m .get-icon { animation: float 6s var(--ease-io) infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.get-h { margin: 0; font: 700 64px/64px var(--brand); letter-spacing: -0.045em; text-wrap: balance; }
.get .lede { margin-top: 20px; text-align: center; }
.term { max-width: 720px; margin: 48px auto 0; border-radius: 12px; overflow: hidden; background: var(--pg-1); box-shadow: inset 0 0 0 1px var(--hair), 0 30px 60px -30px var(--shade-hi); text-align: left; }
.term-bar { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--hair); font-size: 13px; color: var(--t2); }
.copy-btn { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--pg-2); color: var(--t2); font: 500 12px/1 var(--sans); cursor: pointer; box-shadow: inset 0 0 0 1px var(--hair); transition: color .15s; }
.copy-btn:hover { color: var(--t1); }
.term pre { margin: 0; padding: 20px; min-height: 112px; font: 400 13px/24px var(--mono); color: var(--t2); white-space: pre-wrap; overflow-wrap: anywhere; }
.term pre .c { color: var(--t3); user-select: none; }
.term pre .tcur { display: inline-block; width: 7px; height: 15px; margin-left: 1px; vertical-align: -2px; background: var(--indigo); }
.cmd-note { margin: 12px 0 0; font-size: 13px; line-height: 20px; color: var(--t3); text-align: center; }
.get .acts { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 32px; }

/* ---------- the top bar: the chapter you are in ---------- */
.nav { position: relative; }
.nav-ind { position: absolute; left: 0; top: 50%; height: 32px; margin-top: -16px; border-radius: 9999px; background: var(--hair-soft); box-shadow: inset 0 0 0 1px var(--hair); opacity: 0; pointer-events: none;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.nav-ind.on { opacity: 1; }
.nav a.here { color: var(--t1); }
.top { transition: box-shadow .3s; }
.top.scrolled { box-shadow: 0 1px 0 var(--hair); }

/* ---------- text comes in as it scrolls into view (site.js marks it); without motion it is simply there ---------- */
.m .reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease-out-quart), transform 1s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--d, 0) * 80ms); }
.m .reveal.revealed { opacity: 1; transform: none; }
.m .tile.reveal.revealed { transition: opacity .9s var(--ease-out-quart), transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; transition-delay: calc(var(--d, 0) * 80ms), 0s, 0s; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .chap-head { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .chap-head .chap-lede { margin: 0; }
  .bento, .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-uni, .t-sizes { grid-column: 1 / -1; }
  .flow { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .flink { padding: 8px 0; }
  .fghost { position: static; margin: 0 0 8px; }
  .fghost::after { display: none; }
  .fline { width: 2px; height: 72px; }
  .fline i { left: 0; right: 0; top: 0; bottom: 0; width: 2px; height: auto; margin: 0; background: linear-gradient(var(--hair), var(--indigo)); }
  .fline i::after { right: auto; left: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 7px solid var(--indigo); border-bottom: 0; }
  .fline i::before { display: none; }
  .fline span { position: absolute; left: 16px; white-space: nowrap; }
  .showcase { padding: 40px 32px 0; }
  .feats { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .get-h { font-size: 52px; line-height: 56px; }
}
@media (max-width: 720px) {
  .bento, .trio { grid-template-columns: minmax(0, 1fr); margin-top: 40px; gap: 12px; }
  .t-sizes { grid-column: auto; }
  .tv { height: 240px; padding: 20px 16px; }
  .uni { grid-template-columns: auto 28px minmax(0, 1fr); padding: 16px; }
  .uni-src li { height: 28px; padding: 0 10px; font-size: 12px; }
  .uni-box .mrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .uni-box .mrow span, .uni-box .mini-h em { display: none; }
  .optin-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .browser-try { display: none; }
  .flow-sec { padding-bottom: 96px; }
  .showcase { padding: 24px 12px 0; margin-left: -4px; margin-right: -4px; }
  .get { padding: 120px 0 96px; }
  .get-h { font-size: 40px; line-height: 44px; }
  .term pre { padding: 16px; font-size: 12px; line-height: 20px; }
  .mt-tag { top: 10px; }
}
