@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:ital,wght@0,400;0,700;0,800;1,400;1,800&display=swap');

/* ── Reset & base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand: #0C2340;
  --brand-light: #E0E6EF;
  --brand-hover: #F4F6FA;
  --surface: #ffffff;
  --bg: #F4F6FA;
  --border: #E0E6EF;
  --border-dark: #C8D1DF;
  --text: #0C2340;
  --muted: #3D5A80;
  --gold: #F0C75E;
  --code-bg: #1e2433;
  --code-fg: #e2e8f0;
  --success: #16a34a;
  --radius: 16px;
  --shadow: 0 1px 4px rgba(12, 35, 64, .08);
  --shadow-md: 0 12px 36px rgba(12, 35, 64, .12);
  --font: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(12, 35, 64, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(61, 90, 128, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(224, 230, 239, 0.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
}

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

/* ── Two-column layout ────────────────────────────────────── */
.layout {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1.5px solid var(--border);
  background: var(--surface);
}

.sidebar-brand {
  flex-shrink: 0;
  background: var(--brand);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.sidebar-brand header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
}

.sidebar-brand h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.sidebar-brand h1 a {
  color: inherit;
  text-decoration: none;
}

.sidebar-brand h1 a:hover {
  text-decoration: underline;
}

.sidebar-brand .header-badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--brand);
  padding: .2rem .6rem;
  border-radius: 100px;
  white-space: nowrap;
}

.sidebar-brand .subtitle {
  color: var(--brand-light);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.sidebar-brand h1 .accent {
  font-style: italic;
}

.sidebar-selections {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem 2rem 3rem;
}

/* Sidebar cards: full-width, stacked vertically */
.sidebar .card-group {
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.75rem;
}

.sidebar .card {
  width: 100%;
  justify-content: flex-start;
}

/* ── Section labels ───────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
}

.section-label .step-num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-label .step-num.done {
  background: var(--success);
}

.section-label h2 {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Selection cards ──────────────────────────────────────── */
.card-group {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2.5rem;
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  font-weight: 500;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
  user-select: none;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
  background: var(--brand-hover);
}

.card.active {
  border-color: var(--brand);
  background: var(--brand-hover);
  color: var(--brand);
  font-weight: 700;
}

.card .icon {
  font-size: 1.3rem;
}

/* ── Breadcrumb trail ─────────────────────────────────────── */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: .3rem .85rem;
  box-shadow: var(--shadow);
}

.crumb span {
  color: var(--text);
  font-weight: 600;
}

.crumb .sep {
  color: var(--border-dark);
}

/* ── Steps list ───────────────────────────────────────────── */
#steps {
  scroll-margin-top: 1rem;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
}

.step-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem .75rem;
}

.step-index {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-header h3 {
  font-size: .95rem;
  font-weight: 600;
}

.step-body {
  padding: 0 1.25rem .5rem 1.25rem;
  font-size: .9rem;
  color: var(--muted);
}

.step-body kbd {
  background: #f1f3f5;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: .1rem .35rem;
  font-size: .8rem;
  font-family: monospace;
}

/* ── Code blocks ──────────────────────────────────────────── */
.code-block {
  margin: .65rem 1.25rem;
  background: var(--code-bg);
  border-radius: 7px;
  overflow: hidden;
}

.code-block-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  padding: .8rem 1rem;
}

.code-block pre {
  color: var(--code-fg);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: .83rem;
  white-space: pre-wrap;
  word-break: break-all;
  flex: 1;
  line-height: 1.55;
}

.copy-btn {
  flex-shrink: 0;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #cbd5e1;
  border-radius: 5px;
  padding: .25rem .6rem;
  font-size: .75rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: .05rem;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.copy-btn.ok {
  background: rgba(22, 163, 74, .35);
  color: #bbf7d0;
  border-color: rgba(22, 163, 74, .4);
}

/* ── Notes ────────────────────────────────────────────────── */
.step-note {
  margin: .5rem 1.25rem .85rem;
  font-size: .82rem;
  color: #6b4f00;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: .5rem .75rem;
  border-radius: 0 5px 5px 0;
}

.step-note code {
  font-family: monospace;
  font-size: .85em;
  background: rgba(0, 0, 0, .06);
  padding: .1rem .3rem;
  border-radius: 3px;
}

/* ── Loading / empty state ────────────────────────────────── */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: .95rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  body {
    height: auto;
    overflow: auto;
  }

  .layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
    overflow: visible;
    border-right: none;
    border-bottom: 1.5px solid var(--border);
  }

  .sidebar-selections {
    padding: 1.25rem 1rem;
  }

  .content {
    padding: 1.25rem 1rem 3rem;
  }

  .card {
    padding: .7rem 1rem;
    font-size: .88rem;
  }

  .card:hover {
    transform: none;
  }
}