[data-project-guide-root],
[data-project-guide-dialog] {
  --project-guide-ink: #26362c;
  --project-guide-muted: #5d665b;
  --project-guide-olive: #36543b;
  --project-guide-border: #d9ddcf;
  --project-guide-paper: #faf8f0;
  box-sizing: border-box;
  color: var(--project-guide-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-align: start;
}

[data-project-guide-root] *,
[data-project-guide-dialog] * { box-sizing: border-box; }

[data-project-guide-root] {
  width: min(100%, 76rem);
  margin: 1rem auto;
  padding: 0 1rem;
  border: 0;
}

[data-project-guide-strip] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--project-guide-border);
}

[data-project-guide-brand] {
  margin: 0;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .09em;
  color: var(--project-guide-muted);
}

[data-project-guide-launchers] { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; min-width: 0; }

[data-project-guide-launcher],
[data-project-guide-sector-launcher] {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .45rem .8rem;
  border: 1px solid var(--project-guide-border);
  border-radius: 999px;
  background: var(--project-guide-paper);
  color: var(--project-guide-olive);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}

[data-project-guide-invite] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: .85rem 0 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--project-guide-border);
  border-radius: 1rem;
  background: var(--project-guide-paper);
}

[data-project-guide-invite-copy] { flex: 1 1 23rem; }
[data-project-guide-invite-title] { margin: 0 0 .3rem; font-family: inherit; font-size: 1.05rem; line-height: 1.35; }
[data-project-guide-invite-body] { max-width: 68ch; margin: 0; color: var(--project-guide-muted); font-size: .93rem; }
[data-project-guide-invite-actions], [data-project-guide-actions] { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }

[data-project-guide-theme-picker] { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .65rem; min-width: 0; }
[data-project-guide-invite-copy] [data-project-guide-theme-picker] { margin-top: .8rem; }
[data-project-guide-theme-label] { margin: 0; color: var(--project-guide-muted); font: inherit; font-size: .82rem; font-weight: 650; }
[data-project-guide-theme-picker] select {
  display: block;
  width: min(100%, 30rem);
  min-width: 0;
  max-width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: .45rem 2rem .45rem .7rem;
  border: 1px solid var(--project-guide-border);
  border-radius: .55rem;
  background: #fffef9;
  color: var(--project-guide-ink);
  font: inherit;
  font-size: .88rem;
  line-height: 1.3;
}
[data-project-guide-theme-toolbar] {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: .45rem .65rem;
  min-width: 0;
  padding: 0;
  background: var(--project-guide-paper);
}
[data-project-guide-theme-toolbar] [data-project-guide-theme-picker] { flex: 1 1 0%; }
[data-project-guide-theme-toolbar] [data-project-guide-theme-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[data-project-guide-dialog] [data-project-guide-overview] { flex: 0 1 auto; max-width: 45%; padding: .45rem .7rem; font-size: .8rem; }
[data-project-guide-language-note], [data-project-guide-invite-language-note] { margin: .45rem 0 .7rem; color: #4c594b; font: inherit; font-size: .85rem; line-height: 1.4; }

[data-project-guide-root] button,
[data-project-guide-dialog] button,
[data-project-guide-site-link],
[data-project-guide-section-link] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 0;
  padding: .65rem 1rem;
  border: 1px solid var(--project-guide-border);
  border-radius: .65rem;
  background: #fffef9;
  color: var(--project-guide-ink);
  font: inherit;
  font-size: .93rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

[data-project-guide-root] [data-project-guide-start],
[data-project-guide-dialog] [data-project-guide-next],
[data-project-guide-dialog] [data-project-guide-section-link] { background: var(--project-guide-olive); border-color: var(--project-guide-olive); color: #fff; }
[data-project-guide-dialog] button:disabled { opacity: .45; cursor: default; }
[data-project-guide-root] a:hover,
[data-project-guide-root] button:hover,
[data-project-guide-dialog] a:hover,
[data-project-guide-dialog] button:not(:disabled):hover { filter: brightness(.96); }

[data-project-guide-root] :focus-visible,
[data-project-guide-dialog] :focus-visible { outline: 3px solid #947624; outline-offset: 4px; }
[data-project-guide-step-title]:focus { outline: none; }
[data-project-guide-step-title]:focus-visible { outline: 2px solid #947624; outline-offset: 6px; border-radius: .15rem; }

[data-project-guide-dialog] {
  --project-guide-ink: #fff;
  --project-guide-muted: #d8e5e7;
  --project-guide-olive: #bce4df;
  --project-guide-border: #ffffff35;
  --project-guide-paper: #102e38;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--project-guide-paper);
  box-shadow: none;
  overflow: hidden;
}

[data-project-guide-dialog][open] { display: flex; flex-direction: column; }
[data-project-guide-dialog]:not([open]) { display: none; }
[data-project-guide-dialog]::backdrop { background: #17291fc2; }
[data-project-guide-dialog][data-project-guide-fallback] { z-index: 30001; }
[data-project-guide-backdrop] { position: fixed; inset: 0; z-index: 30000; background: #17291fc2; }

[data-project-guide-player] {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: #102e38;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
}
[data-project-guide-player]:fullscreen { width: 100vw; height: 100vh; height: 100dvh; }
[data-project-guide-player]:-webkit-full-screen { width: 100vw; height: 100vh; height: 100dvh; }

[data-project-guide-header] {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  max-width: none;
  margin: 0;
  position: static;
  align-items: center;
  gap: .25rem .65rem;
  padding: .2rem .8rem;
  border: 0;
  background: var(--project-guide-paper);
  color: var(--project-guide-ink);
  box-shadow: none;
  letter-spacing: normal;
}

[data-project-guide-header][data-project-guide-has-themes] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }

[data-project-guide-heading-group] { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem 1rem; min-width: 0; }
[data-project-guide-title] { margin: 0; font-family: inherit; font-size: .82rem; font-weight: 650; line-height: 1.35; }
[data-project-guide-work-in-progress] {
  display: inline-block;
  max-width: 100%;
  padding: .15rem .45rem;
  border: 1px solid #ffffff45;
  border-radius: 999px;
  background: transparent;
  color: #e6ece3;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.3;
}
[data-project-guide-position] { margin: 0; color: var(--project-guide-muted); font-size: .78rem; text-align: center; }
[data-project-guide-dialog] [data-project-guide-close] { flex: 0 0 auto; min-height: 2.75rem; padding: .35rem .6rem; font-size: .82rem; }

[data-project-guide-dialog] [data-project-guide-header] button,
[data-project-guide-dialog] [data-project-guide-footer] button {
  min-height: 2.75rem;
  padding: .35rem .65rem;
  border-color: transparent;
  background: transparent;
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
}
[data-project-guide-dialog] [data-project-guide-header] button:hover,
[data-project-guide-dialog] [data-project-guide-footer] button:not(:disabled):hover { background: #ffffff12; filter: none; }
[data-project-guide-dialog] [data-project-guide-theme-toolbar] select { background: #173e48; color: #fff; font-size: .8rem; }
[data-project-guide-dialog] :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

[data-project-guide-progress] {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: .15rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  accent-color: var(--project-guide-olive);
  background: #ffffff25;
}
[data-project-guide-progress]::-webkit-progress-bar { background: #ffffff25; }
[data-project-guide-progress]::-webkit-progress-value { background: var(--project-guide-olive); }
[data-project-guide-progress]::-moz-progress-bar { background: var(--project-guide-olive); }

[data-project-guide-content] {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  position: relative;
  min-height: 18rem;
  padding: 0;
  overflow: visible;
}

[data-project-guide-scene-heading] {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: .3rem .85rem .4rem;
  background: #102e38;
  color: #fff;
  text-align: center;
}
[data-project-guide-short-caption] {
  max-width: 68ch;
  margin: .2rem auto 0;
  padding: 0;
  font: inherit;
  font-size: clamp(.875rem, 1.2vw, 1rem);
  line-height: 1.4;
  color: #fff;
}
[data-project-guide-scene-heading] [data-project-guide-language-note],
[data-project-guide-fullscreen-status] { margin: .25rem auto 0; color: #d8e5e7; font-size: .75rem; line-height: 1.35; }

[data-project-guide-caption] {
  --project-guide-ink: #26362c;
  --project-guide-muted: #5d665b;
  --project-guide-olive: #36543b;
  --project-guide-border: #d9ddcf;
  --project-guide-paper: #faf8f0;
  position: static;
  flex: 1 1 0;
  width: 100%;
  max-width: none;
  min-height: 10rem;
  margin: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  border: 0;
  border-radius: 0;
  background: var(--project-guide-paper);
  color: var(--project-guide-ink);
  box-shadow: none;
  font-family: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}
[data-project-guide-caption] > * { width: min(100%, 74ch); margin-inline: auto; }
[data-project-guide-caption]:focus-visible,
[data-project-guide-caption] :focus-visible { outline-color: #36543b; }

[data-project-guide-step-title] {
  max-width: 68ch;
  margin: 0 auto;
  font-family: inherit;
  font-size: clamp(1.125rem, 2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  color: #fff;
}

[data-project-guide-scene] {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 10rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #102e38;
  overflow: hidden;
  isolation: isolate;
}

[data-project-guide-signature] {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: .12rem .8rem .2rem;
  border: 0;
  background: #102e38;
  color: #e1edef;
  font: inherit;
  font-size: .7rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: .04em;
  text-align: center;
}

[data-project-guide-dialog] [data-project-guide-image] {
  display: block;
  flex: 1 1 0;
  position: static;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  background: transparent;
  box-shadow: none;
  filter: none;
  transform: none;
  opacity: 1;
}

/* Retain sizing for cached guides signed by the site's attribution script.
   Current scenes supply their own signature before the image. */
[data-project-guide-scene] > .signed-picture {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
[data-project-guide-scene] > .signed-picture > [data-project-guide-image] { flex: 1 1 auto; }
[data-project-guide-scene] > .signed-picture > .image-signature { flex: 0 0 auto; width: 100%; }

[data-project-guide-narrator] {
  max-width: none;
  margin: 0 0 .3rem;
  padding: 0;
  color: var(--project-guide-olive);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
}

[data-project-guide-paragraph] { max-width: 90ch; margin: .55rem 0; font-size: 1.03rem; line-height: 1.55; }
[data-project-guide-destination] {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem .85rem;
  margin: .85rem 0 .1rem;
  padding: 0;
}
[data-project-guide-section-link] { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
[data-project-guide-section-access] {
  display: inline-block;
  margin: 0;
  padding: .25rem .6rem;
  border-radius: .45rem;
  background: #eeeede;
  color: #465442;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.4;
}

[data-project-guide-footer] {
  flex: 0 0 auto;
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
  position: static;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .15rem .65rem;
  padding: .1rem .8rem .2rem;
  border: 0;
  border-bottom: 1px solid var(--project-guide-border);
  background: #102e38;
  color: var(--project-guide-ink);
  box-shadow: none;
  letter-spacing: normal;
}

[data-project-guide-footer] [data-project-guide-actions] { flex-wrap: nowrap; min-width: 0; gap: .35rem; }
[data-project-guide-playback] { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; min-width: 0; gap: .15rem .4rem; }
[data-project-guide-footer] button { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

[data-project-guide-sites] { width: auto; max-width: none; margin: 1.5rem 0 0; padding: 0; border: 0; }
[data-project-guide-sites-title] { margin: 0 0 .85rem; font-size: 1rem; font-weight: 650; }
[data-project-guide-site-grid] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
[data-project-guide-site-card] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--project-guide-border);
  border-radius: 1rem;
  background: #fffef9;
}
[data-project-guide-site-card][data-project-guide-current] { border-color: #76906c; box-shadow: inset 0 0 0 1px #76906c; }
[data-project-guide-site-title] { margin: 0 0 .5rem; font-size: 1.08rem; line-height: 1.3; }
[data-project-guide-site-description] { margin: 0 0 1rem; color: var(--project-guide-muted); font-size: .93rem; line-height: 1.55; }
[data-project-guide-badges] { display: flex; flex-wrap: wrap; gap: .35rem; margin: auto 0 .9rem; }
[data-project-guide-restricted], [data-project-guide-current-label] { display: inline-block; padding: .2rem .55rem; border-radius: .4rem; background: #eeeede; color: #465442; font-size: .74rem; font-weight: 650; }
[data-project-guide-current-label] { background: #e1ebda; color: #28412c; }
[data-project-guide-site-link] { width: 100%; color: var(--project-guide-olive); text-align: center; }

[data-project-guide-invite-title],
[data-project-guide-title],
[data-project-guide-step-title],
[data-project-guide-sites-title],
[data-project-guide-site-title] { color: var(--project-guide-ink); }

[data-project-guide-root] [hidden],
[data-project-guide-dialog] [hidden],
[data-project-guide-backdrop][hidden] { display: none !important; }

/* Keep the selector and close button in DOM order on narrower screens. The
   scene remains below every command in both text and image-only views. */
@media (max-width: 800px) {
  [data-project-guide-header][data-project-guide-has-themes] { grid-template-columns: minmax(0, 1fr) auto; }
  [data-project-guide-header][data-project-guide-has-themes] [data-project-guide-heading-group] { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  [data-project-guide-root] { padding: 0 .75rem; }
  [data-project-guide-invite] { padding: 1rem; }
  [data-project-guide-invite-actions] { width: 100%; }
  [data-project-guide-invite-actions] button { flex: 1 1 auto; }
  [data-project-guide-header] { padding: .2rem .65rem; gap: .2rem; }
  [data-project-guide-theme-toolbar] { gap: .45rem; }
  [data-project-guide-theme-toolbar] select { font-size: .8rem; padding-left: .5rem; }
  [data-project-guide-dialog] [data-project-guide-overview] { font-size: .74rem; padding: .4rem .5rem; }
  [data-project-guide-caption] { padding: 1rem; }
  [data-project-guide-footer] { padding: .1rem .65rem .2rem; gap: .1rem; justify-content: center; }
  [data-project-guide-footer] [data-project-guide-actions] { width: 100%; justify-content: center; gap: .5rem; }
  [data-project-guide-playback] { width: 100%; }
  [data-project-guide-playback] button { flex: 1 1 auto; }
  [data-project-guide-dialog] [data-project-guide-footer] button { font-size: .78rem; padding-inline: .45rem; }
  [data-project-guide-scene-heading] { padding: .25rem .65rem .35rem; }
  [data-project-guide-site-grid] { grid-template-columns: minmax(0, 1fr); }
  [data-project-guide-paragraph] { font-size: 1rem; }
  [data-project-guide-section-link] { width: 100%; }
}

@media (max-height: 500px) and (min-width: 601px) {
  [data-project-guide-header] { padding-block: .1rem; }
  [data-project-guide-scene-heading] { padding-block: .15rem; }
  [data-project-guide-footer] { padding-block: 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-project-guide-root] *,
  [data-project-guide-dialog] * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  [data-platform-navigation],
  [data-project-guide-root],
  [data-project-guide-dialog],
  [data-project-guide-backdrop] { display: none !important; }
}
