/* =============================================================================
   Linkset UI — shared tokens, typography, and form controls (production polish)
   ============================================================================= */

:root {
  /* Font stacks — SaaS-grade fallbacks */
  --ls-font-sans: "Plus Jakarta Sans", "Segoe UI", roboto, "Helvetica Neue", arial, ui-sans-serif, system-ui,
    sans-serif;
  --ls-font-display: "Instrument Serif", georgia, cambria, "Times New Roman", ui-serif, serif;

  /* Modular type scale (~1.2 ratio): UI density + readable marketing */
  --ls-text-2xs: 0.6875rem; /* 11px — eyebrow, micro */
  --ls-text-xs: 0.75rem; /* 12px */
  --ls-text-sm: 0.8125rem; /* 13px — captions, labels */
  --ls-text-md: 0.875rem; /* 14px — nav, compact UI */
  --ls-text-base: 0.9375rem; /* 15px — primary app body */
  --ls-text-lg: 1rem; /* 16px */
  --ls-text-xl: 1.0625rem; /* 17px */
  --ls-text-2xl: 1.25rem; /* 20px */
  --ls-text-3xl: 1.5rem; /* 24px */
  --ls-text-4xl: 1.875rem; /* 30px */
  --ls-text-5xl: 2.25rem; /* 36px — KPI, price emphasis */

  /* Line-height: UI vs reading */
  --ls-leading-none: 1;
  --ls-leading-tight: 1.12;
  --ls-leading-snug: 1.28;
  --ls-leading-ui: 1.45;
  --ls-leading-body: 1.55;
  --ls-leading-relaxed: 1.65;
  --ls-leading-loose: 1.75;

  --ls-tracking-tighter: -0.04em;
  --ls-tracking-tight: -0.025em;
  --ls-tracking-snug: -0.015em;
  --ls-tracking-normal: 0;
  --ls-tracking-ui: 0.01em;
  --ls-tracking-wide: 0.02em;
  --ls-tracking-label: 0.08em;
  --ls-tracking-caps: 0.12em;

  --ls-ink: #fafaf9;
  --ls-ink-muted: #a8a29e;
  --ls-ink-faint: #78716c;
  --ls-surface: rgba(12, 10, 9, 0.92);
  --ls-surface-raised: rgba(28, 25, 23, 0.85);
  --ls-border: rgba(87, 83, 78, 0.65);
  --ls-border-hover: rgba(120, 113, 108, 0.85);
  --ls-focus-ring: rgba(139, 92, 246, 0.45);
  --ls-focus-glow: rgba(139, 92, 246, 0.18);
  --ls-accent: #a78bfa;
  --ls-accent-strong: #8b5cf6;
  --ls-success: #34d399;
  --ls-danger: #f87171;
  --ls-radius: 0.875rem;
  --ls-radius-sm: 0.625rem;
  --ls-transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease,
    transform 0.15s ease;
}

/* Base app shell */
html.linkset-root {
  font-size: 100%;
}

body.linkset-root {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
  line-height: var(--ls-leading-body);
  letter-spacing: var(--ls-tracking-ui);
  font-optical-sizing: auto;
  font-feature-settings: "kern" 1, "liga" 1;
  font-variant-numeric: proportional-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: var(--ls-font-display);
  font-feature-settings: "kern" 1;
}

/* -----------------------------------------------------------------------------
   Semantic type — display serif vs UI sans (production SaaS hierarchy)
   -------------------------------------------------------------------------- */

.linkset-root .ls-brand {
  font-family: var(--ls-font-display);
  font-size: var(--ls-text-4xl);
  font-weight: 400;
  line-height: var(--ls-leading-none);
  letter-spacing: var(--ls-tracking-tighter);
}

.linkset-root .ls-heading-hero {
  font-family: var(--ls-font-display);
  font-size: clamp(2.65rem, 6.5vw + 1rem, 4.85rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: var(--ls-tracking-tighter);
  color: var(--ls-ink);
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 80px rgba(139, 92, 246, 0.14);
}

.linkset-root .ls-heading-page {
  font-family: var(--ls-font-display);
  font-size: clamp(2rem, 2.25vw + 1.35rem, 2.875rem);
  font-weight: 400;
  line-height: var(--ls-leading-tight);
  letter-spacing: -0.028em;
  color: var(--ls-ink);
  text-wrap: balance;
}

.linkset-root .ls-heading-section {
  font-family: var(--ls-font-display);
  font-size: clamp(1.3125rem, 0.9vw + 1rem, 1.9375rem);
  font-weight: 400;
  line-height: var(--ls-leading-snug);
  letter-spacing: var(--ls-tracking-snug);
  color: var(--ls-ink);
}

.linkset-root .ls-heading-card {
  font-family: var(--ls-font-display);
  font-size: var(--ls-text-2xl);
  font-weight: 400;
  line-height: var(--ls-leading-snug);
  letter-spacing: var(--ls-tracking-snug);
  color: var(--ls-ink);
}

.linkset-root .ls-lead {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-lg);
  line-height: var(--ls-leading-loose);
  letter-spacing: var(--ls-tracking-wide);
  font-weight: 400;
  color: var(--ls-ink-muted);
  max-width: 42rem;
}

@media (min-width: 640px) {
  .linkset-root .ls-lead {
    font-size: var(--ls-text-xl);
  }
}

.linkset-root .ls-body {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
  line-height: var(--ls-leading-relaxed);
  letter-spacing: var(--ls-tracking-ui);
  font-weight: 400;
  color: #d6d3d1;
}

.linkset-root .ls-body-muted {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
  line-height: var(--ls-leading-relaxed);
  letter-spacing: var(--ls-tracking-ui);
  font-weight: 400;
  color: var(--ls-ink-muted);
}

.linkset-root .ls-caption {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-wide);
  font-weight: 500;
}

.linkset-root .ls-micro {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-2xs);
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-label);
  font-weight: 500;
}

.linkset-root .ls-eyebrow {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-2xs);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-caps);
  text-transform: uppercase;
}

.linkset-root .ls-overline {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-2xs);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-caps);
  text-transform: uppercase;
}

.linkset-root .ls-eyebrow-muted {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-2xs);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-caps);
  text-transform: uppercase;
}

.linkset-root .ls-section-label {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-2xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ls-ink-faint);
}

.linkset-root .ls-kpi-label {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 500;
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
  color: var(--ls-ink-faint);
}

.linkset-root .ls-kpi-value {
  font-family: var(--ls-font-display);
  font-size: var(--ls-text-4xl);
  font-weight: 400;
  line-height: var(--ls-leading-tight);
  letter-spacing: var(--ls-tracking-tight);
  color: var(--ls-ink);
  font-variant-numeric: tabular-nums lining-nums;
}

@media (min-width: 640px) {
  .linkset-root .ls-kpi-value {
    font-size: var(--ls-text-5xl);
  }
}

.linkset-root .ls-price {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-5xl);
  font-weight: 600;
  line-height: var(--ls-leading-tight);
  letter-spacing: var(--ls-tracking-tight);
  color: var(--ls-ink);
  font-variant-numeric: tabular-nums lining-nums;
}

.linkset-root .ls-nav-link {
  font-size: var(--ls-text-md);
  font-weight: 500;
  letter-spacing: var(--ls-tracking-wide);
}

.linkset-root .ls-sidebar-link {
  font-size: var(--ls-text-md);
  font-weight: 500;
  letter-spacing: var(--ls-tracking-ui);
}

.linkset-root .ls-sidebar-tagline {
  font-size: var(--ls-text-2xs);
  font-weight: 500;
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
  color: var(--ls-ink-faint);
}

/* Dashboard shell — elevated panels and active nav */
.linkset-root .ls-sidebar-link-active {
  background: rgba(139, 92, 246, 0.14);
  color: #fafaf9;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.22);
}

.linkset-root .ls-dash-card {
  border-radius: 1rem;
  border: 1px solid rgba(41, 37, 36, 0.95);
  background: linear-gradient(165deg, rgba(41, 37, 36, 0.42) 0%, rgba(12, 10, 9, 0.68) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 16px 48px -16px rgba(0, 0, 0, 0.55);
}

.linkset-root .ls-dash-chart-panel {
  border-radius: 1rem;
  border: 1px solid rgba(41, 37, 36, 0.85);
  background: rgba(28, 25, 23, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.linkset-root .ls-dash-plan-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(87, 83, 78, 0.85);
  background: rgba(28, 25, 23, 0.55);
  padding: 0.375rem 1rem;
  font-size: var(--ls-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d6d3d1;
}

/* Flash / inline notices (dashboard + marketing shell) */
.linkset-root .ls-dash-flash {
  border-radius: 0.75rem;
  border: 1px solid rgba(41, 37, 36, 0.9);
  background: rgba(28, 25, 23, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* Audience studio — scroll lists */
.linkset-root .ls-audience-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 113, 108, 0.42) transparent;
}

.linkset-root .ls-audience-scroll::-webkit-scrollbar {
  width: 6px;
}

.linkset-root .ls-audience-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(120, 113, 108, 0.4);
  border-radius: 9999px;
}

.linkset-root .ls-audience-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(168, 162, 158, 0.45);
}

.linkset-root .ls-chart-title {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
  color: var(--ls-ink-muted);
}

.linkset-root .ls-panel-title {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-xl);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-snug);
  color: var(--ls-ink);
}

.linkset-root .ls-promo-title {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-lg);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-snug);
  color: var(--ls-ink);
}

.linkset-root .ls-promo-copy {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  line-height: var(--ls-leading-body);
  letter-spacing: var(--ls-tracking-wide);
  color: rgba(221, 214, 254, 0.88);
}

.linkset-root .ls-error-code {
  font-family: var(--ls-font-display);
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 400;
  line-height: var(--ls-leading-none);
  letter-spacing: var(--ls-tracking-tighter);
  color: rgba(250, 250, 249, 0.92);
  text-shadow: 0 0 80px rgba(139, 92, 246, 0.35);
}

/* Optional: long-form blocks inside marketing/settings */
.linkset-root .ls-prose {
  font-size: var(--ls-text-base);
  line-height: var(--ls-leading-relaxed);
  letter-spacing: var(--ls-tracking-ui);
  color: var(--ls-ink-muted);
}
.linkset-root .ls-prose p + p {
  margin-top: 1em;
}

/* -----------------------------------------------------------------------------
   Native HTML — clear hierarchy for <h1>–<h6>, <p>, and inline text
   Low specificity (:where) so .ls-* and utilities override. UX: scan pattern is
   display serif (h1–h2) → sans subheads (h3–h6) → relaxed body (p) → muted small
   -------------------------------------------------------------------------- */

.linkset-root :where(h1, h2, h3, h4, h5, h6) {
  font-style: normal;
  text-wrap: balance;
}

.linkset-root :where(h1) {
  font-family: var(--ls-font-display);
  font-size: clamp(2rem, 2.25vw + 1.35rem, 2.875rem);
  font-weight: 400;
  line-height: var(--ls-leading-tight);
  letter-spacing: -0.028em;
  color: var(--ls-ink);
  margin: 0 0 0.875rem;
}

.linkset-root :where(h2) {
  font-family: var(--ls-font-display);
  font-size: clamp(1.3125rem, 0.85vw + 1rem, 1.875rem);
  font-weight: 400;
  line-height: var(--ls-leading-snug);
  letter-spacing: var(--ls-tracking-snug);
  color: var(--ls-ink);
  margin: 2rem 0 0.625rem;
}

.linkset-root :where(h3) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-xl);
  font-weight: 600;
  line-height: var(--ls-leading-snug);
  letter-spacing: var(--ls-tracking-snug);
  color: var(--ls-ink);
  margin: 1.75rem 0 0.5rem;
}

.linkset-root :where(h4) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-lg);
  font-weight: 600;
  line-height: var(--ls-leading-snug);
  letter-spacing: var(--ls-tracking-snug);
  color: var(--ls-ink);
  margin: 1.5rem 0 0.5rem;
}

.linkset-root :where(h5) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  font-weight: 600;
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-wide);
  text-transform: uppercase;
  color: var(--ls-ink-muted);
  margin: 1.25rem 0 0.375rem;
}

.linkset-root :where(h6) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 600;
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
  color: var(--ls-ink-faint);
  margin: 1.25rem 0 0.375rem;
}

.linkset-root :where(h1:first-child, h2:first-child, h3:first-child) {
  margin-top: 0;
}

.linkset-root :where(p) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
  font-weight: 400;
  line-height: var(--ls-leading-relaxed);
  letter-spacing: var(--ls-tracking-ui);
  color: #d6d3d1;
  margin: 0 0 1rem;
  max-width: 65ch;
}

.linkset-root :where(p:last-child) {
  margin-bottom: 0;
}

.linkset-root :where(small) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 500;
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-ui);
  color: var(--ls-ink-muted);
}

.linkset-root :where(strong, b) {
  font-weight: 600;
  color: var(--ls-ink);
}

.linkset-root :where(em, i:not([class])) {
  font-style: italic;
}

.linkset-root :where(sub, sup) {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.linkset-root :where(sup) {
  top: -0.35em;
}

.linkset-root :where(sub) {
  bottom: -0.2em;
}

.linkset-root :where(blockquote) {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid rgba(167, 139, 250, 0.45);
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  line-height: var(--ls-leading-relaxed);
  font-style: italic;
  color: var(--ls-ink-muted);
}

.linkset-root :where(blockquote) :where(p) {
  margin-bottom: 0.75rem;
  max-width: none;
}

.linkset-root :where(blockquote) :where(p:last-child) {
  margin-bottom: 0;
}

.linkset-root :where(code) {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", menlo, monospace;
  font-size: 0.88em;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0.15em 0.4em;
  border-radius: var(--ls-radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e7e5e4;
}

.linkset-root :where(pre) {
  margin: 1rem 0;
  padding: 1rem 1.125rem;
  overflow-x: auto;
  font-family: ui-monospace, menlo, monospace;
  font-size: var(--ls-text-sm);
  line-height: var(--ls-leading-ui);
  letter-spacing: 0;
  border-radius: var(--ls-radius);
  border: 1px solid var(--ls-border);
  background: rgb(12 10 9);
  color: var(--ls-ink-muted);
}

.linkset-root :where(pre code) {
  padding: 0;
  border: none;
  background: transparent;
  font-size: inherit;
  color: inherit;
}

.linkset-root :where(ul, ol) {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
  line-height: var(--ls-leading-relaxed);
  color: #d6d3d1;
}

.linkset-root :where(ul) {
  list-style-type: disc;
}

.linkset-root :where(ol) {
  list-style-type: decimal;
}

.linkset-root :where(li) {
  margin: 0.375rem 0;
  padding-left: 0.25rem;
}

.linkset-root :where(li)::marker {
  color: var(--ls-ink-faint);
}

.linkset-root :where(dl) {
  margin: 0 0 1rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
}

.linkset-root :where(dt) {
  font-weight: 600;
  color: var(--ls-ink);
  margin-top: 0.75rem;
}

.linkset-root :where(dt:first-child) {
  margin-top: 0;
}

.linkset-root :where(dd) {
  margin: 0.25rem 0 0 0;
  padding-left: 0;
  color: var(--ls-ink-muted);
  line-height: var(--ls-leading-relaxed);
}

.linkset-root :where(figcaption) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-ui);
  color: var(--ls-ink-muted);
  margin-top: 0.5rem;
}

.linkset-root :where(hr) {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--ls-border);
}

.linkset-root :where(address) {
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-style: normal;
  line-height: var(--ls-leading-relaxed);
  color: var(--ls-ink-muted);
}

.linkset-root :where(mark) {
  padding: 0.1em 0.25em;
  border-radius: 0.25rem;
  background: rgba(167, 139, 250, 0.25);
  color: var(--ls-ink);
}

.linkset-root :where(kbd) {
  font-family: ui-monospace, monospace;
  font-size: var(--ls-text-xs);
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid var(--ls-border-hover);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ls-ink-muted);
}

/* Paragraphs inside cards/panels often need full width — opt out of 65ch */
.linkset-root :where(.rounded-2xl, .rounded-3xl, [class*="border-stone"]) :where(p),
.linkset-root .linkset-form :where(p),
.linkset-root table :where(p) {
  max-width: none;
}

/* Creator-facing public bio — theme vars */
.bio-page .ls-bio-name {
  font-family: var(--bio-font, var(--ls-font-display));
  font-size: clamp(1.6875rem, 3.6vw + 1rem, 2.375rem);
  font-weight: 400;
  line-height: var(--ls-leading-tight);
  letter-spacing: var(--ls-tracking-tight);
  color: var(--bio-text);
  text-wrap: balance;
}

.bio-page .ls-bio-about {
  font-family: var(--bio-font, var(--ls-font-sans));
  font-size: var(--ls-text-xl);
  line-height: var(--ls-leading-loose);
  letter-spacing: var(--ls-tracking-wide);
  font-weight: 400;
  color: var(--bio-muted);
}

.bio-page .ls-bio-stats {
  font-family: var(--bio-font, var(--ls-font-sans));
  font-size: var(--ls-text-sm);
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-wide);
  font-weight: 500;
  color: color-mix(in srgb, var(--bio-muted) 95%, transparent);
}

.bio-page .ls-bio-caption {
  font-family: var(--bio-font, var(--ls-font-sans));
  font-size: var(--ls-text-sm);
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-ui);
  font-weight: 500;
  color: var(--bio-muted);
}

/* --- Inputs (text-like) --------------------------------------------------- */
.ls-input,
.ls-textarea,
select.ls-select,
textarea.ls-textarea {
  display: block;
  width: 100%;
  border-radius: var(--ls-radius);
  border: 1px solid var(--ls-border);
  background-color: rgb(12 10 9);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent 40%);
  color: var(--ls-ink);
  padding: 0.8rem 1rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-ui);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: var(--ls-transition);
}

.ls-input::placeholder,
.ls-textarea::placeholder {
  color: rgb(87 83 78);
}

.ls-input:hover,
.ls-textarea:hover,
select.ls-select:hover {
  border-color: var(--ls-border-hover);
}

.ls-input:focus,
.ls-textarea:focus,
select.ls-select:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px var(--ls-focus-glow),
    0 0 0 1px rgba(167, 139, 250, 0.35);
}

.ls-input:focus-visible,
.ls-textarea:focus-visible,
select.ls-select:focus-visible {
  outline: none;
}

.ls-input:disabled,
.ls-textarea:disabled,
select.ls-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

textarea.ls-textarea {
  min-height: 6rem;
  resize: vertical;
}

/* Select — custom chevron */
select.ls-select {
  appearance: none;
  cursor: pointer;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a8a29e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.1rem;
}

select.ls-select option {
  background-color: rgb(28 25 23);
  color: var(--ls-ink);
}

/* Color wells (theme pickers) */
input[type="color"].ls-color {
  height: 2.75rem;
  padding: 0.2rem;
  border-radius: var(--ls-radius-sm);
  border: 1px solid var(--ls-border);
  background: rgb(12 10 9);
  cursor: pointer;
  transition: var(--ls-transition);
}

input[type="color"].ls-color:hover {
  border-color: var(--ls-border-hover);
}

input[type="color"].ls-color:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ls-focus-glow);
}

/* Checkboxes — custom (no clip-path; works everywhere) */
input[type="checkbox"].ls-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  flex-shrink: 0;
  border-radius: 0.375rem;
  border: 1.5px solid var(--ls-border-hover);
  background: rgb(12 10 9);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: var(--ls-transition);
  vertical-align: middle;
}

input[type="checkbox"].ls-checkbox:hover {
  border-color: rgba(167, 139, 250, 0.55);
}

input[type="checkbox"].ls-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ls-focus-glow);
}

input[type="checkbox"].ls-checkbox:checked {
  background-color: var(--ls-accent-strong);
  border-color: rgba(167, 139, 250, 0.95);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c0a09' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 0.85rem;
  background-position: center;
  background-repeat: no-repeat;
}

input[type="checkbox"].ls-checkbox:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Radios */
input[type="radio"].ls-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  flex-shrink: 0;
  border-radius: 9999px;
  border: 1.5px solid var(--ls-border-hover);
  background: rgb(12 10 9);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: var(--ls-transition);
}

input[type="radio"].ls-radio:hover {
  border-color: rgba(167, 139, 250, 0.55);
}

input[type="radio"].ls-radio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ls-focus-glow);
}

input[type="radio"].ls-radio:checked {
  border-color: var(--ls-accent-strong);
  background: radial-gradient(circle, var(--ls-accent-strong) 38%, transparent 40%);
  box-shadow: inset 0 0 0 3px rgb(12 10 9), 0 0 0 1px rgba(167, 139, 250, 0.5);
}

/* File inputs */
input[type="file"].ls-file,
input[type="file"].ls-file-sm {
  width: 100%;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  letter-spacing: var(--ls-tracking-ui);
  color: var(--ls-ink-muted);
}

input[type="file"].ls-file::file-selector-button {
  margin-right: 1rem;
  border-radius: var(--ls-radius-sm);
  border: 1px solid rgba(109 40 217, 0.45);
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.35), rgba(109, 40, 217, 0.25));
  color: var(--ls-ink);
  padding: 0.5rem 1rem;
  font-family: var(--ls-font-sans);
  font-weight: 600;
  font-size: var(--ls-text-sm);
  letter-spacing: var(--ls-tracking-ui);
  cursor: pointer;
  transition: var(--ls-transition);
}

input[type="file"].ls-file::file-selector-button:hover {
  border-color: rgba(167, 139, 250, 0.75);
  background: linear-gradient(to bottom, rgba(167, 139, 250, 0.4), rgba(139, 92, 246, 0.3));
}

/* Labels */
.ls-label {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 500;
  letter-spacing: var(--ls-tracking-wide);
  line-height: var(--ls-leading-ui);
  color: var(--ls-ink-muted);
}

/* Scoped fallbacks: Django-rendered fields inside .linkset-form (no widget attrs) */
.linkset-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not(
    [type="button"]
  ):not([type="hidden"]):not([type="image"]):not([type="range"]):not([type="color"]),
.linkset-form textarea:not(.bio-page textarea),
.linkset-form select {
  display: block;
  width: 100%;
  border-radius: var(--ls-radius);
  border: 1px solid var(--ls-border);
  background-color: rgb(12 10 9);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent 40%);
  color: var(--ls-ink);
  padding: 0.8rem 1rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-base);
  line-height: var(--ls-leading-ui);
  letter-spacing: var(--ls-tracking-ui);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: var(--ls-transition);
}

.linkset-form select {
  appearance: none;
  cursor: pointer;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a8a29e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.1rem;
}

.linkset-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not(
    [type="button"]
  ):not([type="hidden"]):not([type="image"]):not([type="range"]):not([type="color"]):focus,
.linkset-form textarea:focus,
.linkset-form select:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px var(--ls-focus-glow),
    0 0 0 1px rgba(167, 139, 250, 0.35);
}

.linkset-form input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.375rem;
  border: 1.5px solid var(--ls-border-hover);
  background: rgb(12 10 9);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  vertical-align: middle;
  transition: var(--ls-transition);
}

.linkset-form input[type="checkbox"]:hover {
  border-color: rgba(167, 139, 250, 0.55);
}

.linkset-form input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ls-focus-glow);
}

.linkset-form input[type="checkbox"]:checked {
  background-color: var(--ls-accent-strong);
  border-color: rgba(167, 139, 250, 0.95);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c0a09' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 0.85rem;
  background-position: center;
  background-repeat: no-repeat;
}

/* Bio app blocks (unchanged semantics) */
.bio-glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bio-page {
  min-height: 100vh;
  font-family: var(--bio-font, var(--ls-font-sans));
  background: var(--bio-bg);
  color: var(--bio-text);
}

.bio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: var(--bio-radius, 1rem);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--bio-card) 100%, transparent) 0%,
    color-mix(in srgb, var(--bio-card) 85%, #000 15%) 100%
  );
  border: 1px solid var(--bio-card-border);
  color: var(--bio-text);
  font-family: var(--bio-font, var(--ls-font-sans));
  font-size: var(--ls-text-base);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  text-decoration: none;
  box-shadow:
    var(--bio-shadow),
    inset 0 1px 0 color-mix(in srgb, var(--bio-text) 8%, transparent);
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.18s ease,
    box-shadow 0.2s ease;
}

.bio-btn:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--bio-accent) 55%, var(--bio-card-border));
  box-shadow:
    var(--bio-shadow),
    0 0 0 1px color-mix(in srgb, var(--bio-accent) 25%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--bio-text) 10%, transparent);
}

.bio-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px var(--bio-bg, #0f172a),
    0 0 0 4px color-mix(in srgb, var(--bio-accent) 55%, transparent);
}

.bio-btn:active {
  transform: translateY(0);
}

.bio-btn-label {
  flex: 1 1 auto;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bio-btn-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: color-mix(in srgb, var(--bio-accent) 92%, var(--bio-text));
  opacity: 0.92;
}

.bio-btn-icon svg {
  display: block;
}

.bio-btn-external {
  flex-shrink: 0;
  display: inline-flex;
  margin-left: auto;
  opacity: 0.45;
}

.bio-btn.target-blank .bio-btn-label {
  padding-inline-end: 0.125rem;
}

.sortable-ghost {
  opacity: 0.45;
}

/* Primary actions — consistent shine */
.ls-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(to bottom, #6ee7b7, #34d399);
  padding: 0.75rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: rgb(12 10 9);
  box-shadow: 0 4px 24px -4px rgba(52, 211, 153, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.ls-btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 32px -6px rgba(52, 211, 153, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ls-btn-primary:active {
  transform: translateY(1px);
}

.ls-btn-violet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(to bottom, rgb(167 139 250), rgb(139 92 246));
  padding: 0.75rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: white;
  box-shadow: 0 4px 24px -4px rgba(139, 92, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.ls-btn-violet:hover {
  filter: brightness(1.08);
}

.ls-btn-violet:active {
  transform: translateY(1px);
}

.ls-btn-light {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(to bottom, #fafaf9, #e7e5e4);
  padding: 0.75rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: rgb(12 10 9);
  box-shadow: 0 4px 24px -4px rgba(255, 255, 255, 0.12), inset 0 1px 0 white;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.ls-btn-light:hover {
  filter: brightness(1.03);
}

.ls-btn-light:active {
  transform: translateY(1px);
}

.ls-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--ls-border);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 1.25rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-ui);
  color: var(--ls-ink-muted);
  transition: var(--ls-transition);
}

.ls-btn-ghost:hover {
  border-color: var(--ls-border-hover);
  color: var(--ls-ink);
  background: rgba(255, 255, 255, 0.07);
}

/* Dashboard — outline pill (secondary actions, matches studio Chrome) */
.linkset-root .ls-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgb(87 83 78);
  padding: 0.625rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: #e7e5e4;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.linkset-root .ls-btn-outline:hover {
  border-color: rgb(168 162 158);
  color: #fafaf9;
}

.linkset-root .ls-btn-outline:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.35);
}

/* Slightly compact variant for dense toolbars (editor header) */
.linkset-root .ls-btn-outline-compact {
  min-height: 2.25rem;
  padding: 0.5rem 1.25rem;
  font-size: var(--ls-text-md);
}

/* Accent CTA for “studio” entry points (mint, distinct from violet primary) */
.linkset-root .ls-btn-studio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(52, 211, 153, 0.42);
  padding: 0.625rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: #a7f3d0;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.linkset-root .ls-btn-studio:hover {
  border-color: rgba(110, 231, 183, 0.65);
  background: rgba(16, 185, 129, 0.08);
  color: #ecfdf5;
}

.linkset-root .ls-btn-studio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35);
}

/* Account / auth — destructive & caution (Allauth element buttons) */
.linkset-root .ls-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  padding: 0.625rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.linkset-root .ls-btn-danger:hover {
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(153, 27, 27, 0.45);
  color: #fef2f2;
}

.linkset-root .ls-btn-danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
}

.linkset-root .ls-btn-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 0.625rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-sm);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.linkset-root .ls-btn-warning:hover {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(146, 64, 14, 0.45);
  color: #fffbeb;
}

.linkset-root .ls-btn-warning:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

/* Raw Django submits inside account shells (no Allauth button element) */
.linkset-root .linkset-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  cursor: pointer;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(to bottom, rgb(167 139 250), rgb(139 92 246));
  padding: 0.75rem 1.5rem;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-text-md);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-wide);
  color: white;
  box-shadow: 0 4px 24px -4px rgba(139, 92, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.linkset-root .linkset-form input[type="submit"]:hover {
  filter: brightness(1.08);
}

.linkset-root .linkset-form input[type="submit"]:active {
  transform: translateY(1px);
}

.linkset-root .linkset-form input[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 4px 24px -4px rgba(139, 92, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 3px rgba(167, 139, 250, 0.35);
}
