/* ─────────────────────────────────────────────────────────────────────────────
   Cheat sheets, the in-game cheat drawer, and Projects.
   Split out of screens.css purely to keep each file readable; same conventions.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Cheat sheets ──────────────────────────────────────────────────────────────
   Colour does the work here. A page of identically grey code blocks reads as homework;
   giving every card its own hue is what gets someone to start reading, and the number
   badge gives the eye a rail to follow down the page. */

.cs-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.cs-tabs::-webkit-scrollbar { display: none; }

.cs-intro { margin-bottom: 14px; }
.cs-intro-lead { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.cs-intro-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text-gray); }

/* Two modes, weighted equally, because the short list is the honest default and the long
   one has to be visibly available rather than hidden behind a filter icon. */
.cs-modes { display: flex; gap: 10px; margin-bottom: 12px; }
.cs-mode {
  flex: 1; padding: 13px 10px; border-radius: 14px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--text-gray); background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--neutral-border);
}
.cs-mode b { font-weight: 800; opacity: 0.75; margin-left: 3px; }
.cs-mode-star { color: var(--amber-warm); margin-right: 2px; }
.cs-mode.on {
  color: #fff; background: rgba(134, 93, 255, 0.16);
  border-color: rgba(134, 93, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(134, 93, 255, 0.25) inset;
}
.cs-mode.on b { opacity: 1; }

.cs-search { position: relative; display: block; }
.cs-search input {
  width: 100%; height: 48px; padding: 0 12px 0 40px; border-radius: 14px; font: inherit; font-size: 13px;
  color: var(--text-white); background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--neutral-border); outline: none;
}
.cs-search input:focus { border-color: var(--brand-purple); }
.cs-search input::-webkit-search-cancel-button { filter: invert(0.6); }
.cs-search-icon { position: absolute; left: 14px; top: 16px; color: var(--text-gray); pointer-events: none; }
.cs-count { margin: 12px 0 14px; font-size: 11px; color: rgba(255, 255, 255, 0.32); }

.cs-section { margin-bottom: 22px; }
.cs-section-name {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 10px; padding: 8px 2px;
  font-size: 11px; font-weight: 900; letter-spacing: 1.3px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, var(--cosmic-dark-bg) 70%, transparent);
}
.cs-section-count { font-size: 10px; font-weight: 700; letter-spacing: 0; color: rgba(255, 255, 255, 0.25); }

/* ── One entry ─────────────────────────────────────────────────────────────── */
.cs-entry {
  margin-bottom: 10px; border-radius: 16px; overflow: hidden;
  background: var(--surface-card);
  border: 1px solid color-mix(in srgb, var(--entry) 26%, transparent);
  box-shadow: var(--shadow-card), var(--edge-light);
}
.cs-entry.open { border-color: color-mix(in srgb, var(--entry) 42%, transparent); }

.cs-entry-head { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 14px; text-align: left; }
.cs-num {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 8px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--entry); background: color-mix(in srgb, var(--entry) 15%, transparent);
}
.cs-entry-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cs-entry-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: 0.01em; color: var(--entry); line-height: 1.25;
}
.cs-what { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--text-white); }
.cs-entry:not(.open) .cs-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-gray); }
.cs-caret { flex: none; margin-top: 3px; color: rgba(255, 255, 255, 0.28); display: grid; place-items: center;
  transition: transform 200ms var(--ease-standard); }
.cs-entry.open .cs-caret { transform: rotate(180deg); }

.cs-entry-body { display: none; padding: 0 14px 14px 51px; }
.cs-entry.open .cs-entry-body { display: block; }

/* The pattern carries the card's colour; the example stays neutral so the two never
   compete for attention. */
.cs-pattern {
  display: block; padding: 11px 13px; border-radius: 10px;
  font-size: 12px; line-height: 19px; white-space: pre-wrap; word-break: break-word;
  color: var(--entry);
  background: color-mix(in srgb, var(--entry) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--entry) 20%, transparent);
}
.cs-example {
  position: relative; margin-top: 9px; padding: 11px 46px 11px 13px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.36); border: 1px solid var(--neutral-border);
}
.cs-example code {
  display: block; font-size: 12px; line-height: 19px;
  color: rgba(255, 255, 255, 0.82); white-space: pre-wrap; word-break: break-word;
}
.cs-copy {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  color: var(--text-gray); background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--neutral-border);
}
.cs-copy.done { color: var(--success-green); border-color: rgba(0, 200, 150, 0.4); }

.cs-tip {
  margin: 10px 0 0; padding: 2px 0 2px 12px;
  font-size: 12px; line-height: 18px; color: var(--text-gray);
  border-left: 3px solid color-mix(in srgb, var(--entry) 55%, transparent);
}

/* ── In-game cheat sheet drawer ────────────────────────────────────────────── */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(3, 2, 8, 0.7); animation: fade-in 180ms var(--ease-standard) both;
}
#app .drawer-scrim { max-width: var(--app-width); margin: 0 auto; }
.cheat-drawer {
  width: 100%; max-height: 86dvh; display: flex; flex-direction: column;
  border-radius: 24px 24px 0 0; background: var(--cosmic-dark-bg);
  border: 1px solid var(--neutral-border); border-bottom: none;
  animation: sheet-up 280ms var(--ease-standard) both;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.drawer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--neutral-border); }
.drawer-title { margin: 0; font-size: 15px; font-weight: 900; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }

.cheat-btn { flex: none; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 700; color: var(--cyan-link); background: rgba(0, 210, 252, 0.08); border: 1px solid rgba(0, 210, 252, 0.25); }
.game-top { gap: 8px; }
.game-top .hint-btn { padding: 8px 10px; font-size: 11.5px; }

/* ── Projects ──────────────────────────────────────────────────────────────── */
.pj-list { display: flex; flex-direction: column; gap: 10px; }
.pj-card { display: flex; align-items: flex-start; gap: 13px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.pj-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; font-size: 11px; font-weight: 900; letter-spacing: 0.5px; }
.pj-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pj-name { font-size: 14.5px; font-weight: 800; }
.pj-sub { margin-top: 2px; font-size: 11.5px; line-height: 17px; color: var(--text-gray); }
.pj-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pj-tag { padding: 2px 7px; border-radius: 5px; font-size: 9.5px; font-weight: 700; color: var(--text-gray); background: rgba(255, 255, 255, 0.05); }
.pj-meta { margin-top: 7px; font-size: 10.5px; color: rgba(255, 255, 255, 0.38); }

.pj-block { display: block; margin-bottom: 12px; padding: 16px; border-radius: 16px; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.pj-block .card-eyebrow { display: block; margin-bottom: 8px; }
.pj-brief { margin: 0; font-size: 13px; line-height: 20px; color: var(--text-gray); }
.pj-dataset-name { font-size: 13.5px; font-weight: 700; color: var(--card-accent); }
.pj-dataset-meta { margin-top: 3px; font-size: 11.5px; color: var(--text-gray); }
.pj-columns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pj-dataset-link {
  display: inline-block; margin-top: 12px; padding: 9px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 700; text-decoration: none; color: var(--card-accent);
  background: color-mix(in srgb, var(--card-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
}
.pj-companies { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-company { padding: 4px 9px; border-radius: 7px; font-size: 11px; font-weight: 600; color: var(--text-gray); background: rgba(255, 255, 255, 0.05); }
.pj-questions { display: flex; flex-direction: column; gap: 8px; }
.pj-question { display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left; padding: 11px; border-radius: 12px; background: rgba(255, 255, 255, 0.02); border: 1px solid transparent; }
.pj-question.checked { border-color: color-mix(in srgb, var(--card-accent) 35%, transparent); }
.pj-question .topic-check { margin-top: 0; }
.pj-question.checked .topic-check { background: var(--card-accent); border-color: var(--card-accent); }
.pj-question-text { font-size: 12.5px; line-height: 19px; color: var(--text-gray); }
.pj-question.checked .pj-question-text { color: rgba(255, 255, 255, 0.35); }
.pj-deliverables { margin: 0; padding-left: 18px; }
.pj-deliverables li { margin-bottom: 7px; font-size: 12.5px; line-height: 19px; color: var(--text-gray); }
