/* ==========================================================================
   Pack 09 — Ferrofluid & Liquid Mercury (2026)
   Metaball Coalescing Pools · Magnetic Cursor Bridging · Liquid Snap Physics
   Silver Mercury (Light) | Obsidian Ferrofluid (Dark)
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-display: 'Syne', sans-serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-pill: 999px;
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #060608;
}

button,
input {
  font-family: inherit;
  color: inherit;
}

button {
  outline: none;
  border: none;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.pane ::selection {
  background: var(--inv-bg);
  color: var(--inv-fg);
}

input,
textarea {
  caret-color: var(--fg);
}

.pane {
  scrollbar-color: var(--edge-strong) var(--ground);
  scrollbar-width: thin;
}

/* ==========================================================================
   THEMES — SILVER MERCURY (LIGHT) | OBSIDIAN FERROFLUID (DARK)
   ========================================================================== */

.theme-light {
  --ground: #ecece7;
  --mercury: #dcdcd6;
  --mercury-hi: #f6f6f3;
  --surface: rgba(244, 244, 240, 0.86);
  --surface-solid: #f4f4f0;
  --surface-alt: #e4e4de;

  --fg: #111114;
  --fg-muted: #4b4b52;
  --fg-faint: #62626b;

  --inv-bg: #121216;
  --inv-fg: #f4f4f0;

  --edge: rgba(18, 18, 22, 0.12);
  --edge-strong: rgba(18, 18, 22, 0.24);
  --spec-top: rgba(255, 255, 255, 0.92);
  --spec-bot: rgba(18, 18, 22, 0.1);
  --drop-shadow: 0 10px 26px -8px rgba(18, 18, 24, 0.14);

  --blob-rest: #d8d8d1;
  --blob-solid: #121216;
  --blob-probe: #c5c5bd;
  --sheen: rgba(255, 255, 255, 0.58);

  --danger: #b8221a;
  --danger-bg: #f7dedc;
  --danger-edge: rgba(184, 34, 26, 0.42);
}

.theme-dark {
  --ground: #060608;
  --mercury: #18181c;
  --mercury-hi: #24242a;
  --surface: rgba(19, 19, 23, 0.86);
  --surface-solid: #131317;
  --surface-alt: #1d1d22;

  --fg: #f2f2f5;
  --fg-muted: #b2b2bc;
  --fg-faint: #92929e;

  --inv-bg: #f0f0f4;
  --inv-fg: #0b0b0e;

  --edge: rgba(255, 255, 255, 0.11);
  --edge-strong: rgba(255, 255, 255, 0.24);
  --spec-top: rgba(255, 255, 255, 0.22);
  --spec-bot: rgba(0, 0, 0, 0.65);
  --drop-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.78);

  --blob-rest: #222228;
  --blob-solid: #f0f0f4;
  --blob-probe: #34343d;
  --sheen: rgba(255, 255, 255, 0.08);

  --danger: #ff6659;
  --danger-bg: #321614;
  --danger-edge: rgba(255, 102, 89, 0.45);
}

/* ==========================================================================
   SPLIT LAYOUT & STICKY 100VH MAGNETIC CANVAS
   ========================================================================== */

.split-root {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.pane {
  position: relative;
  color: var(--fg);
  background: var(--ground);
  overflow: clip;
  padding: 0;
}

.pane.theme-light {
  border-right: 1px solid var(--edge);
}

.pane-bg-canvas {
  position: sticky;
  top: 0;
  display: block;
  width: 100%;
  height: 100vh;
  margin-bottom: -100vh;
  pointer-events: none;
  z-index: 0;
}

.pane-inner {
  position: relative;
  z-index: 1;
  padding: 28px 36px 92px;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--edge-strong);
}

.pane-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pane-index {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--inv-bg);
  color: var(--inv-fg);
}

.pane-meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.pane-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 620px;
  margin: 0 auto;
}

.sec {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sec:has([data-open='true']) {
  position: relative;
  z-index: 60;
}

.sec-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--edge);
}

/* ==========================================================================
   METABALL LIQUID POOL ENGINE (SVG Gooey Filter on .ff-liquid-layer ONLY)
   ========================================================================== */

[data-ff-pool] {
  position: relative;
  isolation: isolate;
}

.ff-liquid-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
  filter: url(#goo-mercury);
  transform: translate3d(0, 0, 0);
}

[data-ff-pool='tight'] .ff-liquid-layer {
  filter: url(#goo-tight);
}

.ff-blob {
  position: absolute;
  background: var(--blob-rest);
  transition: background-color 180ms var(--ease-fluid), transform 180ms var(--ease-snap);
}

.ff-blob.is-solid {
  background: var(--blob-solid);
}

.ff-blob.is-surface {
  background: var(--surface-solid);
}

.ff-blob.is-ghost {
  background: transparent;
}

.ff-blob.is-danger {
  background: var(--danger-bg);
}

.ff-blob.is-disabled {
  opacity: 0.45;
}

.ff-probe {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blob-probe);
  opacity: 0;
  will-change: transform;
}

.ff-hover-pill {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--blob-rest);
  opacity: 0;
  pointer-events: none;
  will-change: transform, width, height, opacity;
  transition: opacity 150ms var(--ease-fluid);
}

.ff-splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blob-probe);
}

[data-ff-pool] > :not(.ff-liquid-layer),
[data-ff-drop] {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   MERCURY SURFACE PRIMITIVE (Liquid Specular Rim + Cursor Sheen)
   ========================================================================== */

.ff-surface {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  box-shadow:
    inset 0 1px 0 var(--spec-top),
    inset 0 -1px 0 var(--spec-bot),
    var(--drop-shadow);
  transition: border-color 180ms var(--ease-fluid);
}

.ff-surface:hover,
.ff-pool-card:hover {
  background-image: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 50%), var(--sheen), transparent 72%);
  border-color: var(--edge-strong);
}

/* ==========================================================================
   01 · NAVIGATION (Coalescing Mercury Nav Pool)
   ========================================================================== */

.ff-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
}

.ff-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ff-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  transition: color 160ms var(--ease-fluid), transform 140ms var(--ease-snap);
}

.ff-nav-item:hover {
  color: var(--fg);
}

.ff-nav-item.is-active {
  color: var(--inv-fg);
}

.ff-nav-item:active {
  transform: scale(0.95);
}

.ff-nav-search {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: transform 140ms var(--ease-snap);
}

.ff-nav-search:active {
  transform: scale(0.92);
}

/* ==========================================================================
   02 · ACTION BUTTONS & ICONS (Metaball Pools + Liquid Mercury Pills)
   ========================================================================== */

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 140ms var(--ease-snap), opacity 140ms var(--ease-fluid), background 150ms var(--ease-fluid), color 150ms var(--ease-fluid);
}

.ff-btn:active:not(:disabled) {
  transform: scale(0.95);
}

/* Standalone buttons (outside metaball pools) */
.ff-btn-standalone.ff-btn-primary {
  background: var(--inv-bg);
  color: var(--inv-fg);
  box-shadow: inset 0 1px 0 var(--spec-top), 0 4px 12px rgba(0, 0, 0, 0.16);
}

.ff-btn-standalone.ff-btn-primary:hover {
  opacity: 0.9;
}

.ff-btn-standalone.ff-btn-secondary {
  background: var(--mercury);
  color: var(--fg);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--spec-top), inset 0 -1px 0 var(--spec-bot);
}

.ff-btn-standalone.ff-btn-secondary:hover {
  background: var(--mercury-hi);
}

.ff-btn-standalone.ff-btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-edge);
}

.ff-btn-standalone.ff-btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

/* Buttons inside metaball pools (background handled by .ff-blob) */
.ff-btn-primary {
  color: var(--inv-fg);
}

.ff-btn-secondary {
  color: var(--fg);
}

.ff-btn-danger {
  color: var(--danger);
}

.ff-btn-ghost {
  color: var(--fg-muted);
  background: transparent;
}

.ff-btn-ghost:hover {
  color: var(--fg);
  background: var(--surface-alt);
}

.ff-btn-sm {
  height: 30px;
  padding: 0 13px;
  font-size: 12.5px;
}

.ff-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--fg-faint);
}

.ff-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: transform 140ms var(--ease-snap), color 140ms var(--ease-fluid);
}

.ff-icon-btn:active {
  transform: scale(0.92);
}

.ff-icon-btn.is-danger {
  color: var(--danger);
}

/* ==========================================================================
   03 · INPUTS & CONTROLS
   ========================================================================== */

.ff-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ff-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.ff-input-icon {
  position: absolute;
  left: 14px;
  color: var(--fg-faint);
  pointer-events: none;
  display: flex;
}

.ff-input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--edge);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), inset 0 1px 0 var(--spec-top);
  color: var(--fg);
  font-size: 13px;
  transition: border-color 150ms var(--ease-fluid);
}

.ff-input.has-icon {
  padding-left: 38px;
}

.ff-input::placeholder {
  color: var(--fg-faint);
}

.ff-input:focus {
  border-color: var(--fg);
  outline: none;
}

.ff-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* Segmented Control in Metaball Pool */
.ff-seg {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  gap: 10px;
}

.ff-seg-btn {
  height: 30px;
  padding: 0 15px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-muted);
  transition: color 150ms var(--ease-fluid);
}

.ff-seg-btn:hover {
  color: var(--fg);
}

.ff-seg-btn.is-active {
  color: var(--inv-fg);
}

/* Liquid-Snap Toggle Switches */
.ff-toggles {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.ff-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--mercury);
  border: 1px solid var(--edge);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
  transition: background 180ms var(--ease-fluid);
}

.ff-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fg-muted);
  box-shadow: inset 0 1px 0 var(--spec-top), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 240ms var(--ease-snap), width 160ms var(--ease-fluid), background 180ms var(--ease-fluid);
}

.ff-toggle:active::after {
  width: 24px;
}

.ff-toggle[aria-checked='true'] {
  background: var(--inv-bg);
  border-color: var(--inv-bg);
}

.ff-toggle[aria-checked='true']::after {
  transform: translateX(22px);
  background: var(--inv-fg);
}

.ff-toggle[aria-checked='true']:active::after {
  transform: translateX(16px);
}

/* Mercury Meniscus Slider */
.ff-slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ff-slider-wrap {
  position: relative;
  flex: 1;
  height: 26px;
  display: flex;
  align-items: center;
}

.ff-slider-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--mercury);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.ff-slider-fill {
  position: absolute;
  left: 0;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--inv-bg);
  pointer-events: none;
}

.ff-slider {
  position: relative;
  width: 100%;
  height: 26px;
  touch-action: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.ff-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--inv-bg);
  border: 2px solid var(--surface-solid);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 150ms var(--ease-snap);
}

.ff-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.ff-slider-val {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
  color: var(--fg);
}

/* ==========================================================================
   04 · CARDS
   ========================================================================== */

.ff-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ff-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ff-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ff-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
}

.ff-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  background: var(--mercury);
  color: var(--fg);
  border: 1px solid var(--edge);
  transition: transform 150ms var(--ease-snap), border-color 150ms var(--ease-fluid);
}

.ff-badge:hover {
  transform: scale(1.06);
  border-color: var(--edge-strong);
}

.ff-badge-inv {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-color: var(--inv-bg);
}

.ff-metric {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.ff-card-sub {
  font-size: 12px;
  color: var(--fg-faint);
}

.ff-progress {
  position: relative;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--mercury);
  margin-top: 4px;
}

.ff-progress-bar {
  position: relative;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--inv-bg);
}

.ff-progress-bar::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--inv-bg);
  border: 2px solid var(--surface-solid);
  transition: transform 180ms var(--ease-snap);
}

.ff-card:hover .ff-progress-bar::after {
  transform: scale(1.38);
}

.ff-card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ff-card-wide-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ff-card-wide-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--fg);
}

.ff-card-wide-desc {
  font-size: 12.5px;
  color: var(--fg-muted);
}

/* ==========================================================================
   05 · DIALOG SHEET & CONTEXT MENU
   ========================================================================== */

.ff-split-2 {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  align-items: start;
}

.ff-dialog {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ff-dialog-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--fg);
}

.ff-dialog-body {
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.ff-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--edge);
}

.ff-menu {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Cards & Pricing inside Metaball Pools */
.ff-pool-card {
  border-radius: var(--r-md);
  border: 1px solid var(--edge);
}

.ff-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  text-align: left;
  transition: background 140ms var(--ease-fluid), color 130ms var(--ease-fluid), transform 140ms var(--ease-snap);
}

.ff-menu-item:hover {
  color: var(--fg);
}

.ff-menu-sep {
  height: 1px;
  background: var(--edge);
  margin: 4px 8px;
}

.ff-menu-item.is-danger {
  color: var(--danger);
}

.ff-menu-item.is-danger:hover {
  color: var(--danger);
}

/* ==========================================================================
   06 · HEADER & BREADCRUMBS
   ========================================================================== */

.ff-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 12px;
  border-radius: var(--r-pill);
}

.ff-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ff-header-search-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mercury);
  border: 1px solid var(--edge);
  color: var(--fg);
  flex-shrink: 0;
}

.ff-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ff-crumbs .sep {
  color: var(--fg-faint);
}

.ff-crumbs strong {
  color: var(--fg);
  font-weight: 700;
}

.ff-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ff-avatar-pill {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--mercury);
  border: 1px solid var(--edge);
  color: var(--fg);
}

/* ==========================================================================
   07 · SIDEBAR RAIL & ACCORDION
   ========================================================================== */

.ff-rail-grid {
  display: grid;
  grid-template-columns: 205px 1fr;
  gap: 14px;
  align-items: start;
}

.ff-rail {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ff-rail-heading {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  padding: 2px 10px 8px;
}

.ff-rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 35px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  transition: color 140ms var(--ease-fluid);
}

.ff-rail-item-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ff-rail-item:hover {
  color: var(--fg);
}

.ff-rail-item.is-active {
  color: var(--inv-fg);
}

.ff-rail-count {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.ff-accordion {
  overflow: hidden;
}

.ff-acc-item + .ff-acc-item {
  border-top: 1px solid var(--edge);
}

.ff-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  text-align: left;
  transition: background 130ms var(--ease-fluid);
}

.ff-acc-trigger:hover {
  background: var(--surface-alt);
}

.ff-acc-chevron {
  display: inline-flex;
  color: var(--fg-muted);
  transition: transform 200ms var(--ease-snap);
}

.ff-acc-item[data-open='true'] .ff-acc-chevron {
  transform: rotate(180deg);
}

.ff-acc-panel {
  display: none;
  padding: 0 18px 15px;
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.55;
}

.ff-acc-item[data-open='true'] .ff-acc-panel {
  display: block;
}

/* ==========================================================================
   08 · DATA TABLE
   ========================================================================== */

.ff-table-wrap {
  overflow: hidden;
}

.ff-table {
  width: 100%;
  border-collapse: collapse;
}

.ff-table th {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--edge-strong);
}

.ff-table td {
  padding: 12px 16px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  border-bottom: 1px solid var(--edge);
  vertical-align: middle;
}

.ff-table tr:last-child td {
  border-bottom: none;
}

.ff-table tbody tr:hover td {
  background-color: var(--surface-alt);
  background-image: radial-gradient(220px circle at var(--sx, 50%) 50%, var(--sheen), transparent 72%);
}

.ff-table-muted {
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 12px;
}

.ff-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* ==========================================================================
   09 · FORM FIELDS (Custom Non-Native Dropdown + Live Space Validation)
   ========================================================================== */

.ff-form-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ff-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}

.field:has(.ff-dropdown[data-open='true']) {
  z-index: 50;
}

.field-full {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-muted);
}

.ff-input-rect {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  border: 1px solid var(--edge);
  color: var(--fg);
  font-size: 13px;
  transition: border-color 140ms var(--ease-fluid), background 140ms var(--ease-fluid);
}

.ff-input-rect:focus {
  background: var(--surface-solid);
  border-color: var(--fg);
  outline: none;
}

.ff-input-rect.is-error {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.field-error {
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  min-height: 16px;
}

.ff-dropdown {
  position: relative;
}

.ff-dropdown-btn {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  border: 1px solid var(--edge);
  color: var(--fg);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 140ms var(--ease-fluid), background 140ms var(--ease-fluid);
}

.ff-dropdown-btn:hover,
.ff-dropdown[data-open='true'] .ff-dropdown-btn {
  background: var(--surface-solid);
  border-color: var(--fg);
}

.ff-dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 5px;
  border-radius: var(--r-sm);
  background: var(--surface-solid);
  border: 1px solid var(--edge-strong);
  box-shadow: var(--drop-shadow);
  z-index: 60;
  flex-direction: column;
  gap: 2px;
}

.ff-dropdown[data-open='true'] .ff-dropdown-list {
  display: flex;
}

.ff-dropdown-opt {
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  transition: background 120ms var(--ease-fluid), color 120ms var(--ease-fluid);
}

.ff-dropdown-opt:hover {
  background: var(--surface-alt);
  color: var(--fg);
}

.ff-dropdown-opt.is-selected {
  background: var(--inv-bg);
  color: var(--inv-fg);
  font-weight: 600;
}

.ff-checks {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 2px;
}

.ff-check-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--fg);
  cursor: pointer;
  user-select: none;
}

.ff-check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--surface-solid);
  border: 1.5px solid var(--edge-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--inv-fg);
  transition: background 140ms var(--ease-fluid), border-color 140ms var(--ease-fluid);
  flex-shrink: 0;
}

.ff-check-label:hover .ff-check-box {
  border-color: var(--fg);
  transform: scale(1.1);
}

.ff-check-label[data-checked='true'] .ff-check-box {
  background: var(--inv-bg);
  border-color: var(--inv-bg);
}

/* ==========================================================================
   10 · TOAST & STATUS BANNER
   ========================================================================== */

.ff-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ff-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: var(--r-pill);
}

.ff-toast-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}

.ff-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.ff-banner-text {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ==========================================================================
   11 · PRICING CARDS
   ========================================================================== */

.ff-pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ff-price-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ff-price-card.is-featured {
  border-color: var(--edge-strong);
}

.ff-price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ff-price-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
}

.ff-price-val {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.ff-price-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.ff-price-period {
  font-size: 12.5px;
  color: var(--fg-muted);
}

.ff-price-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--edge);
  font-size: 12.5px;
  color: var(--fg-muted);
}

.ff-price-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ff-price-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-faint);
  flex-shrink: 0;
}

.ff-price-card.is-featured .ff-price-list li::before {
  background: var(--fg);
}

/* ==========================================================================
   12 · SKELETON LOADER (Liquid Mercury Droplet Pulse)
   ========================================================================== */

.ff-skel-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ff-skel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ff-skel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

@keyframes ffShimmer {
  0% { background-position: -220% 0; }
  100% { background-position: 220% 0; }
}

.ff-skel-bar {
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--mercury) 20%, var(--mercury-hi) 50%, var(--mercury) 80%);
  background-size: 220% 100%;
  animation: ffShimmer 1.7s ease-in-out infinite;
}

.ff-skel-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ff-skel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ff-skel-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ff-loaded-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  border: 1px solid var(--edge);
}

.ff-loaded-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ff-loaded-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.ff-loaded-sub {
  font-size: 12px;
  color: var(--fg-muted);
}

.ico {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ff-skel-bar {
    animation: none;
    background: var(--mercury);
  }
}

@media (max-width: 1080px) {
  .split-root {
    grid-template-columns: 1fr;
  }
  .pane.theme-light {
    border-right: none;
    border-bottom: 1px solid var(--edge);
  }
}
