@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&display=swap");

/* ===== 1. COLOURS (change here only) ===== */
:root {
  --side: #0f1b33; /* left sidebar */
  --bg: #f7f7f2; /* page background */
  --white: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e5dc;
  --coral: #ff5a4e; /* main accent */
  --sky: #1d9bf0;
  --sun: #ffc933;
  --mint: #14b8a6;
  --coral-soft: #ffe9e6;
  --shadow: 0 6px 18px rgba(15, 27, 51, 0.08);
  --side-w: 260px;
}
/* ===== 2. BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.75 "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
h1,
h2,
h3 {
  font-family: "Outfit", "Inter", sans-serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 800;
}
h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  border-radius: 3px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--coral), var(--sun));
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
.sub {
  margin-top: 46px;
  color: var(--sky);
}
p {
  margin: 0 0 1em;
  max-width: 72ch;
}
a {
  color: var(--sky);
}
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}
.page {
  margin: 0;
  padding: 0;
}
.hl {
  color: var(--coral);
}
.code-tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--sun);
  padding: 3px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}
/* ===== 3. TOP NAV (normal top bar, no sidebar) ===== */
nav.top {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  width: 100%;
  background: var(--side);
  padding: 16px max(24px, calc((100% - 1000px) / 2));
  margin: 0;
  float: none;
  height: auto;
  overflow: visible;
}
.brand {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand b {
  color: var(--coral);
}
.brand .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow:
    16px 0 0 var(--sun),
    32px 0 0 var(--sky);
  margin-right: 34px;
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
nav.top li {
  display: block;
  margin: 0;
  padding: 0;
}
nav.top a {
  display: block;
  color: #b6c2db;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
  border-bottom: 2px solid transparent;
}
nav.top a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-bottom-color: var(--coral);
}
/* ===== 4. HERO (centered) ===== */
.hero {
  padding: 84px max(24px, calc((100% - 1000px) / 2)) 80px;
  text-align: center;
  background: var(--white);
  border-bottom: 6px solid var(--sun);
}
.hero p {
  margin-left: auto;
  margin-right: auto;
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
}
.btn {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(255, 90, 78, 0.35);
}
.btn:hover {
  background: #e8473c;
}
.btn.ghost {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: none;
  margin-left: 10px;
}
.btn.ghost:hover {
  background: var(--sun);
  border-color: var(--sun);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 48px auto 0;
  max-width: 900px;
  text-align: left;
}
.stat {
  border-radius: 14px;
  padding: 18px 20px;
  color: #fff;
  font-size: 0.93rem;
}
.stat b {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
}
.s1 {
  background: var(--coral);
}
.s2 {
  background: var(--sky);
}
.s3 {
  background: var(--mint);
}
.s4 {
  background: var(--side);
}
/* ===== 5. SECTIONS ===== */
section {
  padding: 72px max(24px, calc((100% - 1000px) / 2));
}
section:nth-of-type(even) {
  background: var(--white);
}
/* ===== 6. CARDS ===== */
.grid,
.two {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--white);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 6px solid var(--coral);
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-4px);
}
.grid .card:nth-child(4n + 2),
.two .card:nth-child(even) {
  border-top-color: var(--sky);
}
.grid .card:nth-child(4n + 3) {
  border-top-color: var(--sun);
}
.grid .card:nth-child(4n + 4) {
  border-top-color: var(--mint);
}
section:nth-of-type(even) .card {
  background: var(--bg);
}
.card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}
.card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.card li {
  margin-bottom: 0.5em;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--coral-soft);
  padding: 3px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.callout {
  background: var(--ink);
  color: #fff;
  border-left: 8px solid var(--sun);
  padding: 20px 26px;
  border-radius: 12px;
  margin: 28px 0;
}
.callout p {
  margin: 0;
  color: #e5e7eb;
}
.essay {
  background: var(--white);
  border-radius: 14px;
  padding: 30px 34px;
  margin-top: 20px;
  box-shadow: var(--shadow);
  border-left: 8px solid var(--coral);
}
.essay p {
  max-width: none;
  color: var(--muted);
  text-align: justify;
}
.essay p:last-child {
  margin-bottom: 0;
}
.note {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 12px;
}
/* ===== 7. LIFECYCLE, STEPS, CHART ===== */
ol.pipe {
  list-style: none;
  counter-reset: p;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 26px 0;
}
ol.pipe li {
  counter-increment: p;
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}
section:nth-of-type(even) ol.pipe li {
  background: var(--bg);
}
ol.pipe li::before {
  content: counter(p);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
  font-family: "Outfit", sans-serif;
  margin-bottom: 10px;
}
ol.pipe li:nth-child(4n + 2)::before {
  background: var(--sky);
}
ol.pipe li:nth-child(4n + 3)::before {
  background: var(--sun);
  color: var(--ink);
}
ol.pipe li:nth-child(4n + 4)::before {
  background: var(--mint);
}
ol.pipe b {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
}
ol.pipe span {
  font-size: 0.93rem;
  color: var(--muted);
}
ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 14px;
}
ol.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  background: var(--bg);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
section:nth-of-type(even) ol.steps li {
  background: var(--white);
}
ol.steps li::before {
  content: counter(s);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--sun);
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
}
ol.steps p {
  margin: 0;
  color: var(--muted);
}
ol.steps h3 {
  margin-bottom: 0.3em;
}
.chart {
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-top: 18px;
}
section:nth-of-type(even) .chart {
  background: var(--bg);
}
.chart .row {
  display: grid;
  grid-template-columns: 190px 1fr 90px;
  gap: 14px;
  align-items: center;
  padding: 8px 0;
  font-size: 0.93rem;
}
.chart .bar {
  height: 16px;
  background: #e9e9e0;
  border-radius: 999px;
  overflow: hidden;
}
.chart .bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--sun));
}
.chart em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
}
/* ===== 8. TABLE, CODE, DL, FAQ ===== */
.scroll {
  overflow-x: auto;
  margin-top: 24px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--side);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
}
td:first-child {
  font-weight: 700;
  color: var(--coral);
}
td {
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: #fff8e1;
}
pre.code {
  background: var(--side);
  border-radius: 14px;
  padding: 22px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  color: #e1e8f7;
  margin: 24px 0;
  border-top: 6px solid var(--sky);
}
dl {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr;
  margin: 22px 0 0;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
section:nth-of-type(even) dl {
  background: var(--bg);
}
dt,
dd {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
dt {
  font-weight: 700;
  color: var(--coral);
}
dd {
  color: var(--muted);
}
dt:last-of-type,
dd:last-of-type {
  border-bottom: 0;
}
details {
  background: var(--bg);
  border-radius: 14px;
  padding: 16px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--sky);
}
details[open] {
  border-left-color: var(--coral);
}
summary {
  cursor: pointer;
  font-weight: 700;
}
details p {
  margin: 12px 0 0;
  color: var(--muted);
}
/* ===== 9. FOOTER ===== */
footer {
  background: var(--side);
  color: #b6c2db;
  text-align: center;
  padding: 30px 20px 44px;
  font-size: 0.88rem;
  border-top: 6px solid var(--coral);
}
/* ===== 10. RESPONSIVE ===== */
@media (max-width: 600px) {
  .chart .row {
    grid-template-columns: 1fr;
  }
  dl {
    grid-template-columns: 1fr;
  }
  dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .btn.ghost {
    margin: 12px 0 0;
  }
  .essay {
    padding: 22px;
  }
  .essay p {
    text-align: left;
  }
  ol.steps li {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
