:root {
  /* Tech Utility Minimal Palette - No Blue */
  --bg-canvas: #1c1f24;
  --bg-surface: #262a33;
  --bg-surface-hover: #323742;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #10b981;
  --accent-hover: #059669;
  --shadow-color: #10b981;
  --border-color: #3f4652;
  
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --ease-step: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Resets & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  margin-top: 0;
  font-weight: normal;
  color: #ffffff;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 1rem; }
h2 { font-size: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; color: var(--accent); }

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

a:hover {
  color: var(--text-main);
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0; /* Square images */
}

/* Header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease;
  padding: 1rem 0;
}

.site-header.solid {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
  font-weight: bold;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--text-main);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-nav a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-wrapper {
  max-width: 72ch;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Hero Section */
.hero {
  padding: 12rem 1.5rem 6rem;
  text-align: left;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-large {
  padding: 14rem 1.5rem 8rem;
}

.bg-pattern {
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Narrative Vertical Flow Layout */
.narrative-flow {
  border-left: 1px solid var(--accent);
  margin-left: 1.5rem;
  padding-left: 2.5rem;
  counter-reset: step-counter;
  position: relative;
}

.narrative-step {
  position: relative;
  margin-bottom: 4rem;
}

.narrative-step::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: -4rem;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--bg-canvas);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text-main);
  font-family: var(--font-sans);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-canvas);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: 2px solid var(--bg-canvas);
  box-shadow: 4px 4px 0 var(--shadow-color);
  transition: all 0.2s var(--ease-step);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.btn:hover {
  box-shadow: 0 0 0 var(--shadow-color);
  transform: translate(4px, 4px);
  color: var(--bg-canvas);
}

/* Cards & Badges */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: var(--bg-surface);
  border-radius: 0; /* Square corners */
  padding: 1.5rem;
  position: relative;
  border: 1px solid var(--border-color);
  transition: background 0.2s;
}

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

.card img {
  width: 100%;
  aspect-ratio: 4/3;
  margin-bottom: 1.5rem;
  background: #000;
}

.badge {
  position: absolute;
  top: -1rem;
  right: -1rem;
  background: var(--accent);
  color: var(--bg-canvas);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%; /* Round badge */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
  border: 4px solid var(--bg-canvas);
}

/* Tools Section (Diagnostic Form) */
.tools-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--text-main);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 0;
  font-family: var(--font-sans);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.output-panel {
  background: var(--bg-surface);
  padding: 1.5rem;
  margin-top: 2rem;
  border: 1px solid var(--border-color);
  display: none;
}

.output-panel.active {
  display: block;
}

pre {
  background: var(--bg-canvas);
  padding: 1rem;
  overflow-x: auto;
  font-family: monospace;
  color: var(--accent);
  border-left: 2px solid var(--accent);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-surface);
  font-family: var(--font-serif);
  color: #fff;
}

/* Accordion (FAQ) */
details {
  background: var(--bg-surface);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

summary {
  padding: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
}

details[open] summary::after {
  content: "-";
}

details p {
  padding: 0 1.25rem 1.25rem;
  margin: 0;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  padding: 4rem 0 2rem;
  border-top: 4px solid var(--accent);
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  display: block;
  margin-bottom: 1rem;
}

.footer-grid p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.links-col, .legal-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav.mobile-open {
    display: flex;
  }

  .narrative-flow {
    margin-left: 1rem;
    padding-left: 1.5rem;
  }
  
  .narrative-step::before {
    left: -2.75rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

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