/* Annotation layer. Everything is prefixed .mn- and lives in a fixed
   overlay; nothing here styles the design. */

.mn-bar, .mn-layer, .mn-panel, .mn-highlight {
  font-family: 'Public Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.45; color: #241C1C;
  box-sizing: border-box;
}
.mn-bar *, .mn-panel * { box-sizing: border-box; }

.mn-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 45; /* above the sticky header, below the open quote drawer */
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px 6px 12px;
  background: #241C1C; color: #FAF8F5;
  border-radius: 24px; box-shadow: 0 6px 24px rgba(36, 28, 28, 0.35);
}
.mn-bar__title { font-weight: 600; margin-right: 6px; font-size: 13px; letter-spacing: 0.02em; }
.mn-bar label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px;
  border-radius: 16px; cursor: pointer; user-select: none;
}
.mn-bar label:hover { background: rgba(255, 255, 255, 0.1); }
.mn-bar input { width: 16px; height: 16px; margin: 0; accent-color: #C99393; cursor: pointer; }
.mn-bar a { color: #C99393; text-decoration: underline; text-underline-offset: 2px; padding: 0 10px; min-height: 32px; display: inline-flex; align-items: center; border-radius: 16px; }
.mn-bar a:hover { background: rgba(255, 255, 255, 0.1); color: #F2E4E2; }
.mn-bar :focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
@media (max-width: 700px) {
  .mn-bar { right: 8px; bottom: 8px; left: auto; padding-left: 10px; }
  .mn-bar__title { display: none; }
}
/* Pages with a mobile sticky buy bar: lift the toggle above it */
@media (max-width: 900px) { body.has-buy-bar .mn-bar { bottom: 84px; } }

.mn-layer { position: fixed; inset: 0; z-index: 8990; pointer-events: none; }
.mn-marker {
  position: absolute; pointer-events: auto;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #FFFFFF; cursor: pointer; padding: 0;
  font: 600 12px/1 'Public Sans', -apple-system, sans-serif; color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(36, 28, 28, 0.35);
  transform: translate(-50%, -50%);
}
.mn-marker--why { background: #894B4B; }
.mn-marker--build { background: #3B4A5C; }
.mn-marker--both { background: linear-gradient(135deg, #894B4B 50%, #3B4A5C 50%); }
.mn-marker:hover { transform: translate(-50%, -50%) scale(1.12); }
.mn-marker[aria-expanded="true"] { outline: 2px solid #241C1C; outline-offset: 2px; }
.mn-marker:focus-visible { outline: 2px solid #241C1C; outline-offset: 2px; box-shadow: 0 0 0 4px #FFFFFF; }
.mn-marker[hidden] { display: none; }

.mn-highlight {
  position: fixed; z-index: 8985; pointer-events: none;
  border: 2px dashed #894B4B; border-radius: 3px;
  box-shadow: 0 0 0 4px rgba(137, 75, 75, 0.12);
}
.mn-highlight[hidden] { display: none; }

.mn-panel {
  position: fixed; z-index: 9001;
  right: 16px; bottom: 64px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  background: #FFFFFF; color: #241C1C;
  border: 1px solid #E3DAD4; border-radius: 6px;
  box-shadow: 0 12px 40px rgba(36, 28, 28, 0.25);
  padding: 18px 18px 16px;
}
.mn-panel[hidden] { display: none; }
@media (max-width: 900px) { body.has-buy-bar .mn-panel { bottom: 132px; } }
@media (max-width: 700px) { .mn-panel { right: 8px; bottom: 56px; width: calc(100vw - 16px); } }

.mn-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mn-panel__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: #241C1C; color: #FFFFFF;
  font-size: 12px; font-weight: 600; flex: none; margin-right: 8px; vertical-align: middle;
}
.mn-panel__title { font: 500 20px/1.2 'Newsreader', Georgia, serif; margin: 0; }
.mn-panel__close {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 4px; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: #6B5D5D;
}
.mn-panel__close:hover { background: #F2E4E2; color: #241C1C; }
.mn-panel__close:focus-visible { outline: 2px solid #2E1414; outline-offset: 2px; }

.mn-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid #E3DAD4; }
.mn-note:first-of-type { border-top: 0; padding-top: 0; margin-top: 6px; }
.mn-note__kind {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 3px; color: #FFFFFF; margin-bottom: 6px;
}
.mn-note__kind--why { background: #894B4B; }
.mn-note__kind--build { background: #3B4A5C; }
.mn-note__body { margin: 0; white-space: pre-line; }
.mn-note__ref { margin: 8px 0 0; font-size: 13px; color: #6B5D5D; }
.mn-note__ref b { color: #5E3232; font-weight: 600; }

.mn-panel__foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid #E3DAD4; font-size: 13px; color: #6B5D5D; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mn-panel__foot a { color: #894B4B; }

.mn-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* notes.html */
.mn-index { max-width: 860px; margin: 0 auto; padding: 32px 24px 80px; }
.mn-index h1 { font: 500 44px/1.15 'Newsreader', Georgia, serif; margin: 0 0 8px; }
.mn-index h2 { font: 500 30px/1.15 'Newsreader', Georgia, serif; margin: 40px 0 6px; padding-top: 24px; border-top: 1px solid #E3DAD4; }
.mn-index .mn-index__page-link { font-size: 15px; margin: 0 0 18px; color: #6B5D5D; }
.mn-index .mn-index__intro { font-size: 17px; line-height: 1.6; max-width: 66ch; color: #241C1C; }
.mn-index .mn-index__key { display: flex; gap: 18px; flex-wrap: wrap; margin: 16px 0 8px; font-size: 14px; color: #6B5D5D; }
.mn-index .mn-index__key span { display: inline-flex; align-items: center; gap: 8px; }
.mn-index .mn-entry { display: grid; grid-template-columns: 34px 1fr; gap: 6px 10px; padding: 18px 0; border-top: 1px solid #E3DAD4; }
.mn-index .mn-entry:first-of-type { border-top: 0; }
.mn-index .mn-entry__num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #FFFFFF; font-size: 12px; font-weight: 600; margin-top: 1px; }
.mn-index .mn-entry__title { font: 600 17px/1.3 'Public Sans', sans-serif; margin: 0 0 4px; }
.mn-index .mn-entry--start { background: #F2E4E2; padding: 18px 20px; border-radius: 4px; border-top: 0; margin-bottom: 8px; }
.mn-index .mn-entry--start .mn-entry__title { font-family: 'Newsreader', Georgia, serif; font-weight: 500; font-size: 22px; }
.mn-index .mn-entry__title a { color: #894B4B; text-decoration: none; font-weight: 400; font-size: 14px; margin-left: 8px; }
.mn-index .mn-entry__title a:hover { text-decoration: underline; }
.mn-index .mn-note { grid-column: 2; margin-top: 8px; padding-top: 8px; }
.mn-index .mn-note:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.mn-index .mn-note__body { font-size: 15px; line-height: 1.55; max-width: 70ch; overflow-wrap: anywhere; }
.mn-index .mn-entry > * { min-width: 0; }
.mn-note__body { overflow-wrap: anywhere; }
.mn-index a:focus-visible, .mn-index button:focus-visible { outline: 2px solid #2E1414; outline-offset: 2px; }

@media print { .mn-bar, .mn-layer, .mn-panel, .mn-highlight { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .mn-marker { transition: none; } }
