/* ==========================================================================
   Pinviddl — Production Stylesheet (HTML5 / CSS3, Zero Frameworks)
   60% White Canvas (#FFFFFF) · 30% Soft Neutral Surfaces (#F7F7F8) · 10% Red Accent (#E60023)
   ========================================================================== */

:root {
  --bg-canvas: #ffffff;
  --bg-surface: #f7f7f8;
  --bg-surface-hover: #f0f1f3;
  --bg-error: #fef2f2;
  --border-hairline: #e5e7eb;
  --border-strong: #d1d5db;
  --border-error: #fecaca;

  --text-primary: #111113;
  --text-secondary: #4b5058;
  --text-muted: #6b7280;
  --text-error: #991b1b;

  --accent: #e60023;
  --accent-hover: #c8001e;
  --accent-active: #ad001a;
  --accent-ring: rgba(230, 0, 35, 0.22);

  --shadow-input: 0 8px 30px rgba(17, 17, 19, 0.06), 0 1px 3px rgba(17, 17, 19, 0.04);
  --shadow-card: 0 2px 10px rgba(17, 17, 19, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container-max: 1120px;
  --container-narrow: 780px;
  --header-height: 68px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.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: 16px;
  top: -100px;
  z-index: 100;
  background: var(--text-primary);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

/* Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header — Strict 3-Zone Top Bar Contract
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hairline);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-link img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

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

.nav-link[aria-current='page'] {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  background-color: var(--text-primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 160ms var(--ease-out), transform 140ms var(--ease-out);
}

.header-cta:hover {
  background-color: #27272a;
}

.header-cta:active {
  transform: translateY(1px);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  color: var(--text-primary);
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: var(--header-height) 0 0 0;
  z-index: 39;
  background: var(--bg-canvas);
  padding: 20px 24px 32px;
  border-top: 1px solid var(--border-hairline);
  overflow-y: auto;
}

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

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.mobile-nav-link[aria-current='page'] {
  background-color: var(--bg-surface);
  color: var(--accent);
  font-weight: 600;
}

/* Breadcrumbs (SEO subpages)
   -------------------------------------------------------------------------- */
.breadcrumb-bar {
  padding-top: 24px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb-list a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--border-strong);
  user-select: none;
}

/* Hero & Downloader Input Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding-top: 68px;
  padding-bottom: 56px;
}

.hero-section--subpage {
  padding-top: 32px;
  padding-bottom: 52px;
}

.hero-content {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}

.hero-subtitle {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Downloader Form Box */
.downloader-form {
  margin-top: 36px;
  text-align: left;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-input);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-input);
}

.url-input-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding-left: 12px;
}

.url-input {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

.url-input::placeholder {
  color: var(--text-muted);
}

.input-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-secondary-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.btn-secondary-inline:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.btn-clear:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface);
}

.btn-clear[hidden] {
  display: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-md);
  background-color: var(--accent);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-primary:active {
  background-color: var(--accent-active);
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.form-meta-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-hint {
  margin: 0;
}

.tool-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tool-switcher a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 150ms var(--ease-out);
}

.tool-switcher a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.meta-dot {
  color: var(--border-strong);
  user-select: none;
}

/* Result Section (Loading, Error, Media Preview & Downloads)
   -------------------------------------------------------------------------- */
.result-section {
  max-width: 880px;
  margin: 28px auto 0;
}

.result-section[hidden] {
  display: none;
}

.loading-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 36px 24px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-panel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  background-color: var(--bg-error);
  border: 1px solid var(--border-error);
  border-radius: var(--radius-lg);
  color: var(--text-error);
  text-align: left;
}

.error-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.error-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
}

.error-message {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #7f1d1d;
}

/* Primary Media Result Card */
.result-card {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: left;
}

.result-main-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 28px;
  padding: 24px;
  align-items: start;
}

.media-preview-stage {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-preview-stage img,
.media-preview-stage video {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background-color: #111113;
}

.media-preview-stage img {
  background-color: var(--bg-surface);
}

.preview-fallback {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.result-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.result-meta-type {
  color: var(--accent);
}

.result-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.result-author {
  margin: -8px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.download-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
}

.download-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.download-row-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.download-row-specs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.download-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 150ms var(--ease-out);
}

.btn-download:hover {
  background-color: var(--accent-hover);
}

.btn-download--secondary {
  background-color: var(--text-primary);
}

.btn-download--secondary:hover {
  background-color: #27272a;
}

.btn-direct-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.btn-direct-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.download-feedback {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  min-height: 1.25em;
}

.download-feedback.is-error {
  color: var(--text-error);
}

/* Multi-image / Carousel Gallery inside Result Card */
.multi-media-section {
  border-top: 1px solid var(--border-hairline);
  padding: 20px 24px 24px;
  background-color: var(--bg-surface);
}

.multi-media-heading {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.multi-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.multi-media-item {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.multi-media-thumb {
  aspect-ratio: 4 / 3;
  background-color: #f3f4f6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.multi-media-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: space-between;
}

.multi-media-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Content Bands (Alternating White / Soft Grey)
   -------------------------------------------------------------------------- */
.section-band {
  padding-block: 72px;
  border-top: 1px solid var(--border-hairline);
}

.section-band--tinted {
  background-color: var(--bg-surface);
}

.section-header {
  max-width: 660px;
  margin-bottom: 40px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-wrap: balance;
}

.section-lead {
  margin: 12px 0 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* How to Download — Clean Editorial Numbered Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-card {
  padding: 24px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
}

.step-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.step-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Features — Asymmetric Bento Grid (Avoids Cliché 3-Column Icon Triads) */
.features-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.feature-item {
  padding: 28px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  grid-column: span 2;
}

.feature-item--wide {
  grid-column: span 3;
}

.feature-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.feature-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Supported Tools Cross-Links (SEO Internal Linking) */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-link-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  transition: border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.tool-link-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.tool-link-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tool-link-desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.tool-link-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

/* FAQ Accordion (Native HTML <details> for Zero-JS Resilience) */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-hairline);
}

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

.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 160ms var(--ease-out);
}

.faq-item[open] .faq-question::after {
  content: '−';
  color: var(--accent);
}

.faq-answer {
  padding: 0 0 22px;
  max-width: 72ch;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.faq-answer p {
  margin: 0;
}

.faq-answer p + p {
  margin-top: 10px;
}

/* Prose / Editorial / Legal Pages
   -------------------------------------------------------------------------- */
.prose-page {
  padding-top: 32px;
  padding-bottom: 80px;
}

.prose-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 32px;
}

.prose-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.4vw, 2.625rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-wrap: balance;
}

.prose-meta {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.prose-body {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.prose-body h2 {
  margin: 36px 0 12px;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.prose-body h3 {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.prose-body p {
  margin: 0 0 16px;
}

.prose-body ul,
.prose-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.prose-body li {
  margin-bottom: 8px;
}

.prose-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-callout {
  margin: 24px 0;
  padding: 20px 22px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

/* Contact Form */
.contact-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 600px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.form-textarea {
  min-height: 132px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.form-status {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.form-status.is-error {
  background-color: var(--bg-error);
  border-color: var(--border-error);
  color: var(--text-error);
}

/* 404 Page */
.not-found-section {
  padding: 96px 0 112px;
  text-align: center;
}

.not-found-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.not-found-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  background-color: var(--bg-canvas);
  padding: 52px 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(160px, 1fr));
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border-hairline);
}

.footer-brand-desc {
  margin: 12px 0 0;
  max-width: 380px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-col-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 150ms var(--ease-out);
}

.footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-disclaimer {
  margin: 0;
  max-width: 680px;
}

/* Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .primary-nav,
  .header-cta {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-item,
  .feature-item--wide {
    grid-column: span 1;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .result-main-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 60px;
  }

  .container,
  .container-narrow {
    padding-inline: 16px;
  }

  .hero-section {
    padding-top: 44px;
    padding-bottom: 40px;
  }

  .input-shell {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 10px;
  }

  .url-input-wrap {
    padding-left: 4px;
  }

  .input-controls {
    display: grid;
    grid-template-columns: auto auto 1fr;
    width: 100%;
  }

  .input-controls .btn-clear[hidden] ~ .btn-primary {
    grid-column: span 2;
  }

  .btn-primary {
    width: 100%;
  }

  .steps-grid,
  .features-bento {
    grid-template-columns: 1fr;
  }

  .download-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .download-row-actions {
    width: 100%;
  }

  .download-row-actions .btn-download {
    flex: 1;
  }

  .section-band {
    padding-block: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Compact Pinterest-inspired homepage (without Pinterest branding) */
.home-page {
  background: #fff;
}

.home-page .container {
  max-width: 1180px;
  padding-inline: 24px;
}

.home-page .site-header {
  height: 58px;
  background: rgba(255, 255, 255, .96);
}

.home-page .brand-link {
  font-size: 1.08rem;
  gap: 7px;
}

.home-page .brand-link img {
  width: 30px;
  height: 30px;
}

.home-page .primary-nav {
  gap: clamp(14px, 2.4vw, 34px);
}

.home-page .nav-link {
  font-size: .82rem;
}

.home-page .header-cta {
  min-height: 34px;
  padding: 6px 12px;
  background: var(--accent);
  border-radius: 8px;
  font-size: .76rem;
}

.home-page .hero-section {
  position: relative;
  overflow: hidden;
  padding-block: 38px 30px;
  border-bottom: 1px solid #f2e9ec;
  background: radial-gradient(ellipse at 50% 0%, #fff0f4 0, transparent 60%), #fff;
}

.home-page .hero-section::before,
.home-page .hero-section::after {
  content: '';
  position: absolute;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff2f5;
  opacity: .8;
  pointer-events: none;
}

.home-page .hero-section::before {
  top: 12px;
  left: -122px;
}

.home-page .hero-section::after {
  right: -135px;
  bottom: -35px;
}

.home-page .hero-content {
  position: relative;
  z-index: 1;
  max-width: 770px;
}

.home-page .hero-title {
  font-size: clamp(2.5rem, 5.3vw, 4.3rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.home-page .hero-title span {
  color: var(--accent);
}

.home-page .hero-subtitle {
  max-width: 660px;
  margin-top: 12px;
  font-size: .96rem;
  line-height: 1.5;
}

.home-page .downloader-form {
  max-width: 720px;
  margin: 19px auto 0;
}

.home-page .input-shell {
  min-height: 49px;
  padding: 4px 5px 4px 14px;
  border-radius: 11px;
}

.home-page .url-input {
  min-height: 38px;
  font-size: .79rem;
}

.home-page .btn-secondary-inline {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f6f4f7;
  font-size: .72rem;
}

.home-page .btn-primary {
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 9px;
  font-size: .78rem;
}

.home-page .form-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.home-page .form-hint {
  font-size: .64rem;
}

.home-page .tool-switcher {
  gap: 7px;
  font-size: .68rem;
}

.home-page .section-band {
  padding-block: 27px;
  border-top: 0;
}

.home-page .section-band--tinted {
  background: #fff;
}

.home-page .section-header {
  max-width: 100%;
  margin: 0 auto 17px;
  text-align: center;
}

.home-page .section-title {
  font-size: clamp(1.25rem, 2.7vw, 1.7rem);
  letter-spacing: -.04em;
}

.home-page .section-lead {
  margin-top: 5px;
  font-size: .82rem;
}

.home-page .steps-grid {
  gap: 13px;
}

.home-page .step-card {
  min-height: 143px;
  padding: 13px 12px 11px;
  border-radius: 11px;
  box-shadow: 0 3px 12px rgba(31, 20, 38, .04);
}

.home-page .step-index {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin: 0 6px 0 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: 700 .72rem var(--font-body);
  vertical-align: middle;
}

.home-page .step-title {
  display: inline;
  font-size: .83rem;
}

.home-page .step-desc {
  margin-top: 8px;
  font-size: .72rem;
  line-height: 1.4;
}

.home-page .home-benefits {
  padding-top: 17px;
}

.home-page .home-benefits .section-header {
  margin-bottom: 14px;
}

.home-page .home-benefits .section-lead {
  display: none;
}

.home-page .home-benefits .features-bento {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.home-page .home-benefits .feature-item {
  grid-column: auto;
  min-width: 0;
  padding: 15px 11px 12px;
  border-radius: 11px;
  background: #fff;
  text-align: center;
  box-shadow: 0 3px 12px rgba(31, 20, 38, .04);
}

.home-page .home-benefits .feature-item::before {
  content: '✦';
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto 7px;
  border-radius: 50%;
  background: #fff0f3;
  color: var(--accent);
  font-size: 1rem;
}

.home-page .home-benefits .feature-item:nth-child(2)::before { content: '◈'; }
.home-page .home-benefits .feature-item:nth-child(3)::before { content: '⚡'; }
.home-page .home-benefits .feature-item:nth-child(4)::before { content: '▯'; }
.home-page .home-benefits .feature-item:nth-child(5)::before { content: '✣'; }

.home-page .home-benefits .feature-title {
  margin-bottom: 4px;
  font-size: .75rem;
  line-height: 1.2;
}

.home-page .home-benefits .feature-desc {
  font-size: .66rem;
  line-height: 1.35;
}

.home-page .format-band {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, 1fr);
  align-items: center;
  gap: 18px;
  max-width: 1132px;
  min-height: 116px;
  margin: 0 auto 10px;
  padding: 16px 22px;
  border-radius: 17px;
  background: #fff0f3;
}

.home-page .format-copy {
  padding-right: 12px;
  border-right: 1px solid #f1bdc8;
}

.home-page .format-copy h2 {
  margin: 0;
  font: 700 1.2rem/1.08 var(--font-display);
}

.home-page .format-copy p {
  margin: 5px 0 0;
  color: #5b4349;
  font-size: .72rem;
  line-height: 1.35;
}

.home-page .format-card {
  position: relative;
  display: grid;
  place-items: center;
  height: 76px;
  overflow: visible;
  border: 4px solid #fff;
  border-radius: 10px;
  background-size: cover;
  box-shadow: 0 3px 9px rgba(44, 27, 39, .12);
}

.home-page .format-video {
  background: linear-gradient(145deg, #c4d4eb, #67839b 52%, #294c5e);
}

.home-page .format-video::after {
  content: '';
  position: absolute;
  inset: 48% 0 0;
  background: linear-gradient(145deg, transparent 0 22%, #334d5d 23% 48%, transparent 49%), linear-gradient(215deg, transparent 0 32%, #496171 33% 55%, transparent 56%);
}

.home-page .format-image {
  background: radial-gradient(ellipse at 52% 42%, #f18eae 0 13%, #e45887 14% 26%, transparent 27%), linear-gradient(140deg, #c8d29b, #4d9465 68%, #357145);
}

.home-page .format-gif {
  background: radial-gradient(ellipse at 65% 48%, #c6aa8f, #896b58 60%, #58483e);
}

.home-page .format-gif::before {
  content: '';
  width: 46px;
  height: 34px;
  border-radius: 48% 48% 45% 45%;
  background: radial-gradient(circle at 30% 42%, #433e3d 0 2px, transparent 3px), radial-gradient(circle at 70% 42%, #433e3d 0 2px, transparent 3px), #ead9c6;
}

.home-page .format-card > b {
  position: absolute;
  z-index: 2;
  bottom: -11px;
  padding: 3px 13px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
}

.home-page .format-play,
.home-page .format-gif-mark {
  z-index: 1;
  color: white;
}

.home-page .format-play {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #1d263655;
  font-size: .65rem;
}

.home-page .format-gif-mark {
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--accent);
  font-size: .62rem;
  font-weight: 700;
}

.home-page .tools-section {
  padding-top: 22px;
}

.home-page .tools-section .section-header {
  margin-bottom: 14px;
}

.home-page .tools-grid {
  gap: 13px;
}

.home-page .tool-link-card {
  gap: 10px;
  padding: 15px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(31, 20, 38, .04);
}

.home-page .tool-link-title {
  font-size: .86rem;
}

.home-page .tool-link-desc {
  font-size: .74rem;
  line-height: 1.4;
}

.home-page #pinterest-download-guide {
  padding-top: 30px;
  padding-bottom: 30px;
  background: #fffafa;
}

.home-page #pinterest-download-guide .features-bento {
  gap: 13px;
}

.home-page #pinterest-download-guide .feature-item {
  padding: 18px;
}

.home-page #pinterest-download-guide .feature-title {
  font-size: .98rem;
}

.home-page #pinterest-download-guide .feature-desc {
  margin-bottom: 10px;
  font-size: .84rem;
}

@media (max-width: 900px) {
  .home-page .header-cta { display: none; }
  .home-page .steps-grid { gap: 9px; }
  .home-page .step-card { padding-inline: 10px; }
  .home-page .format-band { margin-inline: 22px; }
  .home-page .tool-link-card { padding: 13px; }
}

@media (max-width: 700px) {
  .home-page .site-header { height: 56px; }
  .home-page .header-inner { gap: 8px; }
  .home-page .primary-nav { display: none; }
  .home-page .header-actions { margin-left: auto; }
  .home-page .mobile-menu-btn { display: inline-flex; }
  .home-page .hero-section { padding-block: 30px 23px; }
  .home-page .hero-title { font-size: clamp(2.35rem, 9vw, 3.2rem); }
  .home-page .hero-subtitle { max-width: 520px; font-size: .88rem; }
  .home-page .form-meta-row { align-items: flex-start; flex-direction: column; }
  .home-page .section-band { padding-block: 23px; }
  .home-page .section-header { margin-bottom: 14px; }
  .home-page .section-title { font-size: 1.28rem; }
  .home-page .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .home-page .step-card { min-height: 125px; }
  .home-page .home-benefits .features-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .home-page .home-benefits .feature-item { padding: 13px 10px; }
  .home-page .home-benefits .feature-title { font-size: .82rem; }
  .home-page .home-benefits .feature-desc { font-size: .72rem; }
  .home-page .format-band { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 9px; margin: 0 16px 6px; padding: 15px; }
  .home-page .format-copy { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid #f1bdc8; padding: 0 0 9px; }
  .home-page .format-copy h2 br { display: none; }
  .home-page .format-card { height: 64px; }
  .home-page .tools-grid { grid-template-columns: 1fr; gap: 9px; }
  .home-page .tool-link-card { flex-direction: row; align-items: center; }
  .home-page #pinterest-download-guide .features-bento { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .home-page .container { padding-inline: 17px; }
  .home-page .hero-title { font-size: 2.2rem; }
  .home-page .input-shell { gap: 4px; padding-left: 10px; }
  .home-page .url-input { font-size: .68rem; }
  .home-page .btn-primary { padding-inline: 10px; }
  .home-page .tool-switcher { font-size: .62rem; }
}
