:root {
  --bg-canvas: #1e2530;
  --bg-surface: #2a3442;
  --bg-surface-hover: #344052;
  --text-primary: #ffffff;
  --text-muted: #cbd5e1;
  --accent-primary: #a3e635;
  --accent-secondary: #4ade80;
  --border-subtle: #3f4d61;
  --shadow-offset: 4px 4px 0px #0f1319;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
  border: 1px solid var(--border-subtle);
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  position: static;
  margin: 20px auto;
  max-width: 1200px;
  padding: 14px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  text-align: left;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.brand-title span {
  color: var(--accent-primary);
}

nav.desktop-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

nav.desktop-nav a {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s var(--ease-kinetic);
}

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

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0 8px;
}

.mobile-dropdown {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  margin: 10px 20px 24px;
  padding: 16px;
  gap: 12px;
}

.mobile-dropdown.open {
  display: flex;
}

.mobile-dropdown a {
  color: #ffffff;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
}

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

/* Hero Section */
.hero-box {
  background: linear-gradient(135deg, #2a3442 0%, #1e2530 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 48px 36px;
  margin-bottom: 40px;
}

.hero-tag {
  display: inline-block;
  background: var(--accent-primary);
  color: #1e2530;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  color: #ffffff;
  letter-spacing: -1px;
}

p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 72ch;
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent-primary);
  color: #1e2530;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid #000;
  box-shadow: var(--shadow-offset);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0f1319;
  text-decoration: none;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s var(--ease-kinetic);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: #556780;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }

.bento-img-wrap {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 18px;
  background: #151921;
}

.bento-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-primary);
  color: #1e2530;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.bento-card h2,
.bento-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff;
}

.bento-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.read-link {
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Article Copy Flow */
.content-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
}

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

.prose h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 32px 0 14px;
  color: #ffffff;
}

.prose h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--accent-primary);
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.prose ul, .prose ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 8px;
}

/* Matrix Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: #232b37;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
}

td {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.faq-answer {
  display: none;
  padding-top: 10px;
  color: var(--text-muted);
}

.faq-answer.show {
  display: block;
}

/* Compiler Utility */
.tool-box {
  background: #222a36;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #ffffff;
}

select, textarea, input[type="text"], input[type="email"] {
  width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer */
footer {
  background: #181d26;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #ffffff;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
  max-width: 44ch;
}

.footer-col h5 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

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

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

.footer-legal-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .col-8, .col-4 { grid-column: span 12; }
}

@media (max-width: 768px) {
  nav.desktop-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .col-6 { grid-column: span 12; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-box { padding: 32px 20px; }
  .content-wrapper { padding: 24px 18px; }
}

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