@charset "UTF-8";

/*
 * Public edition styles: the tour launcher and tour card, the layer explainers and the
 * panel pieces only this edition has. Loaded after explorer.css, whose theme variables
 * these rules reuse, so both themes follow automatically.
 */

:root {
  --guide-accent: #0f7ea8;
  --guide-accent-text: #ffffff;
  --guide-card-bg: rgba(5, 21, 31, 0.9);
  --guide-card-border: rgba(171, 214, 237, 0.4);
  --guide-card-text: #eaf8ff;
  --guide-card-muted: #a9cfe2;
  --guide-card-link: #8fdcff;
  /* Stop dots are the only visible sign of their buttons, so they keep 3:1 or better. */
  --guide-stop: #7a98ab;
  --guide-stop-active: #8fdcff;
  --info-card-bg: rgba(15, 126, 168, 0.07);
  --info-card-border: rgba(15, 126, 168, 0.25);
  --info-toggle-border: rgba(47, 121, 152, 0.45);
  --info-toggle-text: #1d5a75;
}

:root[data-theme="dark"] {
  --guide-accent: #4fb8de;
  --guide-accent-text: #04202e;
  --info-card-bg: rgba(79, 184, 222, 0.08);
  --info-card-border: rgba(79, 184, 222, 0.26);
  --info-toggle-border: rgba(115, 191, 223, 0.45);
  --info-toggle-text: #a9dff5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.tour-launcher {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--info-card-border);
  background: var(--info-card-bg);
}

.tour-launcher__title {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--ink);
}

.tour-launcher__body {
  margin: 0 0 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}

.tour-launcher__button {
  margin-top: 0;
}

.tour-launcher__button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* If the guide cannot load, nothing offers a tour that will never start. */
:root[data-guide="failed"] #tourLauncher,
:root[data-guide="failed"] #viewerTourButton {
  display: none;
}

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

.control-heading,
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.control-heading label {
  flex: 1;
}

.control-heading .section-title {
  margin-bottom: 0;
}

.view-control-subsection .control-heading {
  margin-bottom: 10px;
}

.toggle-row .toggle {
  flex: 1;
  margin-bottom: 0;
  min-height: 30px;
}

.toggle-row {
  margin-bottom: 4px;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--legend-note);
}

.section--actions button + button {
  margin-top: 8px;
}

/* ------------------------------------------------------------------ layer explainers */

.info-toggle {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--info-toggle-border);
  background: transparent;
  color: var(--info-toggle-text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.info-toggle[aria-expanded="true"] {
  background: var(--guide-accent);
  border-color: var(--guide-accent);
  color: var(--guide-accent-text);
}

.info-toggle:focus-visible,
.tour-card button:focus-visible,
.tour-launcher__button:focus-visible {
  outline: 2px solid var(--guide-accent);
  outline-offset: 2px;
}

.info-card {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--info-card-border);
  background: var(--info-card-bg);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--meta-text);
}

.info-card[hidden] {
  display: none;
}

.info-card p {
  margin: 0 0 8px;
}

.info-card__title {
  font-weight: 700;
  color: var(--ink);
}

.info-card__close {
  width: auto;
  height: 28px;
  margin-top: 2px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.guide-sources {
  margin: 4px 0 8px;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--legend-note);
}

.guide-sources__label {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
}

.guide-sources__list {
  margin: 2px 0 0;
  padding-left: 16px;
}

.guide-sources a {
  color: var(--meta-link);
}

.about-edition p {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--meta-text);
}

.about-edition__link {
  color: var(--meta-link);
  font-weight: 600;
}

/* ------------------------------------------------------------------ tour card */

/*
 * The card sits in the side panel next to the view. On a phone, where the panel is a
 * bottom drawer, and while the viewer is fullscreen, the guide moves it over the viewer
 * and adds .tour-card--floating. Either way only the text scrolls, so the buttons stay in
 * reach however small the screen.
 */
.tour-card {
  --tour-text: var(--ink);
  --tour-muted: var(--muted);
  --tour-link: var(--meta-link);
  --tour-border: var(--info-card-border);
  --tour-stop: #71889a;
  --tour-stop-active: var(--guide-accent);
  display: flex;
  flex-direction: column;
  max-height: 68vh;
  max-height: 68dvh;
  margin: 0 0 16px;
  padding: 14px 14px 10px;
  border-radius: 12px;
  border: 1px solid var(--tour-border);
  background: var(--info-card-bg);
  color: var(--tour-text);
}

:root[data-theme="dark"] .tour-card {
  --tour-stop: #6d8ea3;
}

.tour-card--floating {
  --tour-text: var(--guide-card-text);
  --tour-muted: var(--guide-card-muted);
  --tour-link: var(--guide-card-link);
  --tour-border: var(--guide-card-border);
  --tour-stop: var(--guide-stop);
  --tour-stop-active: var(--guide-stop-active);
  position: absolute;
  z-index: 7;
  left: calc(env(safe-area-inset-left, 0px) + 8px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  max-height: 50vh;
  max-height: 50dvh;
  margin: 0;
  background: var(--guide-card-bg);
  box-shadow: 0 16px 40px rgba(2, 10, 16, 0.45);
  backdrop-filter: blur(6px);
}

/* A fullscreen viewer has no drawer to keep clear of. */
.viewer-shell:fullscreen .tour-card--floating {
  left: 12px;
  right: auto;
  bottom: 12px;
  width: min(420px, calc(100% - 24px));
}

.tour-card[hidden] {
  display: none;
}

.tour-card__live {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.tour-card__footer {
  flex: none;
}

/* While the tour plays in the panel, the panel holds only the card and the legends. */
body.tour-open:not(.mobile-drawer) .panel-brand,
body.tour-open:not(.mobile-drawer) #panelLocaleSwitcher,
body.tour-open:not(.mobile-drawer) #tourLauncher,
body.tour-open:not(.mobile-drawer) #panelSubtitle,
body.tour-open:not(.mobile-drawer) .panel > .section:not(.legend-section) {
  display: none;
}

body.tour-open.mobile-drawer .hud {
  display: none;
}

.tour-card__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-card__header-buttons {
  display: flex;
  gap: 6px;
}

.tour-card__counter {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--tour-muted);
}

.tour-card__icon {
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--tour-border);
  background: transparent;
  color: var(--tour-text);
  font-size: 1.1rem;
  line-height: 1;
}

.tour-card__title {
  margin: 6px 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.tour-card__title:focus {
  outline: none;
}

.tour-card__body p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.tour-card .guide-sources {
  color: var(--tour-muted);
}

.tour-card .guide-sources a {
  color: var(--tour-link);
}

.tour-card__status {
  flex: none;
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--tour-link);
}

/* An empty status stays in the accessibility tree, so its next message is announced. */
.tour-card:not(.has-status) .tour-card__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.tour-card.is-collapsed .tour-card__live {
  display: none;
}

.tour-card.is-collapsed .tour-card__actions {
  margin-top: 10px;
}

.tour-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.tour-card__nav {
  flex: 1;
  height: 36px;
  margin: 0;
  border-color: var(--tour-border);
  background: transparent;
  color: var(--tour-text);
}

.tour-card__nav--primary {
  border-color: var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
}

.tour-card__nav--quiet {
  flex: none;
  width: auto;
  padding: 0 12px;
}

.tour-card__nav[hidden] {
  display: none;
}

.tour-card__nav:disabled {
  opacity: 0.4;
  cursor: default;
  filter: none;
}

.tour-card__stops {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.tour-card__stop {
  position: relative;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.tour-card__stop::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--tour-stop);
}

.tour-card__stop[aria-current="step"]::after {
  inset: 5px;
  background: var(--tour-stop-active);
}

/* Fingers need bigger targets than a mouse. */
body.coarse-pointer .tour-card__stop {
  width: 32px;
  height: 32px;
}

body.coarse-pointer .tour-card__stop::after {
  inset: 11px;
}

body.coarse-pointer .tour-card__stop[aria-current="step"]::after {
  inset: 9px;
}

body.coarse-pointer .info-toggle {
  width: 32px;
  height: 32px;
}

.viewer-tool-btn--tour {
  border-color: var(--guide-card-link);
}

/* The stacked layout of narrow desktop windows gives the panel less than half the height. */
@media (max-width: 980px) {
  body:not(.mobile-drawer) .tour-card {
    max-height: calc(44vh - 36px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour-card {
    backdrop-filter: none;
  }
}
