@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green: #00ff80;
  --blue: #0000ff;
  --black: #000000;
  --white: #ffffff;
  --ink: #000000;
  --font: 'JetBrains Mono', 'Courier New', Courier, monospace;
  --border: 3px solid var(--blue);
  --border-green: 3px solid var(--green);
  --max-w: 1200px;
  --content-max: 780px;
}

html {
  font-size: 16px;
  line-height: 1.6;
  background: var(--black);
  color: var(--green);
  font-family: var(--font);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--black);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--white);
  background: var(--blue);
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ===== SITE WRAPPER ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: var(--border);
  width: 100%;
}

.header-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--blue);
  min-height: 54px;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand:hover {
  color: var(--black);
  background: var(--green);
}

.logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.header-ctas {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: var(--black);
  color: var(--green);
  border: 2px solid var(--green);
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

.menu-toggle:hover {
  background: var(--green);
  color: var(--black);
}

/* ===== CTA BUTTONS ===== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}

.cta-signup {
  background: var(--green);
  color: var(--black);
  border: 2px solid var(--green);
}

.cta-signup:hover {
  background: var(--black);
  color: var(--green);
  border-color: var(--green);
}

.cta-login {
  background: var(--black);
  color: var(--blue);
  border: 2px solid var(--blue);
}

.cta-login:hover {
  background: var(--blue);
  color: var(--white);
}

/* ===== NAV ROW ===== */
.header-nav-row {
  padding: 0 16px;
  background: var(--black);
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.nav-desktop li a {
  display: block;
  padding: 12px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  text-decoration: none;
  border-right: 1px solid var(--blue);
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-desktop li a:hover {
  background: var(--blue);
  color: var(--white);
}

/* Details/summary nav (mobile collapsed) */
#nav-details {
  display: none;
}

#nav-details summary.nav-summary {
  display: flex;
  align-items: center;
  padding: 12px 0;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--green);
  list-style: none;
}

#nav-details summary.nav-summary::-webkit-details-marker {
  display: none;
}

#nav-details menu {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--blue);
  padding: 8px 0;
}

#nav-details menu li a {
  display: block;
  padding: 12px 16px;
  color: var(--green);
  text-decoration: none;
  font-size: 0.85rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #111;
}

#nav-details menu li a:hover {
  background: var(--blue);
  color: var(--white);
}

/* ===== HERO ===== */
.hero,
.page-hero {
  background: var(--black);
  border-bottom: var(--border-green);
  position: relative;
  overflow: hidden;
}

.hero--home {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
  padding: 48px 32px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.hero-copy {
  flex: 1;
  text-align: right;
  max-width: 600px;
}

.hero-copy h1 {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--green);
  line-height: 1.15;
  margin-bottom: 16px;
  text-align: right;
}

.hero-desc {
  font-size: 1rem;
  color: var(--white);
  text-align: right;
}

.hero-figure {
  flex-shrink: 0;
  border: var(--border);
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}

.hero-placeholder {
  border-color: var(--green);
}

.terminal-icon {
  font-size: 3rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.05em;
}

.hero-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
}

.hero-divider {
  height: 6px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--green) 50%, var(--blue) 100%);
  clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
}

/* Inner page hero */
.page-hero-inner {
  padding: 32px 32px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.page-hero-inner h1 {
  font-size: clamp(1.3rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
  margin-top: 8px;
  margin-bottom: 12px;
}

.page-hero--review {
  display: flex;
  align-items: center;
  gap: 0;
}

.review-hero-figure {
  flex-shrink: 0;
  border-left: var(--border);
  max-width: 200px;
}

.review-hero-img {
  width: 200px;
  height: 160px;
  object-fit: cover;
}

/* ===== EYEBROW / STAGE / BYLINE ===== */
.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--blue);
  color: var(--white);
  padding: 2px 10px;
  margin-bottom: 8px;
}

.stage-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.stage-awareness { background: var(--green); color: var(--black); }
.stage-consideration { background: var(--blue); color: var(--white); }
.stage-decision { background: #ff0080; color: var(--white); }

.byline {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
}

.byline time {
  color: #aaa;
}

/* ===== CONTENT LAYOUT ===== */
main {
  flex: 1;
  width: 100%;
}

.content-section {
  display: flex;
  gap: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 0;
  align-items: flex-start;
}

.content-main {
  flex: 1;
  min-width: 0;
  padding: 32px 32px 48px;
  border-left: var(--border);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 28px 20px;
  border-right: var(--border);
  position: sticky;
  top: 110px;
  align-self: flex-start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-inner h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 6px;
  margin-bottom: 12px;
  margin-top: 20px;
}

.sidebar-inner h3:first-child {
  margin-top: 0;
}

.sidebar-inner ul,
.sidebar-inner ol,
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.sidebar-inner a {
  display: block;
  padding: 8px 10px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--green);
  border-left: 2px solid transparent;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.sidebar-inner a:hover {
  border-left-color: var(--green);
  background: #111;
  color: var(--white);
}

.sidebar-rg {
  font-size: 0.7rem;
  color: #666;
  line-height: 1.4;
  padding-top: 12px;
  border-top: 1px solid #222;
  margin-top: 16px;
}

.rank-index ol {
  counter-reset: rank;
}

.rank-index ol li {
  counter-increment: rank;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rank-index ol li::before {
  content: counter(rank) ".";
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  padding-top: 8px;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--white);
  max-width: var(--content-max);
}

.page-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
  margin: 36px 0 8px;
  border-left: 4px solid var(--blue);
  padding-left: 12px;
}

.page-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green);
  margin: 24px 0 8px;
}

.page-content p {
  margin-bottom: 16px;
}

.page-content a {
  color: var(--green);
  text-decoration: underline;
}

.page-content a:hover {
  color: var(--white);
  background: var(--blue);
}

.page-content ul,
.page-content ol {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.page-content ol {
  list-style: decimal;
}

.page-content li {
  margin-bottom: 6px;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.page-content th {
  background: var(--blue);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.page-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #222;
  color: var(--white);
}

.page-content tr:hover td {
  background: #111;
}

.page-content blockquote {
  border-left: 4px solid var(--green);
  padding: 12px 20px;
  color: #aaa;
  font-style: italic;
  margin-bottom: 16px;
}

/* Subtitle pattern (contract: h2 + p.subtitle) */
.page-content h2 + p.subtitle,
.subtitle {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 0;
  margin-bottom: 16px;
  font-style: italic;
}

/* ===== INLINE FIGURES / ASIDES (contract: section > figure|aside) ===== */
.content-figure,
.review-figure,
.faq-figure,
.data-figure,
.about-figure,
.privacy-figure,
.compare-badge,
.rank-badge {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 16px;
  margin-bottom: 24px;
  background: #080808;
  border: 2px solid var(--blue);
  border-left: 6px solid var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--green);
}

.rank-badge,
.review-tag,
.faq-tag,
.data-tag,
.about-tag,
.privacy-tag,
.vs-label {
  color: var(--green);
}

.vs-label {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--blue);
}

/* ===== CHILD CARDS ===== */
.child-cards,
.child-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: var(--border);
}

.child-cards h2,
.child-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
  list-style: none;
  padding: 0;
  counter-reset: card-count;
}

.card-list li {
  counter-increment: card-count;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #080808;
  border: 2px solid var(--blue);
  border-bottom: 4px solid var(--green);
  position: relative;
}

.card::before {
  content: counter(card-count);
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
}

.card a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  line-height: 1.3;
}

.card a:hover {
  color: var(--white);
  text-decoration: underline;
}

.card small {
  font-size: 0.78rem;
  color: #888;
  line-height: 1.4;
}

/* ===== ABOUT AUTHOR ===== */
.author-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: var(--border-green);
}

.author-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
  border-left: 4px solid var(--blue);
  padding-left: 12px;
}

.author-card {
  display: block;
  margin-top: 20px;
  padding: 20px;
  background: #080808;
  border: 2px solid var(--blue);
  border-left: 6px solid var(--green);
  max-width: var(--content-max);
}

.author-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}

.author-credentials {
  font-size: 0.8rem;
  color: var(--blue);
  margin-bottom: 12px;
  font-weight: 500;
}

.author-bio {
  font-size: 0.9rem;
  color: var(--white);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--black);
  border-top: var(--border-green);
  margin-top: auto;
}

.footer-cta-block {
  background: var(--blue);
  padding: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-cta-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.footer-nav-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 2px solid var(--blue);
}

.footer-col {
  padding: 28px 24px;
  border-right: 1px solid #1a1a1a;
}

.footer-col:last-child {
  border-right: none;
}

.footer-col strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--blue);
  padding-bottom: 6px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col a {
  font-size: 0.8rem;
  color: #aaa;
  text-decoration: none;
  display: block;
  padding: 4px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.footer-col a:hover {
  color: var(--green);
  background: none;
  text-decoration: underline;
}

.trust-links a {
  color: #777;
  font-size: 0.75rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 32px;
  border-top: 1px solid #1a1a1a;
  text-align: center;
}

.copyright {
  font-size: 0.75rem;
  color: #555;
}

.rg-notice {
  font-size: 0.72rem;
  color: #555;
  font-style: italic;
}

/* ===== SEARCH BOX (nav area) ===== */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  padding: 6px 0;
}

.nav-search input {
  background: #111;
  border: 2px solid var(--blue);
  border-right: none;
  color: var(--green);
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 6px 12px;
  height: 36px;
  outline: none;
  width: 180px;
}

.nav-search input::placeholder {
  color: #444;
}

.nav-search button {
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--blue);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  height: 36px;
  cursor: pointer;
}

.nav-search button:hover {
  background: var(--green);
  color: var(--black);
  border-color: var(--green);
}

/* ===== PARALLAX / MOTION ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero--home {
    background-attachment: scroll;
  }
  .content-section {
    animation: fadeIn 0.3s ease-out;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .card:hover {
    border-color: var(--green);
    border-bottom-color: var(--blue);
  }
  .cta:hover {
    outline: 2px solid var(--green);
    outline-offset: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== MOBILE ≤768px ===== */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  #nav-details {
    display: block;
  }

  .menu-toggle {
    display: flex;
  }

  .header-brand-row {
    padding: 8px 12px;
  }

  .brand {
    font-size: 0.78rem;
  }

  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-end;
    padding: 24px 16px 16px;
    gap: 16px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-copy h1 {
    font-size: 1.4rem;
    text-align: right;
  }

  .hero-figure {
    width: 100px;
    height: 100px;
  }

  .hero-img {
    width: 100px;
    height: 100px;
  }

  .terminal-icon {
    font-size: 1.8rem;
  }

  .page-hero-inner {
    padding: 20px 16px;
  }

  .page-hero-inner h1 {
    font-size: 1.3rem;
  }

  .content-section {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: var(--border);
    max-height: none;
    overflow: visible;
    padding: 16px;
  }

  .content-main {
    border-left: none;
    padding: 20px 16px 40px;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col {
    padding: 20px 16px;
  }

  .footer-cta-block {
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }

  .page-hero--review {
    flex-direction: column;
  }

  .review-hero-figure {
    border-left: none;
    border-top: var(--border);
    max-width: 100%;
  }

  .review-hero-img {
    width: 100%;
    height: 160px;
  }

  .header-ctas {
    gap: 4px;
  }

  .cta {
    font-size: 0.7rem;
    padding: 8px 10px;
  }
}

/* ===== MOBILE ≤480px ===== */
@media (max-width: 480px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 0.72rem;
    max-width: 140px;
  }

  .cta {
    padding: 8px 8px;
    font-size: 0.68rem;
  }
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--blue);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green);
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}