/* Brand visuals (brand book 05). Generated icon masks + watermark + hero band + characters. */
.bi-account { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-account.svg); mask-image: url(/brand/v3/icons/faheem-icon-account.svg); }
.bi-add-on { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-add-on.svg); mask-image: url(/brand/v3/icons/faheem-icon-add-on.svg); }
.bi-analysis { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-analysis.svg); mask-image: url(/brand/v3/icons/faheem-icon-analysis.svg); }
.bi-cash-flow { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-cash-flow.svg); mask-image: url(/brand/v3/icons/faheem-icon-cash-flow.svg); }
.bi-control { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-control.svg); mask-image: url(/brand/v3/icons/faheem-icon-control.svg); }
.bi-forecast { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-forecast.svg); mask-image: url(/brand/v3/icons/faheem-icon-forecast.svg); }
.bi-growth { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-growth.svg); mask-image: url(/brand/v3/icons/faheem-icon-growth.svg); }
.bi-ledger { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-ledger.svg); mask-image: url(/brand/v3/icons/faheem-icon-ledger.svg); }
.bi-payroll { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-payroll.svg); mask-image: url(/brand/v3/icons/faheem-icon-payroll.svg); }
.bi-period { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-period.svg); mask-image: url(/brand/v3/icons/faheem-icon-period.svg); }
.bi-report { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-report.svg); mask-image: url(/brand/v3/icons/faheem-icon-report.svg); }
.bi-statement { -webkit-mask-image: url(/brand/v3/icons/faheem-icon-statement.svg); mask-image: url(/brand/v3/icons/faheem-icon-statement.svg); }
.bi { display: inline-block; flex: none; background-color: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }

/* the monogram watermark: enlarged, cropped by its container, 4–7 % (the only graphic background in the brand) */
.wm { position: absolute; pointer-events: none; user-select: none; width: 560px; max-width: none; opacity: .05; inset-inline-end: -150px; bottom: -330px; }
.wm-brand { opacity: .04; }
:root[data-theme="dark"] .wm:not(.wm-brand) { opacity: .07; filter: invert(1) brightness(1.4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wm:not(.wm-brand) { opacity: .07; filter: invert(1) brightness(1.4); } }

/* characters */
.art { display: block; height: auto; user-select: none; pointer-events: none; }
.empty .empty-art { width: auto; height: 132px; margin: 0 auto 6px; }

/* emerald band (greeting / summary): content on the start side, watermark + character on the end side */
.hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; gap: var(--sp-5);
  min-height: 168px; padding: var(--sp-5) var(--sp-6); border-radius: var(--r-2); background: var(--brand-bg-2); color: var(--on-brand); }
.hero.compact { min-height: 120px; padding: var(--sp-4) var(--sp-5); }
.hero-in { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-self: center; }
.hero-k { font-size: 12px; letter-spacing: .06em; color: var(--champ); font-family: var(--font-la); text-transform: uppercase; }
html[lang="ar"] .hero-k { text-transform: none; letter-spacing: 0; font-family: var(--font-ar); }
.hero-t { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 800; color: var(--on-brand); text-wrap: balance; }
.hero-s { margin: 0; color: var(--on-brand-2); max-width: 62ch; }
.hero-a { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.hero-art { position: relative; z-index: 1; height: 190px; width: auto; margin-block: calc(var(--sp-5) * -1) calc(var(--sp-5) * -1); margin-inline-end: calc(var(--sp-3) * -1); }
.hero.compact .hero-art { height: 140px; margin-block: calc(var(--sp-4) * -1); }
@media (max-width: 640px) { .hero { padding: var(--sp-4); } .hero-art { display: none; } .hero-t { font-size: 21px; } }

/* ledger devices: the T-account split header and the total rules (brand 05.1) */
.t-acct { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--heading); }
.t-acct > * { padding: var(--sp-3) var(--sp-4); }
.t-acct > * + * { border-inline-start: 1px solid var(--line); }
.rule-sub { border-top: 1px solid var(--heading); }
.rule-total { border-bottom: 3px double var(--heading); }
.result-mark { border-bottom: 3px double var(--accent); padding-bottom: 1px; }

/* ---------------------------------------------------------------- shell additions (theme + language) */
.rail-top .mark { width: 30px; height: auto; flex: none; }
.rail-name { font-weight: 800; font-size: 18px; color: var(--on-brand); letter-spacing: .01em; }
html[lang="en"] .rail-name { font-family: var(--font-la); letter-spacing: .08em; font-size: 16px; }
.rail-top .surface-tag { margin-inline-start: auto; }
.prefs-pop { width: 260px; }
.prefs-b { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.prefs-l { font-size: 12px; color: var(--muted); margin-top: var(--sp-1); }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-1); background: var(--surface-2); border: 1px solid var(--line); }
.seg-opt { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 var(--sp-2);
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.seg-opt:hover { color: var(--text); }
.seg-opt.on { background: var(--surface); color: var(--heading); box-shadow: 0 1px 2px rgba(11, 42, 28, .12); }
.seg-opt[lang="en"], .seg-opt span:lang(en) { font-family: var(--font-la); }
#prefs-btn .i { width: 18px; height: 18px; }
/* sign-in: language + theme switches */
.au-prefs { display: flex; gap: var(--sp-2); margin-inline-start: auto; }
.au-pref { min-height: 34px; min-width: 34px; padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
  color: var(--heading); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.au-pref:hover { border-color: var(--heading); }
.au-pref[lang="en"] { font-family: var(--font-la); }
.au-pref[lang="ar"] { font-family: var(--font-ar); }

/* ---------------------------------------------------------------- the ledger-paper background (owner's request)
   Drawn from the brand's own ledger devices: faint ruled lines every 32px with a double margin rule on the start
   side, like an accountant's columnar paper. Behind the content only; cards stay plain. */
#main, .au-side {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, transparent calc(100% - 1px), var(--pattern-col) calc(100% - 1px)),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--pattern-line) 31px 32px);
  background-size: 96px 100%, 100% 32px;
  background-attachment: local;
}
html[dir="rtl"] #main, html[dir="rtl"] .au-side {
  background-image:
    linear-gradient(to left, transparent calc(100% - 1px), var(--pattern-col) calc(100% - 1px)),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--pattern-line) 31px 32px);
}
/* the rail: the monogram watermark at its foot (enlarged, cropped, 6 %) */
.rail { isolation: isolate; }
.rail::after { content: ''; position: absolute; z-index: -1; pointer-events: none; width: 300px; height: 290px; inset-inline-start: -70px; bottom: -90px;
  background: url(/brand/v3/mono-white.svg) center / contain no-repeat; opacity: .035; }
/* the sign-in brand panel keeps its watermark (core watermark()) and gets the same rules, in white */
.au-brand { position: relative; overflow: hidden; isolation: isolate;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(255, 255, 255, .035) 31px 32px); }
.au-brand > .wm { width: 620px; inset-inline-end: -160px; bottom: -200px; z-index: -1; }
.au-art { position: absolute; bottom: 0; inset-inline-end: 28px; height: min(46vh, 420px); width: auto; z-index: 0; pointer-events: none; }
@media (max-width: 1100px) { .au-art { display: none; } }

/* topbar: buttons never wrap; the search hint shortens instead (long English hints) */
.topbar .btn, .topbar .btn.sm, .fh-ask .btn { white-space: nowrap; flex: none; }
.topbar .search-btn { min-width: 0; }
.search-ph { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1280px) { .topbar #top-extras { display: none; } }
/* the band's text always reads on emerald, whatever page-level heading colours say */
.hero .hero-t, .hero h1, .hero h2, .hero h3 { color: var(--on-brand); }
.hero .hero-s, .hero p { color: var(--on-brand-2); }
.hero { background: var(--hero-bg, var(--brand-bg-2)); }

/* ---------------------------------------------------------------- export button (PDF · Excel) */
.xp { position: relative; display: inline-flex; }
.xp-btn .bi { width: 18px; height: 18px; }
.xp-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 40; min-width: 240px; padding: 6px; border-radius: var(--r-2);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px; }
.xp-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 0; border-radius: var(--r-1); background: transparent;
  color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.xp-item:hover, .xp-item:focus-visible { background: var(--surface-3); }
.xp-item b { font-family: var(--font-la); color: var(--heading); font-size: 14px; }
.xp-item span { font-size: 12px; color: var(--muted); }
.print-frame { position: fixed; width: 0; height: 0; border: 0; inset-inline-start: -9999px; bottom: 0; }

/* ---------------------------------------------------------------- team messages: presence on the avatar */
.dm-face { position: relative; display: inline-flex; flex: none; }
.dm-dot { position: absolute; bottom: 0; inset-inline-end: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--muted-2); border: 2px solid var(--surface); }
.dm-dot.on { background: var(--accent); }
.dm-face.big .cx-av { width: 40px; height: 40px; font-size: 16px; }
.dm-face.big .dm-dot { width: 13px; height: 13px; }
.dm-ci { align-items: center; }
.dm-state { color: var(--muted); }
.dm-state.on { color: var(--accent-text); font-weight: 700; }
.cx.dm { grid-template-columns: 300px minmax(0, 1fr); }
@media (max-width: 760px) { .cx.dm { grid-template-columns: minmax(0, 1fr); } }
.cx-none { padding: 16px; color: var(--muted); font-size: 13px; text-align: center; }
/* team messages: groups, reactions, typing, member picker, search misses */
.dm-gface { width: 36px; height: 36px; flex: none; border-radius: var(--r-2); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.dm-gface.team { background: var(--brand-bg-2); color: var(--on-brand); }
.dm-gface.big { width: 40px; height: 40px; }
.dm-new { margin-inline-start: auto; }
.dm-names { color: var(--muted); }
.dm-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dm-react { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; line-height: 1.6; }
.dm-react.mine { border-color: var(--accent); background: var(--accent-soft); }
.dm-react .num { font-size: 11px; color: var(--muted); }
.dm-react-pick { position: absolute; top: -44px; inset-inline-end: 0; display: flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 5; }
.dm-react-pick button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; cursor: pointer; }
.dm-react-pick button:hover { background: var(--surface-3); }
.cx-acts { position: relative; }
.dm-typing { display: flex; align-items: center; gap: 8px; padding: 4px 20px 8px; color: var(--muted); font-size: 12.5px; }
.dm-dots { display: inline-flex; gap: 3px; }
.dm-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dm-bounce 1s infinite ease-in-out; }
.dm-dots i:nth-child(2) { animation-delay: .15s; } .dm-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dm-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.dm-miss { opacity: .25; }
.dm-pick { max-height: 300px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r-1); }
.dm-pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.dm-pick-row:last-child { border-bottom: 0; }
.dm-pick-row .grow { display: flex; flex-direction: column; min-width: 0; }
.dm-pick-row:hover { background: var(--surface-3); }
#dm-chat.dragging { outline: 2px dashed var(--accent); outline-offset: -8px; }
/* topbar extras on one line, compact */
.topbar #top-extras { display: inline-flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.topbar #top-extras .btn { min-height: 36px; padding: 0 10px; font-size: 13px; }

/* ---------------------------------------------------------------- client channels grouped by company */
.cx-coblock { display: flex; flex-direction: column; border-bottom: 1px solid var(--line-2); }
.cx-co { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.cx-co:hover { background: var(--surface-3); }
.cx-co-av { width: 34px; height: 34px; flex: none; border-radius: var(--r-1); display: grid; place-items: center; background: var(--brand-bg-2); color: var(--on-brand); font-weight: 800; }
.cx-co-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cx-co-main b { color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-co-main > span { font-size: 12px; color: var(--muted); }
.cx-co-chev { color: var(--muted); transition: transform .15s; }
.cx-co.open .cx-co-chev { transform: rotate(180deg); }
.cx-co.open { background: var(--surface-2); }
.cx-co-items { display: flex; flex-direction: column; padding-inline-start: 8px; border-inline-start: 2px solid var(--accent-soft); margin-inline-start: 28px; margin-bottom: 6px; }
.cx-head-co { display: block; font-size: 12px; color: var(--accent-text); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-head-co b { color: var(--accent-text); }
.ct-row-off td { opacity: .55; }

/* ===================================================================== §10 motion (js/motion.js)
   One motion language: a soft rise on screen entry, a gliding pill under every active choice,
   press-down buttons, lifting cards, dialogs that pop in, a circular theme reveal. Brand colours only. */
:root { --fx-ease: cubic-bezier(.22, 1, .36, 1); }
.fx-has-pill { position: relative; isolation: isolate; }
.fx-pill { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; border-radius: var(--r-1);
  transition: transform .42s var(--fx-ease), width .42s var(--fx-ease), height .42s var(--fx-ease); will-change: transform; }
.fx-pill.seg { background: var(--surface); box-shadow: 0 1px 2px rgba(11, 42, 28, .12), 0 4px 12px -6px rgba(11, 42, 28, .25); }
.fx-has-pill > .seg-opt.on, .ct-seg.fx-has-pill > button.on, .tm-seg.fx-has-pill > button.on { background: transparent; box-shadow: none; }
.fx-pill.nav { background: var(--brand-bg-3); }
.fx-pill.nav::before { content: ""; position: absolute; inset-inline-start: -14px; top: 8px; bottom: 8px; width: 3px; border-start-end-radius: 3px; border-end-end-radius: 3px; background: var(--accent); }
.rail-nav.fx-has-pill .nav-item.on { background: transparent; }
.rail-nav.fx-has-pill .nav-item.on::before { display: none; }
.fx-pill.line { border-radius: 0; border-bottom: 2px solid var(--accent); }
.ct-tabs.fx-has-pill > a.on { border-color: transparent; }
.seg-opt, .ct-seg button, .tm-seg button, .nav-item { transition: color .25s var(--fx-ease); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .ct-btn, .icon-btn, .tm-kadd, .seg-opt, .ct-seg button, .tm-seg button, .tm-check, .tm-tbtn {
    transition: transform .18s var(--fx-ease), background-color .2s, color .2s, box-shadow .25s var(--fx-ease), border-color .2s; }
  .btn:active:not(:disabled), .ct-btn:active:not(:disabled), .icon-btn:active:not(:disabled), .tm-kadd:active, .seg-opt:active, .ct-seg button:active, .tm-seg button:active, .tm-check:active, .tm-tbtn:active { transform: scale(.96); }
  .btn.primary:hover:not(:disabled), .ct-btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px -10px var(--accent); }
  .nav-item { transition: color .25s var(--fx-ease), background-color .25s, padding .25s var(--fx-ease); }
  .nav-item:hover { padding-inline-start: 14px; }
  .tm-kcard, .ct-pr, .ct-int, .cx-coblock { transition: transform .3s var(--fx-ease), box-shadow .3s var(--fx-ease), border-color .3s; }
  .tm-kcard:hover, .ct-int:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(11, 42, 28, .45); border-color: var(--brand-rule); }
  .modal { animation: fx-fade .25s ease-out; }
  .modal > .card { animation: fx-pop .42s var(--fx-ease); }
  .toast { animation: fx-pop .35s var(--fx-ease); }
}
@keyframes fx-fade { from { opacity: 0; } }
@keyframes fx-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }
/* the theme switch: a circle grows from the click (core.js setPrefs) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ===================================================================== §11 departments (FAHEEM Solutions)
   finance = brand green, marketing = champagne; the owner's control room switches between both and one. */
.rail-name small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--champ, #c9a96e); opacity: .9; margin-top: -2px; }
.rail-dept { display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 4px; }
.rail-dept-l { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--on-brand-2); text-transform: uppercase; }
.rail-dept-v { font-size: 13px; color: var(--on-brand); padding: 7px 10px; border-radius: var(--r-1); background: var(--brand-bg-2); border: 1px solid var(--brand-rule); }
.rail-seg { background: var(--brand-bg-2); border-color: var(--brand-rule); }
.rail-seg .seg-opt { color: var(--on-brand-2); min-height: 32px; font-size: 12.5px; }
.rail-seg .seg-opt.on, .rail-seg .seg-opt:hover { color: var(--on-brand); }
.rail-seg .fx-pill.seg { background: var(--brand-bg-3); box-shadow: inset 0 0 0 1px var(--accent); }
.rail-seg > .seg-opt.on { background: var(--brand-bg-3); }
.rail-seg.fx-has-pill > .seg-opt.on { background: transparent; }
.ct-line { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; white-space: nowrap; }
.ct-line.finance { background: var(--accent-soft, rgba(46, 125, 82, .12)); color: var(--accent-text); }
.ct-line.marketing { background: color-mix(in srgb, var(--chart-2) 16%, transparent); color: var(--heading); }
.ct-dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.ct-dept { border-top: 3px solid var(--accent); }
.ct-dept.marketing { border-top-color: var(--chart-2); }
.ct-dept-hero { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 6px; }
.ct-dept-mrr { font: 600 28px/1.15 var(--font-fig); color: var(--heading); letter-spacing: -.01em; }
.ct-dept-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 6px 16px 14px; }
.ct-dept-r { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; min-width: 0; }
.ct-dept-r span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-mx .sc.ln { background: var(--accent-soft, rgba(46, 125, 82, .12)); color: var(--accent-text); }
@media (max-width: 520px) { .ct-dept-rows { grid-template-columns: 1fr; } }
.au-solutions { align-self: flex-start; margin-top: -12px; font-size: 13px; font-weight: 700; letter-spacing: .32em; color: var(--champ); text-transform: uppercase; }
/* motion follows the person (js/motion.js): a redraw nobody asked for plays no transition */
.fx-quiet *, .fx-quiet *::before, .fx-quiet *::after { transition: none !important; }

/* ===================================================================== §12 marketing hub (js/mkt.js)
   Brand palette only: favourable = accent green, unfavourable = clay (never red); platform badges stay neutral. */
.mk-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.mk-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 2px 0 4px; }
.mk-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.mk-pill:hover { border-color: var(--accent); }
.mk-pill.on { background: var(--brand-bg-3, #0B2A1C); border-color: var(--brand-bg-3, #0B2A1C); color: var(--on-brand); }
.mk-pill .xs { opacity: .7; }
.mk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.mk-dot.warn { background: var(--attn); } .mk-dot.crit { background: var(--unfav); }
.mk-pf { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--heading); font: 700 10.5px/1 var(--font-fig); letter-spacing: .02em; flex: none; }
.mk-th { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mk-table td { vertical-align: middle; }
.mk-cl { display: flex; flex-direction: column; text-decoration: none; color: var(--heading); margin-bottom: 4px; }
.mk-cell { white-space: nowrap; }
.mk-cell b { margin-inline-end: 6px; }
.mk-delta { font: 600 11.5px/1 var(--font-fig); color: var(--muted); white-space: nowrap; }
.mk-delta.up { color: var(--accent-text); } .mk-delta.down { color: var(--unfav); }
.mk-state { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mk-card { padding: 14px; gap: 10px; }
.mk-card.off { opacity: .62; border-style: dashed; }
.mk-card-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-card-h .grow { display: flex; flex-direction: column; min-width: 0; }
.mk-card-h .ct-link { display: inline-flex; align-items: center; gap: 4px; }
.mk-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.mk-big .xs { width: 100%; }
.mk-big b { font: 600 26px/1.1 var(--font-fig); color: var(--heading); letter-spacing: -.01em; }
.mk-big .mk-spark { margin-inline-start: auto; align-self: center; }
.mk-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.mk-mini dt { font-size: 11.5px; color: var(--muted); }
.mk-mini dd { margin: 2px 0 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.mk-mini dd b { font: 600 15px/1.2 var(--font-fig); color: var(--heading); }
.mk-goals { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; }
.mk-goal-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.mk-bar { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--surface-3, #E9EEEB); }
.mk-bar > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); transition: width .5s var(--fx-ease, ease); }
.mk-bar > i.warn { background: var(--attn); }
.mk-pace { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-inline-start: -1px; background: var(--heading); opacity: .55; border-radius: 2px; }
.mk-ai { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.mk-ai-sum { margin: 0; font-size: 14px; line-height: 1.7; color: var(--heading); }
.mk-ai-sec h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.mk-ai-al { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-1); background: var(--surface-2); border-inline-start: 3px solid var(--line); margin-bottom: 6px; font-size: 13px; }
.mk-ai-al.crit { border-inline-start-color: var(--unfav); } .mk-ai-al.warn { border-inline-start-color: var(--attn); }
.mk-ai-al span { color: var(--muted); font-size: 12px; }
.mk-recs { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; }
.mk-recs li { font-size: 13px; }
.mk-recs p { margin: 2px 0 0; }
.mk-rec-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-ai-card .ct-card-h h3 .i { color: var(--accent-text); }
.mk-ai-btn.busy { opacity: .7; pointer-events: none; }
.mk-ai-btn.busy .i { animation: mk-spin 1s linear infinite; }
@keyframes mk-spin { to { transform: rotate(360deg); } }
.mk-reps { display: flex; flex-direction: column; }
.mk-rep { padding: 10px 16px; border-bottom: 1px solid var(--line-2, var(--line)); }
.mk-rep:last-child { border-bottom: 0; }
.mk-rep p { margin: 4px 0 0; }
.mk-rep-h { display: flex; justify-content: space-between; gap: 10px; }
.mk-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.mk-check-grid .check, .mk-entry .check { display: flex; align-items: center; gap: 8px; }
.mk-entry { max-height: 52vh; }
.mk-entry th { white-space: nowrap; font-size: 12px; }
.mk-entry tbody th { text-align: start; }
.mk-entry tbody th .xs { display: block; font-weight: 400; }
.mk-in { width: 92px; min-width: 72px; text-align: center; }
.mk-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mk-mine-c { padding: 14px; gap: 10px; }
.mk-mine-c .row { display: flex; gap: 8px; flex-wrap: wrap; }
.tm-priv { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.tm-lock { display: inline-flex; color: var(--muted); margin-inline-end: 4px; vertical-align: -2px; }
@media (max-width: 560px) { .mk-big b { font-size: 22px; } .mk-in { width: 70px; } }
.mk-delta { direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* platform marks (js/platforms.js): the brand's own colour on a soft tile, theme-aware for the black marks */
.mk-pf { position: relative; width: 28px; height: 28px; min-width: 28px; padding: 0; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--heading); box-shadow: 0 1px 2px rgba(11, 42, 28, .08); }
.mk-pf.lg { width: 36px; height: 36px; min-width: 36px; border-radius: 10px; }
.mk-pf .pf-mark { display: block; }
.mk-pf.pf-snapchat, .mk-pf.pf-snap_ads { border-color: #E6E200; }
.mk-pf.ads::after { content: "AD"; position: absolute; inset-inline-end: -6px; bottom: -5px; padding: 0 3px; border-radius: 4px; background: var(--heading); color: var(--surface); font: 700 8px/12px var(--font-fig); letter-spacing: .03em; }
.mk-th .mk-pf { width: 24px; height: 24px; min-width: 24px; border-radius: 7px; }
.mk-th .mk-pf .pf-mark { width: 14px; height: 14px; }
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ===================================================================== §13 profile photos (src/photos.js) */
.has-photo { position: relative; color: transparent !important; background: var(--surface-2) !important; overflow: visible; }
.has-photo > img.av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.has-photo > i, .has-photo > .pres { z-index: 1; }
.avatar.photo-xl { width: 128px; height: 128px; font-size: 46px; box-shadow: 0 10px 30px -14px rgba(11, 42, 28, .5); }
.avatar.photo-md { width: 56px; height: 56px; font-size: 20px; }
.photo-box { display: grid; place-items: center; padding: 6px 0 8px; }
.ct-photo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ct-photo-btn { all: unset; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--muted); }
.ct-photo-btn:hover .avatar { box-shadow: 0 0 0 3px var(--accent-soft-2, rgba(46, 125, 82, .25)); }
.rail-photo, .tm-photo, .pt-photo { all: unset; position: relative; cursor: pointer; border-radius: 50%; display: inline-flex; }
.rail-photo:focus-visible, .tm-photo:focus-visible, .pt-photo:focus-visible, .ct-photo-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tm-photo-ed { position: absolute; inset-inline-end: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff); border: 2px solid var(--surface); }
.tm-me .grow .btn { margin-top: 6px; align-self: flex-start; }

