.guide-backdrop {
  background: rgba(8, 18, 11, 0.42);
  inset: 0;
  position: fixed;
  z-index: 79;
}

.guide-launcher {
  align-items: center;
  background: var(--report-orange);
  border: 1px solid #d77d18;
  border-radius: 6px;
  bottom: 22px;
  box-shadow: 0 12px 30px rgba(13, 38, 21, 0.24);
  color: #122019;
  cursor: pointer;
  display: flex;
  font: 800 12px/1 var(--font-sans);
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  position: fixed;
  right: 22px;
  z-index: 78;
}

.guide-launcher:hover,
.guide-launcher:focus-visible {
  background: #ffab43;
  transform: translateY(-1px);
}

.guide-launcher[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
}

.guide-chat-icon {
  border: 2px solid currentColor;
  border-radius: 4px;
  display: block;
  height: 14px;
  position: relative;
  width: 18px;
}

.guide-chat-icon::after {
  background: var(--report-orange);
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  bottom: -5px;
  content: "";
  height: 5px;
  left: 3px;
  position: absolute;
  transform: skewY(-35deg);
  width: 5px;
}

.guide-panel {
  background: var(--report-paper);
  border-left: 1px solid #bfc9c1;
  bottom: 0;
  box-shadow: -18px 0 48px rgba(13, 38, 21, 0.2);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  max-width: 100vw;
  position: fixed;
  right: 0;
  top: 74px;
  transform: translateX(102%);
  transition: transform 180ms ease, visibility 180ms ease;
  visibility: hidden;
  width: 430px;
  z-index: 80;
}

.guide-panel.is-open {
  transform: translateX(0);
  visibility: visible;
}

.guide-panel-header {
  align-items: center;
  background: var(--report-green-deep);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 16px;
}

.guide-panel-title {
  align-items: center;
  display: flex;
  gap: 11px;
  min-width: 0;
}

.guide-panel-title img {
  height: 38px;
  object-fit: contain;
  width: 38px;
}

.guide-panel-title p,
.guide-panel-title h2 {
  margin: 0;
}

.guide-panel-title p {
  color: #a9b9ad;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-panel-title h2 {
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.1;
}

.guide-header-actions {
  display: flex;
  gap: 6px;
}

.guide-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 34px;
}

.guide-icon-button:hover,
.guide-icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.11);
}

.guide-close-icon::before,
.guide-close-icon::after {
  background: currentColor;
  content: "";
  height: 2px;
  left: 8px;
  position: absolute;
  top: 15px;
  width: 16px;
}

.guide-close-icon::before { transform: rotate(45deg); }
.guide-close-icon::after { transform: rotate(-45deg); }

.guide-clear-icon::before {
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 13px;
  left: 8px;
  position: absolute;
  top: 8px;
  width: 13px;
}

.guide-clear-icon::after {
  background: var(--report-green-deep);
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  content: "";
  height: 6px;
  left: 7px;
  position: absolute;
  top: 7px;
  transform: rotate(-20deg);
  width: 6px;
}

.guide-status-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--report-line);
  display: grid;
  gap: 4px 12px;
  grid-template-columns: auto 1fr;
  padding: 11px 16px;
}

.guide-status-row > span {
  align-items: center;
  color: var(--report-green);
  display: flex;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  gap: 7px;
  text-transform: uppercase;
}

.guide-status-row > span::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.guide-status-row > span[data-state="working"] { color: #b76b12; }
.guide-status-row > span[data-state="error"] { color: var(--report-danger); }

.guide-status-row p {
  color: var(--report-muted);
  font-size: 10px;
  margin: 0;
  min-width: 0;
  text-align: right;
}

.guide-messages {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 10px;
}

.guide-message {
  border-bottom: 1px solid #d8e0da;
  margin-bottom: 16px;
  padding: 0 0 16px 13px;
  position: relative;
}

.guide-message::before {
  background: var(--report-orange);
  content: "";
  height: calc(100% - 16px);
  left: 0;
  position: absolute;
  top: 0;
  width: 3px;
}

.guide-message.is-user {
  background: #e8f0ea;
  border: 1px solid #c8d5cb;
  border-radius: 6px;
  margin-left: 42px;
  padding: 12px 13px;
}

.guide-message.is-user::before { display: none; }

.guide-message-label {
  color: var(--report-green);
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.guide-message.is-user .guide-message-label { color: #526159; }

.guide-message p {
  color: #334139;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

.guide-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.guide-message-action,
.guide-suggestions button {
  background: transparent;
  border: 1px solid #9eb2a3;
  border-radius: 5px;
  color: var(--report-green-deep);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  padding: 8px 10px;
  text-align: left;
}

.guide-message-action:hover,
.guide-message-action:focus-visible,
.guide-suggestions button:hover,
.guide-suggestions button:focus-visible {
  background: #e5eee7;
  border-color: var(--report-green);
}

.guide-suggestions {
  background: #edf2ee;
  border-top: 1px solid var(--report-line);
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 16px;
  scrollbar-width: thin;
}

.guide-suggestions button {
  background: #fff;
  flex: 0 0 auto;
  max-width: 220px;
}

.guide-composer {
  background: #fff;
  border-top: 1px solid var(--report-line);
  padding: 12px 16px max(14px, env(safe-area-inset-bottom));
}

.guide-mode-control {
  border: 0;
  margin: 0 0 11px;
  padding: 0;
}

.guide-mode-control legend {
  color: var(--report-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.guide-mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.guide-mode-options label { cursor: pointer; }
.guide-mode-options input { position: absolute; opacity: 0; pointer-events: none; }

.guide-mode-options span {
  align-items: center;
  background: #f4f6f4;
  border: 1px solid #bfc9c1;
  color: #4d5a51;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
}

.guide-mode-options label:first-child span { border-radius: 5px 0 0 5px; }
.guide-mode-options label:last-child span { border-left: 0; border-radius: 0 5px 5px 0; }
.guide-mode-options input:checked + span { background: var(--report-green-deep); border-color: var(--report-green-deep); color: #fff; }
.guide-mode-options input:focus-visible + span { outline: 3px solid rgba(245, 154, 47, 0.38); outline-offset: 2px; }

.guide-text-form {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr auto;
}

.guide-input-label {
  color: var(--report-ink);
  font-size: 10px;
  font-weight: 800;
  grid-column: 1 / -1;
}

.guide-text-form textarea {
  border: 1px solid #aebbb1;
  border-radius: 5px;
  color: var(--report-ink);
  font: 500 12px/1.45 var(--font-sans);
  min-height: 58px;
  padding: 9px 10px;
  resize: vertical;
  width: 100%;
}

.guide-text-form textarea:focus {
  border-color: var(--report-green);
  outline: 3px solid rgba(23, 111, 52, 0.12);
}

.guide-send {
  align-self: stretch;
  background: var(--report-orange);
  border: 1px solid #d77d18;
  border-radius: 5px;
  color: #172219;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  min-width: 70px;
  padding: 0 13px;
}

.guide-send:disabled { cursor: wait; opacity: 0.58; }

.guide-voice-disclosure,
.guide-privacy {
  color: var(--report-muted);
  font-size: 9px;
  line-height: 1.45;
  margin: 0;
}

.guide-voice-buttons {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 42px 42px;
  margin: 9px 0;
}

.guide-voice-start,
.guide-voice-icon-button {
  align-items: center;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 42px;
}

.guide-voice-start {
  background: var(--report-orange);
  border: 1px solid #d77d18;
  color: #172219;
  font-size: 11px;
  font-weight: 850;
  gap: 9px;
}

.guide-voice-icon-button {
  background: #fff;
  border: 1px solid #aebbb1;
  color: var(--report-green-deep);
  padding: 0;
  position: relative;
}

.guide-voice-start:disabled,
.guide-voice-icon-button:disabled { cursor: default; opacity: 0.42; }
.guide-voice-icon-button[aria-pressed="true"] { background: #ffe6cd; border-color: var(--report-orange); }

.guide-mic-icon {
  border: 2px solid currentColor;
  border-radius: 8px;
  display: block;
  height: 17px;
  position: relative;
  width: 10px;
}

.guide-mic-icon::before {
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  bottom: -6px;
  content: "";
  height: 8px;
  left: -5px;
  position: absolute;
  width: 16px;
}

.guide-mic-icon::after {
  background: currentColor;
  bottom: -10px;
  content: "";
  height: 5px;
  left: 3px;
  position: absolute;
  width: 2px;
}

.guide-sound-icon {
  border: solid currentColor;
  border-width: 5px 7px 5px 0;
  display: block;
  height: 0;
  position: relative;
  width: 0;
}

.guide-sound-icon::before {
  background: currentColor;
  content: "";
  height: 8px;
  left: -6px;
  position: absolute;
  top: -4px;
  width: 5px;
}

.guide-sound-icon::after {
  border: 2px solid currentColor;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-top-color: transparent;
  border-radius: 50%;
  content: "";
  height: 14px;
  left: 4px;
  position: absolute;
  top: -9px;
  width: 12px;
}

.guide-stop-icon {
  background: currentColor;
  border-radius: 2px;
  display: block;
  height: 13px;
  width: 13px;
}

.guide-voice-status {
  color: var(--report-green);
  font-size: 10px;
  font-weight: 750;
  margin: 0 0 8px;
}

.guide-voice-status[data-state="error"] { color: var(--report-danger); }
.guide-voice-status[data-state="speaking"] { color: #b76b12; }
.guide-privacy { border-top: 1px solid #dde3de; margin-top: 10px; padding-top: 9px; }

@media (min-width: 721px) {
  .guide-backdrop { background: rgba(8, 18, 11, 0.14); }
}

@media (max-width: 720px) {
  body.guide-open { overflow: hidden; }

  .guide-launcher {
    bottom: max(14px, env(safe-area-inset-bottom));
    right: 14px;
  }

  .guide-panel {
    border-left: 0;
    border-top: 1px solid #bfc9c1;
    bottom: 0;
    height: 86dvh;
    top: auto;
    transform: translateY(102%);
    width: 100%;
  }

  .guide-panel.is-open { transform: translateY(0); }
  .guide-status-row { grid-template-columns: 1fr; }
  .guide-status-row p { text-align: left; }
  .guide-message.is-user { margin-left: 28px; }
}

@media (max-width: 430px) {
  .guide-panel { height: 90dvh; }
  .guide-panel-header { min-height: 66px; }
  .guide-messages { padding-left: 12px; padding-right: 12px; }
  .guide-suggestions,
  .guide-composer { padding-left: 12px; padding-right: 12px; }
}

@media print {
  .guide-backdrop,
  .guide-launcher,
  .guide-panel { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-panel,
  .guide-launcher { transition: none; }
}
