/* MKT Portal components. Plain CSS classes for Jinja2 + HTMX templates; every value comes from tokens.css.
   Fonts: the portal self-hosts the three faces; this import is for the design-system previews only. */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/20px var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.num { font-family: var(--font-num); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: var(--control-h); padding: 0 var(--s2); border-radius: var(--r-pill); border: 1px solid transparent;
  font: 600 14px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-fill) 88%, var(--fg)); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--control-border); }
.btn-secondary:hover { background: var(--surface-muted); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--surface-muted); }
.btn-danger { background: var(--danger-fill); color: var(--on-danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger-fill) 88%, var(--fg)); }
.btn-lg { min-height: var(--control-h-lg); padding: 0 var(--s3); font-size: 15px; }
.btn-sm { min-height: var(--control-h-sm); padding: 0 var(--s15); font-size: 13px; }
.btn-icon { padding: 0; width: var(--control-h); }
.btn-icon.btn-sm { width: var(--control-h-sm); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.htmx-request { cursor: progress; }
.spinner { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.btn .spinner { display: none; }
.btn.htmx-request .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Field */
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font: 600 13px/16px var(--font-body); color: var(--fg); }
.field-label .optional { font-weight: 400; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: var(--control-h); padding: 0 var(--s15);
  background: var(--surface); color: var(--fg); border: 1px solid var(--control-border); border-radius: var(--r-sm);
  font: 400 14px/20px var(--font-body);
}
.textarea { padding: 10px var(--s15); min-height: 96px; resize: vertical; }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input[readonly] { background: var(--surface-muted); }
.field-help { font: 400 12px/16px var(--font-body); color: var(--muted); }
.field-error { display: none; font: 600 12px/16px var(--font-body); color: var(--danger); }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--danger); }
.field.is-invalid .field-error { display: flex; gap: var(--s05); align-items: center; }
.form-grid { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s1); justify-content: flex-end; }

/* Choice: checkbox and radio */
.choice { display: flex; gap: var(--s1); align-items: flex-start; cursor: pointer; }
.choice input { appearance: none; flex: none; margin: 2px 0 0; width: 16px; height: 16px; border: 1px solid var(--control-border); border-radius: var(--r-xs); background: var(--surface); display: grid; place-content: center; }
.choice input[type="radio"] { border-radius: 50%; }
.choice input:checked { background: var(--accent-fill); border-color: var(--accent-fill); }
.choice input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.choice input[type="radio"]:checked::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }
.choice input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-text { display: grid; gap: 2px; }
.choice-text strong { font-weight: 600; }
.choice-text small { font-size: 12px; line-height: 16px; color: var(--muted); }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: var(--s05); height: 24px; padding: 0 10px; border-radius: var(--r-pill); font: 600 12px/1 var(--font-body); white-space: nowrap; background: var(--surface-muted); color: var(--muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

/* Scope chip */
.scope { display: inline-flex; align-items: center; max-width: 100%; height: 28px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font: 400 13px/1 var(--font-body); color: var(--fg); overflow: hidden; }
.scope-kind { align-self: stretch; display: inline-flex; align-items: center; padding: 0 10px; background: var(--surface-muted); color: var(--muted); font: 600 11px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.scope-path { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scope-path .sep { color: var(--muted); }
.scope-global .scope-kind { background: var(--accent-soft); color: var(--accent); }

/* Panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s15); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
.panel-header p { color: var(--muted); font-size: 13px; }
.panel-body { padding: var(--s3); display: grid; gap: var(--s2); }
.panel-footer { padding: var(--s2) var(--s3); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s1); justify-content: flex-end; }
.panel-danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.panel-danger .panel-header h2 { color: var(--danger); }

/* Data table */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font: 400 14px/20px var(--font-body); }
.table th { position: sticky; top: 0; background: var(--surface-muted); color: var(--muted); font: 600 12px/16px var(--font-body); letter-spacing: .04em; text-align: left; padding: var(--s1); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: var(--s2); }
.table th:last-child, .table td:last-child { padding-right: var(--s2); }
.table td { padding: var(--s1); height: var(--row-h); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-muted); }
.table tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.table .cell-primary { display: grid; gap: 2px; }
.table .cell-primary strong { font-weight: 600; }
.table .cell-primary small { color: var(--muted); font-size: 12px; line-height: 16px; }
.table .cell-num { font-family: var(--font-num); font-weight: 500; font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; white-space: nowrap; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .scope { max-width: 260px; }
.table th[aria-sort] button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.table[aria-busy="true"] tbody { opacity: .45; transition: opacity .2s ease; }
.table-status { display: inline-flex; gap: var(--s1); align-items: center; }
.table-wrap > .panel-header { padding-left: var(--s2); padding-right: var(--s2); }
.table-toolbar { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; justify-content: space-between; padding: var(--s15) var(--s2); border-bottom: 1px solid var(--line); background: var(--surface); }
.table-toolbar .input { max-width: 280px; min-height: var(--control-h-sm); }
.table-footer { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; justify-content: space-between; padding: var(--s15) var(--s2); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* Tabs */
.tabs { display: flex; gap: var(--s05); padding: var(--s05); background: var(--surface-muted); border-radius: var(--r-pill); width: max-content; max-width: 100%; overflow-x: auto; }
.tab { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: var(--control-h-sm); padding: 0 var(--s2); border-radius: var(--r-pill); font: 600 13px/1 var(--font-body); color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px var(--glass-rim), inset 0 0 0 1px var(--line); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab .count { font-family: var(--font-num); font-size: 12px; color: var(--muted); }

/* App shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100%; background: var(--bg); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: var(--s2); display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); }
.sidebar-close { display: none; }
.shell.is-collapsed { grid-template-columns: minmax(0, 1fr); }
.shell.is-collapsed .sidebar { display: none; }
.topbar .topbar-brand { display: none; }
.shell.is-collapsed .topbar .topbar-brand { display: flex; }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; font: 600 17px/1 var(--font-display); letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
.brand-mark { height: 22px; width: auto; flex: none; }
.brand-mark .ink { fill: currentColor; }
.brand-mark .dot { fill: var(--accent-fill); }
.brand span { color: var(--muted); }
.nav-group { display: grid; gap: 2px; }
.nav-group-label { padding: 0 12px 6px; font: 600 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); color: var(--muted); font: 600 14px/1 var(--font-body); text-decoration: none; }
.nav-item:hover { color: var(--fg); background: var(--surface-muted); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--fg); }
.nav-item[aria-current="page"] .icon { color: var(--accent); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: var(--s15); padding: 0 var(--s3); background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); border-bottom: 1px solid var(--line); }
.topbar .spacer { flex: 1; }
.switcher { display: inline-flex; align-items: center; gap: var(--s1); height: var(--control-h); padding: 0 var(--s15) 0 6px; border: 1px solid var(--control-border); border-radius: var(--r-pill); background: var(--surface); font: 600 14px/1 var(--font-body); color: var(--fg); cursor: pointer; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 12px/1 var(--font-body); flex: none; }
.content { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--s4) var(--s3) var(--s6); display: grid; gap: var(--s3); align-content: start; }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .sidebar.is-open { display: flex; position: fixed; inset: 0 auto 0 0; width: min(var(--sidebar-w), 86vw); z-index: 40; box-shadow: var(--shadow-dialog); }
  .sidebar.is-open .sidebar-close { display: inline-flex; }
  .topbar .topbar-brand { display: flex; }
  .content { padding: var(--s3) var(--s2) var(--s6); }
  .topbar { padding: 0 var(--s2); }
}

/* Menu */
.menu { display: grid; gap: 2px; min-width: 240px; padding: var(--s1); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-float); }
.menu-header { display: grid; gap: 2px; padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu-header strong { font-weight: 600; }
.menu-header small { color: var(--muted); font-size: 12px; line-height: 16px; }
.menu-item { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); color: var(--fg); font: 600 14px/1 var(--font-body); text-decoration: none; }
.menu-item:hover { background: var(--surface-muted); }
.menu-item:focus-visible { background: var(--surface-muted); outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-item-danger { color: var(--danger); }
.menu-sep { height: 1px; margin: 6px 0; background: var(--line); }

/* Listbox */
.listbox { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; padding: var(--s05); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--r-sm); }
.option { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-xs); cursor: pointer; }
.option:hover { background: var(--surface-muted); }
.option[aria-selected="true"] { background: var(--accent-soft); }
.option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.option strong { font-weight: 600; }
.option small { color: var(--muted); font-size: 12px; line-height: 16px; }
.listbox-empty { padding: 8px 10px; color: var(--muted); }

/* Page header */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s2); }
.page-header .eyebrow { font: 600 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.page-header h1 { font-size: 28px; line-height: 34px; letter-spacing: -0.02em; }
.page-header .lede { color: var(--muted); margin-top: 6px; max-width: 65ch; }
.page-header .actions { display: flex; flex-wrap: wrap; gap: var(--s1); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; }

/* Dialog */
.scrim { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; padding: var(--s2); z-index: 50; }
.dialog { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-dialog); display: grid; }
.dialog-header { padding: var(--s3) var(--s3) 0; display: grid; gap: var(--s1); }
.dialog-header h2 { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
.dialog-body { padding: var(--s2) var(--s3); display: grid; gap: var(--s2); color: var(--fg); }
.dialog-body p { color: var(--muted); }
.dialog-footer { padding: 0 var(--s3) var(--s3); display: flex; flex-wrap: wrap; gap: var(--s1); justify-content: flex-end; }
.dialog-danger .dialog-header h2 { color: var(--danger); }

/* Banner and toast */
.banner { display: flex; gap: var(--s15); align-items: flex-start; padding: var(--s15) var(--s2); border-radius: var(--r-sm); background: var(--info-soft); color: var(--fg); }
.banner .icon { color: var(--info); margin-top: 1px; }
.banner-warning { background: var(--warning-soft); } .banner-warning .icon { color: var(--warning); }
.banner-danger { background: var(--danger-soft); } .banner-danger .icon { color: var(--danger); }
.banner-success { background: var(--success-soft); } .banner-success .icon { color: var(--success); }
.banner strong { display: block; font-weight: 600; }
.toasts { position: fixed; right: var(--s3); bottom: var(--s3); display: grid; gap: var(--s1); z-index: 60; }
.toast { display: flex; align-items: center; gap: var(--s15); min-width: 280px; max-width: 420px; padding: var(--s15) var(--s15) var(--s15) var(--s2); background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-float); }
.toast .icon { color: var(--success); }
.toast-danger .icon { color: var(--danger); }
.toast p { flex: 1; }

/* Empty state */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s15); padding: var(--s6) var(--s3); }
.empty-mark { width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty h3 { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
.empty p { color: var(--muted); max-width: 46ch; }

/* Metric tile */
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s2) var(--s3); display: grid; gap: 6px; min-width: 0; }
.metric-label { font: 600 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.metric-value { font: 700 32px/36px var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric-delta { font: 500 13px/18px var(--font-num); display: inline-flex; gap: 4px; align-items: center; }
.metric-delta.up { color: var(--success); }
.metric-delta.down { color: var(--danger); }
.metric-delta .vs { color: var(--muted); font-family: var(--font-body); font-weight: 400; }

/* Corrections from Mark's review, 2026-11-09 */
.table .cell-primary > .badge { justify-self: start; }
.dialog { align-content: start; }
.dialog-footer { align-items: center; }
.form-grid { align-items: start; }
.metric { align-content: start; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-fill); }
.badge::before { flex: none; aspect-ratio: 1; }
.choice input[type="radio"]:checked { background: var(--surface); border-color: var(--accent-fill); }
.choice input[type="radio"]:checked::after { width: 8px; height: 8px; background: var(--accent-fill); }
.choice input[type="checkbox"]:checked::after { width: 10px; height: 10px; border: 0; transform: none; background: var(--accent-ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.6 5.3l2.2 2.2 4.6-4.9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.6 5.3l2.2 2.2 4.6-4.9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.chip { font-family: var(--font-body); }

/* Corrections from Mark's second review, 2026-11-10 */
.num, .t-data, .table .cell-num, .metric-delta, .tab .count { font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.badge::before { width: 8px; height: 8px; border-radius: 0; background: radial-gradient(circle closest-side, currentColor 92%, transparent 100%); }
.badge:has(.spinner)::before { display: none; }
input[type="checkbox"], input[type="radio"] { appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 16px; height: 16px; border: 1px solid var(--control-border); border-radius: var(--r-xs); background: var(--surface); display: inline-grid; place-content: center; vertical-align: -3px; cursor: pointer; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked { background: var(--accent-fill); border-color: var(--accent-fill); }
input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 10px; background: var(--accent-ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.6 5.3l2.2 2.2 4.6-4.9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.6 5.3l2.2 2.2 4.6-4.9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
input[type="radio"]:checked { background: var(--surface); border-color: var(--accent-fill); }
input[type="radio"]:checked::after, .choice input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 0; color: var(--accent-fill); background: radial-gradient(circle closest-side, currentColor 92%, transparent 100%); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .45; cursor: not-allowed; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table .cell-actions { text-align: center; }
.table th.cell-center, .table td.cell-center { text-align: center; white-space: nowrap; }
.cell-primary { display: grid; gap: 2px; }
.cell-primary strong { font-weight: 600; }
.cell-primary small { color: var(--muted); font-size: 12px; line-height: 16px; }
.inline-badges { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.field-label .badge { margin-left: 8px; vertical-align: middle; }
fieldset > legend.field-label { padding: 0; margin-bottom: 8px; }
.table .scope { max-width: none; }
.scope { height: auto; min-height: 28px; }
.scope-path { white-space: normal; overflow: visible; text-overflow: clip; padding-top: 4px; padding-bottom: 4px; line-height: 18px; }
