/* Galactik OS v1. Brand: Satoshi; Deep Space #0B1030, Midnight #141B41, Cosmic #306BAC, Nebula #918EF4, Ion #98B9F2,
   Off white #EAF2F9, Star dust #DEEDFF, Atmos #B9CEED. Light and dark; mobile-first (390) and desktop (1280). */
@font-face { font-family: 'Satoshi'; src: url('/assets/Satoshi-Variable.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
:root {
  --bg: #EAF2F9; --surface: #FFFFFF; --sunk: #DEEDFF; --ink: #0B1030; --ink-2: #33406B; --muted: #55618A; --line: #C9D8EE; --line-2: #B9CEED;
  --accent: #306BAC; --accent-ink: #FFFFFF; --accent-2: #5B57D6; --focus: #5B57D6;
  --good: #1D7A4D; --good-bg: #E3F4EA; --bad: #B3261E; --bad-bg: #FCE8E6; --warn: #8A5A00; --warn-bg: #FFF2D6; --info-bg: #E4E9FF;
  --shadow: 0 1px 0 rgba(11,16,48,.06), 0 8px 24px -12px rgba(11,16,48,.18);
  --r: 10px; --r-sm: 7px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B1030; --surface: #141B41; --sunk: #0F1538; --ink: #EAF2F9; --ink-2: #C9D8EE; --muted: #A3B6D9; --line: #273063; --line-2: #34407A;
  --accent: #98B9F2; --accent-ink: #0B1030; --accent-2: #B4B2F8; --focus: #B4B2F8;
  --good: #7FD7A6; --good-bg: #123A2B; --bad: #FF9C93; --bad-bg: #3D1A22; --warn: #F5C66B; --warn-bg: #3A2E12; --info-bg: #1C2457;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0B1030; --surface: #141B41; --sunk: #0F1538; --ink: #EAF2F9; --ink-2: #C9D8EE; --muted: #A3B6D9; --line: #273063; --line-2: #34407A;
  --accent: #98B9F2; --accent-ink: #0B1030; --accent-2: #B4B2F8; --focus: #B4B2F8;
  --good: #7FD7A6; --good-bg: #123A2B; --bad: #FF9C93; --bad-bg: #3D1A22; --warn: #F5C66B; --warn-bg: #3A2E12; --info-bg: #1C2457;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6); color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.5 'Satoshi', ui-sans-serif, system-ui, sans-serif; font-feature-settings: 'tnum' 0; overflow-x: hidden; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-weight: 900; font-size: 1.85rem; }
h2 { font-weight: 800; font-size: 1.15rem; }
h3 { font-weight: 700; font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
code, .num { font-variant-numeric: tabular-nums; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .85em; }
pre { white-space: pre-wrap; font: 500 .92rem/1.5 'Satoshi', sans-serif; background: var(--sunk); border-radius: var(--r-sm); padding: .75rem .9rem; margin: .5rem 0 0; overflow-wrap: anywhere; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: .5rem .8rem; border-radius: 6px; z-index: 99; }
.skip:focus { left: 8px; }
.star { color: var(--accent-2); flex: none; }
.star.muted { color: var(--muted); }
.fineprint { color: var(--muted); font-size: .84rem; }
.note { color: var(--ink-2); font-size: .92rem; }
.ok { color: var(--good); font-weight: 600; }
.bad { color: var(--bad); }
.why { color: var(--muted); font-size: .9rem; }
.warn { color: var(--warn); font-size: .92rem; font-weight: 600; }
.err { color: var(--bad); font-weight: 600; min-height: 1.2em; }
.on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .on-dark { display: inline; } :root:not([data-theme="light"]) .on-light { display: none; } }
:root[data-theme="dark"] .on-dark { display: inline; } :root[data-theme="dark"] .on-light { display: none; }

/* ---------- buttons and inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: 700 .95rem 'Satoshi', sans-serif; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--line-2); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 38px; padding: .35rem .8rem; font-size: .88rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.icon-only { padding: .35rem; width: 40px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: .3rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 500 1rem 'Satoshi', sans-serif; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.chk { display: flex; align-items: flex-start; gap: .55rem; font-weight: 600; margin: 0; min-height: 28px; }
.chk input { margin-top: 2px; }
.field { min-width: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; align-items: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .75rem; }
.inline-form .field { flex: 1 1 180px; }
.inline-form .field.narrow { flex: 0 1 140px; }
.inline-form .grow { flex: 1 1 260px; }
.grid-form { display: grid; gap: .8rem; grid-template-columns: 1fr; margin-top: .5rem; }
.grid-form .full, .grid-form .areas, .grid-form .row-actions, .grid-form .chain-order { grid-column: 1 / -1; }
fieldset.areas { border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: .5rem .75rem .75rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; }
fieldset.areas legend { font-weight: 700; font-size: .85rem; padding: 0 .3rem; }
fieldset[disabled] { opacity: .6; }
.stack { display: grid; gap: .8rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .1rem .45rem; border-radius: 4px; background: var(--sunk); color: var(--ink-2); margin-left: .4rem; vertical-align: middle; }
.tag.demo { background: var(--warn-bg); color: var(--warn); }
.tag.prop { background: var(--info-bg); color: var(--ink-2); }
.tag.inc { background: var(--good-bg); color: var(--good); }
.count { display: inline-flex; min-width: 1.6rem; justify-content: center; padding: 0 .4rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .78rem; font-weight: 800; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.rail { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem; padding: .55rem 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-brand { display: flex; align-items: center; }
.top-org { flex: 1; min-width: 0; }
.org-sel, .theme-sel { min-height: 38px !important; padding: .3rem .6rem !important; font-size: .9rem !important; font-weight: 700 !important; border-radius: 999px !important; }
.org-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.main { padding: 1.1rem 16px 6.5rem; max-width: 980px; outline: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .45rem; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 700; min-height: 56px; }
.tabs a.on { color: var(--ink); }
.tabs a.on .ico { color: var(--accent-2); }
.lockup { display: inline-flex; align-items: center; }
.lockup .logo { height: 18px; width: auto; }
.lockup.big .logo { height: 24px; }
.brand-sub { font-weight: 900; font-size: .78rem; letter-spacing: .14em; color: var(--accent-2); margin-left: .45rem; border-left: 1.5px solid var(--line-2); padding-left: .45rem; }
.mark { height: 22px; width: auto; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 252px 1fr; }
  .topbar, .tabs { display: none; }
  .rail { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; padding: 1.3rem 1rem; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
  .rail-brand { display: flex; align-items: center; text-decoration: none; padding: 0 .4rem; }
  .rail-org { padding: 0 .2rem; display: grid; gap: .35rem; }
  .rail-org .tag { margin: 0; justify-self: start; }
  .rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .rail li a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .95rem; }
  .rail li a:hover { background: var(--sunk); color: var(--ink); }
  .rail li a.on { background: var(--ink); color: var(--bg); }
  .rail li a.on .ico { color: var(--accent-2); }
  .rail-foot { margin-top: auto; display: grid; gap: .5rem; border-top: 1px solid var(--line); padding-top: .9rem; }
  .who { display: grid; font-size: .88rem; } .who span { color: var(--muted); }
  .main { padding: 2rem 3rem 4rem; }
  h1 { font-size: 2.2rem; }
  .grid-form { grid-template-columns: 1fr 1fr; }
}

/* ---------- page furniture ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.1rem; }
.page-head .sub, .sub { color: var(--muted); margin-top: .3rem; max-width: 60ch; }
.sec { margin-top: 2rem; }
.sec-title { display: flex; align-items: center; gap: .5rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-weight: 800; padding-bottom: .55rem; border-bottom: 2px solid var(--ink); margin-bottom: .2rem; }
.banner { border-radius: var(--r-sm); padding: .7rem .9rem; margin: .6rem 0; font-size: .92rem; display: flex; flex-wrap: wrap; gap: .25rem; border-left: 4px solid var(--line-2); background: var(--surface); }
.banner.demo, .banner.warn { border-color: var(--warn); background: var(--warn-bg); }
.banner.off { border-color: var(--muted); }
.banner.good { border-color: var(--good); background: var(--good-bg); }
.banner.bad { border-color: var(--bad); background: var(--bad-bg); }
.banner.info { border-color: var(--accent-2); background: var(--info-bg); display: grid; }
.banner.info p { display: flex; gap: .4rem; align-items: center; }
.seg { display: flex; gap: .3rem; flex-wrap: wrap; margin: .4rem 0 .8rem; }
.seg > * { min-height: 38px; padding: .35rem .85rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: transparent; color: var(--ink-2); font: 700 .88rem 'Satoshi', sans-serif; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; }
.seg > .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.state { text-align: left; padding: 1.6rem 0; color: var(--ink-2); display: grid; gap: .45rem; justify-items: start; }
.state.loading { justify-items: center; text-align: center; padding: 3rem 0; color: var(--muted); }
.state.error h2 { color: var(--bad); }
.state.empty h3 { font-size: 1rem; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: rotate(45deg) scale(.85); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.offline { position: sticky; top: 0; z-index: 50; background: var(--bad); color: #fff; padding: .5rem 16px; font-weight: 700; text-align: center; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 76px; z-index: 60; margin: 0 auto; max-width: 520px; background: var(--ink); color: var(--bg); padding: .75rem 1rem; border-radius: var(--r-sm); font-weight: 600; box-shadow: var(--shadow); transform: translateY(150%); opacity: 0; transition: transform .2s, opacity .2s; pointer-events: none; }
.toast.show { transform: none; opacity: 1; }
.toast.bad { background: var(--bad); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 24px; left: auto; right: 24px; } }
.dialog { border: 0; border-radius: var(--r); padding: 1.3rem; background: var(--surface); color: var(--ink); width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(11,16,48,.55); }
.dialog form { display: grid; gap: .6rem; }
.bar { display: block; position: relative; height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; border: 1px solid var(--line); }
.bar.big { height: 14px; margin: .5rem 0 1rem; }
.bar .fill { display: block; height: 100%; background: linear-gradient(90deg, #306BAC, #918EF4); border-radius: 99px; }
.bar .fill.hot { background: linear-gradient(90deg, #C77700, #B3261E); }
.bar .mark50 { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--ink); opacity: .3; }
.bar .mark80 { position: absolute; top: 0; bottom: 0; left: 80%; width: 2px; background: var(--ink); opacity: .5; }
.w0{width:0%}
.w5{width:5%}
.w10{width:10%}
.w15{width:15%}
.w20{width:20%}
.w25{width:25%}
.w30{width:30%}
.w35{width:35%}
.w40{width:40%}
.w45{width:45%}
.w50{width:50%}
.w55{width:55%}
.w60{width:60%}
.w65{width:65%}
.w70{width:70%}
.w75{width:75%}
.w80{width:80%}
.w85{width:85%}
.w90{width:90%}
.w95{width:95%}
.w100{width:100%}

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
.auth-art { display: none; }
.auth-card { padding: 2.2rem 16px 2rem; max-width: 460px; width: 100%; margin: 0 auto; display: grid; gap: 1.1rem; align-content: start; outline: none; }
.auth-brand { display: flex; align-items: center; margin-bottom: .6rem; }
.auth-card h1 { font-size: 2rem; }
.dev { border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); padding: .7rem .9rem; }
.dev summary { font-weight: 800; cursor: pointer; }
.dev-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .35rem; }
.dev-list a { font-weight: 700; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0; }
.facts dt { color: var(--muted); font-weight: 600; } .facts dd { margin: 0; font-weight: 700; }
.qr { background: #fff; border-radius: 8px; padding: 6px; border: 1px solid var(--line); width: 200px; height: 200px; }
.secret { word-spacing: .2em; }
@media (min-width: 900px) {
  .auth { grid-template-columns: 1.1fr 1fr; }
  .auth-art { display: block; background: #0B1030; position: relative; overflow: hidden; }
  .auth-art::before { content: ''; position: absolute; width: 140%; aspect-ratio: 1; left: -55%; top: 18%; border-radius: 50%; border: 56px solid #141B41; box-shadow: 0 0 0 2px #306BAC inset; }
  .auth-art::after { content: ''; position: absolute; width: 90%; aspect-ratio: 1; right: -30%; top: -25%; border-radius: 50%; background: radial-gradient(circle at 30% 70%, rgba(145,142,244,.55), rgba(48,107,172,.15) 55%, transparent 70%); }
  .auth-card { padding-top: 14vh; }
}

/* ---------- Today ---------- */
.hero { position: relative; padding: .4rem 0 1.2rem; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -90px; top: -120px; width: 260px; height: 260px; border-radius: 50%; border: 26px solid var(--sunk); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero .date { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.hero h1 { margin: .2rem 0 .5rem; }
.hero-line { color: var(--ink-2); }
.hero-line strong { font-size: 1.25rem; font-weight: 900; color: var(--ink); }
.progress-link { display: grid; gap: .35rem; margin-top: 1rem; padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 1fr; gap: .4rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.item-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .2rem; }
.item-head .src { color: var(--accent-2); }
.item-head .tag { margin: 0; }
.item h3 { font-size: 1.05rem; font-weight: 800; }
.item .sum { color: var(--ink-2); margin-top: .2rem; }
.item .req { margin-top: .45rem; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.item .why { margin-top: .3rem; }
.amt { font-weight: 900; font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; display: grid; justify-items: start; }
.amt small { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.items.quiet .item h3 { font-weight: 700; }
.by { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .86rem; color: var(--good); font-weight: 600; display: grid; gap: .2rem; }
.by li { display: flex; gap: .35rem; align-items: center; }
.draft { margin-top: .5rem; } .draft summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.draft .subj { font-weight: 700; margin-top: .4rem; }
@media (min-width: 700px) { .item { grid-template-columns: 1fr auto; gap: 1.5rem; } .amt { justify-items: end; text-align: right; } }
.agents { list-style: none; margin: 0; padding: 0; }
.agents li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.agent-name { font-weight: 800; display: flex; gap: .4rem; align-items: center; }
.agent-sum { grid-column: 1; color: var(--ink-2); font-size: .92rem; }
.agents .count { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.notes { list-style: none; padding: 0; margin: 0; } .notes li { display: grid; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--line); } .notes li.read { opacity: .7; }

/* ---------- team ---------- */
.people { list-style: none; margin: 0; padding: 0; }
.person { display: grid; gap: .7rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.p-id { display: grid; gap: .1rem; } .p-id span { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.p-id .mfa { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.mfa.on { color: var(--good) !important; } .mfa.off { color: var(--warn) !important; }
.p-edit { display: grid; gap: .5rem; }
@media (min-width: 900px) { .person { grid-template-columns: 260px 1fr; } .p-edit { grid-template-columns: 160px 1fr; align-items: start; } .p-edit .row-actions { grid-column: 2; margin-top: 0; } }
.rows { list-style: none; margin: .6rem 0 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.rows li > span:first-child { font-weight: 700; }
.status { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.s-pending, .s-active { color: var(--accent); } .s-accepted { color: var(--good); } .s-revoked, .s-expired, .s-ended, .s-replaced { color: var(--muted); }
.rules { list-style: none; padding: 0; margin: .4rem 0 0; }
.rules li { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: center; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.rules li > span:first-child { font-weight: 700; flex: 1 1 260px; }
.chain-order { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }

/* ---------- modules ---------- */
.mods { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.mod { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.mod h3 { font-size: 1.15rem; font-weight: 900; }
.mod p { color: var(--ink-2); }
.mod-meta { font-size: .86rem; margin-top: .3rem; } .mod-meta .state { font-weight: 800; color: var(--accent-2); }
.mod.st-coming-soon h3 { color: var(--ink-2); }
.switch { width: 54px; height: 32px; border-radius: 99px; border: 1.5px solid var(--line-2); background: var(--sunk); position: relative; cursor: pointer; padding: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--ink); border-color: var(--ink); }
.switch[aria-checked="true"] span { left: 25px; background: var(--accent-2); }

/* ---------- comms ---------- */
.threads { list-style: none; margin: .6rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.threads a { display: grid; gap: .2rem; padding: .9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.t-name { font-weight: 800; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; } .t-name small { color: var(--muted); font-weight: 600; }
.t-last { color: var(--ink-2); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .78rem; font-weight: 800; }
.opt { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.o-in { color: var(--good); } .o-out { color: var(--bad); } .o-none { color: var(--warn); }
.t-meta .open { color: var(--accent); }
.back { font-weight: 700; text-decoration: none; display: inline-block; margin-bottom: .6rem; }
.th-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: flex-start; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.win { margin: .8rem 0; font-weight: 700; font-size: .9rem; display: grid; gap: .3rem; }
.win.closed { color: var(--warn); }
.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.msg { max-width: 88%; padding: .65rem .85rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: .3rem; overflow-wrap: anywhere; }
.msg.in { justify-self: start; border-bottom-left-radius: 4px; }
.msg.out { justify-self: end; background: var(--sunk); border-bottom-right-radius: 4px; }
.msg.draft { border: 2px dashed var(--accent-2); background: var(--surface); }
.msg.refused { border-color: var(--bad); }
.m-text { white-space: pre-wrap; }
.m-meta { font-size: .76rem; color: var(--muted); }
.m-flag { font-size: .78rem; font-weight: 800; color: var(--accent-2); display: flex; gap: .35rem; align-items: center; }
.m-img { border-radius: 8px; width: 240px; height: auto; display: block; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin-top: 1rem; align-items: end; }
.wa-link { margin-top: 1.6rem; padding: 1rem; border-radius: var(--r); background: var(--ink); color: var(--bg); display: grid; gap: 1rem; }
.wa-link h2 { color: var(--bg); } .wa-link p { color: color-mix(in srgb, var(--bg) 80%, transparent); margin-top: .3rem; } .wa-link .fineprint { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.link-out { color: var(--bg); font-weight: 800; overflow-wrap: anywhere; display: inline-block; margin-top: .5rem; }
.wa-link .qr { width: 160px; height: 160px; }
@media (min-width: 700px) { .wa-link { grid-template-columns: 1fr auto; align-items: center; } }
.sim { margin-top: 1.2rem; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); padding: .6rem .9rem; } .sim summary { font-weight: 800; cursor: pointer; }
.tpl-list { margin-top: 1rem; }
.meter-hero { display: grid; gap: 1rem; padding: 1.1rem 0; border-top: 2px solid var(--ink); }
.kicker { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.big { font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; margin: .15rem 0; }
@media (min-width: 700px) { .meter-hero { grid-template-columns: 1fr 1fr; } }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .5rem .4rem; border-bottom: 2px solid var(--ink); }
.tbl td { padding: .6rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; } .tbl tr.total td { font-size: 1.15rem; font-weight: 900; border-bottom: 2px solid var(--ink); }
.tbl .tag { margin-left: .4rem; }

/* ---------- PayLock ---------- */
.project { margin-top: 1rem; }
.project > h2 { font-size: 1.4rem; font-weight: 900; }
.chain { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: .6rem 0; font-size: .86rem; font-weight: 700; }
.chain li { padding: .25rem .6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.chain li + li::before { content: '→ '; color: var(--muted); }
.stages { list-style: none; padding: 0; margin: .8rem 0 0; border-top: 2px solid var(--ink); }
.stage { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; }
.st-head { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; } .st-head .amt { grid-row: 1 / span 2; grid-column: 2; font-size: 1.15rem; }
.steps { list-style: none; display: flex; gap: .3rem; padding: 0; margin: 0; flex-wrap: wrap; }
.steps li { font-size: .78rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; border: 1.5px solid var(--line-2); color: var(--muted); }
.steps li.done { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; } .thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.release { font-weight: 800; font-size: .9rem; }

/* ---------- billing, settings, ledger ---------- */
.bill { border-top: 2px solid var(--ink); padding-top: .4rem; }
.connect { border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); padding: .8rem 1rem; }
.connect h3 { margin-bottom: .2rem; } .connect ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.connects { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.connects li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.plain .preview { margin-top: .5rem; font-weight: 700; min-height: 1.5em; }
.wfs details { border-bottom: 1px solid var(--line); padding: .6rem 0; } .wfs summary { font-weight: 800; cursor: pointer; } .wfs ol { margin: .5rem 0 0; padding-left: 1.3rem; display: grid; gap: .35rem; color: var(--ink-2); }
.notes-list { padding-left: 1.2rem; display: grid; gap: .4rem; color: var(--ink-2); }
.ledger { list-style: none; padding: 0; margin: .8rem 0 0; border-top: 2px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ledger .seq { font-weight: 800; color: var(--muted); font-size: .85rem; padding-top: .1rem; }
.l-title { font-weight: 700; overflow-wrap: anywhere; } .l-meta { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.ledger .hash { grid-column: 2; color: var(--muted); font-size: .76rem; }
.ledger .ev-approved .l-title, .ledger .ev-endorsed .l-title { color: var(--good); }
.ledger .ev-declined .l-title, .ledger .ev-blocked .l-title { color: var(--bad); }
.ledger .ev-access .l-title { color: var(--accent-2); }
@media (min-width: 900px) { .ledger li { grid-template-columns: 4rem 1fr auto; } .ledger .hash { grid-column: 3; } }

/* ---------- onboarding ---------- */
.stepper { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: .3rem; }
.stepper li .linkish { min-height: 40px; padding: .3rem .7rem .3rem .35rem; border-radius: 999px; border: 1.5px solid var(--line-2); font-weight: 700; font-size: .84rem; white-space: nowrap; color: var(--ink-2); }
.stepper .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); font-size: .78rem; font-weight: 900; }
.stepper li.done .n { background: var(--good-bg); color: var(--good); }
.stepper li.cur .linkish { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stepper li.cur .n { background: var(--accent-2); color: #0B1030; }
.stepper li:not(.cur) .l { display: none; }
@media (min-width: 900px) { .stepper li .l { display: inline !important; } }
.ob-body { max-width: 720px; }
.choices, .proposals, .confirm, .checklist { list-style: none; padding: 0; margin: 0; }
.choices li, .proposals li, .confirm li, .checklist li { display: grid; gap: .35rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.choices li { grid-template-columns: 1fr auto; align-items: center; } .choices li > div { display: grid; gap: .15rem; }
.checklist li { grid-template-columns: auto 1fr; align-items: start; column-gap: .7rem; } .checklist li .fineprint { grid-column: 2; }
.checklist li.done > span:nth-child(2) { text-decoration: line-through; color: var(--muted); }
.tick { font-weight: 900; color: var(--good); width: 20px; text-align: center; }
.more { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.more a { display: flex; gap: .7rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.05rem; }
.more-foot { margin-top: 1.5rem; display: grid; gap: .6rem; justify-items: start; color: var(--muted); }

.amt.inline { display: grid; margin: .3rem 0 .1rem; font-size: 1.25rem; }
.amt.side { display: none; }
@media (min-width: 700px) { .amt.inline { display: none; } .amt.side { display: grid; } }
.tbl-wrap { overflow-x: auto; max-width: 100%; }
select { max-width: 100%; text-overflow: ellipsis; }
.field, .grid-form > * { min-width: 0; }
.step-label { font-weight: 800; color: var(--ink-2); margin-bottom: .5rem; }

/* ---------- v1.1: amounts preference, top-up packs, done-for-you ---------- */
.pref-row { margin: .7rem 0; padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .3rem; }
.packs { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pack { display: grid; gap: .1rem; padding: .7rem .8rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.pack .pk-name { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pack .pk-price { font-size: 1.35rem; font-weight: 900; }
.pack .pk-credits { font-weight: 700; }
.pack .pk-bonus { font-size: .84rem; color: var(--good); font-weight: 700; }
.pack .btn { margin-top: .4rem; justify-self: start; }
.pack.locked { opacity: .7; border-style: dashed; }
.dfy { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; padding: 1rem 0; }
.dfy > div { flex: 1 1 260px; display: grid; gap: .3rem; }
.big-ish { font-size: 1.2rem; font-weight: 900; }
.plain { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.plain.small { font-size: .88rem; }
.rules-list { list-style: none; padding: 0; }
.rules-list li { display: flex; gap: .5rem; align-items: baseline; }

/* ---------- Marketing ---------- */
.allow { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.al-head { display: flex; justify-content: space-between; gap: .5rem; font-weight: 700; margin-bottom: .3rem; }
.cal-sec { display: none; }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .4rem .3rem; }
.cal-cell { min-height: 78px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: .3rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.pad { background: transparent; border-style: dashed; }
.cal-cell.past { opacity: .55; }
.cal-cell.today { border: 2px solid var(--accent-2); }
.cal-day { font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.chip { display: block; font-size: .72rem; font-weight: 800; padding: .1rem .35rem; border-radius: 4px; background: var(--info-bg); color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--accent-2); }
.chip.st-approved { background: var(--good-bg); border-color: var(--good); }
.chip.k-review_request, .chip.k-newsletter, .chip.k-outreach_email { border-color: var(--accent); }
@media (min-width: 900px) { .cal-sec { display: block; } }
.agenda { list-style: none; margin: 0; padding: 0; }
.ag-date { margin-top: 1.1rem; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.item.mk.st-dropped h3 { text-decoration: line-through; color: var(--muted); }
.item.mk.st-dropped .sum { color: var(--muted); }
.mk-edit { grid-column: 1 / -1; background: var(--sunk); padding: .8rem; border-radius: var(--r-sm); }
@media (min-width: 700px) { .mk-edit { grid-template-columns: 1fr 180px; } }

/* ---------- Reception ---------- */
.switchbar { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; justify-content: space-between; padding: .9rem 1rem; border-radius: var(--r); margin: .8rem 0; border: 1.5px solid var(--line-2); background: var(--surface); }
.switchbar.on { border-left: 6px solid var(--good); }
.switchbar.off { border-left: 6px solid var(--bad); background: var(--bad-bg); }
.switchbar > div { flex: 1 1 240px; }
.btn.danger { border-color: var(--bad); }
.rx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); margin-top: .4rem; }
.rx-stats .stat { background: var(--bg); padding: .8rem .5rem; min-width: 0; display: grid; gap: .3rem; align-content: start; }
.rx-stats .stat .big { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.rx-stats .stat.wide { grid-column: 1 / -1; padding-left: 0; }
.rx-stats .stat:first-child { padding-left: 0; }
@media (min-width: 900px) { .rx-stats { grid-template-columns: 1fr 1fr 1fr 2fr; } .rx-stats .stat.wide { grid-column: auto; } .rx-stats .stat { padding-left: .9rem; } .rx-stats .stat:first-child { padding-left: 0; } }
.tag.urgent { background: var(--bad-bg); color: var(--bad); }
.item.call.urgent { border-left: 4px solid var(--bad); padding-left: .8rem; }
.transcript { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .45rem; }
.transcript li { display: grid; grid-template-columns: 3.6rem 1fr; gap: .5rem; font-size: .93rem; }
.transcript .t-who { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: .2rem; }
.transcript .t-ai span:last-child { color: var(--ink); }
.transcript .t-caller span:last-child { color: var(--ink-2); font-style: italic; }
.transcript .t-human .t-who { color: var(--good); }
.transcript.live li { animation: rise .25s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .transcript.live li { animation: none; } }
.player-out { margin-top: .6rem; padding: .2rem 0; }
.player-out:empty { display: none; }
.tbl.consent { margin-top: 1rem; }
.connects { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .6rem; }
@media (min-width: 700px) { .connects { grid-template-columns: 1fr 1fr; } }
.connects li.connect { display: block; }
/* onboarding: phone number + connect cards */
.ph-part { border-top: 1px solid var(--line); padding-top: .9rem; display: grid; gap: .5rem; }
.ph-part > summary { font-weight: 800; cursor: pointer; min-height: 32px; }
.numbers { list-style: none; margin: .3rem 0 0; padding: 0; }
.numbers li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.numbers li .nm { font-weight: 800; font-size: 1.05rem; }
.numbers li .fineprint { grid-column: 1; }
.numbers li .btn { grid-row: 1 / span 2; grid-column: 2; }
.numbers li.picked .nm { color: var(--good); }
.connects.cards li.connect { display: grid; gap: .35rem; }
.cc-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: space-between; }
.cc-head .tag { margin: 0; }
.connects.cards .btn { justify-self: start; }
.connects.cards li.connect.on { border: 1.5px solid var(--good); background: var(--good-bg); }
.g-one { margin-top: .6rem; } .g-steps { margin: .3rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.tbl.dns code { overflow-wrap: anywhere; word-break: break-all; }
.tbl-wrap { overflow-x: auto; }

/* ---------- presentation mode (demo orgs, ?present=1): calm, filmable ---------- */
.demo-mark { display: inline-block; justify-self: start; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: .05rem .4rem; }
.top-org { display: flex; align-items: center; gap: .5rem; }
.top-org .org-name { min-width: 0; }
html.present body { font-size: 17px; }
html.present .hero h1 { font-size: 2.4rem; }
html.present .hero-line strong { font-size: 1.4rem; }
html.present .item h3 { font-size: 1.12rem; }
html.present .amt { font-size: 1.5rem; }
html.present .hero::after { display: none; }
html.present .tag.demo { display: none; } /* one header "Demo" mark instead of a tag on every card */
/* focused approval: the decided confirmation */
.decided { margin-top: 1.2rem; padding: 1.5rem 1.25rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: .55rem; justify-items: start; }
.decided-tick { width: 56px; height: 56px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: flex; align-items: center; justify-content: center; }
.decided-tick .ico { width: 30px; height: 30px; }
.decided h2 { font-size: 1.6rem; font-weight: 900; color: var(--good); }
.decided-title { margin: 0; font-weight: 800; font-size: 1.15rem; line-height: 1.3; }
.decided .amt { font-size: 1.8rem; }
.decided .fineprint { margin: 0; }
html.present .decided h2 { font-size: 2rem; }
html.present .decided-title { font-size: 1.3rem; }
html.present .decided .amt { font-size: 2.2rem; }
html.present .focus .item h3 { font-size: 1.3rem; }
html.present .focus .item .amt { font-size: 2rem; }
html.present .focus .item .sum { font-size: 1.06rem; }
html.present .main { padding-bottom: 70vh; } /* the end of a short list can scroll to the top: whole cards on a phone */

/* ---- 23 Nov: invoice timeline, automation, subscriptions, Reception hours ---- */
.crumbs { margin-bottom: .4rem; font-weight: 700; } .crumbs a { color: var(--ink-2); text-decoration: none; }
.inv .inv-link { color: inherit; text-decoration: none; display: block; } .inv .inv-link:hover h3 { text-decoration: underline; }
.item.inv { grid-template-columns: 1fr auto; align-items: start; }
.inv-state { margin: -.2rem 0 .4rem; } .inv-state .tag { margin-left: 0; font-size: .8rem; }
.tag.urgent { background: var(--bad-bg); color: var(--bad); }
.seq { list-style: none; margin: .7rem 0 0; padding: 0; position: relative; }
.seq li { display: grid; grid-template-columns: 22px 1fr; gap: .55rem; padding: 0 0 .9rem; position: relative; }
.seq li::before { content: ''; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--line-2); }
.seq.tail li:last-child::before { display: none; }
.seq-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); margin-top: 3px; position: relative; z-index: 1; }
.seq-done .seq-dot { background: var(--good); border-color: var(--good); }
.seq-skipped .seq-dot { background: var(--sunk); border-style: dashed; }
.seq-pending .seq-dot { border-color: var(--accent-2); }
.seq-failed .seq-dot, .seq-blocked .seq-dot { border-color: var(--bad); }
.seq-off .seq-dot { opacity: .6; }
.seq-skipped strong { color: var(--muted); font-weight: 600; }
.events { list-style: none; margin: .5rem 0 0; padding: 0; }
.events li { padding: .7rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .15rem; }
.events .ev-paid strong { color: var(--good); } .events .ev-promise_broken strong { color: var(--bad); }
.hero-stat { margin: .6rem 0 1rem; } .hero-stat .big { font-size: 2.4rem; }
.tbl tfoot th, .tbl tfoot td { border-top: 2px solid var(--ink); padding: .6rem .4rem; }
.sms { background: var(--sunk); border-radius: 12px 12px 12px 4px; padding: .55rem .75rem; max-width: 34rem; font-size: .93rem; }
.rx-und { margin: .35rem 0 .2rem; }
fieldset.hours { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; margin: 0; display: grid; gap: .4rem; }
fieldset.hours legend { font-weight: 700; font-size: .9rem; padding: 0 .3rem; }
.hours-row { display: grid; grid-template-columns: 5.2rem 1fr 1fr; gap: .5rem; align-items: center; }
.hours-row input[type=time] { min-width: 0; }
.rows li select { width: auto; min-width: 11rem; }
.tbl tfoot th { border-bottom: 0; } .tbl tfoot td { border-bottom: 0; }
