/* Styx web — the instrument identity, ported from Sources/Design/Theme.swift.
   Fixed dark palette (never adaptive), typography-led, semantic colour only,
   gold headings — never grey on black (owner directive). */

:root {
  --bg: #0C0D0F;
  --fill: #151719;
  --raised: #1C1F22;
  --ink: #F2F3F5;
  --dim: #B6BCC4;
  --faint: #8E959E;
  --head: #F5C542;
  --line: rgba(255, 255, 255, 0.07);
  --green: #4ADE80;
  --red: #FB7185;
  --blue: #38BDF8;
  --violet: #A78BFA;
  --teal: #2DD4BF;
  --amber: #FBBF24;
  --pink: #F0ABFC;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

.boot { padding: 60px; color: var(--faint); font-family: var(--mono); font-size: 12px; }

/* ---------- layout ---------- */

.page { max-width: 1000px; margin: 0 auto; padding: 22px 20px 60px; }
.reading { max-width: 760px; margin: 0 auto; }

.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.topbar .wordmark {
  font-family: Georgia, serif; font-weight: 700; font-size: 20px; color: var(--head);
  text-shadow: 0 0 14px rgba(245, 197, 66, 0.35);
}
.topbar .spacer { flex: 1; }

.h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.9px; }
.subtitle { font-size: 13.5px; color: var(--dim); margin: 4px 0 18px; }

.backbtn { color: var(--faint); font-size: 14px; padding: 6px 10px 6px 0; }
.backbtn:hover { color: var(--ink); }

.sectionlabel {
  font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: 1.3px;
  color: var(--head); text-transform: uppercase;
}

/* ---------- chips / badges ---------- */

.chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip {
  font-size: 13px; font-weight: 700; color: var(--dim);
  padding: 8px 16px; border-radius: 999px; background: var(--fill);
  border: 1px solid var(--line); transition: all 0.15s;
}
.chip.on {
  color: var(--bg); background: var(--head); border-color: var(--head);
  box-shadow: 0 0 16px rgba(245, 197, 66, 0.3);
}

.streak {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 12px; font-weight: 800;
  padding: 5px 11px; border-radius: 999px; background: var(--fill); color: var(--faint);
}
.streak.lit { color: var(--amber); background: rgba(251, 191, 36, 0.1);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }

/* ---------- deck grid ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }

.modcard {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 140px; padding: 14px 12px; text-align: center;
  background: var(--fill); border: 1.2px solid var(--line); border-radius: 18px;
  transition: transform 0.12s, border-color 0.12s;
}
.modcard:hover { transform: translateY(-2px); border-color: var(--accent, var(--blue)); }
.modcard .modnum {
  font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px;
  color: var(--accent, var(--blue));
}
.modcard .modtitle { font-size: 16.5px; font-weight: 700; letter-spacing: -0.4px; }
.modcard .modmeta { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.modcard .modmeta.some { color: var(--accent, var(--blue)); }
.modcard .modmeta.done { color: var(--green); }
.modcard.complete { opacity: 0.7; border-color: rgba(74, 222, 128, 0.35); }

.bigentry {
  display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%;
  min-height: 110px; justify-content: center; margin-bottom: 14px;
  background: rgba(167, 139, 250, 0.08); border: 1.2px solid rgba(167, 139, 250, 0.3);
  border-radius: 18px; padding: 16px;
}
.bigentry:hover { border-color: var(--violet); }
.bigentry .t { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; }
.bigentry .m { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.bigentry .icon { font-size: 20px; filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.6)); }

/* ---------- completed sink ---------- */

.completedgroup { margin-top: 16px; }
.completedgroup > button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 12px 14px; border-radius: 13px; background: rgba(21, 23, 25, 0.6);
  border: 1px solid rgba(74, 222, 128, 0.2); color: var(--dim);
  font-size: 13.5px; font-weight: 700;
}
.completedgroup .count { font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--green); }
.completedgroup .chev { margin-left: auto; color: var(--faint); transition: transform 0.2s; }
.completedgroup.open .chev { transform: rotate(90deg); }
.completedgroup .body { margin-top: 10px; display: none; }
.completedgroup.open .body { display: block; }

/* ---------- module detail ---------- */

.modhead { text-align: center; padding-top: 10px; }
.modhead .label { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.modhead h2 { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1.2; margin-top: 8px; }
.modhead .progress { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 7px; }
.modhead .progress.some { color: var(--green); }

.topiccard {
  display: block; width: 100%; text-align: left; padding: 16px; margin-top: 11px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 18px;
  transition: border-color 0.12s;
}
.topiccard:hover { border-color: var(--accent, var(--blue)); }
.topiccard .row1 { display: flex; align-items: center; gap: 10px; }
.topiccard .num {
  font-family: var(--mono); font-size: 11px; font-weight: 800;
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--accent, var(--blue)); background: color-mix(in srgb, var(--accent, var(--blue)) 12%, transparent);
}
.topiccard .chev { margin-left: auto; color: var(--faint); font-size: 12px; }
.topiccard h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.5px; margin: 9px 0 6px; }
.topiccard .bite { font-size: 12.5px; font-style: italic; color: var(--dim); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topiccard .facechips { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.topiccard .facechip {
  font-size: 8.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
}
.topiccard.done { opacity: 0.7; border-color: rgba(74, 222, 128, 0.25); }
.topiccard.done h3 { color: var(--dim); }
.topiccard .num.g { color: var(--green); background: rgba(74, 222, 128, 0.12); }

/* ---------- modal ---------- */

.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px);
  display: flex; align-items: stretch; justify-content: center; z-index: 50;
}
.panel {
  background: var(--bg); width: 100%; max-width: 820px; height: 100%;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.panel .phead {
  display: flex; align-items: center; gap: 11px; padding: 12px 18px;
  background: rgba(21, 23, 25, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.panel .phead .titles { min-width: 0; flex: 1; }
.panel .phead .mod { font-family: var(--mono); font-size: 10px; color: var(--head);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .phead .ttl { font-size: 16.5px; font-weight: 700; letter-spacing: -0.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .pbody { flex: 1; overflow-y: auto; padding: 16px 20px 26px; }
.panel .pbody > .inner { max-width: 720px; margin: 0 auto; }

.iconbtn { color: var(--faint); font-size: 16px; padding: 4px; }
.iconbtn:hover { color: var(--ink); }

.donebtn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--faint);
  padding: 6px 11px; border-radius: 999px; background: var(--fill);
  border: 1px solid var(--line); white-space: nowrap;
}
.donebtn.on { color: var(--green); background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.5); box-shadow: 0 0 12px rgba(74, 222, 128, 0.25); }

.dots { display: flex; gap: 4px; align-items: center; }
.dots .dot { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: all 0.15s; }
.dots .dot.seen { background: var(--dim); }
.dots .dot.on { width: 16px; background: var(--accent, var(--blue));
  box-shadow: 0 0 8px var(--accent, var(--blue)); }

.facebar {
  display: flex; gap: 6px; padding: 8px 16px; flex-shrink: 0;
  background: rgba(21, 23, 25, 0.85); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.facetab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 11px; color: var(--faint);
  font-size: 9px; font-weight: 700;
}
.facetab .fi { font-size: 15px; }
.facetab.on { color: var(--fc); background: color-mix(in srgb, var(--fc) 12%, transparent); }
.facetab.on .fi { filter: drop-shadow(0 0 8px var(--fc)); }

/* ---------- faces ---------- */

.face { --accent: var(--blue); }

.problembox {
  padding: 15px; border-radius: 15px; background: var(--raised);
}
.problembox .sectionlabel { display: block; margin-bottom: 9px; }

.downarrow { text-align: center; padding: 7px 0; color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent)); font-size: 15px; font-weight: 700; }

.answerbox {
  padding: 15px; border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.answerbox .answer { font-size: 17px; font-weight: 600; line-height: 1.55; margin-top: 9px; }

.needs { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.need { display: flex; gap: 10px; }
.need .b { width: 5px; height: 5px; border-radius: 3px; background: var(--accent); margin-top: 8px; flex-shrink: 0; }
.need .k { font-size: 13.5px; font-weight: 800; color: var(--accent); }
.need .v { font-size: 13px; color: var(--dim); line-height: 1.5; }

.tradebox {
  margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--bg);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px;
}
.trade { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; }
.trade .b { width: 5px; height: 5px; border-radius: 3px; background: var(--accent); margin-top: 8px; flex-shrink: 0; }
.trade .lbl { font-weight: 700; }
.trade .ver { font-weight: 700; color: var(--accent); }
.trade .det { color: var(--dim); }

.compstrip { display: flex; gap: 8px; overflow-x: auto; margin-top: 16px; padding-bottom: 6px; }
.compcard {
  flex-shrink: 0; width: 200px; padding: 12px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line);
}
.compcard.first { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.compcard .cn { font-family: var(--mono); font-size: 12.5px; font-weight: 800; margin-bottom: 8px; }
.compcard.first .cn { color: var(--accent); }
.compcard .cl { font-size: 9px; font-weight: 800; letter-spacing: 0.8px; color: var(--faint);
  text-transform: uppercase; margin-top: 8px; }
.compcard .cv { font-size: 12px; color: var(--dim); line-height: 1.45; margin-top: 3px; }

.trapbox {
  margin-top: 14px; padding: 12px; border-radius: 12px; display: flex; gap: 10px;
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25);
}
.trapbox .ti { color: var(--amber); filter: drop-shadow(0 0 7px rgba(251,191,36,0.6)); flex-shrink: 0; }

.facefooter {
  display: flex; gap: 6px; align-items: baseline; margin-top: 18px;
  font-family: var(--mono); font-size: 9.5px; color: var(--faint); line-height: 1.5;
}

/* steps face */
.steps h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 18px; line-height: 1.3; }
.step { display: flex; gap: 12px; }
.step .rail { display: flex; flex-direction: column; align-items: center; }
.step .n {
  font-family: var(--mono); font-size: 11.5px; font-weight: 800;
  width: 27px; height: 27px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.step.current .n { color: var(--bg); background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.step .rail .cord { width: 2px; flex: 1; background: var(--line); margin: 4px 0; }
.step .st { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; margin-top: 3px; }
.step .sd { padding-bottom: 18px; }

.bigbtn {
  display: block; width: 100%; padding: 14px; margin-top: 4px;
  border-radius: 13px; background: var(--accent); color: var(--bg);
  font-size: 14.5px; font-weight: 800;
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 45%, transparent);
}
.ghostbtn { display: block; width: 100%; text-align: center; padding: 8px;
  color: var(--faint); font-size: 12px; }

/* analogy face */
.analogyhead { text-align: center; padding: 10px 0; }
.analogyhead .em { font-size: 44px; letter-spacing: 7px; filter: drop-shadow(0 0 14px rgba(240,171,252,0.5)); }
.analogyhead h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-top: 9px; }
.scene {
  display: flex; gap: 13px; padding: 14px; margin-top: 9px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 14px;
}
.scene .si { font-size: 26px; flex-shrink: 0; }
.scene .who { font-weight: 700; color: var(--accent); }
.scene .isa { font-weight: 700; }
.scene .mid { color: var(--dim); }
.scene .how { font-size: 13px; color: var(--dim); line-height: 1.5; margin-top: 4px; }

/* interview face */
.soundbite {
  display: flex; gap: 10px; padding: 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 15px; font-weight: 600; font-style: italic; line-height: 1.5;
  margin-bottom: 12px;
}
.soundbite .q { color: var(--accent); font-size: 18px; font-family: Georgia, serif; }

.openq { font-size: 16.5px; font-weight: 700; line-height: 1.45; margin-bottom: 12px; }
.answerreveal {
  padding: 13px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
}
.grades { display: flex; gap: 7px; margin-top: 11px; }
.grade {
  flex: 1; padding: 10px; border-radius: 11px; font-size: 13px; font-weight: 700;
  color: var(--dim); background: var(--bg); border: 1.5px solid var(--line);
}
.grade.on-g { color: var(--green); border-color: var(--green); background: rgba(74,222,128,0.12);
  box-shadow: 0 0 10px rgba(74,222,128,0.3); }
.grade.on-a { color: var(--amber); border-color: var(--amber); background: rgba(251,191,36,0.12);
  box-shadow: 0 0 10px rgba(251,191,36,0.3); }
.grade.on-r { color: var(--red); border-color: var(--red); background: rgba(251,113,133,0.12);
  box-shadow: 0 0 10px rgba(251,113,133,0.3); }

.mcqopt {
  display: flex; gap: 10px; width: 100%; text-align: left; padding: 12px;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.5; margin-top: 8px;
}
.mcqopt .k { font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--faint); padding-top: 2px; }
.mcqopt.right { border: 1.5px solid var(--green); background: rgba(74,222,128,0.08);
  box-shadow: 0 0 10px rgba(74,222,128,0.25); }
.mcqopt.right .k { color: var(--green); }
.mcqopt.wrong { border: 1.5px solid var(--red); background: rgba(251,113,133,0.08); }
.mcqopt.wrong .k { color: var(--red); }
.mcqopt.dimmed { color: var(--faint); }

/* accordion (interview sections + problem reference) */
.acc { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--fill); }
.acc > button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 13px 14px; font-size: 15px; font-weight: 700; color: var(--ink);
}
.acc > button .an {
  font-family: var(--mono); font-size: 10.5px; font-weight: 800;
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  color: var(--aac, var(--blue)); background: color-mix(in srgb, var(--aac, var(--blue)) 12%, transparent);
}
.acc > button .title { color: var(--head); }
.acc > button .chev { margin-left: auto; color: var(--faint); transition: transform 0.2s; font-size: 11px; }
.acc.open > button .chev { transform: rotate(90deg); }
.acc .accbody { display: none; padding: 2px 14px 15px 42px; }
.acc.open .accbody { display: block; }

/* scenarios face */
.scenario {
  display: flex; gap: 12px; padding: 13px; margin-top: 10px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 13px;
}
.scenario .n {
  font-family: var(--mono); font-size: 11.5px; font-weight: 800;
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.scenario h4 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 4px; }
.anchorbox {
  text-align: center; padding: 14px; margin-top: 12px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 13px;
}
.anchorbox .a { font-size: 15.5px; font-weight: 700; font-style: italic; line-height: 1.45; margin-top: 6px; }
.edge { display: flex; gap: 9px; font-size: 13px; margin-top: 8px; }
.edge .kind { font-family: var(--mono); font-size: 8.5px; font-weight: 800; color: var(--accent);
  width: 96px; flex-shrink: 0; text-transform: uppercase; padding-top: 3px; }

/* ---------- rich text ---------- */

.rich .sent { margin-bottom: 12px; line-height: 1.55; }
.rich .sent:last-child { margin-bottom: 0; }
.rich { font-size: 13.5px; color: var(--dim); }
.rich.lead { font-size: 15px; color: var(--ink); }
.rich .num { font-family: var(--mono); color: var(--accent); font-weight: 600; font-size: 0.94em; }
.rich .acr { font-weight: 700; color: var(--ink); }

/* ---------- problems ---------- */

.chart { padding: 14px; border-radius: 16px; background: rgba(21,23,25,0.7);
  border: 1px solid var(--line); margin-top: 18px; }
.bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.bar .lv { font-family: var(--mono); font-size: 11px; font-weight: 800; width: 24px; }
.bar .track { flex: 1; height: 10px; border-radius: 5px; background: rgba(255,255,255,0.04); overflow: hidden; }
.bar .fillbar { height: 100%; border-radius: 5px; opacity: 0.8; }
.bar .n { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--dim); width: 26px; text-align: right; }
.stats { display: flex; gap: 14px; margin-top: 14px; }
.stat { flex: 1; }
.stat .v { font-family: var(--mono); font-size: 15px; font-weight: 800; }
.stat .l { font-size: 9.5px; color: var(--faint); }

.diffbadge { font-family: var(--mono); font-size: 10px; font-weight: 800; }

.probask {
  padding: 14px; border-radius: 14px; margin-top: 9px;
  background: rgba(167,139,250,0.1); border: 1.2px solid rgba(167,139,250,0.3);
  font-size: 16px; font-weight: 600; line-height: 1.6;
}

.bullet { display: flex; gap: 10px; margin-top: 7px; font-size: 13.5px; line-height: 1.55; }
.bullet .b { width: 5px; height: 5px; border-radius: 3px; margin-top: 8px; flex-shrink: 0; }

.decision { border-left: 2px solid var(--violet); padding-left: 11px; margin-top: 12px; }
.decision .d { font-size: 14px; font-weight: 700; }
.decision .rej { font-size: 11.5px; opacity: 0.75; margin-top: 4px; }

.fm { margin-top: 10px; }
.fm .mit { font-size: 12px; color: var(--faint); padding-left: 15px; margin-top: 3px; line-height: 1.5; }

/* ---------- code + drills (Coding Round topic) ---------- */

.codewrap { margin-top: 16px; }
.codeblock {
  margin-top: 8px; padding: 13px; border-radius: 12px; overflow-x: auto;
  background: var(--bg); border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 25%, transparent);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--ink);
}
.codeblock code { font-family: inherit; }

.lclink { color: inherit; border-bottom: 1px dotted var(--faint); }
.lclink:hover { color: var(--blue); border-color: var(--blue); }

.drill {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px; margin-bottom: 8px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 13px;
  transition: border-color 0.12s;
}
.drill:hover { border-color: var(--blue); }
.drill .dlc { font-family: var(--mono); font-size: 10.5px; font-weight: 800;
  width: 40px; flex-shrink: 0; padding-top: 3px; }
.drill .dbody { flex: 1; min-width: 0; }
.drill .dname { font-size: 14px; font-weight: 700; letter-spacing: -0.2px; display: block; }
.drill .ddiff { font-family: var(--mono); font-size: 8.5px; font-weight: 800; margin-left: 6px; }
.drill .dhint { font-size: 12px; color: var(--dim); line-height: 1.5; display: block; margin-top: 2px; }
.drill .dout { color: var(--faint); font-size: 12px; padding-top: 3px; }

/* ---------- python problem families ---------- */

.fammeta { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  margin-top: 10px; font-size: 12px; color: var(--dim); }
.fammeta b { color: var(--head); font-weight: 800; font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase; margin-right: 5px; }

.stepcard { margin-top: 14px; padding: 14px; border-radius: 15px;
  background: var(--fill); border: 1px solid var(--line); }
.steptitle { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; }
.stepn { font-family: var(--mono); font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; margin-right: 6px;
  color: var(--teal); background: rgba(45, 212, 191, 0.12); }

.fprose { font-size: 13.5px; color: var(--dim); line-height: 1.6; }
.stepnote { margin-top: 8px; padding: 10px 12px; border-left: 2px solid var(--teal);
  background: rgba(45, 212, 191, 0.06); border-radius: 0 10px 10px 0;
  white-space: pre-wrap; font-family: var(--mono); font-size: 11.5px; }
.fprose b { color: var(--ink); }
code.tick { font-family: var(--mono); font-size: 0.92em; color: var(--ink);
  background: rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 5px; }

/* ---------- business architectures ---------- */

.tag {
  font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
  text-transform: uppercase; padding: 2px 6px; border-radius: 5px; margin: 0 3px;
  white-space: nowrap; vertical-align: 1px;
}
.tag.rep { color: var(--green); background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3); }
.tag.recon { color: var(--faint); background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line); }

.honestykey { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 14px; padding: 11px 13px; border-radius: 12px;
  background: var(--fill); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--dim); }

.numbersbox { margin-top: 22px; padding: 14px; border-radius: 15px;
  background: rgba(251, 191, 36, 0.06); border: 1px solid rgba(251, 191, 36, 0.25); }

.modcard.capstone { background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.45); }
.stepword { font-family: var(--mono); font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.9px; text-transform: uppercase; color: var(--faint);
  margin-right: 4px; }

.tablewrap { overflow-x: auto; margin-top: 10px; border-radius: 12px;
  border: 1px solid var(--line); }
.stacktable { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 12.5px; }
.stacktable th {
  font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: 0.9px;
  text-transform: uppercase; color: var(--head); text-align: left;
  padding: 10px 12px; background: var(--fill); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.stacktable td { padding: 10px 12px; color: var(--dim); line-height: 1.5;
  border-bottom: 1px solid var(--line); vertical-align: top; }
.stacktable td.fn { color: var(--ink); font-weight: 700; white-space: nowrap; }
.stacktable tr:last-child td { border-bottom: none; }

/* ---------- design frameworks ---------- */

.bigentry.blue { background: rgba(56, 189, 248, 0.08); border-color: rgba(56, 189, 248, 0.3); }
.bigentry.blue:hover { border-color: var(--blue); }
.bigentry.blue .icon { filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6)); }

.fwlist { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto; }
.fwcard {
  display: flex; flex-direction: column; gap: 7px; padding: 14px 16px;
  background: var(--fill); border: 1.2px solid color-mix(in srgb, var(--accent, var(--blue)) 30%, transparent); border-radius: 18px;
  transition: transform 0.12s, border-color 0.12s;
}
.fwcard:hover { transform: translateY(-2px); border-color: var(--accent, var(--blue)); }
.fwcard.complete { opacity: 0.7; border-color: rgba(74, 222, 128, 0.35); }
.fwcard .row1 { display: flex; align-items: center; gap: 8px; }
.fwcard .row1 .spacer { flex: 1; }
.fwcard .key { font-family: var(--mono); font-size: 9.5px; font-weight: 800;
  letter-spacing: 1.2px; color: var(--accent, var(--blue)); }
.fwcard .ttl { font-size: 18px; font-weight: 700; letter-spacing: -0.4px; }
.fwcard .one { font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.fwcard .meta { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.fwcard .meta.done { color: var(--green); }

.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots i { width: 5px; height: 5px; border-radius: 3px; background: var(--line); display: inline-block; }
.dots i.on { background: var(--dot, var(--blue)); }

.dochead { display: flex; align-items: center; gap: 10px; }
.dochead .spacer { flex: 1; }
.donebtn { font-size: 11px; font-weight: 800; color: var(--faint); padding: 6px 11px;
  border-radius: 999px; background: var(--fill); border: 1px solid var(--line); }
.donebtn.on { color: var(--green); background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.5); box-shadow: 0 0 12px rgba(74, 222, 128, 0.25); }
.fwmeta { display: flex; align-items: center; gap: 10px; margin-top: 8px;
  font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.modhead .one { font-size: 14px; color: var(--dim); line-height: 1.55; margin-top: 10px; }

.secnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; position: sticky;
  top: 0; padding: 10px 0; background: var(--bg); z-index: 2; }
.secchip { font-family: var(--mono); font-size: 10.5px; font-weight: 800; color: var(--dim);
  padding: 6px 10px; border-radius: 999px; background: var(--fill); border: 1px solid var(--line); }
.secchip:hover { color: var(--ink); border-color: var(--blue); }

.docbody { --accent: var(--blue); }
.docbody h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; margin-top: 30px;
  padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 56px; }
.docbody h3 { font-size: 15.5px; font-weight: 800; color: var(--head); margin-top: 18px; }
.docbody p { font-size: 14px; color: var(--dim); line-height: 1.65; margin-top: 10px; }
.docbody p b { color: var(--ink); }
.docbody ul, .docbody ol { margin: 8px 0 0 20px; }
.docbody li { font-size: 14px; color: var(--dim); line-height: 1.6; margin-top: 4px; }
.docbody li::marker { color: var(--blue); font-family: var(--mono); font-size: 11px; font-weight: 800; }
.docbody .codeblock.doccode { margin-top: 12px; white-space: pre; }
.docbody .tablewrap { margin-top: 12px; }
.docbody .stacktable.doctable { min-width: 0; }
.docbody .stacktable.doctable td.fn { white-space: normal; min-width: 120px; }
.docbody .stacktable.doctable th { white-space: normal; }
.docbody .num { font-family: var(--mono); }

.bigentry.teal { background: rgba(45, 212, 191, 0.08); border-color: rgba(45, 212, 191, 0.3); }
.bigentry.teal:hover { border-color: var(--teal); }
.bigentry.teal .icon { filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.6)); }
.bigentry.gold { background: rgba(245, 197, 66, 0.07); border-color: rgba(245, 197, 66, 0.35); }
.bigentry.gold:hover { border-color: var(--head); }
.bigentry.gold .icon { filter: drop-shadow(0 0 8px rgba(245, 197, 66, 0.6)); }
.docbody li { margin-top: 6px; }
.docbody ul { margin-top: 10px; }
.docbody h3 { color: var(--head); }
.docbody li::marker { color: var(--accent, var(--blue)); }

.docaudio { display: block; width: 100%; max-width: 520px; margin-top: 12px; height: 36px; }

/* ---------- weekly plan ---------- */

.planentry { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 14px;
  padding: 12px 14px; border-radius: 18px; background: rgba(245, 197, 66, 0.07);
  border: 1.2px solid rgba(245, 197, 66, 0.35); }
.planentry:hover { border-color: var(--head); }
.planentry .icon { font-size: 20px; filter: drop-shadow(0 0 8px rgba(245, 197, 66, 0.6)); }
.planentry .col { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.planentry .wk, .weekcard .wk { font-family: var(--mono); font-size: 9.5px; font-weight: 800;
  letter-spacing: 1.2px; color: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planentry .t { font-size: 17px; font-weight: 700; letter-spacing: -0.4px; }
.planentry .m { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.planentry .m.some { color: var(--green); }
.planentry .chev { color: var(--faint); font-size: 18px; }

.weekcard { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px;
  background: var(--fill); border: 1.2px solid rgba(251, 191, 36, 0.25); transition: transform 0.12s, border-color 0.12s; }
.weekcard:hover { transform: translateY(-2px); border-color: var(--amber); }
.weekcard.now { background: rgba(245, 197, 66, 0.07); border-color: rgba(245, 197, 66, 0.45);
  box-shadow: 0 0 16px rgba(245, 197, 66, 0.15); }
.weekcard.complete:not(.now) { opacity: 0.75; border-color: rgba(74, 222, 128, 0.35); }
.weekcard .col { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.weekcard .wk { color: var(--amber); }
.weekcard.now .wk { color: var(--head); }
.nowtag { font-family: var(--mono); font-size: 8.5px; letter-spacing: 1px; color: var(--bg);
  background: var(--head); border-radius: 999px; padding: 2px 6px; margin-left: 6px; }
.weekcard .ttl { font-size: 17px; font-weight: 700; letter-spacing: -0.4px; }
.weekcard .meta { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.weekcard .meta.some { color: var(--amber); }
.weekcard .meta.done { color: var(--green); }
.ring { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--amber) calc(var(--pct) * 1%), var(--line) 0); }
.ring span { width: 30px; height: 30px; border-radius: 50%; background: var(--fill); display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; font-weight: 800; color: var(--dim); }
.weekcard.complete .ring { background: conic-gradient(var(--green) 100%, var(--line) 0); }

.wkcount { font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--faint); }
.wkcount.some { color: var(--amber); } .wkcount.done { color: var(--green); }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 12px; background: var(--fill); border: 1px solid var(--line);
  font-size: 14px; color: var(--dim); line-height: 1.5; }
.check:hover { border-color: var(--faint); }
.check .box { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint); flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--bg); margin-top: 1px; }
.check .k { width: 18px; flex-shrink: 0; text-align: center; font-size: 12px; color: var(--faint); margin-top: 2px; }
.check.on { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.35); color: var(--faint); }
.check.on .box { background: var(--green); border-color: var(--green); }
.check.on .txt { text-decoration: line-through; }

/* ---------- source reader ---------- */

.src-modtitle { font-size: 24px; font-weight: 700; letter-spacing: -0.7px; padding-top: 8px; }
.src-meta { font-size: 12.5px; color: var(--dim); margin-top: 5px; line-height: 1.5; }
.src-concept { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; padding: 26px 0 2px; }
.src-concept.here { color: var(--head); text-shadow: 0 0 12px rgba(245,197,66,0.4); }
.src-field { margin-top: 12px; }
.src-field .fl {
  font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 1.1px;
  color: var(--head); text-transform: uppercase; display: block; margin-bottom: 4px;
}
.src-prose { font-size: 13.5px; color: var(--dim); line-height: 1.6; margin-top: 6px; }
.src-bullet { display: flex; gap: 9px; padding-left: 8px; margin-top: 5px;
  font-size: 13.5px; color: var(--dim); line-height: 1.6; }
.src-bullet .b { width: 4px; height: 4px; border-radius: 2px; background: var(--blue);
  margin-top: 9px; flex-shrink: 0; }
.src-num { display: flex; gap: 9px; padding-left: 8px; margin-top: 5px;
  font-size: 13.5px; color: var(--dim); line-height: 1.6; }
.src-num .n { font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--blue);
  width: 16px; text-align: right; flex-shrink: 0; padding-top: 2px; }
.src-row { font-family: var(--mono); font-size: 10.5px; color: var(--dim);
  padding-left: 8px; margin-top: 4px; line-height: 1.5; }

@media (max-width: 640px) {
  .page { padding: 16px 14px 50px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .panel { border: none; }
}

/* ---------- the story: levels, tracks, units ---------- */

.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.leveltile {
  display: flex; flex-direction: column; gap: 7px; text-align: left; padding: 14px 16px;
  border-radius: 18px; background: var(--fill);
  border: 1.2px solid color-mix(in srgb, var(--accent, var(--blue)) 24%, transparent);
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.leveltile:hover { transform: translateY(-2px); border-color: var(--accent, var(--blue)); }
.leveltile.on { background: color-mix(in srgb, var(--accent, var(--blue)) 9%, var(--fill));
  border-color: var(--accent, var(--blue));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent, var(--blue)) 22%, transparent); }
.leveltile .row1 { display: flex; align-items: center; gap: 8px; }
.leveltile .li { font-size: 15px; }
.leveltile .ln { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent, var(--blue)); flex: 1; }
.leveltile .ring { width: 30px; height: 30px;
  background: conic-gradient(var(--ringc, var(--accent, var(--blue))) calc(var(--pct) * 1%), var(--line) 0); }
.leveltile .ring span { width: 25px; height: 25px; font-size: 8.5px; }
.leveltile .lp { font-size: 13px; color: var(--dim); line-height: 1.45; }
.leveltile .lm { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

.unitstory { margin-top: 14px; }
.unitstory .rich .sent { font-size: 15px; }

.unitrows { display: flex; flex-direction: column; gap: 7px; }
.unitrow {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: 14px; background: var(--fill); border: 1px solid var(--line);
  transition: border-color 0.12s, transform 0.12s;
}
.unitrow:hover { border-color: var(--accent, var(--blue)); transform: translateY(-1px); }
.unitrow.inert, .unitrow.inert:hover { border-color: var(--line); transform: none; cursor: default; }
.unitrow.done { background: rgba(74, 222, 128, 0.07); border-color: rgba(74, 222, 128, 0.3); }
.unitrow.planned { opacity: 0.45; }
.unitrow .k { width: 20px; flex-shrink: 0; text-align: center; font-size: 13px; margin-top: 2px; }
.unitrow .col { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.unitrow .rl { font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--accent, var(--blue)); }
.unitrow.done .rl { color: var(--green); }
.unitrow .rt { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.35; }
.unitrow .rm { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.unitrow .chev { color: var(--faint); font-size: 16px; margin-top: 2px; }
.unitrow.done .chev { color: var(--green); }

.unitnext { margin-top: 26px; padding: 14px 16px; border-radius: 16px; background: var(--fill);
  border: 1px solid var(--line); }
.unitnext .n { font-size: 14.5px; color: var(--dim); line-height: 1.55; margin-top: 7px;
  font-style: italic; }
.nextlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--accent, var(--blue)); }
.nextlink:hover { text-decoration: underline; }

.bigentry.green { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.3); }
.bigentry.green:hover { border-color: var(--green); }
.bigentry.green .icon { filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.6)); }

@media (max-width: 640px) {
  .levels { grid-template-columns: 1fr; }
  .leveltile .lp { font-size: 12.5px; }
}

/* ---------- Unified Prep (UnifiedView.swift) ---------- */

/* One chip shape for a pillar anywhere: the letter and its minutes in the pillar accent. */
.pchip {
  font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: 0.5px;
  color: var(--accent, var(--blue)); padding: 3px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--blue)) 10%, transparent);
}

.bigentry.unified .pills { display: flex; gap: 5px; margin-top: 2px; }
.bigentry.unified .icon { font-size: 22px; }

.pillarlegend {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  max-width: 760px; margin: 0 auto 18px;
}
.pillarlegend .ptile {
  display: flex; flex-direction: column; gap: 3px; padding: 9px; min-height: 58px;
  border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.pillarlegend .pk { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--accent); }
.pillarlegend .ps { font-size: 10.5px; font-weight: 500; color: var(--dim); line-height: 1.35; }

.sectionlabel.ufgroup { display: block; margin: 0 auto 8px; max-width: 760px;
  font-size: 10px; letter-spacing: 1.3px; }
.uflist { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto 18px; }
.ufcard {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px;
  background: var(--fill); border: 1.2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: border-color 0.12s, transform 0.12s;
}
.ufcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.ufcard.complete { opacity: 0.75; border-color: rgba(74, 222, 128, 0.35); }
.ufcard .row1, .ufcard .row2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ufcard .row2 { margin-top: 2px; }
.ufcard .spacer { flex: 1; }
.ufcard .key { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  color: var(--accent); }
.ufcard .diffchip {
  font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: 1px;
  color: var(--accent); padding: 3px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.ufcard .tick { color: var(--green); font-size: 13px; }
.ufcard .ttl { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.25; }
.ufcard .one { font-size: 13.5px; color: var(--dim); line-height: 1.5; }
.ufcard .meta { font-family: var(--mono); font-size: 9.5px; color: var(--faint); }

.ufkey { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }

.pillarswitch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.pillarswitch .ptab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0;
  border-radius: 12px; background: var(--fill); border: 1px solid var(--line);
  transition: border-color 0.12s;
}
.pillarswitch .ptab .pk { font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--faint); }
.pillarswitch .ptab .pm { font-family: var(--mono); font-size: 9px; color: var(--faint); }
.pillarswitch .ptab.seen .pm { color: color-mix(in srgb, var(--pa) 70%, transparent); }
.pillarswitch .ptab:hover { border-color: color-mix(in srgb, var(--pa) 50%, transparent); }
.pillarswitch .ptab:hover .pk { color: var(--pa); }
.pillarswitch .ptab.on {
  background: color-mix(in srgb, var(--pa) 14%, transparent);
  border: 1.4px solid color-mix(in srgb, var(--pa) 60%, transparent);
}
.pillarswitch .ptab.on .pk, .pillarswitch .ptab.on .pm { color: var(--pa); }

.pillarhead { margin-top: 20px; scroll-margin-top: 12px; }
.pillarhead .label { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.pillarhead .mins { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-left: 5px; }
.pillarhead h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-top: 3px; }
.pillarhead .promise { font-size: 13.5px; color: var(--dim); margin-top: 2px; }

.ufsection {
  margin-top: 14px; padding: 16px; border-radius: 18px; background: var(--fill);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.ufsechead { display: flex; align-items: flex-start; gap: 10px; }
.ufsechead .n {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.ufsechead h4 { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.35; }
.ufsection .docbody > *:first-child { margin-top: 10px; }

.ufnav { display: flex; gap: 10px; margin-top: 22px; }
.ufnavbtn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 0; border-radius: 13px; font-size: 14px; font-weight: 700; color: var(--pa);
  background: color-mix(in srgb, var(--pa) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--pa) 40%, transparent);
  transition: border-color 0.12s;
}
.ufnavbtn:hover { border-color: var(--pa); }
.ufnavbtn .ar { font-size: 12px; font-weight: 800; }

@media (max-width: 640px) {
  .pillarlegend { grid-template-columns: repeat(2, 1fr); }
  .ufcard .ttl { font-size: 18px; }
}
