/* Premium finishing layer - loaded last on public, customer and owner documents.
   Tokens, the shared "?" info tip, focus rings, and the restructured customer
   subscription / account components. Nothing here changes behaviour. */

:root {
  --text-faint: #978c75;          /* was #6c6350 (3.3:1); now >= 5:1 on every surface */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --card-grad: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 60%);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand-hi);
}

/* ---- accessibility ---------------------------------------------------- */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---- info tip ----------------------------------------------------------- */
.info-tip {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; margin-left: 6px; padding: 0; vertical-align: middle;
  border-radius: 50%; border: 1px solid var(--line-gold); background: var(--brand-soft);
  color: var(--brand-hi); font: 700 11px/1 var(--font-display); cursor: pointer;
  transition: background .15s, transform .15s;
}
.info-tip::after { content: ""; position: absolute; inset: -9px; }     /* 36px touch target */
.info-tip { position: relative; }
.info-tip:hover, .info-tip[aria-expanded="true"] { background: var(--brand); color: var(--on-brand); }
.info-tip:active { transform: scale(.92); }
.info-pop {
  position: fixed; z-index: 10000; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-solid); border: 1px solid var(--line-gold); color: var(--text);
  font: 400 12.5px/1.5 var(--font-display); box-shadow: 0 12px 32px rgba(0,0,0,.55);
  animation: infoIn .14s var(--ease-out);
}
.info-pop::before { content: ""; position: absolute; left: calc(var(--arrow-x, 20px) - 5px); width: 10px; height: 10px; background: inherit;
  border: inherit; transform: rotate(45deg); }
.info-pop[data-side="below"]::before { top: -6px; border-right: 0; border-bottom: 0; }
.info-pop[data-side="above"]::before { bottom: -6px; border-left: 0; border-top: 0; }
@keyframes infoIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.row .k { display: inline-flex; align-items: center; }

/* ---- shared card finish ------------------------------------------------ */
.card, .plan-tile, .stat-tile, .settings-menu { background-image: var(--card-grad); }
.btn.primary { letter-spacing: .01em; }
.section-title { font-size: 11px; }

/* ---- topbar subscribe button ------------------------------------------ */
.topbar-subscribe {
  height: 32px; padding: 0 14px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: var(--on-brand);
  font: 800 12px/1 var(--font-display); letter-spacing: .02em; box-shadow: 0 2px 10px var(--brand-glow);
}
.topbar-subscribe.hidden { display: none; }

/* ---- membership hero (home, no plan) ---------------------------------- */
.sub-hero { position: relative; overflow: hidden; margin: 4px 0 var(--sp-3); padding: var(--sp-5) var(--sp-4) var(--sp-4);
  border: 1px solid var(--line-gold); border-radius: var(--radius-lg);
  background: radial-gradient(120% 90% at 100% 0%, rgba(201,162,75,.22), transparent 60%), var(--surface); }
.sub-hero .eyebrow, .plan-summary .eyebrow { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sub-hero h2 { margin: 6px 0 4px; font-size: 24px; letter-spacing: -.03em; line-height: 1.15; }
.sub-hero p { margin: 0 0 var(--sp-4); color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.sub-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin: 0 0 var(--sp-4); padding: 0; list-style: none; counter-reset: s; }
.sub-steps li { counter-increment: s; padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--border-soft); border-radius: 10px; background: rgba(255,255,255,.02); }
.sub-steps li::before { content: counter(s); display: block; margin: 0 auto 4px; width: 20px; height: 20px; line-height: 20px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-hi); font-size: 11px; font-weight: 800; }
.sub-hero .cta-row, .plan-summary .cta-row { display: flex; gap: var(--sp-2); }
.sub-hero .cta-row .btn.primary, .plan-summary .cta-row .btn.primary { flex: 1; min-height: 46px; font-size: 15px; }

/* ---- plan summary (home, has plan) ------------------------------------ */
.plan-summary { margin: 4px 0 var(--sp-3); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.plan-summary header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.plan-summary h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.02em; }
.ps-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-3); }
.ps-metrics div { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border-soft); min-width: 0; }
.ps-metrics small { display: block; color: var(--text-faint); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ps-metrics strong { display: block; margin-top: 3px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-note { margin: 0 0 var(--sp-3); color: var(--text-dim); font-size: 13px; line-height: 1.45; }

/* ---- collapsible detail blocks ---------------------------------------- */
details.fold { margin: var(--sp-3) 0; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); }
details.fold > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 var(--sp-4); cursor: pointer;
  list-style: none; font-size: 13px; font-weight: 700; color: var(--text); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "\203A"; font-size: 20px; color: var(--text-dim); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(90deg); }
details.fold > .fold-body { padding: 0 var(--sp-4) var(--sp-3); }
details.fold .card { border: 0; background: none; padding: 0; margin: 0; box-shadow: none; }

/* ---- plan cards (subscription page + choose-plan step) ---------------- */
.plan-cards { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plan-card { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); background-image: var(--card-grad); }
.plan-card.current { border-color: var(--line-gold); box-shadow: 0 0 0 1px var(--line-gold) inset; }
.plan-card.soon { opacity: .82; }
.plan-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.plan-card h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.plan-card .price { text-align: right; font-size: 22px; font-weight: 800; color: var(--gold); letter-spacing: -.02em; line-height: 1; }
.plan-card .price small { display: block; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--text-dim); letter-spacing: 0; }
.plan-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--text-dim); }
.plan-card li { display: flex; gap: 8px; align-items: baseline; }
.plan-card li::before { content: "\2713"; color: var(--accent); font-weight: 800; }
.plan-card .btn { width: 100%; min-height: 44px; }
.plan-card details.fold { margin: 0; background: none; }
.plan-card .fold-body .row { padding: 6px 0; }

/* ---- subscription status card ----------------------------------------- */
.sub-status { padding: var(--sp-4); border: 1px solid var(--line-gold); border-radius: var(--radius-lg);
  background: radial-gradient(120% 100% at 100% 0%, rgba(201,162,75,.16), transparent 60%), var(--surface); margin-bottom: var(--sp-4); }
.sub-status .top { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.sub-status h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.02em; }
.sub-status .eyebrow { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sub-status .btn { width: 100%; min-height: 46px; font-size: 15px; }
.sub-status .ps-metrics { margin-bottom: var(--sp-3); }

/* ---- account hero + grouped lists ------------------------------------- */
.acct-hero { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); margin-bottom: var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); background-image: var(--card-grad); }
.acct-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 800;
  color: var(--on-brand); background: linear-gradient(160deg, var(--brand-hi), var(--brand-dim)); }
.acct-hero .who { min-width: 0; flex: 1; }
.acct-hero .who strong { display: block; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-hero .who span { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--text-dim); font-size: 12.5px; }
.acct-hero code { font-family: var(--font-mono); color: var(--gold); letter-spacing: .06em; }
.acct-plan { margin-bottom: var(--sp-3); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line-gold); border-radius: var(--radius-lg); background: var(--brand-soft); }
.acct-plan small { display: block; color: var(--text-dim); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.acct-plan strong { font-size: 15px; }
.acct-plan .btn { white-space: nowrap; }
.settings-row .sr-label { display: inline-flex; align-items: center; }

/* ---- alignment fixes ---------------------------------------------------- */
.card .row { align-items: center; }
.ps-metrics strong { white-space: normal; line-height: 1.25; }
.acct-hero .btn.small { min-height: 30px; padding: 0 12px; font-size: 12px; }
body[data-view="subscription"] .topbar-subscribe { display: none; }
.plan-stack { display: block; min-width: 0; }
.ps-state { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.empty-state { margin: var(--sp-4) 0; padding: var(--sp-5) var(--sp-4); border: 1px dashed var(--border); border-radius: var(--radius-lg); background: rgba(255,255,255,.015); line-height: 1.5; }

/* ---- sign-in / sign-up ---------------------------------------------------- */
.pw-field { position: relative; display: block; }
.pw-field input { padding-right: 68px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.06); color: var(--brand-hi); font: 700 12px var(--font-display); }
.pw-meter { margin-top: 6px; }
.pw-meter span { display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; position: relative; }
.pw-meter span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.pw-meter[data-level="1"] span::after { width: 25%; } .pw-meter[data-level="2"] span::after { width: 50%; background: var(--warn); }
.pw-meter[data-level="3"] span::after { width: 75%; background: var(--accent); } .pw-meter[data-level="4"] span::after { width: 100%; background: var(--accent); }
.pw-meter small { display: block; margin-top: 4px; color: var(--text-dim); font-size: 12px; }
.login-opts { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.login-opts .remember { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.login-opts .remember input { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
.login-opts .link-btn { margin: 0; font-size: 13px; }
.auth-switch { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border-soft); text-align: center; }
.auth-switch span { display: block; color: var(--text-dim); font-size: 13px; margin-bottom: 4px; }
.public-auth-card .field-error, .login-error:not(:empty) { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(199,106,92,.12); border: 1px solid rgba(199,106,92,.35); color: #f0b5ab; font-size: 13px; }
.login-error:empty { display: none; }

.access-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); }
.access-tab { min-height: 42px; border: 0 !important; border-radius: 9px !important; font-size: 13.5px; }

.apply-steps { display: flex; gap: 6px; margin: 0 0 var(--sp-4); padding: 0; list-style: none; }
.apply-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; color: var(--text-faint); font-size: 11.5px; font-weight: 600; text-align: center; }
.apply-steps li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--border-soft); }
.apply-steps li:first-child::before { display: none; }
.apply-steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--border); font-size: 12px; position: relative; z-index: 1; }
.apply-steps li.on { color: var(--text); } .apply-steps li.on b { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.apply-steps li.done { color: var(--text-dim); } .apply-steps li.done b { background: var(--brand-soft); color: var(--brand-hi); border-color: var(--line-gold); }
.apply-steps li.done::before, .apply-steps li.on::before { background: var(--line-gold); }
.apply-all { background: var(--brand-soft) !important; border-color: var(--line-gold) !important; }

@media (max-width: 700px) {
  .public-auth-shell { padding: 20px 16px 28px; }
  .public-auth-context h1 { font-size: 30px; margin: 6px 0; }
  .public-auth-context { margin-bottom: 16px; }
  .public-auth-context .public-kicker { font-size: 11px; }
  .public-auth-card { padding: 20px 16px; border-radius: var(--radius-lg); }
  .public-auth-context p { font-size: 14px; margin: 0; }
}

/* ---- installed-app mode: only app things in the app ------------------------ */
.public-footer-legal { display: none; }
html.is-app .public-nav, html.is-app .public-menu-toggle, html.is-app .public-footer-brand, html.is-app .public-footer-cols,
html.is-app .public-auth-context, html.is-app .public-install-page { display: none !important; }
html.is-app .public-header { justify-content: center; padding-top: calc(var(--safe-top) + 14px); }
html.is-app .public-footer { padding: 16px 20px calc(var(--safe-bottom) + 20px); text-align: center; border-top: 0; }
html.is-app .public-footer-legal { display: block; margin: 0 0 8px; font-size: 12.5px; }
html.is-app .public-footer-legal a { color: var(--text-dim); }
html.is-app .public-footer-risk { font-size: 11.5px; color: var(--text-faint); }
html.is-app .public-auth-shell { display: block; min-height: 0; padding-top: 12px; }
html.is-app .public-auth-card { max-width: 440px; margin: 0 auto; }
html.is-app .side-foot { display: none; }

/* ---- owner: compact view (titles only until tapped) ------------------------- */
.t2-menu-item { display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,.055); }
.t2-menu-item:first-child { border-top: 0; }
.t2-menu-item .t2-menu-row { border-top: 0; flex: 1; min-height: 44px; }

.t2-menu-group h2 { display: flex; align-items: center; gap: 8px; }
.t2-menu-group h2 small { padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text-dim); font: 700 10px var(--font-display); letter-spacing: 0; }

.cx-head { cursor: pointer; position: relative; padding-right: 28px; user-select: none; }
.cx-head::after { content: "\203A"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%) rotate(0); font-size: 22px; line-height: 1; color: var(--text-dim); transition: transform .2s; }
.cx.cx-open > .cx-head::after { transform: translateY(-50%) rotate(90deg); }
.cx-head:hover h2, .cx-head:hover h3 { color: var(--brand-hi); }
body.owner-compact .cx:not(.cx-open) > :not(:first-child) { display: none !important; }
body.owner-compact .cx:not(.cx-open) > .cx-head { margin-bottom: 0; }
.cx-all { margin-top: 10px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-gold); background: var(--brand-soft); color: var(--brand-hi); font: 700 12px var(--font-display); cursor: pointer; }
.owner-page-heading { position: relative; }

/* ---- owner overview: Needs attention shows numbers until opened ------------- */
#ov-attention { padding: 0; }
.ov-att-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 4px; cursor: pointer; flex-wrap: wrap; }
.ov-att-head h2 { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.ov-att-head .info-tip { margin-left: 0; }
.ov-att-counts { display: flex; gap: 6px; margin-left: auto; }
.ov-att-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); }
.ov-att-chip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ov-att-chip small { display: none; font-size: 11px; color: var(--text-dim); }
.ov-att-chev { width: 22px; text-align: center; color: var(--text-dim); font-size: 22px; line-height: 1; transition: transform .2s; }
.ov-att-chev::before { content: "\203A"; display: inline-block; }
.ov-att-head[aria-expanded="true"] .ov-att-chev { transform: rotate(90deg); }
.ov-att-body[hidden] { display: none; }
@media (min-width: 700px) { .ov-att-chip small { display: inline; } }
body.owner-compact .cx:not(.cx-open) { min-height: 0 !important; height: auto; padding-top: 0; padding-bottom: 0; }
body.owner-compact .owner-data-panel.cx:not(.cx-open), body.owner-compact .t2-panel.cx:not(.cx-open), body.owner-compact .rev-card.cx:not(.cx-open), body.owner-compact .se-block.cx:not(.cx-open) { padding: 0 14px; }
body.owner-compact .cx:not(.cx-open) > .cx-head { min-height: 48px; display: flex; align-items: center; margin: 0; padding-top: 0; padding-bottom: 0; }
body.owner-compact .cx:not(.cx-open) > .cx-head > h2, body.owner-compact .cx:not(.cx-open) > .cx-head > h3 { margin: 0; }

/* installed app: a normal app sign-in - no website bar, no footer, logo above the card */
.public-app-brand { display: none; }
html.is-app .public-header, html.is-app .public-footer { display: none !important; }
html.is-app body:not([data-public-page="login"]) .public-main { min-height:100dvh; display:flex; align-items:center; justify-content:center; padding:calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px); }
html.is-app .public-page[data-page] { width: 100%; }
html.is-app .public-app-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 auto 20px; font: 800 18px var(--font-display); letter-spacing: .14em; }
html.is-app .public-app-brand em { color: var(--brand-hi); font-style: normal; }
html.is-app .public-app-brand img { border-radius: 18px; box-shadow: 0 8px 28px var(--brand-glow); }
html.is-app .public-auth-card { border-top-width: 1px; }
.login-opts { flex-wrap: nowrap; }
.login-opts .remember { font-size: 12.5px; white-space: nowrap; }
.login-opts .link-btn { white-space: nowrap; }
.public-auth-card .link-btn { display: block; text-align: center; }

/* ---- iOS home-indicator area: boot screen, canvas and dock share one colour, so no band shows below the app. ---- */
.boot-screen { background: var(--bg) !important; }
html:has(#app) { background: var(--chrome); }
html:has(#app) body.app-body { background-color: var(--bg); }

/* owner Menu: find a page */
.t2-menu-search { display: block; position: sticky; top: 0; z-index: 2; padding: 4px 0 8px; background: var(--bg); }
.t2-menu-search input { width: 100%; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 500 14px var(--font-display); }
.t2-menu-search input:focus { outline: none; border-color: var(--line-gold); }
.t2-menu.searching .cx > :not(:first-child) { display: block !important; }
.t2-menu-item[hidden], .t2-menu-group[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* minimum readable size for secondary text everywhere */
.view small, .t2-menu small, .public-page small, .analysis-panel small, .ap-body small { font-size: max(11px, .85em); }

/* ---- layout fixes found in the page-by-page review ---- */
.mode-badge { white-space: nowrap; flex: none; }
#topbar .brand-tagline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t2-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.t2-metric-card strong { overflow-wrap: anywhere; white-space: normal; }
.t2-metric-card span, .t2-metric-card small { white-space: normal; overflow: visible; text-overflow: clip; }
@media (min-width: 900px) { .t2-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
.cx-wrapped { margin: 0 0 8px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); padding: 0 14px; }
.cx-wrapped.cx-open { padding-bottom: 12px; }
.cx-wrapped > .section-title { margin: 0; min-height: 48px; display: flex; align-items: center; }
#demo-label { white-space: nowrap; }
#topbar .topbar-right > * { flex: none; }
#topbar .brand-chrome { min-width: 0; }

/* ---- the ? : small, quiet, never alone on a line ---- */
.info-tip { width: 16px; height: 16px; margin-left: 4px; font-size: 10.5px; border-color: rgba(201,162,75,.28); background: transparent; color: var(--text-dim); opacity: .9; }
.info-tip::after { inset: -10px; }
.info-tip:hover, .info-tip:focus-visible, .info-tip[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand-hi); border-color: var(--line-gold); opacity: 1; }
.info-pop { white-space: pre-line; }
.t2-menu-group h2 .info-tip { margin-left: 2px; }

/* plain <details> blocks inside owner/customer pages (e.g. Delivery log) match the rest */
.view details:not(.fold) > summary { cursor: pointer; font: 700 13px var(--font-display); color: var(--text); padding: 10px 2px; }

/* ---- header: crisp, solid, readable ---- */
#topbar { background: var(--chrome); -webkit-backdrop-filter: none; backdrop-filter: none; }
#topbar .brand-wordmark { color: #d8cdb4; font-weight: 800; letter-spacing: .12em; }
#topbar .brand-wordmark .brand-ai { color: var(--brand-hi); }
#demo-label, .mode-badge { color: var(--text); }

/* ---- Share view: same brand language as the rest of the app, one centred poster that fits the screen ---- */
.t2-share-screen { background: radial-gradient(120% 60% at 50% 0%, rgba(201,162,75,.14), transparent 60%), var(--chrome); }
.t2-share-screen .t2-share-card { width: min(100%, 420px); text-align: center; padding: 26px 20px 20px; border-color: var(--line-gold);
  background: radial-gradient(100% 70% at 50% 0%, rgba(224,189,108,.16), transparent 62%), linear-gradient(160deg, #1d170c, #0e0b07); }
.t2-share-card .t2-share-brand { flex-direction: column; justify-content: center; gap: 10px; margin-bottom: 20px; }
.t2-share-card .t2-share-brand img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 10px 34px var(--brand-glow); }
.t2-share-card .t2-brand-name { font-size: 16px; letter-spacing: .16em; }
.t2-share-card .t2-share-top { flex-direction: column; align-items: center; gap: 12px; }
.t2-share-card .t2-share-kicker { font-size: 13px; letter-spacing: .02em; }
.t2-share-card .t2-share-main { font-size: clamp(48px, 15vw, 72px); }
.t2-share-card .t2-share-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; text-align: left; }
.t2-share-card .t2-share-metric { padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(255,255,255,.03); }
.t2-share-card .t2-share-foot { justify-content: center; text-align: center; margin-top: 18px; color: var(--text-dim); }

/* ---- the app is exactly the phone screen: nothing may be wider than it ---------------------------------------- */
.ov-list, .cp-list, .t2-list, .se-list, .mn-list, .t2-menu-list, .running-list { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ov, .ov > *, .ov-row, .ov-row-main, .owner-data-panel, .cp-group, .cp-row, .cp-text, .t2-panel, .se-block, .rev-card, .card, .row { min-width: 0; max-width: 100%; }
.view { overflow-x: hidden; }
html:has(#app), html:has(#app) body.app-body { overflow: hidden; max-width: 100vw; overscroll-behavior: none; }
#app { max-width: 100vw; }
.ov-row-main small, .cp-text small { overflow-wrap: anywhere; }

/* ---- bottom dock sits on the real bottom edge of the phone ---------------------------------------------------- */
/* Dock geometry belongs to app.css, including the complete home-indicator inset. */
/* Safe-area is painted INSIDE #bottom-nav; never extend #app past its viewport. */
body.app-body #bottom-nav { margin-bottom: 0; border-bottom: 0; border-radius: 0; }

/* the installed app never pinch-zooms or shrinks to fit: touch is for the app's own gestures */
html:has(#app) { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; }

/* ---- plans page: "Available now" first, then "Coming soon" (owner 2026-10-18) ---- */
.offer-heading { display: flex; align-items: center; gap: 6px; margin: var(--sp-5) 0 var(--sp-3); font: 800 13px/1.2 var(--font-display);
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.offer-heading.soon { color: var(--text-dim); }
.offer-group { margin: 0 0 var(--sp-4); }
.offer-group.hidden, #sub-none-now.hidden { display: none; }
.offer-group-title { margin: 0 0 var(--sp-2); font-size: 12px; font-weight: 700; color: var(--text-dim); letter-spacing: .06em; text-transform: uppercase; }
.offer-group > div > * + * , .offer-group .plan-cards { margin-top: var(--sp-3); }
.sub-intro .sub-steps { margin-bottom: 0; }
.plan-card.offer { border-color: var(--line-gold); }
.plan-card.offer p { margin: 0; }
.plan-card.offer .fold > summary { padding: 0; min-height: 40px; font-size: 13px; color: var(--brand-hi); }
.plan-card.offer .fold > .fold-body { padding: 0 0 var(--sp-2); font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.plan-card.offer .mm-cols { grid-template-columns: 1fr 1fr; }
.plan-card .pill { align-self: flex-start; }
.offer-active { border-color: var(--line-gold) !important; }
.offer-active .row { padding: 6px 0; }

/* ---- one payment experience (plans, monitoring, signals) ---------------- */
.btn.ghost { background: transparent; border-color: var(--border-soft); color: var(--text-dim); }
.btn.ghost:hover { color: var(--text); border-color: var(--border); }
.pay-flow { margin: 0 0 var(--sp-3); padding: var(--sp-4); border: 1px solid var(--line-gold); border-radius: var(--radius-lg);
  background: radial-gradient(120% 100% at 100% 0%, rgba(201,162,75,.12), transparent 60%), var(--surface); }
.pay-flow > .btn { margin-top: var(--sp-2); min-height: 44px; }
.pay-for { margin: 0 0 var(--sp-3); font-size: 15px; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; }
.pay-for b { color: var(--gold); }
.pay-box { display: grid; gap: var(--sp-3); }
.pay-box .btn { min-height: 46px; font-size: 14.5px; }
.pay-box .btn.small { min-height: 34px; font-size: 12.5px; }
.pay-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: -.01em; }
.pay-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.pay-steps li { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: var(--text-faint); border: 1px solid var(--border-soft); background: rgba(255,255,255,.02); }
.pay-steps b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; background: rgba(255,255,255,.06); }
.pay-steps li.done { color: var(--accent); }
.pay-steps li.done b { background: rgba(111,167,126,.18); }
.pay-steps li.now { color: var(--text); border-color: var(--line-gold); background: var(--brand-soft); }
.pay-steps li.now b { background: var(--brand); color: var(--on-brand); }
.pay-status { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.pay-status small { color: var(--text-faint); font-size: 12px; }
.pay-status small::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent);
  animation: payPulse 1.6s ease-in-out infinite; vertical-align: 1px; }
@keyframes payPulse { 50% { opacity: .25; } }
.pay-amount, .pay-address { padding: var(--sp-3); border-radius: var(--radius); background: rgba(0,0,0,.25); border: 1px solid var(--border-soft); min-width: 0; }
.pay-amount small, .pay-address small { display: block; margin-bottom: 6px; color: var(--text-faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pay-copy-line { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.pay-copy-line .btn { flex: none; margin-left: auto; }
.pay-amount strong { font-size: 24px; font-weight: 800; color: var(--gold); letter-spacing: -.02em; }
.pay-amount span { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.pay-address code { flex: 1; min-width: 0; font: 500 13px/1.45 var(--font-mono); color: var(--text); word-break: break-all; background: none; padding: 0; }
.pay-rules { margin: 0; padding: 0 0 0 18px; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.pay-rules b { color: var(--text); }
.pay-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.pay-hint b { color: var(--text); }
.pay-field { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-dim); letter-spacing: .04em; }
.pay-field select { width: 100%; min-height: 46px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font: 500 14.5px/1.2 var(--font-ui); letter-spacing: 0; }
.pay-box .login-error:empty, [data-mm-flow] .login-error:empty { display: none; }
#mm-panel .plan-card .btn + .btn, #sig-panel .plan-card .btn + .btn { margin-top: 0; }
@media (max-width: 420px) {
  .plan-card.offer .mm-cols { grid-template-columns: 1fr; }
  .pay-amount strong { font-size: 21px; }
}

.mm-add-form { display: grid; gap: var(--sp-3); }
.pay-field input { width: 100%; min-height: 46px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font: 500 14.5px/1.2 var(--font-ui); letter-spacing: 0; }
.plan-card .mm-add > summary { color: var(--brand-hi); }
.day-picker { display: grid; grid-template-columns: 52px 1fr 52px; gap: var(--sp-2); align-items: center; }
.day-picker .btn { min-height: 46px; font-size: 20px; padding: 0; }
.day-picker input { min-height: 46px; text-align: center; font: 800 22px/1 var(--font-display); color: var(--gold); border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2); width: 100%; }

/* ---- sign-up / access key (owner 2026-10-18) ---------------------------- */
#signup-form .link-btn, #access-key-form .link-btn { display: block; margin: 10px auto 0; }

/* -- Smooth real time (owner 2026-10-21): forex + local clocks in the top bar, numbers that show their move ---------- */
.topbar-clocks { display: flex; align-items: stretch; gap: 2px; padding: 3px; border: 1px solid var(--border-soft); border-radius: 12px;
  background: var(--surface-2); font-variant-numeric: tabular-nums; line-height: 1.05; }
.tclock { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 54px; padding: 2px 7px; border-radius: 9px; }
.tclock.fx { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.tclock small { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; }
.tclock.fx small { color: var(--gold); }
.tclock b { font-size: 13px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.tclock-s { opacity: .55; font-weight: 500; }
@media (max-width: 420px) { .tclock-s { display: none; } .tclock { min-width: 44px; padding: 2px 5px; } .tclock small { font-size: 8.5px; } .tclock b { font-size: 12px; } }
@media (max-width: 340px) { .tclock.local { display: none; } }
.live-timer { font-variant-numeric: tabular-nums; }
/* a live number that just changed glows for a moment: green when it rose, red when it fell */
@keyframes live-up { from { background: color-mix(in srgb, #3ecf8e 32%, transparent); } to { background: transparent; } }
@keyframes live-down { from { background: color-mix(in srgb, var(--danger) 32%, transparent); } to { background: transparent; } }
.live-up { animation: live-up .9s ease-out; border-radius: 4px; }
.live-down { animation: live-down .9s ease-out; border-radius: 4px; }
.mono, .stat-tile strong, .ov-pos-pnl, .ov-quote b { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .live-up, .live-down { animation: none; } }

/* clock hotfix 2026-10-21: the clocks never squeeze the Mr Mhor brand/title - fixed size, the title ellipses, tighter on phones */
#topbar .brand-chrome { flex: 1 1 auto; min-width: 72px; }
.topbar-clocks { flex: none; }
@media (max-width: 560px) { .topbar-clocks { padding: 2px; gap: 1px; } .tclock { min-width: 0; padding: 1px 5px; } .tclock small { font-size: 8px; } .tclock b { font-size: 11.5px; } #topbar .brand-tagline { font-size: 14px; } }
@media (max-width: 400px) { .tclock.local small { display: none; } .tclock.local { justify-content: center; } }

/* clocks live on the HOME dashboard again (owner 2026-10-21) - page titles keep the whole top bar */
.home-clocks { display: inline-flex; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-clocks .hc small { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.home-clocks .hc.fx small { color: var(--gold); }
.home-clocks .hc b { font-weight: 650; }
.member-id-line .home-clocks { margin-left: 10px; }

/* Splash as the loading screen (owner 2026-10-22): the sign-in page's cinematic splash when the app opens ... */
.boot-splash .entry-splash { min-height: 100%; }
.boot-splash .entry-logo-orbit { width: min(62vw, 260px); }
.boot-splash .entry-logo-orbit img { mix-blend-mode: screen; }
.boot-splash .boot-progress { margin-top: 34px; text-align: center; color: var(--text-dim); }
.boot-splash .boot-progress > span::after { animation: mm-boot-progress 1.6s ease-in-out infinite; }
@keyframes mm-boot-progress { 0% { transform: translateX(-100%) scaleX(.35); } 50% { transform: translateX(10%) scaleX(.6); } 100% { transform: translateX(110%) scaleX(.35); } }
/* ... and a mini splash wherever a page is loading for the first time */
.loading, .owner-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 120px; }
.loading::before, .owner-loading::before { content: ""; width: 46px; height: 46px; border-radius: 50%;
  background: url("/assets/icons/mr-mhor-fx.webp") center / 118% no-repeat; box-shadow: 0 0 0 1px #eec46d66, 0 0 14px #f0bc4955;
  animation: mm-mini-splash 1.6s ease-in-out infinite; }
@keyframes mm-mini-splash { 0%, 100% { transform: scale(.94); box-shadow: 0 0 0 1px #eec46d55, 0 0 8px #f0bc4933; } 50% { transform: scale(1); box-shadow: 0 0 0 2px #eec46daa, 0 0 18px #f0bc4977; } }
.chart-status-banner.loading, .loading-dots { min-height: 0; }
.chart-status-banner.loading::before { content: none; }
@media (prefers-reduced-motion: reduce) { .boot-splash .boot-progress > span::after, .loading::before, .owner-loading::before { animation: none; } }

/* Menu like NeXa (owner 2026-10-22): a profile card, each section one rounded card, every row icon + title + description */
.t2-menu { gap: 18px; }
.t2-profile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 1px solid var(--card-hairline);
  border-radius: 22px; background: var(--surface); color: var(--text); text-align: left; }
.t2-profile:active { background: var(--surface-2); }
.t2-profile-avatar { width: 56px; height: 56px; flex: none; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px #eec46d44; }
.t2-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.t2-profile-copy { flex: 1; min-width: 0; }
.t2-profile-copy b { display: block; font: 700 18px/1.2 var(--font-display); }
.t2-profile-copy small { display: block; margin-top: 3px; color: var(--text-dim); font-size: 13px; line-height: 1.35; }
.t2-profile-go { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--card-hairline); color: var(--text-dim); font-size: 22px; }
.t2-menu-group h2 { margin: 0 4px 8px; color: var(--text-faint); font: 700 12px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.t2-menu-group h2 .cx-chevron, .t2-menu-group h2::after { display: none !important; }
.t2-menu-list { border: 1px solid var(--card-hairline); border-radius: 20px; background: var(--surface); overflow: hidden; }
.t2-menu-item + .t2-menu-item, .t2-menu-list > .t2-menu-row + .t2-menu-row { border-top: 1px solid rgba(255,255,255,.06); }
.t2-menu-row, .t2-menu-item .t2-menu-row { min-height: 66px; padding: 12px 14px; gap: 14px; border-top: 0; }
.t2-menu-icon { width: 44px; height: 44px; border-radius: 13px; background: rgba(201,162,75,.10); box-shadow: inset 0 0 0 1px rgba(201,162,75,.16); }
.t2-menu-icon svg { width: 20px; height: 20px; }
.t2-menu-copy b { font-size: 15.5px; font-weight: 650; }
.t2-menu-copy small { margin-top: 3px; font-size: 12.5px; line-height: 1.35; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t2-menu-chevron { font-size: 22px; }
/* Member Account page in the same NeXa style: grouped rounded cards, icon tiles, roomy rows */
.account-section h2 { margin: 0 4px 8px; color: var(--text-faint); font: 700 12px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.settings-menu { border: 1px solid var(--card-hairline); border-radius: 20px; background: var(--surface); overflow: hidden; }
.settings-menu .settings-row { min-height: 58px; padding: 12px 14px; gap: 14px; border-radius: 0; }
.settings-menu .settings-row + .settings-row { border-top: 1px solid rgba(255,255,255,.06); }
.settings-menu .sr-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: rgba(201,162,75,.10); box-shadow: inset 0 0 0 1px rgba(201,162,75,.16); }
.settings-menu .sr-label { font-size: 15px; font-weight: 600; }
.settings-menu .sr-chev { font-size: 22px; color: var(--text-faint); }
.acct-hero { border: 1px solid var(--card-hairline); border-radius: 22px; background: var(--surface); padding: 16px; }
/* Header never under the status bar, never faint (owner 2026-10-22): a solid strip exactly the status bar's height that
   nothing can scroll under, and a readable wordmark */
body.app-body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: var(--safe-top); background: var(--chrome); z-index: 60; pointer-events: none; }
#topbar { position: relative; z-index: 61; }
#topbar .brand-wordmark { color: var(--text); opacity: 1; letter-spacing: .12em; font-size: 11.5px; }
#topbar .brand-wordmark .brand-ai { color: var(--brand-hi, var(--brand)); }
#topbar .brand-tagline { color: var(--text); }

/* Member profile under the Mr Mhor ID */
.mp { display: grid; gap: 12px; margin-top: 12px; }
.mp-sec h3 { margin: 0 0 6px; color: var(--text-faint); font: 700 11.5px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.mp-sec { border: 1px solid var(--card-hairline); border-radius: 16px; background: var(--surface); padding: 10px 12px; }
.mp-row { display: grid; gap: 2px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.06); }
.mp-row:first-of-type { border-top: 0; }
.mp-row b { font-size: 13.5px; } .mp-row span { color: var(--text-dim); font-size: 12.5px; overflow-wrap: anywhere; }
/* Chat redesign (owner 2026-10-22): roomy NeXa-style conversation for owner and members */
.chat-scroll { padding: 14px 14px 10px; gap: 14px; }
.welcome-screen { gap: 16px; padding: 24px 18px; }
.welcome-screen::before { content: ""; width: 72px; height: 72px; border-radius: 22px; background: url(/assets/icons/mr-mhor-fx.webp) center/cover;
  box-shadow: 0 0 0 1px #eec46d55, 0 10px 34px rgba(201,162,75,.22); }
.welcome-title { max-width: 320px; font: 600 16px/1.45 var(--font-ui); color: var(--text); text-align: center; }
.welcome-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 420px; }
.welcome-chips .chip { min-height: 46px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--card-hairline); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.3; text-align: left; white-space: normal; }
.welcome-chips .chip:active { background: var(--surface-2, var(--surface)); }
.msg-row { gap: 9px; }
.msg-avatar { width: 30px; height: 30px; border-radius: 10px; }
.bubble { padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; }
.bubble.user { border-bottom-right-radius: 6px; }
.bubble.assistant { border-radius: 18px; border-top-left-radius: 6px; background: var(--surface); border: 1px solid var(--card-hairline); }
.msg-row.update .bubble.assistant { border-color: rgba(201,162,75,.35); background: linear-gradient(180deg, rgba(201,162,75,.08), var(--surface)); }
.quick-action-row { padding: 6px 12px 2px; gap: 8px; }
.quick-action-row .chip { min-height: 32px; padding: 0 14px; border-radius: 16px; font-size: 12.5px; line-height: 32px; }
#chat-input-bar { gap: 10px; padding: 8px 12px 10px; border-top: 1px solid var(--card-hairline); background: var(--chrome); }
#chat-input-bar textarea { min-height: 44px; padding: 11px 16px; border-radius: 22px; font-size: 15px; line-height: 1.4; background: var(--surface); }
.send-btn { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-hi, var(--brand)), var(--brand)); color: var(--on-brand, #120e05); }
.send-btn:disabled { opacity: .45; }
.send-btn svg { width: 19px; height: 19px; }
.chat-quota { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 12px 0; padding: 7px 8px 7px 14px;
  border: 1px solid var(--card-hairline); border-radius: 999px; background: var(--surface); color: var(--text-dim); font-size: 12.5px; }
.chat-quota.empty { border-color: rgba(201,162,75,.45); color: var(--text); }
.chat-quota-btn { flex: none; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-brand, #120e05); font: 700 12px var(--font-ui); }
.chat-subscribe { display: grid; gap: 6px; margin-top: 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(201,162,75,.4); background: rgba(201,162,75,.07); }
.chat-subscribe span { color: var(--text-dim); font-size: 13px; }
.chat-subscribe .btn { justify-self: start; }

/* Profile page */
.pf { display: grid; gap: 18px; padding-bottom: 24px; }
.pf-hero { display: grid; justify-items: center; gap: 6px; padding: 22px 16px 18px; border: 1px solid var(--card-hairline); border-radius: 24px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(201,162,75,.16), transparent 60%), var(--surface); text-align: center; }
.pf-avatar { width: 84px; height: 84px; border-radius: 26px; overflow: hidden; box-shadow: 0 0 0 1px #eec46d66, 0 12px 34px rgba(201,162,75,.25); }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-hero h1 { margin: 6px 0 0; font: 700 22px/1.2 var(--font-display); }
.pf-hero p { margin: 0; color: var(--text-dim); font-size: 13.5px; }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.pf-chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--card-hairline); color: var(--text-dim); font: 600 12px var(--font-ui); }
.pf-chip.ok { color: var(--ok, #3fcf8e); border-color: rgba(63,207,142,.35); }
.pf-sec h2 { margin: 0 4px 8px; color: var(--text-faint); font: 700 12px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.pf-card { border: 1px solid var(--card-hairline); border-radius: 20px; background: var(--surface); overflow: hidden; }
.pf-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 11px 14px; }
.pf-row + .pf-row { border-top: 1px solid rgba(255,255,255,.06); }
.pf-row[role="button"] { cursor: pointer; }
.pf-row[role="button"]:active { background: rgba(255,255,255,.03); }
.pf-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(201,162,75,.10);
  box-shadow: inset 0 0 0 1px rgba(201,162,75,.16); font-size: 17px; }
.pf-copy { flex: 1; min-width: 0; }
.pf-copy b { display: block; font-size: 14.5px; font-weight: 650; }
.pf-copy small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.pf-right { flex: none; font-size: 13px; }
.pf-right .pos { color: var(--ok, #3fcf8e); }
.pf-right .neg { color: var(--danger, #ef5350); }
/* Trade setups on the member Markets page (owner 2026-10-22 mockup): a featured card, compact cards, a locked teaser */
.su { display: grid; gap: 10px; margin: 4px 0 18px; }
.su-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px; }
.su-head h2 { margin: 0; font: 700 13px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.su-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(201,162,75,.35);
  color: var(--brand-hi, var(--brand)); font: 700 11.5px var(--font-ui); }
.su-live i, .su-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.su-card { border: 1px solid var(--card-hairline); border-radius: 20px; background: var(--surface); padding: 14px; }
.su-featured { border-color: rgba(201,162,75,.45); padding: 16px;
  background: radial-gradient(140% 100% at 100% 0%, rgba(201,162,75,.16), transparent 55%), var(--surface);
  box-shadow: 0 0 0 1px rgba(201,162,75,.12), 0 14px 40px rgba(0,0,0,.35); }
.su-top { display: flex; align-items: center; gap: 12px; }
.su-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px var(--card-hairline); font-size: 22px; }
.su-name { flex: 1; min-width: 0; }
.su-name h3 { margin: 0; font: 700 18px/1.15 var(--font-display); letter-spacing: .02em; }
.su-name small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.su-grade { display: grid; justify-items: center; min-width: 54px; padding: 6px 8px; border-radius: 12px; border: 1px solid rgba(201,162,75,.5); }
.su-grade b { font: 800 20px/1 var(--font-display); color: var(--brand-hi, var(--brand)); }
.su-grade small { margin-top: 3px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.su-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.su-dir { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 12px; font: 800 15px var(--font-display); letter-spacing: .04em; }
.su-dir.buy { color: #3fe0a7; background: rgba(63,224,167,.10); box-shadow: inset 0 0 0 1px rgba(63,224,167,.45); }
.su-dir.sell { color: #ff6b6b; background: rgba(255,107,107,.10); box-shadow: inset 0 0 0 1px rgba(255,107,107,.45); }
.su-row .su-dir { padding: 4px 10px; font-size: 12.5px; }
.su-tag { padding: 6px 12px; border-radius: 12px; border: 1px solid var(--card-hairline); color: var(--text-dim); font-size: 12.5px; }
.su-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.su-levels > div { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--card-hairline); }
.su-levels small { display: block; color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.su-levels b { display: block; margin-top: 3px; font: 700 17px var(--font-trade, var(--font-ui)); }
.pos { color: #3fe0a7; } .neg { color: #ff6b6b; }
.su-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.su-code { color: var(--text-faint); font: 600 11.5px var(--font-trade, var(--font-ui)); }
.su-status { display: inline-flex; align-items: center; gap: 7px; font: 650 13px var(--font-ui); }
.su-status.live { color: #3fe0a7; } .su-status.win { color: #3fe0a7; } .su-status.loss { color: #ff6b6b; } .su-status.flat { color: var(--text-dim); }
.su-list { display: grid; gap: 8px; }
.su-row { padding: 12px 14px; }
.su-row .su-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; }
.su-row .su-name h3 { font-size: 15.5px; }
.su-row .su-grade { min-width: 44px; padding: 4px 6px; } .su-row .su-grade b { font-size: 16px; } .su-row .su-grade small { display: none; }
.su-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--text-dim); font-size: 12.5px; }
.su-mini b { color: var(--text); font-family: var(--font-trade, var(--font-ui)); }
.su-mini .su-status { margin-left: auto; font-size: 12px; }
.su-locked { display: grid; justify-items: center; gap: 8px; padding: 22px 18px; text-align: center; border-style: dashed; border-color: rgba(201,162,75,.4); }
.su-lock { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: rgba(201,162,75,.10); font-size: 22px; }
.su-locked h3 { margin: 0; font: 700 17px var(--font-display); }
.su-locked p { margin: 0; max-width: 320px; color: var(--text-dim); font-size: 13.5px; line-height: 1.45; }
.su-empty p { margin: 0; color: var(--text-dim); font-size: 13.5px; text-align: center; }

/* Chat room redesign (owner 2026-10-22 mockup) ------------------------------------------------------------------- */
.chat-context.chat-hero { margin: 10px 12px 4px; min-height: 64px; padding: 10px 12px; gap: 12px; border: 1px solid rgba(201,162,75,.35);
  border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, rgba(201,162,75,.14), transparent 60%), var(--surface); }
.chat-context.chat-hero > img { display: block; width: 44px; height: 44px; border-radius: 14px; box-shadow: 0 0 0 1px #eec46d66; }
.chat-context.chat-hero > div:first-of-type { display: block; min-width: 0; flex: 1; }
.chat-hero h2 { margin: 0; font: 700 16px/1.2 var(--font-display); color: var(--brand-hi, var(--brand)); }
.chat-hero h2, .chat-hero p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line next to the room picker */
.chat-context.chat-hero:has(#chat-room-select) > img { display: none; } /* owner: the room picker needs the logo's width */
.chat-hero h2::after { content: " \2714"; font-size: 11px; color: var(--brand-hi, var(--brand)); }
.chat-hero p { margin: 2px 0 0; color: var(--text-dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-hero .chat-status { padding: 6px 12px; border-radius: 999px; background: rgba(63,224,167,.10); box-shadow: inset 0 0 0 1px rgba(63,224,167,.4);
  color: #3fe0a7; font: 650 12.5px var(--font-ui); }
.chat-hero .chat-status-dot { background: #3fe0a7; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(201,162,75,.5); }
.bubble.user { background: rgba(201,162,75,.10); color: var(--text); border: 1px solid rgba(201,162,75,.55); font-weight: 500; }
.bubble.assistant { background: rgba(255,255,255,.035); }
.chat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px 12px 2px; }
.chat-tile { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border-radius: 14px; border: 1px solid rgba(201,162,75,.3);
  background: var(--surface); color: var(--text); font: 600 13px var(--font-ui); text-align: left; }
.chat-tile:active { background: rgba(201,162,75,.08); }
.chat-tile > span:nth-child(2) { flex: 1; min-width: 0; }
.ct-ico { font-size: 17px; } .ct-go { color: var(--text-faint); font-size: 18px; }
body.keyboard-open .chat-tiles { display: none; }
#chat-view.has-welcome .chat-tiles { display: none; }
.send-btn { border-radius: 14px; }
/* the setup card inside a chat message */
.bubble.bubble-setup { padding: 10px; }
.chat-setup, .bubble .su-card { margin-top: 8px; border: 1px solid rgba(201,162,75,.5); border-radius: 18px; padding: 12px;
  background: radial-gradient(140% 100% at 100% 0%, rgba(201,162,75,.14), transparent 55%), var(--surface); }
.cs-head { display: flex; align-items: center; gap: 10px; }
.cs-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 20px; flex: none; }
.cs-name { flex: 1; min-width: 0; } .cs-name b { display: block; font: 700 17px var(--font-display); } .cs-name small { color: var(--text-dim); font-size: 12px; }
.cs-grade { display: grid; justify-items: center; padding: 5px 9px; border-radius: 12px; border: 1px solid rgba(201,162,75,.55); }
.cs-grade b { font: 800 19px/1 var(--font-display); color: var(--brand-hi, var(--brand)); } .cs-grade small { margin-top: 3px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.cs-grade.none { border-style: dashed; opacity: .8; }
.cs-body { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "left pic" "lv lv"; gap: 10px; margin-top: 10px; }
.cs-left { grid-area: left; display: grid; gap: 6px; align-content: start; }
.cs-dir { padding: 6px 12px; border-radius: 10px; font: 800 15px var(--font-display); text-align: center; }
.cs-dir.buy { color: #3fe0a7; background: rgba(63,224,167,.10); box-shadow: inset 0 0 0 1px rgba(63,224,167,.5); }
.cs-dir.sell { color: #ff6b6b; background: rgba(255,107,107,.10); box-shadow: inset 0 0 0 1px rgba(255,107,107,.5); }
.cs-chip { padding: 5px 10px; border-radius: 10px; border: 1px solid var(--card-hairline); color: var(--text-dim); font-size: 12px; text-align: center; }
.cs-pic { grid-area: pic; width: 100%; height: 92px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--card-hairline); }
.cs-risk { fill: rgba(255,107,107,.28); } .cs-reward { fill: rgba(63,224,167,.22); }
.cs-entry { stroke: var(--brand-hi, #e8c36a); stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.cs-path { fill: none; stroke: #e8c36a; stroke-width: 1.6; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.cs-levels { grid-area: lv; display: grid; border: 1px solid var(--card-hairline); border-radius: 12px; overflow: hidden; }
.cs-level { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 13.5px; }
.cs-level + .cs-level { border-top: 1px solid rgba(255,255,255,.06); }
.cs-level span { color: var(--text-dim); } .cs-level b { font-family: var(--font-trade, var(--font-ui)); }
.cs-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px; border-radius: 12px;
  border: 1px solid rgba(201,162,75,.55); background: rgba(201,162,75,.06); color: var(--brand-hi, var(--brand)); font: 700 14px var(--font-ui); }
.cs-more.open span { transform: rotate(90deg); }
.cs-full { margin-top: 10px; }
.chat-hero .chat-status { display: inline-flex; align-items: center; gap: 6px; }


/* Account rows that fold open (two-factor, password, legal): the same icon tile and label as every other settings row. */
details.fold.fold-row > summary { justify-content: flex-start; gap: 12px; min-height: 64px; padding: 10px var(--sp-4); }
details.fold.fold-row > summary .sr-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: rgba(201,162,75,.10); box-shadow: inset 0 0 0 1px rgba(201,162,75,.16); color: var(--brand); }
details.fold.fold-row > summary .fold-label { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
