/* ==========================================================================
   v010/v011 — Project OMEGA page: research introduction (Element 1) and the
   "Experimental Set Up" annotated photograph (Element 2). Loaded only by
   research/omega/index.html. No other page uses these classes.

   Geometry: on wide screens the figure is a fixed-proportion stage whose
   coordinate system is 1600 × 1000 units (the SVG viewBox). The photograph
   occupies x 300–1300, y 240–968.6 (936 × 682 px image × 1000/936). Leader
   lines are drawn in those units, so they scale exactly with the photograph.
   Note boxes are placed in % of the stage and their type is sized in cqi, so
   they wrap identically at every stage width (no drift between text and lines).
   ========================================================================== */

/* ---------- Element 1: research introduction ---------- */
.omega-intro { margin: 0 0 var(--space-7); }
.omega-intro .authored { max-width: 75rem; }
.omega-intro .authored p {
  max-width: none; margin: 0; text-align: left; color: var(--charcoal-900);
  font-family: var(--font-text); font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  line-height: 1.75; hyphens: manual; -webkit-hyphens: manual; text-wrap: pretty;
}

/* ---------- Element 2: Experimental Set Up ---------- */
.omega-setup { margin: 0; }
.omega-setup__title {
  font-size: var(--step-3); margin: 0 0 var(--space-5);
  display: flex; align-items: baseline; gap: var(--space-4);
}
.omega-setup__title::after { content: ""; flex: 1 1 4rem; min-width: 2rem; border-top: 1px solid var(--rule); transform: translateY(-0.3em); }

.osx { margin: 0 auto; max-width: 80rem; container-type: inline-size; container-name: osx; }
.osx__stage { position: relative; }
.osx__photo { position: relative; margin: 0 auto; max-width: 936px; }
.osx__img { display: block; width: 100%; height: auto; aspect-ratio: 936 / 682; object-fit: contain; }
.osx__lines { display: none; }

/* Notes (list layout: phones, tablets, narrow windows) */
.osx__notes { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: var(--space-4); align-items: start; }
.osx__note { display: grid; grid-template-columns: 1.75rem 1fr; column-gap: var(--space-3); align-items: start; align-content: start; }
.osx__letter {
  grid-row: 1 / span 3; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; line-height: 1;
  color: var(--navy-900); background: var(--ivory-50); border: 1px solid var(--gold-500);
}
.osx__name { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; line-height: 1.25; color: var(--navy-900); text-wrap: balance; }
.osx__desc { display: block; margin-top: 0.2rem; font-family: var(--font-text); font-size: 1rem; line-height: 1.55; color: var(--charcoal-700); }
.osx__inset { display: block; margin: var(--space-3) 0 0; width: min(15rem, 100%); }
.osx__inset-link { display: block; line-height: 0; }
.osx__inset-link:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.osx__inset img { display: block; width: 100%; height: auto; aspect-ratio: 640 / 642; border: 1px solid var(--rule); background: #fff; }
.osx__inset-tag { display: block; margin-top: 0.35rem; font-family: var(--font-ui); font-size: 0.78rem; line-height: 1.4; color: var(--charcoal-700); }

/* Lettered markers over the photograph (list layout only) */
.osx__marker {
  position: absolute; transform: translate(-50%, -50%); width: 1.45rem; height: 1.45rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-family: var(--font-ui); font-size: 0.74rem; font-weight: 600; line-height: 1;
  color: var(--navy-900); background: var(--ivory-50); border: 1px solid var(--gold-500);
}
/* marker positions: % of the photograph (x / 936, y / 682), in empty space beside each item */
.osx__marker--a { left: 94.02%; top: 36.66%; }
.osx__marker--b { left: 53.85%; top: 33.43%; }
.osx__marker--c { left: 51.28%; top: 4.11%; }
.osx__marker--d { left: 3.42%; top: 31.82%; }
.osx__marker--e { left: 16.03%; top: 49.27%; }
.osx__marker--f { left: 3.21%; top: 13.20%; }

.osx__source { margin: var(--space-4) 0 0; font-family: var(--font-ui); font-size: 0.85rem; text-align: center; }

@media (min-width: 40rem) {
  .osx__notes { grid-template-columns: 1fr 1fr; column-gap: var(--space-6); row-gap: var(--space-5); }
}

/* ---------- Wide screens: one annotated scientific figure with leader lines ---------- */
@container osx (min-width: 1100px) {
  .osx__stage { aspect-ratio: 1600 / 1000; }
  .osx__photo { position: absolute; left: 18.75%; top: 24%; width: 62.5%; max-width: none; margin: 0; }
  .osx__marker { display: none; }
  .osx__lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .osx__notes { position: absolute; inset: 0; margin: 0; display: block; }
  .osx__note { position: absolute; display: block; }
  .osx__letter {
    position: absolute; left: -2.05cqi; top: 0.08cqi; width: 1.55cqi; height: 1.55cqi;
    font-size: 0.8cqi; border-width: 1px;
  }
  .osx__name { font-size: max(1.5cqi, 0.95rem); line-height: 1.22; }
  .osx__desc { font-size: max(1.13cqi, 0.78rem); line-height: 1.5; margin-top: 0.25cqi; }
  .osx__inset { position: absolute; margin: 0; }
  .osx__inset-tag { font-size: max(0.88cqi, 0.7rem); margin-top: 0.4cqi; }
  /* note boxes: left / top / width in % of the 1600 × 1000 stage (v011 arrangement):
     left column F, D (beside the HP laptop); bottom-left E with the reference photograph, beneath the HP laptop it
     refers to; top centre C; right A; bottom centre-left B. All boxes sit in empty space, outside the equipment. */
  .osx__note--a { left: 83.75%; top: 42%; width: 15.9%; }
  .osx__note--b { left: 41%; top: 85%; width: 15%; }
  .osx__note--c { left: 46.25%; top: 1%; width: 19%; }
  .osx__note--d { left: 2.5%; top: 41%; width: 17.5%; }
  .osx__note--e { left: 20.5%; top: 64%; width: 17%; }
  .osx__note--f { left: 2.5%; top: 12%; width: 17.5%; }
  .osx__note--e .osx__inset { left: -18cqi; top: 0; width: 14cqi; }
  .osx__source { text-align: right; }
}

/* Leader lines (SVG, in stage units) */
.osx__lead { fill: none; stroke: var(--gold-500); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.osx__lead--internal { stroke-dasharray: 5 4; }
.osx__dot { fill: var(--gold-500); stroke: var(--ivory-50); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.osx__ring { fill: var(--ivory-50); fill-opacity: 0.85; stroke: var(--gold-500); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

@media print { .osx__lines { display: none; } }
