/* Jarapass Field Ops — application styles.
   Tokens: css/tokens.css (from Architecture/DESIGN.md). Layout grammar: admin-webapp-layout skill.
   Rule: no raw hex below except the brand constants already named in tokens. */

@font-face{font-family:CD;src:url('/assets/fonts/ClashDisplay-Semibold.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:CD;src:url('/assets/fonts/ClashDisplay-Bold.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:SA;src:url('/assets/fonts/Satoshi-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:SA;src:url('/assets/fonts/Satoshi-Medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:SA;src:url('/assets/fonts/Satoshi-Bold.woff2') format('woff2');font-weight:700;font-display:swap}

svg{width:20px;height:20px;flex:0 0 auto}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--accent-text)}
html,body{overflow-x:clip}
body{font-family:SA,system-ui,sans-serif;background:var(--surface-page);color:var(--text-primary);
  font-feature-settings:"tnum" 1;-webkit-font-smoothing:antialiased;min-height:100vh}
:focus-visible{outline:2px solid var(--accent-surface);outline-offset:2px}
[hidden]{display:none!important}

/* ---------- type ---------- */
.h1{font-family:CD;font-weight:600;font-size:clamp(26px,2.6vw,36px);line-height:1.05;letter-spacing:-.025em}
.h2{font-family:CD;font-weight:600;font-size:20px;line-height:26px;letter-spacing:-.015em}
.h3{font-weight:700;font-size:15.5px;line-height:21px}
.fig{font-family:CD;font-weight:600;font-size:30px;line-height:34px;letter-spacing:-.025em}
.body{font-size:14.5px;line-height:22px}
.strong{font-weight:700;font-size:14.5px}
.label{font-weight:700;font-size:10.5px;line-height:15px;letter-spacing:.1em;text-transform:uppercase}
.cap{font-weight:500;font-size:12.5px;line-height:17px}
.dim{color:var(--text-secondary)}
.ellip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

/* ---------- layout primitives ---------- */
.stack{display:flex;flex-direction:column}
.row{display:flex;align-items:center;gap:10px}
.between{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wrap{flex-wrap:wrap}
.g4{gap:4px}.g6{gap:6px}.g8{gap:8px}.g10{gap:10px}.g12{gap:12px}.g16{gap:16px}.g20{gap:20px}
.mt4{margin-top:4px}.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt20{margin-top:20px}.mt24{margin-top:24px}
.grow{flex:1;min-width:0}

.card{background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:18px;box-shadow:var(--shadow-card)}
.pad{padding:18px}
.pad-l{padding:22px}
.sunken{background:var(--surface-sunken);border-radius:14px}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;
  border-radius:999px;border:0;font-weight:700;font-size:14.5px;background:var(--accent-surface);
  color:var(--accent-on-surface);white-space:nowrap;text-decoration:none}
.btn.block{width:100%}
.btn.sm{min-height:38px;padding:0 15px;font-size:13.5px}
.btn.ghost{background:var(--surface-sunken);color:var(--text-primary)}
.btn.ink{background:var(--hero-bg);color:var(--hero-fg)}
.btn.line{background:transparent;color:var(--text-primary);box-shadow:inset 0 0 0 1.5px var(--border-subtle)}
.btn.danger{background:transparent;color:var(--state-danger);box-shadow:inset 0 0 0 1.5px currentColor}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn svg{width:18px;height:18px}
.link{background:none;border:0;font-weight:700;font-size:14px;color:var(--accent-text);padding:0}
.icobtn{width:40px;height:40px;border-radius:50%;border:1px solid var(--border-subtle);background:var(--surface-card);
  display:grid;place-items:center;color:var(--text-primary);flex:0 0 40px;position:relative}
.icobtn svg{width:19px;height:19px}
.icobtn .badge{position:absolute;top:-3px;right:-3px;min-width:17px;height:17px;border-radius:9px;background:var(--sun-500);
  color:var(--ink-900);font-size:10px;font-weight:700;display:grid;place-items:center;padding:0 4px}

/* ---------- pills ---------- */
.pill{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 10px;font-size:11px;
  font-weight:700;white-space:nowrap;color:var(--ink-900);line-height:15px}
.pill.ghost{background:transparent;box-shadow:inset 0 0 0 1px var(--border-subtle);color:var(--text-secondary)}
.pill.lime{background:var(--lime-500)}
.pill.sun{background:var(--sun-500)}
.pill.lilac{background:var(--lilac-500)}
.pill.ink{background:var(--hero-bg);color:var(--hero-fg)}
.pill.danger{background:color-mix(in srgb,var(--state-danger) 14%,transparent);color:var(--state-danger)}
.pill.cat{background:var(--c)}
[data-theme="dark"] .pill.cat{background:color-mix(in srgb,var(--c) 22%,transparent);color:var(--c);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c) 40%,transparent)}
.dot{width:8px;height:8px;border-radius:50%;flex:0 0 8px;display:inline-block}
.dot.prospect{background:var(--ink-300)}.dot.pitched{background:var(--sun-500)}.dot.agreed{background:var(--lilac-500)}
.dot.onboarded{background:var(--cat-hotels)}.dot.live{background:var(--lime-500);box-shadow:0 0 0 2px var(--hero-bg)}
.dot.declined{background:var(--state-danger)}
.dot.contacted{background:var(--ink-500)}.dot.meeting{background:var(--lime-deep)}
.dropcol.over{outline:2px dashed var(--lime-deep);outline-offset:-2px}
[draggable=true]{cursor:grab}

/* ---------- forms ---------- */
label.f{display:block;margin-bottom:15px}
label.f:last-child{margin-bottom:0}
.lb{display:block;font-weight:700;font-size:13.5px;margin-bottom:6px}
.hint{display:block;font-size:12.5px;line-height:18px;color:var(--text-secondary);margin:-2px 0 7px}
input[type=text],input[type=email],input[type=password],input[type=tel],input[type=date],input[type=datetime-local],
input[type=number],input[type=search],input[type=url],textarea,select{
  width:100%;max-width:100%;padding:12px 14px;border:1px solid var(--border-subtle);border-radius:12px;
  font-size:16px;background:var(--surface-page);color:var(--text-primary);min-height:46px}
textarea{min-height:92px;resize:vertical;line-height:21px}
input:focus,textarea:focus,select:focus{outline:2px solid var(--accent-surface);outline-offset:1px;border-color:transparent}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
@media(max-width:640px){.two,.three{grid-template-columns:1fr}}
.err{color:var(--state-danger);font-size:13px;font-weight:700;min-height:18px}
.check{display:flex;gap:11px;align-items:flex-start;font-size:14px;line-height:20px;cursor:pointer}
.check input{width:20px;height:20px;flex:0 0 20px;margin-top:1px;accent-color:var(--lime-500)}

.note{border-radius:14px;padding:13px 15px;font-size:13.5px;line-height:20px}
.note.warn{background:color-mix(in srgb,var(--sun-500) 13%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sun-500) 40%,transparent)}
.note.ok{background:color-mix(in srgb,var(--lime-500) 20%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--lime-500) 55%,transparent)}
.note.info{background:var(--surface-sunken)}

/* ================= AUTH: the pass ================= */
.auth{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}
.auth-art{background:var(--hero-bg);color:var(--hero-fg);position:relative;overflow:hidden;padding:44px 52px;
  display:flex;flex-direction:column;justify-content:space-between}
.auth-art::before{content:"";position:absolute;inset:0;
  background-image:linear-gradient(rgba(250,248,243,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(250,248,243,.045) 1px,transparent 1px);
  background-size:48px 48px;mask-image:radial-gradient(circle at 30% 40%,#000 0,transparent 75%)}
.auth-art > *{position:relative}
.auth-art .logo{height:30px;width:auto;align-self:flex-start}
.auth-art .big{font-family:CD;font-weight:600;font-size:clamp(38px,4.6vw,64px);line-height:.98;letter-spacing:-.035em;max-width:11ch}
.auth-art .big em{font-style:normal;color:var(--lime-500)}
.auth-art .sub{color:var(--hero-dim);font-size:15px;line-height:23px;max-width:40ch;margin-top:18px}
/* the pass card: a notched rounded rectangle, the brand's own object */
.passcard{width:min(360px,80%);aspect-ratio:1.62;border-radius:22px;background:var(--lime-500);color:var(--ink-900);
  padding:22px 24px;display:flex;flex-direction:column;justify-content:space-between;position:relative;
  transform:rotate(-6deg);box-shadow:18px 22px 0 -2px rgba(200,240,47,.16);margin:34px 0 10px 14px}
.passcard::after{content:"";position:absolute;right:-17px;top:50%;width:34px;height:34px;border-radius:50%;
  background:var(--hero-bg);transform:translateY(-50%)}
.passcard .k{font-weight:700;font-size:10.5px;letter-spacing:.14em;text-transform:uppercase}
.passcard .n{font-family:CD;font-weight:600;font-size:26px;letter-spacing:-.02em}
.passcard .row{justify-content:space-between}
.auth-art .foot{font-size:12px;color:var(--hero-dim)}
.auth-form{display:flex;align-items:center;justify-content:center;padding:40px 28px}
.auth-box{width:100%;max-width:400px}
.auth-box .h1{margin:6px 0 8px}
.auth-steps{display:flex;gap:6px;margin-bottom:22px}
.auth-steps i{flex:1;height:4px;border-radius:9px;background:var(--border-subtle)}
.auth-steps i.on{background:var(--lime-500)}.auth-steps i.done{background:var(--accent-text)}
@media(max-width:900px){
  .auth{grid-template-columns:1fr}
  .auth-art{padding:26px 22px 28px;min-height:auto}
  .auth-art .big{font-size:34px}
  .passcard{display:none}
  .auth-form{padding:28px 18px 40px}
}
.terms{max-height:46vh;overflow:auto;padding:18px 18px 8px;background:var(--surface-card);border:1px solid var(--border-subtle);
  border-radius:16px;font-size:13.5px;line-height:21px}
.terms h4{font-family:CD;font-weight:600;font-size:15px;margin:14px 0 4px}
.terms h4:first-child{margin-top:0}
.terms p,.terms li{margin-bottom:6px}
.terms ul{padding-left:18px}
.qr{width:184px;height:184px;background:#fff;border-radius:16px;padding:10px;display:grid;place-items:center}
.qr svg{width:100%;height:100%}
.code-input{font-family:CD;font-size:30px!important;letter-spacing:.3em;text-align:center}
.secret{font-family:ui-monospace,Menlo,monospace;font-size:13px;word-break:break-all;background:var(--surface-sunken);
  border-radius:10px;padding:10px 12px}

/* ================= SHELL ================= */
.shell{display:flex;min-height:100vh}
.rail{width:68px;flex:0 0 68px;background:var(--nav-bg);color:var(--hero-fg);border-radius:22px;margin:12px 0 12px 12px;
  padding:14px 0;display:flex;flex-direction:column;align-items:center;gap:6px;position:sticky;top:12px;
  height:calc(100vh - 24px);z-index:40}
.rail .mark{width:34px;height:auto;margin-bottom:14px}
.rail button,.rail a{width:44px;height:44px;border-radius:14px;border:0;background:none;display:grid;place-items:center;
  color:var(--hero-dim);position:relative}
.rail button:hover{color:var(--hero-fg)}
.rail [aria-current="page"]{background:var(--lime-500);color:var(--ink-900)}
.rail svg{width:21px;height:21px}
.rail .badge{position:absolute;top:4px;right:4px;width:8px;height:8px;border-radius:50%;background:var(--sun-500)}
.rail .sep{width:26px;height:1px;background:rgba(250,248,243,.12);margin:6px 0}
.rail .foot{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:8px}
.av{width:38px;height:38px;border-radius:50%;background:var(--lime-500);color:var(--ink-900);display:grid;place-items:center;
  font-family:CD;font-weight:700;font-size:13.5px;flex:0 0 auto;border:0}
.av.sm{width:30px;height:30px;font-size:11px}
.av.lg{width:64px;height:64px;font-size:22px}
.av.ink{background:var(--hero-bg);color:var(--lime-500)}
.avstack{display:flex}.avstack .av{box-shadow:0 0 0 2px var(--surface-card)}.avstack .av+.av{margin-left:-8px}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.top{display:flex;align-items:center;gap:12px;padding:16px 22px 12px;position:sticky;top:0;z-index:30;
  background:color-mix(in srgb,var(--surface-page) 88%,transparent);backdrop-filter:blur(10px)}
.top .brandm{display:none;height:22px}
.pills{display:flex;gap:4px;background:var(--surface-sunken);border-radius:999px;padding:4px;overflow-x:auto;scrollbar-width:none;max-width:100%}
.pills::-webkit-scrollbar{display:none}
.pills button{border:0;background:none;border-radius:999px;padding:8px 14px;font-weight:700;font-size:13px;
  color:var(--text-secondary);white-space:nowrap;display:flex;align-items:center;gap:7px}
.pills button[aria-pressed="true"]{background:var(--hero-bg);color:var(--hero-fg)}
.pills .n{background:color-mix(in srgb,var(--text-primary) 9%,transparent);border-radius:999px;padding:1px 7px;font-size:11px}
.pills button[aria-pressed="true"] .n{background:var(--lime-500);color:var(--ink-900)}
.top .utils{margin-left:auto;display:flex;gap:8px;align-items:center}
.search{position:relative;width:min(300px,30vw)}
.search input{padding-left:38px;min-height:40px;border-radius:999px;background:var(--surface-card);font-size:14px}
.search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--text-secondary)}

.content{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;padding:4px 22px 32px;align-items:start;flex:1}
.content.full{grid-template-columns:minmax(0,1fr)}
.ctx{display:flex;flex-direction:column;gap:12px;position:sticky;top:78px}
@media(max-width:1280px){.content{grid-template-columns:minmax(0,1fr) 290px}}
@media(max-width:1080px){.content{grid-template-columns:minmax(0,1fr)}.ctx{position:static}}

.phead{display:flex;align-items:center;gap:22px;flex-wrap:wrap;margin:6px 0 20px}
.phead .back{width:42px;height:42px}
.kpi{display:flex;align-items:center;gap:10px}
.kpi .ic{width:38px;height:38px;border-radius:50%;background:var(--surface-card);border:1px solid var(--border-subtle);display:grid;place-items:center}
.kpi .ic svg{width:17px;height:17px}
.kpi .n{font-family:CD;font-weight:600;font-size:21px;letter-spacing:-.02em;line-height:1}
.kpi .l{font-size:11.5px;color:var(--text-secondary);line-height:1.3;max-width:15ch;margin-top:3px}
.phead .act{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}

.band{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:22px;padding:20px 22px}
.band .l{font-size:12px;color:var(--text-secondary)}
.band .v{font-family:CD;font-weight:600;font-size:28px;letter-spacing:-.025em;margin-top:6px}

/* bento */
.bento{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.tile{border-radius:20px;padding:18px;min-height:118px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.tile.w2{grid-column:span 2}
.tile.ink{background:var(--hero-bg);color:var(--hero-fg)}
.tile.lime{background:var(--lime-500);color:var(--ink-900)}
.tile.lilac{background:var(--lilac-500);color:var(--ink-900)}
.tile.sun{background:var(--sun-500);color:var(--ink-900)}
.tile.plain{background:var(--surface-card);border:1px solid var(--border-subtle);box-shadow:var(--shadow-card)}
.tile .fig{font-size:34px;line-height:36px}
.tile .go{position:absolute;top:14px;right:14px;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;
  background:color-mix(in srgb,currentColor 12%,transparent)}
.tile .go svg{width:15px;height:15px}
@media(max-width:900px){.bento{grid-template-columns:1fr 1fr}}
.pbar{display:block;height:6px;border-radius:9px;background:color-mix(in srgb,currentColor 16%,transparent);overflow:hidden;margin-top:9px}
.pbar span{display:block;height:100%;border-radius:9px;background:var(--lime-500)}
.tile.lime .pbar span{background:var(--ink-900)}

/* lists */
.list{display:flex;flex-direction:column}
.li{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--border-subtle);background:none;border-left:0;border-right:0;border-bottom:0;text-align:left;width:100%}
.li:first-child{border-top:0}
button.li:hover{background:var(--surface-sunken)}
.empty{padding:26px 20px;text-align:center;color:var(--text-secondary);font-size:14px;line-height:21px}
.empty b{display:block;color:var(--text-primary);font-size:15px;margin-bottom:4px}

table.t{width:100%;border-collapse:collapse;font-size:13.5px}
table.t th{text-align:left;font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-secondary);padding:10px 14px;font-weight:700;border-bottom:1px solid var(--border-subtle)}
table.t td{padding:11px 14px;border-bottom:1px solid var(--border-subtle);vertical-align:middle}
table.t tr:last-child td{border-bottom:0}
.tablewrap{overflow-x:auto}

/* sheet / dialog */
dialog.sheet{margin:auto;border:0;border-radius:24px;padding:0;max-width:min(560px,94vw);width:100%;background:var(--surface-raised);color:var(--text-primary);
  box-shadow:0 30px 80px rgba(11,14,9,.35)}
dialog.sheet::backdrop{background:rgba(11,14,9,.45);backdrop-filter:blur(3px)}
dialog.sheet .sh-h{padding:20px 22px 0;display:flex;justify-content:space-between;align-items:center}
dialog.sheet .sh-b{padding:16px 22px 22px;max-height:70vh;overflow:auto}

.toast{position:fixed;left:16px;right:16px;bottom:24px;max-width:460px;margin:0 auto;z-index:100;background:var(--hero-bg);
  color:var(--hero-fg);border-radius:14px;padding:13px 16px;font-size:14px;font-weight:500;opacity:0;transform:translateY(8px);
  transition:all .18s cubic-bezier(.2,0,0,1);pointer-events:none}
.toast.show{opacity:1;transform:none}
.toast.bad{background:var(--state-danger);color:#fff}

/* mobile: rail becomes a floating pill bar */
@media(max-width:760px){
  .shell{display:block;padding-bottom:92px}
  .rail{position:fixed;left:12px;right:12px;bottom:12px;top:auto;width:auto;height:62px;flex-direction:row;justify-content:space-around;
    margin:0;padding:0 6px;border-radius:999px;box-shadow:0 12px 32px rgba(11,14,9,.32)}
  .rail .mark,.rail .sep,.rail .desk{display:none}
  /* five sections in view, the rest a swipe away (Samuel, 12 Oct) */
  .rail{justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .rail::-webkit-scrollbar{display:none}
  .rail .foot{display:contents}
  .rail>a,.rail .foot>a{flex:0 0 calc((100% - 0px)/5);scroll-snap-align:start;display:flex;justify-content:center;align-items:center}
  .top{padding:12px 14px}
  .top .brandm{display:block}
  .search{display:none}
  .content{padding:2px 14px 24px}
  .phead{gap:14px}
  .toast{bottom:88px}
}
@media (prefers-reduced-motion:reduce){*{transition-duration:.001ms!important;animation-duration:.001ms!important}}
.pills:empty{display:none}
svg.big{width:34px;height:34px}
/* agreement text, shared look with the signing page */
.agreement{font-size:14.5px;line-height:23px}
.agreement h3{font-family:CD;font-weight:600;font-size:17px;margin:20px 0 6px}
.agreement h3:first-child{margin-top:0}
.agreement p{margin:6px 0}
.agreement ul{padding-left:20px;margin:6px 0}.agreement li{margin:4px 0}
.agreement table.kv{border-collapse:collapse;margin:8px 0}.agreement table.kv td{padding:4px 18px 4px 0;font-size:13.5px}
.agreement table.kv td:first-child{color:var(--text-secondary)}.agreement table.kv td:last-child{font-weight:700}
/* forms sit in one centred column; paired fields line up on their inputs */
.formcol{max-width:860px;margin:0 auto}
.two,.three{align-items:stretch}
.two>label.f,.three>label.f{display:flex;flex-direction:column;margin-bottom:0}
.two,.three{margin-bottom:15px}.two:last-child,.three:last-child{margin-bottom:0}
.two>label.f>input,.two>label.f>select,.three>label.f>input,.three>label.f>select{margin-top:auto}
@media(max-width:860px){.docgrid{grid-template-columns:1fr!important}}
/* chat */
.chatgrid{display:grid;grid-template-columns:250px minmax(0,1fr);gap:16px}
.chatpane{display:flex;flex-direction:column;height:calc(100vh - 210px);min-height:420px;overflow:hidden}
.msgs{flex:1;min-height:0;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:10px}
.msg{display:flex;gap:10px;align-items:flex-end;max-width:78%}
.msg.grouped{margin-top:-6px;padding-left:40px}
.msg.me{align-self:flex-end;flex-direction:row-reverse}
.msg.me.grouped{padding-left:0}
.bubblewrap{display:flex;flex-direction:column;gap:5px;min-width:0}
.msg.me .bubblewrap{align-items:flex-end}
.bubble{background:var(--surface-sunken);border-radius:18px 18px 18px 6px;padding:10px 14px;font-size:14.5px;line-height:21px;white-space:pre-wrap;word-break:break-word}
.msg.me .bubble{background:var(--lime-500);color:var(--ink-900);border-radius:18px 18px 6px 18px}
.mcard{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;background:var(--surface-card);box-shadow:inset 0 0 0 1px var(--border-subtle);text-decoration:none;color:inherit;min-width:240px;max-width:340px}
.composer{border-top:1px solid var(--border-subtle);padding:12px;display:flex;flex-direction:column;gap:8px}
@media(max-width:860px){.chatgrid{grid-template-columns:1fr}.chatgrid>nav{display:flex;overflow-x:auto;gap:4px}.chatgrid>nav .label{display:none}.chatgrid>nav .li{width:auto;flex:0 0 auto}.chatpane{height:calc(100vh - 300px)}.msg{max-width:92%}}
.qgrid{display:grid;grid-template-columns:2fr 2fr 1.3fr 1.3fr auto;gap:10px;align-items:center}
@media(max-width:900px){.qgrid{grid-template-columns:1fr}}
#qerr:empty{display:none}
/* notification-style rows (activity feed + bell) */
.feed{display:flex;flex-direction:column;gap:8px}
.fi{display:flex;align-items:flex-start;gap:11px;padding:11px 12px;border-radius:16px;background:var(--surface-sunken);
  text-decoration:none;color:inherit;transition:background .15s}
.fi:hover{background:color-mix(in srgb,var(--surface-sunken) 70%,var(--border-subtle))}
.fi.unread{background:color-mix(in srgb,var(--lime-500) 16%,var(--surface-card));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--lime-500) 45%,transparent)}
.fic{width:34px;height:34px;flex:0 0 34px;border-radius:12px;display:grid;place-items:center;background:var(--surface-card);
  box-shadow:inset 0 0 0 1px var(--border-subtle);color:var(--text-primary)}
.fic svg{width:16px;height:16px}
.fic.lime{background:var(--lime-500);color:var(--ink-900);box-shadow:none}
.fic.ink{background:var(--hero-bg);color:var(--lime-500);box-shadow:none}
.fic.sun{background:var(--sun-500);color:var(--ink-900);box-shadow:none}
.fic.lilac{background:var(--lilac-500);color:var(--ink-900);box-shadow:none}
.ft{display:block;font-size:13.5px;line-height:18px}
.ft b{font-weight:700}
.fx{display:block;font-size:12.5px;line-height:17px;color:var(--text-secondary);margin-top:2px}
.fdot{width:9px;height:9px;border-radius:50%;background:var(--sun-500);flex:0 0 9px;margin-top:5px}
details.terms-wrap>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px}
details.terms-wrap>summary::-webkit-details-marker{display:none}
details.terms-wrap>summary .chev{transition:transform .2s}
details.terms-wrap[open]>summary .chev{transform:rotate(180deg)}
/* terms window: centred, blurred page behind (11 Oct) */
dialog.tmodal{margin:auto;border:0;border-radius:26px;padding:0;width:min(680px,94vw);max-height:min(88vh,900px);background:var(--surface-raised);
  color:var(--text-primary);box-shadow:0 40px 100px rgba(11,14,9,.45);display:flex;flex-direction:column;overflow:hidden}
dialog.tmodal:not([open]){display:none}
dialog.tmodal::backdrop{background:rgba(11,14,9,.38);backdrop-filter:blur(14px) saturate(1.1);-webkit-backdrop-filter:blur(14px)}
.tm-head{padding:26px 28px 14px}
.tm-body{flex:1;min-height:0;overflow:auto;margin:0 28px;max-height:none;border-radius:16px}
.tm-foot{padding:14px 28px 24px;border-top:1px solid var(--border-subtle);margin-top:14px}
.tm-prog{height:4px;border-radius:9px;background:var(--surface-sunken);overflow:hidden;margin-bottom:14px}
.tm-prog span{display:block;height:100%;width:0;background:var(--lime-500);transition:width .15s}
@media(max-width:600px){.tm-head{padding:20px 18px 10px}.tm-body{margin:0 18px}.tm-foot{padding:12px 18px 18px}}
.tm-body:focus,.tm-body:focus-visible{outline:none}

/* ---- bar + trendline chart (js/chart.js). Palette validated light and dark, one axis only. ---- */
:root{--chart-a:#507800;--chart-b:#8A6CF0}
[data-theme="dark"]{--chart-a:#749A00;--chart-b:#8E74F0}
.chartcard{background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:20px;padding:18px 20px;box-shadow:var(--shadow-card)}
.chartwrap{position:relative;margin-top:12px}
.chartwrap svg{display:block;width:100%;height:auto;overflow:visible}
.chartwrap .grid{stroke:var(--border-subtle);stroke-width:1}
.chartwrap .tick{fill:var(--text-secondary);font-size:11px;font-variant-numeric:tabular-nums}
.chartwrap .bar{fill:var(--chart-a)}
.chartwrap .trend{fill:none;stroke:var(--chart-b);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.chartwrap .dot{fill:var(--chart-b);stroke:var(--surface-card);stroke-width:2}
.chartwrap .cross{stroke:var(--text-secondary);stroke-width:1}
.chartwrap .hit{fill:transparent;cursor:crosshair;outline:none}
.chartempty{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:12px;padding:8px 14px;font-size:13px;color:var(--text-secondary);text-align:center;max-width:80%}
.ctip{position:absolute;top:-6px;pointer-events:none;background:var(--surface-raised);border:1px solid var(--border-subtle);box-shadow:var(--shadow-card);border-radius:12px;padding:8px 12px;min-width:170px;z-index:5}
.ctip .trow{display:flex;align-items:center;gap:8px;margin-top:4px;font-size:13px}
.ctip .trow span{color:var(--text-secondary)}
.ctip i,.legend i{display:inline-block;flex:none}
.ctip i.bar,.legend .bar i{width:10px;height:10px;border-radius:3px;background:var(--chart-a)}
.ctip i.line,.legend .line i{width:14px;height:2px;border-radius:2px;background:var(--chart-b)}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px;color:var(--text-secondary)}
.legend .lg{display:inline-flex;align-items:center;gap:6px}
.charts2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:16px}

/* ---- Brand module (12 Oct) ---- */
.bgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.bfolder{display:flex;align-items:center;gap:12px;padding:14px;text-decoration:none;color:inherit}
.bfolder:hover{border-color:var(--lime-deep)}
.bfi{width:44px;height:44px;border-radius:14px;background:var(--lime-500);color:var(--ink-900);display:grid;place-items:center;flex:none}
.bitem{overflow:hidden;display:flex;flex-direction:column}
.bthumb{display:block;height:150px;background:var(--surface-sunken);position:relative}
.bthumb img{width:100%;height:100%;object-fit:cover}
.bpdf{position:absolute;inset:0;margin:auto;width:52px;height:64px;border-radius:8px;background:var(--surface-card);box-shadow:var(--shadow-card);display:grid;place-items:center;font-weight:700;font-size:11px;color:var(--state-danger)}
.blink{background:var(--hero-bg)}
.bplay{position:absolute;inset:0;margin:auto;width:56px;height:56px;border-radius:50%;background:var(--lime-500);color:var(--ink-900);display:grid;place-items:center}
.bplay svg{width:24px;height:24px;fill:currentColor}

/* ---- metric cards (Analytics, 12 Oct) ---- */
.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.metric{background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:20px;padding:16px 18px;min-height:120px;display:flex;flex-direction:column;box-shadow:var(--shadow-card)}
.metric .l{font-size:13px;color:var(--text-secondary)}
.metric .v{font-family:CD;font-weight:600;font-size:34px;line-height:38px;letter-spacing:-.025em;margin-top:auto;padding-top:14px}
.metric .s{font-size:12.5px;color:var(--text-secondary);margin-top:2px}
.metric .mic{width:32px;height:32px;border-radius:10px;background:var(--surface-sunken);display:grid;place-items:center}
.metric .mic svg{width:16px;height:16px}
.metric.ink{background:var(--hero-bg);color:var(--hero-fg);border-color:transparent}
.metric.ink .l,.metric.ink .s{color:var(--hero-dim)}
.metric.ink .mic{background:rgba(250,248,243,.1)}
.metric.ink .v{color:var(--lime-500)}
.metric.lime{background:var(--lime-500);color:var(--ink-900);border-color:transparent}
.metric.lime .l,.metric.lime .s{color:var(--ink-700)}
.metric.lime .mic{background:rgba(11,14,9,.08)}
