/* ============================================================
   PRAXIS - "Learnify" concept skin
   Palette + type transcribed from the reference shot.
   ============================================================ */

:root{
  /* surfaces */
  --canvas:#AFC4CE;          /* the "desk" behind the tablet */
  --frame:#151313;           /* tablet bezel */
  --paper:#F7F7F5;           /* app screen */
  --surface:#FFFFFF;
  --surface-2:#F4F3F0;
  --surface-inset:#ECEAE5;
  --rail:#151313;            /* dark floating sidebar */
  --rail-ico:#8B8A88;
  --rail-ico-hover:#F7F7F5;

  /* ink */
  --ink:#151313;
  --ink-2:#4A4645;
  --ink-muted:#847F7C;
  --ink-faint:#A7A29E;
  --line:#E7E4DE;
  --line-strong:#D8D4CD;

  /* brand + pastels (from the swatch sheet) */
  --accent:#FF5734;          /* orange - the one action color */
  --accent-strong:#EA431F;
  --accent-tint:#FFE7DF;
  --yellow:#FCCC42;
  --yellow-tint:#FEF3D4;
  --purple:#BE94F5;
  --purple-tint:#EFE6FD;
  --blue:#BCD9E8;
  --blue-tint:#E6F1F7;

  /* semantic (extend the family for data + answer states) */
  --good:#27A776;  --good-tint:#DCF2E8;  --good-ink:#157050;
  --warn:#E4A81C;  --warn-tint:#FBF0D4;  --warn-ink:#9A720E;
  --bad:#E23B34;   --bad-tint:#FBE1DF;   --bad-ink:#B02821;

  --on-accent:#FFFFFF;
  --on-dark:#F7F7F5;

  --shadow-sm:0 2px 8px rgba(21,19,19,.05);
  --shadow-md:0 8px 26px rgba(21,19,19,.09);
  --shadow-lg:0 18px 50px rgba(21,19,19,.14);
  --shadow-device:0 40px 90px rgba(28,42,54,.35);

  --r-xl:26px; --r-lg:20px; --r-md:14px; --r-sm:10px;
  --font:"Kodchasan",system-ui,-apple-system,"Segoe UI",sans-serif;
}

*,*::before,*::after{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;font-family:var(--font);font-size:15px;line-height:1.55;
  color:var(--ink);background:var(--paper);padding:0;overflow:hidden;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{margin:0;font-weight:700;letter-spacing:-.01em;line-height:1.15;text-wrap:balance;}
p{margin:0;}
button{font-family:inherit;font-size:inherit;color:inherit;cursor:pointer;border:0;background:none;}
input,textarea,select{font-family:inherit;font-size:inherit;color:inherit;}
svg{display:block;}
::selection{background:var(--accent-tint);color:var(--accent-strong);}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:6px;}
.tnum{font-variant-numeric:tabular-nums;}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);}

/* ============================================================
   DEVICE FRAME + SHELL
   ============================================================ */
.device{
  height:100%;max-width:none;margin:0;
  background:transparent;border-radius:0;padding:0;box-shadow:none;
}
.app{
  height:100%;background:var(--paper);border-radius:0;overflow:hidden;
  display:grid;grid-template-columns:auto 1fr;
}

/* ---- dark floating rail (icon-only, expandable) ---- */
.rail{
  width:74px;margin:13px;background:var(--rail);border-radius:24px;
  display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 12px;
  transition:width .28s cubic-bezier(.2,.7,.2,1);
}
.app.rail-open .rail{width:236px;align-items:stretch;}
/* Desktop: keep the rail a fixed-height floating sidebar that sticks while scrolling.
   Without align-self:start the grid stretches the dark rail to the full page height
   (a black bar down the side on tall pages). Scoped >860px so the mobile bottom bar
   (position:fixed, no height) is unaffected. */
@media (min-width:861px){
  .rail{ align-self:start; position:sticky; top:13px; height:calc(100vh - 26px); overflow-y:auto; overflow-x:hidden; }
}

/* gap:0 while collapsed - .rail-brand stays a flex item at max-width:0, so an 11px gap
   beside it would push the 46px mark ~5px left of the nav icons below (off-centre). */
/* Same justify-content snap as .nav-ico above - the logo mark lurched to the middle of the
   rail on collapse. flex-start in both states, with padding-left easing 2px→6px, which
   reproduces the old resting positions (14px collapsed, 18px open) without the jump. */
.rail-head{display:flex;align-items:center;gap:0;width:100%;justify-content:flex-start;padding-left:2px;margin-bottom:12px;transition:gap .28s cubic-bezier(.2,.7,.2,1),padding-left .28s cubic-bezier(.2,.7,.2,1);}
.app.rail-open .rail-head{padding-left:6px;gap:11px;}
.rail-mark{
  width:46px;height:46px;border-radius:14px;flex:none;display:grid;place-items:center;
  background:var(--accent);color:#fff;box-shadow:0 6px 16px rgba(255,87,52,.45);
}
.rail-mark svg{width:24px;height:24px;}
.rail-brand{font-size:20px;font-weight:700;letter-spacing:-.02em;color:#fff;white-space:nowrap;overflow:hidden;max-width:0;opacity:0;transition:max-width .28s,opacity .2s;}
.rail-brand .acc{color:var(--accent);}
.app.rail-open .rail-brand{max-width:140px;opacity:1;}

.rail-nav{display:flex;flex-direction:column;gap:6px;align-items:center;width:100%;}
/* align-self is not animatable either, so the divider used to snap from a centred 34px
   stub to full width. Stretched in both states with the margin doing the work: 8px margins
   give the same 34px centred line when collapsed, 12px the same 188px line when open. */
.rail-sep{align-self:stretch;width:auto;height:1px;background:rgba(255,255,255,.12);margin:8px 8px;flex:none;transition:margin .28s cubic-bezier(.2,.7,.2,1);}
.app.rail-open .rail-sep{margin:8px 12px;}

/* Icon position is held by padding-left, which animates - NOT by justify-content, which
   cannot animate at all. Previously the row was justify-content:center when collapsed and
   flex-start + padding:0 15px when open, so both properties snapped at frame 0 while width
   eased over .28s. Collapsing was the visible one: justify-content flipped back to center
   while the row was still ~212px wide, throwing the icon into the middle of the rail before
   it slid back left. Keeping flex-start in both states and easing padding-left 12px→15px
   lands the icon on exactly the same pixels it used to, but moves it smoothly. */
.nav-ico{
  width:46px;height:46px;flex:none;border-radius:14px;color:var(--rail-ico);position:relative;
  display:flex;align-items:center;justify-content:flex-start;
  padding:0 15px 0 12px;
  transition:background .16s ease,color .16s ease,transform .12s ease,
             width .28s cubic-bezier(.2,.7,.2,1),
             padding-left .28s cubic-bezier(.2,.7,.2,1);
}
.nav-ico svg{width:22px;height:22px;flex:none;}
.nav-ico .lbl{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;max-width:0;opacity:0;margin-left:0;transition:max-width .28s cubic-bezier(.2,.7,.2,1),opacity .18s ease,margin-left .28s cubic-bezier(.2,.7,.2,1);}
.app.rail-open .nav-ico{width:100%;padding-left:15px;}
.app.rail-open .nav-ico .lbl{max-width:150px;opacity:1;margin-left:12px;}
.nav-ico:hover{background:rgba(255,255,255,.08);color:var(--rail-ico-hover);}
.nav-ico:active{transform:scale(.96);}
.nav-ico.is-active{background:var(--yellow);color:#151313;}
.nav-ico[disabled]{opacity:.4;cursor:not-allowed;}
/* Unread/new count on a nav item (e.g. Assignments). Two shapes: a corner pill on the
   icon when icon-only (mobile bar + collapsed rail), and a trailing pill at the row's end
   when the label shows (expanded rail + the mobile "More" menu). */
.nav-badge{
  position:absolute;top:5px;right:5px;min-width:16px;height:16px;padding:0 4px;
  border-radius:999px;background:var(--accent);color:#fff;font-size:10px;font-weight:800;
  display:grid;place-items:center;line-height:1;box-shadow:0 0 0 2px var(--rail);
}
.nav-ico.is-active .nav-badge{box-shadow:0 0 0 2px var(--yellow);}
@media(min-width:861px){
  .app.rail-open .rail-nav .nav-badge{position:static;margin-left:auto;box-shadow:none;}
}
.more-menu .nav-badge{position:static;margin-left:auto;box-shadow:none;}
/* Collapsed-rail tooltip. Not a ::after on .nav-ico: the rail is a scroll container on
   desktop (overflow-y:auto above), which clips anything crossing its right edge. So
   praxis-shell.js positions one shared node parented to <body> instead. */
.rail-tip{
  position:fixed;z-index:200;pointer-events:none;
  background:var(--frame);color:#fff;font-size:12px;font-weight:600;white-space:nowrap;
  padding:6px 10px;border-radius:9px;box-shadow:var(--shadow-md);
  transform-origin:left center;transform:translateY(-50%) scale(.9);
  opacity:0;transition:opacity .15s ease,transform .15s ease;
}
.rail-tip.show{opacity:1;transform:translateY(-50%) scale(1);}

.rail-foot{margin-top:auto;display:flex;flex-direction:column;gap:6px;align-items:center;width:100%;padding-top:8px;}
.rail-toggle svg{transition:transform .28s cubic-bezier(.2,.7,.2,1);}
.app.rail-open .rail-toggle svg{transform:rotate(180deg);}

/* ---- dropdown groups ---- */
/* align-items:center covers BOTH states, so the open override is gone (it was one more
   non-animatable snap): the children that matter here - .nav-parent when open, and
   .submenu - are width:100%, and centring a full-width child is a no-op. Collapsed, the
   46px .nav-parent still centres exactly like the other icons in .rail-nav. */
.nav-group{display:flex;flex-direction:column;align-items:center;gap:0;width:100%;}
.nav-parent .caret{width:16px;height:16px;flex:none;margin-left:auto;max-width:0;opacity:0;transition:transform .25s ease,opacity .2s ease,max-width .25s ease;}
.app.rail-open .nav-parent .caret{max-width:16px;opacity:1;}
.nav-group.open .nav-parent .caret{transform:rotate(180deg);}
.nav-parent.parent-active{color:var(--rail-ico-hover);}
.nav-parent.parent-active > svg:first-child{color:var(--accent);}
.submenu{overflow:hidden;max-height:0;width:100%;display:flex;flex-direction:column;gap:2px;transition:max-height .28s cubic-bezier(.2,.7,.2,1);}
.app.rail-open .nav-group.open .submenu{max-height:230px;margin-top:4px;}
/* A flex ROW, not a block: a subitem can carry a trailing .nav-badge (Assignments), and
   .nav-badge is display:grid - i.e. block-level. In a block subitem the badge rule's
   margin-left:auto therefore made it a full-width bar on its own line under the label
   instead of a pill at the end of the row. */
.subitem{position:relative;display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:9px 12px 9px 50px;border-radius:12px;color:var(--rail-ico);font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;transition:background .15s ease,color .15s ease;}
/* Trailing pill at every width - the .nav-ico rule above only does this on an expanded
   desktop rail, but a submenu only ever shows with its labels, never icon-only. */
.subitem .nav-badge{position:static;margin-left:auto;box-shadow:none;flex:none;}
.subitem::before{content:"";position:absolute;left:30px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:999px;background:currentColor;opacity:.35;transition:background .15s ease,opacity .15s ease;}
.subitem:hover{background:rgba(255,255,255,.06);color:var(--rail-ico-hover);}
.subitem.is-active{color:#fff;font-weight:600;background:rgba(255,255,255,.05);}
.subitem.is-active::before{background:var(--accent);opacity:1;}

/* ---- main column ---- */
.main{display:flex;flex-direction:column;min-width:0;min-height:0;}

.topbar{
  flex:none;display:flex;align-items:center;gap:16px;
  width:100%;max-width:1440px;margin:0 auto;
  padding:20px 34px 14px;
}
.brand-word{font-size:24px;font-weight:700;letter-spacing:-.02em;}
.brand-word .acc{color:var(--accent);}
.brand-word .lead{font-size:13px;font-weight:500;color:var(--ink-muted);margin-right:9px;letter-spacing:0;}
.topbar-spacer{flex:1;}
.search{
  display:flex;align-items:center;gap:10px;background:var(--surface);
  border:1px solid var(--line);border-radius:999px;padding:6px 6px 6px 18px;min-width:260px;
  box-shadow:var(--shadow-sm);
}
.search input{border:0;background:none;outline:none;width:100%;color:var(--ink);font-size:14px;}
.search input::placeholder{color:var(--ink-faint);}
.search-btn{
  width:34px;height:34px;border-radius:999px;background:var(--accent);color:#fff;flex:none;display:grid;place-items:center;
}
.search-btn svg{width:16px;height:16px;}
.bell{
  width:44px;height:44px;border-radius:999px;background:var(--surface);border:1px solid var(--line);
  display:grid;place-items:center;color:var(--ink-2);position:relative;box-shadow:var(--shadow-sm);
}
.bell svg{width:19px;height:19px;}
.bell .dot{position:absolute;top:10px;right:11px;width:8px;height:8px;border-radius:999px;background:var(--accent);border:2px solid var(--surface);}
.profile{display:flex;align-items:center;gap:10px;}
.profile .who{line-height:1.15;}
.profile .nm{font-weight:600;font-size:13.5px;}
.profile .hd{font-size:12px;color:var(--ink-muted);}
.icon-btn{width:44px;height:44px;border-radius:999px;background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;color:var(--ink-2);box-shadow:var(--shadow-sm);}
.icon-btn svg{width:19px;height:19px;}

.avatar{border-radius:12px;flex:none;display:grid;place-items:center;font-weight:700;color:#fff;font-size:14px;width:44px;height:44px;}

/* ---- scrolling stage ---- */
.stage{flex:1;overflow-y:auto;padding:6px 0 34px;scrollbar-width:thin;}
.view{display:none;max-width:1440px;margin:0 auto;padding:0 34px;}
.view.is-active{display:block;animation:rise .38s cubic-bezier(.2,.7,.2,1);}
@keyframes rise{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}

.page-head{display:flex;align-items:flex-end;gap:16px;margin:6px 0 22px;flex-wrap:wrap;}
.page-head h1{font-size:30px;}
.page-head .sub{color:var(--ink-muted);font-size:14px;margin-top:4px;}
.page-head .spacer{flex:1;}

/* ---- shared bits ---- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);box-shadow:var(--shadow-sm);}
.card-head{display:flex;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line);}
.card-head h3{font-size:17px;}
.card-head .spacer{flex:1;}
.pad{padding:22px;}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 20px;border-radius:var(--r-md);font-weight:600;font-size:14px;border:1.5px solid transparent;transition:transform .12s ease,background .16s ease,box-shadow .16s ease;white-space:nowrap;}
.btn svg{width:17px;height:17px;}
.btn:active{transform:translateY(1px);}
.btn-primary{background:var(--accent);color:var(--on-accent);box-shadow:0 8px 20px rgba(255,87,52,.32);}
.btn-primary:hover{background:var(--accent-strong);}
.btn-ghost{background:var(--surface);border-color:var(--line-strong);color:var(--ink);}
.btn-ghost:hover{background:var(--surface-2);}

.pill{display:inline-flex;align-items:center;gap:6px;padding:6px 13px;border-radius:999px;font-size:12.5px;font-weight:600;}
.pill svg{width:13px;height:13px;}
.pill-dark{background:var(--ink);color:var(--paper);}
.pill-line{background:var(--surface);border:1.5px solid var(--line-strong);color:var(--ink-2);}
.pill-yellow{background:var(--yellow-tint);color:var(--warn-ink);}
.pill-purple{background:var(--purple-tint);color:#6C39B8;}
.pill-blue{background:var(--blue-tint);color:#2C6F8E;}
.pill-orange{background:var(--accent-tint);color:var(--accent-strong);}
.pill-good{background:var(--good-tint);color:var(--good-ink);}
.pill-bad{background:var(--bad-tint);color:var(--bad-ink);}

/* avatar stack */
.stack{display:inline-flex;align-items:center;}
.stack .a{width:30px;height:30px;border-radius:999px;border:2.5px solid var(--surface);margin-left:-9px;display:grid;place-items:center;font-size:11px;font-weight:700;color:#fff;}
.stack .a:first-child{margin-left:0;}
.stack .more{width:30px;height:30px;border-radius:999px;border:2.5px solid var(--surface);margin-left:-9px;display:grid;place-items:center;font-size:10.5px;font-weight:700;background:var(--ink);color:var(--paper);}

/* ============================================================
   VIEW 1 - QUESTION STUDIO
   ============================================================ */
.type-pills{display:flex;flex-wrap:wrap;gap:9px;}
.studio{display:grid;grid-template-columns:1.4fr 1fr;gap:22px;align-items:start;margin-top:4px;}

.field{margin-bottom:18px;}
.field > label{display:block;font-weight:600;font-size:13.5px;margin-bottom:8px;}
.field .hint{font-weight:400;color:var(--ink-faint);font-size:12.5px;}
.input,.textarea{width:100%;background:var(--surface-2);border:1.5px solid var(--line);border-radius:var(--r-md);padding:12px 14px;outline:none;transition:border .15s,background .15s,box-shadow .15s;}
.textarea{resize:vertical;min-height:76px;line-height:1.5;}
.input:focus,.textarea:focus{border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px var(--accent-tint);}

.opt-row{display:flex;align-items:center;gap:12px;padding:10px 12px;margin-bottom:10px;border:1.5px solid var(--line);border-radius:var(--r-md);background:var(--surface-2);transition:border .15s,background .15s;}
.opt-row.is-correct{border-color:var(--good);background:var(--good-tint);}
.opt-mark{width:26px;height:26px;border-radius:999px;border:2px solid var(--line-strong);flex:none;display:grid;place-items:center;color:transparent;background:var(--surface);transition:all .15s;}
.opt-row.is-correct .opt-mark{border-color:var(--good);background:var(--good);color:#fff;}
.opt-mark svg{width:14px;height:14px;}
.opt-letter{font-weight:700;font-size:13px;color:var(--ink-faint);width:16px;text-align:center;}
.opt-row input.opt-text{flex:1;border:0;background:none;outline:none;padding:3px 0;font-weight:500;}
.opt-del{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;color:var(--ink-faint);flex:none;}
.opt-del:hover{background:var(--bad-tint);color:var(--bad-ink);}
.opt-del svg{width:15px;height:15px;}
.add-opt{display:inline-flex;align-items:center;gap:8px;color:var(--accent-strong);font-weight:600;font-size:13.5px;padding:8px 4px;}
.add-opt svg{width:16px;height:16px;}

.meta-grid{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center;}
.seg{display:flex;background:var(--surface-2);border:1.5px solid var(--line);border-radius:var(--r-md);padding:4px;gap:4px;}
.seg button{flex:1;padding:9px 6px;border-radius:10px;font-weight:600;font-size:12.5px;color:var(--ink-muted);}
.seg button.is-active{color:#151313;}
.seg button[data-d="1"].is-active{background:var(--blue);}
.seg button[data-d="2"].is-active{background:var(--yellow);}
.seg button[data-d="3"].is-active{background:var(--purple);}
.stepper{display:flex;align-items:center;border:1.5px solid var(--line);border-radius:var(--r-md);overflow:hidden;background:var(--surface-2);}
.stepper button{width:40px;height:44px;display:grid;place-items:center;font-size:18px;font-weight:700;color:var(--ink-2);}
.stepper button:hover{background:var(--surface-inset);}
.stepper .val{width:44px;text-align:center;font-weight:700;}

.tags{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.tag-item{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:var(--purple-tint);color:#6C39B8;font-weight:600;font-size:12.5px;}
.tag-item svg{width:12px;height:12px;opacity:.65;}
.tag-add{border:1.5px dashed var(--line-strong);border-radius:999px;padding:6px 13px;color:var(--ink-muted);font-weight:600;font-size:12.5px;}

/* dark assist card (echoes the reference's dark "new course" card) */
.assist{background:var(--ink);color:var(--on-dark);border-radius:var(--r-lg);padding:18px 20px;margin-top:6px;}
.assist .lbl{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--yellow);margin-bottom:10px;}
.assist .lbl svg{width:16px;height:16px;}
.assist p{font-size:13.5px;line-height:1.55;color:#D9D6D0;}
.assist p b{color:#fff;}
.assist .assist-do{margin-top:14px;background:var(--accent);color:#fff;border-radius:11px;padding:10px 16px;font-weight:600;font-size:13.5px;display:inline-flex;align-items:center;gap:8px;}
.assist .assist-do svg{width:15px;height:15px;}

.studio-actions{display:flex;align-items:center;gap:12px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line);}
.studio-actions .spacer{flex:1;}
.autosave{display:flex;align-items:center;gap:8px;color:var(--ink-muted);font-size:12.5px;}
.autosave .dot{width:8px;height:8px;border-radius:999px;background:var(--good);box-shadow:0 0 0 3px var(--good-tint);}

/* preview = a colourful course-card-style question card */
.preview-wrap{position:sticky;top:0;}
.preview-note{display:flex;align-items:center;gap:8px;color:var(--ink-muted);font-size:12.5px;margin-bottom:12px;}
.preview-note svg{width:15px;height:15px;}
.qcard{border-radius:var(--r-xl);overflow:hidden;box-shadow:var(--shadow-md);border:1px solid var(--line);background:var(--surface);}
.qcard-top{background:var(--yellow);padding:18px 20px;}
.qcard-top .row{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.bookmark{width:32px;height:32px;border-radius:10px;background:rgba(21,19,19,.14);display:grid;place-items:center;color:#151313;}
.bookmark svg{width:16px;height:16px;}
.qcard-top h4{color:#151313;font-size:19px;line-height:1.3;}
.qcard-body{padding:18px 20px 20px;}
.pv-opt{display:flex;align-items:center;gap:12px;padding:13px 15px;border-radius:var(--r-md);border:1.5px solid var(--line);margin-bottom:10px;font-weight:500;transition:all .14s;}
.pv-opt:last-child{margin-bottom:0;}
.pv-opt:hover{border-color:var(--accent);background:var(--accent-tint);}
.pv-opt .l{width:24px;height:24px;border-radius:8px;background:var(--surface-inset);display:grid;place-items:center;font-weight:700;font-size:12.5px;color:var(--ink-muted);flex:none;}

/* ============================================================
   VIEW 2 - INSIGHTS
   ============================================================ */
.kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px;}
.kpi{border-radius:var(--r-xl);padding:18px 20px;min-height:150px;display:flex;flex-direction:column;box-shadow:var(--shadow-sm);}
.kpi.y{background:var(--yellow);color:#151313;}
.kpi.p{background:var(--purple);color:#151313;}
.kpi.b{background:var(--blue);color:#151313;}
.kpi.d{background:var(--ink);color:var(--on-dark);}
.kpi-top{display:flex;align-items:center;justify-content:space-between;}
.kpi-ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:rgba(21,19,19,.13);}
.kpi.d .kpi-ico{background:rgba(255,255,255,.12);}
.kpi-ico svg{width:20px;height:20px;}
.kpi-delta{font-size:12.5px;font-weight:700;background:rgba(21,19,19,.13);border-radius:999px;padding:3px 9px;}
.kpi.d .kpi-delta{background:rgba(255,255,255,.14);color:var(--yellow);}
.kpi-val{font-size:34px;font-weight:700;letter-spacing:-.02em;line-height:1;margin-top:auto;}
.kpi-val small{font-size:17px;opacity:.6;font-weight:600;}
.kpi-label{font-size:13px;font-weight:500;margin-top:7px;opacity:.85;}

.ins-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px;margin-bottom:20px;}
.chart-legend{display:flex;gap:16px;}
.leg{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--ink-muted);}
.leg .sw{width:12px;height:12px;border-radius:4px;}
.trend-figure{padding:10px 6px 2px;}
.chart-x{display:flex;justify-content:space-between;padding:6px 8px 0;font-size:11px;color:var(--ink-faint);font-weight:600;}

.mastery-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);}
.mastery-row:last-child{border-bottom:0;}
.mastery-name{width:96px;font-weight:600;font-size:13.5px;flex:none;}
.mbar{flex:1;height:12px;border-radius:999px;background:var(--surface-inset);overflow:hidden;}
.mbar-fill{height:100%;border-radius:999px;transition:width 1s cubic-bezier(.2,.7,.2,1);}
.mastery-pct{width:44px;text-align:right;font-weight:700;font-size:13.5px;flex:none;}

.roster{width:100%;border-collapse:collapse;}
.roster th{text-align:center;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-faint);font-weight:700;padding:0 12px 12px;}
.roster td.num{text-align:right;}
.roster td{padding:12px;border-top:1px solid var(--line);vertical-align:middle;}
.roster tr:hover td{background:var(--surface-2);}
.stu{display:flex;align-items:center;gap:11px;}
.stu .avatar{width:34px;height:34px;border-radius:10px;font-size:12.5px;}
.stu-name{font-weight:600;font-size:13.5px;}
.stu-sub{font-size:11.5px;color:var(--ink-faint);}
.acc-cell{display:inline-flex;align-items:center;gap:9px;}
.acc-bar{width:56px;height:8px;border-radius:999px;background:var(--surface-inset);overflow:hidden;}
.acc-bar i{display:block;height:100%;border-radius:999px;}
.delta{font-weight:700;font-size:12.5px;}
.delta.up{color:var(--good-ink);}
.delta.down{color:var(--bad-ink);}

.tricky-row{display:flex;align-items:flex-start;gap:13px;padding:13px 0;border-bottom:1px solid var(--line);}
.tricky-row:last-child{border-bottom:0;}
.tricky-rank{width:26px;height:26px;border-radius:9px;background:var(--surface-inset);display:grid;place-items:center;font-weight:700;font-size:12.5px;color:var(--ink-muted);flex:none;}
.tricky-q{flex:1;font-weight:500;font-size:13.5px;line-height:1.45;}
.tricky-q .meta{font-size:11.5px;color:var(--ink-faint);margin-top:3px;}
.tricky-score{font-weight:700;font-size:16px;flex:none;}

.heat-wrap{overflow-x:auto;}
.heatmap{display:grid;grid-template-columns:auto repeat(16,1fr);gap:5px;min-width:540px;align-items:center;}
.heat-day{font-size:11px;color:var(--ink-faint);text-align:right;padding-right:6px;height:18px;line-height:18px;}
.heat-cell{aspect-ratio:1;border-radius:5px;background:var(--surface-inset);min-height:18px;}
.heat-foot{display:flex;align-items:center;gap:8px;justify-content:flex-end;margin-top:14px;font-size:11.5px;color:var(--ink-faint);}
.heat-scale{display:flex;gap:4px;}
.heat-scale span{width:16px;height:16px;border-radius:5px;}

/* ============================================================
   VIEW 3 - PRACTICE
   ============================================================ */
.practice{display:grid;grid-template-columns:1fr 310px;gap:24px;align-items:start;}
.arena{max-width:720px;}
.session-bar{display:flex;align-items:center;gap:14px;margin-bottom:20px;}
.progress{flex:1;height:12px;border-radius:999px;background:var(--surface-inset);overflow:hidden;}
.progress i{display:block;height:100%;background:var(--accent);border-radius:999px;transition:width .5s cubic-bezier(.2,.7,.2,1);}
.session-count{font-weight:700;font-size:13.5px;color:var(--ink-muted);white-space:nowrap;}
.timer{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14px;background:var(--surface);border:1.5px solid var(--line);padding:8px 14px;border-radius:999px;box-shadow:var(--shadow-sm);}
.timer svg{width:16px;height:16px;color:var(--ink-faint);}

.q-card{padding:30px 32px;border-radius:var(--r-xl);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-md);}
.q-topline{display:flex;align-items:center;gap:10px;margin-bottom:20px;}
.q-topline .spacer{flex:1;}
.q-topline .bookmark{background:var(--surface-inset);color:var(--ink-2);}
.q-stem{font-size:27px;font-weight:700;line-height:1.3;margin-bottom:8px;}
.q-stem .frac{background:var(--yellow-tint);border-radius:7px;padding:0 6px;}
.q-sub{color:var(--ink-muted);font-size:15px;margin-bottom:24px;}
.answers{display:grid;gap:12px;}
.ans{display:flex;align-items:center;gap:15px;padding:17px 19px;border-radius:var(--r-lg);text-align:left;width:100%;border:2px solid var(--line);background:var(--surface);font-size:16px;font-weight:600;transition:transform .12s,border-color .15s,background .15s;}
.ans:hover:not([disabled]){border-color:var(--accent);background:var(--accent-tint);transform:translateX(3px);}
.ans .key{width:32px;height:32px;border-radius:10px;flex:none;display:grid;place-items:center;font-weight:700;font-size:14px;color:var(--ink-muted);background:var(--surface-inset);transition:all .15s;}
.ans .txt{flex:1;}
.ans .state{width:24px;height:24px;flex:none;color:transparent;}
.ans .state svg{width:24px;height:24px;}
.ans.is-picked{border-color:var(--accent);background:var(--accent-tint);}
.ans.is-picked .key{background:var(--accent);color:#fff;}
.ans.correct{border-color:var(--good);background:var(--good-tint);}
.ans.correct .key{background:var(--good);color:#fff;}
.ans.correct .state{color:var(--good);}
.ans.wrong{border-color:var(--bad);background:var(--bad-tint);}
.ans.wrong .key{background:var(--bad);color:#fff;}
.ans.wrong .state{color:var(--bad);}
.ans[disabled]{cursor:default;}
.ans.dim{opacity:.5;}

.q-foot{display:flex;align-items:center;gap:12px;margin-top:24px;}
.q-foot .spacer{flex:1;}
.flag-btn{display:inline-flex;align-items:center;gap:8px;color:var(--ink-muted);font-weight:600;font-size:13.5px;padding:10px 14px;border-radius:var(--r-md);}
.flag-btn:hover{background:var(--surface-2);color:var(--ink);}
.flag-btn svg{width:16px;height:16px;}
.flag-btn.on{color:var(--warn-ink);}

.feedback{margin-top:20px;padding:18px 20px;border-radius:var(--r-lg);border:1.5px solid var(--line);display:none;animation:rise .35s cubic-bezier(.2,.7,.2,1);}
.feedback.show{display:block;}
.feedback.ok{background:var(--good-tint);border-color:var(--good);}
.feedback.no{background:var(--bad-tint);border-color:var(--bad);}
.fb-head{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:700;margin-bottom:8px;}
.fb-head svg{width:22px;height:22px;}
.feedback.ok .fb-head{color:var(--good-ink);}
.feedback.no .fb-head{color:var(--bad-ink);}
.fb-body{font-size:14px;color:var(--ink-2);line-height:1.6;}
.fb-body code{background:var(--surface);padding:1px 7px;border-radius:6px;border:1px solid var(--line);font-weight:600;}

.side-card{padding:20px;border-radius:var(--r-xl);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm);margin-bottom:16px;}
.side-card.dark{background:var(--ink);color:var(--on-dark);border-color:transparent;}
.streak-stat{display:flex;align-items:center;gap:14px;}
.streak-flame{width:54px;height:54px;border-radius:16px;flex:none;display:grid;place-items:center;background:rgba(255,87,52,.16);color:var(--accent);}
.side-card.dark .streak-flame{background:rgba(255,87,52,.22);}
.streak-flame svg{width:28px;height:28px;}
.streak-num{font-size:28px;font-weight:700;line-height:1;}
.streak-lbl{font-size:12.5px;opacity:.72;margin-top:2px;}
.xp-track{margin-top:16px;}
.xp-top{display:flex;justify-content:space-between;font-size:12.5px;margin-bottom:8px;opacity:.9;}
.xp-bar{height:12px;border-radius:999px;background:rgba(255,255,255,.14);overflow:hidden;}
.xp-bar i{display:block;height:100%;border-radius:999px;background:var(--yellow);}

.side-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.hearts{display:flex;gap:6px;}
.hearts svg{width:20px;height:20px;color:var(--accent);}
.hearts svg.spent{color:var(--line-strong);}
.nav-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;}
.nav-cell{aspect-ratio:1;border-radius:11px;display:grid;place-items:center;font-weight:700;font-size:13.5px;border:2px solid var(--line);background:var(--surface-2);color:var(--ink-muted);}
.nav-cell.done{background:var(--good-tint);border-color:transparent;color:var(--good-ink);}
.nav-cell.wrong{background:var(--bad-tint);border-color:transparent;color:var(--bad-ink);}
.nav-cell.flagged{border-color:var(--warn);color:var(--warn-ink);}
.nav-cell.current{border-color:var(--accent);background:var(--accent-tint);color:var(--accent-strong);}
.side-legend{display:flex;flex-wrap:wrap;gap:10px 14px;margin-top:16px;font-size:11.5px;color:var(--ink-muted);}
.side-legend span{display:flex;align-items:center;gap:6px;}
.side-legend i{width:12px;height:12px;border-radius:4px;display:inline-block;}

/* ============================================================
   VIEW 4 - QUESTION BANK (data table)
   ============================================================ */
.pill-muted{background:var(--surface-inset);color:var(--ink-muted);}

.bank-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 18px;border-bottom:1px solid var(--line);}
.tabs{display:inline-flex;gap:4px;background:var(--surface-2);border:1.5px solid var(--line);border-radius:var(--r-md);padding:4px;}
.tabs button{padding:8px 13px;border-radius:10px;font-weight:600;font-size:13px;color:var(--ink-muted);white-space:nowrap;}
.tabs button.is-active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm);}
.tabs button .cnt{opacity:.55;margin-left:5px;font-variant-numeric:tabular-nums;}
.toolbar-spacer{flex:1;}
.search-mini{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1.5px solid var(--line);border-radius:var(--r-md);padding:8px 12px;min-width:190px;}
.search-mini svg{width:15px;height:15px;color:var(--ink-faint);flex:none;}
.search-mini input{border:0;background:none;outline:none;width:100%;font-size:13.5px;}
.sort-btn{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border-radius:var(--r-md);border:1.5px solid var(--line);background:var(--surface);color:var(--ink-2);font-weight:600;font-size:13px;}
.sort-btn svg{width:14px;height:14px;color:var(--ink-faint);}

.bulk-bar{display:none;align-items:center;gap:10px;padding:11px 18px;background:var(--accent-tint);border-bottom:1px solid var(--line);}
.bulk-bar.show{display:flex;}
.bulk-bar .n{font-weight:700;color:var(--accent-strong);font-size:13.5px;}
.bulk-bar .spacer{flex:1;}
.bulk-act{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border-radius:10px;font-weight:600;font-size:13px;background:var(--surface);border:1.5px solid var(--line);color:var(--ink-2);}
.bulk-act svg{width:15px;height:15px;}
.bulk-act:hover{background:var(--surface-2);}
.bulk-act.danger{color:var(--bad-ink);border-color:color-mix(in srgb,var(--bad) 30%,var(--line));}
.bulk-act.danger:hover{background:var(--bad-tint);}
.bulk-clear{color:var(--ink-muted);font-weight:600;font-size:13px;padding:8px 6px;}

.dtable-wrap{overflow-x:auto;}
.dtable{width:100%;border-collapse:collapse;min-width:920px;}
.dtable th{text-align:center;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);font-weight:700;padding:13px 14px;background:var(--surface-2);}
/* Header cells are centred across every table (see .roster/.table too); only the
   BODY of a numeric column stays right-aligned so the digits still line up. */
.dtable td.num{text-align:right;}
.dtable td{padding:13px 14px;border-top:1px solid var(--line);vertical-align:middle;}
.dtable tbody tr:hover td{background:var(--surface-2);}
.dtable tr.selrow td{background:var(--accent-tint);}
.chk-col{width:18px;}
.chk{width:18px;height:18px;border-radius:6px;accent-color:var(--accent);cursor:pointer;margin:0;display:block;}

.qcell{display:flex;align-items:center;gap:12px;max-width:380px;}
.qtype{width:32px;height:32px;border-radius:10px;flex:none;display:grid;place-items:center;}
.qtype svg{width:17px;height:17px;}
.qtype.mcq{background:var(--blue-tint);color:#2C6F8E;}
.qtype.short{background:var(--purple-tint);color:#6C39B8;}
.qtype.numeric{background:var(--yellow-tint);color:var(--warn-ink);}
.qtype.tf{background:var(--good-tint);color:var(--good-ink);}
.qtitle{font-weight:600;font-size:13.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.qmeta{font-size:11.5px;color:var(--ink-faint);margin-top:2px;}
.muted-cell{color:var(--ink-muted);font-size:13px;white-space:nowrap;}
.row-actions{display:flex;gap:3px;justify-content:flex-end;}
.row-actions button{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:var(--ink-faint);}
.row-actions button:hover{background:var(--surface-inset);color:var(--ink);}
.row-actions button.del:hover{background:var(--bad-tint);color:var(--bad-ink);}
.row-actions svg{width:16px;height:16px;}

.bank-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;flex-wrap:wrap;}
.bank-foot .info{font-size:13px;color:var(--ink-muted);}
.pager{display:flex;gap:6px;}
.pager button{min-width:36px;height:36px;padding:0 10px;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink-2);font-weight:600;font-size:13px;display:grid;place-items:center;}
.pager button:hover:not(:disabled):not(.is-active){background:var(--surface-2);}
.pager button.is-active{background:var(--ink);color:var(--paper);border-color:var(--ink);}
.pager button:disabled{opacity:.4;cursor:not-allowed;}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1120px){
  .studio,.ins-grid,.practice{grid-template-columns:1fr;}
  .preview-wrap{position:static;}
  .kpi-row{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:860px){
  body{padding:0;overflow:auto;height:auto;}
  .device{border-radius:0;padding:0;height:auto;max-width:none;box-shadow:none;}
  .app{border-radius:0;grid-template-columns:1fr;height:auto;}
  .rail,.app.rail-open .rail{
    position:fixed;bottom:16px;left:16px;right:16px;width:auto;margin:0;border-radius:22px;
    flex-direction:row;align-items:center;justify-content:space-around;padding:8px 10px;z-index:50;box-shadow:var(--shadow-lg);
  }
  .rail-head,.rail-sep{display:none;}
  .rail-nav,.rail-foot{display:contents;}
  .rail-toggle{display:none;}
  .nav-group{flex-direction:row;width:auto;align-items:center;}
  .nav-parent .caret{display:none;}
  .nav-ico,.app.rail-open .nav-ico{width:46px;justify-content:center;padding:0;}
  .nav-ico .lbl,.app.rail-open .nav-ico .lbl{display:none;}
  .nav-ico.secondary{display:none;}
  /* dropdowns become a floating popover above the bar */
  .submenu{display:none;}
  .nav-group.open .submenu{
    display:flex;position:fixed;bottom:90px;z-index:60;width:196px;max-height:none;overflow:visible;
    margin-top:0;padding:8px;gap:2px;background:var(--rail);border:1px solid rgba(255,255,255,.09);
    border-radius:16px;box-shadow:var(--shadow-lg);animation:rise .18s ease;
  }
  .nav-group.open .submenu::after{
    content:"";position:absolute;bottom:-7px;left:var(--arrow,calc(50% - 7px));width:14px;height:14px;
    background:var(--rail);border-right:1px solid rgba(255,255,255,.09);border-bottom:1px solid rgba(255,255,255,.09);
    transform:rotate(45deg);
  }
  .subitem{padding:11px 12px 11px 34px;}
  .subitem::before{left:15px;}
  .stage{padding:6px 0 104px;overflow:visible;}
  .view{padding:0 16px;max-width:none;}
  .topbar{padding:16px 16px 12px;flex-wrap:wrap;max-width:none;}
  .search{display:none;}
  .brand-word .lead{display:none;}
}
@media (max-width:560px){
  .kpi-row{grid-template-columns:1fr 1fr;gap:11px;}
  .meta-grid{grid-template-columns:1fr;}
  .q-card{padding:22px 18px;}
  .q-stem{font-size:22px;}
  .page-head h1{font-size:24px;}
  .profile .who{display:none;}
}
@media (prefers-reduced-motion:reduce){*{animation-duration:.001ms !important;transition-duration:.001ms !important;}}

/* ============================================================
   REAL-APP ADAPTATIONS (FontAwesome icons instead of inline SVG;
   anchor-based nav items; misc). Appended for the pure-Praxis rebuild.
   ============================================================ */
.rail .nav-ico i { font-size: 19px; line-height: 1; }
a.nav-ico, .topbar .profile, .bell { text-decoration: none; }
.rail-mark { overflow: hidden; }
.rail-mark img { border-radius: 8px; }
/* dropdown caret (FontAwesome <i> instead of the concept's inline SVG) */
.nav-parent .caret{ font-size:12px; margin-left:auto; }
.app:not(.rail-open) .nav-parent .caret{ display:none; }
.nav-group.open .nav-parent .caret{ transform:rotate(180deg); }

/* ============================================================
   LIGHT SIDEBAR VARIANT - add class "rail-light" on .app
   (rail becomes a white card instead of the dark #151313 rail).
   Everything else (topbar, stage, content) is unchanged.
   ============================================================ */
.app.rail-light .rail{ background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-md); }
.app.rail-light .rail-brand{ color:var(--ink); }
.app.rail-light .rail-sep{ background:var(--line); }
.app.rail-light .nav-ico{ color:var(--ink-muted); }
.app.rail-light .nav-ico:hover{ background:var(--surface-2); color:var(--ink); }
.app.rail-light .nav-ico.is-active{ background:var(--yellow); color:#151313; }
.app.rail-light .nav-parent.parent-active{ color:var(--ink); }
.app.rail-light .nav-parent.parent-active > i:first-child{ color:var(--accent); }
.app.rail-light .subitem{ color:var(--ink-muted); }
.app.rail-light .subitem:hover{ background:var(--surface-2); color:var(--ink); }
.app.rail-light .subitem.is-active{ color:var(--ink); background:var(--accent-tint); }
.app.rail-light .subitem.is-active::before{ background:var(--accent); opacity:1; }
/* mobile popover above the bottom bar, on a light rail */
.app.rail-light .nav-group.open .submenu{ background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-lg); }
.app.rail-light .nav-group.open .submenu::after{ background:var(--surface); border-right-color:var(--line); border-bottom-color:var(--line); }

/* Collapse chevron is a FontAwesome <i> (not the concept's <svg>), so the svg
   rotate rule above doesn't touch it. Flip it: point RIGHT (»») when the rail is
   collapsed (= "expand"), LEFT («) when expanded (= "collapse"). */
.rail-toggle i{ transition:transform .28s cubic-bezier(.2,.7,.2,1); }
.app:not(.rail-open) .rail-toggle i{ transform:rotate(180deg); }

/* ============================================================
   TOPBAR BRAND (logo lockup, replaces the greeting) + STICKY
   mobile navbar. Applies to the deck and layouts.praxis-app.
   ============================================================ */
.tb-brand{ display:inline-flex; align-items:center; gap:10px; text-decoration:none; }
.tb-mark{ width:34px; height:34px; border-radius:11px; background:var(--rail); color:var(--yellow); display:grid; place-items:center; font-size:16px; flex:none; }
.tb-word{ font-size:18px; font-weight:700; letter-spacing:-.02em; color:var(--ink); white-space:nowrap; }
.tb-word .acc{ color:var(--accent); }

@media(max-width:860px){
  /* navbar follows the scroll on mobile */
  .topbar{ position:sticky; top:0; z-index:45; background:var(--paper); border-bottom:1px solid var(--line); flex-wrap:nowrap; padding:11px 14px; }
  .tb-word{ font-size:16px; }
  .profile .who{ display:none; }   /* keep the top bar to one tidy row */
}
@media(max-width:560px){ .tb-word{ display:none; } }

/* On mobile the app must NOT clip, or it traps position:sticky and the topbar
   won't follow the scroll. (Desktop keeps overflow:hidden for the rounded shell.) */
@media(max-width:860px){ .app{ overflow:visible; } }

/* Constrain + centre page content in the real layout (the deck did this with .view).
   Keeps the dashboard from stretching edge-to-edge on wide screens. */
.stage-inner{ max-width:1440px; margin:0 auto; padding:0 34px; }
@media(max-width:860px){ .stage-inner{ padding:0 16px; } }

/* Anchors used as buttons / pills / tags / cards must not be underlined.
   (Real inline text links, e.g. inside empty-state notes, keep their underline.) */
.btn, .pill, .sub-tag, .class-card, .lvl-card, .icon-btn, .flag-btn, .add-opt,
.tag-item, .tag-add, .ans, .subitem, .qb-star, .st-toggle, .pselect-btn, .sec-act { text-decoration:none; }

/* Log out is destructive - make it read as such rather than as one more grey icon.
   Kept red in both rail themes and inside the mobile overflow menu. */
.nav-ico.nav-logout{ color:var(--bad); }
.nav-ico.nav-logout:hover{ background:rgba(226,59,52,.16); color:#FF6B63; }
.app.rail-light .nav-ico.nav-logout{ color:var(--bad-ink); }
.app.rail-light .nav-ico.nav-logout:hover{ background:var(--bad-tint); color:var(--bad-ink); }

/* ---- mobile bottom bar: fixed set of icons + a "More" overflow, Log out pinned last ----
   The flat nav has ~10 items, which used to make the bar scroll horizontally (items hidden
   off-edge with nothing to indicate it). Instead praxis-shell.js flags everything past the
   first few as .nav-overflow and clones them into #railMoreMenu. */
.rail-more{ display:none; }                       /* desktop rail: the nav is already vertical */
@media(max-width:860px){
  .rail, .app.rail-open .rail{ justify-content:space-between; gap:2px; overflow:visible; }
  .rail-nav .nav-ico.nav-overflow{ display:none; }
  .rail-more{ display:block; position:relative; order:98; }
  .nav-ico.nav-logout{ order:99; }                /* rightmost, after More */
  .more-menu{
    display:none; position:fixed; bottom:88px; right:16px; z-index:60; width:210px;
    background:var(--rail); border-radius:18px; padding:8px; box-shadow:var(--shadow-lg);
    flex-direction:column; gap:2px; max-height:60vh; overflow-y:auto;
  }
  .rail-more.open .more-menu{ display:flex; }
  /* menu rows are full-width labelled items, not the bar's 46px icon squares */
  .more-menu .nav-ico, .app.rail-open .more-menu .nav-ico{ width:100%; justify-content:flex-start; padding:0 12px; gap:12px; }
  .more-menu .nav-ico .lbl, .app.rail-open .more-menu .nav-ico .lbl{ display:block; max-width:none; opacity:1; margin-left:0; }
}

/* Default avatar background (the base .avatar sets white text but no bg - the deck
   supplied gradients inline; give a fallback so initials aren't invisible). */
.avatar{ background:linear-gradient(150deg,var(--accent),var(--accent-strong)); overflow:hidden; }
.avatar img{ width:100%; height:100%; object-fit:cover; }

/* profile avatar in the topbar = circle */
.topbar .profile .avatar{ border-radius:50%; }
