:root {
  color-scheme: dark;
  --bg: #090c0f;
  --surface: #0f1418;
  --surface-2: #151c21;
  --line: #29343b;
  --line-strong: #46545c;
  --text: #edf2f4;
  --muted: #aab5bb;
  --faint: #7d8a91;
  --amber: #8ab4f8;
  --amber-soft: rgba(138, 180, 248, .1);
  --green: #35d69f;
  --blue: #72aaff;
  --red: #ff746b;
  --max: 1120px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  min-height: 64px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 700 14px/1 var(--mono);
  letter-spacing: .1em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: url("/assets/brand/quantenius-mark-v3.svg") center / contain no-repeat;
  font-size: 0;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 0 24px;
}

.site-nav a,
.text-link {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.text-link:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--amber);
  border-radius: 4px;
  background: var(--amber);
  color: #090b0d;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.button:hover {
  border-color: #a9c8fa;
  background: #a9c8fa;
}

.button-small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}

.button-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.button-quiet:hover {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

.button-full { width: 100%; }

.section-shell {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0;
}

.hero {
  padding-top: clamp(72px, 10vw, 112px);
  padding-bottom: 76px;
}

.hero-copy { max-width: 880px; }

.eyebrow {
  margin: 0 0 16px;
  color: var(--amber);
  font: 700 14px/1.5 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(40px, 6vw, 62px);
  font-weight: 690;
  letter-spacing: -.045em;
  line-height: 1.06;
}

.hero-lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin: 30px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 16px;
  list-style: none;
}

.hero-facts li { white-space: nowrap; }
.hero-facts strong { color: var(--text); font-family: var(--mono); }

.hero-search {
  max-width: 840px;
  margin-top: 50px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 680;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.section-heading > p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.question-search { max-width: 900px; }

.question-search > label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.search-input-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

.search-input-row > span {
  flex: 0 0 auto;
  margin-right: 12px;
  color: var(--amber);
  font: 22px/1 var(--mono);
}

.search-input-row input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
}

.search-input-row:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.search-input-row input::placeholder { color: var(--faint); }

.field-hint {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 14px;
}

.search-results {
  max-height: min(430px, 60vh);
  overflow-y: auto;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  background: var(--surface);
}

.search-results a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.search-results a:last-child { border-bottom: 0; }
.search-results a:hover,
.search-results a[aria-selected="true"] { background: var(--surface-2); }
.search-results strong { min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
.search-results small { color: var(--faint); font-size: 14px; line-height: 1.5; text-align: right; }
.search-empty { margin: 0; padding: 18px 16px; color: var(--muted); font-size: 16px; }

.library-section,
.tools-section,
.pricing,
.faq { border-top: 1px solid var(--line); }

.browse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.browse-group {
  min-width: 0;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.browse-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.browse-group h3 { margin: 0; font-size: 22px; }
.browse-group-heading span { color: var(--faint); font: 15px/1 var(--mono); }

.browse-links { display: grid; }

.browse-links a {
  display: flex;
  min-height: 46px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
}

.browse-links a:hover { color: var(--amber); }

.section-link,
.text-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--amber);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.section-link { margin-top: 16px; }
.section-link:hover,
.text-action:hover { text-decoration: underline; }

.tool-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tool-links > a {
  min-width: 0;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
}

.tool-links > a:hover { background: var(--surface-2); }
.tool-links h3 { margin: 0; font-size: 20px; }
.tool-links p { margin: 9px 0 18px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.tool-links span { color: var(--amber); font-size: 15px; font-weight: 700; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.price-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.price-card-featured {
  border-color: var(--amber);
  box-shadow: inset 0 3px 0 var(--amber);
}

.price-label {
  margin: 0;
  color: var(--amber);
  font: 700 15px/1.4 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.price {
  margin: 22px 0 12px;
  color: var(--text);
  font: 700 clamp(36px, 5vw, 44px)/1.1 var(--mono);
  letter-spacing: -.04em;
}

.price > span { margin-right: 3px; color: var(--faint); font-size: 17px; vertical-align: top; }
.price small { margin-left: 7px; color: var(--faint); font-size: 14px; letter-spacing: 0; }
.price-card > p:not(.price-label):not(.price) { margin: 0; color: var(--muted); font-size: 16px; }

.price-card ul {
  flex: 1;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.price-card li {
  position: relative;
  padding: 9px 0 9px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}

.price-card li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "+";
  font-family: var(--mono);
}

.price-actions { display: grid; justify-items: stretch; }
.price-actions .text-action { justify-content: center; margin-top: 7px; }
.pricing-note { margin: 18px 0 0; color: var(--faint); font-size: 14px; text-align: center; }

.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 20px 0; font-size: 17px; font-weight: 650; cursor: pointer; }
.faq details p { max-width: 780px; margin: -2px 0 22px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.faq summary::marker { color: var(--amber); }

.site-footer {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 46px;
  padding: 52px max(24px, calc((100vw - var(--max)) / 2)) 28px;
  border-top: 1px solid var(--line);
  background: #07090b;
}

.site-footer > div:first-child p { max-width: 320px; color: var(--faint); font-size: 15px; }
.site-footer h2 { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.site-footer > div:not(:first-child) { display: flex; flex-direction: column; gap: 8px; }
.site-footer > div:not(:first-child) a { color: var(--muted); font-size: 15px; text-decoration: none; }
.site-footer > div:not(:first-child) a:hover { color: var(--text); }
.footer-bottom { grid-column: 1 / -1; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; line-height: 1.6; }

/* Static content and SEO hubs */
.content-page { background: var(--bg); }
.content-header { position: static; }
.content-shell { width: min(980px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0 80px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 30px; color: var(--faint); font-size: 14px; line-height: 1.5; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--amber); }
.breadcrumbs span + span::before,
.breadcrumbs a + span::before,
.breadcrumbs a + a::before { margin-right: 7px; color: var(--line-strong); content: "/"; }
.content-kicker { margin-bottom: 12px; color: var(--amber); font: 700 14px/1.5 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.content-shell h1 { max-width: 880px; margin: 0; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.04em; line-height: 1.08; }
.content-dek { max-width: 760px; margin: 20px 0 0; color: var(--muted); font-size: 18px; line-height: 1.75; }
.content-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 38px; }
.disclosure-note { margin: -22px 0 38px; color: var(--faint); font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 34px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat-grid div { padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stat-grid dt { color: var(--faint); font: 14px/1.4 var(--mono); text-transform: uppercase; }
.stat-grid dd { margin: 5px 0 0; font: 700 22px/1.2 var(--mono); }
.content-section { margin-top: 54px; }
.content-section h2 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.02em; }
.content-section > p { max-width: 780px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.topic-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.topic-links a { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 11px; border: 1px solid var(--line); color: var(--muted); font-size: 15px; text-decoration: none; }
.topic-links a:hover { border-color: var(--amber); color: var(--amber); }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.directory-grid a { display: grid; min-height: 88px; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.directory-grid a:hover { background: var(--surface-2); }
.directory-grid span { font-size: 16px; font-weight: 650; }
.directory-grid b { color: var(--amber); font: 700 14px/1 var(--mono); }
.question-list { margin-top: 22px; border-top: 1px solid var(--line); }
.question-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.question-card > a { min-width: 0; color: var(--text); font-size: 16px; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.question-card > a:hover { color: var(--amber); }
.question-card p { grid-column: 2 / -1; margin: -8px 0 0; color: var(--muted); font-size: 14px; }
.difficulty-badge,
.pro-badge { padding: 4px 7px; border: 1px solid var(--line); font: 600 14px/1.3 var(--sans); text-transform: uppercase; }
.difficulty-badge.easy { color: var(--green); }
.difficulty-badge.medium { color: #ffd166; }
.difficulty-badge.hard { color: var(--red); }
.pro-badge { color: #c38cff; }
.question-article { margin-top: 34px; padding: 28px; border: 1px solid var(--line); background: var(--surface); font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.question-article p { margin: 0 0 16px; }
.question-article ul,
.question-article ol { padding-left: 24px; }
.question-article table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.question-article td,
.question-article th { padding: 7px 10px; border: 1px solid var(--line); }
.coaching-box,
.paywall-box { margin-top: 28px; padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.coaching-box { border-left: 3px solid var(--blue); }
.paywall-box { border-left: 3px solid var(--amber); }
.coaching-box h2,
.paywall-box h2 { margin: 0 0 8px; font-size: 20px; }
.coaching-box p,
.paywall-box p { margin: 0 0 16px; color: var(--muted); font-size: 16px; }
.content-footer { margin-top: 70px; padding-top: 30px; border-top: 1px solid var(--line); }
.content-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.content-footer a { color: var(--muted); font-size: 14px; text-decoration: none; }
.content-footer a:hover { color: var(--amber); }
.math-note { color: var(--faint); font-size: 14px; }
.not-found { display: grid; min-height: 65vh; place-items: center; text-align: center; }

/* Static legal and support pages. These pages intentionally need no JavaScript. */
.legal-shell { max-width: 900px; }
.legal-shell h1 { max-width: 780px; }
.legal-meta { margin: 16px 0 0; color: var(--faint); font: 14px/1.6 var(--mono); }
.legal-document { max-width: 780px; margin-top: 38px; }
.legal-document h2 { margin: 38px 0 10px; font-size: 24px; line-height: 1.3; }
.legal-document h2:first-child { margin-top: 0; }
.legal-document p,
.legal-document li { color: var(--muted); font-size: 17px; line-height: 1.8; }
.legal-document p { margin: 0 0 16px; }
.legal-document ul,
.legal-document ol { margin: 0 0 20px; padding-left: 24px; }
.legal-document li { margin-bottom: 8px; }
.legal-document strong { color: var(--text); }
.legal-document a { color: var(--amber); }
.legal-document code { color: var(--text); font: .92em/1.6 var(--mono); }
.legal-callout { padding: 18px 20px; border-left: 3px solid var(--blue); background: var(--surface); }
.legal-page-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: 780px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal-page-nav a { color: var(--muted); font-size: 15px; text-decoration: none; }
.legal-page-nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.legal-page-nav a:hover { color: var(--amber); }
.legal-static-header .site-nav { justify-content: flex-end; }

@media (max-width: 960px) {
  .site-nav { gap: 16px; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { grid-template-columns: 2fr 1fr 1fr; }
  .site-footer > div:nth-child(4) { grid-column: 2 / 3; }
}

@media (max-width: 880px) {
  html { scroll-behavior: auto; }
  .site-header { grid-template-columns: 1fr auto; min-height: 60px; padding: 0 18px; }
  .site-nav,
  .header-actions { display: none; }
  .menu-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  .mobile-nav {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    display: grid;
    padding: 8px 18px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a { display: flex; min-height: 46px; align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 16px; font-weight: 650; text-decoration: none; }
  .section-shell { width: min(100% - 32px, var(--max)); padding: 64px 0; }
  .hero { padding-top: 68px; padding-bottom: 58px; }
  .site-footer { grid-template-columns: 1fr 1fr; gap: 34px 24px; padding: 42px 18px 24px; }
  .site-footer > div:first-child { grid-column: 1 / -1; }
  .site-footer > div:nth-child(4) { grid-column: auto; }
  .content-shell { width: min(100% - 32px, 980px); padding-top: 28px; }
  .legal-static-header { grid-template-columns: 1fr auto; }
  .legal-static-header .header-actions { display: flex; }
  .legal-static-header .button { min-height: 40px; padding: 8px 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .directory-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .browse-grid,
  .tool-links,
  .pricing-grid { grid-template-columns: 1fr; }
  .browse-group,
  .tool-links > a,
  .price-card { padding: 24px; }
}

@media (max-width: 540px) {
  .hero h1 { font-size: clamp(36px, 11vw, 46px); }
  .hero-actions .button { width: 100%; }
  .hero-facts { display: grid; gap: 6px; }
  .search-results a { grid-template-columns: 1fr; gap: 3px; }
  .search-results small { text-align: left; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > div:first-child { grid-column: auto; }
  .legal-document p,
  .legal-document li { font-size: 16px; }
  .legal-static-header .header-actions .text-link { display: none; }
  .question-card { grid-template-columns: auto minmax(0, 1fr); }
  .question-card .pro-badge { grid-column: 2; justify-self: start; }
  .question-card p { grid-column: 1 / -1; }
  .price small { display: block; margin: 7px 0 0; }
}

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