/* PlumbersHub partner app. Light only (Ariel's request), gold accents from the ServiceLinked logo,
   large high-contrast type for easy reading with glasses. */
:root {
  --paper: #fbf8f1;
  --card: #ffffff;
  --ink: #14161b;
  --ink-2: #353a45;
  --muted: #555b67;
  --line: #e6dfcd;
  --line-2: #d8ceb6;
  --gold: #c9a23a;        /* fills, rules, rings */
  --gold-deep: #a8841c;   /* chart series 1 */
  --gold-ink: #6e540c;    /* gold-colored text (passes AA on white) */
  --gold-wash: #f7eed6;
  --blue: #2d5b9a;        /* chart series 2 */
  --terra: #b5523b;       /* chart series 3 */
  --good: #1f6b3d;
  --good-wash: #e5f3ea;
  --bad: #9e2a1f;
  --bad-wash: #fbe9e6;
  --shadow: 0 1px 2px rgba(20, 22, 27, .05), 0 8px 24px rgba(20, 22, 27, .06);
  --r: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Cinzel', 'Times New Roman', serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--gold-ink); }
h1, h2, h3, h4 { line-height: 1.22; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 18px; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.gold { background: linear-gradient(180deg, #d7b14b, #b8901f); color: #1b1503; box-shadow: 0 6px 18px rgba(168, 132, 28, .3); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 16px; border-radius: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 15px; font-weight: 650; cursor: pointer;
}
.chip svg { width: 18px; height: 18px; }
.chip.explain { border-color: var(--gold); color: var(--gold-ink); background: var(--gold-wash); }
.chip.playing { background: var(--gold); color: #1b1503; }
.chip:hover { border-color: var(--gold); }

/* ---------- sign-in ---------- */
.signin { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 600px at 50% -10%, #fff 0%, rgba(255,255,255,0) 60%), var(--paper); }
.signin-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 34px 26px 28px; text-align: center; }
.signin-card .logo { width: 190px; margin: 0 auto 8px; display: block; }
.brandline { font-family: var(--display); font-weight: 700; letter-spacing: .16em; color: var(--gold-ink); font-size: 15px; text-transform: uppercase; }
.signin-card h1 { font-size: 27px; margin: 18px 0 8px; }
.signin-card p { color: var(--muted); }
.field { text-align: left; margin: 18px 0 14px; }
.field label { display: block; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.field input {
  width: 100%; min-height: 58px; border: 2px solid var(--line-2); border-radius: 12px; padding: 0 16px; font-size: 20px; background: #fff;
}
.field input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px rgba(201, 162, 58, .2); }
.code-input { letter-spacing: .5em; text-align: center; font-weight: 800; font-size: 28px !important; }
.signin-card .btn { width: 100%; }
.err { color: var(--bad); font-weight: 600; min-height: 26px; margin-top: 10px; font-size: 16px; }
.linkbtn { background: none; border: 0; color: var(--gold-ink); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 10px; font-size: 16px; }
.fineprint { font-size: 14px; color: var(--muted); margin-top: 18px; }

/* ---------- entrance (intro) ---------- */
.intro {
  position: relative; height: 100svh; overflow: hidden; color: var(--ink);
  background: radial-gradient(900px 520px at 50% 0%, #fffdf7 0%, rgba(255,253,247,0) 70%), linear-gradient(180deg, #fbf8f1, #f4ecd8);
}
.intro::before { /* soft gold circuitry, a nod to the logo */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(90deg, rgba(201,162,58,.12) 1px, transparent 1px), linear-gradient(0deg, rgba(201,162,58,.12) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
}
.intro-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 18px 10px; z-index: 3; }
.intro-top img { height: 38px; }
.intro-top .who { font-size: 14px; color: var(--muted); font-weight: 600; text-align: right; line-height: 1.3; }
.dots { position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 3; }
.dots i { width: 10px; height: 10px; border-radius: 99px; background: var(--line-2); transition: all .3s; }
.dots i.on { width: 34px; background: var(--gold); }
.slide {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 84px 18px 74px; opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .6s ease, transform .6s ease; pointer-events: none;
}
.slide.on { opacity: 1; transform: none; pointer-events: auto; }
.stage { width: 100%; max-width: 980px; text-align: center; border-radius: 22px; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-wash); border: 1px solid #ecdcae; border-radius: 99px; padding: 6px 14px; }
.slide h2 { font-size: clamp(30px, 5.4vw, 56px); font-weight: 800; margin: 16px auto 10px; max-width: 900px; }
.slide h2 em { font-style: normal; background: linear-gradient(180deg, transparent 62%, rgba(201,162,58,.35) 62%); }
.slide .lede { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); max-width: 760px; margin: 0 auto; }
.tap-hint { position: absolute; bottom: 52px; left: 0; right: 0; text-align: center; font-size: 15px; color: var(--muted); font-weight: 600; z-index: 3; pointer-events: none; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin: 26px auto 0; max-width: 820px; }
.vs .side { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 16px; box-shadow: var(--shadow); }
.vs .side.win { border: 2px solid var(--gold); }
.vs .k { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.vs .big { font-size: clamp(30px, 5vw, 48px); font-weight: 800; line-height: 1.1; margin: 8px 0 4px; }
.vs .s { font-size: 15px; color: var(--ink-2); }
.vs .mid { align-self: center; font-family: var(--display); font-weight: 700; color: var(--gold-ink); font-size: 20px; }
.side.lose .big { color: var(--bad); }
.side.win .big { color: var(--good); }
.intro-chart { position: relative; display: flex; flex-direction: column; height: min(50svh, 400px); max-width: 860px; margin: 18px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.cities { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 22px auto 0; text-align: left; }
.intro-chart .ch-in { position: relative; flex: 1; min-height: 0; }
.person .short { display: none; font-size: 15px; margin: 0; }
.city { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.city h3 { font-size: 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.city h3 span { font-size: 13px; color: var(--gold-ink); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.flow { list-style: none; margin: 12px 0 0; padding: 0; }
.flow li { display: flex; gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 16px; }
.flow li b { font-size: 20px; min-width: 120px; }
.team { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; max-width: 880px; margin: 24px auto 0; text-align: left; align-items: stretch; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.person .role { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.person h3 { font-size: 22px; margin: 4px 0 2px; }
.person .co { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.person ul { margin: 0; padding-left: 20px; font-size: 16px; }
.link-emblem { align-self: center; width: 64px; }
.scroll-cta { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 24px; font-weight: 800; color: var(--gold-ink); background: none; border: 0; cursor: pointer; font-size: 18px; }
.scroll-cta svg { width: 30px; height: 30px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }
.gate { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; text-align: center; padding: 24px; cursor: pointer;
  background: radial-gradient(900px 520px at 50% 30%, #fffdf7 0%, rgba(255,253,247,.92) 60%, rgba(244,236,216,.98) 100%); transition: opacity .6s ease; }
.gate.gone { opacity: 0; pointer-events: none; }
.gate .emblem { width: min(300px, 70vw); animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 18px rgba(201,162,58,.55)); transform: scale(1.02); } }
.gate h1 { font-size: clamp(28px, 5vw, 46px); margin: 18px 0 6px; }
.gate .for { color: var(--muted); font-size: 17px; }
.gate .tap { margin-top: 26px; }
.sound-note { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* ---------- app shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 241, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: max(8px, env(safe-area-inset-top)) 16px 8px;
}
.topbar-in { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.topbar img { height: 34px; }
.topbar .name { font-family: var(--display); font-weight: 700; letter-spacing: .08em; font-size: 17px; }
.topbar .sp { flex: 1; }
.menu-btn { width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); display: grid; place-items: center; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
.toc { position: fixed; inset: 0; z-index: 80; background: rgba(20,22,27,.35); display: none; }
.toc.open { display: block; }
.toc nav { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 88vw); background: var(--card); padding: max(18px, env(safe-area-inset-top)) 16px 24px; overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
.toc a { display: flex; gap: 12px; align-items: center; padding: 12px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; }
.toc a:hover { background: var(--gold-wash); }
.toc a .n { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--gold-wash); color: var(--gold-ink); font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.toc .tools { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: grid; gap: 8px; }

main.dash { max-width: 1160px; margin: 0 auto; padding: 8px 16px 140px; }
.hello { padding: 30px 0 8px; }
.hello h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; }
.hello p { color: var(--ink-2); font-size: 19px; max-width: 760px; margin-top: 8px; }

section.sec { position: relative; margin-top: 34px; scroll-margin-top: 80px; }
.sec-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.sec-head .num { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.sec-head h2 { font-size: clamp(25px, 3.2vw, 32px); font-weight: 800; margin-top: 4px; }
.sec-head .sub { color: var(--muted); font-size: 17px; margin-top: 4px; max-width: 720px; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); transition: box-shadow .35s ease, transform .35s ease; }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card .meta { font-size: 14px; color: var(--muted); }
.card.gold-top { border-top: 4px solid var(--gold); }
.kpi .v { font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; line-height: 1.1; }
.kpi .l { font-size: 15px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.kpi .t { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.pill { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--gold-wash); color: var(--gold-ink); letter-spacing: .04em; }
.pill.good { background: var(--good-wash); color: var(--good); }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.callout { border-left: 5px solid var(--gold); background: var(--gold-wash); border-radius: 12px; padding: 16px 18px; font-size: 18px; }
.callout b { color: var(--ink); }
.list { margin: 0; padding-left: 22px; }
.list li { margin: 6px 0; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.check li:first-child { border-top: 0; }
.check li svg { flex: none; width: 24px; height: 24px; color: var(--good); margin-top: 2px; }

.chart-card .ch { position: relative; height: 340px; }
.chart-card .ch.tall { height: 420px; }
.chart-card .ch.short { height: 260px; }
.chart-card .cap { font-size: 15px; color: var(--muted); margin-top: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 2px 0 10px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; vertical-align: -2px; }
.src { font-size: 13px; color: var(--muted); margin-top: 8px; }
details.table-view { margin-top: 10px; }
details.table-view summary { cursor: pointer; font-size: 15px; font-weight: 700; color: var(--gold-ink); }

.tbl { width: 100%; border-collapse: collapse; font-size: 16px; }
.tbl th, .tbl td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fcfaf4; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.total td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; }
.tbl .ours { color: var(--good); font-weight: 700; }
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tw .tbl { min-width: 620px; }
.tw.fit .tbl { min-width: 0; }

/* timeline */
.phases { display: grid; gap: 14px; }
.phase { display: grid; grid-template-columns: 70px 1fr; gap: 16px; }
.phase .when { text-align: center; }
.phase .when b { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto; border-radius: 16px; background: var(--ink); color: #fff; font-size: 20px; }
.phase .when span { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.phase .card h3 { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.owner { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.who-tag { display: inline-block; min-width: 54px; text-align: center; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px; margin-right: 8px; letter-spacing: .05em; }
.who-tag.a { background: #e7eef8; color: var(--blue); }
.who-tag.r { background: var(--gold-wash); color: var(--gold-ink); }
.who-tag.b { background: #efeae0; color: var(--ink-2); }

/* simulator */
.sim-controls .budget { font-size: clamp(40px, 6vw, 60px); font-weight: 800; line-height: 1; }
.sim-controls .budget small { font-size: 18px; color: var(--muted); font-weight: 600; }
input[type=range] { width: 100%; height: 44px; accent-color: var(--gold-deep); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--card); }
.seg button { min-height: 46px; padding: 0 16px; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 16px; color: var(--ink-2); }
.seg button + button { border-left: 1.5px solid var(--line-2); }
.seg button.on { background: var(--ink); color: #fff; }
.ctl-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 14px; }
.ctl-row .lab { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); width: 100%; margin-bottom: -6px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sim-out .kpi .v.pos { color: var(--good); }
.sim-out .kpi .v.neg { color: var(--bad); }
.alloc-row td .bar { height: 10px; border-radius: 0 4px 4px 0; background: var(--gold-deep); min-width: 2px; }
.alloc-row td.barcell { width: 32%; }
.alloc-city td { background: #fcfaf4; font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); }
.flag { font-size: 13px; color: var(--bad); font-weight: 700; }

/* notes / reply */
.reply-link { background: none; border: 0; color: var(--gold-ink); font-weight: 700; cursor: pointer; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 0; }
.reply-link svg { width: 18px; height: 18px; }
.chip.reply-link { border: 1.5px solid var(--line-2); background: var(--card); padding: 0 14px; color: var(--ink-2); }
.reply-link .count { background: var(--gold); color: #1b1503; border-radius: 99px; font-size: 12px; padding: 1px 8px; }
.sheet-back { position: fixed; inset: 0; z-index: 90; background: rgba(20, 22, 27, .4); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; max-height: 88svh; overflow-y: auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 22px 20px max(22px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.15); animation: up .28s ease; }
@media (min-width: 700px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet h3 { font-size: 22px; }
.sheet .about { color: var(--muted); font-size: 15px; margin: 4px 0 14px; }
.sheet textarea { width: 100%; min-height: 140px; border: 2px solid var(--line-2); border-radius: 12px; padding: 14px; font-size: 18px; resize: vertical; }
.sheet textarea:focus { outline: none; border-color: var(--gold); }
.sheet .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.thread { display: grid; gap: 10px; margin-bottom: 16px; }
.msg { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fcfaf4; }
.msg.mine { background: #fff; border-color: var(--gold); }
.msg .by { font-size: 14px; font-weight: 800; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.msg .by span { color: var(--muted); font-weight: 600; }
.msg .body { white-space: pre-wrap; margin-top: 4px; }
.notes-list { display: grid; gap: 14px; }

/* narrator: spotlight + caption bar */
.spot {
  position: relative; z-index: 60;
  box-shadow: 0 0 0 4px var(--gold), 0 0 0 9999px rgba(20, 22, 27, .32), 0 16px 40px rgba(0,0,0,.18) !important;
  border-radius: var(--r); transform: scale(1.012); background-color: var(--card);
}
.slide .spot { box-shadow: 0 0 0 4px rgba(201,162,58,.0) !important; transform: none; background: transparent; }
.narr {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 70;
  width: min(760px, calc(100% - 24px)); background: #14161b; color: #fff; border-radius: 18px; padding: 14px 14px 14px 18px;
  display: flex; gap: 14px; align-items: center; box-shadow: 0 18px 50px rgba(0,0,0,.3); transition: transform .35s ease;
}
.narr.on { transform: translate(-50%, 0); }
.narr .txt { flex: 1; font-size: 17px; line-height: 1.5; max-height: 5.4em; overflow: hidden; }
.narr .who { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #e8c867; display: flex; align-items: center; gap: 8px; }
.narr .eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.narr .eq i { width: 3px; background: #e8c867; border-radius: 2px; animation: eq .9s ease-in-out infinite; }
.narr .eq i:nth-child(2) { animation-delay: .2s; } .narr .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.narr.paused .eq i { animation: none; height: 4px; }
.narr button { width: 46px; height: 46px; flex: none; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.narr button svg { width: 22px; height: 22px; }
.narr .prog { position: absolute; left: 18px; right: 18px; bottom: 6px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.narr .prog i { display: block; height: 100%; width: 0; background: #e8c867; transition: width .25s linear; }

/* install prompt */
.install { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 85; width: min(560px, calc(100% - 24px));
  background: var(--card); border: 2px solid var(--gold); border-radius: 20px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.22); animation: up .4s ease; }
.install .top { display: flex; gap: 14px; align-items: center; }
.install .top img { width: 60px; height: 60px; border-radius: 14px; border: 1px solid var(--line); }
.install h3 { font-size: 20px; }
.install p { font-size: 16px; color: var(--ink-2); margin: 4px 0 0; }
.install .row { display: flex; gap: 10px; margin-top: 14px; }
.install .row .btn { flex: 1; }
.ios-steps { margin: 12px 0 0; padding-left: 22px; font-size: 16px; }
.ios-steps li { margin: 6px 0; }
.ios-steps svg { width: 20px; height: 20px; vertical-align: -4px; color: var(--blue); }

/* library */
.lib-item { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.lib-item .ic { width: 50px; height: 50px; flex: none; border-radius: 12px; background: var(--gold-wash); color: var(--gold-ink); display: grid; place-items: center; }
.lib-item .ic svg { width: 26px; height: 26px; }
.lib-item h3 { font-size: 18px; margin: 0 0 2px; }
.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.fig { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: zoom-in; padding: 0; text-align: left; }
.fig img { display: block; width: 100%; height: 180px; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.fig span { display: block; padding: 10px 12px; font-size: 15px; font-weight: 600; }
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(20,22,27,.85); overflow: auto; padding: 20px; display: flex; justify-content: center; align-items: flex-start; }
.lightbox img { max-width: 1100px; width: 100%; border-radius: 12px; background: #fff; }
.lightbox .x { position: fixed; top: 14px; right: 14px; }
video { width: 100%; border-radius: 14px; background: #000; }

.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 40px 0 10px; }
.foot img { width: 110px; opacity: .9; }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 99; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); }
.admin { border: 2px dashed var(--gold); }

@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 17.5px; }
  .g2, .g4.stack { grid-template-columns: minmax(0, 1fr); }
  #replay span { display: none; }
  .topbar .name { font-size: 15px; }
  .vs { grid-template-columns: minmax(0, 1fr); }
  .vs .mid { display: none; }
  .cities, .team { grid-template-columns: minmax(0, 1fr); }
  .link-emblem { display: none; }
  .person ul { display: none; }
  .person .short { display: block; }
  .person { padding: 14px 16px; }
  .intro-chart { height: 56svh; }
  .slide .lede { font-size: 17px; }
  .slide { justify-content: flex-start; padding-top: 78px; overflow-y: auto; }
  .chart-card .ch { height: 300px; }
  .card { padding: 16px; }
  .phase { grid-template-columns: 1fr; gap: 6px; }
  .phase .when { display: flex; gap: 10px; align-items: center; text-align: left; }
  .phase .when b { margin: 0; width: 42px; height: 42px; font-size: 17px; border-radius: 12px; }
  .phase .when span { margin: 0; }
  .flow li b { min-width: 96px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- desktop command center (>= 1100px) ---------- */
.rail, .status-strip { display: none; }
@media (min-width: 1100px) {
  .topbar-in { max-width: 1520px; }
  .status-strip { display: flex; gap: 6px; align-items: center; margin-left: 18px; }
  .status-strip span { font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
  .status-strip span b { color: var(--gold-ink); }
  .status-strip .live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--gold); margin-right: 8px; box-shadow: 0 0 0 3px rgba(201,162,58,.25); vertical-align: 1px; }
  #menu { display: none; }
  .shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; max-width: 1520px; margin: 0 auto; padding: 0 24px; }
  .shell main.dash { max-width: none; padding: 8px 0 140px; margin: 0; }
  .rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto; padding: 22px 2px 22px 0; scrollbar-width: thin; }
  .rail .mission { background: var(--ink); color: #fff; border-radius: 18px; padding: 18px; }
  .rail .mission .k { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #e8c867; }
  .rail .mission h3 { font-size: 19px; margin: 6px 0 10px; }
  .rail .mission .row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.12); }
  .rail .mission .row b { color: #e8c867; }
  .rail .mission .btn { width: 100%; margin-top: 12px; min-height: 46px; font-size: 16px; }
  .rail nav { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px; }
  .rail nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
  .rail nav a .n { width: 26px; height: 26px; flex: none; border-radius: 8px; background: #f3efe4; color: var(--muted); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
  .rail nav a:hover { background: var(--gold-wash); }
  .rail nav a.on { background: var(--gold-wash); color: var(--ink); }
  .rail nav a.on .n { background: var(--gold); color: #1b1503; }
  .rail nav a.seen .n::after { content: ''; }
  .rail .mini { display: grid; gap: 8px; }
  .rail .mini .btn { width: 100%; }
  .rail .who { font-size: 13px; color: var(--muted); padding: 0 6px; }
  .hello h1 { font-size: 44px; }
  section.sec { margin-top: 44px; }
  .chart-card .ch { height: 380px; }
  .chart-card .ch.tall { height: 460px; }
}
@media (min-width: 1400px) {
  .bigideas.g3, .gateways.g3, .niches.g3 { gap: 20px; }
}

/* live lead pages */
.live-card { display: block; padding: 0; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .2s ease; }
.live-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(20,22,27,.14); }
.live-card .shot { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: #f3efe4; }
.live-card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.live-card .open { position: absolute; right: 12px; bottom: 12px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; padding: 9px 14px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.live-card .live-meta { padding: 16px 18px 18px; }
.live-card .url { font-size: 14px; font-weight: 700; color: var(--gold-ink); word-break: break-all; }

.notebook { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; text-decoration: none; color: var(--ink); border: 2px solid var(--gold); }
.notebook .nb-shot { background: #111; min-height: 220px; }
.notebook .nb-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.notebook .nb-meta { padding: 20px; }
.notebook:hover { box-shadow: 0 18px 44px rgba(20,22,27,.14); }
@media (max-width: 900px) { .notebook { grid-template-columns: minmax(0, 1fr); } .notebook .nb-shot { min-height: 0; aspect-ratio: 16 / 8; } }

/* v1.1: preview banner, slide choreography, simulator chart, live stats, admin note controls */
.preview-bar { position: sticky; top: 62px; z-index: 39; background: var(--ink); color: #fff; text-align: center; font-size: 15px; font-weight: 600; padding: 9px 16px; }
.preview-bar a { color: #e8c867; margin-left: 8px; }
.slide.on .stage > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.slide.on .stage > *:nth-child(2) { animation-delay: .12s; }
.slide.on .stage > *:nth-child(3) { animation-delay: .26s; }
.slide.on .stage > *:nth-child(4) { animation-delay: .4s; }
.slide.on .stage > *:nth-child(5) { animation-delay: .52s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.sim-ch { height: 190px !important; }
.sim-visual .cap b { color: var(--ink); }
.site-stats .stat-tiles .kpi { background: #fcfaf4; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.site-stats .stat-tiles .kpi .v { font-size: 32px; }
.site-stats .tw { margin-top: 14px; }
.site-stats a { font-weight: 700; }
.linkbtn.del { font-size: 13px; padding: 0 0 0 10px; color: var(--bad); text-decoration: none; }
#activity .kpi .v { font-size: 26px; }
@media (max-width: 680px) {
  .preview-bar { top: 58px; font-size: 13.5px; }
  .site-stats .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hello { scroll-margin-top: 120px; }

@media (max-width: 680px) {
  .stats-tbl .hm { display: none; }
  .stats-tbl td, .stats-tbl th { padding: 9px 8px; }
  .preview-bar .pb-long { display: none; }
}

/* v1.2: featured portal-demo card + partner offer section */
.live-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border: 2px solid var(--gold); }
.live-feature .shot { border-bottom: 0; border-right: 1px solid var(--line); aspect-ratio: auto; min-height: 240px; }
.live-feature .live-meta { align-self: center; padding: 22px; }
.offer-law { border-left: 5px solid var(--bad); }
.offer-demo .demo-row { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: center; }
.offer-demo img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 760px) {
  .live-feature, .offer-demo .demo-row { grid-template-columns: minmax(0, 1fr); }
  .live-feature .shot { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; aspect-ratio: 16 / 9; }
}
