/* ==========================================================================
   FX Gliese · case page scenes (after excited.agency/works/ravel)
   Product UI comes from ui.css; this file lays the scenes out on the page.
   Ground colour: a red dwarf ember, set on <body> as --ground-*.
   ========================================================================== */

/* dark browser frame */
.gl-frame { position: relative; border-radius: 12px; overflow: hidden; background: #0b0e11; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 2px 6px #0000004d, 0 50px 90px -30px #000000c8; }
.gl-frame-bar { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px; background: #15181d; border-bottom: 1px solid #22272e; }
.gl-frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2e343d; flex: none; }
.gl-frame-bar span { margin-left: 10px; flex: 1; max-width: 380px; height: 20px; border-radius: 6px; background: #0b0e11; font: 500 11px/20px var(--font-mono); color: #8b94a3; padding: 0 10px; letter-spacing: .02em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gl-frame img { display: block; width: 100%; height: auto; }
@media (max-width: 720px) { .gl-frame { border-radius: 8px; } .gl-frame-bar { height: 20px; gap: 5px; padding: 0 8px; } .gl-frame-bar i { width: 6px; height: 6px; } .gl-frame-bar span { height: 12px; font-size: 7.5px; line-height: 12px; } }

/* ---------- 1. hero ---------- */
.gl-hero { position: relative; aspect-ratio: 2 / 1; background: radial-gradient(80% 110% at 78% 0%, var(--ground-1) 0%, var(--ground-2) 46%, var(--ground-3) 100%); overflow: hidden; }
.gl-hero::before { content: ""; position: absolute; right: 7%; top: -22%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,140,80,.32), rgba(235,91,25,.08) 45%, transparent 70%); filter: blur(10px); }
.gl-hero .gl-frame { position: absolute; left: 6%; top: 9%; width: 88%; }
.gl-hero .gl-frame { animation: gl-rise 1.1s cubic-bezier(.2,.8,.2,1) .1s both; }
@keyframes gl-rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .gl-hero { aspect-ratio: 16 / 12; } .gl-hero .gl-frame { left: 4%; top: 7%; width: 130%; } }

/* ---------- 2. research ---------- */
.gl-rh { margin-top: 56px; display: flex; align-items: baseline; gap: 12px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.gl-rh > .k { font: 500 12px/1 var(--font-mono); letter-spacing: .08em; color: var(--accent); }
.prose + .gl-rh { margin-top: 40px; }

/* A · layout teardown */
.gl-teardown { margin-top: 18px; padding: clamp(14px, 3vw, 36px); border-radius: clamp(14px, 1.6vw, 20px); background: radial-gradient(120% 100% at 18% 0%, var(--ground-1) 0%, var(--ground-2) 58%, var(--ground-3) 100%); }
.gl-q { display: flex; flex-wrap: wrap; gap: 8px; }
.gl-q button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.28); color: #d8d0c8; font: 500 14px/1.2 var(--font-sans); cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.gl-q button > .k { font: 500 11px/1 var(--font-mono); letter-spacing: .06em; color: #9a8f86; transition: color .25s; }
.gl-q button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gl-q button[aria-selected="true"] > .k { color: inherit; opacity: .7; }
.gl-q button:focus-visible { box-shadow: var(--focus); outline: none; }
.gl-lts { margin-top: clamp(16px, 2.4vw, 28px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px) clamp(12px, 1.6vw, 20px); }
.gl-lt { margin: 0; min-width: 0; }
.gl-lt-box { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #0b0e11; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 40px -24px #000; }
.gl-lt--ours .gl-lt-box { box-shadow: 0 0 0 1px var(--accent-line), 0 24px 40px -24px #000; }
.gl-lz { position: absolute; box-sizing: border-box; border: 1px solid #252b33; border-radius: 3px; background: #11151a; transition: border-color .45s, background-color .45s, opacity .45s, box-shadow .45s; transition-delay: calc(var(--k, 0) * 110ms); }
.gl-lz { margin: 0; } /* zones are drawn with a 0.6% gutter by their coordinates */
.gl-lz em { position: absolute; left: 6px; top: 5px; right: 6px; font: 500 9px/1.2 var(--font-mono); font-style: normal; letter-spacing: .04em; color: #6c7581; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .45s; transition-delay: inherit; }
.gl-lz--bar, .gl-lz--rail { border: 0; border-radius: 0; background: #161a20; }
.gl-lz--ch { background: #11151a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0 30 L8 27 L15 29 L22 22 L30 24 L38 17 L46 20 L54 13 L62 16 L70 11 L78 14 L86 8 L93 10 L100 6' fill='none' stroke='%232a313b' stroke-width='1.2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center 62% / 86% 52% no-repeat; }
.gl-lz--rows { background-image: repeating-linear-gradient(180deg, transparent 0 18px, #1a1f26 18px 19px); background-position: 0 6px; }
.gl-lz--line { border: 1px dashed #353c46; background: #151a20; display: flex; align-items: center; }
.gl-lz--line em { position: static; padding: 0 6px; }
.gl-lz--chip { border-radius: 999px; background: #1e242c; border-color: #2d343e; display: flex; align-items: center; justify-content: center; }
.gl-lz--chip em { position: static; text-align: center; padding: 0 4px; }
.gl-lz--dlg { z-index: 2; background: #1b2027 linear-gradient(#262c35, #262c35) 0 0 / 100% 14% no-repeat; border-color: #3a424e; box-shadow: 0 14px 28px rgba(0,0,0,.65); }
.gl-lz--dlg::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 14%; height: 18%; border-radius: 3px; background: linear-gradient(90deg, #3a2023 0 48%, transparent 48% 52%, #183428 52%); }
.gl-lz--dlg em { top: 1.5%; color: #8b94a3; }
/* the question lights up its zone, card by card */
.gl-teardown[data-q] .gl-lz:not([data-q]) { opacity: .72; }
.gl-teardown[data-q="order"] .gl-lz[data-q="order"], .gl-teardown[data-q="risk"] .gl-lz[data-q="risk"] { opacity: 1; border-color: var(--accent); border-style: solid; background-color: rgba(235,91,25,.2); box-shadow: 0 0 0 3px rgba(235,91,25,.18), 0 14px 28px rgba(0,0,0,.5); }
.gl-teardown[data-q="order"] .gl-lz[data-q="order"] em, .gl-teardown[data-q="risk"] .gl-lz[data-q="risk"] em { color: #ffb48a; }
.gl-teardown[data-q="risk"] .gl-lz--dlg { opacity: .18; }
.gl-lt figcaption { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; }
.gl-lt figcaption b { font-size: 15px; font-weight: 600; color: #f2efeb; }
.gl-lt figcaption small { font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #9a8f86; justify-self: end; text-align: right; }
.gl-lt-n { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.5; color: #cfc6be; display: none; }
.gl-teardown[data-q="order"] .gl-lt-n[data-n="order"], .gl-teardown[data-q="risk"] .gl-lt-n[data-n="risk"] { display: block; animation: gl-fade .5s ease both; animation-delay: calc(var(--k, 0) * 110ms); }
.gl-lt--ours .gl-lt-n { color: #ffb48a; }
@keyframes gl-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .gl-lts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gl-lz em { display: none; } .gl-lt figcaption small { display: none; } .gl-lt figcaption b { font-size: 14px; } .gl-lt-n { font-size: 12.5px; } .gl-q button { font-size: 13px; padding: 8px 12px; } }

/* B · feature matrix */
.gl-mx-wrap { margin-top: 18px; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.gl-mx { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.4; }
.gl-mx th, .gl-mx td { padding: 13px 10px; }
.gl-mx thead th { font: 500 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); text-align: center; background: var(--surface); }
.gl-mx thead th:first-child { text-align: left; padding-left: 18px; }
.gl-mx thead th.g { color: var(--accent); }
.gl-mx tbody tr { border-top: 1px solid var(--line); }
.gl-mx tbody th { text-align: left; font-weight: 500; padding-left: 18px; color: var(--text); }
.gl-mx td { text-align: center; width: 10%; }
.gl-mx .g { background: rgba(235,91,25,.07); }
.gl-mx tr.gap th { color: var(--text); }
.gl-mx tr.gap td.g { background: rgba(235,91,25,.16); }
.gl-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; box-sizing: border-box; vertical-align: middle; }
.gl-dot--f { background: var(--text); }
.gl-dot--h { border: 1.5px solid var(--text); background: linear-gradient(90deg, var(--text) 50%, transparent 50%); }
.gl-dot--n { border: 1.5px solid var(--dim); opacity: .7; }
.gl-mx .g .gl-dot--f { background: var(--accent); }
.gl-gap { display: inline-block; margin-left: 10px; padding: 3px 7px; border-radius: 3px; border: 1px solid var(--accent-line); font: 500 10px/1 var(--font-mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); vertical-align: 2px; white-space: nowrap; }
.gl-legend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.gl-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.gl-legend .gl-gap { margin: 0; }
.js .gl-mx-wrap.scene tbody tr { opacity: 0; transform: translateY(6px); }
.js .gl-mx-wrap.scene .g .gl-dot { transform: scale(0); }
.js .gl-mx-wrap.scene .gl-gap { opacity: 0; }
.js .gl-mx-wrap.scene.is-on tbody tr { opacity: 1; transform: none; transition: opacity .5s ease calc(var(--i) * 70ms), transform .5s ease calc(var(--i) * 70ms); }
.js .gl-mx-wrap.scene.is-on .g .gl-dot { transform: none; transition: transform .45s cubic-bezier(.3,1.6,.5,1) calc(700ms + var(--i) * 90ms); }
.js .gl-mx-wrap.scene.is-on .gl-gap { opacity: 1; transition: opacity .4s ease calc(1500ms + var(--i) * 60ms); }
@media (max-width: 640px) {
  .gl-mx, .gl-mx thead, .gl-mx tbody { display: block; }
  .gl-mx tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gl-mx thead th:first-child { display: none; }
  .gl-mx thead th { padding: 10px 2px; font-size: 9.5px; letter-spacing: .02em; }
  .gl-mx tbody th { grid-column: 1 / -1; padding: 12px 14px 2px; font-size: 14px; }
  .gl-mx td { width: auto; padding: 8px 2px 12px; }
  .gl-mx .g { background: transparent; } .gl-mx tr.gap td.g { background: transparent; }
  .gl-mx td.g .gl-dot { box-shadow: 0 0 0 4px rgba(235,91,25,.18); }
}

/* C · one task, two flows */
.gl-walk { margin-top: 18px; }
.gl-walk-task { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 15px; line-height: 1.5; }
.gl-walk-task > .k { margin-right: 12px; font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.gl-lanes { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.gl-lane { display: flex; flex-direction: column; padding: 16px 18px 16px; border-radius: 12px; border: 1px solid var(--line-strong); transition: border-color .4s; }
.gl-lane--g { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(235,91,25,.06), transparent 60%); }
.gl-lane header { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.gl-lane header b { font-size: 16px; font-weight: 600; }
.gl-lane-c { margin-left: auto; font: 500 12px/1 var(--font-mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.gl-lane-c i { font-style: normal; color: var(--text); }
.gl-lane-done { display: none; padding: 4px 8px; border-radius: 3px; background: var(--accent); color: var(--on-accent); font: 500 10.5px/1 var(--font-mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.gl-lane.done .gl-lane-done { display: inline-block; animation: gl-fade .35s ease both; }
.gl-lane--mt .gl-lane-done { background: var(--surface-2, #2a2a2c); color: var(--text); }
.gl-lane ol { list-style: none; margin: 0; padding: 0; }
.gl-lane li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); opacity: .32; transition: opacity .35s; }
.gl-lane li > span { font: 500 11px/1.9 var(--font-mono); color: var(--dim); }
.gl-lane li p { font-size: 14.5px; line-height: 1.5; }
.gl-lane li.on { opacity: 1; }
.gl-lane li.cur > span { color: var(--accent); }
.gl-wt { display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 3px; background: rgba(240,166,58,.13); color: #f0a63a; font: 500 10px/1.3 var(--font-mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; vertical-align: 1px; }
.gl-lane footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font: 500 12px/1.4 var(--font-mono); letter-spacing: .02em; color: var(--muted); }
.gl-lane--g footer { color: var(--accent); }
@media (max-width: 760px) { .gl-lanes { grid-template-columns: minmax(0, 1fr); } }

/* D · findings to decisions */
.gl-finds { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gl-find { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; transition: border-color .25s, transform .25s, background-color .25s; }
.gl-find:hover { border-color: var(--accent-line); background: var(--surface); transform: translateY(-2px); }
.gl-find:focus-visible { box-shadow: var(--focus); outline: none; }
.gl-find-k { font: 500 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.gl-find-f { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.gl-find-d { display: flex; gap: 8px; font-size: 15.5px; line-height: 1.45; font-weight: 600; }
.gl-find-d .ri { flex: none; width: 16px; height: 16px; margin-top: 3px; fill: var(--accent); }
.gl-find-go { margin-top: auto; padding-top: 6px; font: 500 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.js .gl-finds.scene .gl-find { opacity: 0; transform: translateY(12px); }
.js .gl-finds.scene.is-on .gl-find { opacity: 1; transform: none; transition: opacity .6s ease calc(var(--i) * 110ms), transform .6s cubic-bezier(.2,.8,.2,1) calc(var(--i) * 110ms), border-color .25s, background-color .25s; }
.js .gl-finds.scene.is-on .gl-find:hover { transform: translateY(-2px); transition-delay: 0s; }
@media (max-width: 1100px) { .gl-finds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gl-finds { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 3. anatomy ---------- */
.gl-anat { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.gl-anat-stage { padding: clamp(12px, 3vw, 36px); border-radius: clamp(14px, 1.6vw, 20px); background: radial-gradient(120% 100% at 18% 0%, var(--ground-1) 0%, var(--ground-2) 58%, var(--ground-3) 100%); }
.gl-anat-img { position: relative; }
.gl-anat-img { overflow: hidden; }
.gl-zone { position: absolute; z-index: 1; border-radius: 6px; box-shadow: inset 0 0 0 2px transparent, 0 0 0 9999px rgba(6,6,6,0); transition: box-shadow .5s; pointer-events: none; }
.gl-zone b { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--font-mono); background: rgba(11,14,17,.85); color: var(--muted); box-shadow: 0 0 0 1px rgba(255,255,255,.18); transition: all .35s; }
.gl-zone.on { z-index: 2; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 9999px rgba(6,6,6,.5); }
.gl-zone.on b { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.gl-zlist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.gl-zlist li { background: var(--bg); padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; cursor: default; transition: background-color .3s; }
.gl-zlist li > span { font: 500 11px/1.4 var(--font-mono); color: var(--dim); letter-spacing: .06em; }
.gl-zlist b { font-size: 15px; line-height: 1.3; font-weight: 600; }
.gl-zlist p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.gl-zlist li.on { background: var(--surface); }
.gl-zlist li.on > span { color: var(--accent); }
.gl-zlist small { font: 500 10.5px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 1100px) { .gl-zlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gl-zlist li:last-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .gl-zlist { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 4. order scene ---------- */
.gl-stage { margin-top: 32px; padding: clamp(10px, 3vw, 36px); border-radius: clamp(14px, 1.6vw, 20px); background: radial-gradient(120% 100% at 18% 0%, var(--ground-1) 0%, var(--ground-2) 58%, var(--ground-3) 100%); }
.gl-stage .gx-fit { border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 40px 80px -30px #000000c0; }
.gx-ord { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: 64px minmax(0, 1fr) 184px; gap: 4px; padding: 4px; }
.gx-ord > .gx-head { grid-column: 1; grid-row: 1; }
.gx-ord > .gx-chart { grid-column: 1; grid-row: 2; }
.gx-ord > .gx-ticket { grid-column: 2; grid-row: 1 / 4; }
.gx-ord > .gx-book { grid-column: 1; grid-row: 3; }
.gx-ord .gx-stats > div:nth-child(n+4) { display: none; }
.gx-ord .gx-book .gx-tbl th:nth-child(2), .gx-ord .gx-book .gx-tbl td:nth-child(2), .gx-ord .gx-book .gx-tbl th:nth-child(8), .gx-ord .gx-book .gx-tbl td:nth-child(8) { display: none; }
.gx-risk .gx-book .gx-tbl th:nth-child(2), .gx-risk .gx-book .gx-tbl td:nth-child(2) { display: none; }
.gl-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gl-steps li { position: relative; padding: 12px 14px 16px; border-radius: 10px; color: var(--muted); cursor: pointer; transition: background-color .3s, color .3s; }
.gl-steps li > span { display: block; font: 500 11px/1.4 var(--font-mono); letter-spacing: .06em; color: var(--dim); }
.gl-steps li b { font-size: 15px; font-weight: 600; font-family: var(--font-sans); }
.gl-steps li i { position: absolute; left: 14px; right: 14px; bottom: 7px; height: 2px; border-radius: 1px; background: var(--line); overflow: hidden; }
.gl-steps li i::after { content: ""; display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s ease; }
.gl-steps li.on { background: var(--surface); color: var(--text); }
.gl-steps li.on > span { color: var(--accent); }
.gl-steps li.on i::after { width: 55%; }
.gl-steps li.done i::after { width: 100%; }
.gl-steps li:focus-visible { box-shadow: var(--focus); }
@media (max-width: 760px) { .gl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gl-steps li b { font-size: 13.5px; } }
.gl-ctrl { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.gl-ctrl > span { font: 400 12px/1.4 var(--font-mono); color: var(--dim); }
.gl-ctrl button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 2px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.gl-ctrl button:hover { border-color: var(--accent-line); color: var(--text); }

/* ---------- 5. risk scene ---------- */
.gx-risk { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: 150px minmax(0, 1fr); gap: 4px; padding: 4px; }
.gx-risk > .gx-spark { grid-column: 1; grid-row: 1; padding: 12px 14px 0; position: relative; }
.gx-risk > .gx-book { grid-column: 1; grid-row: 2; }
.gx-risk > .gx-accp { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: flex-end; }
.gx-risk .gx-accp .gx-acc { border-top: 0; margin-top: 0; padding: 18px 16px; gap: 12px; height: 100%; }
.gx-risk .gx-accp .gx-acc .rows b { font-size: 15px; }
.gx-risk .gx-accp .gx-ml-top b { font-size: 22px; }
.gx-risk .gx-accp .gx-ml { margin-top: auto; gap: 10px; }
.gx-risk .gx-accp .gx-meter { height: 8px; border-radius: 4px; }
.gx-risk .gx-accp .gx-ml-note { font-size: 12px; min-height: 36px; }
.gx-sp-h { display: flex; align-items: baseline; gap: 10px; font-size: 12px; white-space: nowrap; }
.gx-sp-h b { font-size: 14px; }
.gx-sp-px { margin-left: auto; font-size: 20px; font-weight: 700; }
.gx-spark svg { position: absolute; left: 14px; right: 14px; bottom: 10px; width: calc(100% - 28px); height: 92px; overflow: visible; }
.gx-spark .ln { fill: none; stroke: var(--down); stroke-width: 2; vector-effect: non-scaling-stroke; }
.gx-spark circle { fill: var(--down); stroke: #15181d; stroke-width: 3; }
.gx-spark .mk { stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity .3s; vector-effect: non-scaling-stroke; }
.gx-spark .mk.mc { stroke: var(--warn); } .gx-spark .mk.so { stroke: var(--down); }
.gx-spark.mc-on .mk.mc, .gx-spark.so-on .mk.so { opacity: 1; }
.gx-sp-tag { position: absolute; top: 40px; transform: translateX(-102%); margin-left: 10px; padding: 2px 6px; border-radius: 3px; font-size: 10.5px; font-weight: 700; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.gx-sp-tag.mc { background: var(--warn-soft); color: var(--warn); } .gx-sp-tag.so { background: var(--down); color: #fff; top: 64px; }
.gx-spark.mc-on .gx-sp-tag.mc, .gx-spark.so-on .gx-sp-tag.so { opacity: 1; }
.gl-move { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.gl-move label { font: 500 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.gl-move output { font: 600 14px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: #f6465d; min-width: 64px; }
.gl-move input[type=range] { flex: 1; min-width: 80px; accent-color: var(--accent); height: 24px; cursor: ew-resize; }
.gl-move button { flex: none; }
@media (max-width: 560px) { .gl-move { flex-wrap: wrap; } .gl-move input[type=range] { flex-basis: 100%; order: 3; } }

/* ---------- 6. handoff scene ---------- */
.gl-hand-in { background: #f4f5f7; }
.gl-cp { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.gl-cp > img { position: absolute; left: 0; top: 0; width: 100%; height: auto; max-width: none; }
.gl-cp-scrim { position: absolute; inset: 0; background: rgba(11,21,48,.45); opacity: 0; transition: opacity .4s; }
.gl-cp-modal { position: absolute; left: 50%; top: 50%; width: 520px; padding: 32px; border-radius: 14px; background: #fff; color: #2b3445; transform: translate(-50%, -44%); opacity: 0; transition: all .45s cubic-bezier(.2,.8,.2,1); box-shadow: 0 30px 80px rgba(11,21,48,.35); font-family: "Geist", sans-serif; text-align: center; }
.gl-cp-modal.in { opacity: 1; transform: translate(-50%, -50%); }
.gl-cp.dim .gl-cp-scrim { opacity: 1; }
.gl-cp-scrim { z-index: 1; } .gl-cp-modal { z-index: 2; }
.gl-cp-modal .ok { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: #e6f6ef; color: #0f7a4f; display: grid; place-items: center; }
.gl-cp-modal .ok svg { width: 30px; height: 30px; fill: currentColor; }
.gl-cp-modal h5 { margin: 0; font-size: 22px; font-weight: 700; color: #0b1530; }
.gl-cp-modal p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: #6b7385; }
.gl-cp-modal dl { margin: 20px 0 0; padding: 14px 16px; border-radius: 8px; background: #f4f5f7; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; text-align: left; }
.gl-cp-modal dt { color: #6b7385; } .gl-cp-modal dd { margin: 0; text-align: right; font-weight: 600; color: #0b1530; }
.gl-cp-modal .btns { margin-top: 22px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.gl-cp-modal .btns span { height: 46px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600; transition: transform .12s, filter .2s; }
.gl-cp-modal .btns .sec { box-shadow: inset 0 0 0 1px #c9cfda; color: #0b1530; }
.gl-cp-modal .btns .pri { background: #cc480c; color: #fff; }
.gl-cp-modal .btns .pri svg { width: 18px; height: 18px; fill: currentColor; }
.gl-cp-modal .btns .pri.press { transform: scale(.97); filter: brightness(1.12); }
.gl-term { position: absolute; inset: 0; z-index: 1; transform: translateY(102%); transition: transform .9s cubic-bezier(.7,0,.2,1); box-shadow: 0 -30px 60px rgba(0,0,0,.5); }
.gl-term.in { transform: none; }
.gl-term .gx-term-host { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; }
.gl-hand .gl-frame-bar span { transition: color .3s; }

/* ---------- 6b. edge-case details on a dark ground ---------- */
.gl-edges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.gl-edge { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.gl-edge .detail-ground { padding: clamp(14px, 3vw, 36px); flex: 1; display: grid; place-items: center; }
.gl-edge .detail-ground .zoomable { width: auto; }
.gl-edge .detail-ground img { width: auto; max-width: 100%; max-height: 440px; border-radius: 8px; }
.gl-edge--wide { grid-column: span 2; }
.gl-edge--wide .detail-ground { height: 100%; }
.gl-edge figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.gl-edge figcaption b { display: block; color: var(--text); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
@media (max-width: 560px) { .gl-edges { grid-template-columns: minmax(0, 1fr); } .gl-edge--wide { grid-column: auto; } }

/* panels of the book, shown as plain screens */
.gl-tabs-duo { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.gl-tabs-duo .media { margin: 0; padding: clamp(10px, 2.4vw, 28px); }

/* scenes pause off screen */
.scene:not(.vis) .gx *, .scene:not(.vis) .gx *::before, .scene:not(.vis) .gx *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .gl-hero .gl-frame, .gl-zone, .gl-lz, .gl-lz em, .gl-lane li, .gl-find, .gl-term, .gl-cp-modal, .gl-steps li i::after { animation: none !important; transition: none !important; }
  .js .gl-mx-wrap.scene tbody tr, .js .gl-finds.scene .gl-find, .js .gl-mx-wrap.scene .gl-gap { opacity: 1; transform: none; } .js .gl-mx-wrap.scene .g .gl-dot { transform: none; }
}
.cp .cols > div > .ri { display: block; width: 22px; height: 22px; margin-bottom: 14px; color: var(--accent); }
.gl .cols > div > .ri { display: block; width: 22px; height: 22px; margin-bottom: 14px; color: var(--accent); }

/* risk scene: extra account facts between the balances and the margin level */
.gx-risk .gx-xtra { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.gx-risk .gx-xtra div { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.gx-risk .gx-xtra span { color: var(--sec); }
.gx-risk .gx-xtra b { font-weight: 600; }
.gx-risk .gx-xtra .big { font-size: 20px; font-weight: 700; }
.gx-risk .gx-xtra .gx-pill { font-size: 11px; }
