:root{--ink:#102238;--muted:#637186;--bg:#f3f6fa;--panel:#fff;--line:#dce4ee;--brand:#0b6bcb;--safe:#087f5b;--warn:#b45309;--danger:#b42318}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 Inter,ui-sans-serif,system-ui,sans-serif}a{color:inherit;text-decoration:none}.shell{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{background:#0c2138;color:#dbe8f5;padding:24px 16px;position:sticky;top:0;height:100vh;overflow:auto}.brand{font-size:20px;font-weight:750;color:#fff;margin:0 8px 22px}.brand small{display:block;font-size:11px;color:#8db5dc;letter-spacing:.08em;text-transform:uppercase}.nav-group{margin:18px 8px 8px;color:#7895b2;font-size:10px;text-transform:uppercase;letter-spacing:.12em}.nav a{display:block;padding:8px 10px;margin:2px 0;border-radius:7px}.nav a:hover,.nav a.active{background:#173b60;color:#fff}.main{padding:28px 34px;min-width:0}.top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}.top h1{font-size:26px;margin:0}.eyebrow{color:var(--muted);margin:4px 0}.user{background:var(--panel);border:1px solid var(--line);padding:9px 12px;border-radius:9px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:18px 0}.card,.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 2px 9px #1022380a}.card{padding:16px}.card .label{color:var(--muted);font-size:12px}.card .value{font-size:24px;font-weight:730;margin-top:6px}.panel{padding:18px;margin:16px 0;overflow:auto}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:14px}input,select,button{font:inherit;border:1px solid #bbc9d8;border-radius:7px;padding:8px 10px;background:#fff}input,select{min-width:160px}button,.button{background:var(--brand);border-color:var(--brand);color:#fff;cursor:pointer;padding:8px 12px;border-radius:7px}.secondary{background:#fff;color:var(--ink);border:1px solid #bbc9d8}.danger{background:var(--danger);border-color:var(--danger)}table{border-collapse:collapse;width:100%;font-size:13px}th{text-align:left;color:var(--muted);font-weight:650;border-bottom:1px solid var(--line);padding:10px 8px;white-space:nowrap}td{padding:11px 8px;border-bottom:1px solid #edf1f5;max-width:300px;overflow-wrap:anywhere}.badge{display:inline-block;padding:3px 7px;border-radius:99px;background:#e7eff8;color:#24517b;font-size:11px}.empty,.blocked,.error{padding:28px;text-align:center;border:1px dashed #c5d1de;border-radius:10px;color:var(--muted)}.blocked{background:#fff8eb;color:var(--warn)}.error{background:#fff1f0;color:var(--danger)}.pagination{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.login-shell{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#071a2d,#154e82)}.login-card{width:min(410px,90vw);background:#fff;padding:30px;border-radius:16px;box-shadow:0 20px 60px #0005}.login-card h1{margin:0 0 4px}.login-card label{display:block;margin:16px 0 5px;font-weight:650}.login-card input{width:100%}.login-card button{width:100%;margin-top:20px}.hint{font-size:12px;color:var(--muted)}.grid-two{display:grid;grid-template-columns:1fr 1fr;gap:16px}.loading{display:none;color:var(--muted)}@media(max-width:850px){.shell{grid-template-columns:1fr}.sidebar{position:static;height:auto}.main{padding:20px}.grid-two{grid-template-columns:1fr}}

/* Enrolment key: read off a screen and typed into a phone, so it is large,
   spaced, and unambiguous between the characters base32 actually uses. */
.enrolment-key { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.enrolment-key th { text-align: left; padding: 0.35rem 0.75rem 0.35rem 0; vertical-align: top; white-space: nowrap; opacity: 0.75; font-weight: 600; }
.enrolment-key td { padding: 0.35rem 0; word-break: break-word; }
.enrolment-key code.key { font-size: 1.15rem; letter-spacing: 0.08em; line-height: 1.7; user-select: all; }
details summary { cursor: pointer; opacity: 0.75; margin-top: 0.5rem; }

/* Control Room (0.2.20): four places, plain words. */
.notice{padding:14px 18px;border-radius:10px;background:#ecfdf3;color:var(--safe);border:1px solid #b7ebcd;margin:12px 0}
h2.section{font-size:16px;margin:26px 0 6px}
.needs{list-style:none;margin:0;padding:0}.need{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 4px;border-bottom:1px solid #edf1f5}
.need:last-child{border-bottom:0}.need.warn a:first-child{color:var(--danger);font-weight:650}.need.info a:first-child{color:var(--muted)}
.clients td{vertical-align:middle}.clients .name{font-weight:650;font-size:15px}.right{text-align:right}
.progress{height:8px;width:160px;background:#e7eef6;border-radius:99px;overflow:hidden;display:inline-block;vertical-align:middle;margin-right:8px}.progress span{display:block;height:100%;background:var(--brand)}
.badge.good{background:#e7f6ee;color:var(--safe)}.badge.warn{background:#fff4e5;color:var(--warn)}.badge.bad{background:#fdecea;color:var(--danger)}.bad-text{color:var(--danger)}
.live-head{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin-bottom:14px}.live-head .label{color:var(--muted);font-size:12px}.live-head .value{font-size:24px;font-weight:730}.live-head small{color:var(--muted)}
.actions{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin:10px 0}.actions form,.start{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
.start{margin:16px 0;padding:14px;border:1px dashed #c5d1de;border-radius:10px}.start .hint{flex-basis:100%;margin:4px 0 0}
label{display:inline-flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}label input{color:var(--ink)}
.checklist{list-style:none;margin:0;padding:0}.checklist li{padding:10px 0;border-bottom:1px solid #edf1f5}.checklist li:last-child{border-bottom:0}
.step{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap}.tick{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:99px;background:#e7eef6;font-size:12px;font-weight:700}
.checklist .done .tick{background:#e7f6ee;color:var(--safe)}.checklist .done strong{font-weight:500;color:var(--muted)}.checklist .current .tick{background:var(--brand);color:#fff}
.checklist .later{opacity:.5}.detail{color:var(--muted);font-size:13px}.step-body{margin:10px 0 4px 36px;display:flex;flex-direction:column;gap:8px}.step-body form{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.links{margin:0;padding-left:18px;line-height:2}.links a{color:var(--brand)}
h3{font-size:14px;margin:18px 0 6px}
.blocking{padding:12px 16px;border-radius:10px;background:#fff8eb;color:var(--warn);margin:10px 0}.blocking ul{margin:6px 0 0;padding-left:18px}

/* Trading cards (0.2.30): one card per live client, the main actions on it. */
.stop-all{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.trade-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.trade-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:0 2px 9px #1022380a}
.trade-card h2{font-size:17px;margin:0 0 4px;display:flex;justify-content:space-between;gap:8px;align-items:center}
.trade-card .figures{display:grid;grid-template-columns:repeat(2,1fr);gap:8px 14px;margin:12px 0}
.trade-card .figures div{display:flex;flex-direction:column}.trade-card .figures span{color:var(--muted);font-size:12px}
.trade-card .figures strong{font-size:18px}.trade-card .actions{margin:12px 0 0}
.trade-card .blocking{font-size:13px}

/* The iPhone home-screen app (0.2.30): the whole Control Room, laid out for a phone. */
@media(max-width:700px){
  body{font-size:15px}
  .shell{display:block}
  .sidebar{position:sticky;top:0;z-index:5;height:auto;padding:calc(10px + env(safe-area-inset-top)) 12px 8px;
           display:flex;align-items:center;gap:10px;overflow-x:auto}
  .brand{display:none}  /* the home-screen icon already names the app; the nav gets the width */
  .nav{display:flex;gap:4px}.nav a{white-space:nowrap;padding:8px 10px;margin:0;font-size:14px}
  .main{padding:14px 12px calc(24px + env(safe-area-inset-bottom))}
  .top{flex-direction:column;gap:10px;margin-bottom:14px}.top h1{font-size:21px}
  .user{width:100%;display:flex;justify-content:space-between;align-items:center;padding:6px 10px;font-size:14px}
  .user button,.user .button{min-height:36px;padding:6px 10px;font-size:14px;width:auto}
  .panel{padding:14px;border-radius:10px}
  input,select,button,.button{font-size:16px}  /* 16px stops iOS zooming into a field */
  button,.button{min-height:44px;padding:10px 14px;display:inline-flex;align-items:center;justify-content:center}
  input,select{min-width:0;width:100%;min-height:44px}
  label{display:flex;width:100%}
  .actions,.actions form,.start,.step-body form,.toolbar{flex-direction:column;align-items:stretch;width:100%}
  .actions button,.actions .button,.start button,.step-body button{width:100%}
  .need{flex-direction:column;align-items:stretch}.need .button{width:100%}
  .clients tr{display:grid;grid-template-columns:1fr auto;gap:6px;padding:10px 0;border-bottom:1px solid #edf1f5}
  .clients td{border:0;padding:2px 0;max-width:none}.clients .progress{width:110px}
  .live-head{grid-template-columns:repeat(2,1fr);gap:10px}.live-head .value{font-size:20px}
  .step-body{margin-left:0}
  .trade-cards{grid-template-columns:1fr}
  table{font-size:13px}th,td{padding:8px 6px}
  .settings-grid{grid-template-columns:1fr}
  .login-card{padding:22px}
}

/* 0.2.31: the brand mark, P&L, client logins, and smoother page changes. */
.brand{display:flex;align-items:center;gap:10px}
.brand .mark{width:30px;height:30px;flex:none;color:#e8eef6}
.brand span{display:block}
.nav .short{display:none}
.pnl-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px 18px;align-items:start}
.pnl-strip div{display:flex;flex-direction:column;gap:2px;min-width:0}
.pnl-strip span{color:var(--muted);font-size:12px;font-weight:600}
.pnl-strip strong{font:600 22px/28px ui-monospace,"IBM Plex Mono",Menlo,monospace;font-variant-numeric:tabular-nums}
.pnl-strip small{color:var(--muted);font-size:12px}
.pnl-strip .hint{grid-column:1/-1;margin:0}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.nowrap td,.nowrap th{white-space:nowrap}
.pnl-table td.num,.pnl-table th.num,td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.pnl-table td.num{font-family:ui-monospace,"IBM Plex Mono",Menlo,monospace}
.pnl-table tfoot th{border-top:2px solid var(--line);color:var(--ink)}
.pnl-table td.pos{color:var(--safe)}.pnl-table td.neg{color:var(--danger)}
.inline-code{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap;margin:2px 0}
.inline-code input{width:110px}
label.check{flex-direction:row;align-items:center;gap:8px;font-size:14px;color:var(--ink)}
label.check input{width:auto;min-height:0}
ul.logins{list-style:none;margin:0;padding:0}ul.logins li{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #edf1f5}
ul.logins li:last-child{border-bottom:0}.login-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.login-actions form{margin:0}
code.handover{display:block;padding:10px;background:#fff;border:1px solid var(--line);border-radius:8px;font-size:13px}

/* Page changes cross-fade instead of flashing white (Safari 18.2+, Chrome 126+;
   elsewhere pages simply load as before). The bar stays put. */
@view-transition{navigation:auto}
.sidebar{view-transition-name:topbar}
::view-transition-old(root),::view-transition-new(root){animation-duration:.16s}
@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}
[data-region].updated{animation:na-glow .9s ease-out}
@keyframes na-glow{from{background-color:#eef5ff}to{background-color:transparent}}
@media (prefers-reduced-motion:reduce){[data-region].updated{animation:none}}

@media(max-width:700px){
  .brand{display:none}
  .nav .records,.nav .nav-group{display:none}
  .nav .long{display:none}.nav .short{display:inline}
  .pnl-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pnl-strip strong{font-size:18px;line-height:24px}
  .inline-code{display:flex;width:100%}.inline-code input{flex:1;width:auto}
  .inline-code button{width:auto}
}
.crumb{margin:0 0 4px;font-size:13px}.crumb a{color:var(--brand)}
.audit-account{padding:10px 0;border-top:1px solid var(--line)}.audit-account:first-of-type{border-top:0}.audit-account h3{margin:0 0 6px;font-size:15px}.audit-account h3 a{color:var(--brand)}.audit-account h3 small{display:block;font-weight:400;color:var(--muted);font-size:12px;margin-top:2px}.audit-findings{margin:6px 0;padding-left:18px}.audit-findings li{margin:4px 0}.audit-findings.bad li{color:var(--danger)}.audit-findings strong{margin-right:4px}

/* ===== 0.2.52: the brand kit (Narnoli Arth Brand, 2 Oct 2026), applied to both apps. =====
   Tokens: ledger navy, signal blue for what you can press, Arth brass for the next
   buy only, status colours with a word. Type: Anek Latin (headings), Mukta (text),
   IBM Plex Mono (figures). Fonts are self-hosted under SIL Open Font License. */
@font-face{font-family:"Anek Latin";src:url("/commercial/static/AnekLatin-Variable.woff2") format("woff2");font-weight:100 800;font-stretch:75% 125%;font-display:swap}
@font-face{font-family:Mukta;src:url("/commercial/static/Mukta-Regular.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Mukta;src:url("/commercial/static/Mukta-SemiBold.woff2") format("woff2");font-weight:600 700;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url("/commercial/static/IBMPlexMono-Regular.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url("/commercial/static/IBMPlexMono-Medium.woff2") format("woff2");font-weight:500 700;font-display:swap}
:root{--ink:#0c2138;--muted:#536379;--bg:#f3f6fa;--panel:#fff;--line:#dce4ee;--line-strong:#74869e;--brand:#0b6bcb;
  --safe:#077553;--warn:#a14a07;--danger:#b42318;--navy:#0c2138;--navy-raised:#173b60;--on-navy:#e8eef6;
  --sunk:#e7eef6;--action-soft:#e7eff8;--brass:#b8862b;--brass-text:#7f5c12;--brass-soft:#f6ebd3;
  --safe-soft:#e7f6ee;--warn-soft:#fff4e5;--danger-soft:#fdecea;
  --display:"Anek Latin","Anek Devanagari",system-ui,sans-serif;--sans:Mukta,"Anek Devanagari",system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,Menlo,monospace}
body{font:16px/24px var(--sans);color:var(--ink);background:var(--bg)}
h1,h2,h3,.top h1{font-family:var(--display);font-weight:650;letter-spacing:0}
.top h1{font-size:26px;line-height:32px}
h2.section{font-size:18px;line-height:24px;font-weight:600;margin:24px 0 8px}
.eyebrow{font-size:14px;line-height:20px;color:var(--muted)}
.hint{font-size:14px;line-height:20px;color:var(--muted)}
a{color:inherit}.main a:not(.button):not(.btn){color:var(--brand)}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
/* Buttons: verbs; blue for the action, white for secondary, red only for Stop. */
button,.button{font:600 16px/20px var(--sans);border-radius:10px;padding:10px 18px;min-height:40px;background:var(--brand);border:1px solid var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
button.secondary,.button.secondary,.secondary{background:#fff;color:var(--ink);border:1px solid var(--line-strong)}
button.danger,.button.danger,.danger{background:var(--danger);border-color:var(--danger);color:#fff}
button:disabled,button[disabled]{background:var(--sunk);border-color:var(--line);color:var(--muted);cursor:not-allowed}
button.small,.button.small{min-height:36px;padding:6px 12px;font-size:14px}
button.link{background:none;border:0;padding:0;min-height:0;color:#c5d2e1;font:inherit;text-decoration:underline;cursor:pointer}
input,select{font:16px/22px var(--sans);border:1px solid var(--line-strong);border-radius:6px;padding:9px 12px;color:var(--ink)}
label{font-size:12px;line-height:16px;font-weight:600;color:var(--muted)}
/* Panels have a line and no shadow; only trading cards lift. */
.panel{border-radius:10px;box-shadow:none;padding:20px}
.card{border-radius:10px;box-shadow:none}
.trade-card{border-radius:12px;padding:16px 18px;box-shadow:0 2px 9px #1022380a;display:flex;flex-direction:column;gap:12px}
.trade-card h2{font-size:18px;line-height:24px;font-weight:600;margin:0}
.trade-card .figures{margin:0}.trade-card .actions{margin:0}
.trade-card .figures strong,.live-head .value,.card .value,.figure,.figure-sm{font-family:var(--mono);font-weight:500;font-variant-numeric:tabular-nums}
.trade-card .figures strong{font-size:18px;line-height:24px}.live-head .value{font-size:24px;line-height:28px}
.figure-sm{font-size:14px;line-height:20px;color:var(--muted);font-weight:400}
.badge{font:600 13px/24px var(--sans);height:24px;padding:0 10px;border-radius:999px;background:var(--sunk);color:var(--muted);white-space:nowrap;display:inline-flex;align-items:center}
.badge.good{background:var(--safe-soft);color:var(--safe)}.badge.warn{background:var(--warn-soft);color:var(--warn)}.badge.bad{background:var(--danger-soft);color:var(--danger)}
.notice{background:var(--safe-soft);color:#055c41;border:0;border-radius:10px;font-size:15px}
.error{background:var(--danger-soft);color:#8f1c13;border:0;border-radius:10px;text-align:left;padding:14px 18px}
.blocking{background:var(--warn-soft);color:#6e3305;border-radius:10px}
.empty{border:1px dashed var(--line);color:var(--muted)}
td.pos,.pos{color:var(--safe)}td.neg,.neg{color:var(--danger)}
table th{font:600 12px/16px var(--sans);color:var(--muted)}
.pnl-table td.num,td.num{font-family:var(--mono)}
/* The navy side: the lockup, four places, who is signed in. */
.sidebar{background:var(--navy);color:var(--on-navy);display:flex;flex-direction:column;gap:24px;padding:24px 16px}
.brand{margin:0 4px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;color:var(--on-navy)}
.brand img{display:block;height:30px;width:auto}
.brand small{font:600 11px/16px var(--sans);letter-spacing:.08em;text-transform:uppercase;color:#9dadc2}
.nav a{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;color:#c5d2e1;font-size:16px}
.nav a:hover{background:var(--navy-raised);color:var(--on-navy)}
.nav a.active{background:var(--navy-raised);color:var(--on-navy);font-weight:600}
.tab-icon{width:20px;height:20px;flex:none}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:2px;font-size:14px;line-height:20px;color:#9dadc2;padding:0 4px}
.side-foot strong{color:var(--on-navy);font-weight:600}.side-foot form{margin-top:6px}
.app .top .user{display:none}
.top{align-items:center}
/* The client app's parts. */
.pnl-hero{display:flex;flex-direction:column;gap:12px}
.pnl-hero .hero{display:flex;flex-direction:column;gap:2px}
.pnl-hero span{font:600 12px/16px var(--sans);color:var(--muted)}
.pnl-hero .hero strong{font:500 28px/34px var(--mono)}
.pnl-hero .row3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;border-top:1px solid var(--line);padding-top:12px}
.pnl-hero .row3 div{display:flex;flex-direction:column;gap:2px;min-width:0}
.pnl-hero .row3 strong{font:500 18px/24px var(--mono)}
.pnl-hero .hint{margin:0}
.ladder{display:flex;flex-direction:column}
.lrow{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px;line-height:20px}
.lrow:last-child{border-bottom:0}
.lrow .px{font:500 15px/20px var(--mono);min-width:88px}
.lrow .what{flex:1;color:var(--muted)}
.lrow .lock{font-family:var(--mono);color:var(--muted)}
.lrow.next .px,.lrow.next .what{color:var(--brass-text)}
.dot{flex:none;width:12px;height:12px;border-radius:3px;background:var(--navy)}
.dot.next{background:transparent;border:2px solid var(--brass)}
.now{display:flex;align-items:center;gap:8px;color:var(--brand);font:600 13px/18px var(--sans);padding:6px 0}
.now::before,.now::after{content:"";flex:1;height:2px;background:var(--brand);border-radius:2px}
.actions.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
.actions.two form,.actions.two button{width:100%}
.trade-card .hint{margin:0}
.restart{display:flex;flex-direction:column;gap:8px}.restart label{width:100%}.restart input{width:100%;font-family:var(--mono);letter-spacing:.2em}
.off-title{margin:0;font-size:16px;line-height:22px}.off-text{margin:0}
.more{margin:0;font-size:14px;font-weight:600}
.rows{padding:4px 20px}.row-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.row-item:last-child{border-bottom:0}.row-item>div{display:flex;flex-direction:column;gap:2px;min-width:0}.row-item form{margin:0}
.signout{margin:16px 0}
/* Sign-in pages: one card on navy. */
.login-shell{background:var(--navy)}
.login-card{border-radius:12px;box-shadow:none}
.login-card h1{font-family:var(--display);font-size:26px;line-height:32px}
.login-card .lockup{display:block;height:36px;width:auto;margin:0 auto 20px}
/* Desktop: the content keeps a readable width. */
@media(min-width:701px){.main{max-width:1180px}}
/* Phone: the bar on top, the four places as tabs at the bottom. */
@media(max-width:700px){
  body.app{font-size:16px}
  .app .sidebar{position:sticky;top:0;z-index:5;flex-direction:row;align-items:center;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;gap:12px}
  .app .brand{display:flex;margin:0}.app .brand img{height:26px}.app .brand small{display:none}
  .app .side-foot{display:none}
  .app .nav{position:fixed;left:0;right:0;bottom:0;z-index:6;display:flex;gap:0;background:#fff;border-top:1px solid var(--line);
            padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
  .app .nav a{flex:1;flex-direction:column;gap:2px;padding:6px 0;border-radius:8px;color:var(--muted);font:600 12px/16px var(--sans);background:none}
  .app .nav a.active{color:var(--brand);background:none}
  .app .nav .tab-icon{width:22px;height:22px}
  .app .main{padding:16px 12px calc(84px + env(safe-area-inset-bottom))}
  .app .top{flex-direction:row;align-items:flex-start;justify-content:space-between}
  .app .top h1{font-size:21px;line-height:28px}
  .app .top .user{display:flex;width:auto;border:0;background:none;padding:0}
  .client .top .user{display:none}
  .pnl-hero .row3 strong{font-size:16px}
  .actions.two{grid-template-columns:1fr 1fr}
  .row-item{align-items:flex-start}
}
.share-row{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.install{display:flex;flex-direction:column;gap:10px}.install[hidden]{display:none}
.install-head{display:flex;gap:14px;align-items:center}.install-head img{border-radius:11px;flex:none}.install-head h2{margin:0;font-size:18px;line-height:24px}
.install-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.trade-card h2 a{color:var(--ink)!important}
.panel h2{font-size:20px;line-height:26px}
@media(min-width:701px){.install{display:none!important}}
@media(max-width:700px){
  .app .need{flex-direction:row;align-items:center}
  .app .need a:first-child{color:var(--ink);font-weight:600}
  .app .need .button{width:auto;min-height:36px;padding:6px 14px;font-size:14px;flex:none}
  .app .top .user{font-size:0;gap:0}.app .top .user button{font-size:14px;min-height:36px;padding:6px 12px}
}
.panel>h2.section:first-child{margin-top:0}
/* ===== 0.2.54: fixes from the owner's phone video (22 Oct 2026), and the record pages in the new shell. ===== */
.muted{color:var(--muted)}
.cards{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.card .label{font:600 12px/16px var(--sans);color:var(--muted)}.card .value{font-size:22px;line-height:28px}
/* Home's client list: a long "next step" wraps inside its badge instead of pushing the row off the screen. */
.clients .badge{white-space:normal;height:auto;min-height:24px;line-height:18px;padding:3px 10px;text-align:left}
.clients td{max-width:none}
.progress-cell{white-space:nowrap}
/* A form's hint always goes under the form, never beside it. */
.start .hint{flex:0 0 100%;width:100%;max-width:100%}
.start label{min-width:0}
/* Record tables: plain words, readable rows. */
table.records td{max-width:280px}
.records-page .panel{overflow:visible}
.records-page .table-wrap{overflow-x:auto}
.record-groups .nav-group{margin:14px 12px 4px;color:#9dadc2;font:600 11px/16px var(--sans);letter-spacing:.08em;text-transform:uppercase}
.record-groups a{font-size:15px;padding:8px 12px}
@media(max-width:700px){
  html,body{overflow-x:hidden}
  .main{min-width:0;max-width:100vw}
  .panel,.trade-card{max-width:100%;min-width:0}
  /* Home's client list: name and Open on top, the progress and badge under. */
  .clients,.clients tbody{display:block}
  .clients tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name open" "badge badge" "progress progress";gap:6px 10px;padding:12px 0}
  .clients td.name{grid-area:name;align-self:center;overflow-wrap:anywhere}
  .clients td.progress-cell{grid-area:progress;display:flex;align-items:center;gap:8px}
  .clients td.progress-cell .progress{flex:1;width:auto;margin:0}
  .clients td:nth-child(3){grid-area:badge}
  .clients td.right{grid-area:open;align-self:center}
  .clients td.right .button{min-height:36px;padding:6px 14px;font-size:14px}
  /* Trading cards and start forms: one column, the hint under the button. */
  .start{padding:12px}
  .start .hint{flex:0 0 auto}
  .trade-card h2{flex-wrap:wrap}
  .trade-card .figures{grid-template-columns:repeat(2,minmax(0,1fr))}
  .trade-card .figures strong{font-size:17px;overflow-wrap:anywhere}
  .blocking{overflow-wrap:anywhere}
  /* Tables of figures: tighter, so most fit without scrolling sideways. */
  .pnl-table{font-size:13px}.pnl-table th,.pnl-table td{padding:8px 5px}
  .pnl-table td.num{font-size:12.5px}
  /* Record tables become one card per row. */
  table.records,table.records tbody,table.records tr,table.records td{display:block;width:100%}
  table.records thead{display:none}
  table.records tr{border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin:0 0 10px;background:#fff}
  table.records td{display:grid;grid-template-columns:40% minmax(0,1fr);gap:8px;border:0;padding:4px 0;max-width:none;overflow-wrap:anywhere;font-size:14px}
  table.records td::before{content:attr(data-label);color:var(--muted);font:600 12px/20px var(--sans)}
  .records-page .table-wrap{overflow:visible}
  .record-groups{overflow-x:auto}
  .records-page .sidebar .record-groups{position:static;display:flex;background:none;border:0;padding:0;gap:4px}
  .records-page .record-groups .nav-group{display:none}
  .records-page .record-groups a{flex:none;color:#c5d2e1;font-size:14px;flex-direction:row;padding:6px 10px}
  .records-page .record-groups a.active{color:#fff;background:var(--navy-raised)}
  .toolbar input{width:100%}
}
table.records td .badge{justify-self:start;width:auto}
.qr-block{display:flex;gap:14px;align-items:center;margin:10px 0;flex-wrap:wrap}
.qr{width:168px;height:168px;flex:none;background:#fff;border:1px solid var(--line);border-radius:8px;padding:4px}
.qr svg{display:block;width:100%;height:100%}
.qr-block .hint{flex:1;min-width:160px;margin:0}
.login-card .qr-block{flex-direction:column;align-items:flex-start}
.months .bar-cell{width:30%;min-width:60px}.months .bar{display:block;height:8px;border-radius:4px;background:var(--safe);min-width:2px}
.months .bar.neg{background:var(--danger)}
.month-accounts{display:block;color:var(--muted);font-size:12px;line-height:16px}
@media(max-width:700px){.months .bar-cell{display:none}}
