/* IB Studio: the shell and the shared components. Colours, type and radii come from tokens.css (the same design
   tokens as the CRM, so the two feel like one family), light and dark. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; background: var(--sidebar-bg); border-right: 1px solid var(--line); z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 6px; }
.brand__mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 900; font-size: 13px; letter-spacing: .02em; position: relative; }
.brand__mark::after { content: ''; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--sidebar-bg); }
.brand__mark--big { width: 48px; height: 48px; font-size: 17px; border-radius: 14px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b { font-size: 15px; }
.brand__text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav__item:hover { background: var(--hover); color: var(--ink); }
.nav__item.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--card-shadow); }
.nav__item.is-on .ic { color: var(--red); }
.nav__badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.who--switch { flex-direction: column; align-items: stretch; gap: 6px; }
.seg { display: flex; flex-direction: column; gap: 2px; background: var(--paper-2); border-radius: 12px; padding: 3px; }
.seg__btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; text-align: left; color: var(--ink-2); }
.seg__btn.is-on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: var(--card-shadow); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: var(--top-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); min-height: 52px; }
.top__menu { display: none; }
.top__me { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.demo-flag { font-size: 12.5px; color: var(--amber-ink); background: var(--amber-soft); padding: 5px 10px; border-radius: 999px; }
.demo-flag b { margin-right: 4px; }
.page { padding: 26px 28px 80px; max-width: 1480px; width: 100%; }
.side-scrim { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: var(--frame-shadow); }
  .side--open { transform: none; }
  .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
  .top { padding: 8px 16px; }
  .top__menu { display: inline-grid; }
  .top__name { display: none; }
  .demo-flag { font-size: 11.5px; }
  .page { padding: 18px 16px 70px; }
}

/* ---------------------------------------------------------------- type + page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: var(--fs-title); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
.page-head .sub { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.page-head__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.hint { color: var(--muted); font-size: var(--fs-small); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; color: var(--red-ink); }
.notice { background: var(--amber-soft); color: var(--amber-ink); padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; }
.notice a { color: inherit; font-weight: 600; }
.empty { padding: 40px 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.empty--center { align-items: center; text-align: center; min-height: 70vh; justify-content: center; padding: 24px; }
.empty-line { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; padding: 6px 0; flex-wrap: wrap; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px; justify-content: center; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--paper-3); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.count--hot { background: var(--red); color: #fff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.good { color: var(--green-ink); }
.link-sm { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--blue-ink); text-decoration: none; font-weight: 500; }
.link-sm:hover { text-decoration: underline; }
code.slug, .lm-short { font-family: var(--f-code); font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- cards + grids */
.card { background: var(--paper); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card--flush { padding: 0; overflow: hidden; gap: 0; }
.card__title { font-size: var(--fs-card); font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.card__title--pad { padding: 16px 20px 12px; }
.narrow { max-width: 440px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid2--top { align-items: start; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
@media (max-width: 760px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s var(--ease), background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn--xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; gap: 4px; }
.btn--wide { width: 100%; height: 42px; }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--text { background: none; color: var(--ink-2); border-color: transparent; padding: 0 8px; }
.btn--text:hover { background: var(--hover); color: var(--ink); transform: none; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.input, .textarea { width: 100%; border: 1px solid var(--line-strong); background: var(--paper); border-radius: var(--radius); padding: 8px 11px; font-size: 14px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.input { height: 38px; }
.input--sm { height: 32px; font-size: 13px; padding: 4px 9px; width: auto; }
.input--num { max-width: 140px; font-variant-numeric: tabular-nums; }
.input--time { width: 76px; flex: none; font-family: var(--f-code); font-size: 13px; }
.textarea { resize: vertical; min-height: 64px; }
.textarea--big { font-size: 15px; line-height: 1.6; min-height: 320px; }
.input:focus, .textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px var(--hover); }
select.input { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-err, .form-err { color: var(--red-ink); font-size: 12.5px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.auto { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.saved-mark { font-weight: 500; font-size: 11.5px; color: var(--muted); margin-left: auto; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; flex: none; }

/* ---------------------------------------------------------------- chips, avatars, bars */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--paper-3); color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip--link:hover { background: var(--line-strong); }
.chip--late { background: var(--red-soft); color: var(--red-ink); }
.chip--today { background: var(--amber-soft); color: var(--amber-ink); }
.chip--win { background: var(--yellow-soft); color: var(--yellow-ink); }
.chip--step.chip--plan { background: var(--slate-soft); color: var(--slate-ink); }
.chip--step.chip--write { background: var(--lilac-soft); color: var(--lilac-ink); }
.chip--step.chip--make { background: var(--blue-soft); color: var(--blue-ink); }
.chip--step.chip--ready { background: var(--amber-soft); color: var(--amber-ink); }
.chip--step.chip--posted { background: var(--green-soft); color: var(--green-ink); }
.ptag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.logo { border-radius: 4px; object-fit: contain; flex: none; }
.logo--tiktok { display: inline-grid; place-items: center; background: #111; color: #fff; font-size: 10px; font-weight: 800; border-radius: 4px; }
.av { display: inline-block; border-radius: 50%; overflow: hidden; flex: none; background: var(--paper-3); box-shadow: 0 0 0 2px var(--paper); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av--initials { display: inline-grid; place-items: center; font-weight: 700; color: var(--ink-2); }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -6px; }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--coral)); border-radius: inherit; }
.bar--thin { height: 4px; margin-top: 6px; }

/* ---------------------------------------------------------------- filters + tabs */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.fgroup { display: flex; gap: 4px; background: var(--paper); padding: 3px; border-radius: 12px; box-shadow: var(--card-shadow); }
.fgroup--end { margin-left: auto; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.fchip:hover { background: var(--hover); }
.fchip.is-on { background: var(--ink); color: var(--paper); }
.search { min-width: 180px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--paper); border-radius: 14px; box-shadow: var(--card-shadow); margin: 18px 0 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tab:hover { background: var(--hover); }
.tab.is-on { background: var(--ink); color: var(--paper); }
.tab__n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--paper-3); color: var(--ink-2); font-size: 11px; display: inline-grid; place-items: center; font-weight: 700; }
.tab.is-on .tab__n { background: rgba(255, 255, 255, .2); color: inherit; }
.tab__n--win { background: var(--yellow); color: #3a2c00; }
.tab-body { display: flex; flex-direction: column; gap: 14px; }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-now td { background: var(--yellow-soft); }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--hover); }
.cell-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.cell-title a { text-decoration: none; font-weight: 600; }
.cell-title a:hover { text-decoration: underline; }
.who-cell { display: inline-flex; align-items: center; gap: 6px; }
.card--flush .table { display: block; overflow-x: auto; }
@media (min-width: 761px) { .card--flush .table { display: table; } }

/* ---------------------------------------------------------------- KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--paper); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi b { font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 16px; color: var(--faint); font-weight: 600; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi--link:hover { box-shadow: var(--lift-shadow); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.stat { background: var(--paper-2); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.stat b { font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- dialog + toasts */
.backdrop { position: fixed; inset: 0; background: rgba(10, 10, 12, .45); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.dialog { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); border-radius: 20px; box-shadow: var(--frame-shadow); animation: pop .2s var(--ease); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.dialog__head h2 { font-size: 17px; }
.dialog__body { padding: 6px 18px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: var(--frame-shadow); transition: opacity .3s, transform .3s; max-width: 90vw; }
.toast--bad { background: var(--red-btn); color: #fff; }
.toast--out { opacity: 0; transform: translateY(6px); }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* ---------------------------------------------------------------- sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin__card { width: min(400px, 100%); background: var(--paper); border-radius: 22px; box-shadow: var(--frame-shadow); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.signin__card h1 { font-size: 24px; letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- sidebar v2 (grouped, from Mohamed's 21st.dev pick) */
.nav { gap: 14px; overflow-y: auto; scrollbar-width: none; }
.nav__group { display: flex; flex-direction: column; gap: 1px; }
.nav__heading { padding: 0 10px 4px; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.nav__item { font-size: 13.5px; padding: 7px 10px; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.nav__item .ic { color: var(--muted); }
.nav__item:hover .ic { color: var(--ink); }
.nav__badge { background: var(--red-soft); color: var(--red-ink); }
.kbd { margin-left: auto; display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font: 600 10.5px var(--f-code); color: var(--muted); background: var(--kbd-bg); border: 1px solid var(--kbd-line); }
.nav__item .kbd { opacity: 0; transition: opacity .15s; }
.nav__item:hover .kbd { opacity: 1; }
.app--wide { grid-template-columns: 0 minmax(0, 1fr); }
.app--wide .side { visibility: hidden; padding: 0; border: 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42ch; }
.crumbs__sep { color: var(--faint); }
.search-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 10px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--muted); font-size: 13px; cursor: pointer; min-width: 190px; }
.search-pill:hover { color: var(--ink); border-color: var(--dash); }
@media (max-width: 900px) {
  .top__collapse, .search-pill span, .crumbs > span { display: none; }
  .search-pill { min-width: 0; padding: 0 8px; }
  .search-pill .kbd { display: none; }
  .app--wide { grid-template-columns: minmax(0, 1fr); }
  .app--wide .side { visibility: visible; padding: 18px 14px; }
}

/* ---------------------------------------------------------------- Cmd+K */
.cmd-wrap { position: fixed; inset: 0; z-index: 150; background: rgba(10, 10, 12, .35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px; animation: fade .12s; }
.cmd { width: min(600px, 100%); background: var(--paper); border-radius: 16px; box-shadow: var(--frame-shadow); overflow: hidden; animation: pop .18s var(--ease); }
.cmd__bar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmd__input { flex: 1; border: 0; background: none; outline: none; height: 52px; font-size: 15px; color: var(--ink); }
.cmd__bar .kbd { cursor: pointer; margin: 0; }
.cmd__list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.cmd__item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
.cmd__item.is-on { background: var(--paper-3); color: var(--ink); }
.cmd__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; font-weight: 500; }
.cmd__sub { font-size: 11.5px; color: var(--muted); flex: none; }
.cmd__empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- light / dark switch (top bar) */
.theme-switch { position: relative; width: 52px; height: 28px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper-2); cursor: pointer; padding: 0; flex: none; transition: background .2s; }
.theme-switch__knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); display: grid; place-items: center; color: var(--amber); transition: transform .25s var(--ease); }
.theme-switch[aria-checked="true"] { background: #2a2a30; }
.theme-switch[aria-checked="true"] .theme-switch__knob { transform: translateX(24px); color: var(--lilac); background: #0b0b0d; }

/* ---------------------------------------------------------------- the Analytics dropdown in the menu */
.nav__item--parent { width: 100%; }
.nav__item--parent.is-parent { color: var(--ink); }
.nav__caret { margin-left: auto; display: inline-grid; transition: transform .2s var(--ease); color: var(--muted); }
.nav__tree.is-open .nav__caret { transform: rotate(180deg); }
.nav__subs { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px 18px; padding-left: 10px; border-left: 1px solid var(--line); animation: fade .15s; }
.nav__sub { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.nav__sub:hover { background: var(--hover); color: var(--ink); }
.nav__sub.is-on { background: var(--red-soft); color: var(--red-ink); font-weight: 600; }
.nav__logo { width: 15px; height: 15px; object-fit: contain; border-radius: 3px; }

/* the video page: four groups, then that group's sections (27 Oct) */
.vtabs { margin: 18px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.vtabs .tabs { margin: 0; }
.vtabs .tab { flex: 1; justify-content: center; padding: 10px 12px; }
.tab__hint { font-size: 11px; font-weight: 400; color: var(--muted); }
.tab.is-on .tab__hint { color: inherit; opacity: .7; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.subtab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink-2); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.subtab:hover { background: var(--hover); }
.subtab.is-on { color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
@media (max-width: 1180px) { .tab__hint { display: none; } }
@media (max-width: 720px) { .vtabs .tab { flex: none; } }

/* expanding pill tabs (27 Oct, his 21st.dev pick): icon-only until open, the open one shows its name */
.ptabs { display: inline-flex; align-items: center; gap: 8px; padding: 6px; margin: 4px 0 16px; border-radius: 99px; background: color-mix(in srgb, var(--paper) 40%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 1px rgba(0, 0, 0, .035); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ptab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 11px; border-radius: 99px; text-decoration: none; color: var(--ink); background: var(--paper); flex: none;
  box-shadow: 0 3px 9px rgba(32, 32, 36, .09), 0 1px 1px rgba(32, 32, 36, .06), inset 0 2px 0 rgba(255, 255, 255, .92); transition: transform .25s cubic-bezier(.34, 1.4, .64, 1), box-shadow .25s; }
.ptab .ic { opacity: .78; }
.ptab:hover { transform: scale(1.045); }
.ptab:active { transform: scale(.94); }
.ptab.is-on { padding-right: 16px; box-shadow: 0 7px 18px rgba(32, 32, 36, .14), 0 1px 2px rgba(32, 32, 36, .08), inset 0 2px 0 rgba(255, 255, 255, .98); }
.ptab.is-on .ic { opacity: 1; color: var(--red); }
.ptab__label { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; animation: ptab-in .45s cubic-bezier(.34, 1.3, .64, 1); }
@keyframes ptab-in { from { max-width: 0; opacity: 0; transform: translateX(-7px); } to { max-width: 220px; opacity: 1; transform: none; } }
.ptab:not(.is-on):hover::after { content: attr(data-label); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--paper); background: var(--ink); pointer-events: none; z-index: 5; }
:root[data-theme="dark"] .ptabs { background: rgba(255, 255, 255, .025); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(255, 255, 255, .055); }
:root[data-theme="dark"] .ptab { background: #202023; box-shadow: 0 3px 9px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .035), inset 0 2px 0 rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .ptab.is-on { background: #29292c; box-shadow: 0 7px 18px rgba(0, 0, 0, .34), inset 0 2px 0 rgba(255, 255, 255, .16); }
@media (prefers-reduced-motion: reduce) { .ptab, .ptab__label { transition: none; animation: none; } }
