/* AutoLog — Guide Pages Stylesheet (v3 — instrument-cluster redesign) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2c4148;
  background: #eef3f4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
::selection { background: rgba(45,212,232,0.28); color: #0a1c22; }

:root {
  /* legacy names, AL values — guides consume these everywhere */
  --teal:        #0a8ba3;   /* cyan that reads on light */
  --teal-dark:   #087185;
  --teal-light:  rgba(45,212,232,.12);
  --teal-bright: #5fe3f2;
  --text-dark:   #0a1c22;
  --text-body:   #2c4148;
  --text-muted:  #5a7178;
  --bg:          #eef3f4;
  --ink:         #06141a;
  --white:       #ffffff;
  --line:        #dce8ea;
  --shadow:      0 20px 40px -28px rgba(10,40,50,.35);
  --shadow-md:   0 24px 50px -34px rgba(10,40,50,.4);
  --grad-teal:   linear-gradient(135deg, #3ce3f2, #10a6bf);
  --grad-ink:    linear-gradient(160deg, #0a2129 0%, #06141a 100%);
  --radius:      18px;
  --radius-btn:  12px;
  --ease:        cubic-bezier(.22,1,.36,1);
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

/* Nav — dark instrument chrome */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,18,22,0.85);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(120,220,235,.13);
}
.nav-inner {
  max-width: 860px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.0625rem; font-weight: 700; color: #fff; letter-spacing: -0.02em;
}
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 4px 14px rgba(45,212,232,.28); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad-teal); color: #04222a;
  padding: 9px 18px; border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-size: 0.875rem; font-weight: 700;
  position: relative; overflow: hidden;
  box-shadow: 0 6px 20px rgba(45,212,232,0.32);
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease);
}
.nav-cta::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(45,212,232,0.45); }
.nav-cta:hover::after { left: 140%; }

/* Guide layout */
.guide-hero {
  background: var(--grad-ink);
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.guide-hero::before {
  content: ''; position: absolute; top: -160px; right: -100px;
  width: 440px; height: 440px; z-index: -1;
  background: radial-gradient(circle, rgba(45,212,232,0.20), transparent 65%);
  filter: blur(46px);
}
.guide-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(120,220,235,0.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(120,220,235,0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 25% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 25% 0%, #000, transparent 75%);
}
.guide-hero .container {
  max-width: 860px; margin: 0 auto; padding: 0 24px;
}
.guide-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: .06em; color: #7c9298;
  margin-bottom: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.guide-breadcrumb a { color: #9fb4ba; transition: color 0.15s; }
.guide-breadcrumb a:hover { color: #fff; }
.guide-breadcrumb span { color: #5e747a; }
.guide-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  font-weight: 700; color: #ffffff;
  letter-spacing: -0.035em; line-height: 1.08;
  margin-bottom: 16px;
  animation: gHeroUp .7s var(--ease) both;
}
@keyframes gHeroUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.guide-hero .hero-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: #7c9298;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.guide-hero .hero-meta span { display: flex; align-items: center; gap: 5px; }

/* Article body */
.guide-body {
  max-width: 860px; margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 80px;
}
.guide-article { min-width: 0; }
.guide-sidebar { min-width: 0; }

/* Definition box */
.definition-box {
  background: linear-gradient(135deg, rgba(45,212,232,.1), #ffffff);
  border-left: 4px solid #10a6bf;
  border-radius: 0 14px 14px 0;
  padding: 22px 26px;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}
.definition-box p {
  font-size: 1.0625rem;
  color: #0f3540;
  line-height: 1.65;
  font-weight: 500;
}

/* Article typography */
.guide-article h2 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
  color: var(--text-dark);
  margin: 44px 0 14px;
  padding-top: 8px;
  letter-spacing: -0.02em;
}
.guide-article h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem; font-weight: 600;
  color: var(--text-dark);
  margin: 28px 0 10px;
}
.guide-article p {
  color: var(--text-body);
  line-height: 1.78;
  margin-bottom: 18px;
}
.guide-article a:not(.nav-cta):not(.sidebar-cta a) { color: var(--teal); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(10,139,163,.35); text-underline-offset: 2px; }
.guide-article a:not(.nav-cta):not(.sidebar-cta a):hover { text-decoration-color: var(--teal); }
.guide-article ul, .guide-article ol {
  margin: 0 0 20px 0;
  padding-left: 0;
}
.guide-article ul li, .guide-article ol li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--text-body);
  line-height: 1.65;
}
.guide-article ul li::before {
  content: '';
  position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px;
  background: #10a6bf; border-radius: 50%;
}
.guide-article ol {
  counter-reset: ol-counter;
}
.guide-article ol li { counter-increment: ol-counter; }
.guide-article ol li::before {
  content: counter(ol-counter);
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px; border-radius: 6px;
  background: var(--teal-light); color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Key takeaways */
.takeaways {
  background: var(--white);
  border: 1px solid rgba(45,212,232,0.3);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 40px;
  box-shadow: var(--shadow);
  position: relative;
}
.takeaways::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, #5fe3f2, #10a6bf);
}
.takeaways h2 {
  font-size: 1.125rem !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  color: var(--text-dark);
}
.takeaways ul li::before { background: #30d158; }

/* Sidebar */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  position: sticky; top: 88px;
  box-shadow: var(--shadow);
}
.sidebar-card h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 700;
  color: var(--teal); text-transform: uppercase;
  letter-spacing: 0.14em; margin-bottom: 16px;
}
.sidebar-card ul li {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.sidebar-card ul li:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.sidebar-card ul li a {
  font-size: 0.875rem; color: var(--teal); font-weight: 500;
  line-height: 1.4;
  transition: color 0.15s;
}
.sidebar-card ul li a:hover { color: var(--teal-dark); }
.sidebar-cta {
  background: linear-gradient(165deg, #0c2630, #06141a);
  border: 1px solid rgba(45,212,232,.3);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 44px -20px rgba(16,130,160,0.5);
}
.sidebar-cta::before {
  content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 220px; height: 160px;
  background: radial-gradient(circle, rgba(45,212,232,0.25), transparent 60%);
  pointer-events: none;
}
.sidebar-cta p {
  font-size: 0.9375rem; font-weight: 600;
  color: #eaf6f8; margin-bottom: 14px; line-height: 1.4;
  position: relative;
}
.sidebar-cta a {
  display: inline-block;
  background: var(--grad-teal); color: #04222a;
  padding: 11px 22px; border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-size: 0.875rem; font-weight: 700;
  box-shadow: 0 8px 24px rgba(45,212,232,.34);
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.sidebar-cta a:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(45,212,232,.5); }

/* Footer */
.footer {
  background: #040d11;
  color: #8aa0a6;
  padding: 52px 0 28px;
  position: relative;
  border-top: 1px solid rgba(120,220,235,.1);
}
.footer::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45,212,232,0.5), transparent);
}
.footer-inner {
  max-width: 860px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.0625rem; font-weight: 700; color: white;
  margin-bottom: 10px;
}
.footer-logo img { width: 30px; height: 30px; border-radius: 7px; }
.footer-tagline { font-size: 0.8125rem; color: #7c9298; line-height: 1.6; }
.footer-links-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--teal-bright);
  margin-bottom: 14px;
}
.footer-links-col a {
  display: block; font-size: 0.875rem;
  color: #8aa0a6;
  margin-bottom: 10px; transition: color 0.15s;
}
.footer-links-col a:hover { color: #eaf6f8; }
.footer-bottom {
  max-width: 860px; margin: 0 auto; padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 0.8125rem; color: #6f878d;
}
.footer-bottom a { color: #8aa0a6; transition: color 0.15s; }
.footer-bottom a:hover { color: #eaf6f8; }

/* Responsive */
@media (max-width: 767px) {
  .guide-body { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 56px; }
  .guide-sidebar { order: -1; }
  .sidebar-card { position: static; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .guide-hero { padding: 52px 0 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}
