:root {
  --bg: #04080c;
  --bg-deep: #010409;
  --sidebar: rgba(9, 15, 22, 0.82);
  --panel: rgba(12, 19, 27, 0.78);
  --panel-strong: rgba(8, 13, 18, 0.96);
  --line: rgba(45, 143, 236, 0.34);
  --line-bright: rgba(44, 157, 255, 0.76);
  --blue: #1f8fff;
  --blue-bright: #2d9cff;
  --blue-soft: rgba(31, 143, 255, 0.18);
  --text: #f3f8ff;
  --muted: #b8c4cf;
  --quiet: #84919d;
  --shadow-glow: 0 0 58px rgba(31, 143, 255, 0.16), 0 26px 76px rgba(0, 0, 0, 0.48);
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 55% 8%, rgba(22, 93, 191, 0.18), transparent 28rem),
    radial-gradient(circle at 78% 58%, rgba(26, 124, 242, 0.12), transparent 34rem),
    linear-gradient(180deg, #07111a 0%, var(--bg-deep) 58%, var(--bg) 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 20%, transparent 86%, rgba(0, 0, 0, 0.38)),
    radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, 0.34) 100%);
}

button,
input,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ai-shell {
  min-height: 100vh;
}

.ai-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 304px;
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 70% 18%, rgba(31, 143, 255, 0.18), transparent 16rem),
    linear-gradient(180deg, rgba(12, 20, 29, 0.9), rgba(4, 8, 12, 0.88));
  box-shadow:
    0 0 48px rgba(31, 143, 255, 0.14),
    inset -1px 0 0 rgba(31, 143, 255, 0.08);
  backdrop-filter: blur(18px);
}

.return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  margin-bottom: 22px;
  padding: 0 14px;
  border: 1px solid rgba(45, 157, 255, 0.44);
  border-radius: 999px;
  color: #dceeff;
  background: rgba(7, 12, 18, 0.72);
  box-shadow: 0 0 22px rgba(31, 143, 255, 0.14);
  font-size: 0.86rem;
  font-weight: 820;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.return-link:hover,
.return-link:focus-visible {
  color: #fff;
  border-color: rgba(45, 157, 255, 0.8);
  box-shadow: 0 0 28px rgba(31, 143, 255, 0.24);
  transform: translateY(-1px);
  outline: 0;
}

.return-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 9px 28px;
  border-bottom: 1px solid rgba(45, 143, 236, 0.18);
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(45, 157, 255, 0.72);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #273ab4;
  box-shadow: 0 0 26px rgba(31, 143, 255, 0.28);
}

.sidebar-brand p {
  margin: 0;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 850;
}

.sidebar-brand span:last-child {
  display: block;
  margin-top: 3px;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 700;
}

.ai-selector {
  display: grid;
  gap: 13px;
  margin-top: 26px;
}

.ai-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 78px;
  padding: 15px;
  border: 1px solid rgba(45, 143, 236, 0.16);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(8, 13, 18, 0.42);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ai-option strong,
.ai-option small {
  display: block;
}

.ai-option strong {
  color: #eef6ff;
  font-size: 1.02rem;
  line-height: 1.1;
  font-weight: 850;
}

.ai-option small {
  margin-top: 6px;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 720;
}

.ai-option em {
  display: none;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(45, 157, 255, 0.58);
  border-radius: 999px;
  color: #d9efff;
  background: rgba(31, 143, 255, 0.18);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
}

.ai-option:hover,
.ai-option:focus-visible {
  border-color: rgba(45, 157, 255, 0.56);
  box-shadow: 0 0 24px rgba(31, 143, 255, 0.16);
  transform: translateY(-1px);
  outline: 0;
}

.ai-option.is-active {
  border-color: var(--line-bright);
  background:
    radial-gradient(circle at 78% 32%, rgba(31, 143, 255, 0.3), transparent 8rem),
    rgba(31, 143, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(31, 143, 255, 0.08),
    0 0 34px rgba(31, 143, 255, 0.26);
}

.ai-option.is-active strong {
  color: var(--blue-bright);
}

.ai-option.is-active small {
  color: #c8e7ff;
}

.ai-option.is-active em {
  display: inline-flex;
}

.ai-main {
  min-height: 100vh;
  margin-left: 304px;
  padding: 46px clamp(28px, 5vw, 72px) 40px;
}

.ai-stage {
  display: grid;
  align-content: center;
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 152px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(ellipse 76% 58% at 50% 48%, rgba(23, 78, 170, 0.24), transparent 70%),
    linear-gradient(180deg, rgba(14, 22, 31, 0.76), rgba(5, 9, 14, 0.78));
  box-shadow: var(--shadow-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.018);
  backdrop-filter: blur(18px);
}

.stage-copy {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

.architecture-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid rgba(45, 157, 255, 0.44);
  border-radius: 999px;
  color: var(--blue-bright);
  background: rgba(31, 143, 255, 0.1);
  box-shadow: 0 0 18px rgba(31, 143, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 850;
}

h1 {
  margin: 17px 0 0;
  color: #fff;
  font-size: clamp(3rem, 4.4vw, 5rem);
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(32, 144, 255, 0.24);
}

.full-name-line {
  margin: 15px auto 0;
  color: var(--blue-bright);
  font-size: clamp(1rem, 1.15vw, 1.22rem);
  font-weight: 840;
}

.stage-copy p:last-child {
  max-width: 850px;
  margin: 13px auto 0;
  color: #d0dae4;
  font-size: clamp(1.08rem, 1.3vw, 1.35rem);
  line-height: 1.48;
  font-weight: 620;
}

.question-card {
  width: 100%;
  min-width: 0;
  max-width: 980px;
  margin: 44px auto 0;
  padding: 22px 22px 31px;
  border: 1px solid rgba(31, 143, 255, 0.38);
  border-radius: 36px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(28, 107, 215, 0.2), transparent 66%),
    rgba(10, 16, 23, 0.78);
  box-shadow:
    0 0 0 1px rgba(31, 143, 255, 0.07),
    0 0 42px rgba(31, 143, 255, 0.2),
    inset 0 0 36px rgba(15, 52, 119, 0.16);
}

.ask-form {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 12px;
  min-height: 96px;
  padding: 12px 11px 12px 32px;
  border: 1px solid rgba(38, 153, 255, 0.74);
  border-radius: 29px;
  background: var(--panel-strong);
  box-shadow:
    0 0 0 1px rgba(31, 143, 255, 0.08),
    0 0 34px rgba(31, 143, 255, 0.23);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.ask-form:focus-within,
.ask-form.is-active {
  border-color: rgba(62, 170, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(31, 143, 255, 0.12),
    0 0 46px rgba(31, 143, 255, 0.35);
}

.ask-form input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(1rem, 1.15vw, 1.28rem);
  font-weight: 550;
}

.ask-form input::placeholder {
  color: #7f8992;
  opacity: 1;
}

.ask-form button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0 24px rgba(31, 143, 255, 0.36);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ask-form button:hover,
.ask-form button:focus-visible {
  transform: translateX(2px) scale(1.04);
  background: #35a1ff;
  box-shadow: 0 0 34px rgba(31, 143, 255, 0.5);
  outline: 0;
}

.ask-form button svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 21px auto 0;
}

.prompt-chips button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(166, 185, 203, 0.18);
  border-radius: 999px;
  color: #d8dee4;
  background: rgba(15, 20, 25, 0.84);
  font-size: 1rem;
  font-weight: 780;
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.prompt-chips button:hover,
.prompt-chips button:focus-visible {
  color: #fff;
  border-color: rgba(31, 143, 255, 0.72);
  box-shadow: 0 0 18px rgba(31, 143, 255, 0.2);
  transform: translateY(-1px);
  outline: 0;
}

.boundary-text {
  max-width: 850px;
  margin: 32px auto 0;
  color: #b8c3ce;
  text-align: center;
  font-size: clamp(0.96rem, 1.08vw, 1.12rem);
  line-height: 1.55;
  font-weight: 620;
}

.response-card {
  width: 100%;
  max-width: 980px;
  margin: 30px auto 0;
  padding: 24px;
  border: 1px solid rgba(31, 143, 255, 0.32);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(28, 107, 215, 0.16), transparent 62%),
    rgba(8, 13, 19, 0.74);
  box-shadow:
    0 0 0 1px rgba(31, 143, 255, 0.06),
    0 0 38px rgba(31, 143, 255, 0.16),
    inset 0 0 28px rgba(15, 52, 119, 0.12);
}

.question-summary,
.demo-response,
.reference-box,
.literacy-notice,
.support-panel,
.follow-up-form {
  border: 1px solid rgba(31, 143, 255, 0.22);
  background: rgba(7, 12, 18, 0.62);
  box-shadow: 0 0 20px rgba(31, 143, 255, 0.08);
}

.question-summary {
  padding: 17px 19px;
  border-radius: 20px;
}

.question-summary p,
.demo-label,
.reference-box p {
  margin: 0;
  color: var(--blue-bright);
  font-size: 0.74rem;
  font-weight: 860;
  text-transform: uppercase;
  letter-spacing: 0;
}

.question-summary h2 {
  margin: 8px 0 0;
  color: #eef6ff;
  font-size: 1rem;
  line-height: 1.4;
}

.demo-response {
  margin-top: 14px;
  padding: 20px;
  border-radius: 22px;
  text-align: left;
}

.demo-response h2 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 1.1rem;
}

.demo-response > p:not(.demo-label):not(.action-message) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 620;
  line-height: 1.6;
}

.response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 18px;
}

.response-actions button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(31, 143, 255, 0.18);
  border-radius: 50%;
  color: #d7e6f5;
  background: rgba(11, 18, 25, 0.7);
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.response-actions button:hover,
.response-actions button:focus-visible,
.response-actions button.is-selected {
  color: #fff;
  border-color: rgba(45, 157, 255, 0.72);
  box-shadow: 0 0 18px rgba(31, 143, 255, 0.22);
  transform: translateY(-1px);
  outline: 0;
}

.response-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--quiet);
  font-size: 0.8rem;
  font-weight: 680;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.reference-box {
  min-height: 112px;
  padding: 17px;
  border-radius: 20px;
}

.reference-box span {
  display: block;
  margin-top: 9px;
  color: var(--quiet);
  font-size: 0.88rem;
  font-weight: 620;
  line-height: 1.5;
}

.literacy-notice {
  margin: 14px 0 0;
  padding: 15px 17px;
  border-radius: 18px;
  color: var(--quiet);
  font-size: 0.86rem;
  font-weight: 680;
  line-height: 1.5;
}

.support-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  text-align: left;
}

.support-panel h2 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
}

.support-panel p {
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 0.84rem;
  font-weight: 620;
  line-height: 1.5;
}

.support-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(45, 157, 255, 0.8);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #2598ff, #197ce0);
  box-shadow: 0 0 22px rgba(31, 143, 255, 0.26);
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.support-panel a:hover,
.support-panel a:focus-visible {
  box-shadow: 0 0 32px rgba(31, 143, 255, 0.42);
  transform: translateY(-1px);
  outline: 0;
}

.follow-up-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 9px 10px 9px 18px;
  border-radius: 24px;
}

.follow-up-form input {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 0.94rem;
}

.follow-up-form input::placeholder {
  color: #7f8992;
}

.follow-up-form button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0 18px rgba(31, 143, 255, 0.3);
}

.follow-up-form button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.response-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 4, 8, 0.74);
  backdrop-filter: blur(12px);
}

.response-modal[hidden] {
  display: none;
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 44px));
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(31, 143, 255, 0.38);
  border-radius: 26px;
  background: rgba(8, 13, 19, 0.96);
  box-shadow: var(--shadow-glow);
}

.modal-panel h2 {
  margin: 0;
  color: #fff;
}

.modal-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  float: right;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(31, 143, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(11, 18, 25, 0.72);
}

.ai-footer {
  padding-top: 26px;
  color: var(--quiet);
  text-align: center;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.55;
}

.ai-footer p {
  margin: 0;
}

.ai-footer p + p {
  margin-top: 5px;
  color: #b9c4ce;
}

@media (max-width: 980px) {
  .ai-sidebar {
    position: sticky;
    top: 0;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    height: auto;
    padding: 14px 16px 13px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow:
      0 0 38px rgba(31, 143, 255, 0.14),
      inset 0 -1px 0 rgba(31, 143, 255, 0.08);
  }

  .sidebar-brand {
    padding: 0 0 12px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .sidebar-brand p {
    font-size: 1rem;
  }

  .ai-selector {
    display: flex;
    gap: 10px;
    margin-top: 0;
    padding-bottom: 3px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .ai-option {
    flex: 0 0 auto;
    width: auto;
    min-width: 174px;
    min-height: 58px;
    padding: 11px 13px;
    border-radius: 999px;
  }

  .ai-option em {
    display: none;
  }

  .ai-option.is-active em {
    display: none;
  }

  .ai-option small {
    margin-top: 3px;
  }

  .ai-main {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 24px 18px 32px;
  }

  .ai-stage {
    min-height: auto;
    padding: 34px 20px;
    border-radius: 26px;
  }

  .question-card {
    margin-top: 31px;
    padding: 15px;
    border-radius: 28px;
  }

  .response-card {
    padding: 16px;
    border-radius: 24px;
  }

  .reference-grid,
  .support-panel {
    grid-template-columns: 1fr;
  }

  .support-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .support-panel a {
    width: 100%;
  }

  .ask-form {
    min-height: 76px;
    padding-left: 18px;
    border-radius: 23px;
  }

  .ask-form button {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .prompt-chips {
    gap: 10px;
  }

  .prompt-chips button {
    min-height: 42px;
    padding: 0 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 540px) {
  .ai-sidebar {
    padding-inline: 12px;
  }

  .ai-main {
    width: min(100vw, 390px);
    max-width: min(100vw, 390px);
    margin-inline: 0;
    padding-inline: 10px;
  }

  .ai-stage {
    padding: 28px 14px;
    border-radius: 22px;
  }

  h1 {
    font-size: 2.6rem;
  }

  .stage-copy p:last-child {
    font-size: 1rem;
  }

  .question-card {
    padding: 12px;
    overflow: hidden;
  }

  .response-card {
    padding: 12px;
  }

  .response-actions {
    justify-content: center;
  }

  .ask-form {
    gap: 8px;
    min-height: 68px;
    padding: 9px 9px 9px 14px;
  }

  .ask-form input {
    font-size: 0.92rem;
  }

  .ask-form button {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .prompt-chips button {
    width: 100%;
  }

  .boundary-text {
    font-size: 0.9rem;
  }
}
