/* projects-future.css — additive "future layer" for unit projects.
   Adds: per-step metacognition ("Explain it back"), a portfolio summary
   export, and a teacher-only learning-visible telemetry panel.
   All styles are namespaced .ntf-* so they never collide with page CSS. */

.ntf-reflect {
  margin: 18px 0 4px;
  padding: 14px 16px;
  border: 1px solid #d7ddea;
  border-left: 4px solid #6b5bd2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfaff 0%, #f4f2fe 100%);
}
.ntf-reflect__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #4a3fb0;
  margin-bottom: 6px;
}
.ntf-reflect__prompt {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 8px;
  line-height: 1.4;
}
.ntf-reflect textarea {
  width: 100%;
  min-height: 60px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #c8cfdd;
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  resize: vertical;
}
.ntf-reflect textarea:focus {
  outline: none;
  border-color: #6b5bd2;
  box-shadow: 0 0 0 3px rgba(107, 91, 210, 0.15);
}
.ntf-reflect__status {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #6b7280;
  min-height: 1em;
}
.ntf-reflect__status.saved {
  color: #17803d;
}

/* Floating portfolio-summary button — bottom-LEFT: the bottom-right corner
   belongs to the Save/Resume pill + Math Workbench FAB + coach launcher
   (dock contract, 2026-07-14 visual audit). */
.ntf-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #6b5bd2;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(107, 91, 210, 0.35);
}
.ntf-fab:hover {
  background: #5a4bc0;
}
.ntf-fab:focus-visible {
  outline: 3px solid #b9aff0;
  outline-offset: 2px;
}

/* Submission evidence check in the final project step. */
.ntf-readiness {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #cfd7f4;
  border-radius: 14px;
  background: #f8f9ff;
}
.ntf-readiness__head {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.ntf-readiness__head > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #6b5bd2;
  color: #fff;
  font-weight: 800;
}
.ntf-readiness h3 {
  margin: 0;
  color: #31266f;
  font-size: 1.05rem;
}
.ntf-readiness p {
  margin: 3px 0 0;
  color: #4b5563;
  font-size: 0.9rem;
}
.ntf-readiness__list {
  margin: 14px 0;
  padding: 0;
  list-style: none;
}
.ntf-readiness__list li {
  margin: 7px 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.ntf-readiness__list .is-ready {
  background: #e8f7ec;
  color: #166534;
}
.ntf-readiness__list .needs-work {
  background: #fff7e6;
  color: #92400e;
}
/* Fixed-width leading icon column (the ✓ / → marker). Scoped to the icon span
   only — the previous `.ntf-readiness__list span` matched EVERY span, forcing
   the label/count/language spans into a 20px box so their text overlapped. */
.ntf-readiness__list li > span[aria-hidden="true"] {
  display: inline-block;
  width: 20px;
  font-weight: 900;
}
.ntf-readiness__open,
.ntf-portfolio__export,
.ntf-portfolio__cancel,
.ntf-readiness__jump {
  border: 0;
  border-radius: 9px;
  padding: 10px 13px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.ntf-readiness__open,
.ntf-portfolio__export {
  background: #5b4bc4;
  color: #fff;
}
.ntf-readiness__open:hover,
.ntf-portfolio__export:hover {
  background: #493aa9;
}
.ntf-readiness__jump {
  display: block;
  margin: 8px 0 0 20px;
  padding: 6px 9px;
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1px currentColor;
  font-size: 0.82rem;
}
.ntf-readiness__jump:hover,
.ntf-readiness__jump:focus-visible {
  background: rgba(255, 255, 255, 0.55);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Accessible, popup-free portfolio preview. */
.ntf-portfolio {
  width: min(560px, calc(100% - 28px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: #20253a;
  box-shadow: 0 22px 70px rgba(26, 27, 56, 0.3);
}
.ntf-portfolio::backdrop {
  background: rgba(19, 22, 43, 0.58);
}
.ntf-portfolio__card {
  position: relative;
  padding: 26px;
}
.ntf-portfolio__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  background: #eef0fa;
  color: #322775;
  font-size: 1.35rem;
  cursor: pointer;
}
.ntf-portfolio__eyebrow {
  margin: 0;
  color: #5b4bc4;
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ntf-portfolio h2 {
  margin: 4px 0 6px;
  font-size: 1.45rem;
}
.ntf-portfolio__status {
  margin: 0 0 16px;
  color: #4b5563;
}
.ntf-portfolio__evidence {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e4e7f2;
}
.ntf-portfolio__evidence li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #e4e7f2;
  font-size: 0.92rem;
}
.ntf-portfolio__evidence span {
  color: #5b4bc4;
  font-weight: 700;
  text-align: right;
}
.ntf-portfolio__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.ntf-portfolio__cancel {
  background: #edf0f7;
  color: #30384a;
}
@media print {
  .ntf-fab,
  .ntf-teacher,
  .ntf-readiness,
  .ntf-portfolio {
    display: none !important;
  }
}

/* Teacher-only learning-visible panel */
.ntf-teacher {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9000;
  max-width: 300px;
  padding: 12px 14px;
  border: 1px solid #f0c36d;
  border-radius: 12px;
  background: #fffdf5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  font-size: 0.82rem;
  color: #333;
}
.ntf-teacher__head {
  font-weight: 800;
  color: #8a5a00;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ntf-teacher__close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #8a5a00;
  line-height: 1;
}
.ntf-teacher dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
}
.ntf-teacher dt {
  color: #555;
}
.ntf-teacher dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

/* Body-level es toggle: show the matching language inside our cards.
   The page toggles `.es` on #body; mirror its en/es behavior for our copy. */
.ntf-es-only {
  display: none;
}
#body.es .ntf-en-only {
  display: none;
}
#body.es .ntf-es-only {
  display: inline;
}
