/* Graph film on the TensorOS page (laptops and larger): the automation Graph view, laid out
   at 1440 × 810 like the automation film and scaled to its frame. Steps float on springs; a
   cursor drags one, sets steps up in the side panel and zooms. Follows the site theme.
   Showing and hiding the film against the still image lives in site.css. */
.tour-media .window.gf-window { display: block; aspect-ratio: auto; padding: clamp(5px, .7vw, 9px); }
.gf-frame { position: relative; overflow: hidden; aspect-ratio: 1440 / 810; border: 1px solid var(--line); border-radius: calc(var(--r-xl) - 8px); container-type: inline-size; contain: paint; }

.gf-app {
  --bg: #ecece8; --surface: #fff; --line: #ececea; --line2: #e1e1dd; --text: #141412; --muted: #6c6c66; --faint: #8f8f89;
  --soft: #f3f3f0; --dot: #d9d9d5; --edge: #c8c8c4; --edge-lit: #3a3a37; --node: #fff; --node-line: #e2e2de;
  --ready: #3d9a4a; --setup: #a3a39d; --pri: #141412; --pri-fg: #fff; --rail-ic: #2e2e2b; --rail-on: #dcdcd8;
  --ok-soft: #e6eedd; --ok-text: #4d6a38; --pill: #efefec; --shadow: rgba(20, 20, 18, .08);
  position: absolute; left: 0; top: 0; width: 1440px; height: 810px; overflow: hidden;
  transform: scale(var(--k, tan(atan2(100cqw, 1440px)))); transform-origin: 0 0;
  background: var(--bg); color: var(--text); font: 400 14px/1.4 var(--sans); letter-spacing: 0; text-align: left;
  user-select: none; -webkit-user-select: none;
}
html[data-theme="dark"] .gf-app {
  --bg: #0e0e0e; --surface: #161616; --line: #252525; --line2: #2f2f2f; --text: #ececec; --muted: #a2a2a2; --faint: #858585;
  --soft: #202020; --dot: #2c2c2c; --edge: #454545; --edge-lit: #e6e6e6; --node: #1d1d1d; --node-line: #343434;
  --ready: #5bb06a; --setup: #707070; --pri: #f2f2f2; --pri-fg: #111; --rail-ic: #cfcfcf; --rail-on: #2a2a2a;
  --ok-soft: #24301b; --ok-text: #b4c896; --pill: #262626; --shadow: rgba(0, 0, 0, .4);
}
.gf-app * { box-sizing: border-box; }
.gf-app img { display: block; border: 0; border-radius: 0; background: none; }
.gf-app svg { display: block; }
.gf-app p, .gf-app b, .gf-app small, .gf-app h4 { margin: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; }
.gf-app i, .gf-app em { font-style: normal; }
html[data-theme="dark"] .gf-app .gf-inv { filter: invert(1); }
.gf-hold *, .gf-hold *::before, .gf-hold *::after { transition: none !important; }
.gf-ic svg, .gf-tb svg, .gf-rail svg, .gf-ctl svg, .gf-panel svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Rail */
.gf-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 52px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 0; }
.gf-rail i { position: relative; display: grid; place-items: center; width: 34px; height: 30px; border-radius: 9px; color: var(--rail-ic); }
.gf-rail i svg { width: 17px; height: 17px; stroke-width: 1.5; }
.gf-rail i.is-cur { background: var(--rail-on); color: var(--text); }
.gf-rail i.is-gap { flex: 1; }
.gf-rail i.is-gift { height: 34px; background: var(--ok-soft); color: var(--ok-text); }
.gf-rail u { position: absolute; right: 1px; top: -3px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 9px; background: #566f40; color: #fff; font: 700 9px/15px var(--sans); text-align: center; text-decoration: none; }
.gf-rail .gf-me { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #7ea35a 0%, #3f8a7c 55%, #2f6fb0 100%); }

/* Surface and toolbar */
.gf-main { position: absolute; left: 52px; top: 6px; right: 6px; bottom: 6px; overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.gf-tb { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.gf-tb > i { display: grid; place-items: center; width: 30px; height: 30px; color: var(--muted); }
.gf-tb > i svg { width: 18px; height: 18px; }
.gf-tb h4 { margin-left: 4px; white-space: nowrap; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.gf-saved { margin-left: 26px; white-space: nowrap; padding: 4px 10px; border: 1px solid var(--line2); border-radius: 7px; color: var(--muted); font-size: 12.5px; }
.gf-tb .gf-sp { flex: 1; }
.gf-tbtn { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 600; white-space: nowrap; }
.gf-tbtn svg { width: 15px; height: 15px; }
.gf-tbtn.is-sq { width: 34px; padding: 0; justify-content: center; }
.gf-tbtn.is-pri { border-color: var(--pri); background: var(--pri); color: var(--pri-fg); }
.gf-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--soft); }
.gf-seg span { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.gf-seg span svg { width: 15px; height: 15px; }
.gf-seg span.is-on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--line2), 0 1px 2px var(--shadow); }

/* Canvas */
.gf-canvas { position: absolute; left: 0; right: 0; top: 58px; bottom: 0; overflow: hidden; background-image: radial-gradient(var(--dot) 1.1px, transparent 1.3px); background-size: 26px 26px; background-position: 13px 13px; }
.gf-world { position: absolute; left: 0; top: 0; width: 1382px; height: 740px; transform-origin: 0 0; will-change: transform; }
.gf-edges { position: absolute; left: 0; top: 0; overflow: visible; }
.gf-edges line { stroke: var(--edge); stroke-width: 1.3; transition: stroke .25s ease, opacity .25s ease, stroke-width .25s ease; }
.gf-edges marker path { fill: var(--edge); }
.gf-edges line.is-lit { stroke: var(--edge-lit); stroke-width: 1.8; }
.is-focus .gf-edges line:not(.is-lit) { opacity: .25; }
.gf-node { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.gf-node > .gf-ic { position: absolute; left: -23px; top: -23px; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--node-line); border-radius: 50%; background: var(--node); box-shadow: 0 2px 8px var(--shadow); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s ease, opacity .25s ease; }
.gf-node > .gf-ic img { width: 24px; height: 24px; object-fit: contain; }
.gf-node > .gf-ic svg { width: 22px; height: 22px; color: var(--text); }
.gf-node.is-fill > .gf-ic { overflow: hidden; border: 0; }
.gf-node.is-fill > .gf-ic img { width: 46px; height: 46px; }
.gf-node.is-cube > .gf-ic img { width: 30px; height: 30px; }
.gf-node.is-trigger > .gf-ic { left: -27px; top: -27px; width: 54px; height: 54px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5.5px var(--text), 0 2px 8px var(--shadow); }
.gf-node > em { position: absolute; left: 13px; top: -24px; z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--setup); box-shadow: 0 0 0 2.5px var(--surface); transition: opacity .25s ease; }
.gf-node.is-ready > em { background: var(--ready); }
.gf-node.is-trigger > em { left: 16px; top: -28px; }
.gf-node > b { position: absolute; left: -110px; top: 30px; width: 220px; overflow: hidden; color: var(--muted); font-size: 14.5px; font-weight: 500; text-align: center; text-overflow: ellipsis; white-space: nowrap; transition: color .25s ease, opacity .25s ease; }
.gf-node.is-trigger > b { top: 34px; }
.gf-node.is-hover > .gf-ic { transform: scale(1.1); box-shadow: 0 6px 18px var(--shadow); }
.gf-node.is-trigger.is-hover > .gf-ic { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5.5px var(--text), 0 6px 18px var(--shadow); }
.gf-node.is-lit > b, .gf-node.is-sel > b { color: var(--text); }
.gf-node.is-sel > .gf-ic { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text), 0 6px 18px var(--shadow); }
.is-focus .gf-node:not(.is-lit) > .gf-ic, .is-focus .gf-node:not(.is-lit) > em { opacity: .3; }
.is-focus .gf-node:not(.is-lit) > b { opacity: .35; }
.gf-node.is-drag > .gf-ic { transform: scale(1.12); box-shadow: 0 12px 26px var(--shadow); }

/* Overlays on the canvas */
.gf-hint { position: absolute; right: 22px; top: 18px; z-index: 3; color: var(--faint); font-size: 13.5px; transition: right .5s cubic-bezier(.32, .72, 0, 1); }
.gf-foot { position: absolute; left: 22px; bottom: 16px; z-index: 3; width: 420px; color: var(--faint); font-size: 13px; line-height: 1.45; }
.gf-ctl { position: absolute; right: 16px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface); box-shadow: 0 4px 14px var(--shadow); transition: right .5s cubic-bezier(.32, .72, 0, 1); }
.gf-ctl span { display: grid; place-items: center; height: 32px; padding: 0 11px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .2s ease, transform .15s ease; }
.gf-ctl span.is-on { background: var(--soft); color: var(--text); font-weight: 600; }
.gf-ctl span.is-ic { width: 34px; padding: 0; }
.gf-ctl span.is-ic svg { width: 16px; height: 16px; }
.gf-ctl i { width: 1px; height: 22px; margin: 0 4px; background: var(--line2); }
.is-panel .gf-hint { right: 462px; }
.is-panel .gf-ctl { right: 456px; }

/* Side panel, as in TensorOS */
.gf-panel { position: absolute; right: 0; top: 58px; bottom: 0; z-index: 5; width: 440px; overflow: hidden; border-left: 1px solid var(--line); background: var(--surface); box-shadow: -14px 0 36px var(--shadow); transform: translate3d(102%, 0, 0); transition: transform .55s cubic-bezier(.32, .72, 0, 1); }
.is-panel .gf-panel { transform: none; }
.gf-pin { position: absolute; inset: 0; transition: opacity .22s ease, transform .3s ease; }
.gf-pin.is-out { opacity: 0; transform: translateY(6px); }
.gf-ph { position: relative; display: flex; gap: 16px; padding: 26px 26px 24px; border-bottom: 1px solid var(--line); }
.gf-ph .gf-plogo { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid var(--node-line); border-radius: 13px; background: var(--node); box-shadow: 0 1px 3px var(--shadow); }
.gf-ph .gf-plogo img { width: 26px; height: 26px; }
.gf-ph small { display: block; color: var(--muted); font: 500 13.5px/1.4 var(--mono); letter-spacing: -.01em; transition: color .3s ease; }
.gf-ph h4 { display: block; margin-top: 3px; font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.gf-ph p { margin-top: 9px; padding-right: 18px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.gf-x { position: absolute; right: 18px; top: 22px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); transition: background-color .2s ease, transform .15s ease; }
.gf-x svg { width: 18px; height: 18px; }
.gf-sec { padding: 22px 26px; border-bottom: 1px solid var(--line); }
.gf-sec > h4 { display: block; margin-bottom: 14px; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.gf-pseg { position: relative; display: flex; padding: 4px; border-radius: 12px; background: var(--soft); }
.gf-pseg u { position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc(50% - 4px); border-radius: 9px; background: var(--surface); box-shadow: 0 0 0 1px var(--line2), 0 1px 3px var(--shadow); text-decoration: none; transform: translateX(100%); }
.gf-pseg span { position: relative; flex: 1; height: 40px; color: var(--muted); font-size: 15.5px; font-weight: 600; line-height: 40px; text-align: center; }
.gf-pseg span:last-of-type { color: var(--text); }
.gf-lab { display: block; margin: 18px 0 8px; font-size: 15px; font-weight: 600; }
.gf-lab i { margin-left: 3px; color: var(--faint); font-size: 13px; font-weight: 400; }
.gf-in { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; height: 46px; padding: 0 15px; overflow: hidden; border: 1px solid var(--line2); border-radius: 10px; background: var(--surface); color: var(--faint); font-size: 15px; white-space: nowrap; transition: border-color .25s ease, box-shadow .25s ease, background-color .4s ease; }
.gf-in b { color: var(--text); font-weight: 500; }
.gf-in .gf-dotc { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ready); }
.gf-in code { padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--text); font: 500 13px/1.4 var(--mono); }
.gf-key.is-focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--soft); }
.gf-key .gf-val { overflow: hidden; color: var(--text); font: 500 14px/1 var(--mono); letter-spacing: -.02em; text-overflow: ellipsis; }
.gf-key.is-filled .gf-phd { display: none; }
.gf-key.is-flash { background: var(--ok-soft); }
.gf-row2 { display: flex; gap: 10px; }
.gf-row2 .gf-in { flex: 1; }
.gf-verify { position: relative; height: 46px; min-width: 96px; justify-content: center; padding: 0 16px; border-radius: 10px; font-size: 15px; transition: background-color .3s ease, border-color .3s ease, transform .15s ease; }
.gf-verify > i { display: none; width: 15px; height: 15px; }
.gf-verify .gf-spin { border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gf-spin .7s linear infinite; }
.gf-verify.is-busy .gf-spin { display: block; }
.gf-verify.is-done { border-color: #566f40; background: #566f40; color: #fff; }
.gf-verify.is-done .gf-ok { display: block; }
.gf-verify .gf-ok svg { stroke-width: 2.4; }
@keyframes gf-spin { to { transform: rotate(360deg); } }
.gf-small { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; transition: color .3s ease; }
.gf-small.is-ok { color: var(--ok-text); }
.gf-sel { justify-content: space-between; background: var(--soft); }
.gf-sel svg { flex: none; width: 17px; height: 17px; }
.gf-sel.is-set { background: var(--surface); color: var(--text); font-weight: 500; }
.gf-kv { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; color: var(--muted); font-size: 15px; }
.gf-kv b { color: var(--text); font-weight: 600; }
.gf-pill { padding: 4px 11px; border-radius: 999px; background: var(--pill); color: var(--muted); font-size: 13px; font-weight: 500; transition: background-color .3s ease, color .3s ease; }
.gf-pill.is-ready { background: var(--ok-soft); color: var(--ok-text); }
.gf-tog { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 15px; font-weight: 600; }
.gf-tog small { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; font-weight: 400; }
.gf-sw { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line2); transition: background-color .3s ease; }
.gf-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .35s cubic-bezier(.32, .72, 0, 1); }
.gf-sw.is-on { background: #566f40; }
.gf-sw.is-on::after { transform: translateX(18px); }
.gf-app .is-press { transform: scale(.95); }
.gf-node > em { transition: background-color .4s ease, opacity .25s ease; }

/* Cursor */
.gf-cur { position: absolute; left: 0; top: 0; z-index: 20; width: 22px; height: 26px; margin: -2px 0 0 -3px; opacity: 0; pointer-events: none; will-change: transform; transition: opacity .3s ease; }
.gf-cur.is-on { opacity: 1; }
.gf-cur svg { width: 100%; height: 100%; transform-origin: 20% 15%; transition: transform .12s ease; }
.gf-cur.is-down svg { transform: scale(.84); }

.gf-node > .gf-ic svg[viewBox] path[fill^="url"] { transform: scale(1.12); transform-origin: 50% 50%; }
