:root {
  --bg: #eef0f2; --sidebar-bg: #f4f5f6; --card-bg: #ffffff; --border: #d7dbdd;
  --text: #20242a; --muted: #5b6470; --accent: #daa425; --track-bg: #d7dbdd;
  --row-active-bg: #e6ebee; --muted-badge: #dfe3e6; --done-title: #6b7480;
  --pill-bg: #faf1d9; --pill-text: #7d5e0e; --flagship-bg: #fbf3dc;
  /* Gold for text and links. The bright --accent is too pale to read as text
     on light backgrounds (about 2:1); this darker gold reads at 5.3:1 or more.
     Keep --accent for fills: buttons, bars, borders, and badges. */
  --accent-text: #7d5e0e; --input-border: #8b939c; --error: #b3401f;
}
[data-theme="dark"] {
  --bg: #14181c; --sidebar-bg: #191d22; --card-bg: #1f2429; --border: #2d3339;
  --text: #e7eaec; --muted: #8b939c; --accent: #daa425; --track-bg: #2d3339;
  --row-active-bg: #262b31; --muted-badge: #2d3339; --done-title: #8b939c;
  --pill-bg: #332c16; --pill-text: #f0c352; --flagship-bg: #2b2511;
  /* Dark mode: the bright gold already reads well on dark backgrounds. */
  --accent-text: #daa425; --input-border: #5d6670; --error: #ef7a55;
}
* { box-sizing: border-box; }
/* Layout rules respond to the width of the page content, not the screen
   (@container, not @media), so the A+ text size re-flows the page to fit. */
#zoom-wrap { container-type: inline-size; }
/* Phones: the header keeps "Prepared by Taylor Halverson" and drops the two
   degree lines (they're on the About page), so pages start higher. */
@media (max-width: 600px) { .hdr-creds, .hdr-about { display: none; } }
body {
  margin: 0; font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg); color: var(--text);
}
a { text-decoration: none; color: inherit; }
textarea { font-family: Georgia, serif; }
.theme-toggle {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--border); background: var(--card-bg);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle svg { stroke: var(--text); fill: var(--text); }
.theme-toggle #icon-sun { display: none; }
.theme-toggle #icon-moon { display: block; }
[data-theme="dark"] .theme-toggle #icon-sun { display: block; }
[data-theme="dark"] .theme-toggle #icon-moon { display: none; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 18px; background: var(--pill-bg); color: var(--pill-text); font-size: 13px; font-weight: bold; }

/* --- Added for full 54-course curriculum: additive only, no existing rules changed --- */
.badge-core, .badge-bonus {
  display: inline-block; font-size: 10px; font-weight: bold; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 10px; margin-left: 8px;
  vertical-align: middle;
}
.badge-core { background: var(--muted-badge); color: var(--muted); }
.badge-bonus { background: var(--pill-bg, var(--muted-badge)); color: var(--accent-text); }

.callout-box {
  border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px;
  background: var(--card-bg); margin-bottom: 4px;
}
.callout-label {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: bold; color: var(--muted); margin-bottom: 8px;
}
.callout-box.watch-for .callout-label { color: var(--accent-text); }

.before-callout {
  border: 1px solid var(--accent); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 16px 20px; background: var(--card-bg);
  margin-bottom: 16px;
}
.before-callout .callout-label { color: var(--accent-text); }

.category-chip {
  display: inline-block; padding: 6px 14px; border-radius: 16px; font-size: 13px;
  border: 1px solid var(--border); background: var(--card-bg); color: var(--text);
  cursor: pointer; margin: 0 8px 8px 0; user-select: none;
}
.category-chip.active { background: var(--accent); color: #20242a; border-color: var(--accent); }

.sidebar-overview-row {
  font-weight: bold;
}

/* --- Learning paths: additive only --- */
.path-bar { height: 5px; width: 100%; border-radius: 5px; background: var(--track-bg); overflow: hidden; margin: 10px 0 2px 0; }
.path-bar > div { height: 5px; background: var(--accent); }
.path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.path-grid.large { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.path-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card-bg); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.path-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.path-card.large { padding: 24px; border-color: var(--accent); }
.path-card-level { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); font-weight: bold; }
.path-card-name { font-size: 17px; font-weight: bold; line-height: 1.3; }
.path-card.large .path-card-name { font-size: 21px; }
.path-card-promise { font-size: 13px; color: var(--muted); line-height: 1.5; flex-grow: 1; }
.path-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.path-card-meta { font-size: 12px; color: var(--muted); }
.follow-btn, .save-btn {
  font-family: Georgia, serif; font-size: 12.5px; font-weight: bold; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent); background: transparent; color: var(--accent-text); white-space: nowrap;
}
.follow-btn.on, .save-btn.on { background: var(--accent); color: #20242a; }
.save-btn.small { font-size: 11px; padding: 3px 9px; }
.role-badge { display: inline-block; font-size: 10px; font-weight: bold; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 10px; background: var(--muted-badge); color: var(--muted); }
.role-badge.start { background: var(--pill-bg); color: var(--pill-text); }
.section-label { font-size: 19px; font-weight: bold; margin: 0 0 6px 0; }
.section-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.link-btn { background: none; border: none; padding: 0; font-family: Georgia, serif; font-size: 13px; color: var(--accent-text); cursor: pointer; }
.group-label { margin: 48px 0 4px 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); font-weight: bold; }
.group-label.first { margin-top: 8px; border-top: none; padding-top: 0; }
.path-card-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 72px; margin: -18px -18px 12px -18px; border-radius: 11px 11px 0 0; overflow: hidden; background: #14181c; }
.path-card.large .path-card-strip { height: 96px; margin: -24px -24px 14px -24px; }
/* YouTube stills are 4:3 with black bands above and below the 16:9 picture.
   Scaling the height to 134% pushes the bands out of these narrow tiles. */
.path-card-strip > div { background: #14181c center / auto 134% no-repeat; }
.finder-entry { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding: 18px 20px; border-radius: 12px; border: 1px dashed var(--accent); background: var(--card-bg); }
.finder-entry-title { font-size: 17px; font-weight: bold; }
.finder-entry-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.finder-panel { max-width: 640px; }
.finder-step { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); font-weight: bold; }
.finder-close { background: none; border: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.finder-q { margin: 8px 0 14px 0; font-size: 22px; line-height: 1.3; }
.finder-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.finder-opt { font-family: Georgia, serif; font-size: 14.5px; text-align: left; line-height: 1.3; padding: 10px 14px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); background: var(--bg); color: var(--text); transition: border-color 0.12s ease, transform 0.12s ease; }
.finder-opt:hover, .finder-opt:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.finder-opt.on { border-color: var(--accent); background: var(--pill-bg); }
.finder-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.finder-why { font-size: 16px; font-style: italic; line-height: 1.5; margin: 10px 0 16px 0; }
.finder-also { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: bold; margin: 22px 0 10px 0; }
@container (max-width: 480px) {
  .finder-opts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .finder-opt { font-size: 13.5px; padding: 9px 11px; }
  .finder-q { font-size: 19px; }
}
.finder-course { display: flex; flex-direction: column; gap: 10px; max-width: 300px; }
.finder-course .course-card { min-height: 0; }
.finder-course-cta .unlock-btn { display: block; text-align: center; }
.finder-note { font-size: 13px; color: var(--muted); margin: -4px 0 10px 0; }

/* Header "Account" menu (assets/header.js). */
.acct-menu { position: relative; }
.acct-btn { white-space: nowrap; font-family: Georgia, serif; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; min-height: 36px; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { color: var(--text); border-color: var(--accent); }
.acct-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 230px; max-width: 86vw; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); padding: 8px 0; }
.acct-pop[hidden] { display: none; }
.acct-who { font-size: 13px; color: var(--muted); padding: 8px 16px 10px 16px; border-bottom: 1px solid var(--border); margin-bottom: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.acct-who strong { color: var(--text); }
.acct-pop a { display: block; padding: 10px 16px; font-size: 14px; color: var(--text); text-decoration: none; }
.acct-pop a:hover, .acct-pop a:focus { background: var(--track-bg); }

/* A clear ring around whatever the keyboard is on (assets/a11y.js). */
[role="button"]:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--card-bg); color: var(--text); padding: 10px 16px; border-radius: 8px; border: 2px solid var(--accent); }
.skip-link:focus { left: 8px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[data-theme="dark"] .badge-core { color: #b3bac2; }

/* Weekly Study (weekly.html, and the "This week" box on the home page) */
.wk-wrap { max-width: 900px; margin: 0 auto; padding: 28px 24px 56px 24px; }
.wk-wrap h1 { margin: 0 0 10px 0; font-size: 30px; }
.wk-intro { font-size: 17px; line-height: 1.7; margin: 0 0 24px 0; max-width: 720px; }
.wk-week { border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); padding: 18px 20px; margin-bottom: 14px; scroll-margin-top: 16px; }
.wk-week.now { border: 2px solid var(--accent); }
.wk-week:target { box-shadow: 0 0 0 3px var(--accent); }
.wk-when { font-size: 19px; font-weight: bold; color: var(--accent-text); display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.wk-now { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--accent); color: #20242a; font-size: 15px; font-weight: bold; }
.wk-reading { font-size: 26px; font-weight: bold; margin: 6px 0 16px 0; line-height: 1.25; }
.wk-week.hero { border: none; background: none; padding: 8px 0 0 0; }
.wk-week.hero .wk-reading { font-size: 44px; margin: 6px 0 20px 0; }
.wk-more { margin-top: 22px; max-width: 720px; }
.wk-more summary { cursor: pointer; font-size: 16px; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.wk-more .wk-lessons { margin-top: 8px; }
.wk-lessons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px 22px; }
.wk-lessons li { font-size: 16px; line-height: 1.4; }
.wk-lesson { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.wk-lesson:hover .wk-ltitle { text-decoration: underline; }
.wk-thumb { flex: 0 0 112px; aspect-ratio: 16 / 9; border-radius: 6px; background: #14181c center / cover no-repeat; }
.wk-ltext { min-width: 0; }
.wk-ltitle { font-weight: bold; }
.wk-from { display: block; font-size: 14px; color: var(--muted); font-weight: normal; }
.wk-year { font-size: 24px; margin: 34px 0 14px 0; }
.wk-toggle { min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text); font-size: 15px; cursor: pointer; font-family: inherit; margin-bottom: 14px; }
@media (max-width: 600px) { .wk-wrap { padding: 20px 16px 48px 16px; } .wk-reading { font-size: 22px; } .wk-week.hero .wk-reading { font-size: 34px; } }
.wk-feature { max-width: 720px; }
.wk-fthumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; background: #14181c center / cover no-repeat; }
.wk-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(20,24,28,0.72); }
.wk-play::after { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #eef0f2; }
.wk-ftitle { display: block; margin-top: 14px; font-size: 24px; font-weight: bold; line-height: 1.3; color: var(--text); }
.wk-ftitle:hover { text-decoration: underline; }
.wk-why { font-size: 16px; line-height: 1.55; margin: 8px 0; }
.wk-watch { display: inline-block; margin-top: 6px; min-height: 52px; box-sizing: border-box; padding: 14px 30px; border-radius: 10px; background: var(--accent); color: #20242a; font-size: 18px; font-weight: bold; }
.wk-note { font-size: 14px; color: var(--muted); margin-top: 8px; }
.wk-tag { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.wk-tag.free { padding: 1px 8px; border-radius: 999px; background: var(--pill-bg); color: var(--pill-text); font-weight: bold; }
@media (max-width: 640px) { .wk-ftitle { font-size: 21px; } .wk-watch { display: block; text-align: center; } }
/* Main menu in the site header (assets/header.js) */
.hdr-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.hdr-btn { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); color: var(--text); font-size: 15px; font-weight: bold; line-height: 1.2; }
.hdr-btn:hover { border-color: var(--accent); color: var(--accent-text); }
/* "Get next week's free lesson" sign-up (assets/weekly.js) */
.signup-form { display: flex; gap: 10px; flex-wrap: wrap; }
.signup-form input[type=email] { flex: 1 1 220px; min-height: 48px; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--input-border); border-radius: 8px; font-family: Georgia, serif; font-size: 16px; background: var(--card-bg); color: var(--text); }
.signup-form button { min-height: 48px; padding: 12px 22px; border: none; border-radius: 8px; background: var(--accent); color: #20242a; font-family: Georgia, serif; font-size: 16px; font-weight: bold; cursor: pointer; }
.signup-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wk-signup { max-width: 720px; margin: 0 0 28px 0; }
