/* The Opportunity Scout v2: the stage.
   One fixed 1920x1080 canvas, scaled to the screen by stage.js.
   All sizes are canvas pixels. Every class is prefixed sg- to stay clear of app.css. */

#stage {
  --navy: #14273e; --navy-deep: #0d1b2c; --brass: #b08d4a; --brass-soft: #c9a96a;
  --brass-glow: rgba(201,169,106,.35); --cream: #f4ede0; --paper: #faf6ed;
  --ink: #1a1812; --ink-2: #4a4538; --ink-3: #7a7262; --rule: #e4dac6;
  --mute: rgba(244,237,224,.55); --line: rgba(244,237,224,.12);
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, sans-serif;
  --mx: 132px; --ease: cubic-bezier(.2,.7,.2,1); --spring: cubic-bezier(.3,1.35,.5,1);
  position: fixed; inset: 0; z-index: 20; overflow: hidden;
  background: #0b1726;
  opacity: 0; pointer-events: none; transition: opacity .6s var(--ease);
}
body.state-intro #stage, body.stage-on #stage { opacity: 1; pointer-events: auto; }

#canvas {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  transform-origin: 0 0; overflow: hidden;
  font-family: var(--sans); color: var(--cream); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1400px 700px at 50% 120%, rgba(176,141,74,.14), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(255,255,255,.04), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}
/* film grain and vignette, the same finish as the dark deck slides */
#canvas::before {
  content: ""; position: absolute; inset: 0; z-index: 60; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
#canvas::after {
  content: ""; position: absolute; inset: 0; z-index: 59; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.45) 100%);
}

.sg-eyebrow { font-weight: 600; font-size: 22px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass-soft); }

/* ---------------------------------------------------------------- acts */
.sg-act { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), transform .9s var(--ease), visibility 0s .9s; }
#canvas.act-1 .sg-act1, #canvas.act-2 .sg-act2, #canvas.act-3 .sg-act3,
#canvas.act-gate .sg-actgate, #canvas.act-firm .sg-actfirm { opacity: 1; visibility: visible; transform: none; transition: opacity .8s var(--ease) .15s, transform .9s var(--ease) .15s, visibility 0s; }
.sg-act1, .sg-actgate, .sg-actfirm { transform: scale(1.02); }
/* the building stays put while the gate, your firm and act 1 change in front of it */
.sg-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; }
#canvas.act-boot .sg-scene, #canvas.act-gate .sg-scene, #canvas.act-firm .sg-scene, #canvas.act-1 .sg-scene { opacity: 1; visibility: visible; transition: opacity .8s var(--ease); }
.sg-act2 { transform: translateY(24px); }
.sg-act3 { transform: scale(.985); }
#canvas.act-3 .sg-act2 { transform: scale(1.03); }

/* ---------------------------------------------------------------- act 1 */
.sg-building {
  position: absolute; right: -160px; top: 0; height: 1080px; width: 1240px;
  background: url(building.jpg) right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.2) 30%, rgba(0,0,0,.75) 70%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.2) 30%, rgba(0,0,0,.75) 70%);
  filter: saturate(.7) brightness(.62);
  animation: sg-drift 40s ease-in-out infinite alternate;
}
@keyframes sg-drift { from { transform: scale(1); } to { transform: scale(1.04) translateY(-10px); } }
.sg-glow {
  position: absolute; right: 40px; top: 50px; width: 900px; height: 240px;
  background: radial-gradient(closest-side, rgba(220,170,90,.32), transparent); filter: blur(8px);
  animation: sg-breathe 5s ease-in-out infinite;
}
@keyframes sg-breathe { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.sg-floor-tag {
  position: absolute; right: 150px; top: 222px; font-size: 18px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass-soft); display: flex; align-items: center; gap: 14px;
}
.sg-floor-tag::before { content: ""; width: 60px; height: 1px; background: var(--brass-soft); }
.sg-mark1 { position: absolute; left: var(--mx); top: 96px; height: 30px; }
.sg-center { position: absolute; left: var(--mx); top: 268px; width: 1100px; }
.sg-h1 { font-family: var(--serif); font-weight: 400; font-size: 168px; line-height: .95; letter-spacing: -.03em; margin: 26px 0 64px; }
.sg-h1 em { font-style: italic; color: var(--brass-soft); }
#stage #q {
  display: block; width: 100%; background: transparent; border: 0; outline: 0; color: var(--cream);
  font-family: var(--serif); font-size: 76px; letter-spacing: -.01em; padding: 0 0 18px;
  border-bottom: 2px solid var(--brass); caret-color: var(--brass-soft);
}
#stage #q::placeholder { color: rgba(244,237,224,.22); }
.sg-hint { margin-top: 30px; font-size: 26px; color: var(--mute); min-height: 40px; }
.sg-hint b { color: var(--cream); font-weight: 500; }
.sg-hint.is-busy::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 14px; border-radius: 50%; background: var(--brass); animation: sg-breathe 1s infinite; }
.sg-found {
  margin-top: 30px; display: inline-flex; align-items: center; gap: 26px;
  padding: 20px 34px 20px 20px; border-radius: 18px;
  background: rgba(244,237,224,.06); border: 1px solid rgba(201,169,106,.45);
  box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  animation: sg-rise .6s var(--spring) both;
}
.sg-found[hidden] { display: none; }
.sg-found + .sg-hint, .sg-center:has(.sg-found:not([hidden])) .sg-hint { display: none; }
.sg-favicon {
  position: relative; width: 76px; height: 76px; border-radius: 14px; background: var(--cream); color: var(--navy);
  display: grid; place-items: center; font-family: var(--serif); font-size: 38px; font-weight: 500; overflow: hidden;
}
.sg-favicon img { position: absolute; inset: 12px; width: 52px; height: 52px; object-fit: contain; opacity: 0; transition: opacity .4s; }
.sg-favicon.has-img img { opacity: 1; }
.sg-favicon.has-img span { opacity: 0; }
.sg-found-dom { font-size: 34px; font-weight: 500; }
.sg-found-sub { font-size: 22px; color: var(--mute); margin-top: 4px; }
.sg-key { margin-left: 20px; padding: 12px 22px; border-radius: 12px; background: var(--brass); color: var(--navy-deep); font-weight: 600; font-size: 22px; letter-spacing: .04em; }
.sg-trust { position: absolute; left: var(--mx); bottom: 64px; display: flex; gap: 40px; font-size: 21px; color: var(--mute); letter-spacing: .02em; }
.sg-trust span::before { content: "\25C6"; color: var(--brass); margin-right: 12px; font-size: 14px; vertical-align: 2px; }
@keyframes sg-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- bar */
.sg-bar {
  position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--mx);
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(-12px); transition: opacity .7s var(--ease), transform .7s var(--ease);
}
#canvas.act-2 .sg-bar, #canvas.act-3 .sg-bar { opacity: 1; transform: none; }
.sg-mark { height: 30px; }
.sg-title { text-align: center; }
.sg-title .sg-eyebrow { font-size: 18px; transition: opacity .3s; }
.sg-dom { font-family: var(--serif); font-size: 40px; margin-top: 6px; letter-spacing: -.01em; }
.sg-counters { grid-column: 3; grid-row: 1; justify-self: end; display: flex; gap: 44px; align-items: flex-end; transition: opacity .5s; }
.sg-counter { text-align: right; }
.sg-counter b { display: block; font-family: var(--serif); font-weight: 400; font-size: 54px; line-height: 1; font-variant-numeric: tabular-nums; }
.sg-counter span { font-size: 15px; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); }
.sg-counter.is-hot b { color: var(--brass-soft); text-shadow: 0 0 24px var(--brass-glow); }
.sg-counter b.bump { animation: sg-bump .5s var(--spring); }
@keyframes sg-bump { 40% { transform: scale(1.25); } }
.sg-ready {
  grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-size: 32px; color: var(--brass-soft);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .6s var(--ease) .2s, transform .6s var(--spring) .2s;
}
.sg-ready i { width: 42px; height: 42px; border-radius: 50%; background: var(--brass); color: var(--navy-deep); display: grid; place-items: center; font-style: normal; font-family: var(--sans); font-size: 22px; font-weight: 700; }
#canvas.is-done .sg-ready { opacity: 1; transform: none; }
#canvas.is-done .sg-counters { opacity: 0; }
.is-replay #sg-ready i { background: transparent; box-shadow: inset 0 0 0 2px var(--brass); color: var(--brass-soft); }

/* ---------------------------------------------------------------- act 2: pages */
.sg-pages { position: absolute; left: var(--mx); top: 180px; width: 330px; }
.sg-pages .sg-eyebrow { margin-bottom: 26px; }
#sg-pagelist { list-style: none; }
.sg-pg { display: flex; align-items: center; gap: 16px; padding: 13px 0; font-size: 23px; color: var(--mute); border-bottom: 1px solid var(--line); animation: sg-rise .4s var(--ease) both; transition: color .3s; }
.sg-pg .sg-tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(244,237,224,.3); flex: none; display: grid; place-items: center; font-size: 15px; transition: all .3s; }
.sg-pg .sg-w { margin-left: auto; font-size: 17px; color: var(--mute); font-variant-numeric: tabular-nums; }
.sg-pg .sg-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.sg-pg.is-read { color: rgba(244,237,224,.8); }
.sg-pg.is-read .sg-tick { border-color: var(--brass); color: var(--brass-soft); }
.sg-pg.is-read .sg-tick::before { content: "\2713"; }
.sg-pg.is-skip { color: rgba(244,237,224,.3); text-decoration: line-through; }
.sg-pg.is-now { color: var(--cream); font-weight: 600; }
.sg-pg.is-now .sg-tick { background: var(--brass); border-color: var(--brass); color: var(--navy-deep); box-shadow: 0 0 0 6px rgba(176,141,74,.22); }

/* ---------------------------------------------------------------- act 2: the paper */
.sg-stack { position: absolute; left: 540px; top: 176px; width: 700px; height: 720px; }
.sg-sheet { position: absolute; inset: 0; background: var(--paper); border-radius: 6px; box-shadow: 0 40px 90px rgba(0,0,0,.5); }
.sg-b2 { transform: translate(-26px, 18px) rotate(-3.2deg); background: #e9e0cd; opacity: .55; }
.sg-b1 { transform: translate(-12px, 9px) rotate(-1.4deg); background: #f0e8d6; opacity: .8; }
.sg-front { color: var(--ink); padding: 54px 60px 0; overflow: hidden; display: flex; flex-direction: column; }
.sg-front.is-flip { animation: sg-flip .5s var(--ease); }
@keyframes sg-flip { 0% { transform: translateX(26px) rotate(1.2deg); opacity: .25; } 100% { transform: none; opacity: 1; } }
.sg-url { display: flex; align-items: center; gap: 12px; font-size: 19px; color: var(--ink-3); padding-bottom: 22px; border-bottom: 1px solid var(--rule); flex: none; white-space: nowrap; overflow: hidden; }
.sg-live { width: 10px; height: 10px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 5px rgba(176,141,74,.2); flex: none; animation: sg-breathe 1.2s infinite; }
.sg-sheet-body { position: relative; flex: 1; overflow: hidden; margin-top: 30px;
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }
.sg-sheet-inner { transition: transform .9s var(--ease); }
.sg-sheet-inner h2 { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1.1; letter-spacing: -.01em; margin-bottom: 26px; }
.sg-sheet-inner p { font-family: var(--serif); font-size: 27px; line-height: 1.55; color: var(--ink-2); margin-bottom: 16px; }
.sg-sheet-inner p.is-dim { color: #a59c89; }
.sg-sheet-inner mark {
  color: var(--ink); padding: 0 4px; border-radius: 3px; background-color: transparent;
  background-image: linear-gradient(rgba(201,169,106,.62), rgba(201,169,106,.62));
  background-repeat: no-repeat; background-position: 0 55%; background-size: 0% 78%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size 1s cubic-bezier(.6,.1,.3,1);
}
.sg-sheet-inner mark.is-on { background-size: 100% 78%; }
.sg-reader {
  position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(176,141,74,.10) 45%, rgba(176,141,74,.10) 55%, transparent);
  border-top: 1px solid rgba(176,141,74,.25); border-bottom: 1px solid rgba(176,141,74,.25);
  transition: top .8s var(--ease), height .8s var(--ease), opacity .4s;
}
.sg-reader.is-on { opacity: 1; }
/* the AI is thinking: a slow brass scan over the stack */
.sg-think { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .6s; }
.sg-think.is-on { opacity: 1; }
.sg-scan { position: absolute; left: 0; right: 0; height: 160px; top: -160px;
  background: linear-gradient(180deg, transparent, rgba(201,169,106,.18) 70%, rgba(201,169,106,.55) 98%, transparent);
  animation: sg-scan 2.6s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes sg-scan { to { top: 100%; } }
.sg-caption { position: absolute; left: 440px; width: 900px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; top: 920px; text-align: center; font-size: 22px; color: var(--mute); min-height: 30px; transition: opacity .3s; }
.sg-caption b { color: var(--brass-soft); font-weight: 600; }
.sg-caption.is-drop { color: #e0b27a; }

/* ---------------------------------------------------------------- act 2: signals */
.sg-signals { position: absolute; right: var(--mx); top: 180px; width: 470px; }
.sg-signals .sg-eyebrow { margin-bottom: 22px; }
.sg-sig { position: relative; height: 134px; padding: 20px 22px 18px 80px; margin-bottom: 12px; border-radius: 14px; background: rgba(244,237,224,.06); border: 1px solid var(--line); overflow: hidden; }
.sg-sig .sg-n { position: absolute; left: 20px; top: 20px; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--brass); color: var(--brass-soft); display: grid; place-items: center; font-family: var(--serif); font-size: 23px; }
.sg-sig h3 { font-weight: 500; font-size: 23px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-sig .sg-quote { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.35; color: var(--brass-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-sig .sg-src { position: absolute; right: 18px; top: 22px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.sg-sig.is-landing { background: transparent; border: 1.5px dashed rgba(201,169,106,.6); }
.sg-sig.is-landing .sg-n { border-style: dashed; }
.sg-sig.is-landing .sg-wait { font-size: 20px; color: var(--mute); line-height: 42px; }
.sg-sig.is-landed { animation: sg-land .6s var(--spring); }
@keyframes sg-land { 0% { box-shadow: 0 0 0 0 rgba(201,169,106,.7); background: rgba(201,169,106,.25); } 100% { box-shadow: 0 0 0 18px rgba(201,169,106,0); } }
.sg-sig:not(.is-landing) h3, .sg-sig:not(.is-landing) .sg-quote { animation: sg-rise .5s var(--ease) both; }

/* the quote that flies from the page to its slot */
.sg-flylayer { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.sg-flyer {
  position: absolute; padding: 16px 22px; background: var(--paper); color: var(--ink); border-radius: 10px;
  font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.35;
  box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 2px var(--brass-soft), 0 0 50px var(--brass-glow);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------------------------------------------------------------- phases */
.sg-phases { position: absolute; left: var(--mx); right: var(--mx); bottom: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sg-phase { position: relative; padding-top: 18px; font-size: 20px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); transition: color .4s; }
.sg-phase::before, .sg-phase::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; }
.sg-phase::before { right: 0; background: var(--line); }
.sg-phase::after { width: 0; background: var(--brass-soft); box-shadow: 0 0 12px var(--brass-glow); }
.sg-phase i { font-style: normal; font-family: var(--serif); letter-spacing: 0; margin-right: 10px; }
.sg-phase.is-now { color: var(--brass-soft); }
.sg-phase.is-now::after { animation: sg-fill 14s cubic-bezier(.1,.6,.3,1) forwards; }
.sg-phase.is-done { color: var(--cream); }
.sg-phase.is-done::after { width: 100%; background: var(--brass); animation: none; transition: width .4s; }
@keyframes sg-fill { from { width: 0; } to { width: 88%; } }

/* ---------------------------------------------------------------- act 3 */
.sg-left { position: absolute; left: var(--mx); top: 170px; width: 590px; }
.sg-co { font-family: var(--serif); font-weight: 400; font-size: 66px; line-height: 1.02; letter-spacing: -.02em; margin: 18px 0 18px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-co.is-long { font-size: 52px; }
.sg-pills { display: flex; gap: 12px; flex-wrap: wrap; min-height: 48px; }
.sg-pill { padding: 8px 16px; border-radius: 999px; font-size: 18px; border: 1px solid rgba(244,237,224,.3); animation: sg-rise .5s var(--ease) both; white-space: nowrap; max-width: 560px; overflow: hidden; text-overflow: ellipsis; }
.sg-pill.is-solid { background: var(--cream); color: var(--navy); border-color: var(--cream); font-weight: 500; }
.sg-grid { position: relative; margin: 40px 0 0 46px; width: 440px; height: 440px; }
.sg-q { position: absolute; border: 1px solid var(--line); font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); padding: 16px; }
/* the quadrant lines sit in the middle */
.sg-tl { left: 0; top: 0; width: 50%; height: 50%; background: rgba(176,141,74,.14); border-color: rgba(201,169,106,.4); color: var(--brass-soft); }
.sg-tr { left: 50%; top: 0; width: 50%; height: 50%; text-align: right; }
.sg-bl { left: 0; top: 50%; width: 50%; height: 50%; display: flex; align-items: flex-end; }
.sg-br { left: 50%; top: 50%; width: 50%; height: 50%; display: flex; align-items: flex-end; justify-content: flex-end; }
.sg-ax { position: absolute; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.sg-ax.sg-y { left: -44px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); }
.sg-ax.sg-x { bottom: -42px; left: 50%; transform: translateX(-50%); }
.sg-pin { position: absolute; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--brass); color: var(--navy-deep); display: grid; place-items: center; font-family: var(--serif); font-size: 28px; font-weight: 500; box-shadow: 0 0 0 9px rgba(176,141,74,.22), 0 12px 30px rgba(0,0,0,.4); animation: sg-drop .7s var(--spring) both; }
@keyframes sg-drop { from { opacity: 0; transform: translateY(-60px) scale(.4); } to { opacity: 1; transform: none; } }

.sg-cards { position: absolute; left: 790px; right: var(--mx); top: 160px; }
.sg-card { position: relative; height: 254px; display: grid; grid-template-columns: 76px 1fr 300px; gap: 0 26px; align-items: start;
  background: var(--paper); color: var(--ink); border-radius: 16px; padding: 28px 34px 24px 30px; margin-bottom: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.4); animation: sg-card .8s var(--spring) both; }
@keyframes sg-card { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
.sg-card .sg-cn { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--brass-soft); display: grid; place-items: center; font-family: var(--serif); font-size: 32px; }
.sg-card h3 { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.08; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-card p { margin-top: 10px; font-size: 23px; line-height: 1.4; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-card .sg-from { margin-top: 10px; font-size: 18px; color: var(--brass); font-weight: 500; letter-spacing: .02em; }
.sg-meta { border-left: 1px solid var(--rule); padding-left: 26px; }
.sg-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.sg-dots { display: inline-flex; gap: 8px; }
.sg-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brass); }
.sg-dots i.on { background: var(--brass); }
.sg-pay { margin-top: 10px; font-family: var(--serif); font-size: 34px; color: var(--navy); line-height: 1.05; }
.sg-pay small { display: block; font-family: var(--sans); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.sg-card.is-top { box-shadow: 0 30px 70px rgba(0,0,0,.4), 0 0 0 3px var(--brass); }
.sg-card.is-top::after { content: "Start here"; position: absolute; right: 34px; top: -16px; background: var(--brass); color: var(--navy-deep); font-size: 15px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
.sg-card.is-slot { background: transparent; box-shadow: none; border: 1.5px dashed rgba(201,169,106,.4); color: var(--mute); display: flex; align-items: center; gap: 22px; font-size: 24px; animation: sg-rise .5s var(--ease) both; }
.sg-card.is-slot .sg-cn { background: transparent; border: 2px dashed rgba(201,169,106,.5); }

.sg-foot { position: absolute; left: var(--mx); right: var(--mx); bottom: 52px; display: flex; justify-content: space-between; align-items: center; }
.sg-stats { font-size: 21px; color: var(--mute); }
.sg-stats b { color: var(--cream); font-weight: 600; }
.sg-keys { display: flex; gap: 14px; opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease) .5s, transform .6s var(--ease) .5s; pointer-events: none; }
#canvas.is-done .sg-keys { opacity: 1; transform: none; pointer-events: auto; }
.sg-k { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 12px; font: 400 21px var(--sans); color: var(--cream); background: transparent; border: 1px solid rgba(244,237,224,.25); cursor: pointer; }
.sg-k:hover { border-color: var(--brass-soft); }
.sg-k:focus { outline: none; }
.sg-k:focus-visible { outline: 2px solid var(--brass-soft); outline-offset: 4px; }
#stage ::selection { background: rgba(201,169,106,.38); color: inherit; }
.sg-k kbd { font-family: var(--sans); font-weight: 700; font-size: 18px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 7px; background: rgba(244,237,224,.14); display: grid; place-items: center; }
.sg-k.sg-primary { background: var(--brass); border-color: var(--brass); color: var(--navy-deep); font-weight: 600; }
.sg-k.sg-primary kbd { background: rgba(13,27,44,.15); }

/* ---------------------------------------------------------------- the gate */
.sg-actgate .sg-center { top: 236px; }
.sg-h1-gate { font-size: 156px; margin-bottom: 58px; }
#stage #code, #stage #firm-site {
  display: block; width: 100%; background: transparent; border: 0; outline: 0; color: var(--cream);
  font-family: var(--serif); font-size: 76px; letter-spacing: -.01em; padding: 0 0 18px;
  border-bottom: 2px solid var(--brass); caret-color: var(--brass-soft);
}
#stage #code::placeholder, #stage #firm-site::placeholder { color: rgba(244,237,224,.22); }
.sg-hint.is-warn { color: #e0b27a; }
.is-shake { animation: sg-shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes sg-shake { 15%, 85% { transform: translateX(-4px); } 30%, 70% { transform: translateX(10px); } 45% { transform: translateX(-14px); } 58% { transform: translateX(14px); } }

/* ---------------------------------------------------------------- your firm */
.sg-firm-reading {
  margin-top: 30px; display: inline-flex; align-items: center; gap: 26px;
  padding: 22px 40px 22px 20px; border-radius: 18px;
  background: rgba(244,237,224,.06); border: 1px solid rgba(201,169,106,.45);
  box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  animation: sg-rise .6s var(--spring) both;
}
.sg-firm-reading[hidden] { display: none; }
.sg-center:has(.sg-firm-reading:not([hidden])) .sg-hint { display: none; }
.sg-steps { list-style: none; display: flex; gap: 30px; margin-top: 8px; }
.sg-steps li { display: flex; align-items: center; gap: 10px; font-size: 21px; color: var(--mute); transition: color .4s; }
.sg-steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(244,237,224,.3); transition: all .4s; }
.sg-steps li.is-now { color: var(--cream); }
.sg-steps li.is-now::before { background: var(--brass); border-color: var(--brass); animation: sg-breathe 1s infinite; }
.sg-steps li.is-done { color: rgba(244,237,224,.8); }
.sg-steps li.is-done::before { background: var(--brass); border-color: var(--brass); }

.sg-firm-ask, .sg-firm-show { transition: opacity .6s var(--ease), transform .7s var(--ease), visibility 0s; }
.sg-firm-show { position: absolute; left: var(--mx); top: 196px; width: 1060px; opacity: 0; visibility: hidden; transform: translateY(24px); }
.sg-actfirm.is-card .sg-firm-ask { opacity: 0; visibility: hidden; transform: translateY(-16px); transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s .5s; }
.sg-actfirm.is-card .sg-firm-show { opacity: 1; visibility: visible; transform: none; transition-delay: .15s; }
#canvas.act-firm:has(.sg-actfirm.is-card) .sg-trust { opacity: 0; transition: opacity .4s; }
#canvas.act-firm:has(.sg-panel:not([hidden])) .sg-floor-tag { opacity: 0; transition: opacity .4s; }
.sg-firm-show > .sg-eyebrow { margin-bottom: 26px; }

.sg-firmcard {
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: 46px 54px 44px;
  box-shadow: 0 40px 90px rgba(0,0,0,.45);
}
.sg-fc-head { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
.sg-logo-tile { position: relative; display: grid; place-items: center; overflow: hidden; background: #fff; color: var(--navy); font-family: var(--serif); font-weight: 500; }
.sg-logo-tile img { position: absolute; object-fit: contain; opacity: 0; transition: opacity .4s; }
.sg-logo-tile.has-img img { opacity: 1; }
.sg-logo-tile.has-img > span { opacity: 0; }
.sg-fc-logo { width: 280px; height: 150px; border-radius: 14px; border: 1px solid var(--rule); font-size: 72px; }
.sg-fc-logo img { inset: 22px 26px; width: calc(100% - 52px); height: calc(100% - 44px); }
.sg-fc-name { font-family: var(--serif); font-weight: 400; font-size: 60px; line-height: 1.04; letter-spacing: -.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-fc-tag { margin-top: 10px; font-size: 23px; line-height: 1.4; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-fc-site { margin-top: 10px; font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.sg-fc-body { display: grid; grid-template-columns: 1fr 290px; gap: 0 40px; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--rule); }
.sg-fc-colors { border-left: 1px solid var(--rule); padding-left: 36px; }
.sg-fc-label { font-weight: 600; font-size: 18px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: 18px; }
.sg-fc-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.sg-fc-pill { padding: 9px 18px; border-radius: 999px; font-size: 20px; color: var(--navy); border: 1px solid rgba(20,39,62,.22); background: rgba(20,39,62,.03);
  white-space: nowrap; max-width: 600px; overflow: hidden; text-overflow: ellipsis; animation: sg-rise .5s var(--ease) both; }
.sg-fc-pill { display: inline-flex; align-items: center; gap: 8px; padding-right: 10px; }
.sg-fc-pill.is-added { border-style: dashed; }
.sg-fc-x { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: rgba(20,39,62,.45); font: 400 22px/1 var(--sans); cursor: pointer; display: grid; place-items: center; }
.sg-fc-x:hover { background: rgba(20,39,62,.08); color: var(--navy); }
.sg-fc-add { display: inline-flex; align-items: center; margin-top: 12px; border: 1px dashed rgba(20,39,62,.35); border-radius: 999px; padding: 4px 6px 4px 18px; background: transparent; }
.sg-fc-add:focus-within { border-color: var(--brass); border-style: solid; }
.sg-fc-add input { border: 0; outline: 0; background: transparent; font: 400 20px var(--sans); color: var(--navy); width: 240px; }
.sg-fc-add input::placeholder { color: rgba(20,39,62,.45); }
.sg-fc-add button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brass); color: var(--navy-deep); font: 600 22px/1 var(--sans); cursor: pointer; }
.sg-fc-hint { margin-top: 12px; font-size: 16px; color: var(--ink-3); }
.sg-swatches { display: grid; gap: 14px; }
.sg-swatch { display: flex; align-items: center; gap: 18px; }
.sg-swatch i { width: 56px; height: 56px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(26,24,18,.14); flex: none; }
.sg-swatch span { font-size: 18px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.sg-swatch code { display: block; font-family: var(--sans); font-size: 22px; letter-spacing: .02em; color: var(--ink); margin-top: 2px; }
.sg-fc-note { margin-top: 14px; font-size: 18px; line-height: 1.4; color: var(--ink-2); }
.sg-fc-actions { display: flex; gap: 14px; margin-top: 40px; }
.sg-k.sg-k-ink { color: var(--navy); border-color: rgba(20,39,62,.25); }
.sg-k.sg-k-ink:hover { border-color: var(--brass); }

/* the small panel: logo, colors and name */
.sg-panel {
  position: absolute; left: 1250px; top: 248px; width: 538px; padding: 40px 42px 38px; border-radius: 18px;
  background: rgba(13,27,44,.86); border: 1px solid rgba(201,169,106,.45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 40px 90px rgba(0,0,0,.5); animation: sg-rise .5s var(--spring) both;
}
.sg-panel[hidden] { display: none; }
.sg-panel > .sg-eyebrow { font-size: 18px; margin-bottom: 26px; }
.sg-field { display: block; margin-bottom: 26px; }
.sg-field > span { display: block; font-size: 18px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin-bottom: 10px; }
#stage .sg-field input[type=text] {
  width: 100%; background: transparent; border: 0; outline: 0; color: var(--cream); font-family: var(--serif); font-size: 34px;
  padding: 0 0 10px; border-bottom: 1.5px solid var(--brass); caret-color: var(--brass-soft);
}
.sg-file { display: flex; align-items: center; gap: 18px; cursor: pointer; }
.sg-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sg-file b { padding: 12px 20px; border-radius: 12px; border: 1px solid rgba(244,237,224,.25); font-weight: 500; font-size: 20px; white-space: nowrap; }
.sg-file:hover b, .sg-file:focus-within b { border-color: var(--brass-soft); }
.sg-file em { font-style: normal; font-size: 18px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sg-color { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 16px; }
.sg-color > span { grid-column: 1 / -1; }
.sg-color input[type=color] { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.sg-color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.sg-color input[type=color]::-webkit-color-swatch { border: 1px solid rgba(244,237,224,.3); border-radius: 12px; }
.sg-color code { font-family: var(--sans); font-size: 22px; color: var(--cream); }
.sg-panel-msg { min-height: 28px; font-size: 19px; color: var(--mute); margin: -4px 0 14px; }
.sg-panel-msg.is-warn { color: #e0b27a; }
.sg-panel-actions { display: flex; gap: 14px; }

/* ---------------------------------------------------------------- act 1: the partner's chip */
.sg-chip {
  position: absolute; right: var(--mx); top: 70px; z-index: 6; display: flex; align-items: center; gap: 20px;
  padding: 10px 28px 10px 10px; border-radius: 16px; cursor: pointer; text-align: left;
  font-family: var(--sans); color: var(--cream);
  background: rgba(13,27,44,.55); border: 1px solid rgba(201,169,106,.45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s;
}
.sg-chip[hidden] { display: none; }
#canvas.act-1 .sg-chip { opacity: 1; transform: none; pointer-events: auto; transition-delay: .3s, .3s, 0s; }
.sg-chip:hover { border-color: var(--brass-soft); }
.sg-chip-logo { width: 128px; height: 68px; border-radius: 10px; background: var(--cream); font-size: 34px; }
.sg-chip-logo img { inset: 9px 12px; width: calc(100% - 24px); height: calc(100% - 18px); }
.sg-chip-text b { display: block; font-weight: 500; font-size: 22px; }
.sg-chip-text span { display: block; margin-top: 3px; font-size: 18px; color: var(--mute); }

/* ---------------------------------------------------------------- act 3: the partner's joint cards */
.sg-co-logo { width: auto; min-width: 76px; max-width: 340px; height: 66px; margin-top: 16px; padding: 0 16px; border-radius: 12px; background: var(--cream); }
.sg-co-logo[hidden] { display: none; }
.sg-co-logo img { position: static; display: block; height: 46px; width: auto; max-width: 300px; }
.sg-left.has-logo .sg-co { margin-top: 14px; }
.sg-left.has-logo .sg-grid { width: 420px; height: 420px; margin-top: 28px; }
.sg-left.has-logo .sg-pin { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 26px; }
.sg-card.is-joint { grid-template-columns: 76px 1fr 270px; }
.sg-card.is-joint h3 { font-size: 34px; }
.sg-duo { margin-top: 12px; display: grid; gap: 6px; }
.sg-duo p { margin: 0; font-size: 20px; line-height: 1.34; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-duo b { font-weight: 700; font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-right: 12px; }
.sg-card.is-joint .sg-meta { padding-left: 24px; }

/* ---------------------------------------------------------------- act 3: the MSP's own service cards */
.sg-card.is-msp { grid-template-columns: 76px 1fr 280px; }
.sg-card.is-msp .sg-meta { padding-left: 24px; }
.sg-card.is-msp h3 { font-size: 36px; }
.sg-svc { display: block; margin-bottom: 8px; font-size: 18px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brass);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-card.is-msp p { margin-top: 8px; font-size: 22px; line-height: 1.38; -webkit-line-clamp: 3; }
.sg-card.is-msp p.sg-why { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.32; color: var(--ink-3); -webkit-line-clamp: 1; }

/* a long name or two rows of pills: the grid steps down so its axis label clears the stats line */
.sg-left.is-tight .sg-grid, .sg-left.is-tight.has-logo .sg-grid { width: 380px; height: 380px; margin-top: 28px; }
.sg-left.is-tight .sg-pin { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 26px; }

/* the letter button while the PDF renders */
.sg-k.sg-primary.is-busy { pointer-events: none; animation: sg-pulse 1.4s ease-out infinite; }
.sg-k.sg-primary.is-busy kbd { background: transparent; }
.sg-k.sg-primary.is-busy kbd::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--navy-deep); animation: sg-breathe 1s infinite; }
@keyframes sg-pulse { 0% { box-shadow: 0 0 0 0 rgba(201,169,106,.65); } 100% { box-shadow: 0 0 0 22px rgba(201,169,106,0); } }

/* ---------------------------------------------------------------- errors and the limit, on the stage */
.sg-modal { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(8,16,28,.62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: sg-fade .5s var(--ease) both; }
.sg-modal[hidden] { display: none; }
@keyframes sg-fade { from { opacity: 0; } }
.sg-modal-card { width: 960px; padding: 58px 66px 54px; border-radius: 18px; background: var(--paper); color: var(--ink);
  box-shadow: 0 50px 120px rgba(0,0,0,.55); animation: sg-card .7s var(--spring) both; }
.sg-modal-card .sg-eyebrow { color: var(--brass); font-size: 20px; }
.sg-modal-msg { margin-top: 20px; font-family: var(--serif); font-size: 46px; line-height: 1.18; letter-spacing: -.01em; color: var(--navy); }
.sg-modal-sub { margin-top: 18px; font-size: 24px; line-height: 1.45; color: var(--ink-2); }
.sg-modal-sub:empty { display: none; }
.sg-modal-sub a { color: var(--navy); font-weight: 600; text-decoration-color: var(--brass); text-underline-offset: 4px; }
.sg-modal-actions { display: flex; gap: 14px; margin-top: 40px; }

/* the old live view shows only behind the stage; its own intro is gone */
#btn-stage { display: none; }
body.state-final #btn-stage { display: inline-flex; }
@media print { #stage { display: none !important; } }
@media (prefers-reduced-motion: reduce) { #stage * { animation-duration: .01s !important; transition-duration: .01s !important; } }
