/*
 * Home page only (css/home.css): hero details, the CRT desktop, and the four product demo windows.
 * Demo content is laid out in logical pixels inside a scaled stage (js/demo/stage.js).
 */

/* ------------------------------------------------------------------------------------------ hero */

.sparkle--hero { left: 5.5%; top: 300px; }
.sparkle--hero2 { right: 9%; top: 140px; width: 30px; height: 30px; background-size: 30px 30px; animation-delay: -2.2s; opacity: .7; }
@media (max-width: 767px) {
  .sparkle--hero { left: 7%; top: auto; bottom: calc(180px + 14px); width: 30px; height: 30px; background-size: 30px 30px; }
  .sparkle--hero2 { display: none; }
}
.hero-lead { text-wrap: balance; }
.hero-ico { display: inline-flex; }
.hero-scene { pointer-events: none; }
.hero-scene .crt { pointer-events: auto; }
.found-sub { color: var(--fg); margin-top: 8px; }
.found .lead { max-width: 720px; }

/* ------------------------------------------------------------------------------------------ CRT desktop (640 x 410) */

.dt { position: absolute; inset: 0; width: 640px; height: 410px; font-family: var(--f-body); color: #0b0b0a; letter-spacing: 0; image-rendering: auto; }
.dt-menubar {
  position: absolute; left: 0; right: 0; top: 0; height: 22px; display: flex; align-items: center; gap: 14px; padding: 0 10px;
  background: #f4f6f1; border-bottom: 1px solid #0b0b0a; font-size: 12px;
}
.dt-menubar img { width: 14px; height: 14px; image-rendering: pixelated; }
.dt-menu { color: #0b0b0a; }
.dt-net { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: #0b0b0a; }
.dt-net i { width: 7px; height: 7px; background: #178a43; display: inline-block; }
.dt-clock { font-family: var(--f-mono); font-size: 11px; }
.dt-icon { position: absolute; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dt-glyph { display: grid; place-items: center; width: 40px; height: 40px; color: #0b0b0a; }
.dt-glyph svg { width: 32px; height: 32px; }
.dt-label { font-size: 11px; line-height: 1; padding: 2px 3px; background: #f4f6f1; color: #0b0b0a; white-space: nowrap; }
.dt-icon.is-sel .dt-glyph { background: #0b0b0a; color: #8ff0b0; }
.dt-icon.is-sel .dt-label { background: #0b0b0a; color: #f4f6f1; }
.dt-win {
  position: absolute; display: none; background: #f7f8f4; border: 1px solid #0b0b0a; box-shadow: 2px 2px 0 #0b0b0a;
}
.dt-win.on { display: block; animation: dt-pop 120ms steps(2) both; }
@keyframes dt-pop { from { transform: scale(.98); } to { transform: none; } }
.dt-title {
  position: relative; height: 19px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #0b0b0a;
  background: repeating-linear-gradient(to bottom, #0b0b0a 0 1px, #f7f8f4 1px 2px); background-clip: content-box; padding: 4px 4px;
}
.dt-title span { position: relative; z-index: 1; padding: 0 8px; background: #f7f8f4; font-size: 11px; line-height: 1; font-family: var(--f-label); text-transform: uppercase; letter-spacing: .03em; }
.dt-close { position: absolute; left: 8px; top: 4px; width: 11px; height: 11px; background: #f7f8f4; border: 1px solid #0b0b0a; z-index: 1; }
.dt-body { position: absolute; inset: 20px 0 0 0; padding: 8px 10px; overflow: hidden; }
.dt-zoom { position: absolute; display: none; border: 1px dashed #0b0b0a; z-index: 40; pointer-events: none; }
.dt-zoom.on { display: block; }
.dt-cursor { position: absolute; left: 0; top: 0; z-index: 60; will-change: transform; }
/* window contents */
.dt-graph line { stroke: #0b0b0a; }
.dt-graph line.p { stroke: #178a43; }
.dt-graph line.n { stroke: #8f8c84; }
.dt-graph .nd { fill: #f7f8f4; stroke: #0b0b0a; stroke-width: 1.5; }
.dt-graph .nd.on { fill: #2fd16b; }
.dt-graph text { font-family: var(--f-body); font-size: 10px; fill: #0b0b0a; }
.dt-graph .big { font-family: var(--f-mono); font-size: 13px; }
.dt-graph .res { font-size: 10px; fill: #178a43; }
.dt-table { font-family: var(--f-mono); font-size: 11px; }
.dt-tr { display: grid; grid-template-columns: 1.2fr 1fr 1fr .6fr; gap: 6px; height: 17px; align-items: center; padding: 0 4px; visibility: hidden; }
.dt-tr.on, .dt-th { visibility: visible; }
.dt-th { border-bottom: 1px solid #0b0b0a; font-family: var(--f-label); text-transform: uppercase; font-size: 10px; }
.dt-tr:nth-child(odd):not(.dt-th) { background: #e9eee6; }
.dt-foot { margin-top: 8px; font-family: var(--f-mono); font-size: 10px; color: #178a43; }
.dt-chart .ax { fill: none; stroke: #0b0b0a; }
.dt-chart .ln { fill: none; stroke: #178a43; stroke-width: 2; }
.dt-board { position: relative; height: 120px; font-size: 11px; }
.dt-row { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: 18px 1fr 1fr 50px; gap: 4px; height: 22px; align-items: center; padding: 0 4px; border-bottom: 1px dotted #9a978f; transition: transform 380ms cubic-bezier(.2, .7, .2, 1); }
.dt-row:nth-child(1) { top: 0; } .dt-row:nth-child(2) { top: 24px; } .dt-row:nth-child(3) { top: 48px; } .dt-row:nth-child(4) { top: 72px; } .dt-row:nth-child(5) { top: 96px; }
.dt-row .sk { font-family: var(--f-mono); text-align: right; }
.dt-row .rk { font-family: var(--f-mono); }
.dt-row.up .sk { color: #178a43; }
.dt-bh { grid-template-columns: 18px 1fr 1fr 50px; }

/* ------------------------------------------------------------------------------------------ demo windows */

.dw-stars { position: absolute; inset: 0; }
.dw {
  position: absolute; background: #0d0c0a; border: 1px solid rgba(255, 255, 255, .13); box-shadow: 0 24px 60px rgba(0, 0, 0, .65);
  font-family: var(--f-body); color: var(--fg-2); letter-spacing: -.1px;
}
.dw-bar {
  position: absolute; inset: 0 0 auto 0; height: 30px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08); font-family: var(--f-label); text-transform: uppercase; font-size: 12px; color: var(--fg-3); white-space: pre;
}
.dw-dots { display: inline-flex; gap: 5px; }
.dw-dots i { width: 8px; height: 8px; background: #2e2924; display: block; }
.dw-dots i:first-child { background: var(--acc-lo); }
.dw-tag { margin-left: auto; font-size: 10px; color: var(--fg-4); letter-spacing: .06em; }
.dw-body { position: absolute; inset: 30px 0 0 0; overflow: hidden; }
.dw .mono { font-family: var(--f-mono); }
.dw .acc { color: var(--acc); }
.dw .dim { color: var(--fg-4); }
.dw .up { color: var(--up); }
.dw .down { color: var(--down); }

/* 01 observe */
.ob-list { position: absolute; left: 0; top: 0; bottom: 0; width: 190px; border-right: 1px solid rgba(255, 255, 255, .07); padding: 10px 0; font-size: 12px; }
.ob-head, .ob-row { display: grid; grid-template-columns: 54px 50px 1fr; align-items: center; padding: 0 14px; }
.ob-head { height: 22px; font-family: var(--f-label); text-transform: uppercase; font-size: 10px; color: var(--fg-4); }
.ob-row { height: 38px; border-top: 1px solid rgba(255, 255, 255, .05); color: var(--fg-3); }
.ob-row.is-cur { background: rgba(47, 209, 107, .07); color: var(--fg); box-shadow: inset 2px 0 0 var(--acc); }
.ob-res { font-family: var(--f-label); text-transform: uppercase; font-size: 10px; }
.ob-row.is-hit .ob-res { color: var(--up); }
.ob-row.is-miss .ob-res { color: var(--down); }
.ob-row.is-cur:not(.is-hit):not(.is-miss) .ob-res { color: var(--pending); }
.ob-strip { position: absolute; left: 12px; right: 12px; top: 10px; height: 14px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.ob-strip i { background: #26221e; display: block; }
.ob-strip i.is-hit { background: var(--acc-lo); }
.ob-strip i.is-miss { background: #7a3a32; }
.ob-strip i.is-cur { box-shadow: 0 0 0 2px var(--fg-2); }
.ob-graph { position: absolute; overflow: visible; }
.ob-graph .e-pos { stroke: var(--acc); }
.ob-graph .e-neg { stroke: #8a857b; }
.ob-graph .n-in { fill: #141210; stroke: #5c564e; stroke-width: 1.5; }
.ob-graph .n-in.is-on { stroke: var(--acc); }
.ob-graph .n-hid { fill: var(--acc); stroke: var(--acc-lo); stroke-width: 1.5; }
.ob-graph .n-out { fill: #141210; stroke: #5c564e; stroke-width: 2; }
.ob-graph .n-out.is-on { fill: var(--acc); stroke: var(--acc-hi); }
.ob-graph .g-lab { font-family: var(--f-label); font-size: 10px; fill: var(--fg-3); text-transform: uppercase; }
.ob-graph .g-val { font-family: var(--f-mono); font-size: 11px; fill: var(--fg); }
.ob-graph .g-big { font-family: var(--f-mono); font-size: 16px; fill: var(--fg); }
.ob-graph .bar-bg { fill: #26221e; }
.ob-graph .bar-fg { fill: var(--acc); }
.ob-stamp { position: absolute; right: 14px; bottom: 12px; font-family: var(--f-label); text-transform: uppercase; font-size: 11px; color: var(--pending); padding: 4px 8px; background: rgba(242, 193, 76, .1); }
.ob-stamp.is-hit { color: var(--up); background: rgba(47, 209, 107, .12); }
.ob-stamp.is-miss { color: var(--down); background: rgba(255, 107, 90, .12); }
.stage--compact .ob-stamp { bottom: 8px; right: 8px; }

/* 02 workshop */
.ws-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.stage--compact .ws-body { padding: 10px 12px; gap: 8px; font-size: 12px; }
.ws-cell { visibility: hidden; }
.ws-cell.is-on { visibility: visible; }
.ws-in { display: flex; align-items: center; gap: 10px; height: 26px; padding: 0 10px; background: #15130f; border-left: 2px solid var(--acc-lo); font-family: var(--f-mono); color: var(--fg); white-space: pre; }
.ws-n { color: var(--fg-4); }
.ws-caret { width: 7px; height: 13px; background: var(--acc); visibility: hidden; margin-left: -6px; }
.ws-caret.is-on { visibility: visible; }
.ws-out { padding: 6px 12px 0; color: var(--fg-3); visibility: hidden; white-space: pre; }
.ws-out.is-on { visibility: visible; }
.ws-table { display: grid; gap: 2px; font-family: var(--f-mono); font-size: 12px; width: 100%; max-width: 520px; }
.ws-tr { display: grid; grid-template-columns: 60px 1fr 1fr 1fr 50px; gap: 8px; height: 18px; align-items: center; visibility: hidden; }
.stage--compact .ws-tr { grid-template-columns: 48px 1fr 1fr 40px; height: 16px; font-size: 11px; }
.ws-tr.is-on, .ws-out.is-on .ws-th { visibility: visible; }
.ws-th { font-family: var(--f-label); text-transform: uppercase; font-size: 10px; color: var(--fg-4); }
.ws-split { display: flex; gap: 3px; height: 12px; width: 100%; max-width: 420px; }
.ws-split i { display: block; height: 100%; width: calc(var(--k, 0) * 100%); }
.ws-split .sp-a { background: var(--acc); } .ws-split .sp-b { background: var(--acc-lo); } .ws-split .sp-c { background: #5c564e; }
.ws-legend { display: flex; gap: 14px; margin-top: 6px; font-family: var(--f-mono); font-size: 11px; color: var(--fg-4); }

/* 03 proving */
.pg-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; padding: 18px 20px; }
.stage--compact .pg-body { grid-template-columns: 1fr; gap: 14px; padding: 12px 14px; }
.pg-title { font-family: var(--f-label); text-transform: uppercase; font-size: 11px; color: var(--fg-4); margin-bottom: 10px; letter-spacing: .04em; }
.pg-t2 { margin-top: 18px; }
.pg-row { display: grid; grid-template-columns: 92px 1fr 54px; align-items: center; gap: 10px; height: 28px; font-size: 12px; }
.pg-name { color: var(--fg-3); }
.pg-track { position: relative; height: 12px; background: #1d1a16; display: block; }
.pg-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--k, 0) * 100%); display: block; }
.pg-base { background: #6b665e; }
.pg-you { background: var(--acc); box-shadow: 0 0 10px rgba(47, 209, 107, .4); }
.pg-val { text-align: right; color: var(--fg); font-size: 12px; }
.pg-cal { display: block; }
.pg-cal .ax { fill: #12100e; stroke: #2e2924; }
.pg-cal .diag { stroke: #4a443d; stroke-dasharray: 3 3; }
.pg-cal .dot { fill: var(--acc); }
.pg-gate { display: flex; align-items: center; gap: 10px; height: 30px; font-size: 13px; color: var(--fg-4); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.stage--compact .pg-gate { height: 26px; font-size: 12px; }
.pg-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; background: #1d1a16; color: transparent; }
.pg-gate.is-pass { color: var(--fg); }
.pg-gate.is-pass .pg-ic { background: var(--acc); color: var(--on-acc); }
.pg-ready { margin-top: 16px; display: inline-flex; padding: 8px 12px; font-family: var(--f-label); text-transform: uppercase; font-size: 12px; color: var(--fg-4); box-shadow: inset 0 0 0 2px #2e2924; }
.pg-ready.is-on { color: var(--on-acc); background: var(--acc); box-shadow: none; }
.stage--compact .pg-ready { margin-top: 10px; }

/* 04 training */
.tr-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; padding: 16px 18px; }
.stage--compact .tr-body { grid-template-columns: 1fr; gap: 12px; padding: 10px 12px; }
.tr-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.tr-k { font-family: var(--f-label); text-transform: uppercase; font-size: 10px; color: var(--fg-4); }
.tr-head .mono { margin-right: 10px; color: var(--fg); }
.tr-svg { display: block; overflow: visible; }
.tr-svg .grid { stroke: #1f1c18; }
.tr-svg .ax { stroke: #3a352f; }
.tr-svg .tr-line { fill: none; stroke: var(--acc); stroke-width: 2; }
.tr-svg .tr-val { fill: none; stroke: #6b665e; stroke-width: 1.5; stroke-dasharray: 3 3; }
.tr-svg .tr-dot { fill: var(--acc-hi); }
.tr-step { display: grid; grid-template-columns: 96px 1fr 72px; align-items: center; gap: 8px; height: 26px; font-size: 12px; color: var(--fg-4); }
.stage--compact .tr-step { height: 22px; }
.tr-step.is-on { color: var(--fg-2); }
.tr-step.is-done .tr-label { color: var(--fg); }
.tr-bar { height: 6px; background: #1d1a16; display: block; position: relative; }
.tr-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--k, 0) * 100%); background: var(--acc); display: block; }
.tr-st { text-align: right; font-size: 11px; }
.tr-step.is-done .tr-st { color: var(--acc); }
.tr-genome { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; margin-top: 12px; }
.stage--compact .tr-genome { grid-template-columns: repeat(24, 1fr); margin-top: 6px; }
.tr-genome i { display: block; aspect-ratio: 1; background: #17140f; }
.tr-genome i.is-on.gp { background: rgba(47, 209, 107, var(--a)); }
.tr-genome i.is-on.gn { background: rgba(170, 165, 155, var(--a)); }
.tr-tx { margin-top: 12px; min-height: 26px; display: flex; align-items: center; padding: 0 10px; font-family: var(--f-mono); font-size: 11px; color: var(--fg-4); }
.tr-tx.is-pending { color: var(--pending); background: rgba(242, 193, 76, .08); }
.tr-tx.is-done { color: var(--on-acc); background: var(--acc); font-family: var(--f-label); text-transform: uppercase; font-size: 12px; }
.stage--compact .tr-tx { margin-top: 8px; }

/* compact demos (phones): a 340 px canvas scaled to about 0.8 to 1, so the small labels grow to stay legible */
.stage--compact .dw-bar { font-size: 13px; }
.stage--compact .dw-tag { font-size: 11px; }
.stage--compact .ob-graph .g-lab, .stage--compact .ob-graph .g-val { font-size: 12px; }
.stage--compact .ob-stamp { font-size: 12px; }
.stage--compact .ws-body { font-size: 13px; }
.stage--compact .ws-tr { font-size: 12px; height: 18px; }
.stage--compact .ws-th { font-size: 11px; }
.stage--compact .ws-legend { font-size: 12px; gap: 12px; }
.stage--compact .pg-title { font-size: 12px; }
.stage--compact .pg-row, .stage--compact .pg-val { font-size: 13px; }
.stage--compact .pg-gate { font-size: 13px; }
.stage--compact .pg-ready { font-size: 12px; }
.stage--compact .tr-head, .stage--compact .tr-step { font-size: 13px; }
.stage--compact .tr-k { font-size: 11px; }
.stage--compact .tr-st, .stage--compact .tr-tx { font-size: 12px; }

/* closing headings keep their weight on phones (Polyp Serif grid: 48 from 360 px, 32 below) */
@media (min-width: 360px) and (max-width: 639px) {
  .found .h2-sm, .cta .h2-sm { font-size: 48px; }
}
