.gv-ai {
  --gv-navy: #203b53;
  --gv-navy-deep: #142b3d;
  --gv-blue: #2d6a9c;
  --gv-blue-soft: #eaf2f8;
  --gv-ink: #183044;
  --gv-muted: #64778a;
  --gv-line: #dce5eb;
  --gv-gold: #d49b52;
  --gv-paper: #f3f6f8;
  --gv-white: #fff;
  color: var(--gv-ink);
  background: radial-gradient(circle at 90% 8%, #e7f0f7 0, transparent 33%), var(--gv-paper);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  min-height: calc(100vh - 120px);
  padding: 23px 20px 42px;
}

.gv-ai *,
.gv-ai *::before,
.gv-ai *::after { box-sizing: border-box; }
.gv-ai button,
.gv-ai textarea,
.gv-ai select { font: inherit; }
.gv-ai button { cursor: pointer; }
.gv-ai-shell { max-width: 1450px; margin: 0 auto; }

.gv-ai-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 37px;
  margin-bottom: 18px;
}
.gv-ai-back {
  color: var(--gv-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.gv-ai-back:hover,
.gv-ai-back:focus { color: var(--gv-navy); text-decoration: underline; }
.gv-ai-service {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--gv-line);
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  color: var(--gv-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  white-space: nowrap;
}
.gv-ai-service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7c3cb;
}
.gv-ai-service.is-ready .gv-ai-service-dot { background: #218365; box-shadow: 0 0 0 4px #e1f3ec; }
.gv-ai-service.is-error .gv-ai-service-dot { background: #bf654e; box-shadow: 0 0 0 4px #faece8; }

.gv-ai-layout {
  display: grid;
  grid-template-columns: minmax(290px, 355px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.gv-ai-aside {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 670px;
  border-radius: 22px;
  padding: 34px 28px 28px;
  background: linear-gradient(157deg, #2d5572 0%, var(--gv-navy) 45%, var(--gv-navy-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 32px rgba(21, 52, 76, .13);
}
.gv-ai-aside::before {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  top: -125px;
  right: -115px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(255,255,255,.035), 0 0 0 88px rgba(255,255,255,.025);
  pointer-events: none;
}
.gv-ai-aside-head,
.gv-ai-issue-box,
.gv-ai-scope { position: relative; z-index: 1; }
.gv-ai-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.06em;
  margin-bottom: 29px;
}
.gv-ai-mark span { color: #efc791; font-size: 11px; letter-spacing: .08em; }
.gv-ai-journal {
  margin: 0 0 10px;
  color: #d7e9f3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.5;
  text-transform: uppercase;
}
.gv-ai-aside h1 {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 2.5vw, 37px);
  line-height: 1.13;
  letter-spacing: -.035em;
  margin: 0 0 17px;
}
.gv-ai-intro {
  color: #d4e0e9;
  line-height: 1.75;
  font-size: 14px;
  margin: 0;
}
.gv-ai-issue-box {
  margin-top: 44px;
  border-top: 1px solid rgba(255,255,255,.22);
  padding-top: 22px;
}
.gv-ai-issue-box label {
  display: block;
  color: #e2edf5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.gv-ai-issue-box select {
  appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 10px 32px 10px 13px;
  color: var(--gv-ink);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 10px;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23344d60' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-size: 13px;
  font-weight: 700;
}
.gv-ai-issue-box select:disabled { opacity: .65; cursor: wait; }
.gv-ai-issue-count { color: #bed1df; font-size: 12px; margin: 9px 0 0; }
.gv-ai-scope {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: auto;
  padding-top: 35px;
}
.gv-ai-scope-icon {
  color: #f0c88f;
  font-size: 23px;
  line-height: 1;
}
.gv-ai-scope strong { color: #fff; font-size: 13px; }
.gv-ai-scope p { color: #bed1df; font-size: 12px; line-height: 1.55; margin: 4px 0 0; }

.gv-ai-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 670px;
  border: 1px solid var(--gv-line);
  border-radius: 22px;
  background: var(--gv-white);
  box-shadow: 0 14px 34px rgba(20, 45, 67, .065);
  overflow: hidden;
}
.gv-ai-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 19px;
  border-bottom: 1px solid #edf1f3;
}
.gv-ai-kicker {
  color: var(--gv-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
  margin: 0 0 6px;
}
.gv-ai-main-head h2 {
  color: var(--gv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  margin: 0;
}
.gv-ai-reset {
  flex: none;
  border: 1px solid var(--gv-line);
  border-radius: 9px;
  background: #fff;
  color: var(--gv-blue);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 12px;
}
.gv-ai-reset:hover,
.gv-ai-reset:focus { border-color: #9fbace; background: #f3f8fb; }
.gv-ai-messages {
  flex: 1;
  min-height: 370px;
  padding: 26px 30px 12px;
}
.gv-ai-welcome {
  max-width: 620px;
  margin: 48px auto 18px;
  text-align: center;
}
.gv-ai-welcome[hidden] { display: none; }
.gv-ai-welcome-symbol {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: #e8f1f7;
  color: var(--gv-blue);
  font-size: 28px;
}
.gv-ai-welcome h3 {
  color: var(--gv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.32;
  margin: 0 0 24px;
}
.gv-ai-examples {
  display: grid;
  gap: 9px;
  max-width: 580px;
  margin: 0 auto;
}
.gv-ai-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 48px;
  padding: 12px 15px;
  background: #fbfcfd;
  border: 1px solid var(--gv-line);
  border-radius: 10px;
  color: #35546b;
  text-align: left;
  line-height: 1.45;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.gv-ai-example span { color: var(--gv-blue); font-size: 19px; }
.gv-ai-example:hover,
.gv-ai-example:focus {
  border-color: #9ebbd1;
  box-shadow: 0 5px 13px rgba(25, 65, 95, .08);
  transform: translateY(-1px);
}
.gv-ai-message { max-width: 790px; margin: 0 auto 24px; }
.gv-ai-message.user { display: flex; justify-content: flex-end; }
.gv-ai-user-bubble {
  max-width: 84%;
  border-radius: 16px 16px 4px 16px;
  background: var(--gv-navy);
  color: #fff;
  line-height: 1.6;
  padding: 13px 17px;
  overflow-wrap: anywhere;
}
.gv-ai-message.assistant {
  border-bottom: 1px solid #e9eef1;
  padding: 0 0 22px;
}
.gv-ai-assistant-label {
  color: var(--gv-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  margin-bottom: 10px;
}
.gv-ai-answer { font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.82; color: #203b50; }
.gv-ai-answer p { margin: 0 0 12px; overflow-wrap: anywhere; }
.gv-ai-answer strong { font-weight: 700; }
.gv-ai-answer .gv-ai-bullet { padding-left: 18px; position: relative; }
.gv-ai-answer .gv-ai-bullet::before { content: "•"; position: absolute; left: 2px; color: var(--gv-blue); }
.gv-ai-citation {
  display: inline-block;
  border-radius: 5px;
  padding: 1px 5px;
  color: #1d5477;
  background: #e5f0f6;
  font: 700 11px/1.45 "Segoe UI", Arial, sans-serif;
  text-decoration: none;
  vertical-align: 1px;
}
.gv-ai-citation:hover,
.gv-ai-citation:focus { color: #fff; background: var(--gv-blue); text-decoration: none; }
.gv-ai-badges { display: flex; gap: 7px; flex-wrap: wrap; margin: 16px 0 10px; }
.gv-ai-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e8f4ed;
  color: #216344;
  font-size: 11px;
  font-weight: 750;
}
.gv-ai-badge.warn { background: #fff0e0; color: #92551a; }
.gv-ai-badge.neutral { background: var(--gv-blue-soft); color: #315c7b; }
.gv-ai-warning {
  border-left: 3px solid #d99b4f;
  border-radius: 5px;
  background: #fff7ec;
  color: #82531f;
  font-size: 13px;
  line-height: 1.55;
  margin: 9px 0;
  padding: 9px 12px;
}
.gv-ai-detail { border-top: 1px solid #eaf0f3; margin-top: 10px; padding-top: 10px; }
.gv-ai-detail summary {
  color: var(--gv-blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  list-style: none;
}
.gv-ai-detail summary::-webkit-details-marker { display: none; }
.gv-ai-detail summary::before { content: "▸"; display: inline-block; width: 16px; }
.gv-ai-detail[open] summary::before { content: "▾"; }
.gv-ai-detail ul { margin: 12px 0 0; padding-left: 20px; }
.gv-ai-detail li { color: #425b6d; line-height: 1.7; margin: 0 0 8px; overflow-wrap: anywhere; }
.gv-ai-source {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  border: 1px solid var(--gv-line);
  border-radius: 12px;
  background: #fbfcfd;
  padding: 14px;
  scroll-margin-top: 24px;
}
.gv-ai-source.is-highlighted { border-color: var(--gv-blue); box-shadow: 0 0 0 3px #dcebf5; }
.gv-ai-source-index {
  flex: none;
  align-self: flex-start;
  border-radius: 7px;
  background: #e7f0f5;
  color: var(--gv-blue);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 7px;
}
.gv-ai-source-content { min-width: 0; overflow-wrap: anywhere; }
.gv-ai-source-content strong { display: block; color: var(--gv-navy); line-height: 1.45; }
.gv-ai-source-content small { display: block; color: var(--gv-muted); margin-top: 5px; line-height: 1.55; }
.gv-ai-source-content p { color: #385369; border-left: 2px solid #b6cfdd; margin: 10px 0; padding-left: 10px; line-height: 1.6; }
.gv-ai-source-content a { color: var(--gv-blue); font-weight: 750; text-decoration: underline; }
.gv-ai-loading { color: var(--gv-muted); font-size: 14px; line-height: 1.6; }
.gv-ai-loading::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 9px;
  border: 2px solid #b5cfdf;
  border-top-color: var(--gv-blue);
  border-radius: 50%;
  animation: gv-ai-spin .8s linear infinite;
  vertical-align: -2px;
}
@keyframes gv-ai-spin { to { transform: rotate(360deg); } }

.gv-ai-composer-wrap { padding: 15px 28px 19px; border-top: 1px solid #edf1f3; background: #fff; }
.gv-ai-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border: 1px solid #b9cad5;
  border-radius: 14px;
  background: #fff;
  padding: 7px;
  box-shadow: 0 5px 16px rgba(22, 57, 82, .045);
}
.gv-ai-composer:focus-within { border-color: var(--gv-blue); box-shadow: 0 0 0 3px #e6f0f7; }
.gv-ai-composer textarea {
  flex: 1;
  min-height: 40px;
  max-height: 140px;
  resize: none;
  border: 0;
  outline: 0;
  box-shadow: none;
  color: var(--gv-ink);
  padding: 10px 9px 8px;
  line-height: 1.5;
}
.gv-ai-composer textarea::placeholder { color: #8a9aa7; }
.gv-ai-send {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
  min-width: 105px;
  min-height: 43px;
  border: 0;
  border-radius: 9px;
  background: var(--gv-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 14px;
}
.gv-ai-send:hover,
.gv-ai-send:focus { background: #1e547f; color: #fff; }
.gv-ai-send:disabled { opacity: .6; cursor: wait; }
.gv-ai-send span { font-size: 19px; line-height: 1; }
.gv-ai-note { color: #8495a0; font-size: 11px; line-height: 1.45; text-align: center; margin: 9px 0 0; }

@media (max-width: 991px) {
  .gv-ai-layout { grid-template-columns: 1fr; }
  .gv-ai-aside { min-height: auto; }
  .gv-ai-issue-box { margin-top: 26px; }
  .gv-ai-scope { margin-top: 18px; padding-top: 0; }
}
@media (max-width: 640px) {
  .gv-ai { padding: 14px 10px 26px; }
  .gv-ai-toolbar { align-items: flex-start; }
  .gv-ai-service { font-size: 11px; }
  .gv-ai-aside { border-radius: 15px; padding: 25px 20px; }
  .gv-ai-main { min-height: 620px; border-radius: 15px; }
  .gv-ai-main-head { padding: 18px 17px; }
  .gv-ai-main-head h2 { font-size: 20px; }
  .gv-ai-messages { padding: 18px 17px 6px; }
  .gv-ai-welcome { margin-top: 30px; }
  .gv-ai-welcome h3 { font-size: 21px; }
  .gv-ai-composer-wrap { padding: 12px 12px 15px; }
  .gv-ai-send { min-width: 44px; font-size: 0; gap: 0; }
  .gv-ai-send span { font-size: 19px; }
  .gv-ai-answer { font-size: 16px; }
}
