/* Absoluty Lead — layout e componentes do app */
.app { min-height: 100vh; display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 18px; }
.rail-wrap { position: sticky; top: 18px; align-self: start; height: calc(100vh - 36px); z-index: 20; }
.rail { height: 100%; width: var(--rail-w); display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; border-radius: 38px;
  transition: width .32s var(--ease); overflow: hidden; }
.rail.open { width: var(--rail-w-open); }
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 10px; min-height: 48px; }
.brand-mark { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--ink-btn); color: var(--ink-btn-text); font-weight: 800; letter-spacing: -.04em; }
.brand-name { font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.rail.open .brand-name, .rail.open .rail-label { opacity: 1; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-item { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 12px; border-radius: 999px; color: var(--text-2); text-decoration: none;
  border: 0; background: none; cursor: pointer; font: inherit; width: 100%; text-align: left; position: relative; flex: none; }
.rail-item svg { flex: none; width: 22px; height: 22px; }
.rail-label { white-space: nowrap; opacity: 0; transition: opacity .2s; font-weight: 500; }
.rail-item:hover { background: var(--glass-soft); color: var(--text); }
.rail-item[aria-current="page"] { background: var(--ink-btn); color: var(--ink-btn-text); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
html[data-theme="dark"] .rail-item[aria-current="page"] { box-shadow: 0 0 22px rgba(53,216,255,.45); }
.rail:not(.open) .rail-item:hover::after, .rail:not(.open) .rail-item:focus-visible::after { content: attr(data-tip); position: absolute; left: 62px; top: 50%; transform: translateY(-50%);
  background: var(--ink-btn); color: var(--ink-btn-text); padding: 5px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 30; }
.rail-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid var(--edge-soft); }

.shell { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 10px; border-radius: 999px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-switch { margin-left: 4px; }
.assistant { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; cursor: text;
  background: var(--glass-soft); border: 1px solid var(--edge-soft); color: var(--muted); font: inherit; text-align: left; }
.assistant:hover { border-color: var(--accent); }
.assistant .orb-ai { flex: none; width: 24px; height: 24px; border-radius: 50%; background: conic-gradient(from 90deg, var(--accent), var(--accent-2), var(--accent)); box-shadow: 0 0 14px var(--accent); animation: spin 8s linear infinite; }
.assistant kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; border: 1px solid var(--edge-soft); padding: 1px 6px; border-radius: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.top-actions { display: flex; align-items: center; gap: 6px; }

.main { padding: 28px 32px 110px; min-height: calc(100vh - 36px - 70px); border-radius: var(--r-xl); position: relative; }
html { scroll-padding-bottom: 104px; } /* foco e scrollIntoView param acima da barra de abas flutuante (WCAG 2.4.11) */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head h1 { font-size: clamp(26px, 3vw, 36px); }
.view-head p { color: var(--muted); margin-top: 4px; max-width: 64ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15; display: flex; gap: 4px; padding: 6px; border-radius: 999px; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
.tabbar a { padding: 9px 18px; border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.tabbar a:hover { background: var(--glass-soft); }
.tabbar a[aria-current="page"] { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.12); font-weight: 700; }
html[data-theme="light"] .tabbar a[aria-current="page"] { background: #fff; }

/* Controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--edge-soft);
  background: var(--glass-soft); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); background: var(--glass-strong); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--ink-btn); color: var(--ink-btn-text); border-color: transparent; }
.btn.primary:hover { box-shadow: 0 8px 22px rgba(0,0,0,.22); background: var(--ink-btn); }
html[data-theme="dark"] .btn.primary:hover { box-shadow: 0 0 24px rgba(53,216,255,.5); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 14px; border-radius: 14px; border: 1px solid var(--edge-soft); background: var(--glass-strong); color: var(--text); font: inherit; }
.textarea { resize: vertical; min-height: 90px; }
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.search { position: relative; max-width: 320px; flex: 1; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 40px; border-radius: 999px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--glass-soft); border: 1px solid var(--edge-soft); color: var(--text-2); white-space: nowrap; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); }
.chip.accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; } .avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.stack-av { display: flex; } .stack-av .avatar { margin-left: -8px; border: 2px solid var(--glass-strong); } .stack-av .avatar:first-child { margin-left: 0; }

/* Cards e grids */
.card { padding: 20px; border-radius: var(--r-md); background: var(--glass-soft); border: 1px solid var(--edge-soft); min-width: 0; }
.card.lift { background: var(--glass-strong); }
.card h3 { font-size: 15px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } .g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .col { display: flex; flex-direction: column; gap: 10px; }
.mt { margin-top: 16px; } .mt-l { margin-top: 26px; } .muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .bold { font-weight: 700; } .mono { font-family: var(--mono); } .right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .label svg { width: 18px; height: 18px; }
.kpi .value { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; margin: 8px 0 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi.feature { background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); color: var(--accent-ink); border: 0; }
.kpi.feature .label { color: inherit; opacity: .9; }
.delta { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.55); color: var(--ok); }
.delta.neg { color: var(--bad); }
html[data-theme="dark"] .delta { background: rgba(255,255,255,.08); }

.progress { height: 8px; border-radius: 999px; background: var(--edge-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .8s var(--ease); }
.progress.lg { height: 12px; }
.ring { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring svg circle { transition: stroke-dasharray 1s var(--ease); }
.ring .ring-c { position: absolute; text-align: center; }
.ring .ring-c b { font-size: 26px; display: block; line-height: 1; }

/* Tabelas */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 14px; white-space: nowrap; border-bottom: 1px solid var(--edge-soft); }
.tbl th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--edge-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; } .tbl tbody tr:hover { background: var(--glass-soft); }
.tbl tr.click { cursor: pointer; }
.tbl .who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.empty { text-align: center; padding: 42px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .6; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 13px; }

/* Gráficos */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-l { stroke: var(--edge-soft); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 12px; border-radius: 12px; font-size: 12px; transform: translate(-50%, -110%); white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; margin: 9px 0; }
.bar-row .progress { height: 7px; }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { padding: 12px; border-radius: var(--r-md); background: var(--glass-soft); border: 1px solid var(--edge-soft); min-height: 160px; transition: outline .15s; }
.kcol.over { outline: 2px dashed var(--accent); background: var(--accent-soft); }
.kcol-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 10px; }
.kcol-head b { font-size: 14px; } .kcol-head span { font-size: 12px; color: var(--muted); }
.kcard { padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--edge-soft); cursor: grab; transition: transform .15s var(--ease), box-shadow .2s; }
.kcard:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.kcard .m { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }

/* Modal, drawer, toasts, palette */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(10, 8, 6, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
html[data-theme="dark"] .overlay { background: rgba(2, 6, 12, .6); }
.overlay.right { place-items: stretch end; padding: 12px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 26px; border-radius: var(--r-lg); animation: pop .25s var(--ease); background: var(--glass-strong); }
.modal.wide { width: min(760px, 100%); }
.drawer { width: min(460px, 100%); height: 100%; overflow: auto; padding: 24px; border-radius: var(--r-lg); animation: slide .3s var(--ease); background: var(--glass-strong); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } } @keyframes slide { from { opacity: 0; transform: translateX(30px); } }
.toasts { position: fixed; top: 20px; right: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 16px; animation: pop .3s var(--ease); background: var(--glass-strong); }
.toast.ok { border-left: 4px solid var(--ok); } .toast.bad { border-left: 4px solid var(--bad); } .toast.xp { border-left: 4px solid var(--accent); }
.toast b { display: block; font-size: 14px; } .toast span { font-size: 13px; color: var(--muted); }
.palette { width: min(640px, 100%); align-self: start; margin-top: 12vh; padding: 14px; border-radius: var(--r-lg); background: var(--glass-strong); animation: pop .2s var(--ease); }
.palette .input { font-size: 17px; min-height: 52px; border-radius: 18px; }
.palette ul { list-style: none; padding: 0; margin: 10px 0 0; max-height: 340px; overflow: auto; }
.palette li button { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.palette li button:hover, .palette li button[aria-selected="true"] { background: var(--accent-soft); }
.answer { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; }

/* Chat */
.chat { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; height: calc(100vh - 400px); min-height: 440px; }
.chat-list, .chat-room { border-radius: var(--r-md); background: var(--glass-soft); border: 1px solid var(--edge-soft); display: flex; flex-direction: column; min-height: 0; }
.chat-list { padding: 10px; gap: 4px; overflow: auto; }
.chan { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; cursor: pointer; width: 100%; }
.chan:hover { background: var(--glass-soft); } .chan[aria-current="true"] { background: var(--glass-strong); font-weight: 700; }
.chat-msgs { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 78%; } .msg.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 9px 14px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--edge-soft); overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--ink-btn); color: var(--ink-btn-text); border-color: transparent; }
.msg .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; } .msg.me .meta { text-align: right; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--edge-soft); }

/* Gamificação */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ach { padding: 16px; border-radius: var(--r-md); background: var(--glass-soft); border: 1px solid var(--edge-soft); display: flex; flex-direction: column; gap: 8px; }
.ach.locked { opacity: .72; } .ach.locked .medal { filter: grayscale(1); }
.ach:not(.locked) { border-color: var(--accent); box-shadow: 0 0 24px var(--accent-soft); }
.medal { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.medal svg { width: 24px; height: 24px; }
.rank-1 { color: var(--accent-2); }
.xp-pill { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.perm-grid { display: grid; gap: 1px; background: var(--edge-soft); border-radius: 12px; overflow: hidden; font-size: 13px; }
.perm-grid > div { background: var(--glass-strong); padding: 8px 10px; text-align: center; }
.perm-grid > .h { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.perm-grid > .name { text-align: left; font-weight: 600; }
.perm-grid > .me { background: var(--accent-soft); }
.perm-on { color: var(--ok); font-weight: 700; font-family: var(--mono); } .perm-off { color: var(--muted); opacity: .5; }
.plan-card { display: flex; flex-direction: column; gap: 12px; position: relative; }
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.plan-card .price { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.plan-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; flex: 1; }
.plan-card li { display: flex; gap: 8px; } .plan-card li svg { flex: none; width: 18px; height: 18px; color: var(--ok); margin-top: 2px; }
pre.code { font-family: var(--mono); font-size: 12.5px; background: rgba(0,0,0,.78); color: #d6f0ff; padding: 14px 16px; border-radius: 14px; overflow: auto; margin: 0; max-height: 360px; white-space: pre-wrap; word-break: break-all; }
.method { font-family: var(--mono); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; min-width: 52px; text-align: center; display: inline-block; }
.m-GET { background: rgba(23,115,79,.16); color: var(--ok); } .m-POST { background: rgba(74,116,217,.18); color: var(--chart-4); }
.m-PATCH, .m-PUT { background: rgba(224,168,46,.2); color: var(--warn); } .m-DELETE { background: rgba(179,38,30,.15); color: var(--bad); }
.pipeline-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.layer { padding: 14px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--edge-soft); position: relative; }
.layer .n { font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 800; }
.layer b { display: block; margin: 4px 0; } .layer p { font-size: 12.5px; color: var(--muted); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); margin-right: 6px; }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); } .status-dot.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.demo-banner { padding: 8px 16px; font-size: 13px; text-align: center; border-radius: 999px; background: var(--accent-soft); color: var(--text); }
.notice { padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); font-size: 13.5px; }
.notice.warn { background: rgba(224,168,46,.2); }

/* Responsivo */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main, .g-side { grid-template-columns: 1fr; } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; padding: 10px; padding-bottom: 86px; }
  .rail-wrap { position: fixed; left: 10px; right: 10px; bottom: 10px; top: auto; height: auto; z-index: 40; }
  .rail, .rail.open { width: 100%; height: auto; flex-direction: row; border-radius: 28px; padding: 6px 8px; }
  .rail-brand, .rail-foot, .rail-label, .rail-toggle { display: none !important; }
  .rail-nav { flex-direction: row; overflow-x: auto; }
  .rail-item { width: 48px; justify-content: center; padding: 0; flex: none; }
  .tabbar { bottom: 84px; } .main { padding: 20px 16px 150px; border-radius: 28px; }
  .topbar { border-radius: 24px; flex-wrap: wrap; } .assistant { order: 3; flex-basis: 100%; max-width: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .chat { grid-template-columns: 1fr; height: auto; } .chat-list { flex-direction: row; overflow-x: auto; }
  .chat-room { height: 60vh; } .rail:not(.open) .rail-item:hover::after { display: none; }
}

/* Ajustes de acabamento */
a.btn, .pub a.row, .rail-item, .tabbar a, a.row { text-decoration: none; }
.assistant span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.assistant kbd { white-space: nowrap; flex: none; }
.topbar { min-width: 0; }
.view-body { min-width: 0; }
.rail-nav { min-width: 0; }
@media (max-width: 820px) {
  .rail-wrap { width: auto; max-width: calc(100vw - 20px); }
  .rail, .rail.open { max-width: 100%; min-width: 0; }
  .rail-nav { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
}
.assistant { min-width: 0; overflow: hidden; }
.assistant span:nth-child(2) { flex: 1; }
@media (max-width: 820px) { .assistant { width: 100%; } .org-switch { max-width: 46vw; } }
