:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-soft: #f8fbff;

  --text: #1e293b;
  --heading: #0f172a;
  --muted: #64748b;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;

  --border: #cbd5e1;
  --border-strong: #94a3b8;

  --code-bg: #0f172a;
  --code-text: #e2e8f0;

  --success-bg: #ecfdf5;
  --success-border: #86efac;

  --warning-bg: #fff7ed;
  --warning-border: #fdba74;

  --note-bg: #eff6ff;
  --note-border: #93c5fd;

  --table-head: #e2e8f0;

  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 4px 12px rgba(15, 23, 42, 0.04);

  --radius: 14px;
  --radius-small: 10px;

  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.68;
}

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

/* Hero */

.hero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.05)),
    var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  padding: 44px 0 34px;
}

.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

h1,
h2,
h3,
h4 {
  color: var(--heading);
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 12px;
}

h2 {
  font-size: 1.45rem;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.lead {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.03rem;
  margin-bottom: 0;
}

/* Top nav */

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(248, 250, 252, 0.9);
  border-bottom: 1px solid rgba(203, 213, 225, 0.85);
}

.topnav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: var(--radius-small);
  transition: 0.2s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

/* Layout */

main {
  padding: 28px 0 60px;
}

.grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 24px;
}

.card > *:last-child {
  margin-bottom: 0;
}

.section-subtitle {
  color: var(--muted);
  margin-top: -2px;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
}

/* Lab navigation */

.lab-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.lab-nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

.lab-nav a:hover,
.lab-nav a:focus-visible {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}

/* Lists */

.clean-list,
.quick-list {
  padding-left: 20px;
  margin: 0;
}

.clean-list li,
.quick-list li {
  margin-bottom: 8px;
}

.clean-list li:last-child,
.quick-list li:last-child {
  margin-bottom: 0;
}

/* Tags */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* Notes */

.note,
.warning,
.info {
  padding: 14px 16px;
  border-radius: 12px;
  margin: 16px 0 0;
  border: 1px solid;
}

.note {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.info {
  background: var(--note-bg);
  border-color: var(--note-border);
}

/* Code */

code,
pre,
kbd {
  font-family: var(--mono);
}

code {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.15em 0.4em;
  font-size: 0.95em;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

kbd {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.92em;
  line-height: 1.4;
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  margin: 14px 0;
  background: var(--surface);
  overflow: hidden;
  border-radius: 12px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--table-head);
  color: var(--heading);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

/* Details */

details {
  margin: 14px 0 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

details[open] {
  box-shadow: var(--shadow-soft);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details > *:not(summary) {
  margin-top: 12px;
}

/* Task / step styling */

.task-title {
  margin-bottom: 6px;
}

.task-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.step {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.step-title {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-note {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Task overview blocks */

.task-list {
  counter-reset: task-counter;
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-list li {
  counter-increment: task-counter;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
}

.task-list li::before {
  content: "Task " counter(task-counter) " — ";
  font-weight: 700;
  color: var(--accent);
}

/* Horizontal rule */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Links */

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

/* Footer */

.footer {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 16px 0 48px;
}

/* Responsive */

@media (max-width: 900px) {
  .grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 36px 0 28px;
  }

  .container {
    width: min(100% - 24px, 1120px);
  }
}

@media (max-width: 640px) {
  .card {
    padding: 18px;
  }

  th,
  td {
    padding: 10px 12px;
  }

  .topnav .container {
    gap: 8px;
  }

  .topnav a {
    padding: 7px 10px;
    font-size: 0.92rem;
  }
}