/* Advanced Suspension Maker - dark docs theme.
   Palette matches the SVG diagrams (dark #1e1e1e canvases + role accents), so the
   diagrams sit on the page instead of glaring as white boxes. */

:root {
  --bg:        #0f1116;
  --bg-soft:   #151922;
  --bg-card:   #171c26;
  --line:      #262d3a;
  --line-soft: #1e2531;
  --text:      #d7dde7;
  --text-dim:  #97a1b2;
  --text-mute: #6f7889;
  --white:     #f2f5fa;

  /* role accents - same colours as the diagrams */
  --hub:   #3ddc84;
  --arm:   #4f9dff;
  --shock: #ff9d42;
  --axle:  #c98bff;

  --link:      #6db3ff;
  --link-hover:#9bcaff;

  --radius: 10px;
  --wrap: 980px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,17,22,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--white); }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: linear-gradient(135deg, var(--arm), var(--axle));
  color: #0b0d12; font-weight: 800; font-size: 13px; letter-spacing: .5px;
  padding: 4px 8px; border-radius: 6px;
}
.brand-text { font-size: 15px; }

.site-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--text-dim); font-size: 14.5px; font-weight: 500; }
.site-nav a:hover { color: var(--white); text-decoration: none; }
.nav-cta {
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px;
  color: var(--text) !important; background: var(--bg-soft);
}
.nav-cta:hover { border-color: var(--arm); color: var(--white) !important; }

/* -------------------------------------------------------------------- hero */
.hero {
  padding: 60px 0 46px;
  background:
    radial-gradient(900px 340px at 12% -10%, rgba(79,157,255,.16), transparent 60%),
    radial-gradient(760px 320px at 88% 0%,  rgba(201,139,255,.13), transparent 62%),
    linear-gradient(180deg, #131722, var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero-title { margin: 0 0 10px; font-size: clamp(30px, 5.2vw, 46px); line-height: 1.15; color: var(--white); letter-spacing: -.4px; }
.hero-sub   { margin: 0 0 20px; font-size: clamp(15px, 2.2vw, 19px); color: var(--text-dim); max-width: 68ch; }

.hero-chips { margin: 0 0 26px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1px solid; }
.chip-hub   { color: var(--hub);   border-color: var(--hub);   background: rgba(61,220,132,.10); }
.chip-arm   { color: var(--arm);   border-color: var(--arm);   background: rgba(79,157,255,.10); }
.chip-shock { color: var(--shock); border-color: var(--shock); background: rgba(255,157,66,.10); }
.chip-axle  { color: var(--axle);  border-color: var(--axle);  background: rgba(201,139,255,.10); }

.hero-actions { margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-card);
  color: var(--text); font-weight: 600; font-size: 14.5px;
}
.btn:hover { text-decoration: none; border-color: #3a4457; color: var(--white); }
.btn-primary { background: linear-gradient(135deg, var(--arm), #2f7de0); border-color: transparent; color: #06203f; }
.btn-primary:hover { color: #041428; filter: brightness(1.07); }
.btn-ghost { background: transparent; }

/* ----------------------------------------------------------------- content */
.content { padding: 44px 22px 72px; }

.content h1, .content h2, .content h3, .content h4 {
  color: var(--white); line-height: 1.25; margin: 2em 0 .6em; letter-spacing: -.2px;
}
.content > h1:first-child { margin-top: 0; }
.content h1 { font-size: 32px; }
.content h2 { font-size: 24px; padding-bottom: .35em; border-bottom: 1px solid var(--line); }
.content h3 { font-size: 19px; }
.content h4 { font-size: 16.5px; color: var(--text); }

.content p, .content li { color: var(--text); }
.content strong { color: var(--white); font-weight: 650; }
.content ul, .content ol { padding-left: 1.35em; }
.content li { margin: .35em 0; }
.content li::marker { color: var(--text-mute); }

.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

blockquote {
  margin: 1.4em 0; padding: 12px 18px;
  background: var(--bg-soft);
  border-left: 3px solid var(--arm);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
}
blockquote p { margin: .4em 0; }

/* code */
code {
  background: #1b2130; color: #e6c07b;
  padding: .15em .42em; border-radius: 5px;
  font: 13.5px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  border: 1px solid var(--line-soft);
}
pre {
  background: #12161f; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  overflow-x: auto; line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; color: #cdd6e4; font-size: 13px; }

/* tables - the docs lean on these heavily */
.content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1.4em 0; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: block; overflow-x: auto; white-space: normal;
}
.content thead th {
  background: var(--bg-card); color: var(--white);
  text-align: left; font-weight: 650; font-size: 13.5px;
  letter-spacing: .2px; padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.content tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.content tbody tr:last-child td { border-bottom: 0; }
.content tbody tr:nth-child(even) { background: rgba(255,255,255,.017); }
.content tbody tr:hover { background: rgba(79,157,255,.055); }

/* diagrams: already dark, so just frame them */
.content img {
  max-width: 100%; height: auto; display: block;
  margin: 1.6em auto; border-radius: var(--radius);
  border: 1px solid var(--line); background: #1e1e1e;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 26px 0 34px; margin-top: 40px;
  font-size: 14px; color: var(--text-dim);
}
.site-footer p { margin: .4em 0; }
.site-footer .muted { color: var(--text-mute); font-size: 13px; }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 700px) {
  .header-inner { height: auto; padding: 10px 0; flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-nav { gap: 14px; }
  .brand-text { display: none; }
  .hero { padding: 40px 0 34px; }
  .content { padding-top: 32px; }
}

/* respect users who prefer light - keep it dark but soften contrast slightly */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .hero, .site-footer { display: none; }
}
