:root {
  --fcc-navy: #17365d;
  --fcc-blue: #285b8f;
  --fcc-cream: #fffaf0;
  --fcc-gold: #d5a43b;
  --fcc-text: #263445;
  --fcc-muted: #607080;
  --fcc-border: #d8dee6;
  --fcc-danger-bg: #fff4e2;
  --fcc-danger-border: #d5a43b;
}

.fcc-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 25, 45, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.fcc-guide-overlay[hidden] {
  display: none;
}

.fcc-guide-dialog {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(90vh, 900px);
  max-height: min(90dvh, 900px);
  overflow: hidden;
  color: var(--fcc-text);
  background: var(--fcc-cream);
  border: 2px solid rgba(213, 164, 59, 0.7);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.fcc-guide-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--fcc-navy),
    var(--fcc-blue)
  );
  border-bottom: 4px solid var(--fcc-gold);
}

.fcc-guide-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  padding: 4px;
  background: #fff;
  border-radius: 12px;
}

.fcc-guide-eyebrow {
  margin: 0 0 3px;
  color: #f3d891;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.fcc-guide-header h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.15;
}

.fcc-guide-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 28px 36px;
  scroll-behavior: smooth;
  scrollbar-color: var(--fcc-gold) #e9edf2;
}

.fcc-guide-content:focus-visible {
  outline: 3px solid var(--fcc-gold);
  outline-offset: -4px;
}

.fcc-guide-lead {
  margin-top: 0;
  color: var(--fcc-navy);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.6;
}

.fcc-guide-content section {
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--fcc-border);
}

.fcc-guide-content h2 {
  margin: 20px 0 8px;
  color: var(--fcc-navy);
  font-size: 1.15rem;
}

.fcc-guide-content p,
.fcc-guide-content li {
  line-height: 1.58;
}

.fcc-guide-content ul,
.fcc-guide-content ol {
  padding-left: 1.4rem;
}

.fcc-guide-content li + li {
  margin-top: 6px;
}

.fcc-guide-content code {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  overflow-wrap: anywhere;
  color: #14365b;
  background: #e9f1f8;
  border: 1px solid #c9d8e6;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.fcc-guide-safety {
  margin: 14px 0 4px;
  padding: 4px 16px 12px !important;
  background: var(--fcc-danger-bg);
  border: 1px solid var(--fcc-danger-border) !important;
  border-radius: 10px;
}

.fcc-guide-end {
  margin-top: 24px;
  padding: 14px;
  color: var(--fcc-navy);
  background: #eef4fa;
  border: 1px solid #c7d8e8;
  border-radius: 9px;
  font-weight: 750;
  text-align: center;
}

.fcc-guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid var(--fcc-border);
}

.fcc-guide-footer p {
  margin: 0;
  color: var(--fcc-muted);
  font-size: 0.9rem;
}

#fcc-guide-continue {
  flex: 0 0 auto;
  padding: 11px 18px;
  color: #fff;
  background: var(--fcc-navy);
  border: 2px solid var(--fcc-navy);
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

#fcc-guide-continue:hover:not(:disabled) {
  color: #172c47;
  background: var(--fcc-gold);
  border-color: var(--fcc-gold);
}

#fcc-guide-continue:focus-visible {
  outline: 3px solid var(--fcc-gold);
  outline-offset: 3px;
}

#fcc-guide-continue:disabled {
  color: #78838d;
  background: #e3e6e9;
  border-color: #d5d9dd;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .fcc-guide-overlay {
    padding: 0;
  }

  .fcc-guide-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .fcc-guide-header {
    padding: 14px 16px;
  }

  .fcc-guide-logo {
    width: 48px;
    height: 48px;
  }

  .fcc-guide-content {
    padding: 18px 18px 30px;
  }

  .fcc-guide-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px 16px;
  }

  #fcc-guide-continue {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fcc-guide-content {
    scroll-behavior: auto;
  }
}
