/* PathwayMBA — one stylesheet for the whole site.
   Change the brand here: every page, chart and button reads these variables. */

:root {
  /* Ground and text */
  --paper: #EFEADB;        /* page background */
  --paper-2: #E7E1CE;      /* boxes and asides */
  --card: #F6F3E9;         /* raised cards, inputs */
  --ink: #1C2530;          /* main text, dark buttons */
  --ink-2: #2E3644;        /* body text in boxes */
  --muted: #4A5262;        /* labels, captions */
  --rule: #D6CFB8;         /* hairlines */
  --rule-2: #C7BFA4;       /* stronger lines, borders */
  --input-border: #A9A28B;

  /* Colour roles in diagrams (keep the meanings) */
  --kept: #2F6156;         /* what the business keeps */
  --kept-tint: #E2EBE6;
  --kept-light: #7FBFAE;   /* kept, on dark grounds */
  --spent: #8B4A3D;        /* what it pays out */
  --spent-2: #A66354;
  --spent-3: #C08272;
  --spent-tint: #F3E4DF;
  --marker: #B8842C;       /* targets and thresholds */
  --marker-text: #7A5A1E;
  --hatch-a: #D9D2BC;      /* money that was never yours (tax) */
  --hatch-b: #C7BFA4;
  --grid: #DDD6C0;

  /* Type */
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --text: 1.125rem;        /* 18px body */
  --small: 0.9375rem;      /* 15px */
  --label: 0.75rem;        /* 12px small caps labels */

  /* Layout */
  --measure: 40rem;        /* reading column */
  --gutter: 1.25rem;
  --radius: 3px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--text);
  line-height: 1.6;
  font-variant-numeric: lining-nums;
}
img, svg { max-width: 100%; }
a { color: var(--kept); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--marker); outline-offset: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.015em; }
h2 { font-size: 1.5rem; line-height: 1.2; }
h3 { font-size: 1.25rem; }
p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- Building blocks ---------- */
.wrap { max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack-lg { display: flex; flex-direction: column; gap: 2.25rem; }

.label {
  font-family: var(--sans); font-size: var(--label); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.label.kept { color: var(--kept); }
.label.marker { color: var(--marker-text); }
.label.spent { color: var(--spent); }
.sans { font-family: var(--sans); }
.muted { color: var(--muted); }
.small { font-size: var(--small); line-height: 1.55; }
.lead { font-size: 1.15rem; line-height: 1.5; color: var(--ink-2); }

.badge {
  display: inline-block; font-family: var(--sans); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px;
  border: 1.5px solid currentColor;
}
.badge.core { color: var(--kept); }
.badge.depth { color: var(--marker-text); border-color: var(--marker); }
.badge.practice { color: var(--spent); }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0 1.25rem; width: 100%;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; text-decoration: none;
  border-radius: var(--radius); border: 1.5px solid var(--ink); cursor: pointer;
  background: var(--ink); color: var(--paper);
}
.btn:hover { color: var(--paper); background: #2A3644; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--card); color: var(--ink); }
.btn.kept { background: var(--kept); border-color: var(--kept); }
.btn[disabled] { background: var(--rule); border-color: var(--rule); color: var(--muted); cursor: default; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field input[type=email], .field input[type=text] {
  height: 50px; padding: 0 0.875rem; border: 1px solid var(--input-border); background: #FBF9F3;
  font-family: var(--sans); font-size: 1rem; color: var(--ink); border-radius: 2px; width: 100%;
}
.notice {
  display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.875rem;
  font-family: var(--sans); font-size: 0.875rem; line-height: 1.45;
  background: var(--kept-tint); color: #1F4A41;
}
.notice.warn { background: var(--spent-tint); color: #6E3328; }
.box { background: var(--paper-2); padding: 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.box p { font-size: var(--small); line-height: 1.55; color: var(--ink-2); }

/* ---------- Header and footer ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 56px; }
.logo { display: block; line-height: 0; }
.logo img { width: 137px; height: 22px; }
.header-links { display: flex; gap: 0.25rem; align-items: center; font-family: var(--sans); font-size: 0.9375rem; }
.header-links a { color: var(--ink); text-decoration: none; padding: 0.75rem 0.5rem; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.site-footer { margin-top: 4rem; padding-block: 2rem; font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 0.4rem; }

/* Reader header with progress */
.reader-bar { position: sticky; top: env(safe-area-inset-top, 0px); background: var(--paper); border-bottom: 1px solid var(--rule); z-index: 5; }
.reader-bar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding-inline: 0.25rem; }
.reader-bar .title { font-family: var(--sans); font-size: 0.875rem; font-weight: 600; }
.progress { height: 3px; background: var(--rule); }
.progress > div { height: 3px; background: var(--kept); width: 0; transition: width 0.2s; }
@media (prefers-reduced-motion: reduce) { .progress > div { transition: none; } }

/* ---------- Landing ---------- */
.hero { padding-block: 2.25rem 2rem; }
.sample-card { background: var(--card); border: 1px solid var(--rule); padding: 1.4rem 1.25rem; display: flex; flex-direction: column; gap: 0.9rem; }
.sample-card .claim { font-size: 1.375rem; line-height: 1.25; font-weight: 500; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.steps li { display: flex; gap: 0.9rem; }
.steps .n { font-size: 1.5rem; line-height: 1.1; color: var(--kept); min-width: 1.1rem; }
.rows { border-top: 1px solid var(--rule); }
.rows > div { display: flex; justify-content: space-between; gap: 0.75rem; padding-block: 0.75rem; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.rows .when { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.price-card { padding: 1.25rem; border: 1px solid var(--rule-2); display: flex; flex-direction: column; gap: 0.35rem; }
.price-card.main { border: 2px solid var(--ink); background: var(--card); }
.price-card .amount { font-size: 2.125rem; line-height: 1; }
.price-card .per { font-size: 1rem; color: var(--muted); }
.faq > div { padding-block: 0.9rem; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.35rem; }
.faq > div:last-child { border-bottom: 1px solid var(--rule); }
.faq .q { font-size: 1.0625rem; font-weight: 500; }
.faq .a { font-size: var(--small); color: var(--ink-2); }

/* ---------- Plans (join) ---------- */
.plans { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.plan { display: flex; align-items: center; gap: 0.9rem; padding: 1rem; border: 1px solid var(--rule-2); cursor: pointer; }
.plan:has(input:checked) { border: 2px solid var(--ink); background: var(--card); padding: calc(1rem - 1px); }
.plan input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.plan .name { font-size: 1.125rem; font-weight: 500; }
.plan .sub { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); }
.plan .price { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.plan .was { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); text-decoration: line-through; }

/* Dark page (invite) */
.ink-page { background: var(--ink); color: var(--paper); min-height: 100vh; }
.ink-page .site-header { border-color: #3B4553; }
.ink-page .label { color: var(--kept-light); }
.ink-page .lead { color: #C9C4B4; }
.ink-page .field input { background: #242E3B; border-color: #5A6472; color: var(--paper); }
.ink-page .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- Course home ---------- */
.session-list { border-top: 1px solid var(--rule-2); }
.session { display: flex; align-items: center; gap: 0.9rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.session .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); flex: none; display: flex; align-items: center; justify-content: center; }
.session .dot.done { background: var(--kept); border-color: var(--kept); }
.session .dot.later { border-color: var(--input-border); }
.session .what { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.session .what b { font-weight: 500; font-size: 1.125rem; }
.session .what span { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); }
.stage-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.stage-bar > div { height: 8px; background: var(--rule); }
.stage-bar > div.done { background: var(--kept); }
.stage-bar > div.exam { background: var(--marker); }
.mastery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.mastery > div { padding: 0.875rem 0.625rem; border: 1px solid var(--rule-2); display: flex; flex-direction: column; gap: 0.35rem; }
.mastery .count { font-size: 1.375rem; line-height: 1; }
.contents details { border-top: 1px solid var(--rule); }
.contents details:last-child { border-bottom: 1px solid var(--rule); }
.contents summary { cursor: pointer; padding-block: 0.875rem; font-size: 1.0625rem; font-weight: 500; list-style-position: outside; }
.contents ol { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-direction: column; }
.contents li { display: flex; gap: 0.75rem; align-items: baseline; padding-block: 0.4rem; font-size: 1rem; }
.contents .wk { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); min-width: 3.25rem; }
.contents .soon { color: var(--muted); }

/* ---------- Chapter ---------- */
.chapter { padding-block: 1.75rem 2rem; }
.chapter p { font-size: var(--text); line-height: 1.6; }
.chapter h2 { margin-top: 1rem; }
.formula { padding: 1.1rem 1rem; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); display: flex; flex-direction: column; gap: 0.35rem; font-size: 1.25rem; line-height: 1.35; }
.formula .result { font-style: italic; color: var(--kept); }
.cold { background: var(--paper-2); padding: 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cold dl { margin: 0; display: grid; gap: 0.6rem; }
.cold dt { font-weight: 500; font-size: 1rem; }
.cold dd { margin: 0; font-size: 1rem; color: var(--ink-2); }
.decisions { display: flex; flex-direction: column; gap: 1rem; }
.decisions p b { font-weight: 600; }
.figure { margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.6rem; }
.figure figcaption { font-size: var(--small); font-style: italic; color: var(--muted); }
.chart-text { font-family: var(--sans); }
.chart-serif { font-family: var(--serif); }

/* Strip diagrams (to-scale bars) */
.strip { display: flex; height: 40px; }
.strip > div { height: 100%; }
.strip .hatch { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 5px, var(--hatch-b) 5px 7px); }
.strip .spent { background: var(--spent); }
.strip .spent-2 { background: var(--spent-2); }
.strip .spent-3 { background: var(--spent-3); }
.strip .kept { background: var(--kept); color: var(--paper); display: flex; align-items: center; justify-content: flex-end; padding-right: 0.6rem; font-size: 1.0625rem; font-weight: 500; }
.strip-key { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); }
.strip-key .kept { color: var(--kept); font-weight: 600; }
.track { position: relative; height: 22px; background: #E1DAC4; }
.track .fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.track .target { position: absolute; right: 0; top: -6px; width: 2px; height: 34px; background: var(--marker); }

.sample-banner { background: var(--ink); color: var(--paper); }
.sample-banner .wrap { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; padding-block: 0.75rem; font-family: var(--sans); font-size: 0.875rem; }
.sample-banner a { color: var(--paper); font-weight: 600; white-space: nowrap; }

/* ---------- Quiz ---------- */
.quiz { padding-block: 1.5rem 2rem; min-height: 70vh; display: flex; flex-direction: column; gap: 1rem; }
.quiz .prompt { font-size: 1.375rem; line-height: 1.3; font-weight: 500; }
.options { display: flex; flex-direction: column; gap: 0.6rem; }
.option {
  min-height: 52px; padding: 0.75rem 0.875rem; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--rule-2); border-radius: var(--radius);
  font-family: var(--serif); font-size: 1.0625rem; color: var(--ink); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
}
.option[aria-pressed=true] { border: 2px solid var(--ink); font-weight: 500; padding: calc(0.75rem - 1px) calc(0.875rem - 1px); }
.option.right { background: var(--kept-tint); border: 2px solid var(--kept); }
.option.wrong { background: var(--spent-tint); border: 2px solid var(--spent); }
.option.dim { background: transparent; border-color: var(--rule); color: #6A6F78; }
.option .tag { font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.option.right .tag { color: var(--kept); }
.option.wrong .tag { color: var(--spent); }
.option[disabled] { cursor: default; }
.quiz .why { font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.quiz .actions { margin-top: auto; padding-top: 1rem; }
.score { font-size: 4.5rem; line-height: 1; }

/* Pagefind search tweaks */
.search-page { --pagefind-ui-font: var(--serif); --pagefind-ui-primary: var(--ink); --pagefind-ui-text: var(--ink); --pagefind-ui-background: var(--card); --pagefind-ui-border: var(--rule-2); --pagefind-ui-tag: var(--paper-2); --pagefind-ui-border-radius: 3px; }

@media (min-width: 720px) {
  :root { --gutter: 2rem; }
  .hero { padding-block: 4rem 3rem; }
  .btn.inline { width: auto; display: inline-flex; }
}
