/*!
 * Neft Teacher — Activity Kit styles (nt-activity-kit.css)
 * Pairs with nt-activity-kit.js. Light, self-contained, offline-first.
 */

.ntkit-root {
  --ntkit-fg: #16243a;
  --ntkit-muted: #5a6b82;
  --ntkit-line: #d8e0ec;
  --ntkit-accent: #2b6cb0;
  --ntkit-good: #1f9d55;
  --ntkit-ok: #c08a00;
  --ntkit-low: #c0392b;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  color: var(--ntkit-fg);
}

/* ---- identity bar ---- */
.ntkit-bar {
  background: #f3f7fc;
  border: 1px solid var(--ntkit-line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.ntkit-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.ntkit-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 200px;
}
.ntkit-field--sm {
  flex: 0 1 140px;
}
.ntkit-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ntkit-muted);
}
.ntkit-field input {
  font: inherit;
  padding: 7px 9px;
  border: 1px solid var(--ntkit-line);
  border-radius: 7px;
  background: #fff;
}
.ntkit-field input:focus {
  outline: 2px solid var(--ntkit-accent);
  outline-offset: 1px;
}
.ntkit-saved {
  font-size: 12px;
  font-weight: 600;
  color: #147a40;
  min-width: 40px;
}

/* ---- action buttons ---- */
.ntkit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.ntkit-btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ntkit-accent);
  background: var(--ntkit-accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}
.ntkit-btn:hover {
  filter: brightness(1.06);
}
.ntkit-btn:active {
  transform: translateY(1px);
}
.ntkit-btn--alt {
  background: #fff;
  color: var(--ntkit-accent);
}

/* ---- results card ---- */
.ntkit-card {
  border: 1px solid var(--ntkit-line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}
.ntkit-tone-good {
  border-top: 4px solid var(--ntkit-good);
}
.ntkit-tone-ok {
  border-top: 4px solid var(--ntkit-ok);
}
.ntkit-tone-low {
  border-top: 4px solid var(--ntkit-low);
}

.ntkit-scorehead {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.ntkit-score {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}
.ntkit-tone-good .ntkit-score {
  color: var(--ntkit-good);
}
.ntkit-tone-ok .ntkit-score {
  color: var(--ntkit-ok);
}
.ntkit-tone-low .ntkit-score {
  color: var(--ntkit-low);
}
.ntkit-acttitle {
  font-weight: 700;
}
.ntkit-standard,
.ntkit-studentline {
  font-size: 13px;
  color: var(--ntkit-muted);
}

/* ---- per-item list ---- */
.ntkit-itemlist {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.ntkit-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--ntkit-line);
}
.ntkit-mark {
  font-weight: 800;
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex: 0 0 22px;
}
.ntkit-correct .ntkit-mark {
  color: var(--ntkit-good);
}
.ntkit-wrong .ntkit-mark {
  color: var(--ntkit-low);
}
.ntkit-prompt {
  font-weight: 600;
}
.ntkit-answerline {
  font-size: 13px;
  color: var(--ntkit-fg);
}
.ntkit-lbl {
  color: var(--ntkit-muted);
}
.ntkit-pts {
  font-size: 12px;
  font-weight: 700;
  color: var(--ntkit-muted);
}

/* ---- skill breakdown ---- */
.ntkit-skills {
  margin-top: 12px;
}
.ntkit-skills h4 {
  margin: 0 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ntkit-muted);
}
.ntkit-skilllist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ntkit-skilllist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin: 4px 0;
}
.ntkit-skillname {
  flex: 0 0 130px;
}
.ntkit-skillbar {
  flex: 1 1 auto;
  height: 8px;
  background: #e8eef6;
  border-radius: 5px;
  overflow: hidden;
}
.ntkit-skillbar > span {
  display: block;
  height: 100%;
  background: var(--ntkit-accent);
}
.ntkit-skillpct {
  flex: 0 0 40px;
  text-align: right;
  font-weight: 600;
}

/* ---- inline-print fallback (when pop-ups blocked) ---- */
.ntkit-print-only {
  display: none;
}
@media print {
  body.ntkit-printing > *:not(.ntkit-print-only) {
    display: none !important;
  }
  body.ntkit-printing .ntkit-print-only {
    display: block !important;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
  }
}

/* =========================================================================
   Neft Teacher — Premium Design System (additive, self-contained)
   Section 7 callout/box system + scaffold ladder + worked-example steps.
   Namespaced `.nt-*`; uses design-tokens.css values when present, falls
   back to literals so it works even when loaded standalone. Adds new
   classes only — does not alter existing `.ntkit-*` behavior.
   ========================================================================= */

/* ---- shared callout/box base ---- */
.nt-callout {
  --_accent: var(--teal, #1fa6a2);
  --_tint: var(--teal-light, #dff2ee);
  position: relative;
  border: 1px solid var(--line, #d7e2ed);
  border-left: 5px solid var(--_accent);
  background: var(--_tint);
  border-radius: var(--radius-md, 14px);
  padding: 14px 16px 14px 16px;
  margin: 14px 0;
  color: var(--ink, #21313f);
  line-height: 1.55;
}
.nt-callout > .nt-callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin: 0 0 6px;
  color: var(--_accent);
}
.nt-callout > .nt-callout-title::before {
  font-size: 1.1em;
  line-height: 1;
}
.nt-callout p:last-child,
.nt-callout ul:last-child,
.nt-callout ol:last-child {
  margin-bottom: 0;
}

/* ---- box variants (one accent + icon each) ---- */
.nt-vocab {
  --_accent: #0f6f6b;
  --_tint: #dff2ee;
}
.nt-vocab > .nt-callout-title::before {
  content: "📖";
}
.nt-teacher {
  --_accent: #5f6f80;
  --_tint: #eef2f6;
  font-style: italic;
}
.nt-teacher > .nt-callout-title::before {
  content: "👩‍🏫";
}
.nt-teacher > .nt-callout-title {
  font-style: normal;
}
.nt-challenge {
  --_accent: #8a6508;
  --_tint: var(--amber-light, #fef7e0);
}
.nt-challenge > .nt-callout-title::before {
  content: "⭐";
}
.nt-mistake,
.nt-error {
  --_accent: var(--error, #b64e2f);
  --_tint: var(--error-bg, #fef0ec);
}
.nt-mistake > .nt-callout-title::before,
.nt-error > .nt-callout-title::before {
  content: "⚠️";
}
.nt-selfcheck {
  --_accent: var(--success, #0f7c4a);
  --_tint: var(--success-bg, #e6f7ef);
}
.nt-selfcheck > .nt-callout-title::before {
  content: "✅";
}
.nt-info {
  --_accent: var(--navy, #12355b);
  --_tint: #eaf1f9;
}
.nt-info > .nt-callout-title::before {
  content: "💡";
}

/* ---- vocabulary card: word + plain definition + image ---- */
.nt-vocab-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: center;
}
.nt-vocab-card img,
.nt-vocab-card .nt-vocab-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-sm, 8px);
  background: #fff;
  border: 1px solid var(--line, #d7e2ed);
  grid-row: span 2;
}
.nt-vocab-card .nt-vocab-word {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink, #21313f);
}
.nt-vocab-card .nt-vocab-def {
  font-size: 0.95rem;
  color: var(--muted, #5f6f80);
}

/* ---- Level 0/1/2 scaffold frame panel ---- */
.nt-frames {
  border: 1px dashed var(--line, #d7e2ed);
  background: #fbfcfe;
  border-radius: var(--radius-md, 14px);
  padding: 12px 14px;
  margin: 14px 0;
}
.nt-frames .nt-frame {
  border-left: 4px solid var(--line, #d7e2ed);
  padding: 4px 0 4px 12px;
  margin: 8px 0;
}
.nt-frames .nt-frame-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
  color: #fff;
}
.nt-frame--l0 {
  border-left-color: #1fa6a2;
}
.nt-frame--l0 .nt-frame-label {
  background: #0f7c78;
}
.nt-frame--l1 {
  border-left-color: #2b6cb0;
}
.nt-frame--l1 .nt-frame-label {
  background: #2b6cb0;
}
.nt-frame--l2 {
  border-left-color: #b8860b;
}
.nt-frame--l2 .nt-frame-label {
  background: #8a6508;
}

/* ---- color-coded worked-example steps ---- */
.nt-steps {
  list-style: none;
  counter-reset: nt-step;
  margin: 14px 0;
  padding: 0;
}
.nt-steps > li {
  counter-increment: nt-step;
  position: relative;
  padding: 10px 12px 10px 46px;
  margin: 8px 0;
  border-radius: var(--radius-sm, 8px);
  background: #f7fafd;
  border: 1px solid var(--line, #d7e2ed);
}
.nt-steps > li::before {
  content: counter(nt-step);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}
.nt-steps > li:nth-child(3n + 1)::before {
  background: #2b6cb0;
}
.nt-steps > li:nth-child(3n + 2)::before {
  background: #0f7c4a;
}
.nt-steps > li:nth-child(3n)::before {
  background: #7b4bb0;
}

/* ---- hint ladder: hint 1 / hint 2 / reveal ---- */
.nt-hints {
  margin: 14px 0;
}
.nt-hints details {
  border: 1px solid var(--line, #d7e2ed);
  border-radius: var(--radius-sm, 8px);
  background: var(--hint-bg, #fef7e0);
  margin: 6px 0;
  padding: 0;
}
.nt-hints details > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--hint, #875f00);
  padding: 9px 12px;
}
.nt-hints details > summary::-webkit-details-marker {
  display: none;
}
.nt-hints details > summary::before {
  content: "💡 ";
}
.nt-hints details[open] > summary {
  border-bottom: 1px solid var(--line, #d7e2ed);
}
.nt-hints details > div {
  padding: 10px 12px;
}
.nt-hints details.nt-reveal {
  background: var(--success-bg, #e6f7ef);
}
.nt-hints details.nt-reveal > summary {
  color: var(--success, #0f7c4a);
}
.nt-hints details.nt-reveal > summary::before {
  content: "✅ ";
}

/* ---- self-check rubric strip ---- */
.nt-rubric {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
}
.nt-rubric .nt-rubric-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line, #d7e2ed);
  border-radius: 999px;
  padding: 4px 12px;
  background: #fff;
}

/* ---- print friendliness for the design-system boxes ---- */
@media print {
  .nt-callout,
  .nt-frames,
  .nt-steps > li {
    break-inside: avoid;
    box-shadow: none;
    background: #fff !important;
  }
  .nt-hints details {
    background: #fff !important;
  }
  .nt-hints details:not([open]) > summary::after {
    content: " (see answer key)";
    font-style: italic;
    color: #555;
  }
}
