/* ============================================================
   notes.css — project notes pages (/projects/*)
   Reuses the base.css design system. Single readable column,
   developer's-notebook layout with a sticky meta rail on desktop.
   ============================================================ */

.note-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px) 64px;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, gap 0.15s ease;
}
.back-link:hover { color: var(--accent); gap: 11px; }

/* ---------- Note header ---------- */
.note-header {
  margin: 26px 0 8px;
}
.note-header .meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.note-header h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}
.note-lede {
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  color: var(--fg-soft);
  max-width: 60ch;
  line-height: 1.55;
  margin: 0 0 20px;
}
.note-header .chips { margin-bottom: 18px; }

/* progress block for in-progress projects */
.note-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 460px;
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.note-progress .progress { flex: 1; height: 8px; }
.note-progress .pct { color: var(--accent); font-weight: 600; min-width: 42px; text-align: right; }

/* primary CTA row */
.note-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 22px 0 4px;
}

/* ---------- Body layout ---------- */
.note-body {
  display: grid;
  gap: clamp(24px, 4vw, 40px);
  margin-top: 34px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .note-body { grid-template-columns: minmax(0, 1fr) 230px; }
}

.note-main { min-width: 0; }

/* Section blocks */
.note-section { margin-bottom: 38px; scroll-margin-top: 24px; }
.note-section:last-child { margin-bottom: 0; }
.note-section > h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.note-section > h2 .idx {
  font-family: var(--font-mono);
  font-size: 0.62em;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.note-section p { color: var(--fg-soft); margin: 0 0 14px; }
.note-section p:last-child { margin-bottom: 0; }
.note-section strong { color: var(--fg); font-weight: 600; }
.note-section a { color: var(--link); }

.note-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.note-list li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-soft);
}
.note-list li::before {
  content: "→";
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}
.note-list li b { color: var(--fg); }

/* numbered roadmap list */
.roadmap { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.roadmap li {
  position: relative;
  padding-left: 40px;
  color: var(--fg-soft);
  counter-increment: step;
}
.roadmap li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.05em;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--grad-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}
.roadmap li b { color: var(--fg); }

/* Callout / note box */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  padding: 15px 17px;
  margin: 18px 0 0;
  display: flex;
  gap: 12px;
}
.callout .ic { font-size: 18px; line-height: 1.4; flex: none; }
.callout p { margin: 0; font-size: 14.5px; color: var(--fg-soft); }
.callout strong { color: var(--fg); }
.callout.privacy { border-left-color: var(--good); }
.callout.limit { border-left-color: var(--warn); }

/* code/keyword token */
.tok {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--fg-soft);
}

/* ---------- Sticky meta rail ---------- */
.note-rail { min-width: 0; }
@media (min-width: 900px) {
  .note-rail { position: sticky; top: 24px; align-self: start; }
}
.rail-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  padding: 16px 17px;
}
.rail-card + .rail-card { margin-top: 14px; }
.rail-card h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 600;
}
.rail-meta { display: grid; gap: 11px; }
.rail-meta .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.rail-meta .row .k { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.rail-meta .row .v { color: var(--fg-soft); text-align: right; font-family: var(--font-mono); font-size: 12.5px; }
.rail-toc { display: grid; gap: 8px; }
.rail-toc a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  gap: 9px;
  transition: color 0.15s ease;
}
.rail-toc a .n { color: var(--accent); }
.rail-toc a:hover { color: var(--fg); }

/* top bar mirrors site */
.note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0 4px;
}
