/* Review annotations — see js/annotations.js. Nothing here affects layout:
   outlines and an absolutely positioned pin layer only. Stripped before launch. */
.notes-toggle {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90000;
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.7em 1em 0.7em 1.1em; border: 1px solid var(--line-paper);
  border-radius: 999px; background: var(--sierra-deep); color: var(--bone);
  font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.02em; cursor: pointer;
  box-shadow: 0 10px 30px rgba(42, 58, 73, 0.28);
}
.notes-toggle:hover { background: var(--charcoal); }
.notes-toggle:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.notes-toggle__count {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em;
  padding: 0 0.4em; border-radius: 999px; background: var(--clay); color: var(--charcoal);
  font-size: 0.75rem;
}
.notes-on .notes-toggle { background: var(--clay); color: var(--charcoal); border-color: transparent; }
.notes-on .notes-toggle__count { background: var(--charcoal); color: var(--bone); }
@media (max-width: 48rem) { .notes-toggle { bottom: 5.2rem; right: 0.75rem; } }

/* marked elements: outline only, no box-model change */
.notes-on .has-note { outline: 2px dashed var(--juniper); outline-offset: 6px; }
.notes-on .has-note--review { outline-color: var(--clay); }

/* the pin layer */
.notes-layer { position: absolute; inset: 0 auto auto 0; width: 0; height: 0; z-index: 80000; pointer-events: none; }
.note-pin {
  position: absolute; transform: translateY(-100%);
  pointer-events: auto; cursor: pointer; border: 0; border-radius: 4px 4px 4px 0;
  padding: 0.28em 0.6em; font: 700 0.6875rem/1 var(--caps); letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--juniper); color: var(--bone); box-shadow: 0 4px 14px rgba(42, 58, 73, 0.25);
  display: none;
}
.note-pin--review { background: var(--clay); color: var(--charcoal); }
.notes-on .note-pin { display: inline-block; }
.note-pin:hover { filter: brightness(0.92); }
.note-pin:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }

/* the note itself */
.note-pop {
  position: absolute; z-index: 90001; padding: 1rem 2.4rem 1rem 1.1rem;
  background: var(--bone-light); color: var(--charcoal); border: 1px solid var(--line);
  border-left: 4px solid var(--juniper); border-radius: var(--r-md);
  box-shadow: 0 18px 44px rgba(42, 58, 73, 0.22); font-family: var(--sans);
}
.note-pop--review { border-left-color: var(--clay); }
.note-pop__kind { margin: 0 0 0.35rem; font: 700 0.6875rem/1.2 var(--caps); letter-spacing: 0.16em; text-transform: uppercase; color: var(--juniper); }
.note-pop--review .note-pop__kind { color: var(--clay-deep); }
.note-pop__title { margin: 0 0 0.5rem; font: 600 1rem/1.3 var(--serif); color: var(--charcoal); }
.note-pop__body { margin: 0; font-size: 0.875rem; line-height: 1.55; color: var(--ink-soft); }
.note-pop__cite { margin: 0.7rem 0 0; font-size: 0.75rem; line-height: 1.4; color: var(--sierra); }
.note-pop__cite a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.note-pop__close {
  position: absolute; top: 0.5rem; right: 0.5rem; width: 1.8rem; height: 1.8rem;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.note-pop__close:hover { background: var(--bone-deep); color: var(--charcoal); }

@media print { .notes-toggle, .notes-layer, .note-pop { display: none !important; } .has-note { outline: none !important; } }
