/* ingrid.fyi role intro pages and the roles map. Loads after base.css and story-pages/story.css.
   Both page types are free in full: no degraded view, only the frame's light guest prompts. */

/* the signed-in reader's name in the header (preview: ?view=member) */
ig-header .reader { display: none; font-family: var(--sans); font-size: 0.85rem; }
body.member ig-header .reader { display: inline; }
body.member ig-header .signin { display: none; }

/* every heading is a plain section, so the last "On this page" entry keeps the normal spacing */
ig-onthispage li:last-child { margin-top: 0; }

/* the opening paragraph is the lede; sections read at the story page's normal size */
ig-page > ig-lede { margin-bottom: 0; }

/* diagrams: shown in the column, opened full size with a click or tap; the long description stays for screen readers */
ig-diagram { cursor: zoom-in; }
ig-diagram:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
ig-diagram ig-caption {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
ig-diagram::after { content: "Open full size"; display: block; margin-top: 0.5rem; font-family: var(--sans); font-size: 0.75rem; color: var(--muted); }

ig-lightbox { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--paper); }
ig-lightbox[hidden] { display: none; }
ig-lightbox .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1.2rem; border-bottom: 1px solid var(--rule); }
ig-lightbox .bar .label { margin: 0; }
ig-lightbox .close { white-space: nowrap; background: none; border: 0; color: var(--teal); font-family: var(--sans); font-size: 0.85rem; cursor: pointer; padding: 0.3rem 0; }
ig-lightbox .view { flex: 1; overflow: auto; padding: 1.5rem; }
ig-lightbox .view img { display: block; width: 100%; max-width: 2000px; height: auto; margin: 0 auto; }
body.lightbox-open { overflow: hidden; }
body.lightbox-open ig-guest-bar, body.lightbox-open ig-google-box { display: none; }

/* the way forward at the end of an intro: the map line, then the role page as the next step */
ig-wayforward { display: block; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--hair); }
ig-maplink { display: block; margin: 0 0 1rem; }
ig-nextstep { display: block; background: var(--card); padding: 0.85rem 1rem; margin: 0 0 0.6rem; font-weight: 700; }
ig-nextstep > ig-link a::after { content: " \2192"; }
ig-nextstep-title { display: block; font-size: 1.15rem; line-height: 1.25; margin: 0 0 0.4rem; }
ig-nextstep p { margin: 0; font-weight: 400; }

ig-updated { display: block; margin-top: 2.4rem; font-size: 0.85rem; font-style: italic; color: var(--muted); }

@media (max-width: 760px) {
  ig-lightbox .view { padding: 1rem; }
  /* on a phone the diagram opens larger than the screen and scrolls sideways */
  ig-lightbox .view img { width: 900px; max-width: none; margin: 0; }
}
