/* ============================================================
   Claude Co-work Course — styles
   ============================================================ */

:root {
  --bg: #f6f2ea;
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --text: #2a2521;
  --text-muted: #6f665a;
  --border: #e7e0d3;
  --accent: #d97757;
  --accent-strong: #c25734;
  --accent-soft: #f6e4dc;
  --success: #4f8a5b;
  --success-soft: #e3efe2;
  --warning: #b9852b;
  --warning-soft: #f6ecd6;
  --info: #4a7aa6;
  --info-soft: #e1ebf3;
  --shadow: 0 1px 2px rgba(40, 30, 20, 0.06), 0 6px 24px rgba(40, 30, 20, 0.07);
  --shadow-sm: 0 1px 3px rgba(40, 30, 20, 0.08);
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 62px;
  --sidebar-w: 320px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, Menlo, monospace;
}

html[data-theme="dark"] {
  --bg: #1c1a17;
  --surface: #262320;
  --surface-2: #2f2b27;
  --text: #ece6db;
  --text-muted: #a89e8e;
  --border: #3a352e;
  --accent: #e08a6c;
  --accent-strong: #e9a487;
  --accent-soft: #3a2c25;
  --success: #6fae7c;
  --success-soft: #2a352b;
  --warning: #d6a960;
  --warning-soft: #3a3322;
  --info: #7aa8cf;
  --info-soft: #28323b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); }
html[data-theme="dark"] a { color: var(--accent-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  font-size: 18px;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; }
.brand-text small { color: var(--text-muted); font-size: 12px; }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-progress { display: flex; align-items: center; gap: 8px; }
.header-progress-bar {
  width: 110px; height: 7px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.header-progress-bar span {
  display: block; height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}
#header-progress-label { font-size: 12px; color: var(--text-muted); min-width: 30px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
}
.icon-btn:hover { border-color: var(--accent); }

.menu-toggle { display: none; flex-direction: column; gap: 4px; }
.menu-toggle span {
  width: 16px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  align-items: start;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px 40px;
}

.sidebar-home {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.sidebar-home:hover { background: var(--surface-2); }
.sidebar-home.active { background: var(--accent-soft); color: var(--accent-strong); }

.module-group { margin-top: 10px; }
.module-head {
  padding: 9px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.module-head .module-num {
  color: var(--accent-strong);
}

.lesson-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.35;
}
.lesson-link:hover { background: var(--surface-2); }
.lesson-link.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}
.lesson-check {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
  font-size: 11px;
  color: transparent;
}
.lesson-link.done .lesson-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.lesson-title-text { flex: 1; }

.sidebar-quiz {
  margin-top: 14px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
  border: 1px dashed var(--border);
}
.sidebar-quiz:hover { border-color: var(--accent); }
.sidebar-quiz.active { background: var(--accent-soft); color: var(--accent-strong); border-style: solid; }
.sidebar-quiz .badge-mini {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--success-soft);
  color: var(--success);
  font-weight: 700;
}

.sidebar-community {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}
.sidebar-community:hover { filter: brightness(1.06); }
.sidebar-community .ext { margin-left: auto; opacity: 0.85; }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 15, 10, 0.45);
  z-index: 40;
}

/* ---------- Main ---------- */
.main {
  padding: 36px clamp(20px, 5vw, 64px) 90px;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  outline: none;
}

/* ---------- Hero / Home ---------- */
.hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow);
}
.hero .eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  margin: 10px 0 12px;
}
.hero p { font-size: 16px; max-width: 60ch; opacity: 0.95; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  margin-top: 22px;
  font-size: 13px;
}
.hero-meta span { display: flex; align-items: center; gap: 6px; opacity: 0.95; }
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.05s ease, filter 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-light { background: #fff; color: var(--accent-strong); }
.btn-light:hover { filter: brightness(0.97); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-on-hero { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-on-hero:hover { background: rgba(255,255,255,0.26); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.section-title {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin: 38px 0 14px;
}

/* video */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  height: 100%;
  color: #e9e2d6;
  background: repeating-linear-gradient(45deg, #2a2521, #2a2521 12px, #322c27 12px, #322c27 24px);
  padding: 24px;
}
.video-placeholder .vp-icon { font-size: 36px; margin-bottom: 8px; }
.video-placeholder code {
  background: rgba(255,255,255,0.12);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12px;
}
.video-caption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* module cards on home */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.module-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.module-card .mc-num {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}
.module-card h3 { font-size: 16px; }
.module-card p { font-size: 13.5px; color: var(--text-muted); }
.module-card .mc-foot {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mc-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.mc-bar span { display: block; height: 100%; background: var(--success); border-radius: 99px; }

/* feature list on home */
.outcome-list { display: grid; gap: 10px; }
.outcome-list li {
  list-style: none;
  display: flex;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14.5px;
}
.outcome-list li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* community call-to-action */
.community-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.community-cta:hover { transform: translateY(-2px); border-color: var(--accent); }
.community-cta .cc-icon {
  width: 50px; height: 50px;
  flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 24px;
}
.community-cta .cc-text { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.community-cta .cc-text strong { font-size: 15.5px; }
.community-cta .cc-text span { font-size: 13.5px; color: var(--text-muted); }
.community-cta .cc-arrow { font-size: 20px; color: var(--accent-strong); flex-shrink: 0; }

/* ---------- Lesson view ---------- */
.lesson-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 26px;
}
.crumb {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.lesson-head h1 {
  font-size: clamp(24px, 3.5vw, 32px);
  line-height: 1.2;
  margin: 8px 0 10px;
}
.lesson-summary { font-size: 16px; color: var(--text-muted); }
.lesson-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.lesson-meta span { display: flex; align-items: center; gap: 5px; }

.lesson-body > * + * { margin-top: 18px; }
.lesson-body h2 {
  font-size: 21px;
  margin-top: 34px !important;
  padding-top: 6px;
}
.lesson-body p { font-size: 16px; }
.lesson-body ul, .lesson-body ol { padding-left: 24px; }
.lesson-body li + li { margin-top: 6px; }
.lesson-body strong { color: var(--text); }
.lesson-body code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 1.5px 6px;
  border-radius: 5px;
}

.code-block {
  background: #221f1b;
  color: #ece4d6;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.code-block .code-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b3a892;
  padding: 8px 14px;
  border-bottom: 1px solid #38332c;
  background: #2b2722;
}
.code-block pre {
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

/* callouts */
.callout {
  border-radius: var(--radius-sm);
  padding: 14px 16px 14px 46px;
  position: relative;
  font-size: 14.5px;
  border: 1px solid var(--border);
}
.callout::before {
  position: absolute;
  left: 14px; top: 13px;
  font-size: 18px;
}
.callout .callout-title { font-weight: 700; margin-bottom: 2px; }
.callout.tip { background: var(--success-soft); border-color: transparent; }
.callout.tip::before { content: "💡"; }
.callout.warning { background: var(--warning-soft); border-color: transparent; }
.callout.warning::before { content: "⚠️"; }
.callout.note { background: var(--info-soft); border-color: transparent; }
.callout.note::before { content: "📌"; }

/* steps */
.steps { display: grid; gap: 12px; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
}
.step .step-title { font-weight: 700; margin-bottom: 3px; }
.step .step-body { font-size: 14.5px; }

/* takeaways */
.takeaways {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.takeaways h3 {
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 10px;
}
.takeaways ul { padding-left: 20px; }
.takeaways li { font-size: 14.5px; }

.quote {
  border-left: 4px solid var(--accent);
  padding: 6px 0 6px 18px;
  font-size: 18px;
  font-style: italic;
  color: var(--text);
}
.quote cite { display: block; font-size: 13px; font-style: normal; color: var(--text-muted); margin-top: 6px; }

.divider { border: 0; border-top: 1px solid var(--border); margin: 28px 0 !important; }

/* lesson footer / nav */
.lesson-complete-bar {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.lesson-complete-bar .lcb-text { flex: 1; min-width: 180px; }
.lesson-complete-bar .lcb-text strong { display: block; font-size: 15px; }
.lesson-complete-bar .lcb-text small { color: var(--text-muted); }

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
.lesson-nav a {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 13.5px;
}
.lesson-nav a:hover { border-color: var(--accent); }
.lesson-nav a.next { text-align: right; }
.lesson-nav a small { display: block; color: var(--text-muted); font-size: 11.5px; }
.lesson-nav a strong { font-size: 14px; }
.lesson-nav .spacer { flex: 1; }

/* ---------- Quiz ---------- */
.quiz-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.quiz-intro h1 { font-size: 28px; margin-bottom: 10px; }
.quiz-stats {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 20px 0;
}
.quiz-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  flex: 1;
  min-width: 130px;
}
.quiz-stat .qs-num { font-size: 22px; font-weight: 700; color: var(--accent-strong); }
.quiz-stat .qs-label { font-size: 12.5px; color: var(--text-muted); }

.quiz-progress {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.quiz-progress-bar {
  flex: 1; height: 8px;
  background: var(--border);
  border-radius: 99px; overflow: hidden;
}
.quiz-progress-bar span { display: block; height: 100%; background: var(--accent); transition: width 0.3s ease; }
.quiz-progress-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.question-card .q-tag {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
}
.question-card .q-text {
  font-size: 19px;
  font-weight: 600;
  margin: 8px 0 18px;
  line-height: 1.4;
}
.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  background: var(--surface);
  text-align: left;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}
.option:hover:not([disabled]) { border-color: var(--accent); }
.option .opt-key {
  width: 26px; height: 26px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
}
.option.selected { border-color: var(--accent); background: var(--accent-soft); }
.option.selected .opt-key { background: var(--accent); color: #fff; border-color: var(--accent); }
.option.correct { border-color: var(--success); background: var(--success-soft); }
.option.correct .opt-key { background: var(--success); color: #fff; border-color: var(--success); }
.option.wrong { border-color: #c0573f; background: #f4ddd5; }
html[data-theme="dark"] .option.wrong { background: #3a2722; }
.option.wrong .opt-key { background: #c0573f; color: #fff; border-color: #c0573f; }
.option[disabled] { cursor: default; }

.q-explain {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--info-soft);
}
.q-explain.right { background: var(--success-soft); }
.q-explain.wrong { background: var(--warning-soft); }
.q-explain strong { display: block; margin-bottom: 3px; }

.quiz-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }

/* quiz result */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  box-shadow: var(--shadow);
}
.result-ring {
  width: 150px; height: 150px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  position: relative;
}
.result-ring .ring-inner {
  width: 122px; height: 122px;
  background: var(--surface);
  border-radius: 50%;
  display: grid; place-items: center;
  flex-direction: column;
}
.result-ring .ring-pct { font-size: 34px; font-weight: 800; line-height: 1; }
.result-ring .ring-sub { font-size: 12px; color: var(--text-muted); }
.result-card h1 { font-size: 26px; margin-bottom: 8px; }
.result-card .result-msg { color: var(--text-muted); max-width: 48ch; margin: 0 auto 22px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.result-breakdown {
  margin-top: 26px;
  text-align: left;
  display: grid;
  gap: 8px;
}
.result-breakdown .rb-item {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--surface-2);
}
.rb-item .rb-mark { flex-shrink: 0; font-weight: 700; }
.rb-item.ok .rb-mark { color: var(--success); }
.rb-item.no .rb-mark { color: #c0573f; }

/* ---------- Certificate ---------- */
.cert-wrap { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.certificate {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow);
}
.certificate::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  pointer-events: none;
}
.cert-seal {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 28px;
}
.cert-org {
  font-size: clamp(16px, 2.6vw, 21px);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--accent-strong);
  margin-bottom: 4px;
}
.cert-eyebrow {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700;
}
.cert-title { font-size: clamp(22px, 4vw, 32px); margin: 6px 0 18px; }
.cert-name {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  color: var(--accent-strong);
  border-bottom: 2px solid var(--border);
  display: inline-block;
  padding: 0 24px 6px;
  min-width: 240px;
}
.cert-course { font-size: 16px; margin-top: 18px; }
.cert-course strong { color: var(--accent-strong); }
.cert-foot {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 32px; font-size: 12.5px; color: var(--text-muted);
  flex-wrap: wrap;
}
.cert-controls {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  width: 100%;
}
.cert-name-input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  flex: 1;
  min-width: 200px;
}
.cert-name-input:focus { outline: 2px solid var(--accent); }

.locked-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.locked-card .lock-icon { font-size: 42px; }
.locked-card h1 { font-size: 24px; margin: 10px 0 8px; }
.locked-card p { color: var(--text-muted); max-width: 46ch; margin: 0 auto 18px; }
.lock-checklist { display: grid; gap: 8px; max-width: 340px; margin: 0 auto 22px; text-align: left; }
.lock-checklist .lc-row {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.lock-checklist .lc-row .lc-mark { font-weight: 700; }
.lc-row.ok .lc-mark { color: var(--success); }
.lc-row.no .lc-mark { color: var(--text-muted); }

/* misc */
.empty-note {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pill {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.footer-note {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--accent-strong); cursor: pointer;
  font-size: 13px; font-family: inherit;
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: min(86vw, var(--sidebar-w));
    z-index: 45;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .header-progress { display: none; }
  .brand-text small { display: none; }
}

@media (max-width: 520px) {
  .main { padding: 24px 16px 70px; }
  .hero { padding: 28px 22px; }
  .lesson-nav { flex-direction: column; }
}

/* ---------- Print (certificate) ---------- */
@media print {
  .site-header, .sidebar, .cert-controls, .footer-note { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  .certificate { border-color: #d97757; box-shadow: none; }
  body { background: #fff; }
}
