:root {
  --bg-canvas: #1e2530;
  --bg-surface: #2c3643;
  --bg-surface-hover: #394657;
  --text-primary: #ffffff;
  --text-muted: #c4cedb;
  --accent-primary: #a3e635;
  --accent-secondary: #bef264;
  --border-subtle: #63748a;
  --font-stack: "Trebuchet MS", "Segoe UI", sans-serif;
  --line-height-base: 1.7;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: var(--line-height-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: var(--accent-secondary);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  background: var(--accent-primary);
  color: #000000;
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  z-index: 9999;
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header & Navigation */
.header-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0 1rem;
  position: relative;
  z-index: 1000;
}

.site-header {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: auto;
  min-width: 0;
  flex-shrink: 1;
}

.brand-icon {
  width: 22px;
  height: 22px;
  fill: var(--accent-primary);
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.05rem;
  text-transform: lowercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-desktop a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--accent-primary);
  background-color: var(--bg-surface-hover);
}

.header-cta-link {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary) !important;
  border-radius: 4px !important;
  padding: 0.4rem 0.8rem !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-cta-link:hover {
  background-color: var(--accent-primary) !important;
  color: #111827 !important;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 0.4rem 0.65rem;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.mobile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 1rem;
  left: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1rem;
  z-index: 1001;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.mobile-dropdown.is-open {
  display: block;
}

.mobile-dropdown nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mobile-dropdown a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
}

.mobile-dropdown a:hover,
.mobile-dropdown a.active {
  background: var(--bg-surface-hover);
  color: var(--accent-primary);
}

/* Main Layout */
main {
  flex: 1;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3rem) 1.25rem;
  width: 100%;
}

.content-measure {
  max-width: 72ch;
  margin: 0 auto;
}

/* Hero Band */
.hero-band {
  background-color: #171d26;
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.2rem 1.25rem;
  width: 100%;
}

.hero-band .container {
  padding-top: 0;
  padding-bottom: 0;
}

.hero-tagline {
  color: var(--accent-primary);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 0.6rem;
  overflow-wrap: break-word;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 65ch;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  overflow-wrap: break-word;
}

.btn {
  display: inline-block;
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  padding: 0.7rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.btn:hover {
  background: var(--accent-primary);
  color: #111827;
  transform: translateY(-2px);
}

.btn-solid {
  background: var(--accent-primary);
  color: #111827;
}

.btn-solid:hover {
  background: var(--accent-secondary);
  color: #0b111b;
}

/* Lead Planner Box */
.lead-planner-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: clamp(1.25rem, 2.5vw, 2.2rem);
  margin-bottom: 2.5rem;
  overflow-wrap: break-word;
}

.lead-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.lead-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
}

.pill-badge {
  background: var(--accent-primary);
  color: #111827;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

/* Grids */
.guide-grid-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
}

.guide-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
}

/* Cards & Image Layout */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #171d26;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  flex-shrink: 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-media img {
  transform: scale(1.02);
}

.card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.card-body {
  padding: 1.35rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.card-title {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
  overflow-wrap: break-word;
}

.card-body .callout {
  margin-top: auto;
  margin-bottom: 0;
  padding: 0.9rem 1.1rem;
}

.card-footer {
  margin-top: auto;
  border-top: 1px solid #3d4a5c;
  padding-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-footer a {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

/* Decision Tables */
.decision-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.decision-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  min-width: 580px;
}

.decision-table th {
  background: #1c232d;
  color: var(--accent-primary);
  padding: 0.85rem 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.decision-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #384555;
  color: var(--text-muted);
  vertical-align: top;
}

.decision-table tr:last-child td {
  border-bottom: none;
}

.decision-table td strong {
  color: var(--text-primary);
}

/* Callouts */
.callout {
  background: #242c38;
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 4px 4px 0;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
  overflow-wrap: break-word;
}

.callout h4 {
  color: var(--accent-primary);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.callout p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Checklists */
.checklist-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.checklist-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-items {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 0.65rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checklist-item label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  line-height: 1.4;
}

.checklist-item input[type="checkbox"] {
  accent-color: var(--accent-primary);
  margin-top: 0.2rem;
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 1.1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  line-height: 1.4;
}

.faq-question:hover {
  background: var(--bg-surface-hover);
}

.faq-icon {
  fill: var(--accent-primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid #384555;
  padding-top: 1rem;
  overflow-wrap: break-word;
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* Forms & Tools */
.tool-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-wrap: break-word;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: #171d26;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
}

.output-preview {
  background: #171d26;
  border: 1px dashed var(--border-subtle);
  border-radius: 4px;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--accent-secondary);
  min-height: 120px;
  margin: 1rem 0;
  max-width: 100%;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  background: #171d26;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.25rem 2rem;
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
  width: 100%;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
  overflow-wrap: break-word;
}

.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.footer-nav-col h5 {
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-nav-col a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav-col a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #2e3846;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-legal-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .nav-desktop, .header-cta-link {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .site-header {
    border-radius: 8px;
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 900px) {
  .guide-grid-two {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .guide-grid-three {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 768px) {
  .hero-band {
    padding: 1.8rem 1rem;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .lead-planner-box, .tool-panel {
    padding: 1.25rem 1rem;
  }
  .card-body {
    padding: 1.15rem 1rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}