/* ============================================================
   THE NEXT MOVE — a decision toolkit under /library/
   Styles for the hub, the 7 tool pages, and the small callout box
   that appears on their 7 paired essay posts. Deliberately separate
   from /course/course.css: this is Toolbox content, not a course, and
   /library/ has never depended on /course/.
   ============================================================ */

.nm-page,
.nm-hub-page { color-scheme: dark; }

.nm-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 22px 80px;
}

.nm-head { padding: 26px 0 0; }

.nm-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.05;
  margin: 10px 0 0;
  color: var(--ors-ink);
}

.nm-dek {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.9vw, 17px);
  line-height: 1.55;
  color: var(--ors-dim);
  margin: 14px 0 0;
  max-width: 62ch;
}

/* ---------- toolbar ---------- */

.nm-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--ors-line-strong);
  border-radius: 4px;
  background: rgba(7, 6, 18, 0.92);
  backdrop-filter: blur(8px);
}

.nm-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ors-lime);
}

.nm-toolbar-actions { display: flex; gap: 8px; }

.nm-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ors-ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ors-line-strong);
  border-radius: 3px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nm-btn-print { border-color: rgba(37, 99, 255, 0.55); background: rgba(37, 99, 255, 0.12); }
.nm-btn-print:hover { border-color: var(--ors-cyan); background: rgba(37, 99, 255, 0.22); }
.nm-btn-clear:hover { border-color: var(--ors-magenta); color: var(--ors-magenta); }

.nm-privacy {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.75;
  color: var(--ors-dim);
  margin: 12px 0 0;
}

/* ---------- sections ---------- */

.nm-section {
  margin: 34px 0 0;
  padding: 24px 26px;
  border: 1px solid var(--ors-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
}

.nm-section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ors-ink);
  margin: 0;
}

.nm-section-num {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0;
  color: var(--ors-lime);
}

.nm-section-note {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ors-dim);
  margin: 12px 0 0;
  max-width: 66ch;
}

/* ---------- fields ---------- */

.nm-field { margin: 22px 0 0; }

.nm-label {
  display: block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ors-ink);
}

.nm-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--ors-dim);
  margin: 5px 0 0;
  max-width: 66ch;
}

.nm-input,
.nm-area,
.nm-select {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ors-ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ors-line-strong);
  border-radius: 3px;
  padding: 10px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nm-area { resize: vertical; overflow: hidden; min-height: 62px; }

.nm-input:focus,
.nm-area:focus,
.nm-select:focus {
  outline: none;
  border-color: var(--ors-cyan);
  background: rgba(37, 99, 255, 0.07);
}

.nm-select { appearance: none; cursor: pointer; }
.nm-select option { background: #0d0b1c; color: var(--ors-ink); }

/* ---------- checkboxes ---------- */

.nm-field-check { margin-top: 14px; }

.nm-check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.nm-check input { position: absolute; opacity: 0; width: 0; height: 0; }

.nm-check-box {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 1px solid var(--ors-line-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}

.nm-check input:focus-visible + .nm-check-box { outline: 2px solid var(--ors-cyan); outline-offset: 2px; }
.nm-check input:checked + .nm-check-box { background: var(--ors-lime); border-color: var(--ors-lime); }
.nm-check input:checked + .nm-check-box::after {
  content: "✓"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700; color: #0b1005;
}

.nm-check-label {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ors-ink);
}

/* ---------- the 1000-week calculator ---------- */

.nm-calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.nm-calc-result {
  margin-top: 26px;
  padding: 22px;
  border: 1px solid rgba(190, 242, 100, 0.35);
  border-radius: 4px;
  background: rgba(190, 242, 100, 0.05);
  text-align: center;
}

.nm-calc-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(40px, 9vw, 68px);
  line-height: 1;
  color: var(--ors-dim);
}

.nm-calc-number.is-live { color: var(--ors-lime); }

.nm-calc-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ors-dim);
}

@media (max-width: 640px) {
  .nm-calc-row { grid-template-columns: 1fr; }
}

/* ---------- footer bits ---------- */

.nm-print-value { display: none; }

.nm-source {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--ors-dim);
  margin: 40px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--ors-line);
}

.nm-back-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ors-cyan);
  text-decoration: none;
  border-bottom: 1px dotted rgba(37, 99, 255, 0.5);
}

.nm-back-link:hover { color: var(--ors-magenta); border-bottom-color: var(--ors-magenta); }

/* ---------- the callout on a paired essay post ---------- */

.nm-callout {
  max-width: 700px;
  margin: 44px auto 0;
  padding: 26px 28px;
  border: 1px solid rgba(190, 242, 100, 0.35);
  border-radius: 4px;
  background: rgba(190, 242, 100, 0.05);
}

.nm-callout-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ors-lime);
  margin: 0;
}

.nm-callout h2 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.6vw, 25px);
  line-height: 1.2;
  margin: 8px 0 10px;
  color: var(--ors-ink);
}

.nm-callout p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ors-dim);
  margin: 0 0 16px;
}

.nm-callout-note {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  margin: 14px 0 0 !important;
}

/* Off-screen measuring element for textarea auto-grow. */
.nm-ghost {
  position: absolute;
  top: 0;
  left: -99999px;
  visibility: hidden;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  border-color: transparent;
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .ors-vhs, .ors-scanlines, .ors-grain, .ors-glow, .ors-gridnoise,
  .ors-nav, .hub-breadcrumb, .ors-foot,
  .nm-toolbar, .nm-privacy, .nm-back-link { display: none !important; }

  html, body { background: #fff !important; color: #000 !important; }
  .nm-main { max-width: none; padding: 0; }

  .nm-title, .nm-check-label, .nm-label, .nm-section-title { color: #000 !important; }
  .nm-dek, .nm-hint, .nm-section-note, .nm-source { color: #333 !important; }
  .nm-section-num { color: #000 !important; }
  .nm-calc-number, .nm-calc-label { color: #000 !important; }
  .nm-calc-result { background: none !important; border: 1px solid #000 !important; }

  .nm-section {
    background: none !important; border: 0; border-top: 1px solid #000;
    border-radius: 0; padding: 14px 0 0; margin: 20px 0 0; break-inside: avoid;
  }

  .nm-field { break-inside: avoid; margin-top: 14px; }
  .nm-input, .nm-area, .nm-select, .nm-check input { display: none !important; }

  .nm-print-value {
    display: block; min-height: 20px; margin-top: 5px; padding-bottom: 3px;
    border-bottom: 1px solid #999; font-family: var(--font-body); font-size: 12pt;
    line-height: 1.5; color: #000; white-space: pre-wrap;
  }

  .nm-field-check .nm-print-value { display: none; }
  .nm-check-box { border-color: #000 !important; background: none !important; }
  .nm-check input:checked + .nm-check-box { background: none !important; }
  .nm-check input:checked + .nm-check-box::after { color: #000 !important; }
}
