/* ==========================================================================
   Berkshire Meeting Guide - Complete Stylesheet
   Hand-crafted semantic CSS with custom properties
   ========================================================================== */

/* ==========================================================================
   1. Design Tokens (Custom Properties)
   ========================================================================== */

:root {
  /* Colors - Navy palette */
  --navy: #121820;
  --navy-light: #1E2A3A;
  --navy-dark: #0D1B2A;

  /* Colors - Gold palette */
  --gold: #C9A84C;
  --gold-light: #D4B86A;
  --gold-dark: #A8893A;
  --gold-bg: #FAF5E8;

  /* Colors - Neutral palette */
  --cream: #FAF7F2;
  --cream-dark: #F0ECE2;
  --burgundy: #6B1D34;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Merriweather', Georgia, serif;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: #333333;
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* ==========================================================================
   3. Utility Classes
   ========================================================================== */

.text-balance {
  text-wrap: balance;
}

.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;
}

/* ==========================================================================
   4. Container
   ========================================================================== */

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ==========================================================================
   5. Header (Fixed, z-50)
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(13, 27, 42, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(30, 42, 58, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.header-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}

.header-logo:hover {
  color: var(--gold);
}

.header-byline {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.875rem;
  color: white;
  margin-left: 0.5rem;
}

.header-byline em {
  font-style: italic;
  color: var(--gold);
}

@media (max-width: 639px) {
  .header-byline {
    display: none;
  }
}

/* Desktop nav - hidden by default, shown at md */
.header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.header-nav-link {
  color: rgba(240, 236, 226, 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: color 0.2s;
}

.header-nav-link:hover {
  color: white;
}

.btn-download {
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-out;
}

.btn-download:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Hamburger - shown below md */
.hamburger {
  display: none;
  color: white;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Mobile dropdown menu */
.mobile-dropdown {
  display: none;
  border-top: 1px solid rgba(30, 42, 58, 0.3);
  padding-bottom: 1rem;
}

.mobile-dropdown.open {
  display: block;
}

.mobile-dropdown a,
.mobile-dropdown button {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.mobile-dropdown a {
  color: rgba(240, 236, 226, 0.7);
  transition: color 0.2s;
}

.mobile-dropdown a:hover {
  color: white;
}

.mobile-dropdown button {
  color: var(--gold);
  transition: color 0.2s;
}

.mobile-dropdown button:hover {
  color: var(--gold-light);
}

/* Header responsive breakpoints */
@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .mobile-dropdown {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hamburger {
    display: block;
  }
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */

.hero {
  background: linear-gradient(to bottom, var(--navy), var(--navy-dark));
  padding: 9rem 0 7rem;
}

.hero-content {
  text-align: center;
}

@media (min-width: 1024px) {
  .hero .container {
    display: grid;
    grid-template-columns: 1fr 328px;
    gap: 2rem;
    align-items: start;
  }

  .hero-content {
    padding-left: clamp(0px, calc(100vw - 80rem), 328px);
  }
}

.badge-gold {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-wrap: balance;
  color: white;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3rem;
    line-height: 1.2;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.75rem;
    line-height: 1.15;
  }
}

.hero-content p {
  font-size: 1.25rem;
  color: rgba(240, 236, 226, 0.8);
  max-width: 42rem;
  margin: 0 auto 3rem;
  line-height: 1.625;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease-out;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease-out;
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--navy-dark);
  transform: translateY(-2px);
}

.hero-free {
  color: rgba(240, 236, 226, 0.7);
  font-size: 0.875rem;
  margin-top: 1.5rem;
  letter-spacing: 0.025em;
}

/* ==========================================================================
   7. What's Inside / TOC Section
   ========================================================================== */

.toc-section {
  padding: 5rem 0;
  background: var(--cream);
}

.section-heading h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .section-heading h2 {
    font-size: 2.25rem;
  }
}

.section-heading-bar {
  width: 4rem;
  height: 2px;
  background: var(--gold);
  margin-top: 1rem;
}

.toc-desc {
  color: rgba(18, 24, 32, 0.5);
  font-size: 1.125rem;
  max-width: 42rem;
  margin-top: 1rem;
}

.toc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .toc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   8. Cards
   ========================================================================== */

.card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s;
  display: block;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.card-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: var(--gold-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  color: var(--gold);
  width: 1.5rem;
  height: 1.5rem;
}

.card-badge {
  position: absolute;
  top: -0.25rem;
  left: -0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: var(--gold);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

.card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--navy);
}

.card p {
  color: rgba(18, 24, 32, 0.5);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ==========================================================================
   8b. PDF CTA Section
   ========================================================================== */

.pdf-cta-section {
  padding: 3rem 0;
  background: var(--cream);
}

.pdf-cta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  background: var(--navy);
  border-radius: 0.75rem;
  padding: 2.5rem 3rem;
  box-shadow: 0 4px 24px rgba(26, 31, 61, 0.12);
}

.pdf-cta-content h3 {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.58rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pdf-cta-content p {
  color: rgba(240, 236, 226, 0.7);
  font-size: 1.172rem;
  line-height: 1.6;
  margin: 0;
}

.pdf-cta-card .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  padding: 0.9375rem 2.5rem;
}

@media (max-width: 639px) {
  .pdf-cta-card {
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .hide-mobile {
    display: none;
  }
}

/* ==========================================================================
   9. Key Details Card
   ========================================================================== */

.key-details-section {
  padding: 5rem 0;
  background: var(--cream-dark);
}

.key-details-card {
  background: var(--cream);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  border: 2px solid rgba(201, 168, 76, 0.2);
  text-align: center;
  max-width: 42rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .key-details-card {
    padding: 3rem;
  }
}

.key-details-label {
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.key-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0;
}

.key-detail svg {
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.key-detail .label {
  color: rgba(18, 24, 32, 0.5);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.key-detail .value {
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.key-detail-divider {
  border-bottom: 1px solid var(--cream-dark);
}

/* ==========================================================================
   10. Notable Events Panel (Fixed Right Sidebar)
   ========================================================================== */

/* Mobile: full-width block, breaks out of container padding */
.notable-events-panel {
  width: auto;
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 1.5rem 1rem;
  background: var(--navy-dark);
}

@media (min-width: 640px) {
  .notable-events-panel {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 1.5rem;
  }
}

/* Desktop: sticky sidebar within hero grid */
@media (min-width: 1024px) {
  .notable-events-panel {
    position: sticky;
    top: 5rem;
    align-self: start;
    margin: 0;
    padding: 0;
    background: transparent;
  }
}

.notable-events-inner {
  background: var(--navy-dark);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .notable-events-inner {
    border-radius: 0.75rem 0 0 0.75rem;
  }
}

.notable-events-header {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid rgba(240, 236, 226, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notable-events-header svg {
  color: var(--gold);
}

.notable-events-header h3 {
  color: rgba(240, 236, 226, 0.6);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
}

.notable-events-body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.event-card {
  border-left: 2px solid var(--gold);
  background: rgba(240, 236, 226, 0.04);
  border-radius: 0 0.375rem 0.375rem 0;
  padding: 0.5rem 0.75rem;
  transition: background 0.2s;
}

.event-card:hover {
  background: rgba(240, 236, 226, 0.08);
}

.event-card-title {
  color: white;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.event-card-datetime {
  color: rgba(240, 236, 226, 0.55);
  font-size: 0.75rem;
  margin-top: 0.1875rem;
  letter-spacing: 0.01em;
}

.event-card-location {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: rgba(240, 236, 226, 0.55);
  margin-top: 0.125rem;
}

.event-card-location svg {
  color: rgba(240, 236, 226, 0.4);
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

.event-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  margin-top: 0.375rem;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

/* Floating state: panel detaches from hero grid and becomes fixed */
@media (min-width: 1024px) {
  .notable-events-panel.is-floating {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    top: auto;
    z-index: 40;
    width: 260px;
    margin: 0;
    padding: 0;
    background: transparent;
    animation: panel-float-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .notable-events-panel.is-floating .notable-events-inner {
    border-radius: 0.75rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(2px);
  }

  .notable-events-panel.is-floating .notable-events-header {
    padding: 0.5rem 0.75rem;
  }

  .notable-events-panel.is-floating .notable-events-header h3 {
    font-size: 0.625rem;
  }

  .notable-events-panel.is-floating .notable-events-body {
    padding: 0.375rem;
    gap: 0.25rem;
  }

  .notable-events-panel.is-floating .event-card {
    padding: 0.4rem 0.625rem;
    border-left-width: 2px;
  }

  .notable-events-panel.is-floating .event-card-title {
    font-size: 0.75rem;
  }

  .notable-events-panel.is-floating .event-card-datetime {
    font-size: 0.6875rem;
  }

  .notable-events-panel.is-floating .event-card-location {
    font-size: 0.6875rem;
  }

  .notable-events-panel.is-floating .event-card-location svg {
    width: 9px;
    height: 9px;
  }

  .notable-events-panel.is-floating .event-card-link {
    font-size: 0.75rem;
    margin-top: 0.25rem;
  }

  .notable-events-panel.is-returning {
    animation: panel-float-out 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

@keyframes panel-float-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-float-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}

/* Placeholder preserves hero grid column when panel is floating */
.panel-placeholder {
  display: none;
}

@media (min-width: 1024px) {
  .panel-placeholder.active {
    display: block;
    width: 328px;
  }
}

.event-card-link:hover {
  color: var(--gold-light);
}

/* ==========================================================================
   11. Email Capture - Inline Variant (Homepage)
   ========================================================================== */

.email-section-inline {
  padding: 5rem 0;
  background: var(--navy-dark);
  color: var(--cream-dark);
  text-align: center;
}

.email-section-inline h3 {
  font-size: 1.875rem;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: white;
}

.email-section-inline .email-subtext {
  color: rgba(240, 236, 226, 0.6);
  margin-bottom: 2rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.email-form-inline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .email-form-inline {
    flex-direction: row;
  }
}

.email-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--cream-dark);
  background: var(--cream);
  color: var(--navy);
  font-size: 1rem;
  outline: none;
}

.email-input:focus {
  box-shadow: 0 0 0 2px var(--gold);
  border-color: var(--gold);
}

.email-input:disabled {
  opacity: 0.5;
}

/* Focus-visible styles for keyboard accessibility */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-gold:focus-visible,
.btn-download:focus-visible,
.modal-close:focus-visible,
.header-nav-link:focus-visible,
.header-logo:focus-visible,
.card:focus-visible,
.guide-sidebar a:focus-visible,
.back-to-top:focus-visible,
.floating-cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.email-input:focus-visible {
  box-shadow: 0 0 0 2px var(--gold);
  border-color: var(--gold);
}

/* Footer links on dark background get cream focus ring */
.footer a:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-out;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-gold:disabled {
  opacity: 0.75;
}

.email-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.email-error::before {
  content: "\26A0";
  flex-shrink: 0;
}

.email-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.email-success svg {
  color: #22c55e;
}

.email-success span {
  font-size: 1.125rem;
  font-weight: 600;
}

/* ==========================================================================
   12. Email Capture - End of Guide Variant
   ========================================================================== */

.email-section-eog {
  padding: 5rem 0;
  background: var(--cream-dark);
  text-align: center;
}

.email-section-eog h3 {
  font-size: 1.875rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.email-section-eog .email-subtext {
  color: rgba(18, 24, 32, 0.6);
  margin-bottom: 2rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   13. Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.4s ease-out;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 42, 0.7);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: var(--cream);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  max-width: 28rem;
  width: 100%;
  margin: 0 1rem;
  animation: scale-in 0.3s ease-out;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: rgba(18, 24, 32, 0.4);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--navy);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-form h3 {
  font-size: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.modal-form .email-subtext {
  color: rgba(18, 24, 32, 0.6);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   14. Floating CTA
   ========================================================================== */

.floating-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--navy-dark);
  color: var(--cream-dark);
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
}

.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-cta:hover {
  background: var(--navy-light);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.floating-cta .cta-label {
  display: none;
}

@media (min-width: 640px) {
  .floating-cta .cta-label {
    display: inline;
  }
}

/* ==========================================================================
   15. Footer
   ========================================================================== */

.footer {
  background: var(--navy-dark);
  color: var(--cream-dark);
  padding: 5rem 0;
  position: relative;
  z-index: 50;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.footer h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: white;
}

.footer-brand-text {
  color: rgba(240, 236, 226, 0.75);
  font-size: 0.875rem;
}

.footer h4 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li + li {
  margin-top: 0.5rem;
}

.footer-links a {
  color: rgba(240, 236, 226, 0.75);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-updated {
  text-align: left;
}

@media (min-width: 1024px) {
  .footer-updated {
    text-align: right;
  }
}

.footer-disclaimer {
  border-top: 1px solid rgba(30, 42, 58, 0.3);
  padding-top: 2rem;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: rgba(240, 236, 226, 0.6);
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  line-height: 1.625;
}

/* ==========================================================================
   16. Guide Layout
   ========================================================================== */

.guide-wrapper {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .guide-wrapper {
    padding: 2rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .guide-wrapper {
    padding: 3rem 2rem;
  }

  .guide-flex {
    display: flex;
    gap: 3rem;
  }
}

/* Guide Sidebar (desktop) */
.guide-sidebar {
  display: none;
  width: 18rem;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .guide-sidebar {
    display: block;
  }
}

.guide-sidebar nav {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  display: flex;
  flex-direction: column;
}

.guide-sidebar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(18, 24, 32, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.guide-sidebar a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
  color: rgba(18, 24, 32, 0.5);
}

.guide-sidebar a:hover {
  color: var(--navy);
  background: var(--cream-dark);
}

.guide-sidebar a.active {
  background: var(--gold-bg);
  color: var(--navy);
  font-weight: 500;
  border-left: 2px solid var(--gold);
}

/* Guide Mobile Nav */
.guide-mobile-nav {
  display: block;
  position: sticky;
  top: 4rem;
  z-index: 40;
  margin: 0 -1rem;
  padding: 0 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .guide-mobile-nav {
    display: none;
  }
}

.guide-mobile-nav-bar {
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--cream-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
}

.guide-mobile-nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
}

.guide-mobile-nav-toggle svg {
  transition: transform 0.2s;
}

.guide-mobile-nav-toggle.open svg {
  transform: rotate(180deg);
}

.guide-mobile-nav-dropdown {
  display: none;
  border-top: 1px solid var(--cream-dark);
  max-height: 16rem;
  overflow-y: auto;
}

.guide-mobile-nav-dropdown.open {
  display: block;
}

.guide-mobile-nav-dropdown a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  color: rgba(18, 24, 32, 0.5);
}

.guide-mobile-nav-dropdown a:hover {
  background: var(--cream-dark);
}

.guide-mobile-nav-dropdown a.active {
  background: var(--gold-bg);
  color: var(--navy);
  font-weight: 500;
}

/* Guide Content Area */
.guide-content {
  flex: 1;
  min-width: 0;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  z-index: 40;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--navy-dark);
  color: var(--cream-dark);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--navy-light);
}

/* ==========================================================================
   17. Guide Prose Styles (MDX Content)
   ========================================================================== */

.prose {
  line-height: 1.75;
  max-width: 65ch;
}

.prose h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 2rem;
  margin-bottom: 2rem;
  scroll-margin-top: 6rem;
}

@media (min-width: 768px) {
  .prose h1 {
    font-size: 3rem;
  }
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  scroll-margin-top: 6rem;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 1rem;
}

@media (min-width: 768px) {
  .prose h2 {
    font-size: 2.25rem;
  }
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 6rem;
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 6rem;
}

.prose p {
  margin: 1rem 0;
  line-height: 1.625;
  color: rgba(18, 24, 32, 0.8);
}

.prose strong {
  font-weight: 600;
  color: var(--navy);
}

.prose a {
  color: var(--gold);
  text-decoration: underline;
  transition: color 0.2s;
}

.prose a:hover {
  color: var(--gold-dark);
}

.prose ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style: disc outside;
  color: rgba(18, 24, 32, 0.8);
}

.prose ul li {
  margin: 0.5rem 0;
  line-height: 1.625;
}

.prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style: decimal outside;
  color: rgba(18, 24, 32, 0.8);
}

.prose ol li {
  margin: 0.5rem 0;
  line-height: 1.625;
}

.prose blockquote {
  margin: 1.5rem 0;
  border-left: 4px solid var(--cream-dark);
  padding-left: 1.5rem;
  font-style: italic;
  color: rgba(18, 24, 32, 0.6);
}

.prose hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid var(--cream-dark);
}

/* ==========================================================================
   18. Pro Tip Box
   ========================================================================== */

.pro-tip {
  margin: 2rem 0;
  background: var(--gold-bg);
  border-left: 4px solid var(--gold);
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1.5rem;
}

.pro-tip-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pro-tip-header svg {
  color: var(--gold);
  flex-shrink: 0;
}

.pro-tip-header span {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.875rem;
}

.pro-tip p {
  color: rgba(18, 24, 32, 0.8);
  font-size: 0.875rem;
  line-height: 1.625;
  margin: 0;
  font-style: normal;
}

/* ==========================================================================
   19. Tables
   ========================================================================== */

.table-wrapper {
  margin: 2rem 0;
  border-radius: 0.75rem;
  overflow-x: auto;
  border: 1px solid rgba(240, 236, 226, 0.5);
}

@media (max-width: 767px) {
  .table-wrapper {
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0 1rem;
  }
}

.prose table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.prose thead {
  background: var(--navy-dark);
  color: var(--cream-dark);
}

.prose thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
}

.prose tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.875rem;
}

.prose tbody tr:nth-child(even) {
  background: var(--cream);
}

.prose tbody tr:hover {
  background: rgba(250, 245, 232, 0.5);
}

/* ==========================================================================
   20. Checkbox Items
   ========================================================================== */

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.checkbox-item input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--gold);
  border-radius: 0.25rem;
  cursor: pointer;
}

.checkbox-item span {
  line-height: 1.625;
  transition: color 0.2s;
}

.checkbox-item span.checked {
  color: rgba(18, 24, 32, 0.3);
  text-decoration: line-through;
}

.checkbox-item span.unchecked {
  color: rgba(18, 24, 32, 0.8);
}

/* ==========================================================================
   21. Animations (formerly 22)
   ========================================================================== */

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-fade-in {
  animation: fade-in 0.4s ease-out;
}

.animate-scale-in {
  animation: scale-in 0.3s ease-out;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   23. Scrollbar Utility
   ========================================================================== */

.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: var(--gold);
  border-radius: 3px;
}