/* =============================================================
   protectwith.ai — Ultra-Premium Light Design System
   Palette: warm ivory / crisp white cards / deep emerald accent
   Typeface: Fraunces (serif display) + Inter (body) + JetBrains Mono
   WCAG AA+, fully responsive 375px–1440px
   ============================================================= */

/* --- Custom Properties ---------------------------------------- */
:root {
  /* ── Backgrounds ── */
  --bg-paper:   #FBFAF7;   /* warm ivory page ground */
  --bg-card:    #FFFFFF;   /* floating white cards */
  --bg-sunken:  #F3F1EB;   /* slightly recessed surfaces */
  --bg-tinted:  #F8F7F4;   /* gentle tint for inner card areas */
  --bg-green-wash: #EEF4F1; /* faint emerald tint for MCP section */

  /* ── Text ── */
  --text-primary:   #15171A;   /* near-black ink */
  --text-secondary: #3E4553;   /* medium dark */
  --text-body:      #4D5566;   /* comfortable reading grey */
  --text-subtle:    #5A6072;   /* secondary labels */
  --text-muted:     #8D9EB5;   /* tertiary / placeholders */
  --text-faint:     #ACB8C8;   /* disabled / very faint */

  /* ── Accent: deep emerald ── */
  --accent:         #0E5C49;   /* primary emerald */
  --accent-mid:     #137A63;   /* hover state */
  --accent-light:   #EEF4F1;   /* tint background */
  --accent-tint:    #D0E8DF;   /* border / badge */
  --accent-text:    #0E5C49;   /* text on light */

  /* ── Secondary accent: muted bronze/gold ── */
  --bronze:         #9A7B4F;   /* Access / amber signals */
  --bronze-light:   #FFF8EE;   /* tint */
  --bronze-tint:    #D4B896;   /* border */

  /* ── Borders & Dividers ── */
  --border:         rgba(0,0,0,0.08);   /* hairline default */
  --border-medium:  rgba(0,0,0,0.12);   /* slightly stronger */
  --border-strong:  rgba(0,0,0,0.16);   /* hover / focus ring */
  --border-accent:  rgba(14, 92, 73, 0.25);

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(21,23,26,0.04), 0 1px 6px rgba(21,23,26,0.04);
  --shadow-sm: 0 2px 4px rgba(21,23,26,0.05), 0 4px 16px rgba(21,23,26,0.06);
  --shadow-md: 0 4px 8px rgba(21,23,26,0.06), 0 8px 32px rgba(21,23,26,0.08);
  --shadow-accent: 0 4px 20px rgba(14,92,73,0.12);

  /* ── Status colors ── */
  --green:        #1A7A4A;
  --green-light:  #EBF5F0;
  --green-tint:   #A8D8BE;
  --amber:        #9A7B4F;
  --red:          #C0392B;
  --red-light:    #FEF0EE;

  /* ── Typography ── */
  --font-serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* ── Spacing & Layout ── */
  --radius-xs:  3px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-xl:  18px;
  --radius-pill: 100px;

  --max-width: 1120px;
  --section-gap: 112px;
}

/* --- Reset & Base -------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  background: var(--bg-paper);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Skip Link ------------------------------------------------ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

/* --- Focus Styles -------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* --- Typography ---------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.625rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-secondary);
}

p {
  color: var(--text-body);
  max-width: 66ch;
  font-size: 1rem;
  line-height: 1.72;
}

p + p { margin-top: 0.875rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent-mid); }

em { font-style: italic; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-sunken);
  border: 1px solid var(--border-medium);
  padding: 0.12em 0.42em;
  border-radius: var(--radius-xs);
  color: var(--accent);
}

/* --- Layout -------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-gap) 0;
}

.section-header {
  margin-bottom: 3.5rem;
}

/* Tracked small-caps eyebrow label */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.375rem;
}

.section-header h2 {
  margin-bottom: 0.875rem;
}

.section-header p {
  font-size: 1.0625rem;
  color: var(--text-subtle);
  max-width: 60ch;
}

/* Hairline divider */
.divider {
  height: 1px;
  background: var(--border);
}

/* --- Navigation ---------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.90);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.nav-logo-mark svg {
  width: 16px;
  height: 16px;
}

.nav-logo-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--text-subtle);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-sunken);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* --- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.22s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  letter-spacing: 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  background: var(--accent-mid);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-tinted);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-subtle);
  border: 1px solid var(--border-medium);
}
.btn-ghost:hover {
  color: var(--text-secondary);
  background: var(--bg-sunken);
  border-color: var(--border-strong);
}

/* --- Hamburger for mobile ------------------------------------ */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-subtle);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-hamburger:hover {
  color: var(--text-primary);
  background: var(--bg-sunken);
}

.nav-mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: block; }
  .nav-mobile-menu.open {
    display: block;
    border-top: 1px solid var(--border);
    padding: 0.875rem 1.5rem 1.375rem;
    background: rgba(251,250,247,0.97);
  }
  .nav-mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    font-weight: 450;
    color: var(--text-subtle);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: color 0.2s;
  }
  .nav-mobile-menu a:hover { color: var(--text-primary); }
  .nav-mobile-menu a:last-child { border-bottom: none; }
}

/* --- Hero ---------------------------------------------------- */
.hero {
  padding: clamp(72px, 10vw, 120px) 0 var(--section-gap);
  position: relative;
  overflow: hidden;
}

/* Subtle radial warmth in hero — whisper-quiet */
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -200px;
  width: 680px;
  height: 680px;
  background: radial-gradient(ellipse at center, rgba(14,92,73,0.045) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Live badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-light);
  border: 1px solid var(--green-tint);
  padding: 0.3rem 0.875rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.875rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

.hero h1 {
  margin-bottom: 1.375rem;
}

.hero h1 .accent-text {
  color: var(--accent);
  font-style: italic;
  font-weight: 300;
}

.hero-lead {
  font-size: 1.0625rem;
  line-height: 1.76;
  color: var(--text-body);
  max-width: 54ch;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

/* Stats bar */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 1.75rem 0 0;
}

.hero-stat:first-child { padding-left: 0; }

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  margin-right: 1.75rem;
  flex-shrink: 0;
}

.hero-stat-value {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Endpoints card */
.hero-aside {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 0.5rem;
}

@media (max-width: 960px) {
  .hero-aside { justify-content: flex-start; }
}

.hero-endpoints {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

.endpoints-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
  max-width: none;
}

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.5rem 0;
}

.endpoint-label {
  color: var(--text-faint);
  min-width: 48px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.endpoint-url {
  color: var(--accent);
  word-break: break-all;
  flex: 1;
  transition: color 0.2s;
}
.endpoint-url:hover { color: var(--accent-mid); }

.endpoint-separator {
  height: 1px;
  background: var(--border);
  margin: 0.125rem 0;
}

.endpoint-badge {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid;
  flex-shrink: 0;
  text-transform: uppercase;
}

.badge-protected {
  color: var(--bronze);
  border-color: var(--bronze-tint);
  background: var(--bronze-light);
}

.badge-public, .badge-open {
  color: var(--green);
  border-color: var(--green-tint);
  background: var(--green-light);
}

/* --- Use Cases Section --------------------------------------- */
.use-cases {
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 720px) {
  .use-cases-grid { grid-template-columns: 1fr; }
}

/* Individual use-case card */
.uc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.uc-card:hover {
  border-color: var(--accent-tint);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Top accent bar on hover — matches .security-card pattern */
.uc-card::before {
  content: "";
  display: block;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease;
  flex-shrink: 0;
}

.uc-card:hover::before { opacity: 1; }

/* Card header area */
.uc-card-header {
  padding: 1.5rem 1.625rem 1.25rem;
  flex-shrink: 0;
}

/* "For: …" audience label */
.uc-for {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.uc-for-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  flex-shrink: 0;
}

.uc-for-value {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.uc-card-header h3 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.uc-scenario {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--text-body);
  max-width: none;
  margin: 0;
}

/* Tool-call block */
.uc-call {
  border-top: 1px solid var(--border);
  padding: 1rem 1.625rem 0.875rem;
  flex-shrink: 0;
}

.uc-call-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.uc-call-label a {
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.7rem;
}

.uc-pre {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.uc-pre code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Result block */
.uc-result {
  border-top: 1px solid var(--border);
  padding: 1rem 1.625rem 1.375rem;
  background: var(--bg-tinted);
  flex: 1;
}

.uc-result-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.625rem;
}

.uc-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.uc-result-list li {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  line-height: 1.6;
  color: var(--text-subtle);
}

/* Control name chip */
.uc-ctl {
  display: inline;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  border-radius: var(--radius-xs);
  padding: 0.06em 0.4em;
  margin-right: 0.25em;
}

/* Framework badge (OWASP, MITRE, etc.) */
.uc-framework {
  display: inline;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--bronze);
  background: var(--bronze-light);
  border: 1px solid var(--bronze-tint);
  border-radius: var(--radius-xs);
  padding: 0.06em 0.4em;
  margin-right: 0.25em;
}

/* Arrow connector in result lists */
.uc-arrow {
  color: var(--accent);
  font-family: var(--font-mono);
  margin-right: 0.25em;
}

/* Small advisory note line */
.uc-result-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.625rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  line-height: 1.55;
  max-width: none;
}

.uc-result-note strong {
  color: var(--text-subtle);
  font-weight: 600;
}

/* Section footer note */
.uc-footer-note {
  font-size: 0.875rem;
  color: var(--text-subtle);
  text-align: center;
  max-width: none;
  padding: 0.25rem 0;
}

@media (max-width: 640px) {
  .use-cases-grid { grid-template-columns: 1fr; }
  .uc-card-header { padding: 1.25rem 1.25rem 1rem; }
  .uc-call        { padding: 0.875rem 1.25rem 0.75rem; }
  .uc-result      { padding: 0.875rem 1.25rem 1.125rem; }
  .uc-pre code    { font-size: 0.75rem; }
  .uc-result-list li { font-size: 0.7375rem; }
}

/* --- Architecture Section ------------------------------------ */
.architecture {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.arch-diagram-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 3rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-medium);
  background: var(--bg-paper);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

#arch-diagram {
  min-width: 700px;
  width: 100%;
  display: block;
}

.arch-layers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .arch-layers { grid-template-columns: 1fr; }
}

.arch-layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.625rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.arch-layer-card:hover {
  border-color: var(--accent-tint);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.arch-layer-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.roadmap-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze);
  background: var(--bronze-light);
  border: 1px solid var(--bronze-tint);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  vertical-align: middle;
}

.arch-layer-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.625rem;
  font-family: var(--font-sans);
  letter-spacing: -0.005em;
}

.arch-layer-card > p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-body);
}

.arch-detail {
  margin-top: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.arch-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.55;
}

.arch-detail-item::before {
  content: "→";
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* --- MCP Tools Section --------------------------------------- */
.mcp-tools {
  background: var(--bg-green-wash);
  border-top: 1px solid rgba(14,92,73,0.08);
  border-bottom: 1px solid rgba(14,92,73,0.08);
}

.mcp-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.625rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tool-card:hover {
  border-color: var(--accent-tint);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.tool-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.tool-icon svg {
  width: 17px;
  height: 17px;
}

.tool-name {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.tool-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 1rem;
  max-width: none;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.575rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  background: var(--bg-tinted);
  letter-spacing: 0.02em;
}

/* Code example terminal */
.kb-map-example {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.kb-map-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}

.kb-map-header h3 {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  font-weight: 500;
  letter-spacing: 0;
}

.kb-map-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red   { background: #FF6058; }
.dot-amber { background: #FFBD2E; }
.dot-green { background: #28C940; }

.kb-map-body {
  padding: 1.75rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  overflow-x: auto;
  background: var(--bg-card);
}

/* Code token colors — light-theme calibrated for readability */
.code-comment { color: var(--text-faint); }
.code-key     { color: var(--text-subtle); font-weight: 500; }
.code-value   { color: var(--accent); font-weight: 600; }
.code-arrow   { color: var(--accent); }
.code-label   { color: var(--bronze); font-weight: 600; }
.code-step    { color: var(--text-muted); font-style: italic; }

/* --- Security Model ------------------------------------------ */
.security {
  background: var(--bg-paper);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(264px, 1fr));
  gap: 1rem;
}

.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.625rem;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hairline accent bar on hover */
.security-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.security-card:hover {
  border-color: var(--accent-tint);
  box-shadow: var(--shadow-sm);
}

.security-card:hover::before {
  opacity: 1;
}

.security-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.security-icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.security-card h3 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 0.5rem;
}

.security-card p {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--text-body);
  max-width: none;
}

.security-card .security-detail {
  margin-top: 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.625rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--accent-tint);
  display: inline-block;
}

/* Test suite banner */
.test-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  box-shadow: var(--shadow-sm);
}

.test-banner-text h3 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
}

.test-banner-text p {
  font-size: 0.875rem;
  color: var(--text-body);
  max-width: 52ch;
}

.test-banner-stat {
  text-align: center;
  padding: 1.125rem 1.75rem;
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.test-stat-num {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}

.test-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.3rem;
  letter-spacing: 0.01em;
}

/* --- Standards Section --------------------------------------- */
.standards {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.standard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.625rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.standard-card:hover {
  border-color: var(--accent-tint);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.standard-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-bottom: 0.875rem;
  text-transform: uppercase;
}

.standard-card h3 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.standard-card .standard-plain {
  font-size: 0.8125rem;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 0.875rem;
  max-width: none;
}

.standard-card .standard-usage {
  font-size: 0.7875rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
  padding-top: 0.875rem;
  line-height: 1.65;
  max-width: none;
}

.standard-card .standard-usage strong {
  color: var(--accent);
  font-weight: 600;
}

/* --- Best Practices ------------------------------------------ */
.best-practices {
  background: var(--bg-paper);
}

.practices-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(264px, 1fr));
  gap: 0.875rem;
}

.practice-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.375rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.practice-item:hover {
  border-color: var(--accent-tint);
  box-shadow: var(--shadow-sm);
}

.practice-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.practice-check svg {
  width: 11px;
  height: 11px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.practice-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: -0.005em;
  margin-bottom: 0.3rem;
}

.practice-content p {
  font-size: 0.8125rem;
  color: var(--text-body);
  line-height: 1.6;
  max-width: none;
}

/* --- Footer -------------------------------------------------- */
.site-footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border-medium);
  padding: 3.5rem 0 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { align-items: flex-start; }
  .footer-bottom { flex-direction: column; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
  text-decoration: none;
}

.footer-brand-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-subtle);
  max-width: 44ch;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.footer-endpoints {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-endpoint {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-endpoint-label {
  color: var(--text-faint);
  min-width: 56px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.footer-endpoint a {
  color: var(--text-subtle);
  transition: color 0.2s;
}

.footer-endpoint a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.footer-links a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding: 1.375rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: none;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* --- Scrollbar ----------------------------------------------- */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-tinted); }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.20); }

/* --- Utilities ----------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-mono   { font-family: var(--font-mono); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-bronze { color: var(--bronze); }

/* ---- Status dots -------------------------------------------- */
.status-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green);
}
.status-verified::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* --- Mobile stats layout ------------------------------------- */
@media (max-width: 480px) {
  .hero-stats {
    gap: 1.25rem 0;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-stat-divider {
    display: none;
  }
  .hero-stat {
    flex-direction: row;
    align-items: baseline;
    gap: 0.625rem;
    padding: 0;
  }
  .hero-stat-value { font-size: 1.5rem; }
}

/* --- Responsive helpers ------------------------------------- */
@media (max-width: 640px) {
  :root { --section-gap: 72px; }
  .mcp-tools-grid { grid-template-columns: 1fr; }
  .security-grid  { grid-template-columns: 1fr; }
  .standards-grid { grid-template-columns: 1fr; }
  .practices-list { grid-template-columns: 1fr; }
  .test-banner { flex-direction: column; align-items: flex-start; }
  .kb-map-body { padding: 1.25rem; font-size: 0.75rem; }
}
