/* VVUSD VAPA — Art of Communication PD Module
   Brand palette: #8ecae6 sky · #026fa0 navy · #fcb426 gold ·
                  #b2d8b1 sage · #e29587 terracotta · #000 / #fff
*/

:root {
  --sky: #8ecae6;
  --navy: #026fa0;
  --gold: #fcb426;
  --sage: #b2d8b1;
  --terra: #e29587;
  --ink: #1a1a1a;
  --paper: #ffffff;
  --bg: #f6f9fc;
  --muted: #5a6b7a;
  --line: #e3eaf0;

  --heading: "Shrikhand", "Playfair Display", Georgia, serif;
  --body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  /* Kept available for design-point demos in the Typography section */
  --demo-serif: "Playfair Display", Georgia, serif;
  --demo-script: "Caveat", "Bradley Hand", cursive;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 6px rgba(2, 111, 160, 0.08);
  --shadow: 0 10px 30px rgba(2, 111, 160, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  font-weight: 400;
}

h1, h2, h3 {
  font-family: var(--heading); letter-spacing: 0.04em;
  font-weight: 400; /* Shrikhand ships in a single weight */
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 .5em;
}
h1 { font-size: 2.6rem; letter-spacing: 0.04em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
/* h4 stays in Nunito so eyebrow / small headings remain crisp */
h4 {
  font-size: 1.05rem;
  font-family: var(--body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy);
  margin: 0 0 .5em;
  line-height: 1.3;
}

p { margin: 0 0 1em; }
a { color: var(--navy); }
a:hover { color: var(--gold); }

/* ---------- Layout ---------- */

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.brand img { width: 100%; max-width: 220px; height: auto; object-fit: contain; }
.brand .title { font-family: var(--heading); letter-spacing: 0.04em; font-size: 1.15rem; color: var(--navy); line-height: 1.2; }
.brand .title small { display: block; font-family: var(--body); font-weight: 700; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

.progress {
  margin-bottom: 22px;
}
.progress-label {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 6px;
}
.progress-bar {
  height: 8px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--navy));
  width: 0%;
  transition: width .35s ease;
}

.nav { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 2px 0; }

/* Chapter headers — group modules into parts */
.nav-chapter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 4px !important;
  padding: 0 12px 5px;
  border-bottom: 1px solid var(--line);
}
.nav-chapter:first-of-type { margin-top: 10px !important; }
.chapter-title {
  font-family: var(--body);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.chapter-badge {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-chapter.complete { border-bottom-color: var(--sage); }
.nav-chapter.complete .chapter-title { color: #2f8a4a; }
.nav-chapter.complete .chapter-badge {
  background: var(--sage);
  border-color: var(--sage);
  color: #0f4422;
}
.nav-chapter.complete .chapter-badge::before { content: "\2713 "; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink);
  font-size: .92rem;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--bg); color: var(--navy); }
.nav a.active {
  background: var(--navy); color: var(--paper);
  font-weight: 600;
}
.nav a.active .check { background: var(--gold); color: var(--navy); }
.nav .check {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--line); color: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 800; flex-shrink: 0;
}
.nav .check.done { background: var(--sage); color: var(--navy); }
.nav .check.done::before { content: "\2713"; }

/* Locked nav links (gated behind the Studio audit) */
.nav a.locked { opacity: .5; cursor: not-allowed; }
.nav a.locked:hover { background: transparent; color: var(--ink); }
.nav a.locked::after {
  content: "\1F512"; /* lock */
  margin-left: auto;
  font-size: .8rem;
  opacity: .8;
}

/* ---------- Main ---------- */

.main { padding: 0; }
.section {
  min-height: 100vh;
  padding: 64px 8% 96px;
  display: none;
  animation: fadeIn .45s ease;
}
.section.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-tag {
  display: inline-block;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--navy);
  background: var(--sky);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 18px;
  font-weight: 600;
}
/* Per-module color signatures */
.section-tag.sky    { background: var(--sky);   color: var(--navy); }
.section-tag.sage   { background: var(--sage);  color: #0f4422; }
.section-tag.gold   { background: var(--gold);  color: var(--navy); }
.section-tag.terra  { background: var(--terra); color: #5a1f15; }

.lead {
  font-size: 1.2rem; color: var(--muted); max-width: 720px; margin-bottom: 28px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #014e72 100%);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 56px 48px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: .35;
}
.hero::after {
  content: "";
  position: absolute; left: -120px; bottom: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--terra) 0%, transparent 70%);
  opacity: .28;
  pointer-events: none;
}
.hero h1 { color: var(--paper); font-size: 3rem; }
.hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 640px; }
.hero .kicker {
  font-family: var(--body);
  font-weight: 800;
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 14px;
}

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.card h3 { margin-top: 0; }

.stat {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold);
}
.stat.sage  { border-top-color: var(--sage); }
.stat.terra { border-top-color: var(--terra); }
.stat.sky   { border-top-color: var(--sky); }
.stat.gold  { border-top-color: var(--gold); }
.stat.sage  .num { color: #0f4422; }
.stat.terra .num { color: #842c22; }
.stat .num {
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: 3.4rem; line-height: 1;
  color: var(--navy); font-weight: 400;
}
.stat .label {
  margin-top: 10px; color: var(--muted); font-size: .95rem;
}

.principle {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--gold);
  transition: transform .2s, box-shadow .2s;
}
.principle.sage  { border-left-color: var(--sage); }
.principle.sage  .icon { background: var(--sage);  color: #0f4422; }
.principle.terra { border-left-color: var(--terra); }
.principle.terra .icon { background: var(--terra); color: #fff; }
.principle.sky   { border-left-color: var(--sky); }
.principle.sky   .icon { background: var(--sky);   color: var(--navy); }
.principle.gold  { border-left-color: var(--gold); }
.principle.gold  .icon { background: var(--gold);  color: var(--navy); }
.principle:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.principle .icon {
  width: 44px; height: 44px;
  background: var(--sky); color: var(--navy);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800;
  margin-bottom: 14px;
  font-family: var(--body);
}
.principle h3 { font-size: 1.2rem; margin-bottom: 8px; }
.principle p { font-size: .95rem; color: var(--muted); margin: 0; }

/* color swatches */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.swatch {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: flex-end; justify-content: center;
  font-size: .65rem; color: var(--paper); padding-bottom: 4px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* font sample */
.font-sample {
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin: 8px 0;
}
.font-sample .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; }
.font-sample .demo { font-size: 1.6rem; line-height: 1.2; color: var(--navy); }

/* tables / do vs don't */
.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin: 18px 0;
}
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
.compare .col {
  background: var(--paper); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  border-top: 4px solid;
}
.compare .do { border-top-color: var(--sage); }
.compare .dont { border-top-color: var(--terra); }
.compare h4 { margin-top: 0; }
.compare .do h4::before { content: "\2713  "; color: #2f8a4a; }
.compare .dont h4::before { content: "\2717  "; color: #b8453a; }
.compare ul { margin: 0; padding-left: 18px; }
.compare li { margin: 6px 0; }

/* Callout */
.callout {
  background: linear-gradient(135deg, var(--sky) 0%, #c0e2f1 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
  border-left: 5px solid var(--navy);
}
.callout strong { color: var(--navy); }
.callout .label {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--navy); font-weight: 700; margin-bottom: 6px; display: block;
}
.callout.sage {
  background: linear-gradient(135deg, var(--sage) 0%, #d8eed7 100%);
  border-left-color: #2f8a4a;
}
.callout.sage .label, .callout.sage strong { color: #0f4422; }
.callout.terra {
  background: linear-gradient(135deg, var(--terra) 0%, #f3c8c0 100%);
  border-left-color: #b8453a;
}
.callout.terra .label, .callout.terra strong { color: #5a1f15; }
.callout.gold {
  background: linear-gradient(135deg, var(--gold) 0%, #fdd97e 100%);
  border-left-color: #c98a14;
}
.callout.gold .label, .callout.gold strong { color: var(--navy); }

/* Quiz / Activity */
.quiz {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--gold);
}
.quiz .label {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.quiz h3 { margin: 6px 0 14px; }
.quiz .question { font-weight: 600; margin: 18px 0 10px; }
.quiz .choices { list-style: none; padding: 0; margin: 0; }
.quiz .choice {
  display: block;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 8px 0;
  cursor: pointer;
  transition: all .2s;
  background: var(--paper);
}
.quiz .choice:hover { border-color: var(--sky); background: #f5fbfd; }
.quiz .choice.correct { border-color: var(--sage); background: #effaf0; }
.quiz .choice.wrong { border-color: var(--terra); background: #fdf1ee; }
.quiz .feedback { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); display: none; }
.quiz .feedback.show { display: block; }
.quiz .feedback.right { background: #effaf0; color: #1d5e2e; }
.quiz .feedback.wrong { background: #fdf1ee; color: #842c22; }

/* Reflect / textarea */
.reflect {
  background: var(--paper); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); margin: 24px 0; border-left: 5px solid var(--terra);
}
.reflect label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.reflect textarea {
  width: 100%; min-height: 110px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; resize: vertical;
}
.reflect textarea:focus { outline: 2px solid var(--sky); border-color: var(--navy); }

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li {
  background: var(--paper); border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 8px 0;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer;
}
.checklist input[type=checkbox] {
  width: 20px; height: 20px; margin-top: 2px;
  accent-color: var(--navy);
}
.checklist li.done { opacity: .6; text-decoration: line-through; }

/* Button / footer nav */
.section-footer {
  display: flex; justify-content: space-between;
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.btn {
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--navy);
  background: var(--navy); color: var(--paper);
  font-weight: 600; font-size: .95rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.btn:hover { background: #014e72; color: var(--paper); transform: translateX(2px); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--paper); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.gold:hover { background: #e8a51c; border-color: #e8a51c; color: var(--navy); }

/* Locked "Next" button — gated behind the Studio audit */
.btn.locked {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}
.btn.locked:hover { background: var(--line); color: var(--muted); transform: none; }

/* Studio gate message */
.studio-gate { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.studio-gate-msg {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
  max-width: 360px;
  transition: color .2s;
}
.studio-gate-msg.unlocked { color: #2f8a4a; }
.studio-gate-msg.flash {
  animation: gateFlash .9s ease;
}
@keyframes gateFlash {
  0%, 100% { color: var(--muted); }
  30%, 60% { color: #b8453a; transform: scale(1.02); }
}

/* Tag list */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tag {
  font-size: .78rem; padding: 5px 12px; border-radius: 999px;
  background: var(--bg); color: var(--navy); font-weight: 600;
  border: 1px solid var(--line);
}

/* Visual hierarchy demo */
.hier-demo {
  background: var(--paper); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-sm); margin: 18px 0;
}
.hier-demo .big { font-family: var(--heading); letter-spacing: 0.04em; font-size: 2.2rem; line-height: 1.15; color: var(--navy); margin: 0; }
.hier-demo .med { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 8px 0 4px; }
.hier-demo .sm { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Visual examples ---------- */

.viz {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px;
  margin: 18px 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.viz-label {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 800;
  margin-bottom: 8px;
}
.viz-title { font-family: var(--heading); letter-spacing: 0.04em; font-size: 1.15rem; color: var(--navy); margin: 0 0 14px; }
.viz-caption {
  font-size: .85rem; color: var(--muted); margin-top: 12px; line-height: 1.5;
}

.viz-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 14px 0;
}
@media (max-width: 720px) { .viz-pair { grid-template-columns: 1fr; } }
.viz-pair .frame {
  border-radius: var(--radius-sm);
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  min-height: 140px;
}
.viz-pair .frame .tag-corner {
  position: absolute; top: 8px; right: 10px;
  font-size: .65rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.viz-pair .frame.bad .tag-corner { background: var(--terra); color: #fff; }
.viz-pair .frame.good .tag-corner { background: var(--sage); color: #0f4422; }

/* Mini website mockups */
.mock-site {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--line);
  font-family: var(--body);
}
.mock-site .browser-bar {
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.mock-site .browser-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
}
.mock-site .nav-row {
  display: flex; gap: 8px; padding: 6px 0; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.mock-site .nav-row span {
  font-size: .7rem; color: var(--navy); font-weight: 700;
}
.mock-site .h {
  height: 14px; background: var(--navy); border-radius: 3px;
  margin: 6px 0;
}
.mock-site .h.short { width: 50%; }
.mock-site .h.gold { background: var(--gold); }
.mock-site .h.sage { background: var(--sage); }
.mock-site .h.sky { background: var(--sky); }
.mock-site .h.terra { background: var(--terra); }
.mock-site .t {
  height: 6px; background: var(--line); border-radius: 2px;
  margin: 4px 0;
}
.mock-site .t.short { width: 60%; }
.mock-site .img {
  background: linear-gradient(135deg, var(--sky), var(--navy));
  border-radius: 4px;
  height: 60px;
  margin: 8px 0;
}
.mock-site .img.terra { background: linear-gradient(135deg, var(--terra), #9a3a2c); }
.mock-site .row { display: flex; gap: 8px; }
.mock-site .row > div { flex: 1; }

/* "Bad" mockup: chaotic */
.mock-site.bad { font-family: serif; }
.mock-site.bad .h { background: red; transform: rotate(-1deg); }
.mock-site.bad .nav-row { flex-wrap: wrap; gap: 4px; border-bottom: 3px dotted purple; }
.mock-site.bad .nav-row span { color: green; font-family: "Comic Sans MS", cursive; font-size: .8rem; }
.mock-site.bad .img { background: repeating-linear-gradient(45deg, #ff00ff, #ff00ff 6px, #ffff00 6px, #ffff00 12px); }
.mock-site.bad .t { background: orange; }

/* SVG demos */
.svg-demo {
  display: flex; justify-content: center; align-items: center;
  padding: 8px 0;
}
.svg-demo svg { max-width: 100%; height: auto; }

/* Hierarchy ladder (typography weight) */
.weight-ladder { display: flex; flex-direction: column; gap: 4px; }
.weight-ladder div { font-family: var(--body); color: var(--navy); }
.weight-ladder .w4 { font-weight: 400; }
.weight-ladder .w6 { font-weight: 600; }
.weight-ladder .w8 { font-weight: 800; font-size: 1.15rem; }

/* Fitt's Law buttons */
.fitts-btn {
  display: inline-block;
  background: var(--gold); color: var(--navy);
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
  border: 2px solid transparent;
}
.fitts-btn.small {
  font-size: .65rem; padding: 4px 7px;
}
.fitts-btn.big {
  font-size: 1.2rem; padding: 18px 36px; border-radius: 14px;
}

/* Click-count ladder */
.click-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  margin: 6px 0;
  font-weight: 600; color: var(--navy);
}
.click-row.good { background: #e8f5ec; border-left: 4px solid var(--sage); }
.click-row.meh { background: #fff5e0; border-left: 4px solid var(--gold); }
.click-row.bad { background: #fbe9e5; border-left: 4px solid var(--terra); }
.click-row .pill {
  background: var(--paper); padding: 4px 12px; border-radius: 999px;
  font-size: .75rem; letter-spacing: .1em;
}

/* F-pattern overlay */
.f-pattern { position: relative; }
.f-pattern .heat {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(252,180,38,.32) 0 22%, transparent 22%),
    linear-gradient(to bottom, transparent 38%, rgba(252,180,38,.22) 38% 50%, transparent 50%),
    linear-gradient(to right, rgba(252,180,38,.22) 0 22%, transparent 22%);
  border-radius: var(--radius-sm);
}

/* Color contrast / vibrating demos */
.color-block {
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  height: 96px; font-weight: 800; font-size: 1.05rem;
  font-family: var(--body);
}
.tints {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  margin: 8px 0;
}
.tints div {
  height: 56px; border-radius: 6px;
  display: flex; align-items: flex-end; justify-content: center;
  font-size: .65rem; padding-bottom: 4px; font-weight: 700; color: rgba(0,0,0,.55);
}

/* Negative space demo */
.ns-cramped, .ns-airy {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); min-height: 140px;
}
.ns-cramped { padding: 6px; }
.ns-cramped .blk { background: var(--navy); height: 16px; margin: 2px 0; border-radius: 2px; }
.ns-cramped .blk.gold { background: var(--gold); }
.ns-cramped .blk.sky { background: var(--sky); }
.ns-airy { padding: 28px 22px; }
.ns-airy .blk { background: var(--navy); height: 14px; margin: 16px 0; border-radius: 3px; }
.ns-airy .blk.short { width: 60%; }
.ns-airy .blk.gold { background: var(--gold); width: 30%; height: 18px; }

/* Alignment do/don't */
.align-demo { padding: 14px; min-height: 140px; }
.align-demo .row {
  display: flex; align-items: center; gap: 10px; margin: 8px 0;
}
.align-demo .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex: none;
}
.align-demo .line {
  height: 8px; background: var(--navy); border-radius: 2px;
}
.align-demo.aligned .row { padding-left: 0; }
.align-demo.aligned .line { width: 75%; }
.align-demo.aligned .line.short { width: 50%; }
.align-demo.unaligned .row.r1 { padding-left: 18px; }
.align-demo.unaligned .row.r2 { padding-left: 40px; }
.align-demo.unaligned .row.r3 { padding-left: 8px; }
.align-demo.unaligned .row.r4 { padding-left: 28px; }
.align-demo.unaligned .line { width: 70%; }

/* Rule of Thirds grid */
.thirds {
  position: relative;
  background: linear-gradient(135deg, var(--sky), var(--navy));
  border-radius: var(--radius-sm);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.thirds::before, .thirds::after {
  content: ""; position: absolute; background: rgba(255,255,255,.55);
  pointer-events: none;
}
.thirds::before {
  top: 0; bottom: 0; width: 2px;
  left: 33.33%;
  box-shadow: 33.33vw 0 0 0 rgba(255,255,255,.55); /* hack-ish, replaced below via children */
}
.thirds .vline, .thirds .hline {
  position: absolute; background: rgba(255,255,255,.55);
}
.thirds .vline { top: 0; bottom: 0; width: 2px; }
.thirds .vline.v1 { left: 33.33%; }
.thirds .vline.v2 { left: 66.66%; }
.thirds .hline { left: 0; right: 0; height: 2px; }
.thirds .hline.h1 { top: 33.33%; }
.thirds .hline.h2 { top: 66.66%; }
.thirds .pt {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 2px solid #fff;
  transform: translate(-50%, -50%);
}
.thirds .pt.p1 { left: 33.33%; top: 33.33%; }
.thirds .pt.p2 { left: 66.66%; top: 33.33%; }
.thirds .pt.p3 { left: 33.33%; top: 66.66%; }
.thirds .pt.p4 { left: 66.66%; top: 66.66%; }
/* override the hack box-shadow on ::before */
.thirds::before { box-shadow: none; left: -10px; }

/* Mobile */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .section { padding: 40px 6% 64px; }
  h1 { font-size: 2rem; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 2rem; }
}

/* ---------- Studio (builder) ---------- */

.studio {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  margin: 24px 0;
}
@media (max-width: 1000px) { .studio { grid-template-columns: 1fr; } }

.studio-controls {
  display: flex; flex-direction: column; gap: 14px;
}

.studio-panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.studio-panel h4 { margin: 0 0 10px; }
.studio-hint { font-size: .88rem; color: var(--muted); margin: 0; }

.studio-field {
  display: block; margin: 12px 0;
}
.studio-field > span {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.studio-field textarea, .studio-field select, .studio-field input[type=text] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: .95rem;
}
.studio-field textarea { resize: vertical; min-height: 50px; }
.studio-field input[type=range] {
  width: 100%; accent-color: var(--navy);
}

.studio-field output { font-weight: 700; color: var(--navy); font-family: var(--body); }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  background: var(--bg);
  padding: 3px;
  border-radius: var(--radius-sm);
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 8px;
  border-radius: 6px;
  font-family: var(--body);
  font-weight: 700;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
}
.seg button:hover { color: var(--navy); }
.seg button.active {
  background: var(--navy);
  color: var(--paper);
}

.palette {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.palette button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .15s, border-color .15s;
}
.palette button:hover { transform: scale(1.08); }
.palette button.active {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--paper) inset;
}

/* Free-form color picker — Studio lets users pick anything */
.color-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-picker input[type="color"] {
  width: 56px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  padding: 3px;
  background: var(--paper);
  transition: border-color .15s, transform .15s;
}
.color-picker input[type="color"]:hover {
  border-color: var(--navy);
  transform: scale(1.03);
}
.color-picker input[type="color"]:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}
.color-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.studio-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: .95rem; color: var(--ink);
  cursor: pointer;
  margin: 10px 0;
}
.studio-toggle input { accent-color: var(--navy); width: 18px; height: 18px; }

.studio-add {
  display: flex; gap: 8px; margin-top: 10px;
}
.studio-add .btn { flex: 1; justify-content: center; padding: 9px 12px; font-size: .85rem; }

.btn.danger { border-color: var(--terra); color: var(--terra); }
.btn.danger:hover { background: var(--terra); color: #fff; }

.studio-panel.reminders ul { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--muted); }
.studio-panel.reminders li { margin: 6px 0; }
.studio-panel.reminders strong { color: var(--navy); }

/* ---------- Info modals (differentiation deep-dives) ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.modal.open {
  display: flex;
  animation: modalFade .2s ease both;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 14, 26, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: 85vw;
  height: 85vh;
  background: var(--paper);
  border-radius: 18px;
  border: 3px solid var(--gold);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlide .25s ease both;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--navy);
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .15s, color .15s, transform .15s;
  line-height: 1;
}
.modal-close:hover { background: var(--terra); color: #fff; transform: rotate(90deg); }
.modal-close:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 56px 48px 44px;
}
.modal-content {
  max-width: 900px;
  margin: 0 auto;
}
.modal-eyebrow {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 6px;
}
.modal-content h2 {
  font-family: var(--heading); letter-spacing: 0.04em;
  color: var(--navy);
  margin: 0 0 18px;
  font-size: 2.2rem;
  line-height: 1.15;
}
.modal-content h3 { margin-top: 28px; }
.modal-content p, .modal-content li { font-size: 1.02rem; line-height: 1.65; }
.modal-content img { max-width: 100%; height: auto; border-radius: 8px; }

.modal-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  background: var(--bg);
  border: 2px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-family: var(--body);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  margin: 6px 0;
}
.modal-trigger::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: .95rem;
}
.modal-trigger:hover {
  background: var(--navy);
  color: var(--paper);
}
.modal-trigger:hover::before {
  background: var(--gold);
  color: var(--navy);
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.modal-open { overflow: hidden; }

/* Image-check static list (Module 8 · Images) */
.image-check {
  counter-reset: img-check;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.image-check li {
  counter-increment: img-check;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--gold);
  padding: 16px 18px 16px 56px;
  margin: 10px 0;
  position: relative;
  box-shadow: var(--shadow-sm);
  font-size: .98rem;
  line-height: 1.5;
}
.image-check li::before {
  content: counter(img-check);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
}
.image-check strong { display: block; color: var(--navy); margin-bottom: 4px; font-weight: 800; }

/* ---------- Critique module (What's wrong with this?) ---------- */

.critique {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.critique-meta { margin-bottom: 16px; }
.critique-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.critique-meta h3 { margin: 0; }
.critique-design-wrap {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 28px 16px;
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
  border: 1px dashed var(--line);
}
.critique-prompt {
  font-family: var(--body);
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--navy);
  margin: 18px 0 10px;
}
.critique-options {
  list-style: none;
  padding: 0;
  margin: 0;
}
.critique-options li {
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 8px 0;
  background: var(--paper);
  transition: border-color .15s, background .15s;
}
.critique-options li:not(.revealed):hover {
  border-color: var(--navy);
  background: var(--bg);
}
.critique-options label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: .96rem;
  line-height: 1.5;
}
.critique-options input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--navy);
}
.critique-options .explanation {
  margin: 8px 0 0 32px;
  padding: 8px 12px;
  font-size: .88rem;
  color: var(--muted);
  border-radius: 6px;
  background: transparent;
  display: none;
}
.critique-options li.revealed .explanation { display: block; }
.critique-options li.revealed.correct-hit {
  border-color: var(--sage);
  background: #effaf0;
}
.critique-options li.revealed.correct-hit .explanation { color: #1d5e2e; background: rgba(178, 216, 177, .25); }
.critique-options li.revealed.correct-miss {
  border-color: var(--gold);
  background: #fff5e0;
}
.critique-options li.revealed.correct-miss .explanation { color: #856200; background: rgba(252, 180, 38, .15); }
.critique-options li.revealed.false-positive {
  border-color: var(--terra);
  background: #fbe9e5;
}
.critique-options li.revealed.false-positive .explanation { color: #842c22; background: rgba(226, 149, 135, .2); }
.critique-options li.revealed input[type="checkbox"] { cursor: default; }
.critique-options li.revealed label { cursor: default; }

.critique-submit { margin-top: 6px; }
.critique-submit:disabled {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
}

.critique-result {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 5px solid var(--navy);
  font-size: 1rem;
  line-height: 1.5;
}
.critique-result strong { color: var(--navy); }
.critique-result .result-badge {
  display: inline-block;
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: 1.4rem;
  padding: 4px 14px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--paper);
  margin-right: 10px;
  vertical-align: middle;
}
.critique-result .result-badge.gold { background: var(--gold); color: var(--navy); }
.critique-result .result-badge.sage { background: var(--sage); color: #0f4422; }
.critique-result .result-badge.terra { background: var(--terra); color: #fff; }

/* Bad-design mockups — intentionally ugly for critique exercises */
.bad-design {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  overflow: hidden;
  font-family: var(--body);
}
.bad-flyer {
  width: 280px;
  min-height: 380px;
  padding: 16px;
}
.bad-website {
  width: 100%;
  max-width: 580px;
  padding: 0;
  font-family: var(--body);
}
.bad-website .browser-bar {
  display: flex; gap: 5px; align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  background: #f0f0f0;
}
.bad-website .browser-bar .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ccc;
}
.bad-nav {
  display: flex;
  flex-wrap: wrap;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  gap: 4px 8px;
}
.bad-nav a {
  font-size: 10px;
  color: #333;
  text-decoration: none;
  font-family: var(--body);
}
.bad-poster {
  width: 320px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  position: relative;
}

/* ---------- Content tray — the "brief" panel showing pieces still to be placed ---------- */
.studio-panel.content-tray {
  border-top: 4px solid var(--gold);
}
.tray-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.tray-chip {
  background: var(--bg);
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 8px 0;
  cursor: pointer;
  transition: all .18s;
  position: relative;
}
.tray-chip:hover {
  border-style: solid;
  border-color: var(--navy);
  background: var(--paper);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}
.tray-chip:active { transform: translateX(1px); }
.tray-chip .chip-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  margin-bottom: 4px;
  font-family: var(--body);
}
.tray-chip .chip-preview {
  font-size: .9rem;
  color: var(--ink);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-family: var(--body);
  white-space: pre-wrap;
}
.tray-chip .chip-action {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 1.1rem;
  color: var(--navy);
  opacity: .35;
  transition: opacity .15s;
}
.tray-chip:hover .chip-action { opacity: 1; }
.tray-empty {
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
  padding: 22px 8px;
  font-style: italic;
  border: 2px dashed var(--line);
  border-radius: 10px;
  margin-top: 12px;
}
.tray-empty strong { color: var(--navy); font-style: normal; }

.studio-panel.audit-cta {
  background: linear-gradient(135deg, var(--navy) 0%, #014e72 100%);
  border: 2px solid var(--gold);
  padding: 22px 18px;
}
.studio-panel.audit-cta .studio-hint { color: rgba(255,255,255,.78); }
.audit-btn {
  width: 100%;
  justify-content: center;
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .04em;
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(252, 180, 38, .35);
}
.audit-btn:hover {
  background: #e8a51c;
  border-color: #e8a51c;
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(252, 180, 38, .45);
}

/* Canvas */
.studio-canvas-wrap {
  display: flex; flex-direction: column;
}
.studio-canvas {
  position: relative;
  background: #ffffff;
  aspect-ratio: 8.5 / 11;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 10px 36px rgba(2, 111, 160, 0.18);
  overflow: hidden;
  cursor: default;
  user-select: none;
}

.studio-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
}
.studio-grid .v, .studio-grid .h {
  position: absolute; background: rgba(2, 111, 160, .25);
}
.studio-grid .v { top: 0; bottom: 0; width: 1px; }
.studio-grid .h { left: 0; right: 0; height: 1px; }
.studio-grid .v1 { left: 33.33%; }
.studio-grid .v2 { left: 66.66%; }
.studio-grid .h1 { top: 33.33%; }
.studio-grid .h2 { top: 66.66%; }

.studio-el {
  position: absolute;
  padding: 6px;
  cursor: move;
  touch-action: none;
  border-radius: 4px;
  border: 2px dashed transparent;
  z-index: 2;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 96%;
}
.studio-el:hover { border-color: rgba(2, 111, 160, .35); }
.studio-el.selected { border-color: var(--navy); }
.studio-el.dragging { opacity: .85; }

.studio-el.text {
  font-family: var(--body);
  line-height: 1.15;
  white-space: pre-wrap;
  word-break: break-word;
}

.studio-el.image {
  width: 50%;
  height: 30%;
  background: linear-gradient(135deg, var(--sky), var(--navy));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: .9rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* Resize handle (only shown when element is selected) */
.studio-resize {
  display: none;
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  background: var(--navy);
  border: 2px solid var(--paper);
  border-radius: 50%;
  z-index: 3;
  touch-action: none;
  box-shadow: 0 1px 4px rgba(2, 111, 160, .4);
}
.studio-el.selected .studio-resize { display: block; }
.studio-el.text .studio-resize { cursor: ew-resize; }
.studio-el.image .studio-resize { cursor: nwse-resize; }

/* ---------- Audit panel ---------- */

.audit {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0 18px;
  box-shadow: var(--shadow);
  border: 2px solid var(--gold);
  animation: fadeIn .4s ease;
}
.audit-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; margin-bottom: 16px;
}
.audit-title { margin: 4px 0 0; }
.audit-score {
  text-align: center;
  font-family: var(--body);
  line-height: 1;
  min-width: 140px;
}
.audit-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 18px;
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: 3.6rem;
  color: var(--paper);
  background: var(--muted);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
  transition: background .25s;
}
.audit-grade[data-grade="A"] { background: #2f8a4a; }
.audit-grade[data-grade="B"] { background: var(--navy); }
.audit-grade[data-grade="C"] { background: var(--gold); color: var(--navy); }
.audit-grade[data-grade="D"] { background: #c98a14; }
.audit-grade[data-grade="F"] { background: #b8453a; }

.audit-pct {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  font-family: var(--body);
}
.audit-score-label {
  display: block; margin-top: 4px;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.audit-summary {
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 1rem;
  color: var(--ink);
  border-left: 5px solid var(--sky);
}

.audit-list {
  list-style: none; margin: 0; padding: 0;
}
.audit-item {
  display: flex; gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  border-left: 5px solid;
  background: var(--paper);
  border: 1px solid var(--line);
}
.audit-item.pass { border-left-color: var(--sage); }
.audit-item.warn { border-left-color: var(--gold); }
.audit-item.fail { border-left-color: var(--terra); }

.audit-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
  font-family: var(--body);
}
.audit-item.pass .audit-icon { background: var(--sage); color: #0f4422; }
.audit-item.warn .audit-icon { background: var(--gold); color: var(--navy); }
.audit-item.fail .audit-icon { background: var(--terra); color: #fff; }

.audit-item-body { flex: 1; }
.audit-item h4 {
  font-family: var(--body);
  font-weight: 800;
  font-size: .98rem;
  margin: 0 0 4px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--navy);
}
.audit-item .audit-finding { margin: 0 0 6px; font-size: .95rem; color: var(--ink); }
.audit-item .audit-fix { margin: 0; font-size: .88rem; color: var(--muted); }
.audit-item .audit-fix a { font-weight: 700; }
.audit-tip {
  margin-top: 16px;
  font-size: .85rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Completion Certificate ---------- */

.cert-form {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cert-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: var(--navy);
  font-size: .9rem;
}
.cert-form input {
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: 1rem;
  min-width: 220px;
}
.cert-form input:focus { outline: 2px solid var(--sky); border-color: var(--navy); }

.cert-incomplete {
  background: #fff5e0;
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.cert-incomplete h3 { margin: 0 0 6px; }
.cert-incomplete ul { margin: 10px 0 0; padding-left: 20px; }
.cert-incomplete li { margin: 5px 0; }
.cert-incomplete.is-complete { display: none; }

.cert-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 24px;
}

/* The certificate card — an award document echoing the VAPA paper-craft look */
.certificate {
  position: relative;
  width: 100%;
  max-width: 640px;
  background:
    radial-gradient(circle at 50% 22%, rgba(178, 216, 177, .45) 0%, transparent 42%),
    linear-gradient(135deg, #ffffff 0%, #f6f9fc 100%);
  border: 3px solid var(--gold);
  border-radius: 18px;
  padding: 40px 44px 30px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(2, 111, 160, .2);
  overflow: hidden;
}
.certificate::before {
  /* inner hairline frame */
  content: "";
  position: absolute; inset: 12px;
  border: 1.5px solid rgba(2, 111, 160, .25);
  border-radius: 12px;
  pointer-events: none;
}
.cert-ribbon {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(252,180,38,.35) 0%, transparent 70%);
  pointer-events: none;
}
.cert-emblem {
  width: 190px; height: 190px;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 auto 10px;
  display: block;
  position: relative;
  box-shadow: 0 8px 22px rgba(2, 111, 160, .22);
}
.cert-kicker {
  font-family: var(--body);
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--terra);
}
.cert-title {
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: 2rem;
  color: var(--navy);
  line-height: 1.1;
  margin: 8px 0 2px;
}
.cert-course {
  font-family: var(--body);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: .02em;
  margin-bottom: 18px;
}
.cert-awarded {
  font-size: .9rem;
  color: var(--muted);
  font-style: italic;
}
.cert-name {
  font-family: "Caveat", cursive;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin: 4px 0 8px;
  border-bottom: 2px solid var(--sky);
  display: inline-block;
  padding: 0 24px 4px;
}
.cert-desc {
  font-size: .95rem;
  color: var(--ink);
  max-width: 460px;
  margin: 0 auto 22px;
  line-height: 1.5;
}
.cert-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.cert-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  min-width: 120px;
  box-shadow: var(--shadow-sm);
}
.cert-stat-num {
  display: block;
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1;
}
.cert-stat-label {
  display: block;
  margin-top: 6px;
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

.cert-breakdown-wrap {
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  margin-bottom: 16px;
}
.cert-breakdown-title {
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 10px;
}
.cert-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 24px;
  font-size: .8rem;
  text-align: left;
}
.cert-breakdown .cb-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(2,111,160,.07);
}
.cert-breakdown .cb-name { color: var(--ink); }
.cert-breakdown .cb-time { color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; }

.cert-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .72rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.cert-foot-mark { font-family: var(--heading); letter-spacing: 0.04em; color: var(--navy); }

.cert-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.cert-hint { font-size: .85rem; color: var(--muted); }
.cert-actions .btn:disabled,
.cert-actions .btn.locked {
  background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed;
}

@media (max-width: 560px) {
  .certificate { padding: 28px 20px 22px; }
  .cert-name { font-size: 2.2rem; }
  .cert-breakdown { grid-template-columns: 1fr; }
}

/* ---------- Cheat Sheet (one-page field guide) ---------- */

.cs-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.cs-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
}
.cheatsheet {
  width: 100%;
  max-width: 800px;
  background: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 22px 26px 18px;
  box-shadow: 0 12px 32px rgba(2, 111, 160, .14);
  font-family: var(--body);
  color: var(--ink);
}
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 18px;
}
.cs-kicker {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--terra);
  margin-bottom: 2px;
}
.cs-title {
  font-family: var(--heading); letter-spacing: 0.04em;
  font-size: 1.6rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.1;
}
.cs-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.cs-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 26px;
}
@media (max-width: 640px) { .cs-cols { grid-template-columns: 1fr; } }
.cs-col { display: flex; flex-direction: column; gap: 14px; }

.cs-block {
  background: var(--paper);
  border-left: 4px solid var(--cs-accent, var(--navy));
  padding: 10px 14px 10px 12px;
}
.cs-block-title {
  font-family: var(--body);
  text-transform: none;
  letter-spacing: 0;
  color: var(--cs-accent, var(--navy));
  font-size: .92rem;
  font-weight: 800;
  margin: 0 0 6px;
}
.cs-block ul {
  margin: 0;
  padding-left: 18px;
  font-size: .82rem;
  line-height: 1.45;
}
.cs-block li { margin: 3px 0; }
.cs-block strong { color: var(--navy); }

.cs-footer-card {
  margin-top: 18px;
  background: linear-gradient(135deg, var(--navy), #014e72);
  color: var(--paper);
  border-radius: 10px;
  padding: 14px 18px;
}
.cs-footer-title {
  font-family: var(--body);
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.cs-gutcheck {
  margin: 0;
  padding-left: 22px;
  font-size: .85rem;
  line-height: 1.4;
  columns: 2;
  column-gap: 28px;
}
.cs-gutcheck li { margin: 2px 0; break-inside: avoid; }

/* Certificate-only print mode (triggered by the "Save as PDF" button) */
@media print {
  body.print-cert .sidebar,
  body.print-cert .section,
  body.print-cert .cert-form,
  body.print-cert .cert-actions,
  body.print-cert .cert-incomplete,
  body.print-cert .section-footer { display: none !important; }
  body.print-cert #certificate.section {
    display: block !important;
    padding: 0 !important;
    /* The general .section rule below adds page-break-after:always — kill it
       here so the print job doesn't trail an empty page after the cert. */
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-cert #certificate .section-tag,
  body.print-cert #certificate > h2,
  body.print-cert #certificate > .lead { display: none !important; }
  body.print-cert .cert-wrap { display: block !important; }
  body.print-cert .certificate {
    max-width: 100%;
    box-shadow: none;
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-cert { margin: 0; }
}
@page { margin: 0.4in; }

/* Cheat-sheet-only print mode */
@media print {
  body.print-cheat .sidebar,
  body.print-cheat .section,
  body.print-cheat .cs-actions,
  body.print-cheat .section-footer { display: none !important; }
  body.print-cheat #cheatsheet.section {
    display: block !important;
    padding: 0 !important;
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-cheat #cheatsheet .section-tag,
  body.print-cheat #cheatsheet > h2,
  body.print-cheat #cheatsheet > .lead { display: none !important; }
  body.print-cheat .cs-wrap { display: block !important; }
  body.print-cheat .cheatsheet {
    max-width: 100%;
    box-shadow: none;
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-cheat { margin: 0; }
}

/* Print rules — export the whole module as a markup-ready PDF */
@media print {
  /* Render brand colors, callouts, swatches, and visual examples accurately */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body { background: #fff; font-size: 12pt; }
  .app { display: block; }

  /* Hide interactive chrome that has no meaning on paper */
  .sidebar,
  .section-footer,
  .progress,
  .modal-backdrop,
  .modal-close,
  .modal-trigger,
  .critique-submit,
  .studio-controls { display: none !important; }

  /* Expand every section; one module per page */
  .section {
    display: block !important;
    min-height: auto;
    page-break-after: always;
    padding: 0 0 24px;
    animation: none !important;
  }
  .main { padding: 0; }

  /* Reveal modal (deep-dive) content inline as an appendix at the end.
     Must override the flex + fixed-size + overflow:hidden base styles or the
     content collapses to empty pages. */
  .modal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    height: auto !important;
    page-break-before: always;
  }
  .modal-dialog {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-top: 3px solid #fcb426 !important;
    animation: none !important;
  }
  .modal-body {
    display: block !important;
    flex: none !important;
    overflow: visible !important;
    height: auto !important;
    padding: 12px 0 !important;
  }
  .modal-content { max-width: none !important; }

  /* Reveal critique answers + explanations so the reviewer sees them */
  .critique-options .explanation { display: block !important; }
  .critique-options li { break-inside: avoid; }

  /* The Studio canvas + tray won't make sense on paper, but keep the brief */
  .studio { display: block !important; }
  .studio-canvas-wrap { display: none !important; }

  /* Avoid awkward splits */
  .card, .principle, .stat, .viz, .callout, .quiz, .compare,
  .audit-item, .image-check li, .font-sample, .hier-demo {
    break-inside: avoid;
  }
  h2, h3, h4 { break-after: avoid; }
  a { color: #014e72 !important; text-decoration: underline; }
}


/* ====================================================================
   ANIMATIONS & INTERACTIONS (visual-learner aids)
   All auto-motion is gated behind prefers-reduced-motion: no-preference.
   Containers get .in-view via IntersectionObserver (animations.js).
   ==================================================================== */

/* SVG elements need fill-box so transforms pivot on themselves */
.prox-dot, .cf-up, .cf-down, .cont-dot { transform-box: fill-box; transform-origin: center; }

/* Interactive Rule-of-Thirds marker (works regardless of motion pref) */
.thirds.is-interactive { cursor: default; }
.thirds-marker {
  position: absolute;
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;            /* center on its left/top % */
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
  cursor: grab;
  z-index: 5;
  touch-action: none;
  transition: left .25s cubic-bezier(.34,1.56,.64,1), top .25s cubic-bezier(.34,1.56,.64,1);
}
.thirds-marker.dragging { cursor: grabbing; transition: none; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.thirds-marker.snapped { background: var(--gold); border-color: var(--navy); }
.thirds .pt.lit { box-shadow: 0 0 0 6px rgba(252,180,38,.45); }
#thirds-feedback.good { color: #2f8a4a; font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {

  /* Proximity — dots spread to an even row, then re-cluster (loop) */
  .in-view .prox-dot { animation: proxRegroup 6s ease-in-out infinite; }
  @keyframes proxRegroup {
    0%, 16%   { transform: translateX(0); }
    46%, 64%  { transform: translateX(var(--dx)); }
    94%, 100% { transform: translateX(0); }
  }

  /* Continuity — the curve draws itself, then dots pop in along it */
  .in-view .cont-trace {
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: drawTrace 1.4s ease forwards;
  }
  @keyframes drawTrace { to { stroke-dashoffset: 0; } }
  .in-view .cont-dot {
    animation: popDot .45s cubic-bezier(.34,1.56,.64,1) backwards;
    animation-delay: calc(var(--i) * .16s + .9s);
  }
  @keyframes popDot { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .in-view .cont-out { animation: popOut .5s ease backwards; animation-delay: 2.1s; }
  @keyframes popOut { from { opacity: 0; transform: scale(0); } to { opacity: .55; transform: scale(1); } }
  .cont-out { opacity: .55; }

  /* Common Fate — half the row rises, half falls (loop): grouped by motion */
  .in-view .cf-up   { animation: cfUp   2.2s ease-in-out infinite; }
  .in-view .cf-down { animation: cfDown 2.2s ease-in-out infinite; }
  @keyframes cfUp   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
  @keyframes cfDown { 0%,100% { transform: translateY(0); } 50% { transform: translateY(16px); } }

  /* Vibrating colors — tiny position jitter (no luminance flashing = safe) */
  .in-view .vibrate { animation: vibrate .13s steps(2, end) infinite; }
  @keyframes vibrate {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(0.8px, -0.6px); }
    50%  { transform: translate(-0.7px, 0.6px); }
    75%  { transform: translate(0.6px, 0.7px); }
    100% { transform: translate(0, 0); }
  }

  /* Tints — staggered reveal */
  .tints.in-view div { animation: tintIn .5s ease backwards; }
  .tints.in-view div:nth-child(1) { animation-delay: .05s; }
  .tints.in-view div:nth-child(2) { animation-delay: .15s; }
  .tints.in-view div:nth-child(3) { animation-delay: .25s; }
  .tints.in-view div:nth-child(4) { animation-delay: .35s; }
  .tints.in-view div:nth-child(5) { animation-delay: .45s; }
  @keyframes tintIn { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }

  /* F-pattern gaze tracer — a dot sweeping the F path with a soft trail */
  .gaze {
    position: absolute;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 5px rgba(252,180,38,.35), 0 0 14px 4px rgba(252,180,38,.55);
    top: 22%; left: 12%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
  }
  .f-pattern.in-view .gaze { animation: gazeF 6.5s ease-in-out infinite; }
  @keyframes gazeF {
    0%   { top: 22%; left: 12%; opacity: 0; }
    6%   { opacity: 1; }
    18%  { top: 22%; left: 86%; }              /* across the top */
    28%  { top: 22%; left: 12%; }              /* back to the left */
    40%  { top: 46%; left: 12%; }              /* down to the middle */
    52%  { top: 46%; left: 64%; }              /* across the middle */
    62%  { top: 46%; left: 12%; }              /* back to the left */
    86%  { top: 82%; left: 12%; opacity: 1; }  /* down the left edge */
    96%  { top: 82%; left: 12%; opacity: 0; }
    100% { top: 22%; left: 12%; opacity: 0; }
  }
}

/* Reduced-motion: the gaze dot is hidden entirely (static heat overlay remains) */
@media (prefers-reduced-motion: reduce) {
  .gaze { display: none; }
}

/* ---------- Feedback form ---------- */

.fb-form { margin: 12px 0 22px; display: flex; flex-direction: column; gap: 22px; }
.fb-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fb-label {
  font-family: var(--body);
  font-weight: 800;
  color: var(--navy);
  font-size: .98rem;
  line-height: 1.3;
}

/* Star rating */
.fb-stars { display: inline-flex; align-items: center; gap: 4px; }
.fb-star {
  background: none; border: none; padding: 4px 2px;
  font-size: 2rem; line-height: 1;
  color: var(--line);
  cursor: pointer;
  transition: transform .12s, color .12s;
}
.fb-star:hover { transform: scale(1.12); }
.fb-star:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.fb-star.active { color: var(--gold); }
.fb-stars-label {
  margin-left: 14px;
  font-size: .88rem;
  color: var(--muted);
  font-style: italic;
}

/* Radios + checkboxes */
.fb-radios { display: flex; flex-direction: column; gap: 6px; }
.fb-radios.fb-radios-row { flex-direction: row; gap: 22px; flex-wrap: wrap; }
.fb-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
}
@media (max-width: 600px) { .fb-checks { grid-template-columns: 1fr; } }
.fb-radios label, .fb-checks label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .95rem;
  cursor: pointer;
  color: var(--ink);
}
.fb-radios input[type=radio], .fb-checks input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--navy);
  margin-top: 2px;
  flex-shrink: 0;
}

/* Reflective text areas (reuse .reflect styling, but no border-left override needed) */
.fb-field.reflect { padding: 18px 20px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.fb-field.reflect .fb-label { margin-bottom: 4px; }
.fb-field.reflect textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem;
  resize: vertical;
}
.fb-field.reflect textarea:focus { outline: 2px solid var(--sky); border-color: var(--navy); }

/* Optional contact row */
.fb-row { display: flex; gap: 12px; flex-wrap: wrap; }
.fb-row input {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--body); font-size: 1rem;
}
.fb-row input:focus { outline: 2px solid var(--sky); border-color: var(--navy); }

/* Action row */
.fb-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 8px 0 18px;
}
#fb-status { font-size: .88rem; color: var(--muted); }
#fb-status.ok { color: #2f8a4a; font-weight: 700; }
