/* Shared stylesheet for VS Code Extension Development course */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

/* ── Base ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  color: #1a1a2e;
  background: #fafaf8;
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* ── Headings ── */
h1 { font-size: 1.8rem; font-weight: 600; margin-bottom: .25rem; letter-spacing: -.02em; }
h1 .lesson-num { display: block; font-size: .75rem; font-weight: 500; color: #888; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 2.5rem 0 .75rem; padding-top: 1.5rem; border-top: 1px solid #e0e0d8; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: #333; }
h4 { font-size: .95rem; font-weight: 600; margin: 1.2rem 0 .4rem; color: #444; }

/* ── Text ── */
p { margin-bottom: 1rem; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.lede { font-size: 1.1rem; color: #555; margin-bottom: 2rem; }

/* ── Lists ── */
ol, ul { margin: .5rem 0 1rem 1.5rem; }
ol li { margin-bottom: .35rem; }
ul li { margin-bottom: .25rem; }
ul ul, ol ol, ul ol, ol ul { margin-bottom: 0; }

/* ── Code ── */
code { font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: .88em; background: #f0f0ea; padding: .1em .35em; border-radius: 3px; }
pre { font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: .82rem; background: #1e1e2e; color: #cdd6f4; padding: 1.2rem 1.4rem; border-radius: 8px; overflow-x: auto; margin: 1rem 0 1.5rem; line-height: 1.55; }
pre .kw { color: #cba6f7; }
pre .str { color: #a6e3a1; }
pre .cmt { color: #6c7086; font-style: italic; }
pre .num { color: #fab387; }
pre .fn { color: #89b4fa; }
pre .hl { color: #f9e2af; }

/* ── Blockquote ── */
blockquote {
  border-left: 3px solid #2563eb;
  padding: .5rem 0 .5rem 1.2rem;
  margin: 1.2rem 0;
  color: #555;
  font-style: italic;
}

/* ── Callout boxes ── */
.callout {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-size: .92rem;
}
.callout strong { color: #1e40af; }
.callout.warn { background: #fffbeb; border-color: #fde68a; }
.callout.warn strong { color: #92400e; }

/* ── Quiz ── */
.quiz { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 1.2rem 1.4rem; margin: 1.5rem 0; }
.quiz h3 { margin-top: 0; color: #92400e; }
.quiz label { display: block; padding: .35rem 0; cursor: pointer; }
.quiz button { margin-top: .8rem; padding: .45rem 1.2rem; background: #2563eb; color: #fff; border: none; border-radius: 5px; font-size: .9rem; cursor: pointer; }
.quiz .feedback { margin-top: .8rem; padding: .6rem .8rem; border-radius: 5px; display: none; font-size: .9rem; }
.quiz .feedback.correct { background: #d1fae5; color: #065f46; display: block; }
.quiz .feedback.incorrect { background: #fee2e2; color: #991b1b; display: block; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid #e0e0d8; }
th { font-weight: 600; color: #555; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td:first-child { font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: .85rem; }

/* ── Navigation ── */
.nav { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #e0e0d8; font-size: .88rem; color: #888; }
.nav a { margin-right: 1.5rem; }

/* ── File reference ── */
.file-ref { font-size: .82rem; color: #888; margin-top: -.5rem; margin-bottom: 1rem; }
.file-ref code { background: transparent; color: #888; }

/* ── Misc ── */
kbd { font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: .82em; background: #eee; border: 1px solid #ccc; border-radius: 3px; padding: .05em .4em; }

/* ── Verdict badges (for reference docs, also usable in lessons) ── */
.verdict { display: inline-block; padding: .1em .5em; border-radius: 3px; font-size: .78rem; font-weight: 600; }
.v-good { background: #d1fae5; color: #065f46; }
.v-bad  { background: #fee2e2; color: #991b1b; }
.v-conv { background: #dbeafe; color: #1e40af; }

/* ── Reference density override ── */
/* Add class="ref" to <body> on reference documents for tighter cheat-sheet spacing */
body.ref h1 { font-size: 1.6rem; margin-bottom: .5rem; }
body.ref h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; padding-top: 1.2rem; }
body.ref h3 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
body.ref p { margin-bottom: .8rem; }
body.ref pre { padding: 1rem 1.2rem; margin: .8rem 0 1.2rem; }
body.ref table { margin: .8rem 0 1.2rem; font-size: .88rem; }
body.ref th, body.ref td { padding: .4rem .6rem; }
body.ref th { font-size: .78rem; }
body.ref td:first-child { font-size: .82rem; }
body.ref .nav { padding-top: 1.2rem; font-size: .85rem; }
