/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Theme variables */
:root {
  --color-primary: #ff7400;
  --color-primary-light: rgba(255, 116, 0, 0.15);
  --color-primary-border: rgba(255, 116, 0, 0.25);
  --color-bg-base: #0f172a;
  --color-bg-surface: #1e293b;
  --color-bg-elevated: #334155;
  --color-border: #334155;
  --color-border-subtle: #1e293b;
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-success: #10b981;
  --color-danger: #ef4444;
}

/* Dark text utilities */
.text-dark-primary { color: var(--color-text-primary); }
.text-dark-secondary { color: var(--color-text-secondary); }
.text-dark-muted { color: var(--color-text-muted); }
.text-dark-success { color: var(--color-success); }
.text-dark-danger { color: var(--color-danger); }
.border-dark { border-color: var(--color-border); }
.border-dark-top { border-top: 1px solid var(--color-border); }

/* Dark body */
.dark-body {
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  min-height: 100vh;
}

/* Top nav */
.top-nav {
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
}

.top-nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.5rem;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.top-nav-logo {
  display: block;
}

@media (max-width: 768px) {
  .top-nav-brand-text {
    display: none;
  }
  .top-nav-inner {
    padding: 0 0.5rem;
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
  }
  .top-nav-left {
    gap: 0.75rem;
  }
  .top-nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .top-nav-left {
    gap: 0.75rem;
  }
  .top-nav-search-wrap {
    display: none !important;
  }
}

.top-nav-link {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.top-nav-link:hover {
  color: var(--color-text-primary);
}

.top-nav-link-active {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid var(--color-primary);
}

.top-nav-search {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem 0.375rem 2rem;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  outline: none;
  width: 12rem;
}

.top-nav-search::placeholder {
  color: var(--color-text-muted);
}

.top-nav-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.top-nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.top-nav-search-icon {
  position: absolute;
  left: 0.5rem;
  width: 1rem;
  height: 1rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.top-nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.top-nav-cta:hover {
  opacity: 0.9;
}

.top-nav-dropdown {
  position: relative;
}

.top-nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.top-nav-dropdown-trigger:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.top-nav-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.375rem);
  min-width: 180px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.25rem 0;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.top-nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.top-nav-dropdown:hover .top-nav-dropdown-menu,
.top-nav-dropdown:focus-within .top-nav-dropdown-menu {
  display: block;
}

.top-nav-right .top-nav-search-wrap ~ .top-nav-dropdown .top-nav-dropdown-menu {
  left: auto;
  right: 0;
}

.top-nav-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.top-nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
}

.top-nav-dropdown-signout {
  color: var(--color-danger);
}

.top-nav-dropdown-signout:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.top-nav-dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.25rem 0;
}

.top-nav-user {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.top-nav-signout {
  font-size: 0.8125rem;
  color: var(--color-danger);
  background: none;
  border: none;
  cursor: pointer;
}

.top-nav-signout:hover {
  color: #f87171;
}

.top-nav-divider {
  width: 1px;
  height: 1.25rem;
  background: var(--color-border);
}

.top-nav-badge-wrap {
  position: relative;
}

.top-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3rem;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  position: absolute;
  top: -0.375rem;
  right: -0.625rem;
}

/* Flash overlay — fixed so alerts never shift page content */
.flash-overlay {
  position: fixed;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  width: 100%;
  max-width: 36rem;
  padding: 0 1rem;
  pointer-events: none;
}

.flash-overlay > * {
  pointer-events: auto;
}

/* Dark alerts */
.dark-alert-notice {
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-alert-error {
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Developer preview banner */
.developer-preview-banner {
  background: var(--color-primary-light);
  border-bottom: 1px solid var(--color-primary-border);
  color: var(--color-text-primary);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}
.developer-preview-banner-link {
  color: var(--color-primary);
  text-decoration: underline;
}
.developer-preview-banner-link:hover {
  color: #ff9633;
}

/* Marketplace headings */
.marketplace-heading {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.marketplace-subheading {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.marketplace-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

/* Marketplace cards */
.marketplace-card {
  display: block;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.marketplace-card:hover {
  border-color: var(--color-primary-border);
  box-shadow: 0 4px 12px rgba(255, 116, 0, 0.08);
}

.marketplace-card-featured {
  box-shadow: 0 0 0 1px var(--color-primary-border);
}

.marketplace-card-body {
  padding: 1.25rem;
}

.marketplace-card-title {
  font-weight: 600;
  color: var(--color-text-primary);
}

.marketplace-card-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marketplace-card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.marketplace-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
}

.marketplace-card-price {
  font-size: 0.875rem;
  font-weight: 500;
}

.marketplace-card-price-paid {
  color: var(--color-primary);
}

.marketplace-card-price-free {
  color: var(--color-success);
}

/* Featured badge */
.featured-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Tier filter pills */
.tier-pill {
  display: inline-flex;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  transition: background 0.15s, color 0.15s;
}

.tier-pill:hover {
  color: var(--color-text-primary);
}

.tier-pill-active {
  display: inline-flex;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  background: var(--color-primary);
  color: #fff;
}

/* Marketplace search input */
.marketplace-search {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  outline: none;
  width: 16rem;
}

.marketplace-search::placeholder {
  color: var(--color-text-muted);
}

.marketplace-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* Marketplace sort dropdown */
.marketplace-sort-select {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.marketplace-sort-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.marketplace-search-btn {
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.marketplace-search-btn:hover {
  opacity: 0.9;
}

/* Marketplace show page */
.marketplace-panel {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.marketplace-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.marketplace-link:hover {
  opacity: 0.85;
}

.marketplace-install-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s;
}

.marketplace-install-btn:hover {
  opacity: 0.9;
}

.marketplace-uninstall-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  background: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}

.marketplace-uninstall-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.marketplace-signin-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}

.marketplace-signin-btn:hover {
  background: #475569;
}

.marketplace-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.marketplace-badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.marketplace-badge-neutral {
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
}

.marketplace-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.marketplace-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.automation-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: #f97316;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.automation-control:hover {
  background: rgba(249, 115, 22, 0.1);
  border-color: #f97316;
}

.automation-control-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.decision-action-btn {
  width: auto;
  display: inline-block;
  padding: 10px 2rem;
}

.decision-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.decision-tab:hover {
  color: var(--color-text-primary);
}

.decision-tab-active {
  color: #f97316;
  border-bottom-color: #f97316;
}

.decision-radio {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-text-secondary);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.decision-radio:checked {
  border-color: #f97316;
  background: radial-gradient(circle, #f97316 40%, transparent 45%);
}

.marketplace-badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

/* Publisher pills (marketplace) */
.publisher-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: border-color 0.15s;
}

.publisher-pill:hover {
  border-color: var(--color-primary-border);
}

.publisher-pill-name {
  font-weight: 500;
  color: var(--color-text-primary);
}

.publisher-pill-count {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* No results */
.marketplace-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 0;
}

/* Auth pages */
.auth-container {
  max-width: 400px;
  margin: 80px auto 0;
  padding: 0 20px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.auth-oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  border: none;
}

.auth-btn-google {
  background: #4285f4;
  color: #fff;
}

.auth-btn-google:hover {
  background: #3367d6;
}

.auth-btn-microsoft {
  background: #2f2f2f;
  color: #fff;
}

.auth-btn-microsoft:hover {
  background: #1a1a1a;
}

.auth-btn-primary {
  background: var(--color-primary);
  color: #fff;
  margin-top: 8px;
}

.auth-btn-primary:hover {
  opacity: 0.9;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--color-border);
}

.auth-divider span {
  padding: 0 12px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.auth-input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.875rem;
  outline: none;
  box-sizing: border-box;
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
}

.auth-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.auth-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.auth-oauth-email {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding: 8px 0;
}

.auth-links {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8125rem;
}

.auth-links a {
  color: var(--color-primary);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.blinds-logo {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 3;
  color: var(--light);
  font-size: 0.75rem;
  font-family: 'Merriweather', serif;
  letter-spacing: 0.05em;
}

/* Blinds page */
body.blinds-page {
  --light: #eee;
  --dark: #161616;
  margin: 0;
  padding: 0;
}

.trigger,
.trigger-right {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.trigger {
  background: var(--light);
}

.trigger-right {
  background: var(--dark);
}

.trigger span.down,
.trigger span.up,
.trigger-right span.down,
.trigger-right span.up {
  position: absolute;
  display: block;
  text-align: center;
  font-size: clamp(24px, 5vw, 50px);
  z-index: 2;
  width: 50%;
  text-transform: uppercase;
  font-weight: 900;
  font-family: 'Merriweather', serif;
  top: calc(50vh - 80px);
}

.trigger span.down,
.trigger span.up {
  color: var(--light);
}

.trigger-right span.down,
.trigger-right span.up {
  color: var(--dark);
}

.trigger span.up,
.trigger-right span.up {
  right: 0;
}

.trigger span.down,
.trigger-right span.down {
  left: 0;
}

.yarn-ball {
  position: absolute;
  z-index: 2;
  right: 25%;
  transform: translateX(50%);
  top: 50%;
  margin-top: -20vh;
  pointer-events: none;
  object-fit: contain;
  max-height: 40vh;
}

.cta-buttons {
  position: absolute;
  z-index: 2;
  left: 25%;
  transform: translate(-50%, -50%);
  top: 46%;
  display: flex;
  gap: 12px;
  opacity: 0;
}

.cta-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
}

.cta-btn-primary {
  background: var(--dark);
  color: var(--light);
}

.cta-btn-secondary {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--dark);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: calc(50vw - 16px);
  transform: translateX(-50%);
  z-index: 3;
  mix-blend-mode: difference;
  animation: bounce-hint 2s ease-in-out infinite;
}

@keyframes bounce-hint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.box,
.box-right {
  height: 1.2vh;
  width: 50vw;
  margin-bottom: -0.2vh;
  display: block;
}

.box {
  background: var(--dark);
}

.box-right {
  background: var(--light);
}

/* Blinds menu */
.osmo-ui {
  z-index: 120;
  pointer-events: none;
  position: relative;
}

.header {
  z-index: 120;
  padding-top: 16px;
  position: fixed;
  inset: 0% 0% auto;
}

.nav-row {
  justify-content: space-between;
  align-items: center;
  width: 100%;
  display: flex;
}

.nav-logo-row {
  pointer-events: auto;
  color: var(--light);
  font-family: "Merriweather", serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.nav-logo-row.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-row__right {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-button {
  background: transparent;
  border: 1px solid rgba(238, 238, 238, 0.35);
  color: var(--light);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  cursor: pointer;
}

.menu-button-icon {
  width: 14px;
  height: 14px;
}

.menu-button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  height: 1rem;
  overflow: hidden;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.menu-button-text .p-large {
  font-size: 0.65rem;
  line-height: 1rem;
  margin: 0;
}

.icon-wrap {
  transition: transform 0.4s cubic-bezier(.65, .05, 0, 1);
}

.menu-button:hover .icon-wrap {
  transform: rotate(90deg);
}

.cloneable {
  position: relative;
  --menu-padding: 2em;
}

.nav {
  z-index: 110;
  width: 100%;
  height: 100vh;
  margin-left: auto;
  margin-right: auto;
  display: block;
  position: fixed;
  inset: 0%;
}

.overlay {
  z-index: 0;
  cursor: pointer;
  background-color: rgba(15, 15, 15, 0.7);
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0%;
}

.menu {
  padding-bottom: var(--menu-padding);
  padding-top: calc(3 * var(--menu-padding));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  width: min(32rem, 92vw);
  height: 100%;
  margin-left: auto;
  position: relative;
  overflow: auto;
}

.menu-bg {
  z-index: 0;
  position: absolute;
  inset: 0%;
}

.menu-inner {
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  height: 100%;
  position: relative;
  overflow: auto;
}

.bg-panel {
  z-index: 0;
  background-color: #0d0d0d;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
  position: absolute;
  inset: 0%;
}

.bg-panel.first {
  background-color: #111111;
}

.bg-panel.second {
  background-color: #161616;
}

.menu-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.menu-list-item {
  position: relative;
  overflow: hidden;
}

.menu-link {
  padding: 0.75em var(--menu-padding);
  display: flex;
  align-items: baseline;
  gap: 0.75em;
  width: 100%;
  text-decoration: none;
  color: var(--light);
  position: relative;
}

.menu-link-heading {
  z-index: 1;
  text-transform: uppercase;
  font-family: "Merriweather", serif;
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 700;
  line-height: 0.85;
  transition: transform 0.55s cubic-bezier(.65, .05, 0, 1);
  position: relative;
}

.menu-link-heading {
  text-shadow: 0px 1em 0px rgba(238, 238, 238, 0.35);
}

.eyebrow {
  z-index: 1;
  color: #c7c7c7;
  text-transform: uppercase;
  font-family: "Merriweather", serif;
  font-weight: 400;
  position: relative;
}

.menu-link-bg {
  z-index: 0;
  background-color: #1c1c1c;
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(.65, .05, 0, 1);
  position: absolute;
  inset: 0%;
  transform: scale3d(1, 0, 1);
}

@media (hover:hover) {
  .menu-link:hover .menu-link-heading {
    transform: translate(0px, -1em);
    transition-delay: 0.1s;
  }

  .menu-link:hover .menu-link-bg {
    transform: scale(1, 1);
  }
}

@media (max-width: 768px) {
  .cloneable {
    --menu-padding: 1em;
  }

  .menu {
    padding-top: calc(6 * var(--menu-padding));
    width: 100%;
  }

  .bg-panel {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

@media (max-width: 768px) {
  .yarn-ball {
    max-height: 25vh;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* Scroll showcase section */
.scroll-showcase {
  --ink: #101010;
  --paper: #f6f0e8;
  --accent: #ff5a3c;
  --accent-soft: #ffd4cc;
  background: radial-gradient(circle at top, #fff6ef 0%, #f2e6da 50%, #e8d9cb 100%);
  color: var(--ink);
  padding: clamp(64px, 8vw, 120px) 6vw 120px;
  position: relative;
  overflow: hidden;
}

.scroll-showcase::before {
  content: "";
  position: absolute;
  inset: 8% 10% auto auto;
  width: clamp(180px, 28vw, 360px);
  height: clamp(180px, 28vw, 360px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 60, 0.25), transparent 70%);
  filter: blur(2px);
  pointer-events: none;
}

.showcase-hero {
  max-width: 760px;
}

.showcase-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 700;
  color: #4c3b31;
  margin-bottom: 18px;
}

.showcase-hero h2 {
  font-family: "Merriweather", serif;
  font-size: clamp(32px, 5vw, 56px);
  margin: 0 0 18px;
}

.showcase-hero p {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 640px;
}

.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.showcase-pill {
  background: var(--paper);
  border: 1px solid #d6c6b8;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.showcase-panels {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  gap: 18px;
}

.showcase-panel {
  padding: 24px 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(16, 16, 16, 0.08);
  box-shadow: 0 18px 40px rgba(22, 22, 22, 0.08);
  backdrop-filter: blur(4px);
}

.showcase-panel h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #3a2a22;
}

.showcase-panel p {
  margin: 0;
  font-size: 1.05rem;
}

.showcase-ticker {
  margin: clamp(48px, 7vw, 88px) 0 32px;
  overflow: hidden;
  border-top: 1px solid rgba(16, 16, 16, 0.2);
  border-bottom: 1px solid rgba(16, 16, 16, 0.2);
  padding: 16px 0;
}

.ticker-track {
  display: inline-flex;
  gap: 32px;
  white-space: nowrap;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.ticker-track span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.showcase-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: clamp(48px, 8vw, 96px);
}

.showcase-card {
  background: var(--ink);
  color: #fdf9f4;
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(16, 16, 16, 0.3);
  transform: translateY(0);
}

.showcase-card h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.showcase-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(253, 249, 244, 0.78);
}

.showcase-cta {
  border-radius: 22px;
  background: var(--accent);
  color: #fff5f2;
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  gap: 12px;
  max-width: 680px;
  box-shadow: 0 18px 40px rgba(255, 90, 60, 0.35);
}

.showcase-cta h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
}

.showcase-cta p {
  margin: 0 0 10px;
  font-size: 1rem;
}

.showcase-cta .cta-btn-primary {
  background: #1a0f0b;
  color: #fff5f2;
}

@media (max-width: 768px) {
  .scroll-showcase {
    padding: 64px 8vw 96px;
  }

  .showcase-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* On-scroll text highlight section */
.scroll-highlight {
  --color-text: #eee;
  --color-bg: #0b0b0b;
  --color-highlight-start: #bdbdbd;
  --color-highlight-end: #eee;
  --color-highlight-end-alt: #f5f5f5;
  background: radial-gradient(circle at top, #1a1a1a 0%, #0b0b0b 60%);
  color: var(--color-text);
  padding: clamp(72px, 10vw, 140px) 8vw 140px;
  position: relative;
  overflow: hidden;
}

.scroll-highlight__intro {
  max-width: 820px;
  margin-bottom: clamp(48px, 10vw, 96px);
}

.scroll-highlight__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-weight: 700;
  color: #c9c9c9;
  margin-bottom: 16px;
}

.scroll-highlight__intro h2 {
  font-family: "Merriweather", serif;
  font-size: clamp(30px, 5vw, 54px);
  margin: 0 0 16px;
  line-height: 1.1;
}

.scroll-highlight__intro p {
  margin: 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: #d5d5d5;
}

.scroll-highlight .content {
  display: grid;
  min-height: 100vh;
  font-size: clamp(26px, 6vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-family: "Merriweather", serif;
}

.scroll-highlight .content__inner {
  justify-self: start;
  margin-bottom: 50vh;
}

.scroll-highlight .content__inner p {
  margin: 0;
  max-width: 90vw;
  width: 100%;
  text-wrap: balance;
}

.scroll-highlight .hx {
  background: none;
  color: var(--color-highlight-start);
  display: inline-block;
  position: relative;
  white-space: nowrap;
}

.scroll-highlight .hx-3 {
  --color-highlight-end: #d6d6d6;
}

.scroll-highlight .hx-4 {
  --color-highlight-end: #f2f2f2;
  --color-highlight-end-alt: #cccccc;
}

.scroll-highlight .hx-5 {
  display: inline-flex;
  --after-scale: 1;
  --color-bg-highlight: #1f1f1f;
  --color-highlight-start: #e1e1e1;
}

.scroll-highlight .hx-5::after {
  content: "";
  left: -2.5%;
  top: 10%;
  bottom: -7.5%;
  position: absolute;
  z-index: -1;
  width: 105%;
  transform: scale3D(var(--after-scale), var(--after-scale), var(--after-scale));
  background: var(--color-bg-highlight);
  border-radius: 8px;
}

.scroll-highlight .hx-6 {
  display: inline-flex;
  --after-width: 0%;
  --after-width-final: 105%;
  --color-bg-highlight: #2a2a2a;
  --color-highlight-start: #eeeeee;
}

.scroll-highlight .hx-6::after {
  content: "";
  left: -2.5%;
  top: 15%;
  bottom: -10.5%;
  position: absolute;
  z-index: -1;
  width: var(--after-width);
  background: var(--color-bg-highlight);
  border-radius: 8px;
}

.scroll-highlight .hx-7 {
  --after-height: 0%;
  --after-height-final: 100%;
  --color-bg-highlight: #262626;
  --color-highlight-start: #e6e6e6;
}

.scroll-highlight .hx-7::after {
  content: "";
  left: -2.5%;
  top: 10%;
  position: absolute;
  z-index: -1;
  width: 105%;
  height: var(--after-height);
  background: var(--color-bg-highlight);
  border-radius: 8px;
}

.scroll-highlight .hx-8 {
  --color-highlight-end: #f0f0f0;
}

.scroll-highlight .hx-9 {
  --color-highlight-start: rgb(180 180 180 / 65%);
  --color-highlight-end: var(--color-text);
}

.scroll-highlight .hx-9 .word:first-child {
  --color-highlight-end: #f5f5f5;
  color: var(--color-highlight-end);
}

.scroll-highlight .hx-10 {
  --color-highlight-start: var(--color-text);
}

.scroll-highlight .hx-10 .word {
  position: absolute;
}

.scroll-highlight .hx-10 .word:last-child {
  position: relative;
}

.scroll-highlight .hx-flip {
  font-size: clamp(2.5rem, 18vw, 16rem);
  margin: 0 0 12px;
  position: relative;
}

.scroll-highlight .hx-flip__inner,
.scroll-highlight .hx-flip__placeholder {
  font-weight: 200;
  background: none;
  color: inherit;
  display: inline-block;
}

.scroll-highlight .hx-flip__placeholder,
.scroll-highlight .hx__placeholder {
  opacity: 0;
}

.scroll-highlight .hx-flip__inner {
  position: absolute;
  left: 0;
  top: 0;
}

.scroll-highlight .word,
.scroll-highlight .word > .char {
  display: inline-block;
}

.scroll-highlight .hx-12 {
  --color-highlight-start: rgb(180 180 180 / 65%);
  --color-highlight-end: #fdfdfd;
}

.scroll-highlight .hx-12 .word:nth-child(n+2) {
  position: absolute;
  top: 0;
  left: 0;
  --color-highlight-end: #fdfdfd;
  color: var(--color-highlight-end);
}

@media (max-width: 768px) {
  .scroll-highlight .content__inner {
    margin-bottom: 40vh;
  }

  .scroll-highlight .content__inner p {
    text-wrap: balance;
    white-space: normal;
  }
}

/* Plugin screenshots */
.plugin-card-thumbnail {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--color-border);
}

.screenshot-carousel {
  position: relative;
}

.screenshot-carousel-slide {
  display: none;
}

.screenshot-carousel-slide:first-child {
  display: block;
}

.screenshot-carousel-img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  display: block;
}

.screenshot-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.screenshot-carousel-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.screenshot-carousel-prev {
  left: 8px;
}

.screenshot-carousel-next {
  right: 8px;
}

.screenshot-carousel-counter {
  text-align: center;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted, #888);
}

.screenshot-carousel-clickable {
  cursor: pointer;
  transition: opacity 0.15s;
}

.screenshot-carousel-clickable:hover {
  opacity: 0.85;
}

/* Screenshot lightbox */
.screenshot-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.screenshot-lightbox.active {
  display: flex;
}

.screenshot-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
}

.screenshot-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.screenshot-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.screenshot-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.screenshot-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.screenshot-lightbox-prev {
  left: 16px;
}

.screenshot-lightbox-next {
  right: 16px;
}

.screenshot-lightbox-counter {
  margin-top: 12px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Review stars */
.review-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 0.875rem;
}

.review-stars-sm {
  font-size: 0.7rem;
}

.review-star {
  line-height: 1;
}

.review-star-filled {
  color: var(--color-primary);
}

.review-star-empty {
  color: var(--color-text-muted);
}

/* Review star input (interactive) */
.review-star-input {
  display: inline-flex;
  gap: 2px;
  font-size: 1.25rem;
}

.review-star-btn {
  cursor: pointer;
  transition: color 0.1s;
  line-height: 1;
}

.review-star-btn:hover {
  color: var(--color-primary);
}

/* Review card */
.review-card {
  padding: 0.75rem;
  background: var(--color-bg-elevated);
  border-radius: 0.375rem;
}

.review-card-own {
  border: 1px solid var(--color-primary-border);
}

/* Review form */
.review-form {
  padding: 0.75rem;
  background: var(--color-bg-elevated);
  border-radius: 0.375rem;
}

.review-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.review-input {
  width: 100%;
  padding: 0.375rem 0.5rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  outline: none;
  box-sizing: border-box;
}

.review-input:focus,
.review-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.review-textarea {
  width: 100%;
  padding: 0.375rem 0.5rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

.review-submit-btn {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.review-submit-btn:hover {
  opacity: 0.9;
}

.review-edit-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.review-edit-btn:hover {
  opacity: 0.8;
}

.review-delete-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.review-delete-btn:hover {
  opacity: 0.8;
}

/* Social share buttons */
.social-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.social-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.social-share-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Buy button (inline with share bar) */
.marketplace-buy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  background: var(--color-success);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.marketplace-buy-btn:hover {
  opacity: 0.9;
}

/* Industry category grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.industry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.industry-card:hover {
  border-color: var(--color-primary-border);
  box-shadow: 0 2px 8px rgba(255, 116, 0, 0.08);
}

.industry-card-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.industry-card-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── Home page (home3) ── */
.home-toggle-wrap {
  display: inline-flex;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.25rem;
  gap: 0.25rem;
}
.home-toggle-tab {
  padding: 0.625rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  color: #64748b;
  background: transparent;
  transition: color 0.15s, background 0.15s;
}
.home-toggle-tab:hover {
  color: #334155;
}
.home-toggle-tab.home-toggle-active {
  color: #fff;
  background: var(--color-primary);
}

.home-hero {
  padding: 3rem 1rem 5rem;
  background: url("/tile2.jpg") repeat, linear-gradient(180deg, rgba(255,116,0,0.08) 0%, transparent 100%);
  background-size: auto, 100% 100%;
}
.home-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
  .home-hero-title { font-size: 3.5rem; }
}
.home-hero-subtitle-box {
  display: inline-block;
  max-width: 38rem;
  margin: 0 auto 2rem;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
}
.home-hero-subtitle {
  font-size: 1.2rem;
  color: #334155;
  margin: 0;
  line-height: 1.6;
}
.home-hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.home-hero-btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}
.home-hero-btn-secondary {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border: 1px solid #94a3b8;
  border-radius: 0.5rem;
  color: #1e293b;
  background: #e2e8f0;
  transition: background 0.15s, border-color 0.15s;
}
.home-hero-btn-secondary:hover {
  background: #cbd5e1;
  border-color: #64748b;
}

.home-feature-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 2rem;
}
.home-feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: 0.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.home-feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}
.home-feature-desc {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.home-how-section {
  padding: 4rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.home-step-number {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.home-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

/* ── App Store home (home4) ── */
.appstore-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}
@media (min-width: 1024px) {
  .appstore-layout {
    grid-template-columns: 1fr 280px;
    padding: 1.5rem 2rem;
  }
}

/* Featured hero */
.appstore-featured {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  min-height: 280px;
}
.appstore-featured-link {
  display: block;
  position: relative;
  text-decoration: none;
  min-height: 320px;
}
.appstore-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}
.appstore-featured-placeholder {
  width: 100%;
  height: 320px;
  background: linear-gradient(135deg, var(--color-bg-elevated) 0%, var(--color-bg-surface) 100%);
}
.appstore-featured-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem;
  background: linear-gradient(rgba(15,23,42,0.7), transparent 40%, rgba(15,23,42,0.85));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.appstore-featured-empty {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}
.appstore-featured-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  width: fit-content;
}
.appstore-featured-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}
.appstore-featured-desc {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Section headings */
.appstore-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Categories grid */
.appstore-categories-section {
  margin-top: 1.5rem;
}
.appstore-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .appstore-categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .appstore-categories-grid { grid-template-columns: repeat(4, 1fr); }
}
.appstore-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.appstore-category-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.appstore-category-icon {
  color: var(--color-primary);
}
.appstore-category-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
}

/* Sidebar */
.appstore-sidebar {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.25rem;
  height: fit-content;
}
.appstore-top-list {
  display: flex;
  flex-direction: column;
}
.appstore-top-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
  text-decoration: none;
  transition: background 0.1s;
  border-radius: 0.25rem;
}
a.appstore-top-item:hover {
  background: var(--color-primary-light);
}
.appstore-top-item:last-child {
  border-bottom: none;
}
.appstore-top-rank {
  width: 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
  flex-shrink: 0;
}
.appstore-top-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}
.appstore-top-info {
  flex: 1;
  min-width: 0;
}
.appstore-top-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appstore-top-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}
.appstore-top-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.appstore-top-price-free {
  color: var(--color-success);
}
.appstore-sidebar-cta {
  margin-top: 1rem;
  text-align: center;
}

/* Checkout modal */
.checkout-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 3rem 1rem;
}

.checkout-modal-overlay.hidden {
  display: none;
}

.checkout-modal-container {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0.75rem;
  padding: 0;
  width: 100%;
  max-width: 32rem;
}

.checkout-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  z-index: 1;
  transition: color 0.15s;
}

.checkout-modal-close:hover {
  color: #fff;
}

/* Configure page tabs */
.config-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}

.config-tab {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.config-tab:hover {
  color: var(--color-text-primary);
}

.config-tab-active {
  color: var(--color-text-primary);
  border-bottom-color: #f97316;
}

.config-tab-panel {
  /* shown by default; JS adds .hidden */
}

/* Configure page sections */
.app-config-section {
  margin-top: 1.5rem;
}

/* Triage inbox + test automation */
.triage-inbox-email {
  font-family: monospace;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  user-select: all;
}

.triage-confidence-high { color: #4ade80; }
.triage-confidence-mid { color: #facc15; }
.triage-confidence-low { color: #f87171; }

.triage-threshold-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--color-bg-elevated);
  outline: none;
}

.triage-threshold-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
}

.triage-threshold-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: none;
}

.triage-result-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
}

.triage-fallback-warning {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #facc15;
  border-radius: 0.375rem;
  padding: 0.75rem;
  font-size: 0.875rem;
}

.test-trace-step {
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8125rem;
}

.test-trace-step:last-child {
  border-bottom: none;
}

/* Installed badge (inline with share bar) */
.marketplace-installed-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

/* File upload fields */
.file-upload-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-elevated);
  margin-bottom: 8px;
}

.file-upload-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-upload-input {
  padding: 8px;
  cursor: pointer;
}

.file-upload-input::file-selector-button {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.8125rem;
  cursor: pointer;
  margin-right: 8px;
}

.file-upload-input::file-selector-button:hover {
  opacity: 0.9;
}
