/* ==========================================================================
   Bounty Radar — Light Classifieds Editorial System
   Canvas (#FFFFFF) · Tiles (#F3F5F8) · Panels (#F7F9FB)
   Blue (#0A84FF) · Green (#10B981) · Red (#EF4444) · Amber (#F59E0B)
   ========================================================================== */

:root {
  color-scheme: light;

  --bg-canvas:          #FFFFFF;
  --bg-tile:            #F3F5F8;
  --bg-tile-hover:      #E9EDF3;
  --bg-subtle:          #F7F9FB;
  --bg-input:           #FFFFFF;

  --brand-blue:         #0A84FF;
  --brand-blue-hi:      #006EE6;
  --brand-blue-bg:      rgba(10, 132, 255, 0.10);

  --brand-green:        #10B981;
  --brand-green-hi:     #059669;
  --brand-green-bg:     rgba(16, 185, 129, 0.12);
  --brand-green-ink:    #047857;

  --brand-red:          #EF4444;
  --brand-red-hi:       #DC2626;
  --brand-red-bg:       rgba(239, 68, 68, 0.11);
  --brand-red-ink:      #B91C1C;

  --brand-amber:        #F59E0B;
  --brand-amber-bg:     rgba(245, 158, 11, 0.14);
  --brand-amber-ink:    #B45309;

  --brand-dark:         #111827;
  --brand-dark-hi:      #1F2937;

  --ink-primary:        #111827;
  --ink-secondary:      #525C6A;
  --ink-muted:          #7B8594;

  --border-subtle:      #E5E9F0;
  --border-strong:      #CBD2DC;

  --radius-xs:          8px;
  --radius-sm:          12px;
  --radius-md:          18px;
  --radius-lg:          24px;
  --radius-xl:          28px;
  --radius-pill:        999px;

  --shadow-card:        0 2px 12px rgba(17, 24, 39, 0.04), 0 12px 32px -12px rgba(17, 24, 39, 0.08);
  --shadow-elevated:    0 8px 30px rgba(17, 24, 39, 0.08);

  --font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background-color: var(--bg-canvas);
}

main {
  flex: 1 0 auto;
}

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

img {
  height: auto;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

@media (hover: hover) {
  a:hover {
    color: var(--brand-blue-hi);
  }
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--ink-secondary);
}

.error {
  color: var(--brand-red-ink);
}

.ok {
  color: var(--brand-green-ink);
}

/* === Preloader Curtain === */
.preloader {
  display: none;
}

html.js-ready .preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-canvas);
  transform: translateY(0);
  transition: transform 680ms cubic-bezier(0.76, 0, 0.24, 1), visibility 680ms ease;
  will-change: transform;
}

html.js-ready .preloader.is-done {
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preloader-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.preloader-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

.preloader-track {
  width: 168px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-tile);
  overflow: hidden;
}

.preloader-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-green) 100%);
  transform-origin: left center;
  animation: preloaderProgress 650ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes preloaderProgress {
  from { transform: scaleX(0.08); }
  to { transform: scaleX(1); }
}

/* Hero Stagger Entrance */
html.js-ready .hero-stagger-1,
html.js-ready .hero-stagger-2,
html.js-ready .hero-stagger-3,
html.js-ready .hero-stagger-4 {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.js-ready body.hero-entered .hero-stagger-1 { opacity: 1; transform: none; transition-delay: 40ms; }
html.js-ready body.hero-entered .hero-stagger-2 { opacity: 1; transform: none; transition-delay: 110ms; }
html.js-ready body.hero-entered .hero-stagger-3 { opacity: 1; transform: none; transition-delay: 180ms; }
html.js-ready body.hero-entered .hero-stagger-4 { opacity: 1; transform: none; transition-delay: 250ms; }

/* Scroll Reveal */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 540ms cubic-bezier(0.22, 1, 0.36, 1), transform 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.workflow-panel:not(.hidden) {
  animation: panelIn 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-ready .preloader { display: none !important; }
  html.js-ready .hero-stagger-1,
  html.js-ready .hero-stagger-2,
  html.js-ready .hero-stagger-3,
  html.js-ready .hero-stagger-4,
  html.js-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .workflow-panel:not(.hidden) { animation: none; }
}

/* === Container === */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 640px) {
  .wrap {
    padding-inline: 16px;
  }
}

/* === Brand Logo === */
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-mark-lg {
  width: 42px;
  height: 42px;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--ink-muted);
}

/* === Buttons (Blue / Green / Red / Dark) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-xs {
  min-height: 34px;
  padding: 6px 13px;
  font-size: 12.5px;
  border-radius: var(--radius-xs);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 15px;
  border-radius: 14px;
}

.btn-full {
  width: 100%;
}

.btn-blue {
  background: var(--brand-blue);
  color: #FFFFFF;
}

@media (hover: hover) {
  .btn-blue:hover {
    background: var(--brand-blue-hi);
    color: #FFFFFF;
    transform: translateY(-1px);
  }
}

.btn-green,
.btn-primary {
  background: var(--brand-green);
  color: #FFFFFF;
}

@media (hover: hover) {
  .btn-green:hover,
  .btn-primary:hover {
    background: var(--brand-green-hi);
    color: #FFFFFF;
    transform: translateY(-1px);
  }
}

.btn-red {
  background: var(--brand-red);
  color: #FFFFFF;
}

@media (hover: hover) {
  .btn-red:hover {
    background: var(--brand-red-hi);
    color: #FFFFFF;
    transform: translateY(-1px);
  }
}

.btn-dark {
  background: var(--brand-dark);
  color: #FFFFFF;
}

@media (hover: hover) {
  .btn-dark:hover {
    background: var(--brand-dark-hi);
    color: #FFFFFF;
    transform: translateY(-1px);
  }
}

.btn-secondary {
  background: var(--bg-tile);
  color: var(--ink-primary);
  border-color: transparent;
}

@media (hover: hover) {
  .btn-secondary:hover {
    background: var(--bg-tile-hover);
    color: var(--ink-primary);
  }
}

/* === Pill Badges & Stamps === */
.pill-badge,
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.pill-green,
.stamp-verified {
  background: var(--brand-green-bg);
  color: var(--brand-green-ink);
}

.pill-blue,
.stamp-brass {
  background: var(--brand-blue-bg);
  color: var(--brand-blue-hi);
}

.pill-red,
.stamp-risk {
  background: var(--brand-red-bg);
  color: var(--brand-red-ink);
}

.stamp-repair {
  background: var(--brand-amber-bg);
  color: var(--brand-amber-ink);
}

.pill-neutral {
  background: var(--border-subtle);
  color: var(--ink-secondary);
}

/* === Sticky White Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner,
.site-header > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
}

@media (max-width: 639px) {
  .header-inner,
  .site-header > .wrap {
    gap: 12px;
    min-height: 62px;
  }
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-primary);
  flex-shrink: 0;
}

.nav-desktop {
  display: none;
}

@media (min-width: 980px) {
  .nav-desktop {
    display: block;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
  padding-block: 6px;
}

@media (hover: hover) {
  .nav-links a:hover {
    color: var(--ink-primary);
  }
}

.nav-links a.is-current {
  color: var(--ink-primary);
  font-weight: 600;
}

.nav-links a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand-blue);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 479px) {
  .nav-actions .btn-blue {
    display: none;
  }
}

.nav-cabinet-pill {
  display: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-tile);
  color: var(--ink-primary);
  font-size: 13.5px;
  font-weight: 600;
}

@media (min-width: 640px) {
  .nav-cabinet-pill {
    display: inline-flex;
    align-items: center;
  }
}

@media (hover: hover) {
  .nav-cabinet-pill:hover {
    background: var(--bg-tile-hover);
    color: var(--ink-primary);
  }
}

.nav-cabinet-pill.is-current {
  background: var(--brand-blue-bg);
  color: var(--brand-blue-hi);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: var(--bg-tile);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

@media (min-width: 980px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 1.75px;
  background: var(--ink-primary);
  transition: transform 180ms ease;
}

.nav-toggle.is-active .nav-toggle-line:first-child {
  transform: translateY(3.3px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-line:last-child {
  transform: translateY(-3.3px) rotate(-45deg);
}

.nav-drawer {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}

.nav-drawer.is-open {
  display: block;
}

.nav-drawer-inner {
  padding-block: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.nav-drawer-links a {
  display: block;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
  border-bottom: 1px solid var(--border-subtle);
}

/* === 1. Hero + Live Infinite Deal Feed === */
.hero {
  padding-block: 44px 72px;
}

@media (min-width: 1024px) {
  .hero {
    padding-block: 68px 96px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    gap: 48px;
  }
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-tile);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 20px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-green);
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  text-wrap: balance;
  margin-bottom: 18px;
}

.hero-lead {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 50ch;
  text-wrap: pretty;
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-meta {
  font-size: 13px;
  color: var(--ink-muted);
}

/* Live Feed Widget */
.feed-shell {
  position: relative;
  background: var(--bg-tile);
  border-radius: var(--radius-xl);
  padding: 18px;
}

@media (min-width: 640px) {
  .feed-shell {
    padding: 20px;
  }
}

.feed-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-inline: 4px;
}

.feed-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--brand-red);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.feed-live-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
}

.feed-header-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

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

.feed-counter {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.feed-toggle-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.feed-viewport {
  position: relative;
  height: 416px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
}

@media (max-width: 479px) {
  .feed-viewport {
    height: 444px;
  }
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deal-card {
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.04);
  transform-origin: center bottom;
}

.deal-card.is-entering {
  animation: dealEnter 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.deal-card.is-leaving {
  animation: dealLeave 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  overflow: hidden;
  pointer-events: none;
}

@keyframes dealEnter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    border-color: var(--brand-green);
  }
  70% {
    border-color: var(--brand-green);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: var(--border-subtle);
  }
}

@keyframes dealLeave {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 160px;
    margin-bottom: 0;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.97);
    max-height: 0;
    margin-bottom: -10px;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
  }
}

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

.deal-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.deal-tag-green { background: var(--brand-green-bg); color: var(--brand-green-ink); }
.deal-tag-red   { background: var(--brand-red-bg); color: var(--brand-red-ink); }
.deal-tag-blue  { background: var(--brand-blue-bg); color: var(--brand-blue-hi); }

.deal-meta {
  font-size: 12px;
  color: var(--ink-muted);
}

.deal-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.deal-model {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.deal-rewards {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.deal-profit {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--brand-green);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.deal-discount {
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: var(--brand-red-bg);
  color: var(--brand-red-ink);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
}

.deal-card-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deal-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.deal-price-now {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
}

.deal-price-mkt {
  font-size: 12px;
  color: var(--ink-muted);
}

/* Feed Action Toast */
.feed-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  padding: 16px 18px;
  background: var(--bg-canvas);
  border: 2px solid var(--brand-blue);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  animation: panelIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.feed-toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.feed-toast-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}

.feed-toast-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--bg-tile);
  color: var(--ink-primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.feed-toast-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.feed-toast-actions {
  display: flex;
  justify-content: flex-start;
}

/* === Generic Sections (Generous Air) === */
.section {
  padding-block: 76px;
}

@media (min-width: 1024px) {
  .section {
    padding-block: 104px;
  }
}

.section-head {
  margin-bottom: 36px;
}

.section-head-split {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 900px) {
  .section-head-split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-head-center {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.3vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  text-wrap: balance;
}

.section-desc {
  margin-top: 12px;
  font-size: 16.5px;
  color: var(--ink-secondary);
  max-width: 56ch;
  text-wrap: pretty;
}

.section-head-center .section-desc {
  margin-inline: auto;
}

.block-cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.section-head-center ~ .block-cta,
#faq .block-cta {
  justify-content: center;
}

.block-cta-note {
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* === 2. Categories Tiles (#F3F5F8) === */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 680px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cat-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  min-height: 196px;
  background: var(--bg-tile);
  border-radius: var(--radius-lg);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}

@media (hover: hover) {
  .cat-tile:hover {
    background: var(--bg-tile-hover);
    transform: translateY(-2px);
  }
}

.cat-tile-top {
  margin-bottom: 12px;
}

.cat-tile-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.cat-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.cat-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.cat-flat-art {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

/* === 3. Workflow 3-Step Inspector === */
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .workflow-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 32px;
  }
}

.workflow-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workflow-tab {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 20px;
  text-align: left;
  background: var(--bg-tile);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

@media (hover: hover) {
  .workflow-tab:hover {
    background: var(--bg-tile-hover);
  }
}

.workflow-tab.is-active {
  background: var(--bg-canvas);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-card);
}

.wf-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-muted);
  padding-top: 2px;
}

.workflow-tab.is-active .wf-num {
  color: var(--brand-blue);
}

.wf-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wf-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.wf-sub {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.workflow-stage {
  background: var(--bg-tile);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flat-speed-card {
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.flat-speed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.flat-mono {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-green-ink);
}

.flat-speed-svg {
  width: 100%;
  height: auto;
  margin-bottom: 18px;
}

.flat-specs-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 520px) {
  .flat-specs-row {
    grid-template-columns: 1fr;
  }
}

.flat-specs-row span {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
}

.flat-specs-row strong {
  font-size: 13px;
  color: var(--ink-primary);
}

.audit-light {
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.audit-light-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.audit-light-head strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink-primary);
}

.audit-light-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-light-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.econ-visual {
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.econ-visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.econ-gain {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-green-ink);
}

.econ-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.econ-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

@media (max-width: 479px) {
  .econ-bar-row {
    grid-template-columns: 1fr auto;
  }
  .econ-track {
    grid-column: 1 / -1;
  }
}

.econ-track {
  height: 12px;
  background: var(--bg-tile);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.econ-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
}

.econ-fill-blue {
  width: 72%;
  background: var(--brand-blue);
}

.econ-fill-dark {
  width: 100%;
  background: var(--brand-dark);
}

.econ-tip {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* === 4. Trophies & Slider Calculator === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--bg-tile);
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease, color 150ms ease;
}

@media (hover: hover) {
  .filter-btn:hover {
    background: var(--bg-tile-hover);
    color: var(--ink-primary);
  }
}

.filter-btn.is-active {
  background: var(--brand-dark);
  color: #FFFFFF;
}

.trophies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 860px) {
  .trophies-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.trophy-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--bg-tile);
  border-radius: var(--radius-lg);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}

@media (hover: hover) {
  .trophy-card:hover {
    transform: translateY(-2px);
    background: var(--bg-tile-hover);
  }
}

.trophy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.trophy-time {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.trophy-model {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.trophy-loc {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.trophy-profit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-canvas);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.trophy-profit-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-green-ink);
}

.trophy-econ {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13.5px;
}

.trophy-econ > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.trophy-econ dt {
  color: var(--ink-secondary);
}

.trophy-econ dd {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-primary);
}

.trophy-note {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Calculator with Sliders */
.calc-panel {
  margin-top: 24px;
  padding: 28px;
  background: var(--bg-tile);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

@media (min-width: 860px) {
  .calc-panel {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    padding: 36px;
  }
}

.calc-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 20px;
}

.calc-range-group + .calc-range-group {
  margin-top: 20px;
}

.calc-range-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.calc-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
}

.calc-range-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-green-ink);
  white-space: nowrap;
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  accent-color: var(--brand-green);
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--brand-green);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.22);
  cursor: pointer;
  transition: transform 120ms ease;
}

@media (hover: hover) {
  .range-input::-webkit-slider-thumb:hover {
    transform: scale(1.08);
  }
}

.range-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--brand-green);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.22);
  cursor: pointer;
}

.calc-range-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}

.calc-result {
  padding: 26px 28px;
  background: var(--bg-canvas);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.calc-result-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.calc-result-sum {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--brand-green-ink);
  margin-bottom: 8px;
}

.calc-year {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.calc-result-roi {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-blue-hi);
  margin-bottom: 12px;
}

.calc-disclaimer {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* === 5. Extension Flat Mock === */
.ext-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .ext-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
  }
}

.ext-copy .section-title {
  margin-top: 12px;
}

.ext-lead {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink-secondary);
}

.ext-list {
  margin-top: 20px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ext-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-primary);
}

.ext-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-green);
}

.ext-actions {
  margin-top: 26px;
}

.ext-mock {
  background: var(--bg-tile);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.ext-mock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ext-dots {
  display: inline-flex;
  gap: 5px;
}

.ext-dots span {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

.ext-mock-url {
  font-size: 12px;
  color: var(--ink-muted);
}

.ext-mock-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

@media (min-width: 540px) {
  .ext-mock-card {
    flex-direction: row;
    align-items: center;
  }
}

.ext-mock-thumb {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}

.ext-mock-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.ext-mock-title {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.ext-mock-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.ext-mock-price span {
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-muted);
}

.ext-mock-note {
  font-size: 13px;
  color: var(--ink-secondary);
}

/* === 6. Pricing === */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 920px;
  margin-inline: auto;
}

@media (min-width: 780px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg-tile);
  border-radius: var(--radius-xl);
}

.price-card-featured {
  background: var(--bg-canvas);
  border: 2px solid var(--brand-blue);
  box-shadow: var(--shadow-elevated);
}

.price-head {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.price-name {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.price-sum {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.price-val {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.price-period {
  font-size: 14px;
  color: var(--ink-secondary);
}

.price-note {
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  flex: 1 1 auto;
}

.price-features li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink-primary);
}

.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-green);
  font-weight: 700;
}

/* === 7. FAQ === */
.faq-list {
  max-width: 780px;
  margin-inline: auto;
  border-top: 1px solid var(--border-subtle);
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink-primary);
  cursor: pointer;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-blue);
}

.faq-item[open] .faq-summary::after {
  content: "−";
}

.faq-body {
  padding-bottom: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.faq-body code {
  font-family: var(--font-mono);
  padding: 2px 6px;
  background: var(--bg-tile);
  border-radius: 6px;
  font-size: 13px;
}

/* === 8. Cabinet (#cabinet-anchor) === */
.cabinet-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}

.login-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 920px;
  margin-inline: auto;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

@media (min-width: 820px) {
  .login-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 32px;
    padding: 32px;
  }
}

.login-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-primary);
}

.login-sub {
  font-size: 13px;
  color: var(--ink-muted);
}

.login-desc {
  font-size: 14px;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.login-desc code {
  font-family: var(--font-mono);
  padding: 2px 6px;
  background: var(--bg-tile);
  border-radius: 6px;
  color: var(--ink-primary);
}

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

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

#code-input {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  background: var(--bg-tile);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
}

#code-input:focus {
  background: var(--bg-canvas);
  border-color: var(--brand-blue);
  outline: none;
}

.login-help-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
}

.msg-box {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  min-height: 20px;
}

.pay-cta-link {
  margin-top: 10px;
}

.login-info-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  background: var(--bg-tile);
  border-radius: var(--radius-lg);
}

.login-info-price {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  margin-bottom: 14px;
}

.login-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.login-info-list li {
  padding-left: 18px;
  position: relative;
}

.login-info-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-green);
  font-weight: 700;
}

/* Authorized Cabinet */
.cabinet-dash {
  max-width: 920px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.dash-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-user-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
}

.dash-user-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  margin-left: 6px;
}

.dash-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.dash-grid-params {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

@media (min-width: 680px) {
  .dash-grid-params {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dash-param-block {
  padding: 14px 16px;
  background: var(--bg-tile);
  border-radius: var(--radius-sm);
}

.dash-param-lbl {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.dash-param-val {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

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

.cabinet-inputs-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 440px;
}

#receipt-email {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg-tile);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  font-size: 14px;
}

#receipt-email:focus {
  background: var(--bg-canvas);
  border-color: var(--brand-blue);
  outline: none;
}

.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  cursor: pointer;
}

.consent-box input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand-blue);
  flex-shrink: 0;
}

.cabinet-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.payments-table-wrap {
  overflow-x: auto;
}

.payments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.payments-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.payments-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ink-primary);
}

.payment-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-secondary);
}

.payment-amount {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.payments-empty {
  text-align: center;
  padding: 20px !important;
}

/* === Footer === */
.site-footer {
  background: var(--bg-tile);
  border-top: 1px solid var(--border-subtle);
  padding-block: 40px 36px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-primary);
}

.footer-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
}

.footer-tagline {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-muted);
  max-width: 38ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.scroll-top-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin-block: 24px 20px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.footer-disclaimer {
  font-size: 12.5px;
  color: var(--ink-muted);
  max-width: 64ch;
  line-height: 1.5;
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Legal pages compatibility (/offer, /privacy, /contacts) */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.3fr) auto;
    align-items: center;
  }
}

.legal-page {
  padding-block: 42px 72px;
  max-width: 860px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
}

.legal-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .legal-card {
    padding: 36px;
  }
}

.legal-card h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--ink-primary);
}

.legal-card h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-top: 26px;
  margin-bottom: 10px;
  color: var(--ink-primary);
}

.legal-card p,
.legal-card li {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.legal-card p + p {
  margin-top: 10px;
}

.legal-card ul {
  margin: 10px 0 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-card code {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 5px;
  background: var(--bg-tile);
  border-radius: 6px;
  color: var(--ink-primary);
}

.draft {
  padding: 14px 16px;
  margin-bottom: 20px;
  background: var(--brand-amber-bg);
  border-radius: var(--radius-sm);
  color: var(--ink-primary) !important;
  font-size: 13.5px !important;
}

/* ==========================================================================
   Mobile App-Like Polish (<= 639px / <= 479px / <= 359px)
   ========================================================================== */

@media (max-width: 679px) and (min-width: 360px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cat-tile {
    padding: 16px;
    min-height: 156px;
    border-radius: 20px;
  }

  .cat-tile-top {
    margin-bottom: 10px;
  }

  .cat-tile-body {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .cat-title {
    font-size: 15.5px;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .cat-sub {
    font-size: 12px;
    line-height: 1.38;
  }

  .cat-flat-art {
    width: 48px;
    height: 48px;
    align-self: flex-end;
  }
}

@media (max-width: 639px) {
  .section {
    padding-block: 64px;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .section-desc {
    font-size: 15px;
    margin-top: 10px;
  }

  /* Header & Drawer */
  .nav-drawer {
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.12);
    overscroll-behavior: contain;
  }

  .nav-drawer-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Hero: главный экран с воздухом, отделённый от живой ленты */
  .hero {
    padding-block: 36px 56px;
  }

  .hero-grid {
    gap: 48px;
  }

  .hero-copy {
    min-height: calc(100svh - 110px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-status-pill {
    align-self: flex-start;
    font-size: 12.5px;
    padding: 6px 12px;
    margin-bottom: 20px;
  }

  .hero-title {
    font-size: clamp(30px, 8.4vw, 38px);
    line-height: 1.08;
    margin-bottom: 18px;
  }

  .hero-lead {
    font-size: 15.5px;
    line-height: 1.55;
    margin-bottom: 28px;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  .hero-ctas .btn,
  .block-cta .btn {
    width: 100%;
  }

  .hero-meta {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .block-cta {
    margin-top: 30px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
  }

  /* Live Feed */
  .feed-shell {
    padding: 14px;
    border-radius: 22px;
  }

  .feed-header {
    margin-bottom: 12px;
    padding-inline: 2px;
  }

  .feed-header-title {
    font-size: 13.5px;
  }

  .feed-viewport {
    height: 492px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 90%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 90%, transparent 100%);
  }

  .deal-card {
    padding: 13px 14px;
    border-radius: 16px;
  }

  /* Workflow compact tabs */
  .workflow-grid {
    gap: 16px;
  }

  .workflow-tabs {
    gap: 8px;
  }

  .workflow-tab {
    padding: 14px 16px;
    gap: 12px;
    border-radius: 16px;
  }

  .workflow-tab:not(.is-active) .wf-sub {
    display: none;
  }

  .wf-title {
    font-size: 15.5px;
  }

  .wf-sub {
    font-size: 13.5px;
  }

  .workflow-stage {
    padding: 14px;
    border-radius: 22px;
  }

  .flat-speed-card,
  .audit-light,
  .econ-visual {
    padding: 16px;
    border-radius: 16px;
  }

  /* Horizontal Filter Bar & Slider Calculator */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .trophies-grid {
    gap: 16px;
  }

  .trophy-card {
    padding: 18px;
    border-radius: 20px;
  }

  .calc-panel {
    margin-top: 28px;
    padding: 20px 16px;
    border-radius: 22px;
    gap: 20px;
  }

  .calc-title {
    font-size: 19px;
    margin-bottom: 16px;
  }

  .calc-range-head {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .calc-label {
    font-size: 13.5px;
  }

  .range-input::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }

  .range-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  .calc-result {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .calc-result-sum {
    font-size: clamp(34px, 9.5vw, 44px);
  }

  /* Extension, Pricing, FAQ */
  .ext-grid {
    gap: 24px;
  }

  .ext-actions .btn {
    width: 100%;
  }

  .ext-mock {
    padding: 14px;
    border-radius: 22px;
  }

  .ext-mock-card {
    padding: 14px;
    gap: 12px;
  }

  .ext-mock-thumb {
    width: 78px;
    height: 78px;
  }

  .price-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .faq-summary {
    font-size: 15.5px;
    padding-block: 16px;
  }

  /* Cabinet */
  .login-split {
    padding: 18px 16px;
    border-radius: 22px;
    gap: 18px;
  }

  .login-info-col {
    padding: 18px;
    border-radius: 18px;
  }

  .dash-card {
    padding: 18px 16px;
    border-radius: 22px;
  }

  .cabinet-btn-group #pay-btn {
    width: 100%;
    flex-basis: 100%;
  }

  .cabinet-btn-group #refresh-btn,
  .cabinet-btn-group #logout-btn {
    flex: 1 1 0;
  }

  /* Footer */
  .site-footer {
    padding-block: 32px 28px;
  }

  .footer-top {
    gap: 18px;
  }

  .footer-nav {
    gap: 12px 16px;
  }

  .footer-bottom {
    gap: 14px;
  }

  .footer-links {
    gap: 10px 16px;
  }
}

@media (max-width: 479px) {
  .hero-copy,
  .hero-feed-wrap,
  .workflow-tabs,
  .workflow-stage,
  .ext-copy,
  .ext-mock,
  .login-form-col,
  .login-info-col,
  .calc-controls,
  .calc-result {
    min-width: 0;
  }

  .btn {
    white-space: normal;
    text-align: center;
  }

  .hero-status-pill {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.3;
  }

  .hero-title {
    font-size: clamp(26px, 8vw, 34px);
    overflow-wrap: break-word;
  }

  .deal-card-top {
    flex-wrap: wrap;
  }

  .deal-card-mid {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .deal-card-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .deal-card-bottom .btn {
    width: 100%;
    min-height: 38px;
  }

  .feed-viewport {
    height: 556px;
  }
}

@media (max-width: 359px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .feed-header {
    gap: 6px;
  }

  .feed-counter {
    display: none;
  }
}
