/* ============================================================
   Vibecoding for Business School Students — site styles
   Design notes: restrained palette, generous whitespace,
   readable line length. Think Stripe docs, not landing page.
   ============================================================ */

:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f7f7f5;
  --color-bg-code: #f4f3ef;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-text-faint: #8a8a8a;
  --color-border: #e6e4df;
  --color-border-strong: #d4d1c8;
  --color-accent: #2a5d8f;
  --color-accent-hover: #1d4670;
  --color-accent-soft: #e8f0f7;
  --color-warn: #b8860b;
  --color-warn-soft: #fbf3df;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
    Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --maxw-content: 720px;
  --maxw-wide: 1120px;
  --radius: 6px;
  --radius-lg: 10px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header-inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-brand {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-brand span {
  color: var(--color-text-muted);
  font-weight: 400;
}
.site-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  margin-left: auto;
}
.site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* ---------- Layout shells ---------- */
.shell {
  max-width: var(--maxw-content);
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.shell-wide {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* Course layout: optional left sidebar + content */
.course-layout {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 32px 24px 96px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
}
@media (max-width: 900px) {
  .course-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .course-sidebar { display: none; }
}
.course-sidebar {
  font-size: 14px;
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.course-sidebar h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin: 16px 0 8px;
  font-weight: 600;
}
.course-sidebar ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.course-sidebar li {
  margin: 2px 0;
}
.course-sidebar a {
  display: block;
  padding: 6px 10px;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
}
.course-sidebar a:hover {
  background: var(--color-bg-soft);
  color: var(--color-text);
}
.course-sidebar a.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  font-weight: 500;
}
.course-sidebar .module-num {
  display: inline-block;
  width: 22px;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}
h1 {
  font-size: 36px;
  margin-top: 0;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 24px;
  margin-top: 2.2em;
  padding-top: 0.6em;
  border-top: 1px solid var(--color-border);
}
h3 { font-size: 19px; }
h4 { font-size: 16px; }

p { margin: 0.9em 0; }

a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 93, 143, 0.25);
  transition: border-color 0.15s;
}
a:hover {
  border-bottom-color: var(--color-accent);
}

ul, ol { padding-left: 1.4em; }
li { margin: 0.3em 0; }

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

blockquote {
  margin: 1.4em 0;
  padding: 0.4em 1.2em;
  border-left: 3px solid var(--color-border-strong);
  color: var(--color-text-muted);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--color-bg-code);
  padding: 1px 5px;
  border-radius: 3px;
}
pre {
  background: var(--color-bg-code);
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid var(--color-border);
}
pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

/* ---------- Components ---------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0.6em 0 1.6em;
}

.callout {
  margin: 1.6em 0;
  padding: 16px 20px;
  background: var(--color-bg-soft);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15.5px;
}
.callout.warn {
  background: var(--color-warn-soft);
  border-left-color: var(--color-warn);
}
.callout.tip {
  background: var(--color-accent-soft);
  border-left-color: var(--color-accent);
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 4px;
}
.callout.warn .callout-label { color: var(--color-warn); }

/* Cards (used on home, landing pages, case grid) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 2em 0;
}
.card {
  display: block;
  padding: 22px 22px 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
  border-bottom: 1px solid var(--color-border); /* override link border */
}
.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}
.card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  font-weight: 600;
  margin-bottom: 8px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Module page header */
.module-header {
  margin-bottom: 24px;
}
.module-header .eyebrow { margin-bottom: 6px; }

/* "Next" CTA */
.next-cta {
  margin: 3em 0 0;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.next-cta:hover {
  border-color: var(--color-accent);
}
.next-cta-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  font-weight: 600;
}
.next-cta-title {
  font-size: 17px;
  font-weight: 500;
  margin-top: 2px;
}
.next-cta-arrow {
  font-size: 22px;
  color: var(--color-accent);
}

/* Pitfalls sidebar (inline on course pages) */
.pitfalls-inline {
  margin: 2em 0;
  padding: 16px 20px;
  background: var(--color-warn-soft);
  border-left: 3px solid var(--color-warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
}
.pitfalls-inline h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-warn);
  font-weight: 700;
}
.pitfalls-inline ul { margin: 0; padding-left: 1.2em; }

/* Tag chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1em 0;
}
.chip {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  background: var(--color-bg-soft);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
}
.chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Worked example box */
.example {
  margin: 1.8em 0;
  padding: 20px 24px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
}
.example > :first-child { margin-top: 0; }
.example > :last-child { margin-bottom: 0; }

/* Accent-colored subheading (marks a sequence of stages within a section) */
.subhead-accent {
  color: var(--color-accent);
}

/* Bordered wrapper for an illustrative diagram image */
.figure-diagram {
  margin: 1.5em auto;
  max-width: 340px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.figure-diagram img {
  display: block;
  width: 100%;
  height: auto;
}

/* Pull-quote figure (quoting an external source) */
.pull-quote {
  margin: 1.5em 0;
  padding: 1.4em 1.6em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}
.pull-quote blockquote {
  margin: 0;
  padding: 0;
  border: none;
  font-style: italic;
  font-size: 1.1em;
  line-height: 1.5;
  color: var(--color-text);
}
.pull-quote figcaption {
  margin-top: 0.9em;
  font-size: 0.85em;
  color: var(--color-text-muted);
}

/* Prompt window (mocks a literal prompt box, e.g. what you'd type to an agent) */
.prompt-window {
  margin: 1.2em 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.prompt-window-header {
  padding: 6px 14px;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
}
.prompt-window pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

/* "Stub" banner for unfinished pages */
.stub-banner {
  margin: 0 0 32px;
  padding: 14px 18px;
  background: var(--color-warn-soft);
  border: 1px solid #ecdca6;
  border-radius: var(--radius);
  font-size: 14px;
  color: #6b5610;
}
.stub-banner strong { color: #4a3c08; }

/* Hero on home page */
.hero {
  padding: 72px 0 32px;
  text-align: left;
}
.hero h1 {
  font-size: 48px;
  letter-spacing: -0.03em;
  margin: 0;
}
.hero p {
  font-size: 20px;
  color: var(--color-text-muted);
  max-width: 620px;
  margin-top: 18px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 24px;
  font-size: 13px;
  color: var(--color-text-faint);
  text-align: center;
}
.site-footer a {
  color: var(--color-text-muted);
  border-bottom: none;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 15px;
  border: 1.5px solid #c8bfa8;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid #ddd6c6;
}
td:not(:last-child),
th:not(:last-child) {
  border-right: 1px solid #ddd6c6;
}
th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a3f2f;
  background: #ede8df;
  border-bottom: 1.5px solid #c8bfa8;
  border-right-color: #c8bfa8;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: #f7f3ed;
}
