/*
 * The explainer panel, static pages. See docs/guide-panel-standard.md.
 *
 * Every colour is taken from a custom property the host page already defines,
 * with a fallback beside it. That way the panel adopts each mockup's own accent
 * and dual-mode tokens instead of imposing a palette, and it still renders on a
 * page that defines none of them.
 */

.gp {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface, #fff);
  border-left: 1px solid var(--border, #e2e8f0);
}
.gp--closed { width: auto; border-left: none; background: none; }

.gp-h {
  flex-shrink: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gp-h h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  min-width: 0;
  color: var(--text, #0f172a);
}
.gp-h-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.gp-toggle {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-text, var(--accent, #0f766e));
  background: var(--accent-subtle, rgba(15, 118, 110, .1));
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  white-space: nowrap;
}
.gp-toggle:hover { filter: brightness(1.05); }
.gp-x {
  background: none;
  border: none;
  color: var(--muted, #64748b);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  font-family: inherit;
}

.gp-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.gp-accent {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent, #0f766e);
  margin-bottom: 14px;
}

.gp-body { font-size: 13px; line-height: 1.7; color: var(--text-2, #334155); }
.gp-body p { margin: 0 0 10px; }
.gp-body ul { margin: 0 0 10px; padding-left: 18px; }
.gp-body li { margin-bottom: 6px; }
.gp-body li b { color: var(--text, #0f172a); }
.gp-src {
  font-size: 11px;
  color: var(--muted, #64748b);
  font-style: italic;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border, #e2e8f0);
}

.gp-term {
  border-bottom: 1px dotted var(--accent-text, var(--accent, #0f766e));
  color: var(--accent-text, var(--accent, #0f766e));
  cursor: help;
  position: relative;
}
.gp-term:hover::after {
  content: attr(data-def);
  position: absolute;
  left: 0;
  bottom: 135%;
  width: 230px;
  background: var(--chrome, #0b1929);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  padding: 8px 10px;
  border-radius: var(--r, 8px);
  box-shadow: var(--shadow-lg, 0 14px 30px -8px rgba(15, 23, 42, .18));
  z-index: 60;
}

.gp-explainer { font-size: 13.5px; line-height: 1.75; color: var(--text-2, #334155); }
.gp-explainer .gp-lead {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.5;
  margin: 0 0 12px;
}
.gp-explainer p { margin: 0 0 11px; }
.gp-explainer h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent-text, var(--accent, #0f766e));
  margin: 18px 0 6px;
}
.gp-analogy {
  background: var(--accent-subtle, rgba(15, 118, 110, .09));
  border-left: 3px solid var(--accent, #0f766e);
  border-radius: 0 var(--r, 8px) var(--r, 8px) 0;
  padding: 11px 14px;
  margin: 12px 0;
  font-size: 13px;
}
.gp-analogy b { color: var(--text, #0f172a); }

.gp-reopen {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent, #0f766e);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  box-shadow: var(--shadow-lg, 0 14px 30px -8px rgba(15, 23, 42, .25));
}

@media (max-width: 1180px) {
  .gp {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border, #e2e8f0);
    max-height: 320px;
  }
}
