/* ═══════════════════════════════════════════════════════════
   StackSimplified — AWS Solutions Architect Portal
   Brand: AWS Squid Ink #232F3E, AWS Orange #FF9900
   Self-contained stylesheet (mirrors the AI portal patterns).
   ═══════════════════════════════════════════════════════════ */

/* ─── Design Tokens: Light Theme ─── */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-muted: #eef1f5;
  --border: #e3e7ec;
  --border-light: #f1f3f6;
  --text: #16212e;
  --text-dim: #47546a;
  --text-muted: #8b93a1;

  /* AWS Brand */
  --ink: #232F3E;          /* AWS Squid Ink */
  --ink-2: #2f3e50;
  --ink-3: #1a2530;
  --orange: #FF9900;       /* AWS Orange */
  --orange-2: #ec7211;     /* AWS deep orange */
  --orange-soft: #fff4e6;
  --orange-border: #ffd9a8;

  --primary: #232F3E;
  --primary-soft: #eef1f5;
  --primary-border: #c7cfd9;
  --accent: #FF9900;
  --accent-soft: #fff4e6;

  --success: #1a8f5f;
  --success-soft: #e6f6ee;
  --success-border: #a7e3c6;
  --danger: #d13212;
  --danger-soft: #fdece7;
  --danger-border: #f6c3b3;
  --warn: #b7791f;
  --warn-soft: #fdf6e3;
  --warn-border: #f2dca0;
  --info: #0972d3;         /* AWS link blue */
  --info-soft: #eef6fd;
  --info-border: #b6dcf7;

  /* Per-service accent (overridden per topic via data-svc on <body>) */
  --svc: #FF9900;
  --svc-soft: #fff4e6;
  --svc-border: #ffd9a8;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(22,33,46,0.06), 0 1px 2px rgba(22,33,46,0.04);
  --shadow-md: 0 4px 14px rgba(22,33,46,0.09);
  --shadow-lg: 0 14px 38px rgba(22,33,46,0.14);
  --transition: 0.2s ease;
}

/* ─── Design Tokens: Dark Theme ─── */
[data-theme="dark"] {
  --bg: #0d1420;
  --bg-soft: #151f2e;
  --bg-muted: #1e2b3d;
  --border: #27364a;
  --border-light: #151f2e;
  --text: #eef2f8;
  --text-dim: #c2cbd8;
  --text-muted: #6b7688;

  --primary: #d6dee8;
  --primary-soft: rgba(255,255,255,0.06);
  --primary-border: rgba(255,255,255,0.14);
  --ink: #d6dee8;

  --orange-soft: rgba(255,153,0,0.14);
  --orange-border: rgba(255,153,0,0.4);
  --success-soft: rgba(26,143,95,0.16);
  --danger-soft: rgba(209,50,18,0.18);
  --warn-soft: rgba(183,121,31,0.16);
  --info-soft: rgba(9,114,211,0.16);
  --svc-soft: rgba(255,153,0,0.14);
  --svc-border: rgba(255,153,0,0.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.4);
  --shadow-lg: 0 14px 38px rgba(0,0,0,0.55);
}

/* ─── Base Reset & Typography ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
#root { min-height: 100vh; }
code, .mono { font-family: 'JetBrains Mono', monospace; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
::selection { background: rgba(255,153,0,0.25); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ─── Containers ─── */
.container { max-width: 860px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-wide { max-width: 1240px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ─── Navbar ─── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: background 0.3s;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--ink), var(--ink-2));
  display: grid; place-items: center; color: var(--orange); font-weight: 900; font-size: 12px;
  box-shadow: 0 4px 14px rgba(35,47,62,0.35); letter-spacing: -0.5px;
}
.brand .logo-text { font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap; }
.brand .logo-text span { color: var(--orange-2); }
.brand .logo-text small { display:block; font-size:10px; font-weight:600; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; margin-top:-2px; }

.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-left: 14px; font-size: 13px; color: var(--text-muted); min-width: 0; overflow: hidden; }
.breadcrumbs a { color: var(--text-dim); white-space: nowrap; }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs .section-crumb { color: var(--orange-2); }
@media (max-width: 760px){ .breadcrumbs { display:none; } }

.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-home-link, .theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-soft); display: grid; place-items: center; font-size: 16px;
  cursor: pointer; transition: all 0.2s; text-decoration: none; color: var(--text);
}
.nav-home-link:hover, .theme-toggle:hover { background: var(--bg-muted); border-color: var(--orange); transform: scale(1.05); text-decoration: none; }
.nav-topic-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-dim);
  font-size: 13px; font-weight: 600; text-decoration: none; transition: all .2s;
}
.nav-topic-link:hover { border-color: var(--orange); color: var(--text); text-decoration: none; }
@media (max-width: 640px){ .nav-topic-label { display:none; } }

/* ─── Hamburger service menu ─── */
.nav-menu-wrap { position: relative; }
.nav-menu-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--ink); color: #fff; font-size: 17px; display: grid; place-items: center; transition: all .2s;
}
.nav-menu-btn:hover { background: var(--ink-2); transform: scale(1.05); }
.nav-menu-dropdown {
  position: absolute; top: 48px; right: 0; width: 340px; max-width: 90vw; max-height: 74vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 10px; z-index: 200;
}
.nav-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.nav-menu-head span { font-weight: 800; font-size: 13px; color: var(--text); }
.nav-menu-allhome { font-size: 12.5px; font-weight: 700; color: var(--orange-2); }
.nav-menu-group { margin-bottom: 6px; }
.nav-menu-group-label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px 4px; }
.nav-menu-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: var(--text); font-size: 14px; text-decoration: none; transition: background .15s; }
.nav-menu-item:hover { background: var(--bg-soft); text-decoration: none; }
.nav-menu-item.active { background: var(--orange-soft); }
.nav-menu-item.soon { opacity: .55; }
.nav-menu-item-icon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 15px; background: var(--bg-muted); flex: none; }
.nav-menu-item-title { flex: 1; }
.nav-menu-item-badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 5px; }
.nav-menu-item-badge.live { background: var(--success-soft); color: var(--success); }
.nav-menu-item-badge.soon { background: var(--bg-muted); color: var(--text-muted); }

/* ─── Hero ─── */
.landing { padding-bottom: 60px; }
.hero-wrap { position: relative; overflow: hidden; padding: 66px 0 40px; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(760px 380px at 82% -10%, rgba(255,153,0,0.16), transparent 60%),
    radial-gradient(680px 420px at 5% 110%, rgba(35,47,62,0.10), transparent 55%);
}
.hero-wrap .container, .hero-wrap .container-wide { position: relative; z-index: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; margin-bottom: 18px;
}
.hero-title { font-size: 46px; line-height: 1.06; font-weight: 900; letter-spacing: -0.02em; color: var(--text); }
.hero-title span { color: var(--orange-2); }
.hero-sub { font-size: 18px; color: var(--text-dim); max-width: 62ch; margin: 16px auto 0; line-height: 1.6; }
.hero-intro { font-size: 15px; color: var(--text-muted); max-width: 64ch; margin: 14px auto 0; }
.hero-startline { font-size: 14px; color: var(--orange-2); font-weight: 700; margin-top: 20px; }
.hero-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-btn {
  border: none; background: linear-gradient(135deg, var(--orange), var(--orange-2)); color: #fff;
  font-weight: 800; font-size: 15px; padding: 13px 24px; border-radius: 11px; box-shadow: 0 8px 22px rgba(255,153,0,.32);
  transition: transform .15s, box-shadow .15s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,153,0,.4); }
@media (max-width: 640px){ .hero-title { font-size: 33px; } .hero-sub { font-size: 16px; } }

/* Exam facts / stats bar */
.stats-bar { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.stat-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; min-width: 120px; text-align: center; }
.stat-value { font-size: 22px; font-weight: 900; color: var(--text); font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }

/* ─── Section headings ─── */
.section-title { font-size: 27px; font-weight: 900; letter-spacing: -0.01em; text-align: center; margin-top: 10px; }
.section-desc { font-size: 15px; color: var(--text-muted); text-align: center; max-width: 60ch; margin: 10px auto 26px; }

/* ─── Service grid (home) ─── */
.domains-section { margin-top: 48px; }
/* Fixed 4-column grid on wide screens, stepping down responsively.
   Rectangular cards of equal height with a 2-line clamped intro. */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 1180px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .service-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 20px 18px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-height: 200px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.service-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--svc, var(--orange)); opacity: .95; }
.service-card.live { cursor: pointer; }
.service-card.live:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--svc, var(--orange)); }
.service-card.soon { opacity: .74; }
.service-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.service-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; color: #fff; background: var(--svc, var(--orange)); box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.service-status { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 9px; border-radius: 999px; }
.service-status.live { background: var(--success-soft); color: var(--success); }
.service-status.soon { background: var(--bg-muted); color: var(--text-muted); }
.service-abbr { font-size: 11px; font-weight: 700; color: var(--svc, var(--orange-2)); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 5px; }
.service-card h4 { font-size: 17px; font-weight: 800; margin-bottom: 7px; line-height: 1.25; }
/* 2-line intro: clamp to exactly two lines so all cards align */
.service-card p {
  font-size: 13.4px; color: var(--text-dim); line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.service-cta { margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 800; color: var(--svc, var(--orange-2)); display: inline-flex; align-items: center; gap: 4px; }
.service-group-label { grid-column: 1 / -1; margin-top: 20px; padding-bottom: 2px; border-bottom: 1px solid var(--border-light); }
.service-group-name { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.service-group-blurb { display: block; font-size: 13px; color: var(--text-muted); font-weight: 400; margin-top: 2px; margin-bottom: 6px; }

/* ─── Philosophy / why ─── */
.philosophy-section { margin-top: 60px; }
.philosophy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 22px; }
.phil-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.phil-icon { font-size: 26px; }
.phil-card h4 { font-size: 16px; margin: 8px 0 6px; }
.phil-card p { font-size: 13.6px; color: var(--text-dim); }

.footer { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); text-align: center; font-size: 13.5px; color: var(--text-muted); }

/* ─── Back link ─── */
.back-home-link { display: inline-block; font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 16px; }

/* ─── Domain / service overview ─── */
.domain-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.domain-row { display: flex; align-items: center; gap: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; cursor: pointer; transition: all .18s; }
.domain-row:hover { border-color: var(--svc, var(--orange)); box-shadow: var(--shadow-md); }
.domain-row-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; background: var(--svc-soft); flex: none; }
.domain-row-body { flex: 1; min-width: 0; }
.domain-row-head { display: flex; align-items: center; gap: 10px; }
.domain-row-head h4 { font-size: 16.5px; font-weight: 800; }
.domain-row-weight { font-size: 11px; font-weight: 800; color: var(--svc, var(--orange-2)); background: var(--svc-soft); padding: 2px 8px; border-radius: 6px; }
.domain-row-tag { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--bg-muted); padding: 2px 8px; border-radius: 6px; }
.domain-row p { font-size: 13.6px; color: var(--text-dim); margin-top: 5px; line-height: 1.5; }
.domain-row-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: inline-block; }
.domain-row-arrow { font-size: 20px; color: var(--text-muted); flex: none; }

.domain-hero-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.domain-hero-icon { width: 54px; height: 54px; border-radius: 13px; display: grid; place-items: center; font-size: 28px; color: #fff; background: var(--svc, var(--orange)); box-shadow: var(--shadow-md); }
.domain-weight { font-size: 12px; font-weight: 800; color: var(--svc, var(--orange-2)); background: var(--svc-soft); padding: 4px 10px; border-radius: 8px; }
.domain-hero-title { font-size: 34px; font-weight: 900; letter-spacing: -0.01em; }
.domain-hero-sub { font-size: 16px; color: var(--text-dim); max-width: 66ch; margin-top: 10px; line-height: 1.6; }

.chapters-heading { font-size: 20px; font-weight: 800; }
.chapter-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.chapter-item { display: flex; align-items: center; gap: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; cursor: pointer; transition: all .18s; }
.chapter-item:hover { border-color: var(--svc, var(--orange)); box-shadow: var(--shadow-md); }
.chapter-item-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; background: var(--svc-soft); flex: none; }
.chapter-item-body { flex: 1; min-width: 0; }
.chapter-item-body h3 { font-size: 16.5px; font-weight: 800; }
.chapter-item-body p { font-size: 13.6px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.chapter-item-meta { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.chapter-item-arrow { font-size: 20px; color: var(--text-muted); flex: none; }

/* Badges */
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.badge-beginner { background: var(--success-soft); color: var(--success); }
.badge-intermediate { background: var(--info-soft); color: var(--info); }
.badge-advanced { background: var(--danger-soft); color: var(--danger); }
.badge-time { background: var(--bg-muted); color: var(--text-dim); }
.badge-module { background: var(--orange-soft); color: var(--orange-2); }

/* ─── Chapter page layout ─── */
.reading-progress { position: fixed; top: 64px; left: 0; right: 0; height: 3px; background: transparent; z-index: 90; }
.reading-progress-bar { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-2)); transition: width .1s; }

.layout-with-nav { display: grid; grid-template-columns: 300px 1fr; gap: 32px; max-width: 1240px; margin: 0 auto; padding: 26px 24px 60px; align-items: start; }
@media (max-width: 960px){ .layout-with-nav { grid-template-columns: 1fr; } .chapter-sidebar { display:none; } }

.chapter-sidebar { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 108px); overflow-y: auto; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.sidebar-home-btn { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--text); padding: 8px 10px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 12px; }
.sidebar-home-btn:hover { text-decoration: none; border-color: var(--orange); }
.sidebar-chapter-group { margin-bottom: 4px; }
.sidebar-chapter-header { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: background .15s; }
.sidebar-chapter-header:hover { background: var(--bg-muted); }
.sidebar-chapter-header.active { background: var(--orange-soft); }
.sidebar-chapter-num { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; flex: none; }
.sidebar-chapter-header.active .sidebar-chapter-num { background: var(--orange-2); }
.sidebar-chapter-title { flex: 1; font-size: 13.5px; font-weight: 600; }
.sidebar-chapter-arrow { font-size: 10px; color: var(--text-muted); transition: transform .2s; }
.sidebar-chapter-arrow.open { transform: rotate(90deg); }
.sidebar-sections-list { padding: 4px 0 8px 30px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-sec-link { font-size: 12.7px; color: var(--text-dim); padding: 5px 8px; border-radius: 7px; }
.sidebar-sec-link:hover { background: var(--bg-muted); text-decoration: none; }
.sidebar-sec-link.active { color: var(--orange-2); font-weight: 700; background: var(--orange-soft); }
.sidebar-next-chapter { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.sidebar-next-btn { display: block; padding: 10px; border-radius: 10px; background: var(--ink); color: #fff; }
.sidebar-next-btn:hover { text-decoration: none; background: var(--ink-2); }
.sidebar-next-btn span:first-child { font-size: 11px; opacity: .7; display: block; }
.sidebar-next-title { font-size: 13.5px; font-weight: 700; }

.chapter-content { min-width: 0; max-width: 820px; }
.chapter-badge { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--orange-2); background: var(--orange-soft); padding: 5px 11px; border-radius: 7px; }
.chapter-title { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; margin: 14px 0 12px; line-height: 1.12; }
.chapter-overview { font-size: 17px; color: var(--text-dim); line-height: 1.65; }
.chapter-meta { display: flex; gap: 9px; flex-wrap: wrap; margin: 18px 0; }

.learning-objectives { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; margin: 20px 0; overflow: hidden; }
.lo-toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: none; border: none; text-align: left; }
.lo-chevron { font-size: 11px; color: var(--text-muted); transition: transform .2s; }
.lo-chevron.open { transform: rotate(90deg); }
.lo-toggle h3 { font-size: 15.5px; font-weight: 800; flex: 1; }
.lo-hint { font-size: 12.5px; color: var(--text-muted); }
.lo-list { list-style: none; padding: 0 18px 16px 44px; display: flex; flex-direction: column; gap: 8px; }
.lo-list li { font-size: 14.5px; color: var(--text-dim); position: relative; }
.lo-list li::before { content: "\2713"; color: var(--orange-2); font-weight: 800; position: absolute; left: -20px; }

/* Sections */
.section { padding: 30px 0; border-top: 1px solid var(--border-light); }
.section:first-of-type { border-top: none; }
.section-heading { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; }
.section-intro { font-size: 16px; color: var(--text-dim); line-height: 1.7; margin-bottom: 8px; }

.points { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.points li { display: flex; gap: 11px; font-size: 15px; color: var(--text-dim); line-height: 1.55; }
.points .bullet { color: var(--orange-2); font-weight: 800; flex: none; }

/* Cards */
.cards { display: grid; gap: 16px; margin: 20px 0; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 18px; border-top: 3px solid var(--svc, var(--orange)); }
.card-icon { font-size: 24px; }
.card h4 { font-size: 16px; font-weight: 800; margin: 8px 0 6px; }
.card p { font-size: 14px; color: var(--text-dim); line-height: 1.55; }

/* Flow diagram */
.flow-diagram { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 22px 0; }
.flow-node { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 16px; position: relative; }
.flow-node-icon { font-size: 24px; }
.flow-node h4 { font-size: 15px; font-weight: 800; margin: 8px 0 3px; }
.flow-node .flow-sub { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--orange-2); font-weight: 800; }
.flow-node .flow-detail { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-top: 8px; }
.flow-node-idx { position: absolute; top: 12px; right: 14px; font-size: 22px; font-weight: 900; color: var(--border); font-family: 'JetBrains Mono', monospace; }

/* Code */
.code-block { margin: 20px 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.code-label { background: var(--bg-muted); padding: 10px 16px; font-size: 12px; font-weight: 700; color: var(--text-dim); border-bottom: 1px solid var(--border); display:flex; align-items:center; gap:8px; }
.code-block pre { background: #1a2530; color: #e6ebf2; padding: 18px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.65; }

/* Scenario */
.scenario-box { margin: 22px 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.scenario-head { background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #fff; padding: 16px 20px; font-weight: 800; font-size: 16px; display: flex; gap: 10px; align-items: center; }
.scenario-body { padding: 18px 20px; }
.scenario-situation { font-size: 14.5px; color: var(--text-dim); line-height: 1.6; background: var(--svc-soft); border-left: 4px solid var(--svc, var(--orange)); padding: 12px 14px; border-radius: 8px; }
.scenario-reqs { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.scenario-reqs li { display: flex; gap: 11px; font-size: 14px; color: var(--text-dim); line-height: 1.5; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.scenario-solution { background: var(--success-soft); border: 1px solid var(--success-border); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.scenario-solution b { color: var(--success); }

/* Quiz */
.quiz { margin: 22px 0; display: flex; flex-direction: column; gap: 18px; }
.quiz-q { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.quiz-q-text { font-size: 15.5px; font-weight: 700; margin-bottom: 12px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option { text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; color: var(--text-dim); transition: all .15s; }
.quiz-option:hover { border-color: var(--orange); }
.quiz-option.correct { background: var(--success-soft); border-color: var(--success-border); color: var(--success); font-weight: 600; }
.quiz-option.wrong { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.quiz-explanation { margin-top: 12px; font-size: 13.6px; color: var(--text-dim); background: var(--info-soft); border: 1px solid var(--info-border); border-radius: 10px; padding: 12px 14px; line-height: 1.55; }

/* Summary */
.summary-section { margin: 22px 0; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.summary-section h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.summary-grid { display: flex; flex-direction: column; gap: 11px; }
.summary-item { display: flex; gap: 13px; align-items: flex-start; font-size: 14.6px; color: var(--text-dim); line-height: 1.55; }
.sum-icon { font-size: 19px; flex: none; }

/* Callout */
.callout { margin: 20px 0; border-radius: 12px; padding: 15px 17px; font-size: 14.5px; line-height: 1.6; display: flex; gap: 12px; border: 1px solid; }
.callout > span:first-child { font-size: 19px; }
.callout-info { background: var(--info-soft); border-color: var(--info-border); color: var(--text-dim); }
.callout-exam { background: var(--orange-soft); border-color: var(--orange-border); color: var(--text-dim); }
.callout-success { background: var(--success-soft); border-color: var(--success-border); color: var(--text-dim); }
.callout-warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--text-dim); }

/* Chapter nav footer */
.chapter-nav-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); }
.nav-prev, .nav-next { font-size: 14px; font-weight: 700; color: var(--text-dim); max-width: 46%; }
.nav-next { text-align: right; color: var(--orange-2); }

/* Coming-soon page */
.soon-wrap { max-width: 640px; margin: 0 auto; padding: 80px 24px; text-align: center; }
.soon-icon { width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; font-size: 40px; color: #fff; background: var(--svc, var(--orange)); margin: 0 auto 20px; box-shadow: var(--shadow-md); }
.soon-wrap h1 { font-size: 30px; font-weight: 900; }
.soon-wrap p { font-size: 16px; color: var(--text-dim); margin-top: 12px; line-height: 1.6; }
