:root {
  --gs-red: #7f1416;
  --gs-red-dark: #551c18;
  --gs-red-soft: #b31e23;
  --gs-charcoal: #313736;
  --gs-ink: #1f2524;
  --gs-link: #00499c;
  --gs-link-hover: #00397a;
  --gs-bg: #f3f4f5;
  --gs-panel: #ffffff;
  --gs-border: #d4d9dc;
  --gs-muted: #5a656c;
  --gs-shadow: 0 8px 20px rgba(15, 25, 32, 0.08);
}

html {
  font-size: 16px;
  min-height: 100%;
  height: 100%;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
}
body {
  min-height: 100vh;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--gs-ink);
  background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f4 55%, #eceff1 100%);
  font-family: "Segoe UI", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--gs-link);
}

a:hover,
a:focus {
  color: var(--gs-link-hover);
}

.site-header {
  flex-shrink: 0;
  background-color: white;
}

.mainContainer {
  flex: 1 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.navbar-checkered {
  position: relative;
  background-image: url('/img/header-checker.png');
  border-bottom: 3px solid var(--gs-charcoal);
}

.navbar-checkered::before {
  content: "";
  position: absolute;
  inset: 0;

}

.gs-header-brand .container {
  position: relative;
  z-index: 1;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gs-logo-link {
  margin-right: 0;
  padding: 0;
  line-height: 0;
}

.gs-logo-full {
  max-height: 3rem;
  width: auto;
}

.gs-logo-icon {
  height: 56px;
  width: auto;
}

.gs-header-copy {
  border-left: 2px solid #1b1f20;
  padding-left: 1rem;
  line-height: 1.25;
}

.gs-header-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
}

.gs-header-subtitle {
  margin: 0;
  font-size: 0.98rem;
  color: #222;
}

.bg-red {
  background-color: var(--gs-red);
}

.gs-site-nav {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.gs-site-nav .navbar-toggler {
  border: none;
  box-shadow: none;
}

.gs-site-nav .nav-link {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
  font-weight: 700;
  margin-right: 1.4rem;
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
}

.gs-site-nav .nav-link:hover,
.gs-site-nav .nav-link:focus {
  color: #fff;
  border-bottom-color: #fff;
}

.gs-page-title {
  margin: 0 0 1rem;
  color: var(--gs-red);
  font-size: 1.9rem;
  font-weight: 700;
}

.gs-section-title {
  margin: 0 0 0.75rem;
  color: var(--gs-red);
  font-size: 1.3rem;
  font-weight: 700;
}

.text-gs-muted {
  color: var(--gs-muted);
}

.gs-panel {
  background: var(--gs-panel);
  border: 1px solid var(--gs-border);
  border-radius: 0.85rem;
  box-shadow: var(--gs-shadow);
  padding: 1.5rem;
}

.gs-panel + .gs-panel {
  margin-top: 1rem;
}

.gs-hero {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.gs-kv-table {
  margin-bottom: 0;
}

.gs-kv-table > tbody > tr > th {
  width: 220px;
  color: var(--gs-charcoal);
  font-weight: 700;
}

.gs-kv-table > tbody > tr > td {
  color: #1f2524;
}

.btn {
  border-radius: 0.45rem;
  font-weight: 700;
  padding: 0.52rem 1rem;
}

.btn:focus,
.btn:active:focus,
.form-control:focus,
.form-check-input:focus,
.btn-link.nav-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(127, 20, 22, 0.2);
}

.btn.btn-gs-primary,
.btn.btn-primary {
  color: #fff !important;
  border-color: #000;
  background-color: var(--gs-red);
  text-decoration: none !important;
}

.btn.btn-gs-primary:hover,
.btn.btn-gs-primary:focus-visible,
.btn.btn-primary:hover,
.btn.btn-primary:focus-visible {
  color: #fff !important;
  border-color: #111;
  background-color: var(--gs-red-dark);
}

.btn.btn-gs-secondary,
.btn.btn-secondary {
  color: #fff !important;
  border-color: #000;
  background-color: #56646b;
  text-decoration: none !important;
}

.btn.btn-gs-secondary:hover,
.btn.btn-gs-secondary:focus-visible,
.btn.btn-secondary:hover,
.btn.btn-secondary:focus-visible {
  color: #fff !important;
  border-color: #111;
  background-color: #44545c;
}

.btn-outline-primary {
  color: var(--gs-red);
  border-color: var(--gs-red);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  color: #fff;
  border-color: var(--gs-red-dark);
  background: var(--gs-red-dark);
}

.btn-outline-danger {
  color: #8a1b1d;
  border-color: #8a1b1d;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
  color: #fff;
  background: #8a1b1d;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.55;
}

.footer {
  flex-shrink: 0;
  margin-top: auto;
  color: #fff;
  padding: 1.1rem 0 1.3rem;
  line-height: 1.2;
  border-top: 2px solid #5c0f10;
}

.footer-h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 700;
}

.footer-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  padding-bottom: 0.2rem;
}

.footer-link:hover,
.footer-link:focus {
  border-bottom-color: #fff;
}

.alert {
  border-radius: 0.55rem;
}

.scan-panel .tab {
  margin-top: 1rem;
}

.scan-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem;
  border: 1px solid var(--gs-border);
  border-radius: 0.65rem;
  background: #f8f9fa;
}

.scan-toolbar-label {
  display: inline-block;
  font-weight: 700;
  color: var(--gs-charcoal);
  margin-right: 0.4rem;
}

.scan-source-name {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
  background: #eef1f3;
  border: 1px solid #d6dce0;
  min-width: 7rem;
}

.scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.scan-state-panel {
  text-align: center;
  padding: 1.1rem;
  border: 1px solid var(--gs-border);
  border-radius: 0.65rem;
  background: #f8fafb;
}

#PProgress {
  margin-top: 0.95rem;
  margin-bottom: 0;
  color: var(--gs-link);
}

.scan-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.scan-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.scan-pages-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.scan-page-wrap {
  display: inline-flex;
}

.scan-page-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid #ced6db;
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 25, 32, 0.07);
  padding: 0.75rem;
}

.scan-page-card.saved {
  border-color: #4d9156;
}

.scan-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.scan-page-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.scan-page-action {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.scan-page-thumb-link {
  display: inline-flex;
}

.scan-page-thumb {
  border: 1px solid #d4dade;
  border-radius: 0.4rem;
  max-width: 220px;
  max-height: 320px;
  height: auto;
  width: auto;
}

.scan-thumb {
  cursor: zoom-in;
}

.scan-page-status {
  color: #2f7d3a;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
}

.scan-warning-block {
  border: 1px solid var(--gs-border);
  border-radius: 0.65rem;
  background: #f9fafb;
  padding: 1rem;
}

.scan-warning-list {
  margin: 0;
  padding-left: 1.2rem;
}

.scan-warning-list li {
  margin-bottom: 0.3rem;
}

.scan-warning-list li:last-child {
  margin-bottom: 0;
}

.scan-warning-actions {
  margin-top: 0.85rem;
  text-align: right;
}

#scanPreview {
  position: fixed;
  display: none;
  z-index: 1050;
  padding: 8px;
  background: #fff;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  width: 360px;
  height: 480px;
  max-width: 60vw;
  max-height: 60vh;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

.validation-summary-flash {
  background-color: #f8d7da;
  animation-name: validation-summary-flash;
  animation-duration: 2s;
}

@keyframes validation-summary-flash {
  from {
    background-color: #fff;
  }
  to {
    background-color: #f8d7da;
  }
}

.medium-border {
  border-width: 2px !important;
}

@media (max-width: 991.98px) {
  .gs-header-brand .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .gs-logo-full {
    height: 54px;
  }

  .gs-header-title {
    font-size: 1.25rem;
  }

  .gs-header-subtitle {
    font-size: 0.9rem;
  }

  .gs-site-nav .navbar-collapse {
    padding-top: 0.55rem;
    padding-bottom: 0.4rem;
  }

  .gs-site-nav .nav-link {
    margin-right: 0;
    display: inline-block;
  }

  .scan-page-thumb {
    max-width: 190px;
    max-height: 275px;
  }
}

@media (min-width: 768px) {
  .mainContainer {
    max-width: 980px;
  }
}

@media (min-width: 992px) {
  .mainContainer {
    max-width: 1180px;
  }
}

@media (min-width: 1200px) {
  .mainContainer {
    max-width: 1180px;
  }
}





@media (max-width: 767.98px) {
  .mainContainer {
    padding-top: 1rem;
    padding-bottom: 1.35rem;
    max-width: 756px;
  }

  .gs-panel {
    padding: 1rem;
  }

  .gs-header-copy {
    border-left: none;
    padding-left: 0;
  }

  .gs-header-subtitle {
    font-size: 0.83rem;
  }

  .gs-page-title {
    font-size: 1.55rem;
  }

  /*
  .scan-results-actions,
  .scan-actions {
    width: 100%;
  }

  .scan-results-actions > *,
  .scan-actions > * {
    flex: 1 1 auto;
  }
  
   */

  .scan-warning-actions {
    text-align: left;
  }

  .footer .text-md-end {
    text-align: left !important;
  }
}

/* Extract necessary Tailwind properties to variables */
:root {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-600: #2563eb;
  --blue-800: #1e40af;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --white: #ffffff;
}

/* Essential Reset 
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
  margin: 0;
  padding: 0;
}
*/

/* Layout & Display */
.fs-flex { display: flex; }
.fs-inline-flex { display: inline-flex; }
.fs-grid { display: grid; }
.fs-flex-col { flex-direction: column; }
.fs-items-center { align-items: center; }
.fs-items-start { align-items: flex-start; }
.fs-justify-center { justify-content: center; }
.fs-justify-between { justify-content: space-between; }
.fs-flex-grow { flex-grow: 1; }
.fs-flex-shrink-0 { flex-shrink: 0; }
.fs-relative { position: relative; }
.fs-absolute { position: absolute; }
.fs-overflow-hidden { overflow: hidden; }
.fs-overflow-visible { overflow: visible; }
.fs-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Sizing - Increased by 10% from the reduced state */
.fs-w-full { width: 100%; }
.fs-w-5 { width: 16.5px; }
.fs-w-8 { width: 26.4px; }
.fs-h-5 { height: 16.5px; }
.fs-h-8 { height: 26.4px; }
.fs-max-w-sm { max-width: 317px; }
.fs-max-w-7xl { max-width: 1056px; }
.fs-min-h-screen { min-height: 100vh; }
.fs-min-h-300 { min-height: 247.5px; }

/* Spacing - Increased by 10% */
.fs-p-4 { padding: 13.2px; }
.fs-p-5 { padding: 16.5px; }
.fs-p-6 { padding: 19.8px; }
.fs-px-4 { padding-left: 13.2px; padding-right: 13.2px; }
.fs-py-2 { padding-top: 6.6px; padding-bottom: 6.6px; }
.fs-mt-2 { margin-top: 6.6px; }
.fs-mt-8 { margin-top: 26.4px; }
.fs-mb-0 { margin-bottom: 0; }
.fs-mb-2 { margin-bottom: 6.6px; }
.fs-mb-3 { margin-bottom: 9.9px; }
.fs-mb-6 { margin-bottom: 19.8px; }
.fs-mb-8 { margin-bottom: 26.4px; }
.fs-mr-2 { margin-right: 6.6px; }
.fs-gap-4 { gap: 13.2px; }
.fs-gap-6 { gap: 19.8px; }
.fs-top-6 { top: 19.8px; }

/* Typography - Increased by 10% */
.fs-font-sans { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.fs-text-sm { font-size: 11.5px; line-height: 16.5px; }
.fs-text-base { font-size: 13.2px; line-height: 19.8px; }
.fs-text-lg { font-size: 14.8px; line-height: 23.1px; }
.fs-text-2xl { font-size: 19.8px; line-height: 26.4px; }
.fs-text-3xl { font-size: 24.7px; line-height: 29.7px; }
.fs-font-medium { font-weight: 500; }
.fs-font-semibold { font-weight: 600; }
.fs-font-bold { font-weight: 700; }
.fs-font-extrabold { font-weight: 800; }
.fs-uppercase { text-transform: uppercase; }
.fs-tracking-wide { letter-spacing: 0.025em; }
.fs-text-center { text-align: center; }
.fs-text-left { text-align: left; }
.fs-leading-tight { line-height: 1.25; }
.fs-leading-relaxed { line-height: 1.625; }
.fs-whitespace-nowrap { white-space: nowrap; }

/* Colors */
.fs-bg-slate-50 { background-color: var(--slate-50); }
.fs-bg-slate-100 { background-color: var(--slate-100); }
.fs-bg-slate-200 { background-color: var(--slate-200); }
.fs-bg-white { background-color: var(--white); }
.fs-bg-blue-50 { background-color: var(--blue-50); }
.fs-bg-blue-100 { background-color: var(--blue-100); }
.fs-bg-blue-200 { background-color: var(--blue-200); }
.fs-bg-red-50 { background-color: var(--red-50); }
.fs-text-slate-600 { color: var(--slate-600); }
.fs-text-slate-700 { color: var(--slate-700); }
.fs-text-slate-800 { color: var(--slate-800); }
.fs-text-blue-600 { color: var(--blue-600); }
.fs-text-blue-800 { color: var(--blue-800); }
.fs-text-red-600 { color: var(--red-600); }
.fs-text-red-700 { color: var(--red-700); }

/* Borders & Radius - Increased by 10% */
.fs-border { border-width: 1px; }
.fs-border-b { border-bottom-width: 1px; }
.fs-border-r { border-right-width: 1px; }
.fs-border-slate-100 { border-color: var(--slate-100); }
.fs-border-slate-200 { border-color: var(--slate-200); }
.fs-border-blue-100 { border-color: var(--blue-100); }
.fs-border-red-200 { border-color: var(--red-200); }
.fs-rounded-lg { border-radius: 6.6px; }
.fs-rounded-xl { border-radius: 9.9px; }
.fs-rounded-2xl { border-radius: 13.2px; }
.fs-rounded-full { border-radius: 9999px; }

/* Shadows */
.fs-shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.fs-shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }
.fs-shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Responsive Breakpoints */
@media (min-width: 640px) {
  .fs-sm-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .fs-md-flex-row { flex-direction: row; }
  .fs-md-w-30p { width: 30%; }
  .fs-md-w-70p { width: 70%; }
  .fs-md-p-8 { padding: 26.4px; }
  .fs-md-border-b-0 { border-bottom-width: 0; }
  .fs-md-border-r { border-right-width: 1px; }
  .fs-md-text-3xl { font-size: 24.7px; line-height: 29.7px; }
}
@media (min-width: 1024px) {
  .fs-lg-flex-row { flex-direction: row; }
}

/* Custom animations for the SVG to make the loading process visual */
@keyframes feedPaper {
  0% { transform: translateY(-30px) scale(0.95); opacity: 0; }
  15% { transform: translateY(-15px) scale(1); opacity: 1; }
  70% { transform: translateY(15px) scale(1); opacity: 1; }
  100% { transform: translateY(40px) scale(0.95); opacity: 0; }
}

@keyframes pulseArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.fs-animate-feed {
  animation: feedPaper 3.5s ease-in-out infinite;
}

.fs-animate-arrow {
  animation: pulseArrow 1.5s ease-in-out infinite;
}

.fs-glass-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}
