/* ------------------------------------------------------------------
   Annotation guide: presentation chrome layered over the prototypes.
   Deliberately styled to look unlike the wireframes so viewers can tell
   the commentary apart from the design being reviewed.
   ------------------------------------------------------------------ */

:root {
  --anno-ink: #0d1b2f;
  --anno-ink-2: #16273f;
  --anno-accent: #0072ce;
  --anno-accent-hi: #4aa8f0;
  --anno-text: #f3f7fb;
  --anno-muted: #9fb2c8;
  --anno-line: rgba(255, 255, 255, .14);
  --anno-z: 2147483000;
}

.anno-root,
.anno-root * {
  box-sizing: border-box;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* --- shared layer ------------------------------------------------- */

#anno-layer {
  position: fixed;
  inset: 0;
  z-index: var(--anno-z);
  pointer-events: none;
}

#anno-layer > * {
  pointer-events: auto;
}

@media print {
  #anno-layer { display: none !important; }
}

/* --- launcher ----------------------------------------------------- */

.anno-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px 11px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--anno-ink);
  color: var(--anno-text);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(9, 20, 38, .32), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transition: transform .18s ease, background .18s ease;
}

.anno-launcher:hover { background: var(--anno-ink-2); transform: translateY(-2px); }
.anno-launcher:focus-visible { outline: 3px solid var(--anno-accent-hi); outline-offset: 3px; }
.anno-launcher .anno-dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--anno-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.anno-launcher[data-state='open'] { background: var(--anno-accent); }

/* Gentle one-time nudge so the button is noticed on first load. */
@keyframes anno-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(9, 20, 38, .32), 0 0 0 0 rgba(0, 114, 206, .45); }
  50%      { box-shadow: 0 8px 28px rgba(9, 20, 38, .32), 0 0 0 12px rgba(0, 114, 206, 0); }
}
.anno-launcher[data-nudge='1'] { animation: anno-pulse 2.2s ease-out 3; }

/* --- pins --------------------------------------------------------- */

.anno-pin {
  position: fixed;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--anno-accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 3px 12px rgba(9, 20, 38, .35);
  transition: transform .15s ease, background .15s ease;
  animation: anno-in .22s ease both;
}

.anno-pin:hover { transform: scale(1.18); background: #005ba6; }
.anno-pin:focus-visible { outline: 3px solid var(--anno-accent-hi); outline-offset: 2px; }

@keyframes anno-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

/* --- spotlight ---------------------------------------------------- */

.anno-scrim {
  position: fixed;
  inset: 0;
  background: rgba(9, 20, 38, .55);
  animation: anno-fade .2s ease both;
}

@keyframes anno-fade { from { opacity: 0; } to { opacity: 1; } }

.anno-spot {
  position: fixed;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(9, 20, 38, .78), 0 0 0 2px var(--anno-accent-hi);
  transition: top .3s cubic-bezier(.4, 0, .2, 1), left .3s cubic-bezier(.4, 0, .2, 1),
              width .3s cubic-bezier(.4, 0, .2, 1), height .3s cubic-bezier(.4, 0, .2, 1);
}

/* --- cards -------------------------------------------------------- */

.anno-card {
  position: fixed;
  width: min(360px, calc(100vw - 32px));
  background: var(--anno-ink);
  color: var(--anno-text);
  border: 1px solid var(--anno-line);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: 0 24px 60px rgba(9, 20, 38, .45);
  animation: anno-pop .22s cubic-bezier(.2, .9, .3, 1.1) both;
}

@keyframes anno-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.anno-card-eyebrow {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--anno-accent-hi);
  margin-bottom: 7px;
}

.anno-card-title {
  font-family: 'Barlow Semi Condensed', system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 21px;
  line-height: 1.12;
  margin: 0 0 8px;
  letter-spacing: .005em;
}

.anno-card-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #d7e2ee;
  margin: 0;
  text-wrap: pretty;
}

.anno-card-body p { margin: 0 0 9px; }
.anno-card-body p:last-child { margin-bottom: 0; }
.anno-card-body strong { color: #fff; }
.anno-card-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, .09);
  border-radius: 5px;
  padding: 1px 5px;
}

.anno-card-hint {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #ffd08a;
  background: rgba(255, 190, 90, .1);
  border: 1px solid rgba(255, 190, 90, .25);
  border-radius: 9px;
  padding: 8px 10px;
}

.anno-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--anno-line);
}

.anno-step {
  font-size: 12px;
  font-weight: 700;
  color: var(--anno-muted);
  margin-right: auto;
  font-variant-numeric: tabular-nums;
}

.anno-btn {
  border: 1px solid var(--anno-line);
  background: rgba(255, 255, 255, .06);
  color: var(--anno-text);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.anno-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }
.anno-btn:focus-visible { outline: 3px solid var(--anno-accent-hi); outline-offset: 2px; }
.anno-btn[disabled] { opacity: .35; cursor: default; }
.anno-btn-primary { background: var(--anno-accent); border-color: var(--anno-accent); }
.anno-btn-primary:hover { background: #1b86e0; border-color: #1b86e0; }

.anno-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--anno-line);
  background: rgba(255, 255, 255, .05);
  color: var(--anno-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.anno-close:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.anno-card-title { padding-right: 26px; }

/* --- panel -------------------------------------------------------- */

.anno-panel {
  position: fixed;
  right: 22px;
  bottom: 78px;
  width: min(370px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--anno-ink);
  color: var(--anno-text);
  border: 1px solid var(--anno-line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(9, 20, 38, .45);
  overflow: hidden;
  animation: anno-pop .2s cubic-bezier(.2, .9, .3, 1.1) both;
}

.anno-panel-head { padding: 20px 20px 14px; border-bottom: 1px solid var(--anno-line); position: relative; }
.anno-panel-body { overflow-y: auto; padding: 8px 10px 10px; }
.anno-panel-foot { padding: 12px 16px; border-top: 1px solid var(--anno-line); display: flex; gap: 8px; align-items: center; }

.anno-item {
  display: flex;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: background .15s ease;
}

.anno-item:hover { background: rgba(255, 255, 255, .07); }
.anno-item:focus-visible { outline: 3px solid var(--anno-accent-hi); outline-offset: -2px; }

.anno-item-n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--anno-accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.anno-item[data-missing='1'] .anno-item-n { background: rgba(255, 255, 255, .14); color: var(--anno-muted); }
.anno-item-t { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.anno-item-d { display: block; font-size: 12px; color: var(--anno-muted); line-height: 1.45; margin-top: 2px; }

.anno-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--anno-muted);
  cursor: pointer;
  margin-right: auto;
  user-select: none;
}

.anno-toggle input { accent-color: var(--anno-accent); width: 15px; height: 15px; cursor: pointer; }

/* --- author mode -------------------------------------------------- */

.anno-author-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #3b1d5e;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 9px 12px 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(9, 20, 38, .4);
}

.anno-picking, .anno-picking * { cursor: crosshair !important; }

.anno-hover-box {
  position: fixed;
  pointer-events: none;
  border: 2px solid #b57bff;
  background: rgba(181, 123, 255, .16);
  border-radius: 6px;
}

.anno-form { position: fixed; }
.anno-form label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--anno-muted); font-weight: 700; margin: 10px 0 5px; }
.anno-form input, .anno-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--anno-line);
  border-radius: 9px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
}
.anno-form textarea { min-height: 84px; resize: vertical; }
.anno-form input:focus, .anno-form textarea:focus { outline: 2px solid var(--anno-accent-hi); outline-offset: 0; }
.anno-form .anno-sel { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--anno-accent-hi); word-break: break-all; }

@media (max-width: 560px) {
  .anno-launcher { right: 12px; bottom: 12px; }
  .anno-panel { right: 12px; left: 12px; width: auto; bottom: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  .anno-launcher, .anno-pin, .anno-spot, .anno-card, .anno-panel { animation: none !important; transition: none !important; }
}
