:not(:defined) {
  visibility: hidden;
}

/* Custom styling for file input to match Fluent UI look */
.upload-file-control {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
}

.upload-file-control .upload-input[type=file] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: auto;
  height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  cursor: pointer;
}

.upload-file-control .upload-file-name {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-file-control .upload-input[type=file]::file-selector-button {
  padding: 0.5rem 0.75rem;
  margin-right: 0.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent-color);
  color: #fff;
  font-weight: 600;
}

.upload-file-control .upload-input[type=file]:focus {
  outline: 2px solid rgba(15, 108, 189, 0.24);
  border-color: rgba(15, 108, 189, 0.4);
}

:root {
  color-scheme: light;
  --page-background: #f5f7fb;
  --surface-background: #ffffff;
  --surface-border: #d7dce5;
  --accent-color: #0f6cbd;
  --text-muted: #4f5b6b;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--page-background);
  color: #1f2937;
}

main,
section,
header,
footer,
nav {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-provider {
  min-height: 100vh;
  background: var(--page-background);
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(215, 220, 229, 0.9);
}

.site-header-content,
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f6cbd, #115ea3);
  color: #fff;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
}

.site-nav {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(15, 108, 189, 0.08);
  border-color: rgba(15, 108, 189, 0.16);
  color: var(--accent-color);
  outline: none;
}

.page-content {
  padding: 2rem 0 3rem;
}

.page-frame {
  display: grid;
  gap: 1.5rem;
}

.result-hero {
  text-align: center;
  padding: 1.25rem 0;
  margin-bottom: 0.5rem;
}

.result-actions-hero {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.download-primary {
  display: inline-block;
  /* full width on small screens, but capped to 420px on larger */
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  margin: 0.25rem auto 0.6rem;
  text-align: center;
  padding: 0.7rem 1rem;
  background: var(--accent-color);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}

@media (min-width: 720px) {
  .download-primary { width: min(420px, 100%); }
}

.next-actions {
  margin-top: 0.5rem;
  text-align: center;
  padding-bottom: 0.5rem;
}

.next-actions h3 {
  margin: 0 0 0.5rem 0;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* spacing for the result content cards */
.content-grid {
  margin-top: 1rem;
}

.result-card {
  margin-top: 0.75rem;
}

.site-footer {
  border-top: 1px solid rgba(215, 220, 229, 0.9);
  color: var(--text-muted);
}

.footer-meta {
  display: grid;
  gap: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  gap: 1rem;
  padding: 2rem 0 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.hero-copy {
  display: grid;
  gap: 1rem;
}

.hero-panel {
  align-self: stretch;
}

.eyebrow {
  width: fit-content;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 108, 189, 0.1);
  color: var(--accent-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.hero-text,
.section-heading p,
.format-card p,
.upload-card p,
.format-meta {
  color: var(--text-muted);
}

/* Make product link in hero text clearly clickable and match Fluent accent */
.hero-text a {
  color: var(--accent-color);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 120ms ease, color 120ms ease;
}
.hero-text a:hover,
.hero-text a:focus {
  color: var(--accent-color);
  border-bottom-color: rgba(15, 108, 189, 0.35);
  outline: none;
}

.hero-actions,
.upload-shell,
.formats-section,
.page-section {
  margin-top: 1.5rem;
}

/* Make hero action buttons consistently spaced and responsive */
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.hero-actions .hero-link {
  /* ensure buttons can shrink and wrap nicely */
  display: inline-flex;
}

@media (max-width: 480px) {
  .hero-actions .hero-link {
    width: 100%;
    justify-content: center;
  }
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--accent-color);
  font-weight: 600;
  background: rgba(15, 108, 189, 0.08);
}

.hero-link.secondary {
  background: rgba(15, 23, 42, 0.04);
  color: #1f2937;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.catalog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.benefit-card {
  min-height: 100%;
}

.seo-card {
  min-height: 100%;
}

.step-list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.75rem;
  color: var(--text-muted);
}

.upload-card,
.format-card,
.info-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface-background);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.upload-copy {
  display: grid;
  gap: 0.5rem;
}

.upload-form {
  display: grid;
  gap: 1rem;
}

.upload-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-field {
  display: grid;
  gap: 0.5rem;
}

.upload-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.upload-input,
.upload-select {
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.upload-input:focus,
.upload-select:focus {
  outline: 2px solid rgba(15, 108, 189, 0.24);
  border-color: rgba(15, 108, 189, 0.4);
}

.upload-message {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-weight: 500;
}

.upload-message.error {
  background: rgba(196, 49, 75, 0.12);
  color: #8f1239;
}

.upload-submit {
  align-self: center;
}

.upload-progress {
  display: none;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.upload-form.is-submitting .upload-progress {
  display: inline-flex;
}

.upload-dropzone {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 2rem;
  border: 2px dashed #b6c3d1;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(241,245,249,0.95));
  text-align: center;
}

/* Make dropzone behave as primary file chooser */
.upload-dropzone {
  cursor: pointer;
}
.upload-dropzone:focus,
.upload-dropzone.is-dragover {
  outline: 2px solid rgba(15, 108, 189, 0.24);
  border-color: rgba(15, 108, 189, 0.4);
}
.upload-dropzone-content {
  display: grid;
  gap: 0.5rem;
  align-items: center;
  justify-items: center;
}

/* overlay shown while processing inside dropzone */
.upload-drop-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.92));
  border-radius: 18px;
}
.upload-drop-overlay.is-active {
  display: flex;
}
.upload-drop-overlay-inner {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.08);
}
.upload-drop-overlay-text {
  font-weight: 600;
  color: var(--text-muted);
}

.upload-dropzone { position: relative; }

.upload-dropzone.is-busy .upload-dropzone-content {
  opacity: 0.2;
}

.upload-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.upload-actions .full-width {
  width: 100%;
  display: inline-flex;
  justify-content: center;
}

/* Footer product link styling to make it clearly clickable */
.site-footer .footer-meta a {
  color: var(--accent-color);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 120ms ease, color 120ms ease;
}
.site-footer .footer-meta a:hover,
.site-footer .footer-meta a:focus {
  border-bottom-color: rgba(15, 108, 189, 0.35);
  outline: none;
}

.upload-drop-icon svg {
  color: var(--accent-color);
}

.upload-drop-main {
  font-weight: 700;
  font-size: 1.05rem;
}

.upload-drop-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.upload-file-name {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* When overlay is active, dim the dropzone content behind it */
.upload-dropzone .upload-dropzone-content {
  transition: opacity 160ms ease;
}
.upload-drop-overlay.is-active + .upload-dropzone-content,
.upload-dropzone .upload-drop-overlay.is-active ~ .upload-dropzone-content {
  opacity: 0.18;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2,
.format-card h3,
.upload-card h2,
.info-card h2,
.page-section h1,
.page-section h2 {
  margin: 0;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.format-link {
  display: block;
}

.format-card-header,
.format-hero-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.format-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.85rem;
  font-weight: 600;
}

.format-pill.accent {
  background: rgba(15, 108, 189, 0.1);
  color: var(--accent-color);
}

.format-arrow {
  color: var(--text-muted);
  font-weight: 700;
}

.format-meta {
  font-size: 0.9rem;
}

/* Utility: visually-hidden but accessible to screen readers and crawlers */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.format-list {
  display: grid;
  gap: 1rem;
}

.category-list {
  margin-top: 1.5rem;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid rgba(15, 108, 189, 0.16);
  border-radius: 999px;
  background: rgba(15, 108, 189, 0.08);
  color: var(--accent-color);
  font-weight: 600;
}

.category-section {
  scroll-margin-top: 6rem;
}

.faq-section {
  display: grid;
  gap: 1rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  padding: 1rem 1.25rem;
  background: var(--surface-background);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .site-header-content,
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-grid,
  .benefits-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}
