/* aFig Crystal: the home page, designed from zero. One idea per screen, few words, the product shown working.
   Scoped to body.cx-home2; tokens, buttons, glass and plates come from crystal-site.css. */

.cx-home2 .cx-main { overflow-x: clip; }
.cx-home2 .h2-h { font: 700 clamp(30px, 1.2rem + 2.4vw, 52px)/1.05 var(--face); letter-spacing: -.045em; color: var(--t1); text-align: center; text-wrap: balance; }
.cx-home2 .h2-small { text-align: center; font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--t3); margin: 0 0 14px; }
.cx-home2 .h2-link { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 10px; color: var(--t1); font-weight: 600; text-decoration: none; }
.cx-home2 .h2-link:hover .cx-ar { transform: translateX(3px); }
.cx-home2 .h2-acts { justify-content: center; }

/* 1 hero: centred words, then the product in a large crystal window */
.h2-hero { padding: clamp(130px, 13vw, 176px) 0 0; }
.h2-hero-in { display: grid; justify-items: center; text-align: center; gap: 18px; }
.h2-kicker { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; font: 560 13.5px var(--face); color: var(--t2);
	background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .55)); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .08), 0 6px 14px -10px rgba(24, 52, 110, .4); }
.h2-title { font: 760 clamp(54px, 2rem + 6.6vw, 124px)/.94 var(--face); letter-spacing: -.06em; color: var(--t1); margin: 4px 0 0; }
.h2-title em { font-style: normal; background: linear-gradient(100deg, #1d4fb0 0%, #2f86e6 34%, #14b8d4 58%, #7c5cf5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.h2-sub { font-size: clamp(18px, 1rem + .5vw, 22px); line-height: 1.5; color: var(--t2); max-width: 38ch; }
.h2-acts { margin-top: 8px; }
.h2-window-wrap { margin-top: clamp(44px, 5vw, 72px); display: flex; justify-content: center; }
.h2-window { width: min(1100px, 100%); border-radius: 34px; padding: 12px; position: relative; }
.h2-dots { position: absolute; left: 22px; top: 17px; display: flex; gap: 7px; }
.h2-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(10, 26, 51, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
.h2-window .h7-player { border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(10, 26, 51, .06); }

/* 2 dock: every studio as an iOS-style icon on one crystal shelf */
.h2-dock-sec { padding: clamp(80px, 9vw, 130px) 0 0; }
.h2-dock-sec .cx-wrap { display: grid; justify-items: center; gap: clamp(26px, 3vw, 40px); }
.h2-dock { width: auto !important; max-width: 100%; border-radius: 34px; padding: 12px; }
.h2-dock ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; gap: 4px; }
.h2-dock li a { display: grid; justify-items: center; gap: 8px; width: 92px; padding: 12px 4px 10px; border-radius: 24px; text-decoration: none; color: var(--t2); font-size: 12.5px; font-weight: 560; text-align: center; line-height: 1.2; }
.h2-dock li a span:not(.cx-plate):not(.cx-plate *) { max-width: 88px; }
.h2-dock .h2-dock-sep { width: 1px; align-self: stretch; margin: 14px 6px; background: linear-gradient(180deg, transparent, rgba(10, 26, 51, .14), transparent); }
.h2-dock .h2-dock-make a { color: var(--t1); font-weight: 640; }

/* 3 steps */
.h2-steps-sec { padding: clamp(70px, 8vw, 120px) 0 0; }
.h2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.h2-steps li { border-radius: 30px; padding: 26px 26px 28px; display: grid; gap: 6px; align-content: start; }
.h2-steps b { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 50%; font: 600 15px var(--mono); color: var(--t1); background: var(--cx-btn-bg); box-shadow: var(--cx-btn-sh); }
.h2-steps h3 { font: 680 26px/1.1 var(--face); letter-spacing: -.035em; color: var(--t1); }
.h2-steps p { color: var(--t3); font-size: 16px; }

/* 4 studios at work */
.h2-demos { padding: clamp(90px, 10vw, 140px) 0 0; }
.h2-demos .cx-wrap { display: grid; gap: clamp(26px, 3vw, 40px); }

/* 5 trust, 6 close */
.h2-trust { padding: clamp(80px, 9vw, 120px) 0 0; }
.h2-close { padding: clamp(80px, 9vw, 130px) 0 clamp(40px, 5vw, 70px); }
.h2-close-card { border-radius: 40px; padding: clamp(40px, 6vw, 80px) 24px; display: grid; gap: 26px; justify-items: center; }

@media (max-width: 1080px) {
	.h2-dock { overflow-x: auto; scrollbar-width: none; }
	.h2-dock li a { width: 80px; }
}
@media (max-width: 760px) {
	.h2-steps { grid-template-columns: 1fr; }
	.h2-window { padding: 8px; border-radius: 26px; }
	.h2-dots { top: 13px; left: 16px; }
	.h2-dock ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.h2-dock .h2-dock-sep { display: none; }
	.h2-dock li a { width: auto; }
	.cx-home2 .h2-acts { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }
}

/* ------------------------------------------------------------- Features, designed from zero */
.f2-hero { padding: clamp(130px, 13vw, 176px) 0 clamp(36px, 4vw, 56px); }
.f2-title { font-size: clamp(48px, 1.6rem + 5.4vw, 104px); }
.f2-chapters { position: sticky; top: 92px; z-index: 40; display: flex; gap: 2px; width: max-content; max-width: var(--wrap); margin: 0 auto; padding: 5px; border-radius: 999px; overflow-x: auto; scrollbar-width: none;
	background: linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(250, 252, 255, .92)) !important; }
.f2-chapters::-webkit-scrollbar { display: none; }
.f2-chapters a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; color: var(--t2); font-size: 14.5px; font-weight: 560; text-decoration: none; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.f2-chapters a i { width: 8px; height: 8px; border-radius: 50%; }
.f2-chapters a:hover, .f2-chapters a.is-here { color: var(--t1); background: var(--cx-chip); box-shadow: var(--cx-chip-sh); }
.f2-ch { padding: clamp(80px, 9vw, 130px) 0 0; scroll-margin-top: 110px; }
.f2-head { display: grid; justify-items: center; gap: 10px; text-align: center; margin-bottom: clamp(28px, 3.4vw, 48px); }
.f2-head p { color: var(--t3); font-size: clamp(16px, .9rem + .3vw, 19px); }
.f2-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cx-features2 .f2-card { position: relative; display: grid; grid-template-rows: auto auto; gap: 14px; padding: 12px 12px 18px; border-radius: 30px; text-decoration: none; cursor: pointer; transition: transform .3s var(--spring), box-shadow .3s ease; }
.cx-features2 .f2-card.f2-big { grid-column: span 2; }
.cx-features2 .f2-card .tile-art { height: 190px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px rgba(10, 26, 51, .06); overflow: hidden; }
.cx-features2 .f2-card.f2-big .tile-art { height: 190px; }
.f2-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px; }
.f2-name b { font: 640 18px/1.25 var(--face); letter-spacing: -.02em; color: var(--t1); }
.f2-name .tile-new, .f2-name .tile-beta { margin-left: 0; }
@media (hover: hover) { .cx-features2 .f2-card:hover { transform: translateY(-3px); box-shadow: inset 0 1.5px 0 #fff, 0 0 0 1px color-mix(in oklab, var(--acc) 30%, transparent), 0 30px 50px -30px rgba(24, 52, 110, .5); } }
@media (max-width: 1000px) { .f2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .f2-grid { grid-template-columns: 1fr; } .cx-features2 .f2-card.f2-big { grid-column: auto; } .f2-chapters { top: 84px; } }
.cx-features2 .f2-grid > .f2-card { grid-column: auto; padding: 12px 12px 18px; }
.cx-features2 .f2-grid > .f2-card.f2-big { grid-column: span 2; }
@media (max-width: 640px) { .cx-features2 .f2-grid > .f2-card.f2-big { grid-column: auto; } }
/* home, for every studio: the dock sits under the opening, the studio demos are the main window */
.h2-dock-wrap { margin-top: clamp(36px, 4vw, 56px); display: flex; justify-content: center; }
.h2-window-tabs { padding: 11px; }
.h2-window-tabs .h7-tabs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 11px; }
.h2-window-small { width: min(920px, 100%); margin: 0 auto; }
.h2-demos .cx-wrap { justify-items: center; }
@media (max-width: 860px) { .h2-window-tabs .h7-tabs { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- studio demos, drawn from scratch (tools/crystal/demos.py) */
.dm { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 12px; }
.dm-tabs { display: grid; align-content: start; gap: 4px; padding: 8px; border-radius: 24px; background: rgba(255, 255, 255, .45); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .05); }
.dm-tabs button { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 9px 10px; border: 0; border-radius: 18px; background: none; cursor: pointer; text-align: left; font-family: var(--face); transition: background .2s ease, box-shadow .2s ease; }
.dm-tabs button .cx-plate { grid-row: span 2; --sz: 38px; }
.dm-tabs button b { font-size: 15px; font-weight: 620; color: var(--t1); line-height: 1.2; }
.dm-tabs button span:not(.cx-plate):not(.cx-plate *) { font-size: 12.5px; color: var(--t3); line-height: 1.3; }
.dm-tabs button[aria-selected="true"] { background: linear-gradient(160deg, #fff, rgba(255, 255, 255, .8)); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .07), 0 10px 22px -16px rgba(24, 52, 110, .55); }
@media (hover: hover) { .dm-tabs button[aria-selected="false"]:hover { background: rgba(255, 255, 255, .6); } }
.dm-tabs button:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.dm-stage { min-width: 0; }
.dm-panel { display: grid; gap: 12px; padding: 14px; height: 100%; border-radius: 24px; background: rgba(255, 255, 255, .45); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .05); }
.dm-panel[hidden] { display: none; }
.dm-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dm-steps li { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px; font: 560 13.5px var(--face); color: var(--t1);
	background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .7)); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .08); }
.dm-steps i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 600 11.5px var(--mono); font-style: normal; color: #fff;
	background: linear-gradient(180deg, color-mix(in oklab, var(--h) 78%, white), var(--h)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.dm-paper { border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(10, 26, 51, .06), 0 14px 30px -24px rgba(24, 52, 110, .45); padding: 10px 14px; display: grid; place-items: center; }
.dm-svg { display: block; width: 100%; max-width: 620px; height: auto; }
.dm-foot { display: flex; justify-content: flex-end; }
.dm-foot .cx-btn { min-height: 46px; font-size: 15px; }

/* Visual Studio: words on the left, the figure on the right */
.dm-words { grid-template-columns: 1fr; }
.dm-wgrid { display: grid; grid-template-columns: minmax(0, .8fr) 40px minmax(0, 1.4fr); gap: 12px; align-items: center; }
.dm-text { padding: 18px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(10, 26, 51, .06); }
.dm-text b { display: block; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--t3); margin-bottom: 8px; }
.dm-text p { font-size: 16px; line-height: 1.6; color: var(--t1); }
.dm-arrow { width: 40px; color: color-mix(in oklab, var(--h) 80%, black); }
@media (max-width: 900px) {
	.dm { grid-template-columns: 1fr; }
	.dm-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
	.dm-tabs::-webkit-scrollbar { display: none; }
	.dm-tabs button { flex: none; grid-template-columns: auto; justify-items: center; text-align: center; row-gap: 4px; padding: 8px 10px; }
	.dm-tabs button .cx-plate { grid-row: auto; --sz: 34px; }
	.dm-tabs button span:not(.cx-plate):not(.cx-plate *) { display: none; }
	.dm-tabs button b { font-size: 12.5px; white-space: nowrap; }
	.dm-wgrid { grid-template-columns: 1fr; }
	.dm-arrow { transform: rotate(90deg); justify-self: center; }
	.dm-foot { justify-content: stretch; } .dm-foot .cx-btn { width: 100%; }
}
.h2-window-tabs .h7-tabs { display: none; }
/* dock: every label on one line, every tile the same width */
.h2-dock li a { width: 100px; }
.h2-dock li a span:not(.cx-plate):not(.cx-plate *) { max-width: none; white-space: nowrap; font-size: 12px; }
@media (max-width: 1080px) { .h2-dock li a { width: 86px; } .h2-dock li a span:not(.cx-plate):not(.cx-plate *) { font-size: 11px; } }

/* ------------------------------------------------------------- Features: a capability overview (tools/crystal/features.py) */
.fx-group { padding: clamp(64px, 7vw, 104px) 0 0; scroll-margin-top: 110px; }
.fx-row { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.fx-head { position: sticky; top: 160px; display: grid; gap: 10px; }
.fx-k { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: color-mix(in oklab, var(--acc) 75%, black); }
.fx-k::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.fx-head h2 { font: 720 clamp(30px, 1.2rem + 1.8vw, 44px)/1.05 var(--face); letter-spacing: -.045em; color: var(--t1); text-wrap: balance; }
.fx-head > p:last-child { color: var(--t3); font-size: 16px; line-height: 1.55; max-width: 32ch; }
.fx-list { list-style: none; margin: 0; padding: 8px; border-radius: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.fx-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 20px 18px; border-radius: 22px; transition: background .2s ease; }
.fx-list li:nth-child(n+3) { box-shadow: inset 0 1px 0 rgba(10, 26, 51, .06); }
@media (hover: hover) { .fx-list li:hover { background: rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .05); } }
.fx-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: color-mix(in oklab, var(--acc) 82%, black);
	background: linear-gradient(180deg, #fff, color-mix(in oklab, var(--acc) 10%, white)); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px color-mix(in oklab, var(--acc) 22%, transparent), 0 6px 14px -10px color-mix(in oklab, var(--acc) 70%, transparent); }
.fx-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fx-list b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 640 16.5px/1.3 var(--face); letter-spacing: -.015em; color: var(--t1); }
.fx-list li span:not(.fx-ic) { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--t3); }
.fx-tag { font: 600 10.5px/1 var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; color: #5034c9; background: rgba(124, 92, 245, .1); box-shadow: inset 0 0 0 1px rgba(124, 92, 245, .25); }
.cx-fx .f2-chapters { margin-top: 0; }
@media (max-width: 960px) { .fx-row { grid-template-columns: 1fr; } .fx-head { position: static; } }
@media (max-width: 640px) { .fx-list { grid-template-columns: 1fr; } .fx-list li:nth-child(n+2) { box-shadow: inset 0 1px 0 rgba(10, 26, 51, .06); } }

/* ------------------------------------------------------------- the aFig engine showcase: real figures, a subject menu */
.sc { padding: clamp(80px, 9vw, 130px) 0 0; }
.sc .cx-wrap { display: grid; gap: clamp(20px, 2.4vw, 30px); justify-items: center; }
.sc-head { display: grid; gap: 14px; justify-items: center; text-align: center; }
.sc-menu { display: flex; gap: 2px; padding: 5px; border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.sc-menu::-webkit-scrollbar { display: none; }
.sc-menu button { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: none; cursor: pointer; white-space: nowrap; font: 580 14.5px var(--face); color: var(--t2); transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.sc-menu button[aria-pressed="true"] { color: var(--t1); background: var(--cx-chip); box-shadow: var(--cx-chip-sh); }
.sc-grid { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sc-grid li[hidden] { display: none; }
.sc-card { display: grid; gap: 10px; width: 100%; padding: 10px 10px 14px; border: 0; border-radius: 26px; cursor: zoom-in; text-align: left; font-family: var(--face);
	background: linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .66)); box-shadow: inset 0 1.5px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .06), 0 18px 36px -28px rgba(24, 52, 110, .5);
	transition: transform .35s var(--spring), box-shadow .3s ease; }
.sc-img { display: block; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(10, 26, 51, .05); aspect-ratio: 16 / 9.4; }
.sc-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.sc-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 6px; }
.sc-cap b { font: 640 15.5px/1.3 var(--face); letter-spacing: -.015em; color: var(--t1); }
.sc-cap em { flex: none; font: 500 11px var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
@media (hover: hover) and (pointer: fine) { .sc-card:hover { transform: translateY(-3px); box-shadow: inset 0 1.5px 0 #fff, 0 0 0 1px rgba(10, 26, 51, .08), 0 30px 50px -30px rgba(24, 52, 110, .55); } .sc-card:hover .sc-img img { transform: scale(1.035); } }
.sc-card:active { transform: scale(.985); }
.sc-card:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.sc-view { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 14px; border: 0; border-radius: 28px; background: rgba(255, 255, 255, .97); box-shadow: 0 0 0 1px rgba(10, 26, 51, .08), 0 40px 90px -30px rgba(10, 26, 51, .55); }
.sc-view::backdrop { background: rgba(10, 26, 51, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sc-view[open] { animation: sc-in .35s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes sc-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.sc-view figure { margin: 0; display: grid; gap: 12px; }
.sc-view img { display: block; width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 18px; background: #fff; }
.sc-view figcaption { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 6px 2px; }
.sc-view figcaption b { font: 680 18px var(--face); color: var(--t1); letter-spacing: -.02em; }
.sc-x { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; font: 400 24px/1 var(--face); color: var(--t1); background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(10, 26, 51, .1), 0 6px 14px -8px rgba(10, 26, 51, .4); }
.dm-photo { padding: 8px; }
.dm-photo img { display: block; width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 980px) { .sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sc-grid { grid-template-columns: 1fr; } .sc-view figcaption { flex-direction: column; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .sc-view[open] { animation: none; } .sc-img img { transition: none; } }
/* demo cards: content from the top, the figure at full width, no stretched gaps */
.dm-panel { align-content: start; grid-auto-rows: max-content; }
.dm-car .dm-paper { display: block; padding: 10px 14px; }
.dm-car .dm-ex { width: 100%; }
.dm-car .dm-svg { max-width: 640px; margin: 0 auto; }
.dm-foot { align-self: end; }

/* ------------------------------------------------------------- "Or describe it in words", alive: type, plan, draw, check */
.dm-words .dm-steps li { transition: background .3s ease, box-shadow .3s ease, opacity .3s ease; }
.dm-words[data-stage] .dm-steps li { opacity: .55; }
.dm-words[data-stage="1"] .dm-steps li[data-st="1"], .dm-words[data-stage="2"] .dm-steps li[data-st="2"], .dm-words[data-stage="3"] .dm-steps li[data-st="2"], .dm-words[data-stage="4"] .dm-steps li[data-st="3"] {
	opacity: 1; box-shadow: inset 0 1px 0 #fff, 0 0 0 1.5px color-mix(in oklab, var(--h) 55%, transparent), 0 8px 18px -12px color-mix(in oklab, var(--h) 70%, transparent); }
.dm-words .dm-text p.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--h); animation: dmw-caret 1s steps(1) infinite; }
@keyframes dmw-caret { 50% { opacity: 0; } }
.dmw-fig { position: relative; border-radius: 12px; overflow: hidden; }
.dmw-fig img { transition: clip-path 1.6s cubic-bezier(.65, 0, .35, 1), filter 1.2s ease, opacity .4s ease; }
.dm-words[data-stage="1"] .dmw-fig img, .dm-words[data-stage="2"] .dmw-fig img { clip-path: inset(0 100% 0 0); filter: blur(6px); }
.dm-words[data-stage="3"] .dmw-fig img { clip-path: inset(0 0 0 0); filter: blur(0); }
.dmw-plan { position: absolute; inset: 0; pointer-events: none; }
.dmw-plan i { position: absolute; border: 1.6px dashed color-mix(in oklab, var(--h) 60%, transparent); border-radius: 10px; background: color-mix(in oklab, var(--h) 6%, transparent); opacity: 0; transform: scale(.96); transition: opacity .35s ease var(--d), transform .45s cubic-bezier(.2, .9, .3, 1.2) var(--d); }
.dm-words[data-stage="2"] .dmw-plan i { opacity: 1; transform: none; }
.dm-words[data-stage="3"] .dmw-plan i { opacity: 0; transition-delay: 0s; }
.dmw-checks { position: absolute; inset: 0; pointer-events: none; }
.dmw-ok { position: absolute; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 5px; border-radius: 999px; font: 650 11px var(--face); color: #145c33; background: rgba(232, 246, 238, .96);
	box-shadow: 0 0 0 1px rgba(46, 168, 102, .35), 0 6px 14px -8px rgba(20, 92, 51, .5); opacity: 0; transform: translateY(4px) scale(.9); transition: opacity .3s ease var(--d), transform .4s cubic-bezier(.2, .9, .3, 1.3) var(--d); white-space: nowrap; }
.dmw-ok svg { width: 12px; height: 12px; fill: none; stroke: #1f7a49; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dm-words[data-stage="4"] .dmw-ok { opacity: 1; transform: none; }
.dm-words[data-stage="4"] .dmw-fig img { clip-path: inset(0 0 0 0); filter: none; }
.dmw-status { display: flex; justify-content: center; margin-top: 8px; min-height: 28px; }
.dmw-status b { display: none; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font: 600 12.5px var(--face); color: var(--t1); background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(10, 26, 51, .08); }
.dmw-status b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--h); animation: dmw-pulse 1.1s ease-in-out infinite; }
.dmw-status b[data-st="4"]::before { background: #2ea866; animation: none; }
.dm-words[data-stage="1"] .dmw-status b[data-st="1"], .dm-words[data-stage="2"] .dmw-status b[data-st="2"], .dm-words[data-stage="3"] .dmw-status b[data-st="3"], .dm-words[data-stage="4"] .dmw-status b[data-st="4"] { display: inline-flex; }
@keyframes dmw-pulse { 50% { transform: scale(.6); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .dmw-fig img, .dmw-plan i, .dmw-ok { transition: none !important; } }
/* the words card is as wide as the rows around it */
.h2-window-small { width: 100% !important; max-width: none; }
.dm-wgrid { grid-template-columns: minmax(0, .75fr) 44px minmax(0, 1.6fr); }
.dm-tabs button .cx-plate { grid-row: auto; } .dm-tabs button { min-height: 52px; }
.dmw-plan i em { position: absolute; left: 6px; top: 4px; font: 650 10px var(--face); font-style: normal; color: color-mix(in oklab, var(--h) 80%, black); background: rgba(255, 255, 255, .85); padding: 1px 6px; border-radius: 999px; }
.dmw-plan i { border-radius: 8px; }
/* wide layout: every window and the dock use the page width (with side margins from --wrap) */
.h2-window { width: 100%; }
.h2-dock { width: 100% !important; }
.h2-dock ul { justify-content: space-between; }
.h2-dock li { flex: 1 1 0; min-width: 0; }
.h2-dock li a { width: auto; }
.cx-home2 .h2-hero-in { max-width: 1100px; margin: 0 auto; }
.dm { grid-template-columns: clamp(250px, 20vw, 320px) minmax(0, 1fr); }
.dm-car .dm-svg, .dm-svg { max-width: 900px; }
.fx-row { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
@media (min-width: 1500px) { .sc-grid { gap: 22px; } .dm-tabs button b { font-size: 16px; } }


/* afig-words-in-engine: words demo inside the engine section, full-width layout */
.dm.dm-words{grid-template-columns:minmax(0,1fr)}
.dm-words .dm-panel{padding:22px}
.dm-words .dm-wgrid{grid-template-columns:minmax(0,1fr) 44px minmax(0,1.25fr);align-items:center;gap:18px}
.dm-words .dm-paper{width:100%}
.dm-words .dmw-fig{width:100%}
.dm-words .dmw-fig>img{width:100%;height:auto;display:block}
.sc-words{margin:28px auto 56px}
.sc-sub{text-align:center;font-size:clamp(20px,2.2vw,28px);font-weight:700;letter-spacing:-.01em;margin:0 0 18px}
.sc-sub-ex{margin-top:8px}
@media (max-width:760px){.dm-words .dm-wgrid{grid-template-columns:minmax(0,1fr)}.dm-words .dm-arrow{transform:rotate(90deg);justify-self:center}.dm-words .dm-panel{padding:14px}}

/* trusted-by logos in black & white */
.h2-trust .inst img,.h2-trust .inst svg{filter:grayscale(1);transition:filter .25s}
.h2-trust .inst:hover img,.h2-trust .inst:hover svg{filter:none}

/* richer demo figures: let them use the card width */
.dm-paper .dm-ex>.dm-svg{width:100%;height:auto;margin:0 auto;display:block}
.dm-paper .dm-ex{display:flex;align-items:center;justify-content:center;min-height:min(560px,52vw)}
.dm-paper .dm-ex[hidden]{display:none}

/* ===== tablet & phone: studio demos stack; tabs become a scrollable strip ===== */
@media (max-width:900px){
.dm{grid-template-columns:minmax(0,1fr)!important;gap:10px}
.dm-tabs{display:flex!important;flex-wrap:nowrap;align-items:stretch;align-self:start;overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;padding:6px;gap:6px}
.dm-tabs button{height:auto!important;flex:0 0 auto;scroll-snap-align:start}
.dm-exchips{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:6px;padding-bottom:2px}
.dm-exchips::-webkit-scrollbar{display:none}
.dm-exchips button{flex:0 0 auto;white-space:nowrap}
.dm-steps{flex-wrap:wrap}
.dm-paper .dm-ex{min-height:0}
.dm-words .dm-wgrid{grid-template-columns:minmax(0,1fr)!important}
.dm-words .dm-arrow{transform:rotate(90deg);justify-self:center}
.dm-paper{padding:8px}
}
@media (max-width:560px){
.h2-window-tabs{padding:8px}
.dm-paper .dm-ex>.dm-svg{max-width:none!important}
.dm-foot .cx-btn{width:100%;justify-content:center}
}

/* complex figures stay legible on small screens: swipe sideways */
@media (max-width:900px){
.dm-paper .dm-ex{overflow-x:auto;justify-content:flex-start;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;border-radius:12px}
.dm-paper .dm-ex>.dm-svg{min-width:720px;max-width:none!important;margin:0}
.dm-paper{position:relative}
.dm-paper::after{content:"Swipe to explore →";position:absolute;right:12px;bottom:10px;font-size:11px;font-weight:600;color:#5b6b82;background:#ffffffe0;padding:3px 9px;border-radius:999px;pointer-events:none}
}
@media (min-width:700px) and (max-width:900px){.dm-paper .dm-ex>.dm-svg{min-width:0;width:100%}.dm-paper .dm-ex{overflow-x:visible;justify-content:center}.dm-paper::after{display:none}}

@media (max-width:900px){.dm,.dm-stage,.dm-panel,.dm-car,.dm-paper,.dm-ex{min-width:0!important;max-width:100%}.dm-stage{overflow:hidden}.dm-paper .dm-ex{width:100%}}

.h2-acts,.cx-actions{align-items:center}
@media (max-width:760px){.cx-home2 .h2-acts{align-items:stretch;margin-inline:auto}.cx-home2 .h2-acts .cx-btn{flex:0 0 auto;height:auto}.cx-home2 .h2-acts .h2-link{align-self:center}}

/* ===== editing tools tour (inside "Or describe it in words") ===== */
.dmf{margin-top:22px;padding-top:22px;border-top:1px solid var(--line)}
.dmf-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 4px 12px}
.dmf-h{margin:0;font-size:clamp(18px,1.6vw,22px);font-weight:650;color:var(--t1);letter-spacing:-.01em}
.dmf-p{margin:0;font-size:14px;color:var(--t3)}
.dmf .dm-exchips{margin-bottom:10px}
.dmf .dm-paper .dm-ex{min-height:0}
.dmf .dm-paper .dm-ex>.dm-svg{border-radius:14px}

/* merged describe + edit card */
.dmf-car .dmf-chips{margin:0 0 12px}
.dmf-stage>.dm-ex[hidden]{display:none}
.dmf-paper{display:flex;justify-content:center;align-items:center;padding:10px;border-radius:20px}
.dmf-paper>.dm-svg{width:100%;height:auto;display:block}
@media (max-width:700px){.dmf-paper{overflow-x:auto;justify-content:flex-start;-webkit-overflow-scrolling:touch}.dmf-paper>.dm-svg{min-width:720px;max-width:none!important}}

.h2-window-small:has(.dmf-car){width:min(1180px,100%)}
.dmf-car,.dmf-stage,.dmf-stage>.dm-ex,.dmf-paper{width:100%;box-sizing:border-box}
.dmf-stage>.dmf-desc>.dm-words{width:100%}

.sc-words{width:100%;justify-self:stretch}
.sc-words .h2-window-small{width:min(1180px,100%);margin-inline:auto}

/* ===== one figure, tools as overlays ===== */
.dmf-steps,.dmf-card,.dmf-ov{display:none}
.dmf-car[data-mode="edit"] .dmf-steps[data-t="edit"]{display:flex}.dmf-car[data-mode="edit"] .dmf-card[data-t="edit"]{display:block}.dmf-car[data-mode="edit"] .dmf-ov[data-t="edit"]{display:block}
.dmf-car[data-mode="remove"] .dmf-steps[data-t="remove"]{display:flex}.dmf-car[data-mode="remove"] .dmf-card[data-t="remove"]{display:block}.dmf-car[data-mode="remove"] .dmf-ov[data-t="remove"]{display:block}
.dmf-car[data-mode="repair"] .dmf-steps[data-t="repair"]{display:flex}.dmf-car[data-mode="repair"] .dmf-card[data-t="repair"]{display:block}.dmf-car[data-mode="repair"] .dmf-ov[data-t="repair"]{display:block}
.dmf-car[data-mode="arrows"] .dmf-steps[data-t="arrows"]{display:flex}.dmf-car[data-mode="arrows"] .dmf-card[data-t="arrows"]{display:block}.dmf-car[data-mode="arrows"] .dmf-ov[data-t="arrows"]{display:block}
.dmf-car[data-mode="copy"] .dmf-steps[data-t="copy"]{display:flex}.dmf-car[data-mode="copy"] .dmf-card[data-t="copy"]{display:block}.dmf-car[data-mode="copy"] .dmf-ov[data-t="copy"]{display:block}
.dmf-car[data-mode="recolor"] .dmf-steps[data-t="recolor"]{display:flex}.dmf-car[data-mode="recolor"] .dmf-card[data-t="recolor"]{display:block}.dmf-car[data-mode="recolor"] .dmf-ov[data-t="recolor"]{display:block}
.dmf-car:not([data-mode="describe"]) .dm-steps:not(.dmf-steps),.dmf-car:not([data-mode="describe"]) .dm-text:not(.dmf-card),.dmf-car:not([data-mode="describe"]) .dmw-plan,.dmf-car:not([data-mode="describe"]) .dmw-checks,.dmf-car:not([data-mode="describe"]) .dmw-status{display:none!important}
.dmf-car:not([data-mode="describe"]) .dmw-fig img{opacity:1!important;filter:none!important;clip-path:none!important;transform:none!important}
.dmf-car .dmw-fig{position:relative}
.dmf-ov{position:absolute;inset:0;z-index:3;pointer-events:none}
.dmf-ov>svg{width:100%;height:100%;display:block}
.dmf-car .dmf-steps li{opacity:1}
.dmf-card b{display:block;margin-bottom:10px}
.dmf-card dl{margin:0 0 10px;display:grid;gap:6px}
.dmf-card dl>div{display:flex;justify-content:space-between;gap:12px;font-size:14px}
.dmf-card dt{color:var(--t3)}.dmf-card dd{margin:0;font-weight:600;color:var(--t1);text-align:right}
.dmf-card p{margin:0;font-size:13.5px;line-height:1.5;color:var(--t2)}
.dmf-sw{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px}

/* audit: pause control for the auto-playing demo */
.dmf-chips .dmf-pause{margin-left:auto;display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;border:1px solid #d3dcea;background:#fff;color:#33415c;font:600 12.5px/1 inherit;cursor:pointer}
.dmf-chips .dmf-pause svg{width:12px;height:12px;fill:currentColor;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.dmf-chips .dmf-pause:hover{border-color:#2468b0;color:#1f5c9c}
html[data-theme=dark] .dmf-chips .dmf-pause{background:#1a2133;border-color:#33405c;color:#dbe4f3}
@media (prefers-reduced-motion:reduce){.insts-track{animation:none!important}}
.dmf-chips .dmf-pause{position:sticky;right:0;z-index:2;flex:0 0 auto;box-shadow:-10px 0 12px -4px rgba(255,255,255,.95)}
html[data-theme=dark] .dmf-chips .dmf-pause{box-shadow:-10px 0 12px -4px rgba(14,19,32,.95)}
@media (max-width:700px){.dmf-chips .dmf-pause span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.dmf-chips .dmf-pause{padding:8px 10px}}

/* audit: engine section must never be wider than the phone */
@media (max-width:900px){section.sc>.cx-wrap{grid-template-columns:minmax(0,1fr)!important}section.sc>.cx-wrap>*{min-width:0;max-width:100%}}

/* audit: hero shows the product sooner */
@media (min-width:901px){.h2-hero{padding-top:118px!important}.h2-hero .h2-title{font-size:clamp(44px,5.2vw,72px)!important;line-height:1.02!important}.h2-hero .h2-hero-in{margin-bottom:0}.h2-hero .h2-window-wrap{margin-top:34px!important}}
.h2-flow{list-style:none;display:flex;justify-content:center;flex-wrap:wrap;gap:8px 10px;margin:18px auto 22px;padding:0;max-width:820px;counter-reset:f}
.h2-flow li{counter-increment:f;display:flex;align-items:center;gap:8px;padding:8px 14px 8px 8px;border:1px solid #dbe3ef;border-radius:12px;background:#fff;font-size:14px;color:#3a465c;text-align:left}
.h2-flow li::before{content:counter(f);display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#e8f1fc;color:#1f5c9c;font-weight:700;font-size:12.5px;flex:0 0 auto}
.h2-flow li b{color:#0f1e38;font-weight:700;margin-right:2px}
.h2-flow li+li{position:relative}
@media (min-width:700px){.h2-flow li+li::after{content:"";position:absolute;left:-10px;top:50%;width:10px;height:1px;background:#b9c6da}}
html[data-theme=dark] .h2-flow li{background:#141b2b;border-color:#2c3850;color:#c9d4e6}
html[data-theme=dark] .h2-flow li b{color:#f1f5fb}
html[data-theme=dark] .h2-flow li::before{background:#1e3a5f;color:#dbeaff}
/* audit: example demos are labelled and can be replayed */
.cx-demo-cap{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 10px;margin:0 auto 12px;font-size:13.5px;color:#4a5872;text-align:center}
.cx-demo-tag{display:inline-block;padding:3px 9px;border-radius:999px;background:#fff4e8;color:#a24d00;border:1px solid #ffd2a8;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.cx-replay{padding:5px 11px;border-radius:999px;border:1px solid #d3dcea;background:#fff;color:#1f5c9c;font:600 12.5px/1 inherit;cursor:pointer;min-height:30px}
.cx-replay:hover{border-color:#2468b0}
html[data-theme=dark] .cx-demo-cap{color:#b8c4d8}
html[data-theme=dark] .cx-demo-tag{background:#3a2410;color:#ffc58f;border-color:#6b4219}
html[data-theme=dark] .cx-replay{background:#141b2b;border-color:#2c3850;color:#cfe3ff}
/* audit: gallery cards say what they do; thumbnails never crop labels */
.sc-card .sc-img img{object-fit:contain!important;background:#fff}
.sc-card .sc-go{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:12.5px;font-weight:700;color:#1f5c9c}
.sc-card .sc-go::after{content:"→"}
.sc-card:hover .sc-go,.sc-card:focus-visible .sc-go{text-decoration:underline}
html[data-theme=dark] .sc-card .sc-go{color:#8fc2ff}
.sc-view .sc-zoom{position:absolute;top:12px;right:60px;display:flex;gap:4px;z-index:3}
.sc-view .sc-zoom button{min-width:40px;height:40px;border-radius:10px;border:1px solid #d3dcea;background:#fff;color:#1d2240;font:700 15px/1 inherit;cursor:pointer}
.sc-view figure{overflow:auto;max-height:86vh}
.sc-view figure img{transition:width .18s ease;cursor:zoom-in}
.sc-view.is-zoomed figure img{cursor:zoom-out}
.h2-flow{max-width:1000px}
.h2-flow li{font-size:13.5px}
.h2-window-wrap{flex-wrap:wrap}
.h2-window-wrap>.cx-demo-cap{flex:0 0 100%;width:100%}
