/* exam.4ab.in — Notes Maker (app/notes.html), Brief 5-F1.
   Loads after tokens.css + app.css. Every colour still comes from a token —
   this file only adds the components those two do not already have: the
   picker (topic/chapter tabs, level/lang/mode), the worked-example and
   practice cards, the AI section, the export bar, and the "My notes" list.
   Print handling reuses the existing `.noprint` convention from topic.html's
   header, plus a `@media print` pass here that hides the picker/toolbar/AI
   button/export bar so only the notes content itself prints.
*/

/* ---------------------------------------------------------------- shell */

#boot { padding: 60px 20px; text-align: center; color: var(--muted); }
#boot .bar2 { width: 220px; height: 4px; border-radius: 3px; background: var(--line);
  margin: 14px auto 0; overflow: hidden; }
#boot .bar2 i { display: block; height: 100%; width: 40%; background: var(--navy-2);
  animation: nt-sl 1.1s ease-in-out infinite; }
@keyframes nt-sl { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { #boot .bar2 i { animation: none; width: 100%; } }

.nt-section { margin: 0 0 26px; }
.nt-section > h2 { font-size: 19px; margin: 0 0 4px; }
.nt-section__note { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.tp-caveat {
  font-size: 12.5px; color: var(--body); margin: 8px 0 14px; padding: 9px 12px;
  border-radius: var(--r-sm); background: var(--chip-bg); border: 1px solid var(--chip-line);
}

/* --------------------------------------------------------------- picker */

.nt-picker { padding: 22px 24px; max-width: 640px; margin: 0 auto; }
.nt-picker h1 { font-size: 24px; margin: 0 0 8px; }

.nt-tabs { display: flex; gap: 6px; margin: 14px 0 14px; }
.nt-tab {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.nt-tab:hover { background: var(--card-2); }
.nt-tab.is-active { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }

.nt-pickpane { margin-bottom: 6px; }

.nt-mode { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.nt-mode .check { align-items: flex-start; }
.nt-mode .check input { margin-top: 3px; }

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

.nt-toolbar {
  position: sticky; top: 62px; z-index: 30;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 14px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------- example / practice */

.nt-example { padding: 14px 16px 16px; margin-bottom: 14px; }
.nt-example__head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.nt-example__head > b { font: 700 13px/1 var(--mono); color: var(--on-navy); background: var(--navy);
  padding: 5px 9px; border-radius: 7px; flex: none; }
.nt-example__crop {
  background: var(--crop-bg); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 10px; overflow-x: auto;
}
.nt-example__crop img { display: block; height: auto; max-width: 100%; }

/* ---------------------------------------------------------------- revision */

ul.nt-revlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.nt-revlist li {
  padding: 8px 12px; border-radius: var(--r-sm); background: var(--card-2);
  border: 1px solid var(--line-2); font: 13.5px var(--mono); color: var(--body);
}

/* --------------------------------------------------------------------- AI */

.nt-ai { padding: 18px 20px; }
.nt-ai .btn[disabled] { opacity: .55; }
.nt-ai__note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.nt-ai-block, .nt-ai .nt-ai-block { margin-top: 16px; padding: 14px 16px;
  border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line-2); }
.nt-ai-block h2 { font-size: 15px; margin: 0 0 8px; }
.nt-ai__banner {
  color: var(--amber); background: rgba(217, 119, 6, .1); border: 1px solid rgba(217, 119, 6, .3);
  padding: 8px 12px; border-radius: var(--r-sm); font-size: 12px; margin: 0 0 10px;
}
.nt-ai__body { white-space: pre-wrap; font-size: 14px; color: var(--body); line-height: 1.6; }
.nt-ai__cost { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* ------------------------------------------------------------------ export */

.nt-exports { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- my notes */

.nt-mynotes { display: flex; flex-direction: column; gap: 8px; }
.nt-mynotes__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; flex-wrap: wrap;
}

/* -------------------------------------------------------------------- print */

@media print {
  .noprint, .nt-toolbar, .top, .nt-ai .btn { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .card { box-shadow: none; border: none; }
  .nt-example, .nt-ai-block { break-inside: avoid; page-break-inside: avoid; }
}

/* ===================================================================
   THE BUILDER, REDESIGNED (owner 2026-09-13: "redesign this also")

   Ten dropdowns used to sit in one flat stack. They are three different
   decisions — what to cover, who it is for, which kind of notes — so they
   are numbered and grouped that way, and the one action on the page gets
   a footer of its own instead of being the last item in the pile.
   =================================================================== */
.nt-picker--v2 { padding: 18px; }
.nt-head__h { margin: 0 0 3px; font-size: 1.18rem; color: var(--ink, #1B2A5E); }
.nt-head__note { margin: 0 0 16px; font-size: .9rem; line-height: 1.5;
  color: var(--body-c, #4a5163); max-width: 74ch; }

.nt-step { position: relative; padding: 14px 0 14px 36px; border-top: 1px solid var(--line, #e6e9f2); }
.nt-step:first-of-type { border-top: 0; padding-top: 4px; }
.nt-step__n {
  position: absolute; left: 0; top: 16px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: #eef2fb; color: var(--ink, #1B2A5E);
  font: 700 .8rem/1 Roboto, sans-serif;
}
.nt-step:first-of-type .nt-step__n { top: 5px; }
.nt-step__t {
  display: block; margin-bottom: 10px; font: 700 .93rem/1.2 Roboto, sans-serif;
  color: var(--ink, #1B2A5E);
}

/* the one action on the page */
.nt-go {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 4px; padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(201,168,76,.08));
  border: 1px solid rgba(27,42,94,.08);
}
.nt-go__b { min-height: 46px; padding-inline: 26px; font-size: .98rem; }
.nt-go__note { flex: 1 1 260px; font-size: .84rem; line-height: 1.45; color: var(--body-c, #4a5163); }

@media (max-width: 760px) {
  .nt-picker--v2 { padding: 14px; }
  .nt-step { padding-left: 32px; }
  .nt-go__b { flex: 1 1 100%; }
}
