/* ==========================================================================
   InstagramPhotoDownloader.online — Modern SaaS Design System
   Palette: Deep Charcoal #171717 | Purple #8338EC | Pink #E1306C | Orange #F77737
   Surface: #F8F8FC & #FFFFFF | Muted: #6B7280
   ========================================================================== */

:root {
  --ink: #171717;
  --ink-soft: #374151;
  --muted: #6B7280;
  --bg: #F8F8FC;
  --surface: #FFFFFF;
  --surface-alt: #F3F4F9;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;

  --purple: #8338EC;
  --pink: #E1306C;
  --orange: #F77737;
  --grad: linear-gradient(135deg, #8338EC 0%, #E1306C 52%, #F77737 100%);
  --grad-soft: linear-gradient(135deg, rgba(131, 56, 236, 0.10) 0%, rgba(225, 48, 108, 0.10) 52%, rgba(247, 119, 55, 0.10) 100%);

  --success: #059669;
  --success-bg: #ECFDF5;
  --warn: #D97706;
  --warn-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --info: #4F46E5;
  --info-bg: #EEF2FF;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(23, 23, 23, 0.04);
  --shadow-sm: 0 4px 14px rgba(23, 23, 23, 0.05);
  --shadow-md: 0 12px 32px rgba(23, 23, 23, 0.08);
  --shadow-lg: 0 24px 56px rgba(131, 56, 236, 0.12);

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1180px;
  --transition: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--purple);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--pink);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-top: 0;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 800; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 700; margin-bottom: 0.5rem; }

p { margin-top: 0; color: var(--ink-soft); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 10000;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: 860px;
}

/* ==========================================================================
   Custom Interactive Cursor Animation (Fine Pointer Only)
   ========================================================================== */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.25s ease, width 0.22s ease, height 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  will-change: transform;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(225, 48, 108, 0.55);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  border: 1.5px solid rgba(131, 56, 236, 0.45);
  background: rgba(131, 56, 236, 0.04);
  backdrop-filter: blur(1px);
}

body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring {
  opacity: 1;
}

body.cursor-hover .cursor-ring {
  width: 50px;
  height: 50px;
  margin-left: -25px;
  margin-top: -25px;
  border-color: rgba(225, 48, 108, 0.65);
  background: rgba(225, 48, 108, 0.08);
}

body.cursor-hover .cursor-dot {
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
}

body.cursor-down .cursor-ring {
  width: 26px;
  height: 26px;
  margin-left: -13px;
  margin-top: -13px;
  border-color: var(--orange);
  background: rgba(247, 119, 55, 0.14);
}

body.cursor-text .cursor-dot,
body.cursor-text .cursor-ring {
  opacity: 0.18;
}

.cursor-ripple {
  position: fixed;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid var(--pink);
  pointer-events: none;
  z-index: 9998;
  animation: cursorRipple 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cursorRipple {
  0% { transform: scale(0.5); opacity: 0.75; }
  100% { transform: scale(3.4); opacity: 0; }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring, .cursor-ripple { display: none !important; }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 16px rgba(225, 48, 108, 0.25);
  flex-shrink: 0;
}

.brand-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--grad-soft);
  color: var(--purple);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.nav-dropdown-menu a small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}

.nav-dropdown-menu a:hover {
  background: var(--bg);
  color: var(--purple);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink);
}
.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--grad-soft);
  color: var(--purple);
}

/* ==========================================================================
   Hero & Spotlight Ambient Background
   ========================================================================== */
.hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 15% -10%, rgba(131, 56, 236, 0.11), transparent 70%),
    radial-gradient(700px 380px at 85% 0%, rgba(225, 48, 108, 0.09), transparent 70%),
    radial-gradient(600px 300px at 50% 100%, rgba(247, 119, 55, 0.06), transparent 70%),
    var(--bg);
}

.hero-compact {
  padding: 2.25rem 0 2.25rem;
}

.hero-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-xs);
  margin-bottom: 1rem;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--muted);
  max-width: 660px;
  margin: 0.85rem auto 1.25rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.trust-pill svg {
  width: 15px;
  height: 15px;
  color: var(--success);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  justify-content: center;
}

.breadcrumbs.left {
  justify-content: flex-start;
}

.breadcrumbs a { color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--purple); }
.breadcrumbs span[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Main Downloader Card & Interactive Controls
   ========================================================================== */
.downloader-card {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.downloader-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.32;
  pointer-events: none;
}

.mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: var(--bg);
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.mode-tab {
  border: 0;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.mode-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}

.url-input-wrap {
  flex: 1 1 360px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.url-input-wrap:focus-within {
  background: var(--surface);
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(131, 56, 236, 0.12);
}

.url-input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.95rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.url-input::placeholder {
  color: #9CA3AF;
}

.url-textarea {
  width: 100%;
  min-height: 132px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.url-textarea:focus {
  background: var(--surface);
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(131, 56, 236, 0.12);
}

.input-inline-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-right: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.78rem 1.35rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 48, 108, 0.28);
}

.btn-primary:hover:not(:disabled) {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(131, 56, 236, 0.32);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg);
  color: var(--purple);
  border-color: var(--purple);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  padding: 0.48rem 0.78rem;
  font-size: 0.82rem;
  border-radius: 9px;
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.example-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.example-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-soft);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.example-chip:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--surface);
}

/* Rights Confirmation Box */
.rights-box {
  margin-top: 1.1rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.rights-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.rights-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--purple);
  flex-shrink: 0;
  cursor: pointer;
}

.rights-note {
  margin: 0.35rem 0 0 1.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.validation-bar {
  margin-top: 0.95rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  display: none;
  align-items: flex-start;
  gap: 0.65rem;
}

.validation-bar.show { display: flex; }
.validation-bar.valid { background: var(--success-bg); color: #065F46; border: 1px solid #A7F3D0; }
.validation-bar.invalid { background: var(--danger-bg); color: #991B1B; border: 1px solid #FECACA; }
.validation-bar.warn { background: var(--warn-bg); color: #92400E; border: 1px solid #FDE68A; }
.validation-bar.info { background: var(--info-bg); color: #3730A3; border: 1px solid #C7D2FE; }

/* Result Panel */
.result-panel {
  margin-top: 1.25rem;
  display: none;
}

.result-panel.show { display: block; animation: fadeUp 0.28s ease; }

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

.status-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.status-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-purple { background: rgba(131, 56, 236, 0.12); color: var(--purple); }
.badge-pink { background: rgba(225, 48, 108, 0.12); color: var(--pink); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-amber { background: var(--warn-bg); color: var(--warn); }
.badge-gray { background: #E5E7EB; color: #374151; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0;
}

.meta-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
}

.meta-item span {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-item strong {
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-all;
}

/* ==========================================================================
   Owned Media Upload & Local Carousel / ZIP Packager
   ========================================================================== */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--purple);
  background: rgba(131, 56, 236, 0.04);
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  background: var(--grad-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.carousel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.carousel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.media-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.media-card.selected {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.14);
}

.media-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #F3F4F6;
  overflow: hidden;
}

.media-thumb-wrap img,
.media-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-select-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  accent-color: var(--purple);
  cursor: pointer;
}

.media-index-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(23, 23, 23, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.media-card-body {
  padding: 0.85rem;
}

.media-card-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.media-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  transition: width 0.2s ease;
}

/* ==========================================================================
   Sections, Cards & Grids
   ========================================================================== */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(131, 56, 236, 0.35);
}

.icon-box {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--grad-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.tool-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--purple);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

/* Device Cards */
.device-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  transition: transform var(--transition), border-color var(--transition);
}
.device-card:hover {
  transform: translateY(-3px);
  border-color: var(--purple);
}

/* Prose / Editorial Content */
.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-xs);
}

.prose h2 { margin-top: 2rem; font-size: 1.55rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4rem; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.35rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.5rem; }

.callout {
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  border-left: 4px solid var(--purple);
  background: var(--bg);
  margin: 1.25rem 0;
}

.callout.warn {
  border-left-color: var(--orange);
  background: var(--warn-bg);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 1.25rem 0;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

tr:last-child td { border-bottom: 0; }

/* FAQ Accordion */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  padding: 1.15rem 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--purple);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-body {
  padding: 0 1.35rem 1.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Batch Queue List */
.batch-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.batch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
}

.batch-row.invalid { border-color: #FECACA; background: var(--danger-bg); }
.batch-row.duplicate { border-color: #FDE68A; background: var(--warn-bg); }
.batch-row.valid { border-color: #A7F3D0; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #D1D5DB;
  padding: 3.75rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-col a {
  color: #9CA3AF;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: #9CA3AF;
}

.disclaimer-bar {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.8rem;
  color: #9CA3AF;
  line-height: 1.55;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero { padding: 2.25rem 0 2rem; }
  .downloader-card { padding: 1.25rem; }
  .grid-3, .grid-2, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 2.75rem 0; }
  .prose { padding: 1.35rem; }
  .input-group .btn-primary { width: 100%; }
}
