/*
 * PageCast comments — GROWL futuristic dark-glass styling.
 *
 * Namespacing contract: EVERY custom property is prefixed --gcmt- and EVERY
 * selector is scoped under .gcmt-root (the wrapper comments.js appends to
 * <body>). This is deliberate: the layer is injected into arbitrary published
 * report HTML that has its own CSS variables and rules, so we must neither
 * clobber the host nor be clobbered by it. The only elements that live OUTSIDE
 * .gcmt-root are the inline text highlights and element markers (which must
 * sit inside the report's prose) — those carry the .gcmt- prefix and reset the
 * properties they care about.
 */

/* ---- Design tokens (GROWL brand, verbatim) ---------------------------- */
.gcmt-root {
  --gcmt-black: #030303;
  --gcmt-darkgrey: #141414;
  --gcmt-warmgrey: #3c3e3f;
  --gcmt-grey: #a5aaae;
  --gcmt-sand: #f3ebe5;
  --gcmt-orange: #f74d2b;
  --gcmt-blue: #3275fc;
  --gcmt-purple: #6f48e3;

  /* Derived */
  --gcmt-panel: rgba(20, 20, 20, 0.85);
  --gcmt-panel-solid: #141414;
  --gcmt-border: var(--gcmt-warmgrey);
  --gcmt-radius: 14px;
  --gcmt-glow: 0 0 24px rgba(247, 77, 43, 0.3);
  --gcmt-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --gcmt-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* The wrapper itself is a zero-footprint positioning context. */
  position: static;
  font-family: var(--gcmt-font);
  -webkit-font-smoothing: antialiased;
}

/* Defensive reset for our own elements only (host CSS can be hostile). */
.gcmt-root *,
.gcmt-root *::before,
.gcmt-root *::after {
  box-sizing: border-box;
}
.gcmt-root button {
  font-family: inherit;
  cursor: pointer;
}

/* ---- High z-index floating surfaces ----------------------------------- */
.gcmt-popover,
.gcmt-floater,
.gcmt-sidebar {
  z-index: 2147483000; /* sit above almost anything the report defines */
}

/* ---- Avatars ----------------------------------------------------------- */
.gcmt-av {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  overflow: visible;
  border: 2px solid transparent;
}
.gcmt-av-sm { width: 26px; height: 26px; font-size: 10px; }
.gcmt-av-xs { width: 18px; height: 18px; font-size: 8px; }
.gcmt-av-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
/* Human = blue accent ring; Agent = purple accent ring. */
.gcmt-av-human { border-color: var(--gcmt-blue); box-shadow: 0 0 0 1px rgba(50, 117, 252, 0.35); }
.gcmt-av-agent { border-color: var(--gcmt-purple); box-shadow: 0 0 0 1px rgba(111, 72, 227, 0.4); }
.gcmt-av-bot {
  position: absolute;
  right: -4px;
  bottom: -4px;
  font-size: 9px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}

/* ---- Author pills ------------------------------------------------------ */
.gcmt-pill {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}
.gcmt-pill-human { background: rgba(50, 117, 252, 0.18); color: #8fb4ff; }
.gcmt-pill-agent { background: rgba(111, 72, 227, 0.2); color: #b69bff; }
.gcmt-pill-good { background: rgba(165, 170, 174, 0.16); color: var(--gcmt-grey); }
.gcmt-pill-warn { background: rgba(247, 77, 43, 0.16); color: #ff9277; }

/* ---- Buttons ----------------------------------------------------------- */
.gcmt-btn {
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.gcmt-btn-primary { background: var(--gcmt-orange); color: #fff; }
.gcmt-btn-primary:hover,
.gcmt-btn-primary:focus-visible { box-shadow: var(--gcmt-glow); outline: none; }
.gcmt-btn-ghost { background: transparent; color: var(--gcmt-grey); }
.gcmt-btn-ghost:hover { color: var(--gcmt-sand); }

/* ---- Selection floater ("💬 Comment") ---------------------------------- */
.gcmt-floater {
  position: absolute;
  transform: translateX(-50%);
}
.gcmt-floater[hidden] { display: none; }
.gcmt-floater-btn {
  background: var(--gcmt-orange);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: var(--gcmt-glow), 0 6px 18px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  animation: gcmt-pop 0.14s ease;
}
.gcmt-floater-btn:hover { box-shadow: 0 0 30px rgba(247, 77, 43, 0.5), 0 6px 18px rgba(0, 0, 0, 0.4); }
@keyframes gcmt-pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---- Popovers (thread + composer) -------------------------------------- */
.gcmt-popover {
  position: absolute;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: var(--gcmt-panel);
  border: 1px solid var(--gcmt-border);
  border-radius: var(--gcmt-radius);
  box-shadow: var(--gcmt-shadow);
  color: var(--gcmt-sand);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.gcmt-popover[hidden] { display: none; }
.gcmt-popover-arrow {
  position: absolute;
  top: -7px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: var(--gcmt-panel-solid);
  border-left: 1px solid var(--gcmt-border);
  border-top: 1px solid var(--gcmt-border);
  transform: rotate(45deg);
}
.gcmt-popover-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gcmt-border);
}
.gcmt-popover-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gcmt-sand);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcmt-popover-close {
  background: none;
  border: none;
  color: var(--gcmt-grey);
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.gcmt-popover-close:hover { color: var(--gcmt-orange); }
.gcmt-popover-body {
  padding: 12px 14px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}

/* ---- Thread rows ------------------------------------------------------- */
.gcmt-thread-stack { margin-bottom: 14px; }
.gcmt-thread-stack:last-child { margin-bottom: 0; }
.gcmt-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gcmt-border);
  border-radius: 12px;
  padding: 10px 12px;
}
.gcmt-row-agent { border-left: 3px solid var(--gcmt-purple); }
.gcmt-row-human { border-left: 3px solid var(--gcmt-blue); }
.gcmt-row-resolved { opacity: 0.5; }
.gcmt-row-resolved .gcmt-row-body { color: var(--gcmt-grey); }
.gcmt-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.gcmt-row-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--gcmt-sand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcmt-row-ts {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gcmt-grey);
  flex: none;
}
.gcmt-row-selection {
  font-size: 11px;
  font-style: italic;
  color: var(--gcmt-grey);
  border-left: 2px solid var(--gcmt-orange);
  padding-left: 8px;
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gcmt-row-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gcmt-sand);
  white-space: pre-wrap;
  word-break: break-word;
}
.gcmt-row-resolved-note {
  margin-top: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gcmt-grey);
}
.gcmt-row-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.gcmt-row-action {
  background: none;
  border: none;
  color: var(--gcmt-grey);
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 0;
}
.gcmt-row-action:hover { color: var(--gcmt-orange); }
.gcmt-row-action-danger:hover { color: #ff5b5b; }

.gcmt-thread-reply {
  margin: 8px 0 0 18px;
  padding-left: 8px;
  border-left: 1px dashed var(--gcmt-border);
}
.gcmt-thread-reply .gcmt-row { background: rgba(255, 255, 255, 0.015); }

/* ---- Reply form -------------------------------------------------------- */
.gcmt-reply-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin: 8px 0 0 18px;
}
.gcmt-reply-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gcmt-border);
  border-radius: 10px;
  color: var(--gcmt-sand);
  font: inherit;
  font-size: 12px;
  padding: 8px 10px;
  resize: none; /* height is driven by _autosizeReply as the user types */
  min-height: 34px;
  max-height: 320px; /* keep in sync with REPLY_MAX_PX in comments.js */
  overflow-y: auto;
  line-height: 1.45;
  outline: none;
}
.gcmt-reply-input:focus { border-color: var(--gcmt-orange); box-shadow: var(--gcmt-glow); }
.gcmt-reply-btn {
  background: rgba(247, 77, 43, 0.15);
  color: var(--gcmt-orange);
  border: 1px solid rgba(247, 77, 43, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.gcmt-reply-btn:hover { background: var(--gcmt-orange); color: #fff; box-shadow: var(--gcmt-glow); }

.gcmt-empty {
  text-align: center;
  color: var(--gcmt-grey);
  font-size: 12px;
  padding: 16px 0;
}

/* ---- Composer ---------------------------------------------------------- */
.gcmt-composer-selection {
  font-size: 11px;
  color: var(--gcmt-grey);
  margin-bottom: 10px;
}
.gcmt-composer-selection[hidden] { display: none; }
.gcmt-composer-quote {
  color: var(--gcmt-sand);
  font-style: italic;
}
.gcmt-composer-text {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gcmt-border);
  border-radius: 10px;
  color: var(--gcmt-sand);
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 84px;
  outline: none;
}
.gcmt-composer-text:focus { border-color: var(--gcmt-orange); box-shadow: var(--gcmt-glow); }
.gcmt-composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* ---- Inline markers (live in the report prose, outside .gcmt-root) ----- */
.gcmt-marker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--gcmt-orange, #f74d2b);
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0 14px rgba(247, 77, 43, 0.4);
  z-index: 2147482000;
}
.gcmt-marker-good { background: #6f48e3; box-shadow: 0 0 14px rgba(111, 72, 227, 0.4); }
.gcmt-marker-icon { font-size: 10px; }
.gcmt-marker-count { font-variant-numeric: tabular-nums; }

.gcmt-text-highlight {
  background: rgba(247, 77, 43, 0.16);
  border-bottom: 2px solid var(--gcmt-orange, #f74d2b);
  border-radius: 2px;
  cursor: pointer;
  padding: 0 1px;
  color: inherit; /* keep the report's own text color */
}
.gcmt-text-highlight-good {
  background: rgba(111, 72, 227, 0.14);
  border-bottom-color: #6f48e3;
}
.gcmt-text-highlight-badge {
  display: inline-block;
  vertical-align: super;
  margin-left: 2px;
  background: var(--gcmt-orange, #f74d2b);
  color: #fff;
  border-radius: 999px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
}
.gcmt-text-highlight-good .gcmt-text-highlight-badge { background: #6f48e3; }

/* Flash pulse when jumping from the sidebar. */
.gcmt-anchor-flash {
  animation: gcmt-flash 1.6s ease;
}
@keyframes gcmt-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247, 77, 43, 0); }
  20% { box-shadow: 0 0 0 4px rgba(247, 77, 43, 0.5); }
  60% { box-shadow: 0 0 0 4px rgba(247, 77, 43, 0.25); }
}

/* ---- Live dot ---------------------------------------------------------- */
.gcmt-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gcmt-grey);
  margin-left: 4px;
  vertical-align: middle;
}
.gcmt-live-on { background: var(--gcmt-orange); animation: gcmt-pulse 1.6s infinite; }
@keyframes gcmt-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---- Sidebar ----------------------------------------------------------- */
.gcmt-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  pointer-events: none; /* only the toggle + panel are interactive */
}
.gcmt-sidebar > * { pointer-events: auto; }

.gcmt-sidebar-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gcmt-panel);
  border: 1px solid var(--gcmt-border);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--gcmt-sand);
  font-size: 15px;
  box-shadow: var(--gcmt-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.18s ease;
}
.gcmt-sidebar-toggle:hover { box-shadow: var(--gcmt-glow), var(--gcmt-shadow); }
.gcmt-sidebar-toggle-count {
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gcmt-warmgrey);
  color: var(--gcmt-sand);
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.gcmt-sidebar-has-unresolved .gcmt-sidebar-toggle-count {
  background: var(--gcmt-orange);
  color: #fff;
}
/* Unread takes visual priority over unresolved: solid orange + pulsing ring. */
.gcmt-sidebar-has-unread .gcmt-sidebar-toggle-count {
  background: var(--gcmt-orange);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(247, 77, 43, 0.6);
  animation: gcmt-unread-pulse 1.8s infinite;
}
@keyframes gcmt-unread-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(247, 77, 43, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(247, 77, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(247, 77, 43, 0); }
}

/* "new" pill + dot + row accent for unread comments in the list. */
.gcmt-pill-new { background: var(--gcmt-orange); color: #fff; }
.gcmt-sidebar-row-newdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gcmt-orange); flex: none; margin-right: 2px;
  box-shadow: 0 0 8px rgba(247, 77, 43, 0.7);
}
.gcmt-sidebar-row-new {
  border-left: 2px solid var(--gcmt-orange);
  background: rgba(247, 77, 43, 0.06);
}

.gcmt-sidebar-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: var(--gcmt-panel);
  border-left: 1px solid var(--gcmt-border);
  box-shadow: var(--gcmt-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--gcmt-sand);
  transform: translateX(0);
  transition: transform 0.22s ease;
}
.gcmt-sidebar-collapsed .gcmt-sidebar-panel { transform: translateX(102%); }

.gcmt-sidebar-header {
  display: flex;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--gcmt-border);
}
.gcmt-sidebar-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex: 1;
}
.gcmt-sidebar-close {
  background: none;
  border: none;
  color: var(--gcmt-grey);
  font-size: 20px;
  line-height: 1;
}
.gcmt-sidebar-close:hover { color: var(--gcmt-orange); }

.gcmt-sidebar-me {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--gcmt-grey);
  border-bottom: 1px solid var(--gcmt-border);
}
.gcmt-sidebar-me-text b { color: var(--gcmt-sand); }
.gcmt-sidebar-me:empty { display: none; }

.gcmt-sidebar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gcmt-border);
}
.gcmt-sidebar-filter {
  background: transparent;
  border: 1px solid var(--gcmt-border);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  color: var(--gcmt-grey);
  transition: 0.15s ease;
}
.gcmt-sidebar-filter:hover { color: var(--gcmt-sand); border-color: var(--gcmt-grey); }
.gcmt-sidebar-filter.active {
  background: rgba(247, 77, 43, 0.16);
  border-color: var(--gcmt-orange);
  color: #ff9277;
}

.gcmt-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gcmt-sidebar-empty {
  text-align: center;
  color: var(--gcmt-grey);
  font-size: 12px;
  padding: 24px 0;
}

.gcmt-sidebar-row {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gcmt-border);
  border-radius: 12px;
  padding: 12px;
  color: var(--gcmt-sand);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gcmt-sidebar-row:hover {
  border-color: var(--gcmt-orange);
  box-shadow: 0 0 0 1px rgba(247, 77, 43, 0.25);
}
.gcmt-sidebar-row-resolved { opacity: 0.55; }
.gcmt-sidebar-row-unanchored { border-style: dashed; }
.gcmt-sidebar-row-dangling { border-left: 3px solid var(--gcmt-orange); }
.gcmt-sidebar-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.gcmt-sidebar-row-author {
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.gcmt-sidebar-row-quote {
  font-size: 11px;
  font-style: italic;
  color: var(--gcmt-grey);
  border-left: 2px solid var(--gcmt-orange);
  padding-left: 7px;
  margin-bottom: 5px;
}
.gcmt-sidebar-row-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--gcmt-sand);
  word-break: break-word;
}
.gcmt-sidebar-row-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--gcmt-grey);
}
.gcmt-sidebar-row-subtitle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcmt-sidebar-row-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.gcmt-sidebar-row-ts {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gcmt-grey);
}
.gcmt-sidebar-row-tag {
  margin-left: auto;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gcmt-grey);
  border: 1px solid var(--gcmt-border);
  border-radius: 6px;
  padding: 1px 6px;
}
.gcmt-sidebar-row-tag-dangling {
  color: var(--gcmt-orange);
  border-color: var(--gcmt-orange);
}

/* ---- Mobile ------------------------------------------------------------ */
@media (max-width: 480px) {
  .gcmt-popover { width: calc(100vw - 24px); }
  .gcmt-sidebar-panel { width: 100vw; }
}

/* Composer draft-restored note */
.gcmt-composer-draftnote {
  font-size: 11px;
  color: var(--gcmt-orange);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.gcmt-composer-draftnote::before { content: "● "; }

/* ---- "Published with Pagecast" badge + About modal -------------------- */
.gcmt-about-badge {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: var(--gcmt-panel);
  border: 1px solid var(--gcmt-border);
  border-radius: 999px;
  box-shadow: var(--gcmt-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  color: var(--gcmt-grey);
  cursor: pointer;
  user-select: none;
}
.gcmt-about-spark { color: var(--gcmt-orange); cursor: pointer; }
.gcmt-about-mark {
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--gcmt-sand);
  cursor: pointer;
}
.gcmt-about-rev {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--gcmt-grey);
  padding: 1px 6px;
  border: 1px solid var(--gcmt-warmgrey);
  border-radius: 999px;
  white-space: nowrap;
}
.gcmt-about-btn {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1px solid var(--gcmt-warmgrey);
  background: transparent;
  color: var(--gcmt-grey);
  font-size: 10px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  display: grid; place-items: center;
}
.gcmt-about-btn:hover { color: var(--gcmt-orange); border-color: var(--gcmt-orange); box-shadow: var(--gcmt-glow); }

.gcmt-about-modal { position: fixed; inset: 0; z-index: 2147483600; }
.gcmt-about-modal[hidden] { display: none; }
.gcmt-about-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
.gcmt-about-card {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 440px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--gcmt-panel-solid);
  border: 1px solid var(--gcmt-border);
  border-radius: var(--gcmt-radius);
  box-shadow: var(--gcmt-shadow);
  padding: 24px;
  color: var(--gcmt-sand);
}
.gcmt-about-x {
  position: absolute; right: 14px; top: 12px;
  background: none; border: none; color: var(--gcmt-grey); font-size: 20px; line-height: 1; cursor: pointer;
}
.gcmt-about-x:hover { color: var(--gcmt-orange); }
.gcmt-about-logo {
  font-size: 22px; font-weight: 800; letter-spacing: 0.3px;
  background: linear-gradient(90deg, var(--gcmt-sand), var(--gcmt-orange));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.gcmt-about-logo b { font-weight: 800; }
.gcmt-about-tag { font-size: 12px; color: var(--gcmt-grey); margin: 4px 0 18px; }
.gcmt-about-meta { display: grid; grid-template-columns: 84px 1fr; gap: 6px 12px; margin: 0 0 18px; font-size: 13px; }
.gcmt-about-meta dt { color: var(--gcmt-grey); text-transform: uppercase; font-size: 10px; letter-spacing: 1px; padding-top: 2px; }
.gcmt-about-meta dd { margin: 0; color: var(--gcmt-sand); }
.gcmt-about-sub { color: var(--gcmt-grey); font-size: 11px; }
.gcmt-about-h { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gcmt-orange); margin-bottom: 8px; }
.gcmt-about-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.45; }
.gcmt-about-feats li { padding-left: 16px; position: relative; color: #d8d2c8; }
.gcmt-about-feats li::before { content: "▹"; position: absolute; left: 0; color: var(--gcmt-orange); }
.gcmt-about-feats b { color: var(--gcmt-sand); }

/* ---- Live-sync status (sidebar header) -------------------------------- */
.gcmt-sidebar-header .gcmt-sidebar-title { flex: none; }
.gcmt-live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: auto;
  font-size: 10px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.gcmt-live-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--gcmt-grey); }
.gcmt-live-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.gcmt-live-time { color: var(--gcmt-grey); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* States */
.gcmt-live-live .gcmt-live-dot { background: var(--gcmt-orange); animation: gcmt-live-pulse 1.8s infinite; }
.gcmt-live-live .gcmt-live-label { color: var(--gcmt-orange); }
.gcmt-live-syncing .gcmt-live-dot { background: var(--gcmt-orange); animation: gcmt-live-pulse 0.6s infinite; box-shadow: 0 0 8px rgba(247,77,43,.8); }
.gcmt-live-syncing .gcmt-live-label { color: var(--gcmt-orange); }
.gcmt-live-connecting .gcmt-live-dot,
.gcmt-live-reconnecting .gcmt-live-dot { background: #e8b339; animation: gcmt-live-pulse 1s infinite; }
.gcmt-live-connecting .gcmt-live-label,
.gcmt-live-reconnecting .gcmt-live-label { color: #e8b339; }
.gcmt-live-offline .gcmt-live-dot { background: var(--gcmt-grey); }
.gcmt-live-offline .gcmt-live-label { color: var(--gcmt-grey); }
@keyframes gcmt-live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(247,77,43,.5); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px rgba(247,77,43,0); }
}

/* ---- Quick resolve/reopen on the bubble head -------------------------- */
.gcmt-row-quick {
  margin-left: 6px;
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--gcmt-warmgrey);
  background: transparent;
  color: var(--gcmt-grey);
  font-size: 13px;
  line-height: 1;
  display: grid; place-items: center;
  transition: all .15s ease;
}
.gcmt-row-quick:hover { color: #5fd08a; border-color: #5fd08a; box-shadow: 0 0 10px rgba(95,208,138,.35); }
.gcmt-row-quick-on { color: #5fd08a; border-color: rgba(95,208,138,.5); }
.gcmt-row-quick-on:hover { color: var(--gcmt-orange); border-color: var(--gcmt-orange); box-shadow: var(--gcmt-glow); }

/* ---- Comment edit ------------------------------------------------------- */
.gcmt-row-edited {
  margin-left: 6px;
  font-size: 10px;
  font-style: italic;
  color: var(--gcmt-grey);
  flex: none;
}
.gcmt-row-edit {
  margin-left: 6px;
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--gcmt-warmgrey);
  background: transparent;
  color: var(--gcmt-grey);
  font-size: 12px;
  line-height: 1;
  display: grid; place-items: center;
  transition: all .15s ease;
}
.gcmt-row-edit:hover { color: var(--gcmt-orange); border-color: var(--gcmt-orange); box-shadow: var(--gcmt-glow); }
.gcmt-edit-form { margin-top: 6px; }
.gcmt-edit-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gcmt-border);
  border-radius: 10px;
  color: var(--gcmt-sand);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 10px;
  resize: none; /* height driven by _autosizeReply */
  min-height: 56px;
  max-height: 320px;
  overflow-y: auto;
  outline: none;
}
.gcmt-edit-input:focus { border-color: var(--gcmt-orange); box-shadow: var(--gcmt-glow); }
.gcmt-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.gcmt-about-tip {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--gcmt-warmgrey);
  font-size: 12px; color: var(--gcmt-grey);
}
.gcmt-about-tip b { color: var(--gcmt-orange); }

/* Fallback pin (comment that couldn't be located on its exact text) */
.gcmt-fallback-marker { outline: 1px dashed rgba(247,77,43,.55); outline-offset: 1px; }
