/* LSP Command Centre - demo styles
   Pen-and-wash on white paper. The painting lives in #world behind every page;
   the UI floats on paper cards and stays plain: one job per page, few numbers.
   Brand: teal #149B9B, navy #2C5885, gold #F5A623, mint #D4F0EC, charcoal #4A5464.
   Young Serif headlines, Montserrat body. No red or pink, no gradients. */

:root {
  --paper: #ffffff;
  --paper-2: #f7fbfa;
  --mint: #d4f0ec;
  --mint-2: #eaf7f5;
  --teal: #149b9b;
  --teal-ink: #0f7c7c;
  --navy: #2c5885;
  --ink: #1f3550;
  --gold: #f5a623;
  --gold-ink: #8f5a00;
  --gold-wash: #fef4e2;
  --text: #33404f;
  --text-2: #4a5464;
  --muted: #7a8594;
  --faint: #a9b2bd;
  --hair: rgba(31, 53, 80, .09);
  --hair-2: rgba(31, 53, 80, .16);
  --card: rgba(255, 255, 255, .94);
  --sh: 0 1px 2px rgba(31, 53, 80, .04), 0 6px 20px rgba(31, 53, 80, .06);
  --sh-pop: 0 20px 50px rgba(31, 53, 80, .18), 0 4px 14px rgba(31, 53, 80, .08);
  --ease: cubic-bezier(.25, .1, .25, 1);
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal-ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hint { font-size: 12px; color: var(--muted); }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--faint); font-size: 12.5px; text-align: center; padding: 14px 0; margin: 0; list-style: none; }

/* ---------- The painted world ---------- */
.world { position: fixed; inset: 0; z-index: 0; pointer-events: none; will-change: transform; }
.world svg { display: block; }
.world-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #f7f6f1; }
.world-sprites { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.world-overlay { position: absolute; inset: 0; pointer-events: none; }
.world-overlay .hero-fig { pointer-events: auto; cursor: pointer; }
.world.no-gl { background: #fff; }
.world .country { font-family: var(--sans); font-size: 8px; font-weight: 700; letter-spacing: 2.6px; fill: #8a95a2; }
.world .site { cursor: pointer; }
.world .site:hover .mk, .world .site:focus .mk { stroke: var(--ink); stroke-width: 1.2; }
.world .hero-fig { cursor: pointer; }
.world .hero-fig:hover .hero-name, .world .hero-fig:focus .hero-name { fill: var(--teal-ink); }
.world .hero-name { font-family: var(--serif); font-size: 17px; fill: var(--ink); }
.world .hero-sub { font-family: var(--sans); font-size: 11px; font-weight: 600; fill: #6f7a88; }
.world .sun-n { font-family: var(--serif); font-size: 19px; fill: var(--gold-ink); }
.world .sun-l { font-family: var(--sans); font-size: 8.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; fill: #9a7a45; }
.veil { position: fixed; inset: 0; z-index: 0; background: #fdfdfb url(../img/art/paper.jpg) center / 627px; opacity: .9; pointer-events: none; transition: opacity .35s var(--ease); }
body.on-home .veil { opacity: 0 !important; }
body.on-home .world { pointer-events: auto; }
body.on-home .view { pointer-events: none; }
body.on-home .view .card, body.on-home .legend-strip { pointer-events: auto; }

/* ---------- Demo bar + top bar ---------- */
.demo-bar {
  position: relative; z-index: 31; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between;
  padding: 5px 20px; font-size: 11.5px; color: var(--gold-ink); background: var(--gold-wash); border-bottom: 1px solid #f3e0bb;
}
.demo-bar strong { text-transform: uppercase; letter-spacing: .08em; }
.demo-viewer { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.demo-pick { display: inline-flex; gap: 2px; background: #fff; border: 1px solid #f0d9ab; border-radius: 999px; padding: 2px; }
.demo-pick button { border: 0; background: none; border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 600; color: var(--gold-ink); }
.demo-pick button.on { background: var(--gold); color: #3a2800; }

.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px;
  padding: 10px 24px; background: rgba(255, 255, 255, .88); border-bottom: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; }
.brand-name { font-family: var(--serif); font-size: 19px; color: var(--navy); white-space: nowrap; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { position: relative; padding: 7px 14px 9px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.nav a:hover { color: var(--navy); background: rgba(44, 88, 133, .06); }
.nav a.on { color: var(--ink); }
.nav a.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 6px; background: var(--teal); opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7.6C30 4.3 80 3.1 130 3.7c30 .4 55 1.2 68 2.5-12 1.5-38 2.5-70 2.8-44 .5-88 .7-125-1.4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7.6C30 4.3 80 3.1 130 3.7c30 .4 55 1.2 68 2.5-12 1.5-38 2.5-70 2.8-44 .5-88 .7-125-1.4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; font-size: 10.5px; line-height: 17px; text-align: center; border-radius: 999px; background: var(--gold); color: #3a2800; font-weight: 700; vertical-align: 1px; }
.me .avatar { width: 32px; height: 32px; font-size: 13px; }
.me-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.me-btn:hover .avatar { box-shadow: 0 0 0 3px var(--mint); }
.today-foot { display: flex; gap: 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); font-size: 12px; color: var(--text-2); }
.today-foot span { display: inline-flex; align-items: center; gap: 6px; }
.team-row { padding: 4px 0; }
.row-btn.team-row > span.team-pic { flex: 0 0 52px; width: 52px; height: 64px; display: grid; place-items: center; overflow: hidden; }
.team-pic img { width: 52px; height: 64px; object-fit: contain; display: block; }
.team-row > span:nth-child(2) { flex: 1; min-width: 0; }

/* ---------- Page scaffolding ---------- */
.view { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 26px 24px 70px; outline: none; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-title { position: relative; display: inline-block; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; color: var(--ink); }
.page-title .ul { position: absolute; left: -4px; right: -12px; bottom: -8px; height: 12px; color: var(--teal); opacity: .45; z-index: -1; }
.page-sub { margin: 12px 0 0; color: var(--text-2); max-width: 680px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.card, .panel { background: var(--card); border: 1px solid var(--hair); border-radius: 18px; box-shadow: var(--sh); padding: 18px 20px; }
.panel-pad { padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--ink); flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .card + .card { margin-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split.even > .card + .card { margin-top: 0; }

/* ---------- Small parts ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--paper-2); color: var(--text-2); border: 1px solid var(--hair); white-space: nowrap; }
.chip.teal { background: var(--mint-2); color: var(--teal-ink); border-color: #c5e8e3; }
.chip.sample { background: transparent; border: 1px dashed var(--hair-2); color: var(--muted); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; padding: 0 6px; vertical-align: 1px; }
.dab { width: 14px; height: 14px; flex: none; display: block; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; color: #fff; background: var(--navy); }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.phuong { background: var(--teal); }
.avatar.piseth { background: var(--navy); }
.avatar.krystian { background: #c47a00; }
.avatar.peter { background: #5d6b7c; }
.avatar.none { background: transparent; border: 1.5px dashed var(--faint); color: var(--muted); }
.avatars { display: inline-flex; }
.avatars .avatar { border: 2px solid #fff; margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; border-radius: 11px; border: 1px solid var(--hair-2); background: #fff; font-weight: 600; font-size: 13px; color: var(--navy); white-space: nowrap; text-decoration: none; }
.btn:hover { box-shadow: var(--sh); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3a2800; }
.btn.small { padding: 5px 11px; font-size: 12px; border-radius: 9px; }
.btn.link { border: 0; background: none; padding: 4px 6px; color: var(--teal-ink); box-shadow: none; }
.btn.link:hover { text-decoration: underline; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.seg { display: inline-flex; background: rgba(255, 255, 255, .9); border: 1px solid var(--hair); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.seg button.on { background: var(--navy); color: #fff; }
.search { padding: 8px 14px; border: 1px solid var(--hair-2); border-radius: 999px; min-width: 200px; background: #fff; }

.bar { height: 7px; border-radius: 999px; background: var(--mint-2); overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--teal); }
.bar.gold > i { background: var(--gold); }
.mini-bar { display: block; height: 4px; width: 90px; margin-top: 6px; border-radius: 999px; background: var(--mint-2); position: relative; overflow: hidden; }
.mini-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--teal); border-radius: 999px; }
.note-gold { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--gold-wash); border: 1px solid #f3dcae; color: var(--gold-ink); font-size: 12.5px; }
.api { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--paper-2); border: 1px solid var(--hair); border-radius: 7px; padding: 1px 6px; color: var(--ink); }

.field { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); }
.field input, .field select, .field textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--hair-2); border-radius: 10px; background: #fff; font-weight: 500; }
.field textarea { min-height: 76px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .field label { display: block; margin-bottom: 5px; }

.check { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--hair-2); background: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.check:checked { background: var(--teal); border-color: var(--teal); }
.check:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check:disabled { cursor: default; opacity: .7; }
.check.sm { width: 16px; height: 16px; border-radius: 5px; }
.check.sm:checked::after { width: 4px; height: 8px; }

/* Simple list rows, used everywhere */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 13.5px; }
.rows > li:first-child { border-top: 0; }
.rows small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.clamp { display: -webkit-box !important; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.row-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer; border-radius: 8px; }
.row-btn > span:first-child { flex: 1; min-width: 0; }
.row-btn:hover .chev { color: var(--teal); transform: translateX(2px); }
.row-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.chev { color: var(--faint); font-size: 18px; transition: transform .15s var(--ease); }

/* ---------- Home ---------- */
.home { display: block; min-height: calc(100vh - 180px); }
.home-side { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.home-side .today { width: 340px; }
.home-side .quarter-mini { width: 320px; }
.home-side .card + .card { margin-top: 0; }
.home-side .card { background: rgba(255, 255, 255, .92); }
.hello { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--ink); line-height: 1.15; }
.today .rows > li { padding: 12px 0; }
.goal-line { padding: 8px 0; font-size: 13px; }
.goal-line .bar { margin-top: 6px; height: 6px; }
.legend-strip {
  position: fixed; z-index: 2; bottom: 14px; left: calc(50% + 182px); transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 6px 14px;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--hair); border-radius: 999px; font-size: 11.5px; color: var(--text-2);
}
body:not(.on-home) .legend-strip { display: none; }
.legend-strip span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Sites board ---------- */
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
.col-head { display: flex; align-items: center; gap: 8px; }
.col-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 19px; color: var(--ink); }
.col-head .cnt { font-size: 12px; font-weight: 700; color: var(--muted); }
.col-desc { margin: 2px 0 12px 22px; font-size: 12px; color: var(--muted); }
.cols.three .col-head { margin-bottom: 12px; }
.scard {
  display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; margin-bottom: 10px;
  padding: 12px 14px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; box-shadow: var(--sh);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
button.scard:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(31, 53, 80, .05), 0 12px 26px rgba(31, 53, 80, .1); }
.scard.lit { background: rgba(254, 244, 226, .95); border-color: #f4e2c0; }
.s-top { display: flex; align-items: flex-start; gap: 8px; }
.s-name { flex: 1; font-weight: 650; font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.s-line { font-size: 12px; color: var(--muted); }
.flag { align-self: flex-start; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--paper-2); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.flag.gold { color: var(--gold-ink); background: var(--gold-wash); }
.gold-t { color: var(--gold-ink); }
.foot-links { margin: 8px 0 0; color: var(--faint); }

/* ---------- Site drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(31, 53, 80, .16); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); z-index: 50; background: #fff; box-shadow: var(--sh-pop); transform: translateX(104%); transition: transform .22s var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.drawer.open { transform: none; }
.dr-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--hair); position: relative; }
.dr-head h2 { margin: 4px 0 12px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--ink); padding-right: 36px; }
.dr-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hair); background: #fff; font-size: 18px; color: var(--text-2); }
.groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.groups span { font-size: 11px; font-weight: 700; color: var(--faint); padding-top: 7px; border-top: 4px solid var(--hair); }
.groups span.done { color: var(--teal-ink); border-top-color: rgba(20, 155, 155, .45); }
.groups span.now { color: var(--ink); border-top-color: var(--teal); }
.dr-body { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 22px; }
.next { padding: 16px 18px; border-radius: 16px; background: var(--mint-2); border: 1px solid #cdebe6; display: flex; flex-direction: column; gap: 10px; }
.next-say { font-family: var(--serif); font-size: 21px; color: var(--ink); line-height: 1.2; }
.sec { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.miss-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--gold); flex: none; }
.more summary { cursor: pointer; font-weight: 600; color: var(--teal-ink); font-size: 13px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 14px 0 0; }
.facts dt { font-size: 11px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 1px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.timeline { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; }
.timeline li { padding: 3px 0; }
.timeline .d { display: inline-block; min-width: 96px; color: var(--muted); font-size: 12px; font-weight: 600; }

/* ---------- Tasks ---------- */
.goal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 20px; }
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px 4px; border-top: 1px solid var(--hair); }
.task:first-child { border-top: 0; }
.task .check { margin-top: 1px; }
.task details > summary { list-style: none; cursor: pointer; }
.task details > summary::-webkit-details-marker { display: none; }
.task details.flat > summary { cursor: default; }
.t-title { display: block; font-weight: 600; color: var(--ink); font-size: 14px; }
.task.done .t-title { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); }
.t-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.task.team .t-meta::before { content: "● "; color: var(--gold); }
.t-side { display: flex; align-items: center; gap: 10px; }
.t-prog { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 34px; text-align: right; font-feature-settings: "tnum"; }
.subs { list-style: none; margin: 10px 0 4px; padding: 0; }
.subs li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.subs li.done span { text-decoration: line-through; color: var(--muted); }
.stuck .blk { align-items: flex-start; }
.stuck .blk small { margin-top: 2px; }

/* ---------- Stories ---------- */
.story-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.story-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-2); min-width: 180px; }
.story-form label.grow { flex: 2; min-width: 260px; }
.story-form input, .story-form select { padding: 9px 11px; border: 1px solid var(--hair-2); border-radius: 10px; background: #fff; font-weight: 500; }
.scard.story .chip.sample { align-self: flex-start; margin-top: 4px; }

/* ---------- Numbers ---------- */
.bigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.bigs.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.big { background: var(--card); border: 1px solid var(--hair); border-radius: 18px; box-shadow: var(--sh); padding: 16px 18px; text-align: left; }
.big .n { font-family: var(--serif); font-size: 36px; line-height: 1; color: var(--ink); font-feature-settings: "tnum"; }
.big.teal .n { color: var(--teal-ink); }
.big .l { margin-top: 6px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.big .s { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.btn-big { cursor: pointer; font: inherit; }
.btn-big:hover .s { color: var(--teal-ink); }
.st-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.st-dot.offline { border: 2.5px solid var(--navy); }
.st-dot.none { border: 2px dashed var(--faint); }
.run-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 20px; }
.run { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--hair); cursor: pointer; font-size: 13px; }
.run:hover b { color: var(--teal-ink); }
.run b { font-weight: 600; color: var(--ink); }
.run small { display: block; color: var(--muted); font-size: 11.5px; }
.run .kwh { font-family: var(--serif); font-size: 18px; color: var(--ink); font-feature-settings: "tnum"; }
.spark { width: 72px; height: 24px; flex: none; }

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: rgba(31, 53, 80, .08); }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .lbl { fill: var(--text-2); font-size: 11.5px; font-weight: 600; font-family: var(--sans); }
.chart .hit { fill: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); margin: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.sq { width: 10px; height: 10px; border-radius: 3px; }
details.table-view { margin-top: 6px; font-size: 12px; }
details.table-view summary { cursor: pointer; color: var(--teal-ink); font-weight: 600; }
table.data { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
table.data th, table.data td { padding: 7px 8px; border-bottom: 1px solid var(--hair); text-align: left; }
table.data th { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
table.data .num { text-align: right; font-feature-settings: "tnum"; }

/* ---------- Assessment ---------- */
.matrix-sec { padding: 0; margin-bottom: 16px; }
.matrix-sec + .matrix-sec { margin-top: 0; }
.matrix-sec .sh { display: flex; align-items: baseline; gap: 10px; padding: 16px 20px 8px; }
.matrix-sec .sh h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--ink); }
.matrix-sec .sh .sub { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-2); }
.crit { display: grid; grid-template-columns: minmax(0, 1fr) auto 50px; gap: 8px 14px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--hair); }
.crit .q { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.crit .q small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.crit .w { font-size: 11px; color: var(--faint); font-weight: 600; margin-left: 5px; }
.crit .pts { text-align: right; font-weight: 700; font-size: 13px; color: var(--navy); font-feature-settings: "tnum"; }
.crit .pts.neg { color: var(--gold-ink); }
.crit .assumed { color: var(--gold-ink) !important; }
.opts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.opts button { border: 1px solid var(--hair-2); background: #fff; border-radius: 9px; padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.opts button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.score-card { position: sticky; top: 76px; }
.score-big { font-family: var(--serif); font-size: 58px; line-height: 1; color: var(--ink); font-feature-settings: "tnum"; }
.verdict { display: inline-flex; gap: 6px; margin-top: 6px; font-weight: 700; font-size: 13px; }
.verdict.ok { color: var(--teal-ink); } .verdict.mid { color: var(--gold-ink); } .verdict.no { color: var(--navy); }
.scale { position: relative; height: 34px; margin: 16px 0 6px; }
.scale .track { position: absolute; left: 0; right: 0; top: 10px; height: 10px; border-radius: 999px; overflow: hidden; display: flex; }
.scale .track i { height: 100%; }
.scale .mk { position: absolute; top: 2px; width: 3px; height: 26px; border-radius: 2px; background: var(--ink); transform: translateX(-1px); transition: left .25s var(--ease); }
.scale .ticks { position: absolute; left: 0; right: 0; top: 24px; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.scale .ticks span { position: absolute; transform: translateX(-50%); }
.secbars { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.secbar { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; font-size: 12px; }
.secbar .bar { grid-column: 1 / -1; height: 6px; }
.secbar b { color: var(--ink); font-feature-settings: "tnum"; }
.ai-sum, .msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--hair); font-size: 13px; line-height: 1.55; }
.ai-sum p { margin: 0 0 8px; }
.ai-sum p:last-child { margin: 0; }

/* ---------- Hero panel ---------- */
.hero-modal { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.hero-art svg { width: 150px; height: 170px; display: block; }
.hero-art img { width: 150px; height: 190px; object-fit: contain; display: block; }
.hero-title { font-family: var(--serif); font-size: 24px; color: var(--gold-ink); margin-top: 2px; }
.hero-title span { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 600; }
.enso { width: 58px; height: 58px; position: relative; }
.enso svg { width: 100%; height: 100%; display: block; }
.enso .lv { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 18px; color: var(--ink); }

/* ---------- Modal, tooltip, toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(31, 53, 80, .22); display: grid; place-items: center; padding: 16px; }
.modal { width: min(540px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: var(--sh-pop); }
.modal .mh { padding: 20px 24px 0; }
.modal .mh h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 23px; color: var(--ink); }
.modal .mb { padding: 16px 24px; display: grid; gap: 12px; }
.modal .mf { padding: 0 24px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.tip { position: fixed; z-index: 70; pointer-events: none; max-width: 260px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 9px; box-shadow: var(--sh-pop); }
.tip .tm { color: #c9d6e4; font-size: 11px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--sh-pop); animation: toast-in .25s var(--ease); }
.toast .xp { color: var(--gold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Smaller screens ---------- */
@media (max-width: 1180px) {
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home { grid-template-columns: 320px minmax(0, 1fr); }
  .legend-strip { left: calc(50% + 172px); }
}
@media (max-width: 980px) {
  .split, .split.even { grid-template-columns: 1fr; }
  .bigs.four { grid-template-columns: repeat(2, 1fr); }
  .goal-grid { grid-template-columns: 1fr; }
  .crit { grid-template-columns: 1fr 50px; }
  .crit .opts { grid-column: 1 / -1; justify-content: flex-start; }
  .topbar { gap: 14px; }
  .brand-name { display: none; }
}
@media (max-width: 760px) {
  .home { grid-template-columns: 1fr; }
  .stage-center, .legend-strip { display: none; }
  body.on-home .veil { opacity: .9 !important; }
  .cols, .cols.three, .bigs { grid-template-columns: 1fr; }
  .view { padding: 20px 16px 48px; }
  .topbar { padding: 8px 16px; }
  .nav a { padding: 7px 9px 9px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
