:root{--link-color:#e5e7eb;}
:root {
  --bg: #000;
  --accent: #1fa4ff;
  --text: #fff;
  --muted: rgba(255,255,255,0.72);
  --max-width: 1100px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*,
*::before,
*::after { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden; /* Prevent horizontal scroll */
  padding-bottom: 100px; /* Space for FAB button so it doesn't cover footer */
}
a { color: inherit; text-decoration: none; }

.site-header.header-centered { padding:0.1rem 1rem 0.05rem; gap:0.05rem; }
.logo-block { margin-bottom:0.05rem; }
.logo-centered { max-width:min(350px,90vw); height:auto; display:block; margin:0 auto 0.1rem; }
.nav-centered {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap; /* Allow wrapping on mobile */
}
.nav-centered a {
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999rem;
  transition: background 0.2s ease-out;
  /* Ensure minimum touch target size */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-centered a.active,
.nav-centered a:hover {
  background: rgba(255,255,255,0.12);
}
.nav-centered .contact-btn {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  padding-inline: 1rem;
}
.linkedin-link .icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: #fff !important;
}
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.65rem 1.5rem 1.5rem;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.eyebrow-large { font-size: 0.85rem; }
.hero h1 {
  font-size: clamp(2.35rem, 3.2vw, 3.1rem);
  line-height: 1.03;
  margin-bottom: 1rem;
}
.hero .lead {
  max-width: 40rem;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.5;
}
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 2.5rem;
}
.cards.three-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1.1rem;
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0));
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 1rem;
  padding: 1rem 1rem 1.1rem;
}
.card h3 {
  margin-top: 0;
  color: var(--accent);
}
.card p { color: var(--muted); }
.card ul {
  margin-top: 0.6rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35; 
}
.insight {
  padding-bottom: 3.8rem;
}
.insight-card {
  background: radial-gradient(circle at 20% 20%, rgba(32,163,255,0.3), rgba(0,0,0,0));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1.1rem;
  padding: 1.4rem 1.4rem 1.5rem;
  display: grid;
  gap: 0.55rem;
  position: relative;
}

/* Ensure insight card h2 titles have space for buttons/logo */
.insight-card h2 {
  margin-top: 2.5rem !important;
  text-align: center !important;
}
.primary-btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 0.6rem 1.35rem;
  border-radius: 999rem;
  font-weight: 600;
  /* Ensure minimum touch target size */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.3rem 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
}
.about-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.2rem 1.5rem 3rem;
}
.about-card {
  display: grid;
  grid-template-columns: 0.55fr 1.05fr;
  gap: 1.8rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(0,0,0,0));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 1.1rem;
  padding: 1.4rem 1.4rem 1.6rem;
  align-items: center;
}
.about-photo {
  width: min(260px, 100%);
  border-radius: 1rem;
  border: 2px solid rgba(255,255,255,0.2);
}
.about-content .lead {
  color: var(--muted);
  margin-bottom: 1rem;
}
.bullets {
  list-style: disc;
  margin-left: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

/* v14.11 theme/layout */
html, body {  color:#fff !important; }
.site-header.header-centered { padding:0.1rem 1rem 0.05rem; gap:0.05rem; }
.logo-centered { max-width:min(350px,90vw); height:auto; display:block; margin:0 auto 0.1rem; }
.nav-centered { display:flex; gap:.8rem; align-items:center; justify-content:center; flex-wrap:wrap; }
.nav-centered a { background:transparent; border:1px solid transparent; border-radius:.55rem; padding:.4rem .7rem; color:inherit; text-decoration:none; }
.nav-centered a.active { border-color: rgba(255,255,255,0.38); box-shadow: 0 0 0 2px rgba(255,255,255,0.06) inset; }
.linkedin-link .icon { width:1.2rem; height:1.2rem; fill:#fff !important; vertical-align:middle; }
.hero { max-width:1100px; margin:0 auto; padding:1.2rem 1.2rem 1.5rem; }
.card { background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.12); padding:1rem 1.1rem; border-radius:16px; margin:1rem 0; }

.site-footer { 
  max-width:1100px; 
  margin:0 auto; 
  padding:1rem 1.2rem 2rem; 
  display:flex; 
  justify-content:space-between; 
  gap:.8rem; 
  font-size:.95rem; 
  border-top:1px solid rgba(255,255,255,.12);
  flex-wrap: wrap; /* Allow footer to wrap on mobile */
}

/* Better footer wrapping behavior */
@media (max-width: 768px) {
  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

@media (min-width: 769px) and (max-width: 960px) {
  .site-footer {
    font-size: 0.9rem;
  }
}
.muted { color: rgba(255,255,255,.72); }

/* v14.14: restore blue background gradient */
html, body {
  background: radial-gradient(1000px 480px at 50% -120px, #0b2942 0%, #07131c 55%, #000 100%) !important;
  color: #fff !important;
}

/* v14.15: Apply blue gradient background to resource and insight cards */
.card {
  background: radial-gradient(800px 380px at 50% -80px, #0b2942 0%, #07131c 55%, #000 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  box-shadow: 0 0 25px rgba(0,0,0,0.25);
}
.card h2, .card h3 { color: #fff !important; }
.card p, .card li { color: rgba(255,255,255,0.9) !important; }

svg{color:#e5e7eb}
.nav .icon, .linkedin svg{color:#e5e7eb}

/* Injected: blue gradient framing similar to cards */
.blue-gradient-card{
  background: linear-gradient(135deg, rgba(56,189,248,0.15) 0%, rgba(59,130,246,0.15) 45%, rgba(99,102,241,0.15) 100%);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 16px;
  padding: 16px;
}
.blue-gradient-card .diagnostic-title{
  margin-top: 0;
}

/* Force gradient card styling */
section#how-well.blue-gradient-card,
.blue-gradient-card {
  background: linear-gradient(135deg, rgba(56,189,248,0.18) 0%, rgba(59,130,246,0.18) 45%, rgba(99,102,241,0.18) 100%) !important;
  border: 1px solid rgba(99,102,241,0.45) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-top: 24px !important;
}
.blue-gradient-card h2{ margin-top: 0 !important; }
.blue-gradient-card ol{ padding-left: 20px !important; }

/* Resource pages */
.resource-header { max-width: 64rem; margin: 0 auto 1.2rem; }
.page-intro { color: var(--muted); max-width: 64rem; margin: 0 auto 2rem; }
.resource-list { 
  display: grid; 
  grid-template-columns: repeat(2, minmax(0,1fr)); 
  gap: 1.4rem 2rem; 
  max-width: 64rem; 
  margin: 0 auto 2.2rem;
}
.resource-item { 
  background: rgba(255,255,255,0.02); 
  border: 1px solid rgba(255,255,255,0.08); 
  border-radius: 14px; 
  padding: 1rem 1.1rem; 
}
.resource-item a { font-weight: 600; text-decoration: none; }
.resource-item a:hover { text-decoration: underline; }
.resource-item .note { color: var(--muted); margin-top: 0.45rem; }
.resource-invite { max-width: 64rem; margin: 1.8rem auto 0; color: var(--muted); }
.resource-cta { display: inline-block; margin-top: 0.6rem; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover .card { border-color: rgba(255,255,255,0.22); }

/* Mobile fixes for Insights toolbar overlap */
@media (max-width: 560px) {
  .insight-header, .insight-toolbar, .insight .brand, .site-header .brand {
    flex-wrap: wrap;
  }
  .insight-toolbar { margin-top: 0.6rem; }
  .insight .eyebrow-large, .insight h1 { word-break: break-word; }
  .insight-toolbar .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
}

/* ===== Print overrides ===== */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .site-footer, .nav, .card-actions-topright, .linkedin-link, .logo-block, .logo-centered { max-width:min(1000px,90vw); height:auto; display:block; margin:0 auto 0.1rem; }
  .card, .insight-card { background: #fff !important; color: #000 !important; border: none !important; box-shadow: none !important; }
  .card * { color: inherit !important; }
  a, a * { color: #000 !important; text-decoration: none !important; }
  .insight-card { padding: 0 !important; }
  .insight-card h1, .insight-card h2, .insight-card h3, .insight-card p { break-inside: avoid; }
  .fab-connect { display: none !important; }
}

/* Ensure action buttons are clickable above content */
.insight-card .card-actions-topright { z-index: 10; pointer-events: auto; }
.insight-card .card-actions-topright button { pointer-events: auto; }

.footer-phone { color: var(--muted); }

.fab-connect {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  background: linear-gradient(90deg, #00FEFF, #089BE1);
  color: #000;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 9999;
  /* Ensure minimum touch target */
  min-height: 44px;
}
.fab-connect img {
  width: 24px;
  height: 24px;
  display: block;
}

.fixed-connect {
  position: fixed; bottom:1.5rem; right:1.5rem;
  background:#1fa4ff; color:#000; padding:0.6rem 1.0rem;
  border-radius:999px; font-weight:600; z-index:9999;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Resource card CTA styling */
.resource-cta {
  margin-top: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Insight card button styling - white icons on transparent */
.insight-card .card-actions-topright button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px; /* Increased for better touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  min-width: 44px;
  min-height: 44px;
}

.insight-card .card-actions-topright button:hover {
  opacity: 0.7;
}

.insight-card .card-actions-topright button svg {
  fill: #fff;
  width: 22px;
  height: 22px;
}

/* ========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Desktop optimization - keep logo reasonable on large screens */
@media (min-width: 961px) {
  .logo-centered {
    max-width: 300px; /* Cap logo size on desktop - much smaller */
  }
  
  .site-header.header-centered {
    padding: 0.5rem 1rem;
  }
  
  /* Ensure text doesn't break awkwardly when resizing */
  .hero h1 {
    font-size: clamp(2rem, 2.5vw, 3.1rem);
  }
  
  .nav-centered {
    flex-wrap: nowrap; /* Keep nav in single row on desktop */
  }
}

/* Medium screens - smooth transition */
@media (min-width: 601px) and (max-width: 960px) {
  .logo-centered {
    max-width: min(280px, 70vw);
  }
  
  .hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
  
  .nav-centered {
    flex-wrap: wrap; /* Allow wrapping on medium screens */
  }
}

/* Tablet breakpoint (960px and below) */
@media (max-width: 960px) {
  .about-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-photo {
    margin: 0 auto;
  }
  
  .logo-centered { 
    max-width: min(800px, 85vw); 
  }
  
  .nav-centered {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  
  .hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }
  
  .resource-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Mobile breakpoint (600px and below) */
@media (max-width: 600px) {
  /* Logo optimization */
  .logo-centered { 
    max-width: min(600px, 80vw);
    margin-bottom: 0.5rem;
  }
  
  /* Navigation improvements */
  .site-header.header-centered {
    padding: 0.5rem 0.75rem;
  }
  
  .nav-centered {
    gap: 0.4rem;
    row-gap: 0.5rem;
  }
  
  .nav-centered a {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
  
  /* Hero section */
  .hero {
    padding: 1rem 1rem 1.5rem;
  }
  
  .hero h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1.15;
    margin-bottom: 0.75rem;
  }
  
  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
  }
  
  .hero .lead {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  
  /* Card grids */
  .cards.three-up {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .section {
    padding: 1rem 1rem 2rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  /* Footer improvements */
  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem 1rem 1.5rem;
    font-size: 0.85rem;
  }
  
  /* FAB button adjustments */
  .fab-connect {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    gap: 0.4rem;
  }
  
  .fab-connect img {
    width: 20px;
    height: 20px;
  }
  
  .fab-connect span {
    display: inline; /* Show text on mobile */
  }
  
  /* About page mobile */
  .about-wrapper {
    padding: 1.5rem 1rem 2.5rem;
  }
  
  .about-card {
    padding: 1.2rem;
  }
  
  .about-photo {
    width: min(220px, 100%);
  }
  
  /* Blue gradient card mobile */
  section#how-well.blue-gradient-card,
  .blue-gradient-card {
    padding: 12px !important;
    margin-top: 16px !important;
  }
  
  .blue-gradient-card h2 {
    font-size: 1.35rem;
  }
  
  .blue-gradient-card ol {
    padding-left: 16px !important;
    font-size: 0.95rem;
  }
  
  /* Resource pages mobile */
  .resource-header {
    padding: 0 1rem;
  }
  
  .page-intro {
    padding: 0 1rem;
    font-size: 0.95rem;
  }
  
  .resource-list {
    padding: 0 1rem;
  }
  
  .resource-item {
    padding: 0.9rem;
  }
  
  /* Insight cards mobile - prevent overlap with title */
  .insight-card {
    padding: 1rem 1rem 1rem 1rem !important;
  }
  
  /* Push h2 down to avoid button overlap */
  .insight-card h2 {
    margin-top: 3rem !important;
    padding-top: 0.5rem !important;
  }
  
  .insight-card .card-logo {
    height: 28px !important;
    top: 8px !important;
    right: 8px !important;
  }
  
  .insight-card .card-actions-topright {
    top: 8px !important;
    right: 42px !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }
  
  .insight-card .card-actions-topright button {
    padding: 6px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }
  
  .insight-card .card-actions-topright button svg {
    width: 18px !important;
    height: 18px !important;
  }
  
  /* AI FAQ mobile */
  .page-centered {
    padding: 1rem;
  }
  
  .hero-section {
    margin: 0.5rem 0 1.5rem;
  }
  
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .faq-item {
    padding: 12px 0;
  }
  
  .faq-item .q {
    font-size: 0.95rem;
  }
  
  .faq-item .answer {
    font-size: 0.9rem;
  }
}

/* Extra small mobile (375px and below) */
@media (max-width: 375px) {
  .hero h1 {
    font-size: 1.35rem;
  }
  
  .nav-centered a {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }
  
  .fab-connect span {
    font-size: 0.8rem;
  }
  
  .site-footer {
    font-size: 0.8rem;
  }
  
  .blue-gradient-card h2 {
    font-size: 1.2rem;
  }
  
  .blue-gradient-card ol {
    font-size: 0.9rem;
  }
  
  /* On very small screens, increase h2 margin even more */
  .insight-card {
    padding: 0.75rem 0.75rem 0.75rem 0.75rem !important;
  }
  
  .insight-card h2 {
    margin-top: 3.5rem !important;
  }
  
  /* Make logo even smaller */
  .insight-card .card-logo {
    height: 24px !important;
  }
  
  /* Make action buttons even more compact */
  .insight-card .card-actions-topright {
    gap: 2px !important;
  }
  
  .insight-card .card-actions-topright button {
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 5px !important;
  }
  
  .insight-card .card-actions-topright button svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Landscape mobile orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding-top: 0.75rem;
    padding-bottom: 1rem;
  }
  
  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .fab-connect {
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
}

/* Prevent text from breaking out of containers - but avoid mid-word breaks */
h1, h2, h3, h4, h5, h6, p, li {
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Remove hyphens to prevent mid-word breaks on Mac */
}

/* Only allow hyphens on very long words */
@media (max-width: 600px) {
  h1, h2, h3, h4, h5, h6, p, li {
    hyphens: manual; /* Only break where we explicitly say so */
  }
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Safe area padding for notched devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  
  .fab-connect {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}
