.ccc-advisor-launcher,
.ccc-advisor-layer {
  --ccc-advisor-red: #e1251b;
  --ccc-advisor-ink: #0e0f11;
  --ccc-advisor-panel: #17181b;
  --ccc-advisor-panel-soft: #202125;
  --ccc-advisor-paper: #eeeae2;
  --ccc-advisor-muted: #aaa7a1;
  --ccc-advisor-line: rgba(255, 255, 255, 0.12);
  font-family: "Manrope", Arial, sans-serif;
}

.ccc-advisor-launcher {
  position: fixed;
  z-index: 2100;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-grid;
  min-height: 52px;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #151619;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  padding: 8px 18px 8px 8px;
  color: #f6f1e8;
  cursor: pointer;
  grid-template-columns: 36px auto;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    box-shadow 0.25s ease,
    visibility 0s linear;
}

.ccc-advisor-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.35);
}

.ccc-advisor-launcher:focus-visible,
.ccc-advisor-layer button:focus-visible,
.ccc-advisor-layer a:focus-visible,
.ccc-advisor-layer input:focus-visible {
  outline: 3px solid rgba(225, 37, 27, 0.72);
  outline-offset: 3px;
}

.ccc-advisor-launcher__mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--ccc-advisor-red);
  box-shadow: 0 0 0 5px rgba(225, 37, 27, 0.14);
  color: #fff;
  font-family: "Archivo", "Manrope", sans-serif;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.ccc-advisor-launcher__copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.ccc-advisor-launcher__copy strong {
  font-family: "Archivo", "Manrope", sans-serif;
  font-size: 0.73rem;
  font-weight: 820;
  letter-spacing: 0.045em;
  line-height: 1.1;
  text-transform: uppercase;
}

.ccc-advisor-launcher__copy small {
  color: #aaa8a3;
  font-size: 0.62rem;
  line-height: 1.2;
}

.ccc-advisor-layer[hidden] {
  display: none;
}

.ccc-advisor-layer {
  position: fixed;
  z-index: 7000;
  inset: 0;
  display: grid;
  justify-items: end;
  background: rgba(5, 5, 6, 0.64);
  color: var(--ccc-advisor-paper);
  isolation: isolate;
}

.ccc-advisor-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: default;
}

.ccc-advisor-panel {
  position: relative;
  display: grid;
  width: min(100%, 460px);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--ccc-advisor-line);
  background:
    radial-gradient(circle at 100% 0%, rgba(225, 37, 27, 0.16), transparent 23rem),
    linear-gradient(155deg, #1b1c20, #101113 72%);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.32);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.ccc-advisor-head {
  display: grid;
  gap: 10px 14px;
  border-bottom: 1px solid var(--ccc-advisor-line);
  padding:
    max(22px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    18px
    22px;
  grid-template-columns: 1fr auto;
}

.ccc-advisor-kicker {
  align-self: center;
  color: #bbb8b1;
  font-family: "Archivo", "Manrope", sans-serif;
  font-size: 0.61rem;
  font-weight: 760;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.ccc-advisor-kicker::before {
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 8px;
  background: var(--ccc-advisor-red);
  content: "";
  vertical-align: 0.2em;
}

.ccc-advisor-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--ccc-advisor-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  font-size: 1.3rem;
}

.ccc-advisor-head h2 {
  margin: 0;
  color: #f7f2e9;
  font-family: "Archivo", "Manrope", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 840;
  letter-spacing: -0.055em;
  line-height: 0.95;
  grid-column: 1 / -1;
}

.ccc-advisor-head p {
  max-width: 40ch;
  margin: 0;
  color: var(--ccc-advisor-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  grid-column: 1 / -1;
}

.ccc-advisor-trust {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8f8d88;
  font-size: 0.64rem;
  line-height: 1.4;
  grid-column: 1 / -1;
}

.ccc-advisor-trust::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6fc48b;
  box-shadow: 0 0 0 4px rgba(111, 196, 139, 0.1);
  content: "";
}

.ccc-advisor-log {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 13px;
  overflow-y: auto;
  padding: 20px 22px 26px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(225, 37, 27, 0.7) rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

.ccc-advisor-message {
  display: grid;
  max-width: 92%;
  gap: 8px;
  border: 1px solid var(--ccc-advisor-line);
  border-radius: 5px 17px 17px 17px;
  background: rgba(255, 255, 255, 0.055);
  padding: 13px 14px;
  color: #e7e2da;
  font-size: 0.82rem;
  line-height: 1.55;
}

.ccc-advisor-message--user {
  justify-self: end;
  border-color: rgba(225, 37, 27, 0.35);
  border-radius: 17px 5px 17px 17px;
  background: rgba(225, 37, 27, 0.16);
}

.ccc-advisor-message strong {
  color: #fff;
  font-family: "Archivo", "Manrope", sans-serif;
  font-size: 0.76rem;
  font-weight: 790;
}

.ccc-advisor-message p {
  margin: 0;
}

.ccc-advisor-note {
  border-left: 2px solid var(--ccc-advisor-red);
  padding-left: 10px;
  color: #bdb9b2;
  font-size: 0.74rem;
}

.ccc-advisor-options,
.ccc-advisor-actions,
.ccc-advisor-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ccc-advisor-option,
.ccc-advisor-quick button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  padding: 9px 12px;
  color: #eee9e1;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 670;
  line-height: 1.25;
}

.ccc-advisor-option:hover,
.ccc-advisor-quick button:hover {
  border-color: rgba(225, 37, 27, 0.7);
  background: rgba(225, 37, 27, 0.12);
}

.ccc-advisor-actions {
  margin-top: 2px;
}

.ccc-advisor-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px 13px;
  color: #f6f1e9;
  font-family: "Archivo", "Manrope", sans-serif;
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-decoration: none;
}

.ccc-advisor-action--primary {
  border-color: var(--ccc-advisor-red);
  background: var(--ccc-advisor-red);
  color: #fff;
}

.ccc-advisor-compose {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--ccc-advisor-line);
  background: rgba(12, 13, 15, 0.94);
  padding:
    14px
    max(18px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.ccc-advisor-quick {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ccc-advisor-quick::-webkit-scrollbar {
  display: none;
}

.ccc-advisor-quick button {
  min-height: 38px;
  flex: 0 0 auto;
  padding-block: 7px;
  white-space: nowrap;
}

.ccc-advisor-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ccc-advisor-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ccc-advisor-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
  color: #f4efe7;
  font: inherit;
  font-size: 16px;
}

.ccc-advisor-form input::placeholder {
  color: #85837f;
}

.ccc-advisor-form button {
  min-width: 48px;
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: var(--ccc-advisor-red);
  color: #fff;
  cursor: pointer;
  font-size: 1.05rem;
}

.ccc-advisor-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  color: #777672;
  font-size: 0.59rem;
}

.ccc-advisor-meta a {
  color: #aaa8a3;
}

.ccc-advisor-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  body.home-vision.ccc-story-in-view:not(.ccc-advisor-open) .ccc-advisor-launcher,
  body.menu-open .ccc-advisor-launcher {
    visibility: hidden;
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition-delay: 0s, 0s, 0s, 0.2s;
  }
}

@media (max-width: 680px) {
  .ccc-advisor-launcher {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 6px;
    grid-template-columns: 34px;
  }

  .ccc-advisor-launcher__mark {
    width: 34px;
    height: 34px;
  }

  .ccc-advisor-launcher__copy {
    display: none;
  }

  body.home-vision.ccc-story-in-view:not(.ccc-advisor-open) .ccc-advisor-launcher {
    visibility: hidden;
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition-delay: 0s, 0s, 0s, 0.2s;
  }

  body.menu-open .ccc-advisor-launcher {
    visibility: hidden;
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
  }

  .ccc-advisor-layer {
    align-items: end;
    justify-items: stretch;
  }

  .ccc-advisor-panel {
    width: 100%;
    height: min(92svh, 820px);
    border-top: 1px solid var(--ccc-advisor-line);
    border-left: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -28px 70px rgba(0, 0, 0, 0.42);
  }

  .ccc-advisor-head {
    padding:
      18px
      max(17px, env(safe-area-inset-right))
      14px
      max(17px, env(safe-area-inset-left));
  }

  .ccc-advisor-head h2 {
    font-size: clamp(1.65rem, 8vw, 2rem);
  }

  .ccc-advisor-log {
    padding: 16px 17px 22px;
  }

  .ccc-advisor-message {
    max-width: 96%;
  }
}

@media (max-width: 360px) {
  .ccc-advisor-launcher__copy strong {
    font-size: 0.66rem;
  }

  .ccc-advisor-panel {
    height: 94svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccc-advisor-launcher,
  .ccc-advisor-option,
  .ccc-advisor-quick button {
    transition: none;
  }

  .ccc-advisor-launcher:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .ccc-advisor-launcher,
  .ccc-advisor-panel,
  .ccc-advisor-message,
  .ccc-advisor-option,
  .ccc-advisor-action,
  .ccc-advisor-form input {
    border: 1px solid CanvasText;
  }
}

@media print {
  .ccc-advisor-launcher,
  .ccc-advisor-layer {
    display: none !important;
  }
}
