/* Module 04 — System Prompt.
   Only what styles.css does not already cover: the selectable system-prompt
   cards, the "what changed" fact strip, the rough-check list and the two
   injection examples. Everything uses the shared tokens. */

/* The shared .chip is 40px min-height and lands at 43px rendered, just under
   the 44px tap target this course asks for. Nudged here rather than in
   styles.css, which this module must not edit. */
.chip { min-height: 44px; }

/* ------------------------------------------------ selectable prompt cards */

.sp-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 760px) {
  .sp-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

.sp-card {
  font: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 14px 15px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.sp-card:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.sp-card[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.sp-card-name { font-weight: 700; font-size: .98rem; }
.sp-card-text {
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: pre-wrap;
  margin: 0;
}
.sp-card-none .sp-card-text { font-style: italic; }

/* ------------------------------------------------------ what changed strip */

.sp-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 620px) {
  .sp-facts { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
.sp-fact {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  padding: 10px 12px;
}
.sp-fact-label {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 3px;
}
.sp-fact-value { font-weight: 700; font-size: .95rem; }
.sp-fact-value.warn { color: var(--warn); }
.sp-fact-value.danger { color: var(--danger); }
.sp-fact-value.ok { color: var(--ok); }

.sp-note {
  margin: 14px 0 0;
  font-size: .93rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ rough check */

.sp-check-list { display: grid; gap: 9px; }
.sp-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  padding: 12px 14px;
}
.sp-check.on { border-left-color: var(--ok); background: var(--ok-soft); }
.sp-check-mark {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 700;
  background: #e3e9f2; color: var(--ink-faint);
}
.sp-check.on .sp-check-mark { background: var(--ok); color: #fff; }
.sp-check-body h4 { margin: 0 0 2px; font-size: .97rem; }
.sp-check-body p { margin: 0; font-size: .89rem; color: var(--ink-soft); }

.sp-score {
  font-weight: 700;
  margin: 0 0 14px;
}

/* --------------------------------------------------------- cost read-out */

.sp-cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

/* ----------------------------------------------------- injection examples */

.sp-turn + .sp-turn { margin-top: 10px; }
.sp-turn .response-head.hostile { color: var(--warn); background: var(--warn-soft); }
.sp-turn .response-head.leak { color: var(--danger); background: var(--danger-soft); }
.sp-turn .response-body.mono { font-family: var(--mono); font-size: .86rem; }

.sp-case + .sp-case {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.sp-case h3 { margin-bottom: 4px; }

.sp-rule-list { margin: 0; padding-left: 20px; }
.sp-rule-list li { margin-bottom: 10px; }
.sp-rule-list li:last-child { margin-bottom: 0; }
.sp-rule-list strong { color: var(--ink); }
