html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.fc-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #eef2f9 0%, #e8ecf4 40%, #f4f6fb 100%);
  color: #1c2434;
}

.fc-header {
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fc-brand {
  color: #0f172a !important;
  letter-spacing: -0.02em;
}

.fc-brand-logo {
  flex-shrink: 0;
  height: 3.65rem;
  width: auto;
  max-width: min(220px, 58vw);
  object-fit: contain;
  display: block;
}

.fc-header .nav-link {
  color: #334155 !important;
}

.fc-header .nav-link:hover {
  color: #0f172a !important;
}

.fc-main {
  flex: 1;
  padding-top: 2.25rem;
  padding-bottom: 3.5rem;
}

.fc-footer {
  margin-top: auto;
  padding: 1.25rem 0 2rem;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.fc-footer__grid {
  padding-top: 0.25rem;
}

.fc-footer__heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-bottom: 0.85rem;
}

.fc-footer__links li {
  margin-bottom: 0.45rem;
}

.fc-footer__links a {
  color: #334155;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.fc-footer__links a:hover {
  color: #0f172a;
  text-decoration: underline;
}

.fc-footer__credit {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  text-align: center;
  color: #64748b;
}

.fc-footer__credit-link {
  color: #334155;
  font-weight: 600;
  text-decoration: none;
}

.fc-footer__credit-link:hover {
  color: #0f172a;
  text-decoration: underline;
}

.fc-content-page h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #0f172a;
  margin-bottom: 1rem;
}

.fc-content-page h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
}

.fc-content-page p,
.fc-content-page li {
  color: #475569;
  line-height: 1.65;
}

.fc-content-page ul {
  padding-left: 1.25rem;
}

.fc-hero {
  margin-bottom: 2.25rem;
  text-align: center;
}

.fc-hero--compact {
  margin-bottom: 1.75rem;
  text-align: left;
}

.fc-hero__title {
  font-weight: 700;
  letter-spacing: -0.035em;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  color: #0f172a;
  margin-bottom: 0.85rem;
}

.fc-hero--compact .fc-hero__title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.fc-convert-desc {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.65;
}

.fc-lead {
  max-width: 40rem;
  margin: 0 auto;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.65;
}

.fc-muted {
  color: #64748b;
}

.fc-hint {
  color: #94a3b8;
  font-size: 0.95rem;
}

.fc-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #64748b;
  margin: 2.5rem 0 1rem;
}

.fc-section-title:first-of-type {
  margin-top: 0.5rem;
}

.fc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 540px) {
  .fc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
}

@media (min-width: 1100px) {
  .fc-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.fc-tile {
  --tile-bg: #e8f4ff;
  --tile-accent: #1565c0;
  --tile-border: #bfdbfe;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 260px;
  padding: 1.35rem 1.1rem 1.15rem;
  border-radius: 18px;
  text-decoration: none;
  color: var(--tile-accent);
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.fc-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  border-color: color-mix(in srgb, var(--tile-accent) 28%, var(--tile-border));
}

.fc-tile--blue {
  --tile-bg: #e3f2fd;
  --tile-accent: #0d47a1;
  --tile-border: #bbdefb;
}

.fc-tile--purple {
  --tile-bg: #f3e5f5;
  --tile-accent: #7b1fa2;
  --tile-border: #e1bee7;
}

.fc-tile--green {
  --tile-bg: #e8f5e9;
  --tile-accent: #2e7d32;
  --tile-border: #c8e6c9;
}

.fc-tile--orange {
  --tile-bg: #fff3e0;
  --tile-accent: #e65100;
  --tile-border: #ffe0b2;
}

.fc-tile--teal {
  --tile-bg: #e0f2f1;
  --tile-accent: #00695c;
  --tile-border: #b2dfdb;
}

.fc-tile__icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.fc-tile__svg {
  display: block;
}

.fc-tile__icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.fc-tile__pair-arrow {
  font-size: 1.05rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--tile-accent) 40%, #64748b);
  line-height: 1;
  user-select: none;
  padding: 0 0.1rem;
}

.fc-file-badge {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.1));
}

.fc-tile__kicker {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.88;
  margin-bottom: 0.2rem;
}

.fc-tile__title {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.3;
  margin-bottom: 0.45rem;
}

.fc-tile__desc {
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  color: color-mix(in srgb, var(--tile-accent) 32%, #64748b);
  margin-bottom: 0.55rem;
  max-width: 22rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fc-tile__meta {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--tile-accent) 72%, #64748b);
  margin-bottom: 0.65rem;
}

.fc-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 1.5rem 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.fc-upload-form .form-label {
  color: #334155;
}

.fc-upload-form .form-control {
  border-radius: 12px;
  border-color: #cbd5e1;
  padding: 0.65rem 0.85rem;
}

.fc-upload-form .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2);
}

.fc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.fc-body .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 12px;
  font-weight: 600;
}

.fc-body .btn-primary:hover {
  filter: brightness(1.04);
}

.fc-body .btn-outline-secondary {
  color: #475569;
  border-color: #cbd5e1;
  border-radius: 12px;
  font-weight: 600;
}

.fc-body .btn-outline-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.fc-body .alert-danger {
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.fc-convert-head__icons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.fc-convert-head__arrow {
  font-size: 1.25rem;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1;
}

.fc-busy {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.fc-busy--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fc-no-scroll {
  overflow: hidden;
}

.fc-busy__panel {
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem 1.65rem 1.4rem;
  max-width: 22rem;
  margin: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.fc-busy__title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.fc-busy__text {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.fc-busy__progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.fc-file-field {
  margin-bottom: 0.25rem;
}

.fc-global-upload-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  z-index: 12000;
  overflow: hidden;
  background: #cbd5e1;
}

.fc-global-upload-track[hidden] {
  display: none !important;
}

.fc-global-upload-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width 0.1s ease-out;
}

.fc-upload-progress-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  margin-bottom: 0.55rem;
}

.fc-upload-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width 0.08s ease-out;
}

.fc-upload-progress-track.fc-upload-progress-track--indeterminate .fc-upload-progress-bar {
  width: 42%;
  transition: none;
  animation: fc-upload-indeterminate 1.05s ease-in-out infinite;
}

@keyframes fc-upload-indeterminate {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(340%);
  }
}

.fc-convert-preview-wrap {
  /* Break out of Bootstrap .container (e.g. 720px at md) so previews can exceed ~700px width. */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 2rem;
  padding: 1.35rem 1.25rem 1.5rem;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.fc-convert-preview {
  margin: 0;
}

/* Hide the whole preview card until a file is chosen (inner #fc-convert-preview has [hidden]). */
.fc-convert-preview-wrap:has(#fc-convert-preview[hidden]) {
  display: none;
}

.fc-convert-preview[hidden] {
  display: none !important;
}

.fc-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  justify-content: center;
}

.fc-preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

/* PDF iframe: avoid min(100%, …) — percentage resolves against a shrink-wrapped flex item and stays tiny. */
.fc-preview-item:has(> .fc-preview-pdf) {
  width: min(1400px, 96vw);
  max-width: 100%;
}

.fc-preview-thumb {
  max-width: min(1800px, 96vw);
  max-height: min(1120px, 75vh);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  background: #fff;
}

.fc-preview-pdf {
  display: block;
  width: 100%;
  height: min(2400px, 85vh);
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #f8fafc;
}

.fc-preview-caption {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #475569;
  max-width: min(1800px, 96vw);
  text-align: center;
  word-break: break-word;
}

.fc-preview-file {
  font-size: 1rem;
  line-height: 1.5;
  color: #334155;
  padding: 0.65rem 1rem;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
