.page { max-width: 680px; margin: 0 auto; padding: 0 20px 64px; padding-top: env(safe-area-inset-top); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.3px; }
.switcher { margin: 4px 0 20px; }

/* hero */
.hero { padding: 20px 0 28px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(28px, 7vw, 38px); font-weight: 800; }
.hero .title { color: var(--muted); font-size: 18px; margin-top: 6px; }
.value { margin-top: 26px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.value .amount { font-family: var(--num); font-size: clamp(34px, 9vw, 46px); font-weight: 600; letter-spacing: -1px; direction: ltr; }
.value .cur { color: var(--muted); font-size: 18px; }
.value .cap { width: 100%; color: var(--muted); font-size: 14px; margin-top: -4px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin: 24px 0 0; }
.facts div { min-width: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.facts dd a { font-size: 14px; font-weight: 500; margin-inline-start: 6px; }

section.block { padding-top: 32px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.block-head h2 { font-size: 21px; }
.block-head .sum { color: var(--muted); font-size: 14px; text-align: left; }

/* contract stages as a live wire: the wire between two completed stages carries current */
.circuit { list-style: none; margin: 0; padding: 0; }
.circuit li { position: relative; display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; padding-bottom: 24px; }
.circuit li:last-child { padding-bottom: 0; }
.circuit .node { position: relative; z-index: 1; width: 16px; height: 16px; margin: 5px 6px 0; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); }
/* wire from this node's centre down to the next node's centre */
.circuit li:not(:last-child)::after {
  content: ''; position: absolute; inset-inline-start: 13px; width: 2px; top: 13px; bottom: -13px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 4px, transparent 4px 8px);
}
.circuit .body { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: baseline; min-width: 0; }
.circuit .name { font-weight: 500; color: var(--muted); }
.circuit .meta { color: var(--faint); white-space: nowrap; font-size: 15px; }
.circuit .meta .num { font-weight: 500; }
.circuit .pct { display: inline-block; min-width: 3.2em; margin-inline-start: 12px; font-size: 13px; text-align: left; }
.circuit .when { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

.circuit li.on .node { border-color: var(--cobalt-bright); background: var(--cobalt-bright); box-shadow: 0 0 0 4px rgba(90,134,207,.18), 0 0 18px var(--glow);
  animation: light .5s ease-out both; animation-delay: calc(var(--i, 0) * 160ms); }
.circuit li.on .name, .circuit li.on .meta .num { color: var(--ink); }
.circuit li.on .meta { color: var(--muted); }
.circuit li.flow::after { background: var(--cobalt-bright); box-shadow: 0 0 10px var(--glow);
  transform-origin: top; animation: energise .4s ease-out both; animation-delay: calc(var(--i, 0) * 160ms + 120ms); }
@keyframes energise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes light { from { background: var(--bg); box-shadow: none; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* execution stages */
.meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.meter i { display: block; height: 100%; width: var(--w, 0); background: var(--ok); border-radius: 3px; }
.works { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.works li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.works li.done .wname { color: var(--muted); }

.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.foot { margin-top: 48px; color: var(--faint); font-size: 13px; text-align: center; }

.hero .ref { color: var(--faint); font-size: 14px; margin-top: 2px; text-align: right; }

@media (max-width: 420px) {
  .circuit .body { grid-template-columns: 1fr; }
}

/* phase 3-5 */
.top-actions { display: flex; gap: 6px; }
.bell .dot, .jump .dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-family: var(--num); }
.preview-note { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); border-radius: var(--r-sm); padding: 8px 12px; font-size: 14px; }
.jump { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; background: var(--bg); padding: 10px 0; margin-top: 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.jump a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; white-space: nowrap; font-weight: 500; font-size: 15px; }
.jump a:hover { color: var(--ink); background: var(--surface-2); }
.attn-banner { display: block; margin-top: 16px; padding: 12px 16px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); color: var(--ink); text-decoration: none; font-weight: 700; }
section.block { scroll-margin-top: 64px; }
.appts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.appts a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; }
.appts a:hover { border-color: var(--cobalt-bright); }
.appts span { font-size: 14px; }
.figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.figs span { display: block; font-size: 13px; color: var(--muted); }
.figs b { font-size: 20px; font-weight: 600; }
.figs .ok { color: var(--ok); }
.sub-h { font-size: 16px; margin: 18px 0 6px; }
.small { font-size: 13px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.panel > h2 { font-size: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.span2 { grid-column: span 2; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.empty { padding: 20px 0; }
dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; width: min(92vw, 440px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font-size: 19px; margin-bottom: 12px; }
.nlist { list-style: none; margin: 0 0 16px; padding: 0; max-height: 60vh; overflow-y: auto; }
.nlist li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.nlist li.unread a { font-weight: 700; color: var(--ink); }
.nlist time { display: block; font-size: 12px; color: var(--faint); }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } .figs b { font-size: 17px; } }

.topbar { height: auto; min-height: 74px; gap: 12px; padding-block: 14px; flex-wrap: wrap; }
.top-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media(max-width: 480px) { .topbar .masar-brand img { width: 112px; } .top-actions { width: 100%; } }
