/* Alpha Centauri · Assistente institucional (Public Guide) */
:root {
  --public-guide-width: 420px;
  --public-guide-space: 0px;
  --public-guide-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
.public-guide-launcher {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #c4d2d9;
  font-family: var(--font, Mulish, Arial, sans-serif);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.public-guide-launcher span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translateY(-0.5px);
}
.public-guide-launcher:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan, #00aeef);
  color: #fff;
}
.public-guide-launcher svg {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.public-guide-launcher--standalone {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  background: rgba(8, 28, 44, 0.94);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.public-guide-launcher[hidden], .public-guide[hidden] {
  display: none !important;
}
.public-guide {
  position: fixed;
  inset: var(--public-guide-top, 0px) 0 auto auto;
  width: var(--public-guide-width);
  max-width: 100%;
  height: var(--public-guide-height, 100dvh);
  z-index: 80;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  background: #081c2c;
  color: #f7f6f1;
  box-shadow: -10px 0 36px rgba(0, 0, 0, 0.4);
  font: 14px/1.6 var(--font, Mulish, Arial, sans-serif);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s var(--public-guide-ease), visibility 0s 0.28s;
}
.public-guide.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.28s var(--public-guide-ease), visibility 0s;
}
.public-guide-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 20px 12px;
  gap: 12px;
  flex-shrink: 0;
}
.public-guide-heading small {
  font-size: 9px;
  font-weight: 700;
  color: #70d3f5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.public-guide .public-guide-heading h2 {
  font-family: var(--display, Kumbh, Arial, sans-serif);
  font-size: 24px;
  font-weight: 700;
  margin: 4px 0 0;
  letter-spacing: -0.03em;
  color: #fff;
}
.public-guide-actions {
  display: flex;
  gap: 6px;
}
.public-guide-actions button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.public-guide-actions button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan, #00aeef);
}
.public-guide-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.public-guide-intro {
  color: #9cb2be;
  font-size: 12px;
  margin: 0;
  padding: 0 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.public-guide-conversation {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}
.public-guide-messages {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: auto;
}
.public-guide-message {
  flex-shrink: 0;
  min-width: 0;
  animation: guide-message-in 0.22s ease both;
}
.public-guide-answer, .public-guide-query {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.public-guide-query {
  padding: 10px 14px;
  border: 1px solid rgba(0, 174, 239, 0.35);
  border-radius: 12px 12px 2px 12px;
  background: rgba(0, 174, 239, 0.12);
  align-self: flex-end;
  max-width: 90%;
  color: #fff;
  white-space: pre-wrap;
}
.public-guide-answer {
  position: relative;
  color: #e5edf1;
}
.public-guide-answer-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #70d3f5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.public-guide-answer-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan, #00aeef);
}
.public-guide-answer p {
  margin: 0;
  white-space: pre-wrap;
}
.public-guide-answer-text p + p, .public-guide-answer-text ul, .public-guide-answer-text ol {
  margin-top: 10px;
}
.public-guide-answer-text ul, .public-guide-answer-text ol {
  padding-left: 20px;
  margin-bottom: 8px;
}
.public-guide-answer-text li + li {
  margin-top: 4px;
}
.public-guide-answer-text strong {
  color: #fff;
  font-weight: 700;
}
.public-guide-answer-text code {
  font-size: 0.9em;
  color: #70d3f5;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}
.public-guide-answer.is-streaming .public-guide-answer-label::before {
  animation: guide-breathe 1.5s ease-in-out infinite;
}
.public-guide-answer.is-streaming .public-guide-answer-text::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 13px;
  background: var(--cyan, #00aeef);
  vertical-align: baseline;
  margin-left: 4px;
  animation: guide-breathe 1.5s ease-in-out infinite;
}
.public-guide-answer.is-pending .public-guide-answer-text {
  min-height: 24px;
  color: #8da4b0;
}
.public-guide-sources {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
}
.public-guide-sources summary {
  color: #70d3f5;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}
.public-guide-sources summary:hover {
  color: #fff;
}
.public-guide-sources a {
  display: block;
  margin-top: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: #d1e2e9;
  font-size: 11px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.public-guide-sources a:hover {
  background: rgba(0, 174, 239, 0.15);
  border-color: var(--cyan, #00aeef);
  color: #fff;
}
.public-guide-source-plain {
  display: block;
  margin-top: 6px;
  padding: 4px 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: #8da4b0;
  font-size: 11px;
}
.public-guide-error {
  color: #f7a8a8;
  font-size: 12px;
  margin: 10px 0 0;
}
.public-guide-retry {
  margin-top: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: none;
  color: #fff;
  font-family: var(--font, Mulish, Arial, sans-serif);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.public-guide-retry:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan, #00aeef);
}
.public-guide-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 20px 4px;
  flex-shrink: 0;
}
.public-guide-suggestions button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  background: none;
  padding: 5px 10px;
  color: #c4d8e0;
  font-family: var(--font, Mulish, Arial, sans-serif);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.public-guide-suggestions button:hover {
  background: rgba(0, 174, 239, 0.15);
  border-color: var(--cyan, #00aeef);
  color: #fff;
}
.public-guide-status {
  flex-shrink: 0;
  min-height: 22px;
  padding: 2px 20px 6px;
  margin: 0;
  color: #799baa;
  font-size: 11px;
  line-height: 1.4;
}
.public-guide-form {
  padding: 10px 18px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.public-guide-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.public-guide-form textarea {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  flex: 1;
  min-height: 44px;
  max-height: min(130px, 22dvh);
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  background: #0d283c;
  font: 14px/1.5 var(--font, Mulish, Arial, sans-serif);
  scrollbar-width: thin;
}
.public-guide-form textarea:focus {
  outline: 2px solid var(--cyan, #00aeef);
  outline-offset: 1px;
  border-color: var(--cyan, #00aeef);
}
.public-guide-compose button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--cyan, #00aeef);
  color: var(--navy, #081c2c);
  cursor: pointer;
  transition: filter 0.18s;
}
.public-guide-compose button:hover {
  filter: brightness(1.15);
}
.public-guide-compose button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.public-guide button:disabled {
  opacity: 0.45;
  cursor: default;
}
.public-guide-form > small {
  font-size: 10px;
  line-height: 1.5;
  color: #799baa;
  display: block;
  margin-top: 8px;
}
.public-guide-form > small a {
  color: #70d3f5;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.public-guide-latest {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #0f344d;
  color: #fff;
  border-radius: 18px;
  padding: 6px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  font: 11px var(--font, Mulish, Arial, sans-serif);
  cursor: pointer;
}
.public-guide-resize {
  position: absolute;
  inset: 0 auto 0 -6px;
  width: 12px;
  z-index: 2;
  cursor: col-resize;
  touch-action: none;
  display: grid;
  place-items: center;
}
.public-guide-resize > span {
  display: block;
  width: 3px;
  height: 40px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  transition: height 0.18s, background 0.18s;
}
.public-guide-resize:hover > span, .public-guide-resize:focus-visible > span {
  height: 60px;
  background: var(--cyan, #00aeef);
}
@media (max-width: 760px) {
  .public-guide {
    width: 100%;
    border-left: 0;
  }
  .public-guide-resize {
    display: none;
  }
}
@keyframes guide-message-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes guide-breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
