/* ============================================================================
   SPARKPULSE — application stylesheet
   Built on tokens.css. Class names match the existing app.js render markup.
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
  /* Mirror the body bg so the cream extends to the viewport edges even when
     screenshot tools, browser dev-tool device frames, or short-content pages
     leave the body shorter than the html document. Without this the html
     would show its default white/dark behind a cream body. */
  background: var(--color-bg-canvas);
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-canvas);
  color: var(--color-fg-primary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line);
  letter-spacing: var(--type-body-md-track);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--color-accent-brand); text-decoration: none; }
a:hover { color: var(--color-accent-brand-hover); }

img, svg { max-width: 100%; display: block; }

input, button, textarea, select { font: inherit; color: inherit; }

/* ─── LAYOUT ──────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
  width: 100%;
}
@media (max-width: 980px) { .container { padding: 0 24px; } }

main { flex: 1; padding: var(--space-12) 0 var(--space-16); }
/* Subpages (anything except the editorial homepage hero) need a real top
   gap so they don't sit flush against the sticky header. Home is already
   covered by .editorial-hero's own padding-top, so we exclude it via :has(). */
main:not(:has(> .editorial-hero)) { padding-top: var(--space-14); }
@supports not selector(:has(*)) {
  /* Fallback for older browsers without :has — slightly looser top gap
     applied unconditionally. */
  main { padding-top: var(--space-14); }
}
/* Generic page-header on subpages also gets a touch more breathing room. */
main > .page-header:first-child,
main > .product-detail:first-child,
main > .auth-page:first-child,
main > .card:first-child { margin-top: var(--space-2); }

/* ─── SITE HEADER (editorial — Sparkpulse Homepage v2 design) ──────────────── */
.site-header {
  position: sticky; top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--color-bg-canvas) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 14px 0;
}
.site-header__row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 28px;
}

/* Centered ⌘K search button (looks like an input, opens the real search) */
.header-search {
  all: unset;
  cursor: text;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  /* Symmetric horizontal padding so the search icon on the left and the
     ⌘K hint on the right sit at equal distance from the input edge.
     Was 0 6px 0 14px which made the kbd visually hug the right border. */
  padding: 0 10px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  color: var(--color-fg-tertiary);
  font-family: var(--font-body);
  font-size: 14.5px;
  width: 100%;
  max-width: 480px;
  justify-self: center;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.header-search:hover { border-color: var(--color-border-strong); }
.header-search:focus-within {
  border-color: var(--color-accent-brand);
  box-shadow: 0 0 0 3px rgba(255,84,54,0.15);
}
.header-search__icon {
  width: 16px; height: 16px;
  color: var(--color-fg-tertiary);
  flex-shrink: 0;
}
.header-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  color: var(--color-fg-primary);
}
.header-search input::placeholder { color: var(--color-fg-muted); }

/* Prevent placeholder wrapping when the bar is narrow */
.header-search__placeholder {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-search .kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-fg-tertiary);
  background: var(--color-bg-canvas);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xs);
  padding: 3px 7px;
  flex-shrink: 0;
}

/* Right-side nav (Daily Brief · Sectors · Monitoring) */
.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.header-nav__link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--color-fg-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.header-nav__link:hover { color: var(--color-accent-brand); }
.header-nav__link.active {
  color: var(--color-fg-primary);
  position: relative;
}
.header-nav__link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--color-accent-brand);
}
.header-nav__link--muted { color: var(--color-fg-secondary); }
.header-nav__link--muted:hover { color: var(--color-fg-primary); }

/* Legacy .header / .header .container kept as alias so nothing else breaks */
.header { all: unset; }
.header .container { display: contents; }

/* Hamburger button — visible only on mobile (≤980px) */
.header-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-md, 8px);
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-fg-primary);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.header-burger:hover { border-color: var(--color-border-strong); }
.header-burger svg { width: 22px; height: 22px; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}
/* hidden attribute defaults to display:none, but our display:flex above
   would override it. Force hidden when the attribute is present. */
.mobile-menu[hidden] { display: none; }
.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17,17,20,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
}
.mobile-menu__panel {
  position: relative;
  width: min(86vw, 320px);
  height: 100%;
  background: var(--color-bg-surface, #FFFFFF);
  border-left: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 0 24px;
  overflow-y: auto;
  animation: sp-slide-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sp-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 10px;
}
.mobile-menu__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-fg-tertiary);
}
.mobile-menu__close {
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--color-fg-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
}
.mobile-menu__link {
  display: block;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-fg-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-subtle);
}
.mobile-menu__link:hover {
  background: var(--color-bg-subtle, rgba(17,17,20,0.04));
  color: var(--sp-orange, #FF5436);
}

/* Tablet + small desktop: kill nav, show hamburger, nav-auth stays */
@media (max-width: 980px) {
  .site-header__row {
    grid-template-columns: auto 1fr auto auto;
    gap: 10px;
  }
  .header-nav { display: none; }
  .header-search { max-width: none; }
  .header-search .kbd { display: none; }
  .header-burger { display: inline-flex; }
}

/* Narrower (~720px): hide auth in header, source it from the mobile menu.
   The .nav-auth element is rendered via JS into different DOM each load —
   hide via the wrapper id which exists on every page. */
@media (max-width: 720px) {
  .site-header__row {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }
  #nav-auth { display: none; }
}

/* Mid-mobile (≤640px): drop the wordmark, collapse the search to an
   icon button — placeholder text is the biggest space hog. */
@media (max-width: 640px) {
  .site-header { padding: 10px 0; }
  .site-header__row {
    gap: 8px;
    /* Logo + search-icon-button + hamburger; let logo + burger flex naturally,
       give search a tight max width so the row breathes. */
    grid-template-columns: auto 1fr auto;
  }
  .site-header .logo .sp-wordmark { display: none; }
  /* Search becomes a compact icon-only button on the right of the search slot */
  .header-search {
    width: 40px;
    height: 40px;
    max-width: 40px;
    padding: 0;
    justify-self: end;
    justify-content: center;
    border-radius: var(--radius-md, 8px);
  }
  .header-search__icon { width: 18px; height: 18px; margin: 0; }
  .header-search input,
  .header-search__placeholder,
  .header-search .kbd { display: none !important; }
}

/* Tightest (≤380px): even tighter spacing for very small phones */
@media (max-width: 380px) {
  .site-header__row { gap: 6px; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-fg-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.035em;
  line-height: 1;
}
.logo .sp-mark { width: 28px; height: 28px; flex-shrink: 0; }
.logo .sp-wordmark {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
/* The custom-u: per brand spec, a horizontal tick (~13% × ~4.5% of font size)
   sits centered above the lowercase u, in brand orange. */
.logo .sp-u {
  position: relative;
  display: inline-block;
}

.logo:hover .sp-mark circle:last-of-type {
  transform: scale(1.12);
  transform-origin: 86px 56px;
  transition: transform 200ms var(--ease-out);
}

/* ─── NAV ─────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-fg-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.nav-link:hover {
  color: var(--color-fg-primary);
  background: var(--color-bg-subtle);
}
.nav-link.active {
  color: var(--color-fg-primary);
  background: var(--color-bg-subtle);
  box-shadow: inset 0 -2px 0 var(--color-accent-brand);
}

/* ─── SEARCH BOX (HEADER) ─────────────────────────────────────────────────── */
.search-box {
  position: relative;
  width: 100%;
  max-width: 320px;
  justify-self: end;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--color-fg-tertiary);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  background: var(--color-bg-surface);
  color: var(--color-fg-primary);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
#searchInput::placeholder { color: var(--color-fg-muted); }
#searchInput:focus {
  outline: none;
  border-color: var(--color-accent-brand);
  box-shadow: 0 0 0 3px rgba(255,84,54,0.15);
}

/* search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-dropdown);
  max-height: 420px;
  overflow-y: auto;
  z-index: var(--z-popover);
  animation: sp-slide-down 200ms var(--ease-out);
}
@keyframes sp-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.search-results-header {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-fg-tertiary);
  border-bottom: 1px solid var(--color-border-divider);
}
.search-section { padding: 6px 0; border-bottom: 1px solid var(--color-border-divider); }
.search-section:last-child { border-bottom: none; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--color-fg-primary);
  transition: background var(--duration-instant) var(--ease-out);
}
.search-result-item:hover { background: var(--color-bg-subtle); }
.search-result-logo,
.search-result-logo-placeholder {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  object-fit: contain;
  padding: 4px;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-category {
  font-size: 12px;
  color: var(--color-fg-tertiary);
  margin-top: 2px;
}
.search-no-results {
  padding: 24px 14px;
  text-align: center;
  color: var(--color-fg-tertiary);
  font-size: 14px;
}

/* ─── NAV-AUTH (right side) ──────────────────────────────────────────────── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-fg-primary);
  background: transparent;
  transition: all var(--duration-fast) var(--ease-out);
}
.nav-link-btn:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-border-strong);
  color: var(--color-fg-primary);
}
.nav-link-btn-primary {
  background: var(--sp-vermilion-500);
  color: #fff !important;
  border-color: var(--sp-vermilion-500);
}
.nav-link-btn-primary:hover {
  background: #c64842;
  border-color: #c64842;
  color: #fff !important;
}

/* user menu */
.nav-user-menu { position: relative; }
.nav-avatar-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-pill);
  background: var(--color-fg-primary);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-out);
}
.nav-avatar-btn:hover { transform: scale(1.04); }
.nav-avatar-initials {
  color: var(--color-fg-on-inverse);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}
.nav-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 220px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-dropdown);
  z-index: var(--z-popover);
  overflow: hidden;
}
.nav-dropdown.open { display: block; }
.nav-dropdown-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-fg-tertiary);
  border-bottom: 1px solid var(--color-border-divider);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-dropdown-item {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--color-fg-primary);
  text-decoration: none;
  transition: background var(--duration-instant) var(--ease-out);
}
.nav-dropdown-item:hover {
  background: var(--color-bg-subtle);
  color: var(--color-fg-primary);
}
.nav-dropdown-divider {
  height: 1px;
  background: var(--color-border-divider);
  margin: 4px 0;
}
.nav-dropdown-item-danger { color: var(--sp-vermilion-500); }
.nav-dropdown-item-danger:hover {
  background: var(--color-accent-alert-bg);
  color: var(--sp-vermilion-500);
}

/* ─── PAGE HEADER ─────────────────────────────────────────────────────────── */
.page-header { margin-bottom: var(--space-10); }
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-lg-size);
  line-height: var(--type-display-lg-line);
  letter-spacing: var(--type-display-lg-track);
  color: var(--color-fg-primary);
  margin-bottom: 12px;
  text-wrap: balance;
  max-width: 28ch;
}
.page-header p {
  color: var(--color-fg-secondary);
  font-size: var(--type-body-xl-size);
  line-height: var(--type-body-xl-line);
  max-width: 64ch;
  text-wrap: pretty;
}

/* ─── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--color-bg-canvas);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 56px 56px 60px;
  margin-bottom: var(--space-12);
  overflow: hidden;
}
.hero::before {
  content: '◆ TODAY ON SPARKPULSE';
  position: absolute;
  top: 24px; left: 56px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: var(--type-mono-eyebrow-track);
  color: var(--sp-vermilion-500);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 280px at 90% 0%, rgba(255,84,54,0.10), transparent 60%),
    radial-gradient(600px 220px at 0% 100%, rgba(232,88,79,0.07), transparent 60%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 880px;
  z-index: 1;
  margin-top: 24px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-xl-size);
  line-height: var(--type-display-xl-line);
  letter-spacing: var(--type-display-xl-track);
  color: var(--color-fg-primary);
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: var(--type-body-xl-size);
  line-height: var(--type-body-xl-line);
  color: var(--color-fg-secondary);
  margin-bottom: 28px;
  max-width: 64ch;
  text-wrap: pretty;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.btn-primary,
.btn.btn-primary {
  background: var(--color-fg-primary);
  color: var(--color-fg-on-inverse);
  border-color: var(--color-fg-primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--sp-ink-1000);
  border-color: var(--sp-ink-1000);
  color: var(--color-fg-on-inverse);
}
.btn-secondary,
.btn.btn-secondary {
  background: transparent;
  color: var(--color-fg-primary);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg-subtle);
  border-color: var(--color-fg-primary);
}
.btn:disabled, .btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ─── FILTERS ─────────────────────────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-10);
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background: transparent;
  color: var(--color-fg-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}
.filter-btn:hover {
  color: var(--color-fg-primary);
  border-color: var(--color-border-strong);
  background: var(--color-bg-subtle);
}
.filter-btn.active {
  color: #fff;
  background: var(--color-accent-brand);
  border-color: var(--color-accent-brand);
}

/* ─── PRODUCT GRID + CARD ─────────────────────────────────────────────────── */
.product-grid,
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: var(--space-12);
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.product-card:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover-light);
}
.product-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.product-logo,
.product-info-logo {
  width: 44px; height: 44px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.025em;
  color: var(--color-fg-primary);
  flex-shrink: 0;
  overflow: hidden;
}
.product-info-logo { width: 56px; height: 56px; font-size: 22px; }
.product-logo img,
.product-info-logo img { width: 100%; height: 100%; object-fit: cover; }

.product-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-sm-size);
  line-height: var(--type-display-sm-line);
  letter-spacing: var(--type-display-sm-track);
  color: var(--color-fg-primary);
  text-wrap: balance;
}
.product-description {
  color: var(--color-fg-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  text-wrap: pretty;
}
.product-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.category-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  color: var(--color-fg-tertiary);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
}
.product-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: -0.005em;
  color: var(--color-fg-tertiary);
  border-top: 1px solid var(--color-border-divider);
  padding-top: 12px;
}

/* ─── PRODUCT DETAIL ──────────────────────────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-12);
}
@media (max-width: 980px) {
  .product-detail { grid-template-columns: 1fr; gap: var(--space-8); }
}
.product-info {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 86px;
}
.product-info-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.product-info-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border-divider);
}
.stat { text-align: left; }
.stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--color-fg-primary);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: var(--type-mono-eyebrow-size);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--type-mono-eyebrow-track);
  color: var(--color-fg-tertiary);
  margin-top: 2px;
}

/* ─── CHANGELOG ITEMS ─────────────────────────────────────────────────────── */
.changelog-list,
.releases-list,
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.releases-list .changelog-item,
.recent-list .changelog-item { /* shared editorial-card style */ }
.changelog-item {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 24px 26px;
  position: relative;
  transition: transform var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.changelog-item:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover-light);
}
.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
.changelog-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-sm-size);
  line-height: var(--type-display-sm-line);
  letter-spacing: var(--type-display-sm-track);
  color: var(--color-fg-primary);
  text-wrap: balance;
  max-width: 56ch;
}
.changelog-title a { color: inherit; }
.changelog-title a:hover { color: var(--color-accent-brand); }
.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.005em;
  color: var(--color-fg-tertiary);
  margin-bottom: 14px;
}
.changelog-product {
  color: var(--color-accent-brand);
  font-weight: 600;
}
.changelog-product:hover { color: var(--color-accent-brand-hover); }
.changelog-content {
  color: var(--color-fg-secondary);
  font-size: var(--type-body-lg-size);
  line-height: var(--type-body-lg-line);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.changelog-detail-content,
.changelog-detail-summary {
  color: var(--color-fg-secondary);
  font-size: var(--type-body-lg-size);
  line-height: 1.65;
  text-wrap: pretty;
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
  vertical-align: middle;
}
.badge-major {
  background: var(--color-accent-alert-bg);
  color: var(--sp-vermilion-500);
  border: 1px solid rgba(232,88,79,0.22);
}
.badge-version {
  background: var(--color-bg-subtle);
  color: var(--color-fg-tertiary);
  border: 1px solid var(--color-border-subtle);
}

/* ─── PAGINATION ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: var(--space-12);
  margin-bottom: 8px;
}
.pagination button {
  padding: 9px 16px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-fg-primary);
  transition: all var(--duration-fast) var(--ease-out);
}
.pagination button:hover:not(:disabled) {
  border-color: var(--color-border-strong);
  background: var(--color-bg-subtle);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-fg-tertiary);
}

/* ─── FEED ────────────────────────────────────────────────────────────────── */
.feed-section { margin-bottom: var(--space-12); }
.feed-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--type-mono-eyebrow-track);
  color: var(--color-fg-tertiary);
  margin-bottom: 14px;
}
.feed-products {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feed-product-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--color-fg-primary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all var(--duration-fast) var(--ease-out);
}
.feed-product-chip:hover {
  border-color: var(--color-fg-primary);
  background: var(--color-bg-subtle);
  color: var(--color-fg-primary);
}
.feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
  text-align: center;
  color: var(--color-fg-tertiary);
}
.feed-empty h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-sm-size);
  letter-spacing: var(--type-display-sm-track);
  color: var(--color-fg-primary);
  margin-bottom: 8px;
}
.feed-empty p { font-size: 15px; }

/* ─── LOADING / ERROR / SUCCESS ───────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 64px 0;
  color: var(--color-fg-tertiary);
  font-style: italic;
  font-size: 14px;
}
.error,
.error-message {
  background: var(--color-accent-alert-bg);
  color: var(--sp-vermilion-500);
  border: 1px solid rgba(232,88,79,0.22);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  margin: 16px 0;
}
.success-message {
  background: rgba(21,128,61,0.10);
  color: #15803D;
  border: 1px solid rgba(21,128,61,0.22);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ─── AUTH PAGES ──────────────────────────────────────────────────────────── */
.auth-page,
.auth-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-12) 16px;
  min-height: 60vh;
}
.auth-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card-hover-light);
}
.auth-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-md-size);
  line-height: var(--type-display-md-line);
  letter-spacing: var(--type-display-md-track);
  color: var(--color-fg-primary);
  margin: 0 0 8px;
  text-wrap: balance;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--color-fg-secondary);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-fg-primary);
  letter-spacing: -0.005em;
}
.auth-field input,
.form-group input {
  padding: 11px 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  color: var(--color-fg-primary);
  background: var(--color-bg-canvas);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  outline: none;
}
.auth-field input:focus,
.form-group input:focus {
  border-color: var(--color-accent-brand);
  background: var(--color-bg-surface);
  box-shadow: 0 0 0 3px rgba(255,84,54,0.15);
}
.auth-btn {
  padding: 12px 18px;
  background: var(--color-fg-primary);
  color: var(--color-fg-on-inverse);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
  margin-top: 4px;
}
.auth-btn:hover:not(:disabled) { background: var(--sp-ink-1000); }
.auth-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.auth-btn.btn-danger {
  background: var(--sp-vermilion-500);
  color: #fff;
}
.auth-btn.btn-danger:hover:not(:disabled) { background: #c64842; }
.auth-error {
  background: var(--color-accent-alert-bg);
  color: var(--sp-vermilion-500);
  border: 1px solid rgba(232,88,79,0.22);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 4px;
}
.auth-hint { font-size: 12px; color: var(--color-fg-tertiary); margin: 4px 0 0; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  font-size: 12px;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-divider);
}
.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--color-fg-secondary);
  margin: 16px 0 0;
}
.auth-switch a {
  color: var(--color-accent-brand);
  font-weight: 500;
}
.auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 0 28px;
  text-align: center;
}
.auth-success svg { color: var(--success); }
.auth-success h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-sm-size);
  letter-spacing: var(--type-display-sm-track);
}
.auth-success p { margin: 0; color: var(--color-fg-secondary); }

/* password strength */
.password-strength { margin-top: 6px; }
.password-strength-bar { display: flex; gap: 4px; margin-bottom: 6px; }
.password-strength-bar span {
  flex: 1; height: 4px;
  border-radius: 2px;
  background: var(--color-track-empty);
  transition: background var(--duration-base) var(--ease-out);
}
.password-strength-bar span.filled-weak   { background: var(--sp-vermilion-500); }
.password-strength-bar span.filled-fair   { background: #B45309; }
.password-strength-bar span.filled-good   { background: var(--sp-orange-500); }
.password-strength-bar span.filled-strong { background: #15803D; }
.password-strength-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.password-strength-label.weak   { color: var(--sp-vermilion-500); }
.password-strength-label.fair   { color: #B45309; }
.password-strength-label.good   { color: var(--sp-orange-500); }
.password-strength-label.strong { color: #15803D; }
.password-reqs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.password-reqs li {
  font-size: 12px;
  color: var(--color-fg-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.password-reqs li::before {
  content: '✗';
  color: var(--sp-vermilion-500);
  font-weight: 700;
}
.password-reqs li.met { color: #15803D; }
.password-reqs li.met::before { content: '✓'; color: #15803D; }

/* ─── FOLLOW BUTTON ──────────────────────────────────────────────────────── */
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid var(--color-fg-primary);
  color: var(--color-fg-primary);
  background: transparent;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}
.follow-btn:hover {
  background: var(--color-fg-primary);
  color: var(--color-fg-on-inverse);
}
.follow-btn.following {
  background: var(--color-fg-primary);
  color: var(--color-fg-on-inverse);
}
.follow-btn.following:hover {
  background: var(--sp-vermilion-500);
  color: #fff;
  border-color: var(--sp-vermilion-500);
}
.follow-btn-guest { border-style: dashed; }

/* ─── CARD (generic) ──────────────────────────────────────────────────────── */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(17,17,20,0.03);
}
.profile-field {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-divider);
}
.profile-field:last-child { border-bottom: none; }
.profile-label {
  font-family: var(--font-mono);
  font-size: var(--type-mono-eyebrow-size);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--type-mono-eyebrow-track);
  color: var(--color-fg-tertiary);
  margin-bottom: 6px;
}
.profile-value {
  font-size: 15px;
  color: var(--color-fg-primary);
  font-weight: 500;
}

/* ─── FORM GROUP ──────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-fg-primary);
  letter-spacing: -0.005em;
}

/* ─── TABS ────────────────────────────────────────────────────────────────── */
.active-tab {
  background: var(--color-fg-primary) !important;
  color: var(--color-fg-on-inverse) !important;
  border-color: var(--color-fg-primary) !important;
}

/* ─── SD- (sector dashboard cards on homepage) ────────────────────────────── */
.sd-sector-grid,
.sd-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sd-sector-card,
.sd-product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}
.sd-sector-card:hover,
.sd-product-card:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover-light);
}
.sd-sector-name,
.sd-product-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-xs-size);
  letter-spacing: var(--type-display-xs-track);
  color: var(--color-fg-primary);
  margin-bottom: 8px;
}
.sd-sector-stats,
.sd-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 12px 0;
}
.sd-sector-stat,
.sd-detail-stat { display: flex; flex-direction: column; gap: 2px; }
.sd-sector-stat-value,
.sd-detail-stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-fg-primary);
  letter-spacing: -0.005em;
}
.sd-sector-stat-label,
.sd-detail-stat-label {
  font-family: var(--font-mono);
  font-size: var(--type-mono-eyebrow-size);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--type-mono-eyebrow-track);
  color: var(--color-fg-tertiary);
}
.sd-sector-trend {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent-brand);
}
.sd-sector-updated,
.sd-product-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--color-fg-tertiary);
  margin-top: 8px;
}
.sd-sector-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-divider);
  font-size: 13px;
  color: var(--color-accent-brand);
  font-weight: 500;
}

/* ─── CHANGELOG URL BOX ───────────────────────────────────────────────────── */
.changelog-url-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-fg-secondary);
  margin: 12px 0;
  word-break: break-all;
}

/* ─── SITE FOOTER (editorial, multi-column) ────────────────────────────────── */
.site-footer {
  margin-top: var(--space-20);
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-bg-canvas);
  color: var(--color-fg-primary);
}
.site-footer .container { padding-top: 56px; padding-bottom: 28px; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 980px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

.site-footer__brand .logo { color: var(--color-fg-primary); }
.site-footer__tagline {
  margin: 16px 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-fg-secondary);
  max-width: 280px;
  text-wrap: pretty;
}

.site-footer__col h5 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-fg-tertiary);
}
.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer__col a {
  font-family: var(--font-body);
  font-size: 13.5px;
  letter-spacing: -0.005em;
  color: var(--color-fg-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.site-footer__col a:hover { color: var(--color-fg-primary); }

.site-footer__strip {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--color-fg-tertiary);
}
.site-footer__strip-left { color: var(--color-fg-secondary); }
.site-footer__social {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer__social a {
  color: var(--color-fg-tertiary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.site-footer__social a:hover { color: var(--color-accent-brand); }
.site-footer__build {
  color: var(--color-fg-muted);
  padding-left: 12px;
  border-left: 1px solid var(--color-border-divider);
}

/* Legacy .footer alias kept so older renders don't break */
.footer { all: unset; }
.footer .container { display: contents; }

/* ─── HEADER MOBILE COLLAPSE ──────────────────────────────────────────────── */
@media (max-width: 980px) {
  .header .container {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }
  .nav { display: none; }
  .search-box { max-width: 100%; }
}
@media (max-width: 640px) {
  .hero { padding: 36px 24px 40px; }
  .hero::before { left: 24px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 17px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .page-header h1 { font-size: 30px; }
  .product-detail { grid-template-columns: 1fr; }
  .product-info { position: static; }
}

/* ─── KBD HINT ────────────────────────────────────────────────────────────── */
.kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-fg-tertiary);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xs);
}

/* ─── SECTOR PILLS (12 locked accents) ───────────────────────────────────── */
.sector-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-subtle);
  color: var(--color-fg-tertiary);
  border: 1px solid var(--color-border-subtle);
}
.sector-pill[data-sector="ai"]            { color: var(--sp-sector-ai);           background: var(--sp-sector-ai-bg);           border-color: transparent; }
.sector-pill[data-sector="fintech"]       { color: var(--sp-sector-fintech);      background: var(--sp-sector-fintech-bg);      border-color: transparent; }
.sector-pill[data-sector="design"]        { color: var(--sp-sector-design);       background: var(--sp-sector-design-bg);       border-color: transparent; }
.sector-pill[data-sector="productivity"]  { color: var(--sp-sector-productivity); background: var(--sp-sector-productivity-bg); border-color: transparent; }
.sector-pill[data-sector="devtools"]      { color: var(--sp-sector-devtools);     background: var(--sp-sector-devtools-bg);     border-color: transparent; }
.sector-pill[data-sector="ecommerce"]     { color: var(--sp-sector-ecommerce);    background: var(--sp-sector-ecommerce-bg);    border-color: transparent; }
.sector-pill[data-sector="marketing"]     { color: var(--sp-sector-marketing);    background: var(--sp-sector-marketing-bg);   border-color: transparent; }
.sector-pill[data-sector="health"]        { color: var(--sp-sector-health);       background: var(--sp-sector-health-bg);      border-color: transparent; }
.sector-pill[data-sector="gaming"]        { color: var(--sp-sector-gaming);       background: var(--sp-sector-gaming-bg);      border-color: transparent; }
.sector-pill[data-sector="education"]     { color: var(--sp-sector-education);    background: var(--sp-sector-education-bg);   border-color: transparent; }
.sector-pill[data-sector="climate"]       { color: var(--sp-sector-climate);      background: var(--sp-sector-climate-bg);     border-color: transparent; }
.sector-pill[data-sector="hardware"]      { color: var(--sp-sector-hardware);     background: var(--sp-sector-hardware-bg);    border-color: transparent; }

/* ─── EYEBROW (◆ TAKE / ◆ TODAY) ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: var(--type-mono-eyebrow-track);
  text-transform: uppercase;
  color: var(--color-accent-alert);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.eyebrow::before { content: '◆'; }

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 16px;
  color: var(--color-fg-tertiary);
  background: var(--color-bg-surface);
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-2xl);
}

/* ─── SP-MARK LOADER (loading state pulse mark) ──────────────────────────── */
@keyframes sp-pulse-loader {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.18); opacity: 0.6; }
}
.loading svg.sp-mark circle:last-of-type {
  transform-origin: 86px 56px;
  animation: sp-pulse-loader 1.4s ease-in-out infinite;
}

/* ============================================================================
   EDITORIAL HOMEPAGE (per Sparkpulse Homepage v2 design)
   Used on the / route. Replaces the legacy .hero block on home.
   ============================================================================ */

/* ── EDITORIAL HERO ────────────────────────────────────────────────────────── */
.editorial-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  /* Top: 56 (matches the hero block's own breathing room).
     Bottom: 22 — the sector-filter-bar's padding-top of 22 stacks underneath
     so the visual gap above the pills equals the gap below them (also 22). */
  padding: 56px 0 22px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border-subtle);
}
.editorial-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 280px at 90% 0%, rgba(255,84,54,0.08), transparent 60%),
    radial-gradient(600px 220px at 0% 100%, rgba(232,88,79,0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.editorial-hero > * { position: relative; z-index: 1; }

.editorial-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sp-vermilion-500);
  margin-bottom: 18px;
}
.editorial-hero__eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: var(--radius-pill);
  background: var(--sp-vermilion-500);
  animation: sp-blink 1.6s ease-in-out infinite;
}
@keyframes sp-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.editorial-hero__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-xl-size);
  line-height: var(--type-display-xl-line);
  letter-spacing: var(--type-display-xl-track);
  color: var(--color-fg-primary);
  text-wrap: balance;
  max-width: 880px;
  margin: 0;
}
.editorial-hero__teaser {
  font-family: var(--font-body);
  font-size: var(--type-body-xl-size);
  line-height: var(--type-body-xl-line);
  color: var(--color-fg-secondary);
  margin: 20px 0 0;
  max-width: 56ch;
  text-wrap: pretty;
}
.editorial-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}
.editorial-hero .btn {
  padding: 12px 18px;
  font-size: 14.5px;
}

.brief-form {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 3px 3px 3px 12px;
  background: var(--color-bg-surface);
}
.brief-form input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  width: 220px;
  color: var(--color-fg-primary);
}
.brief-form input::placeholder { color: var(--color-fg-muted); }
.brief-form button {
  border: none;
  cursor: pointer;
  background: var(--sp-orange-500);
  color: #fff;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  transition: background var(--duration-fast) var(--ease-out);
}
.brief-form button:hover { background: var(--sp-orange-600); }

.editorial-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  min-width: 240px;
}
.hero-pulse-mark {
  width: 108px;
  height: 108px;
  color: var(--color-fg-primary);
  flex-shrink: 0;
}
.hero-pulse-mark circle:last-of-type {
  fill: var(--sp-orange-500);
  transform-origin: 86px 56px;
  animation: sp-pulse-loader 2.2s ease-in-out infinite;
}
.live-ticker {
  background: var(--color-accent-alert-bg);
  color: var(--sp-vermilion-500);
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-align: right;
  min-width: 240px;
}
.live-ticker__sub { opacity: 0.78; margin-top: 4px; }

/* Mobile hero — single column, hide the decorative pulse mark, keep the
   live ticker as a small inline pill instead of a right-anchored box. */
@media (max-width: 820px) {
  .editorial-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 36px 0 18px;
  }
  .editorial-hero__headline {
    font-size: 38px;
    line-height: 1.08;
  }
  .editorial-hero__teaser {
    font-size: 15.5px;
    margin-top: 14px;
  }
  .editorial-hero__aside {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    gap: 12px;
  }
  .hero-pulse-mark { width: 36px; height: 36px; }
  .live-ticker {
    min-width: 0;
    text-align: left;
    padding: 6px 12px;
    font-size: 11.5px;
    border-radius: var(--radius-pill, 999px);
  }
  .live-ticker__sub { display: inline; opacity: 0.72; margin: 0 0 0 6px; }
  .live-ticker > div:first-child { display: inline; }
  .brief-form { width: 100%; max-width: 360px; }
  .brief-form input { width: 0; flex: 1; }
}

@media (max-width: 520px) {
  .editorial-hero { padding: 24px 0 14px; }
  .editorial-hero__headline { font-size: 30px; }
  .editorial-hero__teaser { font-size: 14.5px; }
  .editorial-hero__eyebrow { font-size: 10.5px; margin-bottom: 12px; }
  .hero-pulse-mark { display: none; }
}

/* ── STICKY SECTOR FILTER BAR ──────────────────────────────────────────────── */
/* Full-bleed background: break out of .container's 80px gutters while keeping
   the inner pills row constrained to the same 1280/80 grid as the rest of the
   page. */
.sector-filter-bar {
  position: sticky;
  /* Sit directly under the sticky header. Desktop header ≈ 70px, but at
     mobile we trim the header padding so the actual sticky height shrinks.
     Per-breakpoint overrides below keep this flush — no visible gap. */
  top: 70px;
  z-index: var(--z-filterbar);
  background: color-mix(in srgb, var(--color-bg-canvas) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border-subtle);
  /* Equal vertical padding so the empty space above and below the pill row
     is symmetric (was 14 top / 14 + 24 margin-bottom = visually 2× heavier
     above). margin-bottom: 0 lets the editorial-layout's own top spacing be
     the only gap below. */
  padding: 22px var(--layout-gutter);
  margin: 0 calc(-1 * var(--layout-gutter)) 0;
}
@media (max-width: 980px) {
  .sector-filter-bar { padding: 18px 24px; margin: 0 -24px 0; }
}
/* Header at ≤640px is shorter (padding 10px / search 40px / total ~60px),
   so the sticky offset must match — otherwise content peeks through the
   ~10px gap between header bottom and filter-bar top. */
@media (max-width: 640px) {
  .sector-filter-bar { top: 60px; padding: 10px 0 8px; margin: 0; }
  /* Switch the pills row to horizontal scroll with a soft fade hint so the
     row reads as "scrollable" instead of "cut off". The inner container
     keeps its 16px gutter via padding so the first/last pill never kisses
     the viewport edge. */
  .sector-filter-bar__row {
    overflow: hidden;
    /* Fade out the last 24px on the right edge so users see there's more. */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }
  .sector-filter-bar__pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 24px 6px 16px;
    scrollbar-width: none;
  }
  .sector-filter-bar__pills::-webkit-scrollbar { display: none; }
}
@media (max-width: 380px) {
  .sector-filter-bar { top: 56px; }
}
.sector-filter-bar__row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  max-width: var(--layout-max);
  margin: 0 auto;
  width: 100%;
}
.sector-filter-bar__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 6px;                       /* tightened from 8 so all 13 pills fit one row */
  flex: 1 1 auto;
  min-width: 0;
}
.sector-pill-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;                       /* tightened from 6 */
  /* Compact pill: ~28 px tall. Body's 1.55 line-height was ballooning these
     to 38 px before — fixed via line-height: 1. Tightened padding so all 13
     pills fit a single row at 1120 px container width. */
  padding: 6px 10px;
  line-height: 1;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background: transparent;
  color: var(--color-fg-primary);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-out);
}
.sector-pill-filter:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-border-strong);
}
.sector-pill-filter.is-active {
  background: var(--color-accent-brand);
  color: #fff;
  border-color: transparent;
}
.sector-pill-filter[data-sector] .pill-dot {
  width: 6px; height: 6px;
  border-radius: var(--radius-pill);
}

/* ── TWO-COLUMN LAYOUT ─────────────────────────────────────────────────────── */
.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
  /* Match the filter bar's own padding-top (22) so the gap from pills →
     border → first card mirrors the gap from hero → border → pills above. */
  margin-top: 22px;
}
@media (max-width: 980px) {
  .editorial-layout { grid-template-columns: 1fr; gap: 28px; }
}

.editorial-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── EDITORIAL UPDATE CARD ─────────────────────────────────────────────────── */
.editorial-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.editorial-card:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover-light);
  color: inherit;
}
.editorial-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.editorial-card__product {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.editorial-card__avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.025em;
  color: #fff;
  flex-shrink: 0;
}
.editorial-card__product-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--color-fg-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editorial-card__velocity {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-fg-tertiary);
  white-space: nowrap;
}
.editorial-card__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-display-sm-size);
  line-height: var(--type-display-sm-line);
  letter-spacing: var(--type-display-sm-track);
  color: var(--color-fg-primary);
  text-wrap: balance;
  margin: 0;
  max-width: 56ch;
}
.editorial-card__take {
  font-family: var(--font-body);
  font-size: var(--type-body-md-size);
  line-height: 1.55;
  color: var(--color-fg-secondary);
  margin: 0;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.editorial-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-divider);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: -0.005em;
  color: var(--color-fg-tertiary);
}
.editorial-card__foot-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ── SIDEBAR + WIDGETS ─────────────────────────────────────────────────────── */
.editorial-sidebar {
  position: sticky;
  top: 142px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 980px) {
  .editorial-sidebar { position: static; }
}
.widget {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
}
.widget__title {
  font-family: var(--font-display);
  font-size: var(--type-display-xs-size);
  font-weight: 600;
  letter-spacing: var(--type-display-xs-track);
  color: var(--color-fg-primary);
  margin: 0 0 12px;
}
.widget__list { display: flex; flex-direction: column; gap: 8px; }
.widget__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-fg-primary);
  transition: background var(--duration-fast) var(--ease-out);
}
.widget__row:hover { background: var(--color-bg-subtle); color: var(--color-fg-primary); }
.widget__row-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
}
.widget__row-label .dot {
  width: 8px; height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.widget__row-value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-fg-tertiary);
  white-space: nowrap;
}
.widget__row-bar {
  position: relative;
  width: 60px;
  height: 4px;
  background: var(--color-track-empty);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.widget__row-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--color-accent-brand);
  border-radius: 2px;
}
.widget__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-brand);
  text-decoration: none;
}
.widget__cta:hover { color: var(--color-accent-brand-hover); }

/* Daily Spark — dark widget */
.widget-spark {
  background: var(--color-bg-inverse);
  color: var(--color-fg-on-inverse);
  border-color: transparent;
}
.widget-spark .widget__title {
  color: var(--color-fg-on-inverse);
}
.widget-spark__teaser {
  font-size: 13px;
  color: var(--sp-alpha-bone-62);
  margin: 0 0 14px;
}
.widget-spark__form {
  display: flex;
  gap: 6px;
}
.widget-spark__form input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  background: var(--sp-alpha-bone-05);
  color: var(--color-fg-on-inverse);
  border: 1px solid var(--sp-alpha-bone-10);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: var(--font-body);
  font-size: 12.5px;
}
.widget-spark__form input::placeholder { color: var(--sp-alpha-bone-45); }
.widget-spark__form button {
  border: none;
  cursor: pointer;
  background: var(--sp-orange-500);
  color: #fff;
  padding: 0 12px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12.5px;
  transition: background var(--duration-fast) var(--ease-out);
}
.widget-spark__form button:hover { background: var(--sp-orange-600); }

/* ── HOMEPAGE RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .editorial-hero {
    grid-template-columns: 1fr;
    padding: 36px 0 32px;
  }
  .editorial-hero__aside { align-items: flex-start; min-width: 0; }
  .editorial-hero__headline { font-size: 36px; max-width: none; }
  .editorial-hero__teaser { font-size: 17px; }
  .brief-form { flex-wrap: wrap; }
  .brief-form input { width: 100%; }
}

/* ============================================================================
   ⌘K SEARCH MODAL (Sparkpulse Homepage v2 design)
   ============================================================================ */
.sp-search-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 92px;
  animation: sp-fadein 180ms var(--ease-out);
}
.sp-search-modal[hidden] { display: none; }

.sp-search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 20, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
@keyframes sp-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sp-modal-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sp-search-modal__panel {
  position: relative;
  width: min(720px, 92%);
  max-height: calc(100vh - 184px);
  background: var(--color-bg-surface);
  color: var(--color-fg-primary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: sp-modal-up 220ms var(--ease-out);
}

.sp-search-modal__input-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--color-border-subtle);
}
.sp-search-modal__input-row svg {
  width: 18px; height: 18px;
  color: var(--color-fg-tertiary);
  flex-shrink: 0;
}
.sp-search-modal__input-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--color-fg-primary);
}
.sp-search-modal__input-row input::placeholder { color: var(--color-fg-muted); }
.sp-search-modal__input-row .kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xs);
  color: var(--color-fg-tertiary);
}

.sp-search-modal__results {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 0 14px;
}

.sp-search-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.sp-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  text-decoration: none;
  color: var(--color-fg-primary);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  transition: background var(--duration-instant) var(--ease-out);
}
.sp-search-row:hover,
.sp-search-row.is-active {
  background: var(--color-bg-subtle);
  color: var(--color-fg-primary);
}
.sp-search-row__avatar {
  width: 26px; height: 26px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: -0.025em;
  flex-shrink: 0;
}
.sp-search-row__sectorDot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.sp-search-row__icon {
  width: 18px; height: 18px;
  color: var(--color-fg-tertiary);
  flex-shrink: 0;
}
.sp-search-row__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.sp-search-row__title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-fg-primary);
}
.sp-search-row__title--editorial {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.sp-search-row__sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-fg-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-search-row__hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--color-fg-tertiary);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}
.sp-search-row__suggestion-mark {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-fg-tertiary);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.sp-search-row__suggestion-mark--trending { color: var(--sp-vermilion-500); }

.sp-search-empty {
  padding: 44px 22px;
  text-align: center;
}
.sp-search-empty__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--color-fg-primary);
}
.sp-search-empty__sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-fg-tertiary);
}

.sp-search-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  border-top: 1px solid var(--color-border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-fg-tertiary);
  flex-shrink: 0;
}
.sp-search-modal__footer > div { display: inline-flex; gap: 14px; }
.sp-search-modal__footer kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: transparent;
  padding: 1px 5px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xs);
  margin-right: 4px;
  color: var(--color-fg-tertiary);
}
.sp-search-modal__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sp-search-modal__pulse {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--sp-vermilion-500);
  animation: sp-blink 1.6s ease-in-out infinite;
}

@media (max-width: 640px) {
  .sp-search-modal { padding-top: 16px; }
  .sp-search-modal__panel { width: 100%; max-height: calc(100vh - 32px); border-radius: var(--radius-xl); }
}

/* ─── EDITORIAL PRODUCT CARD (new home feed — roadmap §2/§7) ──────────────── */
.ed-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 28px;
}
.ed-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl, 16px);
  padding: 24px 28px 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform var(--duration-fast, 140ms) var(--ease-out, ease-out),
              border-color var(--duration-fast, 140ms) var(--ease-out, ease-out),
              box-shadow var(--duration-fast, 140ms) var(--ease-out, ease-out);
}
.ed-card:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover-light, 0 6px 24px rgba(17,17,20,0.06));
}
.ed-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ed-card__logo {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--radius-md, 8px);
  display: grid;
  place-items: center;
  overflow: hidden;
  text-decoration: none;
}
.ed-card__logo-img { width: 100%; height: 100%; object-fit: contain; background: var(--color-bg-subtle); }
.ed-card__logo-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}
.ed-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--color-fg-primary);
  text-decoration: none;
}
.ed-card__name:hover { text-decoration: underline; }
.ed-card__sectors { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ed-card__sector {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill, 999px);
  text-decoration: none;
}
.ed-card__sector:hover { filter: brightness(0.96); }
.ed-card__head-spacer { flex: 1 1 auto; }
.ed-card__velocity {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill, 999px);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-subtle);
  color: var(--color-fg-secondary);
  white-space: nowrap;
}
.ed-card__velocity-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.ed-card__velocity-value { font-size: 13px; font-weight: 700; }
.ed-card__velocity--hot {
  background: var(--color-accent-alert-bg, #FCE6E2);
  color: var(--color-accent-alert, var(--sp-vermilion-500));
  border-color: transparent;
}
.ed-card__velocity--normal {
  background: var(--sp-sector-productivity-bg, #D8EEF3);
  color: var(--sp-sector-productivity, #0E7490);
  border-color: transparent;
}
.ed-card__velocity--cool {
  background: var(--color-bg-subtle);
  color: var(--color-fg-tertiary);
}
.ed-card__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--color-fg-primary);
  text-wrap: balance;
  margin: 0;
}
.ed-card__section { display: flex; flex-direction: column; gap: 8px; }
.ed-card__section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg-tertiary);
  margin: 0;
}
.ed-card__diamond {
  color: var(--color-accent-brand, var(--sp-orange-500));
  font-size: 10px;
}
.ed-card__section-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-fg-secondary);
  margin: 0;
  text-wrap: pretty;
}
.ed-card__moves {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ed-move {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px dashed var(--color-border-divider);
}
.ed-move:first-child { border-top: 0; padding-top: 4px; }
.ed-move__when {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-fg-tertiary);
  letter-spacing: 0.02em;
  padding-top: 2px;
}
.ed-move__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed-move__title {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-fg-primary);
  text-decoration: none;
  line-height: 1.35;
}
.ed-move__title:hover { color: var(--color-accent-brand, var(--sp-orange-500)); }
.ed-move__summary {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-fg-secondary);
  margin: 0;
  text-wrap: pretty;
}
.ed-move--spark .ed-move__when { color: var(--color-accent-brand, var(--sp-orange-500)); }
.ed-move--trivial { opacity: 0.7; }

.ed-card__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-divider);
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--color-fg-tertiary);
}
.ed-card__dot { color: var(--color-fg-muted); }
.ed-card__updated { font-family: var(--font-mono); font-size: 11.5px; }
.ed-card__source {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-accent-brand, var(--sp-orange-500));
  text-decoration: none;
}
.ed-card__source:hover { text-decoration: underline; }

.ed-byline { display: inline-flex; align-items: center; gap: 8px; }
.ed-byline__avatar {
  width: 24px; height: 24px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--color-bg-subtle);
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-fg-secondary);
}
.ed-byline__avatar--initials { letter-spacing: 0.02em; }
.ed-byline__name {
  color: var(--color-fg-primary);
  font-weight: 600;
  text-decoration: none;
}
.ed-byline__name:hover { text-decoration: underline; }

.ed-empty {
  margin-top: 28px;
  padding: 36px 32px;
  background: var(--color-bg-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-2xl, 16px);
  text-align: center;
}
.ed-empty__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-fg-primary);
  margin: 0 0 10px;
}
.ed-empty__body {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--color-fg-secondary);
  margin: 0;
  max-width: 56ch;
  margin-inline: auto;
}
.ed-empty__body a { color: var(--color-accent-brand, var(--sp-orange-500)); font-weight: 600; }

.ed-load-more {
  margin: 24px 0 8px;
  text-align: center;
}
.ed-load-more--end {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-fg-tertiary);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .ed-card { padding: 20px 18px; gap: 16px; }
  .ed-move { grid-template-columns: 36px 1fr; gap: 10px; }
  .ed-card__source { margin-left: 0; }
}

/* ─── REDUCED MOTION ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Mobile menu — auth-aware bottom slot */
.mobile-menu__auth {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
}
.mobile-menu__user {
  padding: 10px 20px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-fg-tertiary);
}
.mobile-menu__link--primary {
  background: var(--sp-orange, #FF5436);
  color: #fff !important;
  margin: 8px 16px 0;
  border-radius: 9px;
  text-align: center;
  padding: 12px 16px !important;
  font-weight: 600;
  border-bottom: none;
}
.mobile-menu__link--primary:hover {
  background: var(--sp-orange-deep, #D44114);
  color: #fff !important;
}
.mobile-menu__link--danger { color: var(--sp-vermilion, #E8584F); }
