/* ============================================================
   RowFold — Rethought. Calm-modern system, editorial soul.
   ============================================================ */
/* Design tokens live in tokens.css — the single :root for the whole product. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1,h2,h3,h4 { margin: 0; font-weight: 600; }
::selection { background: var(--accent); color: var(--ink-900); }

/* Keyboard focus — visible, never on mouse click */
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; border-radius: 4px; }
.rail :focus-visible { outline-color: var(--accent-deep); }

/* Reduced motion — flatten all animation, not just .fade-in */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.serif  { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.mono   { font-family: var(--font-mono); }
.tnum   { font-variant-numeric: tabular-nums; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(20,24,46,0.14); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(20,24,46,0.28); background-clip: padding-box; border: 3px solid transparent; }

/* ===== APP SHELL ===== */
.app {
    display: grid;
    grid-template-columns: var(--rail-w) 1fr;
    height: 100vh;
    overflow: hidden;
}

/* ---- Rail (sidebar) — light warm surface, single merged mode ---- */
.rail {
    background: var(--rail-bg);
    color: var(--text-2);
    display: flex;
    flex-direction: column;
    padding: 16px 12px 12px;
    gap: 2px;
    overflow: hidden;
    position: relative;
    border-right: 1px solid var(--rail-border);
}
/* Trial countdown — sits above the user footer */
.trial-chip {
    display: flex; align-items: center; gap: 7px; margin: 6px 4px 8px;
    padding: 7px 11px; border-radius: 9px;
    background: var(--accent-tint); border: 1px solid #E3EDB0;
    color: var(--accent-ink); font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em;
    position: relative; z-index: 1;
}
.trial-chip svg { flex-shrink: 0; opacity: 0.85; }

.rail > * { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; text-decoration: none; }
/* The brand mark is the transparent rowfold-mark.svg (with the lime folded corner) — no tile
   background, no border-radius that would clip its rounded cells. Same asset as the marketing site. */
.brand-mark { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 19px; color: var(--text); letter-spacing: -0.01em; }
.brand-name em { font-style: italic; color: var(--accent-deep); }

/* ── Branded load splash — first app load per session (see _Layout.cshtml) ── */
/* The background lives on two paper panels, not on #rf-splash, so they can fold back and reveal
   the app underneath — a "RowFold" un-fold that ties into the folded-corner logo. */
#rf-splash { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center;
    justify-content: center; background: transparent; perspective: 1500px; }
.rf-fold { position: absolute; top: 0; bottom: 0; background: var(--paper); backface-visibility: hidden;
    transition: transform 0.62s cubic-bezier(0.66, 0, 0.34, 1), opacity 0.32s ease 0.34s; }
/* +1px so the two halves overlap at the crease — no hairline of the app showing through before
   the fold. Each pivots on its OUTER edge, so they swing back like double doors opening. */
.rf-fold-l { left: 0; width: calc(50% + 1px); transform-origin: left center; }
.rf-fold-r { right: 0; width: calc(50% + 1px); transform-origin: right center; }
#rf-splash.rf-splash-out .rf-fold-l { transform: rotateY(100deg); opacity: 0; }
#rf-splash.rf-splash-out .rf-fold-r { transform: rotateY(-100deg); opacity: 0; }
.rf-splash-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center;
    gap: 20px; animation: rf-splash-rise 0.5s ease both;
    transition: opacity 0.26s ease, transform 0.26s ease; }
/* The mark bows out first (quick), so the panels open onto empty paper, not onto the logo. */
#rf-splash.rf-splash-out .rf-splash-inner { opacity: 0; transform: scale(0.92); }
/* The real brand mark (rowfold-mark.svg), gently breathing. */
.rf-splash-mark { width: 60px; height: 60px; display: block; animation: rf-mark-pulse 1.5s ease-in-out infinite; }
.rf-splash-word { font-family: var(--font-display); font-size: 26px; color: var(--text); letter-spacing: -0.01em; }
.rf-splash-word em { font-style: italic; color: var(--accent-deep); }
@keyframes rf-mark-pulse { 0%, 100% { transform: scale(1); opacity: 0.92; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes rf-splash-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Reduced motion: no mark pulse, no 3D fold — the panels just fade out. */
@media (prefers-reduced-motion: reduce) {
    .rf-splash-inner, .rf-splash-mark { animation: none; }
    .rf-fold { transition: opacity 0.35s ease; }
    #rf-splash.rf-splash-out .rf-fold-l,
    #rf-splash.rf-splash-out .rf-fold-r { transform: none; opacity: 0; }
}

/* workspace switcher */
.ws-switch {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 11px;
    background: var(--card);
    border: 1px solid var(--rail-border);
    cursor: pointer; transition: 0.16s; margin-bottom: 10px;
    text-decoration: none; color: inherit;
}
.ws-switch:hover { background: var(--card); border-color: var(--border-2); color: inherit; }
.ws-glyph {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 14px; color: #fff; font-weight: 700;
}
.ws-switch .ws-meta { flex: 1; min-width: 0; }
.ws-switch .ws-nm { font-size: 13px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-switch .ws-sub { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rail-scroll { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; display: flex; flex-direction: column; gap: 1px; }
.rail-scroll::-webkit-scrollbar { width: 4px; }

.rail-label {
    font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 700;
    color: #A29B85; padding: 16px 10px 6px;
    display: flex; align-items: center; justify-content: space-between;
}
.rail-label a, .rail-label button {
    color: var(--text-faint); font-size: 14px; line-height: 1; padding: 0 4px;
    border-radius: 5px; background: none; border: none; cursor: pointer; text-decoration: none;
}
.rail-label a:hover, .rail-label button:hover { background: rgba(20,24,46,0.06); color: var(--text); }

.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; border-radius: 9px;
    color: var(--text-2); font-size: 13px; font-weight: 500;
    transition: 0.13s; cursor: pointer; text-decoration: none;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.72; }
.nav-item:hover { background: var(--rail-hover); color: var(--text); }
.nav-item.active { background: var(--rail-active); color: var(--text); font-weight: 650; box-shadow: var(--shadow-sm); }
.nav-item.active svg { opacity: 1; }
.nav-item .badge {
    margin-left: auto; background: var(--accent-tint); color: var(--accent-ink);
    padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 700;
}

/* table leaves */
.tbl-leaf {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 9px;
    color: var(--text-2); font-size: 13px; cursor: pointer; transition: 0.13s;
    text-decoration: none;
}
.tbl-leaf:hover { background: var(--rail-hover); color: var(--text); }
.tbl-leaf.active { background: var(--rail-active); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.tbl-leaf.add { color: var(--accent-ink); border: 1px dashed var(--border-2); margin-top: 4px; }
.tbl-leaf.add:hover { color: var(--accent-ink); border-color: var(--accent-deep); background: var(--accent-tint-2); }
.tbl-swatch { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.tbl-leaf .leaf-nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-leaf .leaf-ct { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* (Removed: .leaf-views / .vpill — the rail's per-table view pills. View selection lives
   only in the table header now; see Pages/Shared/_ViewSwitcher.cshtml.) */

/* rail footer */
.rail-foot { display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; margin-top: 6px; border-top: 1px solid var(--rail-border); }
.rail-foot .rf-nm { font-size: 12.5px; color: var(--text); font-weight: 550; line-height: 1.2; }
.rail-foot .rf-em { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-settings { width: 28px; height: 28px; border-radius: 8px; color: var(--text-faint); display: grid; place-items: center; flex-shrink: 0; text-decoration: none; }
.rf-settings:hover { background: rgba(20,24,46,0.06); color: var(--text); }
.rf-settings svg { width: 16px; height: 16px; }

/* ---- Builder Studio rail chrome removed ----
   The Use / Builder-Studio split is dissolved in the Clarity overhaul: schema, people,
   permissions, workflow and audit are now ordinary destinations in the one light rail.
   The former dark studio rail, doorway and exit pills no longer render. */
.rail-sublabel {
    font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700;
    color: #A29B85; padding: 10px 10px 5px;
}

/* ---- Main column ---- */
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--paper); }
.topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 26px; min-height: 60px; flex-shrink: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(251,248,241,0.88); backdrop-filter: blur(8px);
    position: relative; z-index: 10;
}

.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); }
.crumbs a { text-decoration: none; color: inherit; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--text-faint); }
.crumbs .cur { color: var(--text); font-weight: 600; }
.crumbs .ws-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 7px; background: #fff; border: 1px solid var(--border); color: var(--text-2); }
.studio-crumb { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--relation-ink); }
.studio-crumb .sc-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--relation); box-shadow: 0 0 0 3px rgba(124,92,255,0.18); }
.studio-warn {
    display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
    color: var(--relation-ink); background: rgba(124,92,255,0.12); border: 1px solid rgba(124,92,255,0.22);
    padding: 4px 10px; border-radius: 999px;
}
.studio-warn svg { width: 13px; height: 13px; }
.tb-spacer { flex: 1; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: #fff; border: 1px solid var(--border); color: var(--text);
    padding: 7px 13px; border-radius: 9px; font-size: 13px; font-weight: 550;
    transition: 0.14s; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--card-2); border-color: var(--border-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--ink-900); border-color: var(--accent-deep); font-weight: 650; }
.btn.primary:hover { background: var(--accent-deep); color: var(--ink-900); }
.btn.ink { background: var(--ink-900); color: #fff; border-color: var(--ink-900); font-weight: 600; }
.btn.ink:hover { background: var(--ink-800); color: #fff; }
.btn.accent { background: var(--accent); color: var(--ink-900); border-color: var(--accent-deep); font-weight: 650; }
.btn.accent:hover { background: var(--accent-deep); color: var(--ink-900); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(20,24,46,0.05); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.icon { padding: 7px; }

/* search button */
.search-btn {
    display: flex; align-items: center; gap: 8px; width: 320px;
    background: #fff; border: 1px solid var(--rail-border); border-radius: 10px;
    padding: 8px 12px; color: var(--muted-2); font-size: 13px; transition: 0.14s; cursor: pointer;
    font-family: inherit;
}
.search-btn:hover { border-color: var(--border-2); background: var(--card-2); }
.search-btn .sp { flex: 1; text-align: left; }
.kbd {
    font-family: var(--font-mono); font-size: 10.5px; padding: 2px 6px;
    border: 1px solid var(--border); border-radius: 5px; background: var(--paper-2); color: var(--text-muted);
}

/* New menu */
.new-wrap { position: relative; }
.new-menu {
    position: absolute; top: calc(100% + 8px); right: 0; width: 288px;
    background: var(--card); border: 1px solid var(--border); border-radius: 13px;
    box-shadow: var(--shadow-lg); padding: 6px; z-index: 30;
    opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
    transition: opacity 0.14s, transform 0.14s;
}
.new-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.new-menu-item {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 9px 10px; border-radius: 9px; transition: 0.12s; cursor: pointer;
    background: none; border: none; font-family: inherit;
}
.new-menu-item:hover { background: var(--card-2); }
.new-menu-item .mi-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.new-menu-item .mi-ic svg { width: 15px; height: 15px; }
.new-menu-item .mi-t { font-size: 13.5px; font-weight: 600; }
.new-menu-item .mi-s { font-size: 11.5px; color: var(--text-muted); }

/* scroll area + page */
.scroll-area { flex: 1; overflow-y: auto; min-height: 0; }
.page { padding: 26px 30px 80px; max-width: 1180px; margin: 0 auto; }
.page.wide { max-width: 1480px; }

/* Typography */
.eyebrow { font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); }
/* .page-title itself is defined once, in the "Page header pattern" section below —
   it used to be declared twice (34px here vs 28px there) with the later winning. */
.page-title em { font-style: italic; color: var(--accent-deep); }
.section-label { font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); }

/* ===== HOME ===== */
.greet { font-family: var(--font-display); font-size: 40px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.greet em { font-style: italic; color: var(--accent-deep); }
.greet-sub { color: var(--text-muted); font-size: 15px; margin-top: 8px; }

.home-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; margin-top: 26px; }
@media (max-width: 1080px) { .home-grid { grid-template-columns: 1fr; } }

.stat-strip { display: flex; gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.stat { flex: 1; padding: 15px 20px; border-right: 1px solid var(--border-soft); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-size: 27px; font-weight: 500; line-height: 1; }
.stat .lbl { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-top: 6px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card.pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--border-soft); }
.card-head h3 { font-size: 15px; font-weight: 650; margin: 0; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
.mt24 { margin-top: 24px; }

/* Table cards */
.tbl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tbl-card {
    display: flex; gap: 13px; align-items: center; padding: 14px 15px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; transition: 0.15s; text-decoration: none; color: inherit;
}
.tbl-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.tbl-glyph { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; color: #fff; flex-shrink: 0; }
.tbl-card .tc-nm { font-weight: 650; font-size: 14.5px; }
.tbl-card .tc-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 2px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; transition: 0.13s; cursor: pointer; }
.check-row:hover { background: var(--card-2); }
.check-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-2); flex-shrink: 0; display: grid; place-items: center; transition: 0.15s; }
.check-row.done .check-box { background: var(--mint); border-color: var(--mint); color: #fff; }
.check-row .cr-ttl { font-size: 13.5px; font-weight: 600; }
.check-row.done .cr-ttl { color: var(--text-muted); }
.check-row .cr-desc { font-size: 12px; color: var(--text-muted); }
.check-row .cr-arr { margin-left: auto; color: var(--text-faint); opacity: 0; transition: 0.13s; }
.check-row:hover .cr-arr { opacity: 1; }
.progress-track { height: 7px; background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); border-radius: 4px; transition: width 0.4s ease; }

/* Recents */
.recent { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: 0.13s; text-decoration: none; color: inherit; }
.recent:hover { background: var(--card-2); color: inherit; }
.recent .rdot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.recent .rnm { font-size: 13px; font-weight: 550; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent .rwhere { font-size: 11.5px; color: var(--text-muted); }

/* Ask card */
.ask-card {
    background: linear-gradient(150deg, var(--ink-900), var(--ink-800));
    color: #fff; border-radius: var(--radius-lg); padding: 20px; position: relative; overflow: hidden; cursor: pointer;
}
.ask-card::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(217,242,92,0.10) 1px, transparent 1px);
    background-size: 18px 18px; opacity: 0.6;
}
.ask-card > * { position: relative; }
.ask-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.ask-card h3 em { font-style: italic; color: var(--accent); }
.ask-input { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); border-radius: 10px; padding: 9px 12px; margin-top: 12px; color: rgba(255,255,255,0.6); font-size: 12.5px; }

/* ===== TABLE HERO + TOOLBAR ===== */
.table-hero { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.table-hero .th-glyph { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 27px; color: #fff; flex-shrink: 0; }
.table-hero h1 { font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.table-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-muted); margin-top: 4px; flex-wrap: wrap; }
.table-meta .mdot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.view-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--paper-2); border: 1px solid var(--border); border-radius: 11px; }
.view-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); transition: 0.13s; cursor: pointer; text-decoration: none; }
.view-tab svg { width: 14px; height: 14px; }
.view-tab:hover { color: var(--text); }
.view-tab.active { background: var(--card); color: var(--ink-900); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }

/* Saved views: the switcher now lists a table's named views, so a tab carries a type glyph
   plus a user-chosen name rather than a fixed label. */
.vt-glyph { font-size: 12px; opacity: 0.75; line-height: 1; }
.vt-name { max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-tab.active .vt-glyph { opacity: 1; }

/* Add-view menu — a <details> so it opens and closes without any JS. */
.view-add { position: relative; }
.view-add > summary { list-style: none; }
.view-add > summary::-webkit-details-marker { display: none; }
.view-tab-add { color: var(--text-faint); font-weight: 700; }
.view-tab-add:hover { color: var(--accent-ink); background: var(--accent-tint-2); }
.view-add[open] > summary { background: var(--card); color: var(--ink-900); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.view-add-menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 268px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-pop); padding: 6px; animation: popIn 0.13s ease-out;
}
@media (prefers-reduced-motion: reduce) { .view-add-menu { animation: none; } }
.vam-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); padding: 7px 10px 5px; }
.vam-item {
    display: grid; grid-template-columns: 20px 1fr; grid-template-rows: auto auto; gap: 0 9px;
    width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm);
    background: none; border: 0; cursor: pointer; transition: 0.12s;
}
.vam-item:hover { background: var(--accent-tint-2); }
.vam-glyph { grid-row: 1 / span 2; align-self: center; font-size: 15px; opacity: 0.75; }
.vam-label { font-size: 13px; font-weight: 650; color: var(--text); }
.vam-hint { font-size: 11.5px; color: var(--text-muted); }

/* Per-view manage menu (rename / set default / delete) — same <details> popover, no JS. */
.view-tab-wrap { position: relative; display: inline-flex; align-items: center; }
.view-menu > summary { list-style: none; }
.view-menu > summary::-webkit-details-marker { display: none; }
.view-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 22px;
    margin-left: -3px; border-radius: 6px; font-size: 13px; line-height: 1; color: var(--text-faint);
    cursor: pointer; opacity: 0; transition: 0.12s; }
.view-tab-wrap:hover .view-menu-btn, .view-tab-wrap.active .view-menu-btn, .view-menu[open] .view-menu-btn { opacity: 1; }
.view-menu-btn:hover { color: var(--text); background: var(--card-2); }
.view-menu-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 212px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-pop); padding: 6px; display: flex; flex-direction: column; gap: 2px;
    animation: popIn 0.13s ease-out; }
@media (prefers-reduced-motion: reduce) { .view-menu-pop { animation: none; } }
.vm-rename { display: flex; gap: 6px; padding: 2px 2px 7px; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.vm-rename input { flex: 1; min-width: 0; padding: 6px 9px; font: inherit; font-size: 13px; color: var(--text);
    background: var(--paper-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.vm-rename input:focus { outline: none; border-color: var(--accent-deep); }
.vm-save { padding: 6px 11px; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--ink-900);
    background: var(--accent); border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.vm-item { width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); background: none;
    border: 0; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; transition: 0.12s; }
.vm-item:hover { background: var(--accent-tint-2); }
.vm-danger { color: #C53B1C; }
.vm-danger:hover { background: rgba(197, 59, 28, 0.1); }
.vt-default { font-size: 10px; color: var(--accent-deep); margin-left: 1px; line-height: 1; }

/* ===== RELATIONSHIP / DERIVED-FIELD PREVIEW =====
   The plain-English panel under the relationship, lookup and rollup builders. Showing the
   sentence before saving is the whole point of the builder — a relationship's direction and
   its delete behaviour are invisible in a form full of dropdowns. */
.rel-preview {
    margin-top: 14px; padding: 12px 14px; border-radius: var(--radius);
    background: var(--accent-tint-2); border: 1px solid var(--border);
}
.rel-preview-head {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-faint); margin-bottom: 6px;
}
.rel-sentence { font-size: 13px; line-height: 1.5; color: var(--text); margin: 0 0 4px; font-weight: 550; }
.rel-sentence.muted { color: var(--text-2); font-weight: 450; }
.rel-consequence { font-size: 12px; line-height: 1.5; color: var(--text-muted); margin: 8px 0 0; }
/* Ownership deletes data, so its consequence line is marked, not just stated. Colour is
   paired with the ⚠ glyph so it does not rely on hue alone. */
.rel-consequence.warn { color: var(--rollup-ink); font-weight: 550; }
.rel-consequence.warn::before { content: "⚠ "; }
.label-optional { font-weight: 400; color: var(--text-faint); }

/* Readable formula shown for Lookup/Rollup fields in the field list, replacing the raw
   key string that used to be printed there. */
.derived-formula {
    font-size: 12px; color: var(--text-2);
    display: inline-flex; align-items: center; gap: 5px;
}
.derived-formula .df-glyph { opacity: 0.7; }

/* Ownership marker in the field list. Text + colour, never colour alone. */
.chip-nested { margin-left: 6px; background: var(--violet-soft); color: var(--relation-ink); }
/* Inline "Make nested / Make reference" action inside the field row. */
.btn-inline-link { font-size: 11.5px; margin-left: 6px; }
.d-inline { display: inline; }

/* ===== DIALOG =====
   Native <dialog>, replacing the two Bootstrap modals that were the app's only reason to
   ship Bootstrap's JS bundle. The platform gives us the focus trap, focus restore on close,
   Esc-to-dismiss and the inert backdrop for free — all things the old markup relied on
   Bootstrap for, and all things on the accessibility checklist. Open with .showModal(). */
.rf-dialog {
    padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--card); box-shadow: var(--shadow-lg); color: var(--text);
    width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); overflow: visible;
}
.rf-dialog.wide { width: min(760px, calc(100vw - 32px)); }
.rf-dialog::backdrop { background: rgba(14, 20, 40, 0.42); backdrop-filter: blur(2px); }
.rf-dialog[open] { animation: popIn 0.14s ease-out; }
@media (prefers-reduced-motion: reduce) { .rf-dialog[open] { animation: none; } }

.rf-dialog-form { display: flex; flex-direction: column; max-height: calc(100vh - 64px); }
.rf-dialog-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.rf-dialog-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin: 0; }
.rf-dialog-x {
    border: 0; background: none; cursor: pointer; font-size: 21px; line-height: 1;
    color: var(--text-faint); padding: 2px 6px; border-radius: var(--radius-sm); transition: 0.12s;
}
.rf-dialog-x:hover { background: var(--paper-2); color: var(--text); }
.rf-dialog-body { padding: 20px; overflow-y: auto; flex: 1; }
.rf-dialog-foot {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    padding: 12px 20px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.rf-dialog-tip {
    background: var(--accent-tint-2); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 14px; font-size: 13px; color: var(--text-muted); margin-bottom: 16px;
}
.rf-dialog-tip strong { color: var(--text); }
.field-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.form-label-caps {
    display: block; font-size: 12.5px; font-weight: 650; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 5px;
}

/* Export menu in the filter bar. Same <details> pattern as the add-view menu — no JS, and it
   states the row count up front so you know whether you are exporting the filtered set or
   everything before you click. */
.fb-export { position: relative; }
.fb-export > summary { list-style: none; cursor: pointer; }
.fb-export > summary::-webkit-details-marker { display: none; }
.fb-export[open] > summary { border-color: var(--border-2); background: var(--card-2); }
.fb-export-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 250px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-pop); padding: 6px; animation: popIn 0.13s ease-out;
}
@media (prefers-reduced-motion: reduce) { .fb-export-menu { animation: none; } }
.fbx-head {
    font-size: 11.5px; color: var(--text-muted); padding: 8px 10px 7px;
    border-bottom: 1px solid var(--border-soft); margin-bottom: 4px;
}
.fbx-head strong { color: var(--text); font-variant-numeric: tabular-nums; }
.fbx-item {
    display: flex; flex-direction: column; gap: 1px; padding: 8px 10px;
    border-radius: var(--radius-sm); text-decoration: none; transition: 0.12s;
}
.fbx-item:hover { background: var(--accent-tint-2); }
.fbx-label { font-size: 13px; font-weight: 650; color: var(--text); }
.fbx-hint { font-size: 11.5px; color: var(--text-muted); }

/* Setup state — shown INSTEAD of a view that is missing a required field mapping, so an
   unconfigured calendar can never be mistaken for an empty table. */
.view-setup { display: flex; justify-content: center; padding: 40px 20px; }
.vs-card {
    max-width: 460px; width: 100%; text-align: center; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 34px 30px;
}
.vs-glyph { font-size: 30px; opacity: 0.34; line-height: 1; margin-bottom: 14px; }
.vs-head { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--ink-900); margin: 0 0 8px; }
.vs-body { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 0 0 20px; }
.vs-hint { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.vs-form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.vs-label { font-size: 11.5px; font-weight: 650; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 550; color: var(--text-2); border: 1px solid var(--border); background: #fff; transition: 0.13s; cursor: pointer; }
.chip-btn svg { width: 14px; height: 14px; opacity: 0.7; }
.chip-btn:hover { border-color: var(--border-2); background: var(--card-2); }

/* ===== GRID ===== */
.grid-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.grid-virt { overflow: auto; max-height: calc(100vh - 292px); min-height: 360px; overscroll-behavior: contain; }
.cell-clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.grid-foot { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--border); background: var(--card-2); font-size: 12px; color: var(--text-2); }
.grid-foot strong { font-variant-numeric: tabular-nums; color: var(--text); }
.grid-foot-hints { margin-left: auto; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-foot-hints .kbd { font-size: 10px; padding: 1px 5px; }

table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.grid thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--card-2); text-align: left; padding: 12px 14px; white-space: nowrap;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2);
    border-bottom: 1px solid var(--border); cursor: pointer; user-select: none;
}
.grid thead th .th-in { display: inline-flex; align-items: center; gap: 6px; }
.grid tbody td { padding: 0 14px; height: 52px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; overflow: hidden; }
.grid tbody tr { transition: background 0.1s; cursor: pointer; }
.grid tbody tr:hover td { background: var(--accent-tint-2); }
.grid tbody tr:last-child td { border-bottom: none; }
.grid .primary-cell { font-weight: 600; }
.grid .empty-cell { color: var(--text-faint); }
/* Numbers read right-aligned, like a real database */
.grid td[data-field-type="Number"], .grid td[data-field-type="Currency"],
.grid th[data-field-key][data-field-type="Number"], .grid th[data-field-key][data-field-type="Currency"] { text-align: right; }
.grid .row-num { width: 44px; text-align: center; color: var(--text-faint); font-size: 11.5px; font-variant-numeric: tabular-nums; padding: 0; }
.grid tbody tr:hover .row-num { color: var(--text-2); }

/* type-aware column header underlines */
th.col-relation { box-shadow: inset 0 -2px 0 var(--relation); }
th.col-lookup   { box-shadow: inset 0 -2px 0 var(--lookup); }
th.col-rollup   { box-shadow: inset 0 -2px 0 var(--rollup); }

/* cells */
.chip-rel {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px;
    border-radius: 8px; background: var(--relation-soft); color: var(--relation-ink);
    font-weight: 550; font-size: 12.5px; transition: 0.12s; cursor: pointer; max-width: 220px;
    text-decoration: none; border: none; font-family: inherit;
}
.chip-rel:hover { background: #fff; box-shadow: 0 0 0 1.5px var(--relation); color: var(--relation-ink); }
.chip-rel .rdot { width: 7px; height: 7px; border-radius: 3px; background: var(--relation); flex-shrink: 0; }
.chip-rel .rt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }

.cell-lookup { display: inline-flex; align-items: center; gap: 5px; color: var(--lookup-ink); font-weight: 500; }
.cell-lookup::before { content: ''; width: 6px; height: 6px; border-radius: 50%; border: 1.6px solid var(--lookup); flex-shrink: 0; }

.cell-rollup { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 8px; background: var(--rollup-soft); color: var(--rollup-ink); font-weight: 650; font-variant-numeric: tabular-nums; }

.chip-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 550; }
.cell-check { width: 19px; height: 19px; border-radius: 6px; border: 2px solid var(--border-2); display: inline-grid; place-items: center; vertical-align: middle; }
.cell-check.on, .cell-check.checked { background: var(--ink-900); border-color: var(--ink-900); color: var(--accent); }
.cell-money { font-variant-numeric: tabular-nums; font-weight: 600; }
.cell-money .cur { color: var(--text-faint); margin-right: 1px; }
.cell-pct { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; min-width: 120px; }
.pct-track { flex: 1; height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; max-width: 90px; }
.pct-fill { height: 100%; border-radius: 3px; }
.cell-rating { color: var(--amber); letter-spacing: 1.5px; }
.person-cell { display: inline-flex; align-items: center; gap: 7px; }
.pav { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }

/* Board */
.board { display: flex; gap: 13px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.bcol { flex: 0 0 290px; background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 280px); }
.bcol-head { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.bcol-head .swatch { width: 9px; height: 9px; border-radius: 3px; }
.bcol-head .bcol-nm { font-weight: 650; font-size: 13px; }
.bcol-head .bcol-ct { margin-left: auto; font-size: 11.5px; color: var(--text-muted); background: #fff; border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }
.bcol-body { padding: 9px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.bcard { background: #fff; border: 1px solid var(--border); border-radius: 11px; padding: 12px; transition: 0.13s; cursor: pointer; }
.bcard:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.bcard .bt { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.bcard-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* Board drag-and-drop */
.board-dnd .bcard[draggable="true"] { cursor: grab; }
.board-dnd .bcard.dragging { opacity: 0.4; }
.board-dnd .bcol.drop-to { border-color: var(--accent-deep); background: var(--accent-tint-2); }

/* Shared drag-move toast (calendar / board / gantt reschedule) */
.rf-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(12px); z-index: 300;
    background: var(--ink-900); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px;
    box-shadow: var(--shadow-pop); opacity: 0; transition: 0.22s; pointer-events: none; }
.rf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.rf-toast.err { background: #C53B1C; }

/* Honest "not built yet" affordance — for placeholders that must not look clickable */
.is-soon { color: var(--text-faint); cursor: default; text-decoration: none; }
.is-soon:hover { text-decoration: none; }
.soon-pill { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--paper-2); color: var(--text-muted); padding: 1px 6px; border-radius: 999px; margin-left: 5px; vertical-align: middle; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 15px; }
.gcard { background: var(--card); border: 1px solid var(--border); border-radius: 15px; overflow: hidden; cursor: pointer; transition: 0.14s; }
.gcard:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.gthumb { height: 96px; display: grid; place-items: center; font-family: var(--font-display); font-style: italic; font-size: 44px; color: rgba(255,255,255,0.95); }
.gbody { padding: 13px 15px; }
.gbody .gt { font-weight: 650; font-size: 14px; margin-bottom: 8px; }
.grow { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); padding: 2px 0; }

/* Calendar */
.cal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--card-2); border-bottom: 1px solid var(--border); }
.cal-head div { padding: 9px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px 8px; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell .dn { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-bottom: 5px; }
.cal-cell.muted { background: var(--card-2); }
.cal-ev { font-size: 11px; padding: 3px 7px; border-radius: 6px; margin-bottom: 4px; font-weight: 550; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== PEEK DRAWER ===== */
.peek-scrim {
    position: fixed; inset: 0; background: rgba(14,20,40,0.28); backdrop-filter: blur(2px);
    z-index: 40; opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.peek-scrim.show { opacity: 1; pointer-events: auto; }
.peek-stack { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; display: flex; pointer-events: none; }
.peek {
    width: 560px; max-width: 92vw; background: var(--paper); height: 100%;
    box-shadow: var(--shadow-lg); border-left: 1px solid var(--border-2);
    display: flex; flex-direction: column; pointer-events: auto;
    transform: translateX(40px); opacity: 0; transition: transform 0.28s cubic-bezier(.2,.8,.2,1), opacity 0.22s;
    position: relative;
}
.peek.in { transform: translateX(0); opacity: 1; }
.peek-top {
    display: flex; align-items: center; gap: 10px; padding: 12px 18px;
    border-bottom: 1px solid var(--border); background: rgba(251,248,241,0.9); backdrop-filter: blur(6px); flex-shrink: 0;
}
.peek-body { overflow-y: auto; flex: 1; }
.peek-hero { padding: 22px 24px 18px; border-bottom: 1px solid var(--border-soft); }
.peek-hero .ph-glyph { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: #fff; margin-bottom: 12px; }
.peek-hero .ph-kind { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); }
.peek-hero h2 { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -0.01em; margin-top: 3px; }

.field-list { padding: 8px 24px 20px; }
.field-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); align-items: center; }
.field-row:last-child { border-bottom: none; }
.field-key { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); font-weight: 550; }
.field-val { font-size: 13.5px; }

/* Drawer inline quick-edit: click a common field's value to edit it in place. */
.field-val.editable { cursor: pointer; border-radius: 7px; margin: -4px -7px; padding: 4px 7px; transition: background 0.12s; }
.field-val.editable:hover { background: var(--accent-tint-2); }
.field-val .pv-empty { color: var(--text-faint); }
.field-val.editable:hover .pv-empty { color: var(--accent-ink); }
.pv-edit { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; padding: 6px 9px;
    border: 1px solid var(--accent-deep); border-radius: 7px; background: var(--card); color: var(--text);
    box-shadow: 0 0 0 3px var(--accent-tint); }
.pv-edit:focus { outline: none; }
textarea.pv-edit { resize: vertical; min-height: 62px; }
.field-val.pv-saved { animation: pvSaved 1.1s ease; }
@keyframes pvSaved { 0% { background: var(--accent-tint); } 100% { background: transparent; } }
.peek-hero h2.peek-name-edit { cursor: pointer; border-radius: 8px; padding: 0 6px; transition: background 0.12s; }
.peek-hero h2.peek-name-edit:hover { background: var(--accent-tint-2); }
.pv-name-edit { font-family: var(--font-display); font-size: 24px; font-weight: 500; text-align: center;
    padding: 3px 10px; border-radius: 8px; }

.peek-section { padding: 16px 24px 22px; border-top: 1px solid var(--border); }
.peek-section .ps-sl { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.peek-section .ps-cnt { font-size: 11px; color: var(--text-faint); background: var(--paper-2); padding: 1px 8px; border-radius: 999px; font-weight: 600; }

.rel-card { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; cursor: pointer; transition: 0.13s; margin-bottom: 8px; text-decoration: none; color: inherit; }
.rel-card:hover { border-color: var(--relation); box-shadow: var(--shadow-sm); color: inherit; }

/* ===== ⌘K PALETTE ===== */
.cmdk-scrim {
    position: fixed; inset: 0; background: rgba(14,20,40,0.4); backdrop-filter: blur(4px);
    z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh;
    opacity: 0; transition: opacity 0.16s; pointer-events: none;
}
.cmdk-scrim.show { opacity: 1; pointer-events: auto; }
.cmdk {
    width: 640px; max-width: 92vw; background: var(--paper); border: 1px solid var(--border-2);
    border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
    transform: translateY(-8px) scale(0.99); transition: transform 0.18s;
}
.cmdk-scrim.show .cmdk { transform: none; }
.cmdk-input { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.cmdk-input svg { width: 19px; height: 19px; color: var(--text-muted); flex-shrink: 0; }
.cmdk-input input { flex: 1; border: none; outline: none; background: none; font-size: 16px; color: var(--text); font-family: var(--font-sans); }
.cmdk-input input::placeholder { color: var(--text-faint); }
.cmdk-results { max-height: 380px; overflow-y: auto; padding: 8px; }
.cmdk-glabel { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--text-faint); padding: 10px 12px 5px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--text); }
.cmdk-item:hover, .cmdk-item.sel { background: var(--ink-900); color: #fff; }
.cmdk-item .ci-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-size: 15px; color: #fff; }
.cmdk-item .ci-ic svg { width: 15px; height: 15px; }
.cmdk-item .ci-t { font-size: 13.5px; font-weight: 550; }
.cmdk-item .ci-s { font-size: 11.5px; color: var(--text-muted); }
.cmdk-item:hover .ci-s, .cmdk-item.sel .ci-s { color: rgba(255,255,255,0.6); }
.cmdk-foot { display: flex; align-items: center; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); }
.cmdk-ai-row {
    margin: 4px; padding: 13px 14px; border-radius: 11px;
    background: linear-gradient(150deg, var(--ink-900), var(--ink-800)); color: #fff;
    display: flex; align-items: center; gap: 11px; cursor: pointer; text-decoration: none;
}
.cmdk-ai-row .spark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--ink-900); display: grid; place-items: center; flex-shrink: 0; }
.cmdk-ai-row .spark svg { width: 16px; height: 16px; }

/* ===== AI ANSWER PANEL ===== */
.ai-answer { padding: 16px 18px; border-top: 1px solid var(--border); }
.ai-answer .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); flex-wrap: wrap; }
.ai-head-note { margin-left: auto; font-size: 10.5px; font-weight: 500; color: var(--text-muted); text-transform: none; letter-spacing: normal; }
.ai-answer .ai-head .spark { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: var(--ink-900); display: grid; place-items: center; }
.ai-body { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.ai-body .rec-link { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 7px; background: var(--relation-soft); color: var(--relation-ink); font-weight: 550; font-size: 12px; cursor: pointer; }

/* Build-mode surface tint + violet inset frame removed with the Use/Studio split. */

/* ===== SCHEMA GRAPH ===== */
.schema-stage { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.schema-stage svg { display: block; width: 100%; }

/* ===== TOASTS ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--ink-900); color: #fff; padding: 11px 18px;
    border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 550;
    z-index: 80; opacity: 0; transition: 0.25s; display: flex; align-items: center; gap: 9px; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ===== MISC ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .es-glyph { font-family: var(--font-display); font-style: italic; font-size: 56px; color: var(--accent-deep); }
.empty-state h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin-top: 8px; }
.empty-state p { color: var(--text-muted); margin-top: 6px; }

/* Animations */
.fade-in { animation: fadeIn 0.35s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* Helpers */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.gap16 { gap: 16px; }
.flex1 { flex: 1; }
.min0 { min-width: 0; }
.mb { margin-bottom: 4px; }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 24px; }
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 36px 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; justify-content: center; }
.auth-card h1 { font-family: var(--font-display); font-size: 26px; font-weight: 500; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; }
.form-input { width: 100%; border: 1.5px solid var(--border); background: var(--card); border-radius: 10px; padding: 10px 14px; font-size: 14px; outline: none; transition: 0.14s; }
.form-input:focus { border-color: var(--ink-700); box-shadow: 0 0 0 3px rgba(217,242,92,0.2); }
.form-error { color: #C53B1C; font-size: 12.5px; margin-top: 4px; }
.auth-submit { width: 100%; background: var(--ink-900); color: #fff; border: none; border-radius: 10px; padding: 11px; font-size: 14px; font-weight: 650; cursor: pointer; transition: 0.14s; margin-top: 4px; }
.auth-submit:hover { background: var(--ink-800); }
.auth-links { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-links a { color: var(--text-2); font-weight: 600; text-decoration: underline; }

/* ===== LEGACY PAGE STYLES (compatibility) ===== */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-subtitle { color: var(--text-muted); font-size: 14.5px; margin-top: 8px; max-width: 560px; }
.link-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); transition: 0.13s; text-decoration: none; }
.link-back:hover { border-color: var(--border-2); color: var(--text); }
.table-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.table-emoji { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; color: #fff; flex-shrink: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-fields { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; align-items: center; }
.detail-field-label { font-size: 12px; font-weight: 650; color: var(--text-muted); }
.detail-field-value { font-size: 13.5px; }
.chip-relation { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; background: var(--relation-soft); color: var(--relation-ink); font-weight: 550; font-size: 12.5px; text-decoration: none; }
.chip-lookup { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 8px; background: var(--lookup-soft); color: var(--lookup-ink); font-weight: 550; font-size: 12.5px; }
.chip-rollup { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 8px; background: var(--rollup-soft); color: var(--rollup-ink); font-weight: 650; }
.chip { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--paper-2); color: var(--text-2); }
.cell-check.checked { background: var(--mint); border-color: var(--mint); color: #fff; }
.cell-currency { font-variant-numeric: tabular-nums; font-weight: 600; }
.cell-percent { font-variant-numeric: tabular-nums; }

/* Accent background helpers */
.accent-bg-violet    { background: #7C5CFF !important; }
.accent-bg-coral     { background: #FF6B4A !important; }
.accent-bg-rose      { background: #E84A8B !important; }
.accent-bg-mint      { background: #1FB877 !important; }
.accent-bg-sky       { background: #2E9BE6 !important; }
.accent-bg-amber     { background: #E5A12B !important; }
.accent-bg-chartreuse{ background: #B5DD2E !important; color: var(--ink-900) !important; }
.accent-bg-ink       { background: #0E1428 !important; }
.accent-bg-emerald   { background: #117352 !important; }
.accent-bg-indigo    { background: #4F35BF !important; }
.accent-bg-cyan      { background: #0E7490 !important; }

/* Swatch helpers */
.swatch-violet     { background: #7C5CFF; }
.swatch-coral      { background: #FF6B4A; }
.swatch-rose       { background: #E84A8B; }
.swatch-mint       { background: #1FB877; }
.swatch-sky        { background: #2E9BE6; }
.swatch-amber      { background: #E5A12B; }
.swatch-chartreuse { background: #B5DD2E; }
.swatch-ink        { background: #0E1428; }
.swatch-emerald    { background: #117352; }
.swatch-indigo     { background: #4F35BF; }
.swatch-cyan       { background: #0E7490; }

/* Responsive — mobile nav. The rail is never display:none (it IS all primary navigation);
   below 900px it becomes an off-canvas overlay drawer opened by the topbar burger.
   z-order: scrim 55 / drawer 56 — above the peek stack (41+), below ⌘K & modals (60). */
.nav-burger {
    display: none; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: none;
    background: #fff; border: 1px solid var(--border); border-radius: 9px;
    color: var(--text); cursor: pointer;
}
.rail-scrim { display: none; }

@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .rail {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: min(84vw, 300px);
        z-index: 56;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        overflow-y: auto;
    }
    .rail.open { transform: none; box-shadow: 0 12px 44px rgba(10, 12, 24, 0.45); }
    .rail-scrim {
        display: block; position: fixed; inset: 0; z-index: 55;
        background: rgba(14, 16, 32, 0.44);
        opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
    }
    .rail.open + .rail-scrim { opacity: 1; pointer-events: auto; }

    .nav-burger { display: inline-flex; }

    /* Topbar squeeze: search field flexes, title truncates, keyboard hints are meaningless on touch */
    .topbar { padding: 9px 12px; gap: 8px; }
    .crumbs { min-width: 0; overflow: hidden; }
    .crumbs .cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .search-btn { width: auto; flex: 1 1 110px; min-width: 0; }
    /* Keyboard hints are meaningless on touch — hide whole hint blocks, not bare .kbd chips,
       so no orphaned connective text ("move · edit · peek") survives. */
    .kbd, .grid-foot-hints, .cmdk-foot { display: none; }

    /* Build-mode topbar extras don't fit a phone row (the pills can't shrink below
       min-content and .main is overflow:hidden — they'd clip, not scroll). The warn
       pill goes; the exit pill drops its text so phones keep a visible way out. */
    .studio-warn { display: none; }
    .studio-exit-pill .studio-exit-label { display: none; }

    /* The impersonation banner (inline z-index:300, sticky) would overlay the drawer's
       top strip and its controls; while the drawer/scrim are up it must sit below them. */
    .imp-banner { z-index: 54 !important; }

    /* View pills wrap into rows instead of clipping Tree/Gantt off-screen */
    .view-switch { flex-wrap: wrap; }
}

@media (max-width: 560px) {
    .page { padding: 18px 14px 70px; }
    /* Peek drawer: shrink the fixed label column so values keep room at 345px panel width.
       Scoped to .peek — the auth pages also use .field-row and must keep their layout. */
    .peek .field-row { grid-template-columns: 96px 1fr; gap: 10px; }
    .peek-top { flex-wrap: wrap; }
}

/* ===== POWER FEATURES — Filter bar, Bulk bar, Quick-add, Inline edit, Stars, Graph ===== */

/* ─ Filter bar ─ */
.filter-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0 4px; gap: 8px; flex-wrap: wrap;
}
.fb-left { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.fb-right { display: flex; align-items: center; gap: 6px; }

/* Active filter + sort chips */
.active-chip {
    display: inline-flex; align-items: center; gap: 0;
    border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--accent-deep); overflow: hidden;
    background: var(--accent-tint); color: var(--accent-ink);
    transition: box-shadow 0.12s;
}
.active-chip:hover { box-shadow: 0 0 0 2px var(--accent-deep); }
.active-chip .chip-label {
    padding: 3px 10px 3px 9px; line-height: 1.4;
    display: flex; align-items: center; gap: 5px;
}
.active-chip .chip-remove {
    background: none; border: none; cursor: pointer;
    padding: 3px 8px 3px 5px; color: inherit; opacity: 0.55; font-size: 12px;
    border-left: 1px solid rgba(0,0,0,0.1); transition: opacity 0.1s;
    line-height: 1;
}
.active-chip .chip-remove:hover { opacity: 1; background: rgba(0,0,0,0.08); }
.active-chip.sort-chip {
    background: var(--lookup-soft); color: var(--lookup-ink); border-color: var(--lookup);
}
.active-chip.sort-chip .chip-remove { border-left-color: rgba(0,0,0,0.1); }

/* Chip field-type dot */
.chip-dot {
    width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; flex-shrink: 0;
}

/* ─ Filter / Sort popover ─ */
.fb-popover-anchor { position: relative; }
.fb-popover {
    /* position:fixed and top/left set via JS portal — escapes any overflow:hidden ancestor */
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    width: 310px;
    animation: popIn 0.14s cubic-bezier(0.34,1.36,0.64,1);
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.fb-popover.right-anchor { left: auto; right: 0; }

/* Popover header */
.fbp-head {
    display: flex; align-items: center; padding: 11px 14px 9px;
    border-bottom: 1px solid var(--border); gap: 8px;
}
.fbp-head-back {
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    padding: 2px 5px 2px 2px; border-radius: 5px; font-size: 15px; line-height: 1;
    transition: background 0.1s; flex-shrink: 0;
}
.fbp-head-back:hover { background: var(--card-2); color: var(--text); }
.fbp-title {
    font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--text-muted); flex: 1;
}
.fbp-field-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; font-weight: 650; color: var(--text);
}
.fbp-type-icon { opacity: 0.55; }

/* Field list (step 1) */
.fbp-field-list {
    max-height: 260px; overflow-y: auto; padding: 6px;
}
.fbp-field-list::-webkit-scrollbar { width: 5px; }
.fbp-field-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.fbp-field-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 9px; border-radius: 7px; cursor: pointer;
    font-size: 13px; font-weight: 500; color: var(--text);
    transition: background 0.1s;
}
.fbp-field-item:hover { background: var(--card-2); }
.fbp-field-item .fi-icon { opacity: 0.45; flex-shrink: 0; }
.fbp-field-item .fi-type { font-size: 11px; color: var(--text-faint); margin-left: auto; }

/* Operator + value (step 2) */
.fbp-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.fbp-section-label {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 3px;
}

/* Operator pill grid */
.fbp-ops {
    display: flex; flex-wrap: wrap; gap: 5px;
}
.fbp-op-btn {
    padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
    background: var(--card-2); color: var(--text-muted); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: 0.1s; line-height: 1.4;
}
.fbp-op-btn:hover { border-color: var(--accent-deep); color: var(--text); background: var(--accent-tint-2); }
.fbp-op-btn.selected { background: var(--accent-tint); border-color: var(--accent-deep); color: var(--accent-ink); }

/* Value input */
.fbp-val-wrap { display: flex; flex-direction: column; gap: 5px; }
.fbp-val-wrap.hidden { display: none; }
.fbp-val { width: 100%; }

/* Sort dir row */
.fbp-dir-row { display: flex; gap: 6px; }
.fbp-dir-btn {
    flex: 1; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--border);
    background: var(--card-2); color: var(--text-muted); font-size: 12.5px; font-weight: 600;
    cursor: pointer; transition: 0.1s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.fbp-dir-btn:hover { border-color: var(--accent-deep); color: var(--text); }
.fbp-dir-btn.selected { background: var(--accent-tint); border-color: var(--accent-deep); color: var(--accent-ink); }

/* Popover footer */
.fbp-foot {
    padding: 9px 12px 11px; display: flex; gap: 7px; justify-content: flex-end;
    border-top: 1px solid var(--border);
}

/* Filter count badge on toolbar button */
.fb-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-deep); color: var(--ink-900); border-radius: 999px;
    font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
    padding: 0 4px; line-height: 1;
}

/* ── AND/OR logic toggle ──────────────────────────────────────────────── */
.logic-toggle-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    border: 1.5px dashed var(--accent-deep);
    background: var(--accent-tint-2, #f3efff);
    color: var(--accent-deep);
    font-size: 11.5px; font-weight: 700;
    cursor: pointer; transition: background 0.12s;
    white-space: nowrap;
}
.logic-toggle-btn:hover { background: var(--accent-tint); }
.logic-word { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.logic-hint { font-size: 10.5px; font-weight: 400; opacity: 0.7; }

/* ── Select/MultiSelect option pill picker ────────────────────────────── */
.fbp-option-pills {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 4px 0 2px;
}
.fbp-opt-pill {
    padding: 4px 11px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--card-2);
    color: var(--text);
    font-size: 12px; font-weight: 500;
    cursor: pointer; transition: border-color 0.1s, background 0.1s;
}
.fbp-opt-pill:hover { border-color: var(--accent); background: var(--accent-tint); }
.fbp-opt-pill.selected {
    border-color: var(--accent-deep);
    background: var(--accent-tint);
    color: var(--accent-ink);
    font-weight: 650;
}

/* compat: keep old .filter-chip for any lingering references */
.filter-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: var(--accent-tint); color: var(--accent-ink); border: 1px solid var(--accent-deep);
}
.filter-chip button { background: none; border: none; cursor: pointer; color: var(--accent-ink); padding: 0; font-size: 11px; opacity: 0.7; }
.filter-chip button:hover { opacity: 1; }
.filter-chip.sort-chip { background: var(--lookup-soft); color: var(--lookup-ink); border-color: var(--lookup); }

/* ─ Bulk action bar ─ */
.bulk-bar {
    display: none; align-items: center; gap: 12px;
    padding: 8px 14px; background: var(--ink-900); color: #fff;
    border-radius: var(--radius); margin-bottom: 8px; font-size: 13px; font-weight: 600;
}
.bulk-bar.show { display: flex; animation: fadeIn 0.2s; }
.bulk-actions { display: flex; gap: 8px; margin-left: auto; }
.bulk-bar .btn.sm.ghost { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.2); }
.bulk-bar .btn.sm.ghost:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* ─ Checkbox column ─ */
th.row-check, td.row-check {
    width: 36px; padding: 0 8px; text-align: center;
}
.row-cb { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent-deep); }

/* ─ Quick-add row ─ */
.quick-add-cell { padding: 0 !important; }
.quick-add-input {
    width: 100%; border: none; background: transparent;
    padding: 10px 12px; font-size: 13.5px; outline: none;
    color: var(--text-muted); font-family: var(--font-sans);
}
.quick-add-input:focus { color: var(--text); background: rgba(217,242,92,0.06); }
.quick-add-input::placeholder { color: var(--text-faint); }
tfoot tr { border-top: 1px dashed var(--border); }

/* Overflow marker for a multi-link relation cell: the row is fixed-height and nowrap, so
   we show the first chips and count the remainder rather than clipping them invisibly. */
.chip-more {
    display: inline-flex; align-items: center; height: 20px; padding: 0 6px; margin-left: 2px;
    border-radius: 999px; background: var(--paper-2); border: 1px solid var(--border);
    color: var(--text-muted); font-size: 11px; font-weight: 650; cursor: default; flex: none;
}

/* ─ Inline relation picker ─ */
.rel-picker {
    position: absolute; z-index: 400; width: 280px; max-width: 90vw;
    background: var(--card); border: 1px solid var(--border-2); border-radius: 10px;
    box-shadow: var(--shadow-pop); padding: 8px; display: flex; flex-direction: column; gap: 6px;
}
.rel-picker-search { width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; background: var(--card); color: var(--text); }
.rel-picker-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; }
.rel-opt { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.rel-opt:hover { background: var(--card-2); }
.rel-opt input { flex: none; }
.rel-empty { padding: 10px 6px; color: var(--text-muted); font-size: 12.5px; }
.rel-picker-foot { display: flex; justify-content: flex-end; gap: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.rel-picker-foot button { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; cursor: pointer; border: 1px solid var(--border); background: var(--card); }
.rel-picker-foot .rp-apply { background: var(--ink-900); color: #fff; border-color: var(--ink-900); font-weight: 600; }
td.cell-relation { cursor: pointer; }

/* ─ Inline cell editing ─ */
td.cell-editing { padding: 0 !important; background: var(--accent-tint-2) !important; }
/* Cells this person may not write (role, table override, or a read-only field): no edit
   affordance, so the grid reflects permissions instead of failing on save. */
td.cell-readonly { cursor: default; }
td.cell-readonly:hover { background: transparent; }
.cell-edit-input {
    width: 100%; border: none; background: transparent;
    padding: 8px 12px; font-size: 13.5px; outline: none;
    color: var(--text); font-family: var(--font-sans);
}
.cell-edit-input:focus { background: rgba(217,242,92,0.1); }
tr.row-focused > td { background: var(--accent-tint-2) !important; }

/* ─ Cell cursor (keyboard navigation) ─ */
.grid td[data-field-key] { cursor: cell; }
td.cell-cursor {
    position: relative;
    box-shadow: inset 0 0 0 2px var(--accent-deep, #7C5CFF);
    border-radius: 3px;
}
.cell-expand {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    display: grid; place-items: center; width: 20px; height: 20px;
    border: none; border-radius: 5px; cursor: pointer;
    background: var(--accent-deep, #7C5CFF); color: #fff;
    opacity: 0.92; transition: opacity 0.12s;
}
.cell-expand:hover { opacity: 1; }

/* ─ Column resize ─ */
.grid thead th { position: relative; }
.col-rz {
    position: absolute; top: 0; right: -4px; width: 8px; height: 100%;
    cursor: col-resize; z-index: 3; user-select: none;
}
.col-rz:hover { background: linear-gradient(to right, transparent 2px, var(--accent-deep, #7C5CFF) 2px, var(--accent-deep, #7C5CFF) 4px, transparent 4px); }
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing * { cursor: col-resize !important; }
table.grid[style*="fixed"] td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─ Toast error variant ─ */
.toast.toast-error .tdot { background: var(--rollup); }

/* ─ Peek tabs ─ */
.peek-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 20px; }
.peek-tab {
    padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px; transition: 0.15s;
    background: none; border-top: none; border-left: none; border-right: none;
}
.peek-tab.active { color: var(--text); border-bottom-color: var(--accent-deep); }
.peek-tab:hover { color: var(--text-2); }

/* ─ Activity feed ─ */
.activity-feed { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; }
.ai-dot {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-size: 12px;
    background: var(--paper-2); color: var(--text-muted); margin-top: 2px;
}
.ai-dot.created  { background: var(--accent-tint); color: var(--accent-deep); }
.ai-dot.updated  { background: var(--lookup-soft); color: var(--lookup-ink); }
.ai-dot.linked   { background: var(--relation-soft); color: var(--relation-ink); }
.ai-body-feed .ai-label { font-size: 13px; font-weight: 600; color: var(--text); }
.ai-body-feed .ai-meta  { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.peek-empty { padding: 32px 20px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* ─ Relationship mini-graph ─ */
.graph-wrap { padding: 16px; display: flex; flex-direction: column; align-items: center; }
.rel-graph { overflow: visible; max-width: 100%; }
.graph-node.center circle { filter: drop-shadow(0 4px 12px rgba(0,0,0,0.18)); }
.graph-node:not(.center):hover circle { opacity: 1 !important; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); }

/* ─ AI Citations ─ */
.ai-cites { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }

/* ─ Mini modal (filter/sort) ─ */
.mini-modal-scrim {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(14,20,40,0.35); display: flex; align-items: center; justify-content: center;
}
.mini-modal {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); width: 360px; max-width: 95vw;
}
.mm-head { padding: 16px 20px 0; font-size: 15px; font-weight: 700; font-family: var(--font-display); }
.mm-body { padding: 14px 20px; }
.mm-foot { padding: 10px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--border); }

/* ─ AI Field suggestions ─ */
.suggest-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.suggest-chip {
    display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
    padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--card-2); font-size: 12px; transition: 0.13s;
}
.suggest-chip:hover { border-color: var(--accent-deep); background: var(--accent-tint-2); }
.suggest-chip input { display: none; }
.sc-name { font-weight: 600; color: var(--text); }
.sc-type { color: var(--text-muted); font-size: 11px; }
.suggest-chip:has(input:checked) { background: var(--accent-tint); border-color: var(--accent-deep); }

/* ===== LEGACY CLASSES — used across Builder Studio pages ===== */

/* ─ Page header pattern ─ */
.page-header { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:28px; }
.page-title { font-family:var(--font-display); font-size:28px; font-weight:500; letter-spacing:-0.02em; line-height:1.08; margin:0 0 4px; }
.page-subtitle { color:var(--text-muted); font-size:13.5px; margin:0; max-width:520px; }

/* ─ Toolbar buttons ─ */
.tb-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--card); color: var(--text); font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: 0.13s; white-space: nowrap;
}
.tb-btn:hover { background: var(--card-2); color: var(--text); }
.tb-btn.primary, .tb-btn.accent {
    background: var(--accent); color: var(--ink-900); border-color: var(--accent-deep);
}
.tb-btn.primary:hover, .tb-btn.accent:hover { background: var(--accent-deep); color: var(--ink-900); }

/* ─ btn-rowfold (inline action buttons inside cards) ─ */
.btn-rowfold {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--card); color: var(--text-muted); font-size: 12px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: 0.12s; white-space: nowrap;
}
.btn-rowfold:hover { background: var(--card-2); color: var(--text); }
.btn-rowfold.sm { padding: 4px 9px; font-size: 11.5px; }
.btn-rowfold.primary { background: var(--accent-deep); color: var(--ink-900); border-color: var(--accent-deep); }
.btn-rowfold.primary:hover { background: var(--accent-ink); color: #fff; }
.btn-rowfold.sm.primary { background: var(--accent-deep); color: var(--ink-900); border-color: var(--accent-deep); }

/* ─ Helper strip (workspace switcher bar) ─ */
.helper-strip {
    display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
    padding: 10px 14px; background: var(--card-2); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 20px; font-size: 13px;
}
.helper-icon { font-size: 15px; flex-shrink: 0; }

/* ─ ws-grid + ws-card ─ */
.ws-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
    margin-bottom: 20px;
}
.ws-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 16px 18px; transition: box-shadow 0.13s, border-color 0.13s;
    display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit;
}
.ws-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); color: inherit; }
.ws-card-head { display: flex; align-items: center; gap: 12px; }
.ws-card-icon {
    width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: #fff;
}
.ws-card-title { font-weight: 650; font-size: 14px; color: var(--text); }
.ws-card-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.ws-card-footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ─ ws-cat section heading ─ */
.ws-cat {
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-faint); margin: 24px 0 10px;
}
.ws-cat:first-child { margin-top: 0; }

/* ─ Template card grid ─ */
.template-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}
.template-card {
    background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
    cursor: pointer; transition: 0.13s; display: block;
}
.template-card input[type="radio"] { display: none; }
.template-card:has(input:checked),
.template-card.selected {
    border-color: var(--accent-deep); background: var(--accent-tint-2);
    box-shadow: 0 0 0 2px var(--accent-tint);
}
.template-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.template-card-inner { padding: 14px 16px; }
.template-card-head { margin-bottom: 6px; }
.template-card-name { font-weight: 650; font-size: 13.5px; color: var(--text); }
.template-card-tagline { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.template-card-tables { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ws-table-chip {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    background: var(--card-2); border: 1px solid var(--border);
    font-size: 11px; color: var(--text-muted); font-weight: 600;
}

/* ─ Bootstrap compat helpers ─ */
.mb-4 { margin-bottom: 24px !important; }
.mt-2 { margin-top: 8px !important; }
.mb-2 { margin-bottom: 8px !important; }
.text-muted { color: var(--text-muted) !important; }
.small { font-size: 12.5px; }
.fw-semibold { font-weight: 650; }
.form-label { display: block; font-size: 12.5px; font-weight: 650; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.form-control, .form-select {
    width: 100%; padding: 8px 12px; border: 1.5px solid var(--border);
    border-radius: var(--radius); background: var(--card); color: var(--text);
    font-size: 13.5px; font-family: var(--font-sans); outline: none; transition: 0.13s;
}
.form-control:focus, .form-select:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-tint); }
.form-control-lg { padding: 10px 14px; font-size: 15px; }
.card.mb-4 { margin-bottom: 24px; }
.card-body { padding: 20px; }
/* ─ Bootstrap grid compat ─ */
.row { display: flex; flex-wrap: wrap; gap: 0; }
.row.g-2 { gap: 8px; }
.row.g-3 { gap: 12px; }
.row.g-4 { gap: 16px; }
.row > [class*="col-"] { min-width: 0; }
.col-md-8, .col-lg-8 { flex: 0 0 calc(66.666% - 6px); max-width: calc(66.666% - 6px); }
.col-md-4, .col-lg-4 { flex: 0 0 calc(33.333% - 6px); max-width: calc(33.333% - 6px); }
.col-lg-9 { flex: 0 0 calc(75% - 4px); max-width: calc(75% - 4px); }
.col-lg-3 { flex: 0 0 calc(25% - 4px); max-width: calc(25% - 4px); }
.col-7 { flex: 0 0 calc(58.333% - 4px); max-width: calc(58.333% - 4px); }
.col-5 { flex: 0 0 calc(41.666% - 4px); max-width: calc(41.666% - 4px); }
@media (max-width: 900px) { .col-md-8, .col-md-4, .col-lg-8, .col-lg-4, .col-lg-9, .col-lg-3 { flex: 0 0 100%; max-width: 100%; } }

/* ─ Dashboard metric grid ─ */
.metric-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px;
    margin-bottom: 20px;
}
.metric-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.metric-card span { font-family: var(--font-display); font-size: 28px; font-weight: 500; color: var(--text); line-height: 1; }
.metric-card small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

/* ─ Dashboard report rows ─ */
.report-row { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.report-row:last-child { border-bottom: none; }
.report-label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; font-size: 13px; }
.report-label strong { font-weight: 650; color: var(--text); }
.report-label span { font-size: 11.5px; color: var(--text-muted); }
.report-bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.report-bar span { display: block; height: 100%; background: var(--accent-deep); border-radius: 999px; transition: width 0.4s ease; min-width: 2px; }
.w-100 { width: 100% !important; }

/* ─ Interactive report chart (report-chart.js) ─ */
.report-chart-svg { font-family: var(--font-sans); display: block; }
.chart-grid     { stroke: var(--border); stroke-width: 1; }
.chart-baseline { stroke: var(--border-2); stroke-width: 1; }
.chart-axis     { fill: var(--text-muted); font-size: 10px; }
.chart-hit      { cursor: crosshair; }

/* Marks carry their own per-series fill/stroke (set as SVG attributes in JS); CSS here
   must NOT declare fill/stroke or it would override the categorical color. */
.chart-bar { transition: filter .12s ease; }
.chart-bar:hover, .chart-bar.active { filter: brightness(1.08) saturate(1.04); }
.chart-bar.active { outline: none; stroke: var(--ink-900); stroke-width: 1; }
.chart-bar:focus-visible { outline: none; stroke: var(--ink-900); stroke-width: 1.5; }

.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--card); stroke-width: 1.5; transition: r .1s ease; }
.chart-dot.active { r: 5.5; }
.chart-dot:focus-visible { outline: none; r: 5.5; }
.chart-cross { stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 3 3; transition: opacity .1s ease; }

/* Floating tooltip: category header, then one row per series — swatch · label · value
   (value strong & tabular). textContent only (untrusted data). */
.chart-tip {
    position: fixed; z-index: 500; pointer-events: none;
    background: var(--card); border: 1px solid var(--border-2); border-radius: 9px;
    box-shadow: var(--shadow-pop); padding: 8px 11px; min-width: 120px; max-width: 280px;
    font-family: var(--font-sans);
}
.chart-tip[hidden] { display: none; }
.chart-tip-head { font-size: 11.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 5px; }
.chart-tip-body { display: flex; flex-direction: column; gap: 3px; }
.chart-tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip-key { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart-tip-lbl { font-size: 12px; color: var(--text-muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-tip-val { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; margin-left: auto; }

/* Series chips = selector + legend. Colored dot names each series; ".on" toggles it in. */
.series-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.series-chip {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--border); background: var(--card);
    border-radius: 999px; padding: 5px 12px 5px 10px; cursor: pointer;
    font-size: 12px; font-weight: 550; color: var(--text-muted); line-height: 1.2;
    transition: background .12s ease, color .12s ease, border-color .12s ease, opacity .12s ease;
}
.series-chip .series-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; opacity: .3; transition: opacity .12s ease; }
.series-chip.on { color: var(--text); border-color: var(--series-color); background: color-mix(in srgb, var(--series-color) 12%, var(--card)); }
.series-chip.on .series-dot { opacity: 1; }
.series-chip:not(.on) { opacity: .65; }
.series-chip:hover { border-color: var(--series-color); }
.series-chip:focus-visible { outline: 2px solid var(--series-color); outline-offset: 1px; }
.chart-hint { font-size: 11.5px; color: var(--text-muted); margin: -4px 0 12px; }

/* Bar/line toggle */
.chart-type-btn { border: 0; padding: 5px 12px; background: transparent; cursor: pointer; font-size: 12px; color: var(--text-2); font-weight: 550; }
.chart-type-btn.active { background: var(--accent-tint); color: var(--ink-900); }

/* ─ Bootstrap button compat ─ */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--accent-deep); color: var(--ink-900); border: 1.5px solid var(--accent-deep);
    padding: 8px 16px; border-radius: var(--radius); font-size: 13.5px; font-weight: 650;
    cursor: pointer; transition: 0.13s; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-secondary { display: inline-flex; align-items: center; gap: 6px; background: var(--card); color: var(--text); border: 1.5px solid var(--border); padding: 8px 16px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: 0.13s; }
.btn-secondary:hover { background: var(--card-2); }
.btn-outline-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: transparent; color: var(--accent-deep); border: 1.5px solid var(--accent-deep); padding: 7px 14px; border-radius: var(--radius); font-size: 13.5px; font-weight: 650; cursor: pointer; transition: 0.13s; }
.btn-outline-primary:hover { background: var(--accent-tint); }
.btn-sm, .btn.btn-sm { padding: 4px 10px !important; font-size: 12px !important; }
.btn-link { background: none; border: none; padding: 0; cursor: pointer; color: var(--accent-deep); font-size: inherit; font-family: inherit; transition: 0.12s; }
.btn-link:hover { opacity: 0.75; }
.btn.btn-primary.btn-lg.w-100 { width: 100%; padding: 10px 20px; font-size: 14px; }

/* ─ Spacing ─ */
.p-0 { padding: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 14px !important; }
.mt-3 { margin-top: 14px !important; }
.ms-1 { margin-left: 4px !important; }
.ms-2 { margin-left: 8px !important; }
.me-1 { margin-right: 4px !important; }

/* ─ Text ─ */
.h4 { font-family: var(--font-display); font-size: 20px; font-weight: 500; margin: 0 0 10px; display: block; }
.h5 { font-family: var(--font-display); font-size: 16px; font-weight: 500; margin: 0 0 8px; display: block; }
.h6 { font-size: 13.5px; font-weight: 650; margin: 0 0 6px; display: block; }
.text-danger { color: #C53B1C !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }

/* ─ Form compat ─ */
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.form-control, .form-select { width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); font-size: 13.5px; font-family: var(--font-sans); outline: none; transition: 0.13s; box-sizing: border-box; }
.form-control:focus, .form-select:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-tint); }
.form-select-sm, .form-control-sm { padding: 4px 8px !important; font-size: 12px !important; }
.form-text { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; line-height: 1.4; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.form-check-input { width: 15px; height: 15px; accent-color: var(--accent-deep); cursor: pointer; flex-shrink: 0; }

/* ─ Card compat ─ */
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: 650; font-size: 14px; }
.card-rowfold { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; }
.card-rowfold .head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-rowfold .head h2 { font-family: var(--font-display); font-size: 16px; font-weight: 500; margin: 0; }
.card-rowfold .body { padding: 16px 18px; }

/* ─ Table compat ─ */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table-sm th, .table-sm td { padding: 7px 12px; }
.align-middle td, .align-middle th { vertical-align: middle; }

/* ─ List group compat ─ */
.list-group { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list-group-flush { border: none; border-radius: 0; }
.list-group-item { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; background: var(--card); color: var(--text); display: block; }
.list-group-item:last-child { border-bottom: none; }
.list-group-item-action { cursor: pointer; text-decoration: none; transition: background 0.12s; }
.list-group-item-action:hover { background: var(--card-2); color: var(--text); }
.list-group-item.active, .list-group-item-action.active { background: var(--accent-tint); color: var(--accent-ink); font-weight: 650; border-color: var(--accent-tint); }

/* ─ Alert compat ─ */
.alert { padding: 11px 15px; border-radius: var(--radius); border: 1px solid; margin-bottom: 16px; font-size: 13.5px; }
.alert-success { background: #ECFFF4; border-color: #8FE0BB; color: #117352; }
.alert-info { background: var(--accent-tint-2); border-color: var(--border); color: var(--text-muted); }
.alert-danger { background: #FFF1EE; border-color: #FFB298; color: #C53B1C; }

/* ─ Sticky compat ─ */
.sticky-lg-top, .sticky-top { position: sticky; top: 20px; }
.top-offset { top: 20px; }

/* ─ Link compat ─ */
.link-rowfold { color: var(--accent-deep); text-decoration: none; font-weight: 550; }
.link-rowfold:hover { text-decoration: underline; color: var(--accent-ink); }

/* ─ Permissions page ─ */
.permissions-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
    transition: background 0.12s;
    cursor: pointer;
}
.permissions-member:hover { background: var(--card-2); }
.permissions-member.active { background: var(--accent-tint); color: var(--accent-ink); }
.permissions-member:last-child { border-bottom: none; }

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.role-opt {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 13px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--card-2);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
    font-size: 13px;
    width: 100%;
}
.role-opt strong { font-size: 13px; font-weight: 700; color: var(--text); }
.role-opt span { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.role-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-tint-2); }
.role-opt.active { border-color: var(--accent); background: var(--accent-tint); }
.role-opt.active strong { color: var(--accent-ink); }
.role-opt:disabled { opacity: 0.6; cursor: default; }

/* ─ Record drag-and-drop link builder ─ */
.link-panel-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px;
}
.link-cards {
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    min-height: 90px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: border-color 0.15s, background 0.15s;
}
.link-cards.drag-over {
    border-color: var(--accent);
    background: var(--accent-tint-2);
}
.link-drop-hint {
    padding: 18px 10px;
    text-align: center;
    font-size: 12px;
    color: var(--text-faint);
    pointer-events: none;
}
.link-record-card {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 9px;
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 12.5px;
    cursor: grab;
    user-select: none;
    transition: border-color 0.12s, background 0.12s, opacity 0.12s, box-shadow 0.12s;
}
.link-record-card:hover { border-color: var(--accent); background: var(--accent-tint-2); }
.link-record-card.dragging { opacity: 0.35; cursor: grabbing; }
.link-record-card.drag-target-hover {
    border-color: var(--accent);
    background: var(--accent-tint);
    box-shadow: 0 0 0 3px var(--accent-tint);
    font-weight: 600;
}
.link-record-card.selected {
    border-color: var(--accent);
    background: var(--accent-tint);
    font-weight: 600;
}
.link-record-card .drag-dots { color: var(--text-faint); font-size: 13px; flex-shrink: 0; }
.link-record-card .card-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─ Schema drag-to-connect ─ */
.schema-port {
    opacity: 0;
    cursor: crosshair;
    transition: opacity 0.15s;
}
.schema-node-g:hover .schema-port { opacity: 1; }
.schema-node-g.drop-target rect:first-of-type {
    stroke: #7C5CFF !important;
    stroke-width: 3px;
    filter: drop-shadow(0 0 6px rgba(124,92,255,0.4));
}
.schema-create-modal {
    position: fixed;
    z-index: 9999;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px 16px;
    box-shadow: 0 12px 40px rgba(14,20,40,0.18);
    min-width: 290px;
    display: none;
}
.schema-create-modal.visible { display: block; }
.schema-create-modal h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text);
}

/* ─ AI Builder modal ─ */
.builder-modal { max-width: 640px; max-height: 84vh; display: flex; flex-direction: column; overflow: hidden; }
.bld-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.bld-head-ic {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    background: rgba(217,242,92,0.18); color: var(--accent-deep, #7C5CFF); flex-shrink: 0;
}
.bld-head-t { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--text); }
.bld-head-s { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.bld-x {
    display: grid; place-items: center; width: 28px; height: 28px; border: none; border-radius: 7px;
    background: transparent; color: var(--text-muted); cursor: pointer; flex-shrink: 0;
}
.bld-x:hover { background: var(--paper-2); color: var(--text); }
.bld-body { padding: 18px; overflow-y: auto; }
.bld-lead { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0 0 12px; }
.bld-input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    font: 14px/1.5 var(--font-sans); color: var(--text); background: var(--card);
    outline: none; resize: vertical;
}
.bld-input:focus { border-color: var(--accent-deep, #7C5CFF); box-shadow: 0 0 0 3px rgba(124,92,255,0.12); }
.bld-examples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.bld-ex {
    border: 1px dashed var(--border); background: transparent; border-radius: 999px;
    padding: 5px 12px; font-size: 12px; color: var(--text-muted); cursor: pointer; transition: 0.13s;
}
.bld-ex:hover { border-color: var(--accent-deep, #7C5CFF); color: var(--text); border-style: solid; }
.bld-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.bld-thinking { display: flex; align-items: center; gap: 14px; padding: 26px 8px; }
.bld-spinner {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    border: 3px solid var(--border); border-top-color: var(--accent-deep, #7C5CFF);
    animation: spin 0.8s linear infinite;
}
.bld-think-t { font-size: 14px; font-weight: 600; color: var(--text); }
.bld-think-s { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.bld-plan { display: flex; flex-direction: column; gap: 10px; }
.bld-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.bld-table-head {
    display: flex; align-items: center; gap: 9px; padding: 10px 14px;
    background: var(--card-2); border-bottom: 1px solid var(--border);
}
.bld-emoji { font-size: 15px; }
.bld-name { font-weight: 650; font-size: 13.5px; color: var(--text); }
.bld-count { margin-left: auto; font-size: 11.5px; color: var(--text-faint); }
.bld-fields { padding: 6px 0; }
.bld-field {
    display: flex; align-items: center; gap: 9px; padding: 5px 14px; font-size: 12.5px;
}
.bld-fname { color: var(--text-2); min-width: 130px; }
.bld-type {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 5px; background: var(--paper-2); color: var(--text-muted);
}
.bld-type.rel { background: var(--relation-soft, rgba(124,92,255,0.12)); color: var(--relation-ink, #7C5CFF); text-transform: none; letter-spacing: 0; font-weight: 600; }
/* Subitems: ownership rather than a reference — the child rows live inside the parent record. */
.bld-type.sub { background: var(--lookup-soft, rgba(27,106,184,0.12)); color: var(--lookup-ink, #1B6AB8); text-transform: none; letter-spacing: 0; font-weight: 600; }
.bld-opts { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   APPENDED — previously-unstyled component families.
   One clearly-commented section per family; add new rules below.
   ============================================================ */

/* ─ Shared spinner keyframes (Ask palette "Thinking…" + .bld-spinner) ─ */
@keyframes spin { to { transform: rotate(360deg); } }

/* ─ Peek drawer: breadcrumb trail + related-record rows (rowfold.js renderPeekStack / loadPeekCard) ─ */
.peek-crumb { display: flex; align-items: center; min-width: 0; overflow: hidden; font-size: 12.5px; }
.pc {
    color: var(--text-muted); cursor: pointer; min-width: 0; max-width: 160px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color 0.12s;
}
.pc:hover { color: var(--text); }
.pc.cur { color: var(--text); font-weight: 650; cursor: default; }
.peek-open-full { flex-shrink: 0; white-space: nowrap; }
.rc-nm { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-meta { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-arr { color: var(--text-faint); flex-shrink: 0; transition: color 0.12s; }
.rel-card:hover .rc-arr { color: var(--relation); }

/* ─ hero-tight: compact page hero (Ask, Admin, Settings, Trash) ─ */
.hero-tight { padding: 10px 0 18px; border-bottom: 1px solid var(--border-soft); margin-bottom: 22px; }
.hero-tight h1 { font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 6px 0 0; }
.hero-tight h1 em { font-style: italic; color: var(--accent-deep); }
.hero-tight .lead { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; margin: 8px 0 0; max-width: 640px; }

/* ─ Ask page (Pages/Ask) — the AI showcase ─ */
.ask-bar {
    display: flex; align-items: center; gap: 12px;
    background: var(--card); border: 1.5px solid var(--border);
    border-radius: 14px; padding: 10px 12px 10px 14px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ask-bar:focus-within { border-color: var(--accent-deep); box-shadow: 0 0 0 4px var(--accent-tint); }
.ask-bar-icon {
    flex-shrink: 0; display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--ink-900); color: var(--accent);
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
}
/* Overrides the dark home-card .ask-input for the light Ask page bar. */
.ask-bar .ask-input {
    flex: 1; margin: 0; padding: 6px 0;
    background: transparent; border: none; box-shadow: none;
    color: var(--text); font-size: 15.5px;
}
.ask-bar .ask-input::placeholder { color: var(--text-faint); }
.ask-bar .ask-input:focus-visible { outline: none; } /* the bar's focus-within ring signals focus */
.ask-bar .tb-btn { padding: 8px 18px; font-size: 13.5px; border-radius: 10px; flex-shrink: 0; }

.ask-suggestions { display: flex; align-items: baseline; gap: 10px; margin: 12px 2px 0; flex-wrap: wrap; }
.ask-sug-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--text-faint); flex-shrink: 0; }
.ask-sug-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.ask-sug {
    display: inline-flex; align-items: center;
    border: 1px dashed var(--border-2); border-radius: 999px;
    padding: 4px 12px; font-size: 12.5px; color: var(--text-muted);
    text-decoration: none; transition: 0.13s;
}
.ask-sug:hover { border-style: solid; border-color: var(--accent-deep); background: var(--accent-tint-2); color: var(--text); }

.ask-answer {
    margin-top: 22px; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); overflow: hidden;
}
.ask-answer-head { padding: 16px 22px 14px; border-bottom: 1px solid var(--border-soft); background: var(--card-2); }
.ask-q { font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.ask-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 5px; letter-spacing: 0.02em; }
.ask-answer-body { padding: 18px 22px 8px; font-size: 14.5px; line-height: 1.65; color: var(--text); }
.ask-answer-body p { margin: 0 0 12px; }
.ask-answer-body .ai-answer-list { margin: 0 0 12px; padding-left: 20px; }
.ask-answer-body .ai-answer-list li { margin: 4px 0; }
.ai-record-link { color: var(--accent-ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--accent-deep); transition: 0.12s; }
.ai-record-link:hover { color: var(--ink-900); background: var(--accent-tint); }

.ask-answer-records { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px 20px; border-top: 1px solid var(--border-soft); background: var(--card-2); }
.ask-rec-label { width: 100%; font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.ask-rec {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 12px 7px 8px; background: var(--card);
    border: 1px solid var(--border); border-radius: 11px;
    text-decoration: none; color: inherit; transition: 0.13s; min-width: 0;
}
.ask-rec:hover { border-color: var(--relation); box-shadow: var(--shadow-sm); color: inherit; }
.ask-rec-emoji {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 14px; color: #fff;
}
.ask-rec strong { display: block; font-size: 12.5px; font-weight: 650; line-height: 1.2; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-rec-table { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.2; margin-top: 1px; }

.ask-empty { margin-top: 26px; }
.ask-empty-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 14px; }
.ask-empty-title strong { font-weight: 500; font-style: italic; color: var(--accent-ink); }
.ask-empty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ask-know {
    display: flex; align-items: center; gap: 11px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 14px; min-width: 0;
}
.ask-know-em { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-size: 16px; color: #fff; }
.ask-know-name { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-know-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* ─ People page (Pages/People) ─ */
.ppl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ppl-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px 18px;
    display: flex; flex-direction: column; gap: 10px;
    transition: border-color 0.13s, box-shadow 0.13s;
}
.ppl-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.ppl-card.self { border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-tint-2); }
.ppl-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ppl-card-meta { flex: 1; min-width: 0; }
.ppl-card-name { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 650; min-width: 0; }
.ppl-card-email { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppl-self-tag {
    flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    background: var(--accent-tint); color: var(--accent-ink); border: 1px solid var(--accent-deep);
    padding: 1px 7px; border-radius: 999px;
}
.ppl-card-blurb { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.ppl-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.ppl-card-stat { font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.ppl-role-pill {
    flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
    padding: 3px 10px; border-radius: 999px;
    background: var(--paper-2); color: var(--text-2); border: 1px solid var(--border);
}
.ppl-role-pill.role-admin       { background: var(--accent-tint); color: var(--accent-ink); border-color: var(--accent-deep); }
.ppl-role-pill.role-editor      { background: var(--relation-soft); color: var(--relation-ink); border-color: transparent; }
.ppl-role-pill.role-contributor { background: var(--lookup-soft); color: var(--lookup-ink); border-color: transparent; }
.ppl-role-pill.role-viewer      { background: var(--paper-2); color: var(--text-muted); border-color: var(--border); }

/* Round avatar — same treatment as .pav; callers size it inline. */
.person-avatar { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }

/* Destructive toolbar-button variant (People remove, Reports delete). */
.tb-btn.danger { color: var(--rollup-ink); background: var(--card); border-color: var(--rollup-soft); }
.tb-btn.danger:hover { background: var(--rollup-soft); color: var(--rollup-ink); border-color: var(--rollup); }

/* ─ Reports builder (Pages/Reports/Edit + View) ─ */
.form-row { margin-bottom: 14px; }
.form-label-rowfold { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.field-rowfold {
    width: 100%; padding: 8px 12px; border: 1.5px solid var(--border);
    border-radius: var(--radius); background: var(--card); color: var(--text);
    font-size: 13.5px; font-family: var(--font-sans); outline: none; transition: 0.13s;
}
.field-rowfold:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-tint); }
.field-hint { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; line-height: 1.45; }

.grid-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; background: var(--card); }
.grid-table th {
    text-align: left; padding: 10px 14px; white-space: nowrap;
    font-size: 11.5px; font-weight: 650; color: var(--text-2);
    background: var(--card-2); border-bottom: 1px solid var(--border);
}
.grid-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid-table tbody tr:last-child td { border-bottom: none; }
.grid-table tbody tr:hover td { background: var(--accent-tint-2); }
.grid-table tfoot td { border-top: 1px solid var(--border); border-bottom: none; background: var(--card-2); font-variant-numeric: tabular-nums; }
.grid-table .empty-cell { color: var(--text-faint); }
.name-cell { font-weight: 600; color: var(--text); }

.field-badge {
    display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 5px;
    font-family: var(--font-mono); font-size: 10px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase; vertical-align: middle;
    background: var(--paper-2); color: var(--text-muted);
}
.field-badge.relation { background: var(--relation-soft); color: var(--relation-ink); }
.field-badge.lookup   { background: var(--lookup-soft); color: var(--lookup-ink); }
.field-badge.rollup   { background: var(--rollup-soft); color: var(--rollup-ink); }

.chart-controls { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
.seg > * + * { border-left: 1px solid var(--border-soft); }
/* Same pill container as .view-switch — Reports uses the -er name. */
.view-switcher { display: inline-flex; gap: 2px; padding: 3px; background: var(--paper-2); border: 1px solid var(--border); border-radius: 11px; }

/* ─ Misc previously-unstyled bits ─ */
.ws-card-tables { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; } /* mirrors .template-card-tables */
.link-accent { color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.link-accent:hover { text-decoration: underline; color: var(--accent-ink); }
.updated-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.iw-drop-inner { display: flex; flex-direction: column; align-items: center; }

/* Records/Detail related-records panel */
.related-group { margin-bottom: 14px; }
.related-group:last-child { margin-bottom: 0; }
.related-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.related-group-name { font-size: 12.5px; font-weight: 650; color: var(--text); text-decoration: none; }
.related-group-name:hover { color: var(--accent-ink); text-decoration: underline; }
.related-group-count {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    background: var(--paper-2); border-radius: 999px; padding: 0 7px; line-height: 16px;
    font-variant-numeric: tabular-nums;
}
.related-group-body { display: flex; flex-wrap: wrap; gap: 6px; }
.related-chip {
    display: inline-flex; align-items: center; max-width: 100%;
    padding: 3px 10px; border-radius: 8px;
    background: var(--relation-soft); color: var(--relation-ink);
    font-size: 12.5px; font-weight: 550; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: 0.12s;
}
.related-chip:hover { background: var(--card); box-shadow: 0 0 0 1.5px var(--relation); color: var(--relation-ink); }
.computed-value { display: flex; align-items: center; min-height: 30px; font-size: 13.5px; }

/* Small colored square used in related-group heads + the Audit feed. */
.accent-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; background: var(--text-faint); flex-shrink: 0; }
.accent-dot.accent-violet     { background: var(--violet); }
.accent-dot.accent-coral      { background: var(--coral); }
.accent-dot.accent-mint       { background: var(--mint); }
.accent-dot.accent-sky        { background: var(--sky); }
.accent-dot.accent-amber      { background: var(--amber); }
.accent-dot.accent-rose       { background: var(--rose); }
.accent-dot.accent-chartreuse { background: var(--chartreuse); }
.accent-dot.accent-ink        { background: var(--ink); }
.accent-dot.accent-emerald    { background: var(--emerald); }
.accent-dot.accent-indigo     { background: var(--indigo); }
.accent-dot.accent-cyan       { background: var(--cyan); }
