@font-face {
  font-family: "Yapari";
  src: url("/assets/fonts/Yapari-SemiBold.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}

@font-face {
  font-family: "Monorama";
  src: url("/assets/fonts/Monorama-Regular.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Bai Jamjuree";
  src: url("/assets/fonts/BaiJamjuree-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #000;
  --surface: #030303;
  --surface-raised: #080808;
  --surface-soft: #101010;
  --field: #0b0b0b;
  --ink: #fff;
  --ink-soft: #b4b4b4;
  --ink-faint: #8a8a8a;
  --brand: #90ff00;
  --brand-hover: #7ceb00;
  --danger: #ff6868;
  --border: #1a1a1a;
  --border-light: #2a2a2a;
  --border-green: #343825;
  --font-body: "Bai Jamjuree", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Yapari", "Bai Jamjuree", "PingFang SC", sans-serif;
  --font-mono: "Monorama", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
textarea,
a {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.skip-link,
.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;
}

.skip-link:focus {
  z-index: 100;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 12px;
  clip: auto;
  background: var(--brand);
  color: #000;
}

.help-header,
.help-shell,
.site-footer {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
}

.help-header {
  position: relative;
  z-index: 30;
  padding: 16px 0 22px;
  border-bottom: 1px solid var(--border-green);
}

.header-row {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand {
  min-width: 174px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.brand-symbol {
  width: 44px;
  height: auto;
  display: block;
}

.brand-wordmark {
  width: 110px;
  height: auto;
  display: block;
}

.header-actions {
  position: absolute;
  top: 4px;
  right: 0;
}

.language-picker {
  position: relative;
}

.language-toggle {
  min-width: 58px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--ink-faint);
  cursor: pointer;
  transition: border-color 140ms ease-out, color 140ms ease-out, transform 140ms var(--ease-out);
}

.language-current-flag,
.language-flag {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  line-height: 1;
}

.language-current-flag {
  font-size: 18px;
}

.language-code {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
}

.language-toggle:hover,
.language-toggle[aria-expanded="true"] {
  border-color: var(--border-green);
  color: var(--brand);
}

.language-toggle:active {
  transform: scale(0.97);
}

.language-toggle:disabled {
  cursor: wait;
  opacity: 0.55;
}

.language-menu {
  position: absolute;
  z-index: 20;
  top: 48px;
  right: 0;
  width: 196px;
  border: 1px solid var(--border-green);
  background: #070707;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.97);
  transform-origin: top right;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.language-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.language-menu.is-instant {
  transition: none;
}

.language-menu[hidden] {
  display: none;
}

.language-menu button {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms var(--ease-out);
}

.language-option {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-flag {
  font-size: 20px;
}

.language-menu button:active {
  transform: scale(0.98);
}

.language-menu button:last-child {
  border-bottom: 0;
}

.language-menu button:hover,
.language-menu button.is-selected {
  background: #11150c;
  color: var(--brand);
}

.language-menu small {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.header-title {
  padding-top: 18px;
  text-align: center;
}

.header-title p,
.section-kicker {
  margin: 0;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.header-title h1 {
  margin: 6px 0 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(31px, 10vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.help-shell {
  padding: 20px 0 44px;
}

.assistant-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-green);
  background: var(--surface);
}

.assistant-card::before {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 44px;
  height: 44px;
  border-top: 1px solid var(--brand);
  border-right: 1px solid var(--brand);
  content: "";
  pointer-events: none;
}

.assistant-heading {
  padding: 17px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.assistant-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-heading .section-kicker {
  margin-bottom: 3px;
}

.assistant-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}

.assistant-subtitle {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.4;
}

.assistant-subtitle-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-state {
  width: 8px;
  height: 8px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.service-dot {
  position: relative;
  width: 6px;
  height: 6px;
  background: var(--ink-faint);
}

.service-state.is-ready .service-dot {
  animation: status-ready 220ms var(--ease-out) both;
  background: var(--brand);
}

.service-state.is-ready .service-dot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid var(--brand);
  content: "";
  animation: status-ring 280ms var(--ease-out) both;
}

.service-state.is-error .service-dot {
  background: var(--danger);
}

.assistant-mark {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-light);
  color: var(--brand);
}

.assistant-mark svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.clear-chat {
  min-width: 44px;
  min-height: 40px;
  padding: 0 9px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 11px;
  transition: border-color 140ms ease-out, color 140ms ease-out, transform 140ms var(--ease-out);
}

.clear-chat svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.clear-chat:hover {
  border-color: var(--border-green);
  color: var(--brand);
}

.chat-stage {
  border-top: 1px solid var(--border);
  background: #050505;
}

.chat-log {
  min-height: 132px;
  max-height: min(52dvh, 460px);
  padding: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
  scrollbar-color: var(--border-light) transparent;
}

.composer {
  margin: 0;
  padding: 11px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.composer-field {
  min-height: 54px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border: 1px solid var(--border-light);
  background: var(--field);
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}

.composer-field:focus-within {
  border-color: var(--brand);
  background: #0e0e0e;
}

.composer textarea {
  min-width: 0;
  min-height: 52px;
  max-height: 112px;
  display: block;
  flex: 1;
  resize: none;
  padding: 14px 4px 12px 13px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: #707070;
}

.send-button {
  width: 44px;
  height: 44px;
  margin: 4px;
  padding: 0;
  display: grid;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 0;
  background: var(--brand);
  color: #000;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, opacity 140ms ease-out, transform 140ms var(--ease-out);
}

.send-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
  transition: transform 140ms var(--ease-out);
}

.send-button:hover {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}

.send-button:disabled {
  border-color: var(--border-light);
  background: var(--surface-soft);
  color: var(--ink-faint);
  cursor: wait;
  opacity: 0.7;
}

.send-button:active,
.quick-questions button:active,
.topic-card:active,
.clear-chat:active,
.copy-button:active {
  transform: scale(0.97);
}

.form-error {
  min-height: 0;
  margin: 7px 2px 0;
  color: var(--danger);
  font-size: 12px;
}

.form-error:empty {
  display: none;
}

.copy-button {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 12px;
  transition: color 140ms ease-out, transform 140ms var(--ease-out);
}

.copy-button:hover {
  color: var(--brand);
}

.copy-button.is-copied {
  color: var(--brand);
  transform: translateY(-1px);
}

.message {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.message.is-entering {
  opacity: 0;
  transform: translateY(6px);
}

.message:first-child {
  margin-top: 0;
}

.message-content {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.message-content p {
  margin: 0;
  line-height: 1.72;
  text-wrap: pretty;
}

.message-content p + p {
  margin-top: 9px;
}

.answer-body {
  min-width: 0;
}

.answer-body .cherry,
.answer-body .cherry-editor,
.answer-body .cherry-previewer {
  min-height: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
}

.answer-body .cherry {
  box-shadow: none;
}

.answer-body .cherry-previewer {
  width: 100%;
  padding: 0;
  border: 0;
}

.answer-body .cherry-markdown {
  color: inherit;
  font-size: inherit;
  line-height: 1.72;
}

.answer-body .cherry-markdown > :first-child {
  margin-top: 0;
}

.answer-body .cherry-markdown > :last-child {
  margin-bottom: 0;
}

.answer-body .cherry-markdown a {
  color: var(--brand);
  overflow-wrap: anywhere;
}

.answer-body .cherry-markdown blockquote {
  border-color: var(--brand);
  color: var(--ink-soft);
}

.answer-body .cherry-markdown code,
.answer-body .cherry-markdown pre {
  font-family: var(--font-mono);
}

.answer-body .cherry-markdown pre {
  border: 1px solid var(--border);
  background: #080b06;
}

.answer-body .cherry-markdown table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.answer-body .cherry-flow-session-cursor {
  background: var(--brand);
}

.assistant-message .message-content {
  flex: 1;
}

.intro-message .message-content {
  color: var(--ink-soft);
}

.user-message {
  justify-content: flex-end;
}

.user-message .message-content {
  max-width: 88%;
  border-color: var(--border-green);
  background: #11150c;
}

.assistant-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #000;
  font-family: var(--font-display);
  font-size: 12px;
}

.message-meta,
.matched-question {
  display: block;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 11px;
}

.answer-list {
  margin: 9px 0 0;
  padding-left: 1.35em;
}

.answer-list li + li {
  margin-top: 5px;
}

.message-content strong {
  color: var(--ink);
  font-weight: 600;
}

.answer-meta {
  margin-top: 11px;
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.answer-mode {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.answer-mode.is-error {
  color: var(--danger);
}

.source-list {
  margin-top: 11px;
  border-top: 1px solid var(--border);
}

.source-summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
  transition: color 140ms ease-out;
}

.source-summary::-webkit-details-marker {
  display: none;
}

.source-summary::after {
  color: var(--brand);
  content: "+";
  font-family: var(--font-mono);
  font-size: 15px;
}

.source-list[open] .source-summary::after {
  content: "−";
}

.source-summary:hover {
  color: var(--ink);
}

.source-items {
  padding: 0 0 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-item {
  padding: 4px 8px;
  border: 1px solid var(--border-green);
  color: var(--ink-soft);
  font-size: 11px;
  text-decoration: none;
}

a.source-item:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 12px;
}

.thinking span {
  width: 4px;
  height: 4px;
  background: var(--brand);
  animation: thinking-dot 720ms linear infinite;
}

.thinking span:nth-child(1) {
  animation-delay: -240ms;
}

.thinking span:nth-child(2) {
  animation-delay: -120ms;
}

.thinking span:nth-child(3) {
  margin-right: 3px;
  animation-delay: 0ms;
}

.usage-note {
  margin: 0;
  padding: 11px 18px 14px;
  color: var(--ink-faint);
  font-size: 11px;
}

.usage-note::before {
  color: var(--brand);
  content: "// ";
}

.content-section {
  margin-top: 44px;
}

.section-heading {
  margin-bottom: 17px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.section-heading > span {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.quick-questions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
}

.quick-questions button {
  min-height: 58px;
  padding: 11px 12px;
  border: 0;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.4;
  text-align: left;
  transition: background-color 140ms ease-out, color 140ms ease-out, transform 140ms var(--ease-out);
}

.quick-questions button::before {
  display: inline-block;
  margin-right: 7px;
  color: var(--brand);
  content: "+";
  font-family: var(--font-mono);
  transition: transform 140ms var(--ease-out);
}

.quick-questions button:hover {
  background: #0d1108;
  color: var(--ink);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.topic-card {
  position: relative;
  min-height: 132px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: border-color 150ms ease-out, background-color 150ms ease-out, transform 140ms var(--ease-out);
}

.topic-card:hover {
  border-color: var(--border-green);
  background: var(--surface-raised);
}

.topic-card::after,
.cooperation-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--brand);
  content: "";
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease-out);
}

.topic-copy {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topic-copy strong,
.topic-copy small {
  overflow-wrap: anywhere;
}

.topic-copy strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.topic-copy small {
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.45;
}

.topic-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-green);
  color: var(--brand);
  transition: border-color 150ms ease, transform 150ms var(--ease-out);
}

.topic-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.cooperation-list {
  display: grid;
  gap: 10px;
}

.cooperation-card {
  position: relative;
  min-height: 88px;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 150ms ease-out, background-color 150ms ease-out, transform 140ms var(--ease-out);
}

.cooperation-card:hover {
  border-color: var(--brand);
  background: #0d1108;
}

.cooperation-card:active {
  transform: scale(0.985);
}

.cooperation-card > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cooperation-card strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.cooperation-card small {
  color: var(--ink-faint);
  font-size: 12px;
}

.cooperation-card svg {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
  transition: transform 150ms var(--ease-out);
}

.security-note {
  margin-top: 24px;
  padding: 17px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border-green);
  background: #0b0d08;
}

.security-seal {
  width: 25px;
  height: 25px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
}

.security-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.security-note strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.site-footer {
  padding: 22px 0 calc(30px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 13px;
  border-top: 1px solid var(--border);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.not-found-card {
  width: min(100%, 560px);
  padding: 34px;
  border: 1px solid var(--border-green);
  background: var(--surface);
}

.not-found-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 42px;
}

.not-found-logo img:first-child {
  width: 44px;
  height: auto;
}

.not-found-logo img:last-child {
  width: 110px;
  height: auto;
}

.not-found-card h1 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(30px, 9vw, 46px);
  font-weight: 600;
  line-height: 1.08;
}

.not-found-card > p:not(.section-kicker) {
  margin: 0;
  color: var(--ink-faint);
}

.not-found-actions {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.not-found-actions a {
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #000;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
}

.not-found-actions a:last-child {
  border-color: var(--border-light);
  background: transparent;
  color: var(--ink);
}

.not-found-actions a:hover {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
  color: #000;
}

@keyframes interface-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-ready {
  from {
    opacity: 0.45;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes status-ring {
  from {
    opacity: 0.8;
    transform: scale(0.45);
  }
  to {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes thinking-dot {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes stream-cursor {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.18;
  }
}

.reveal-pending {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-pending.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .help-header {
    animation: interface-in 260ms var(--ease-out) both;
  }

  .assistant-card {
    animation: interface-in 260ms 60ms var(--ease-out) both;
  }
}

@media (hover: hover) and (pointer: fine) {
  .send-button:hover svg {
    transform: translate(2px, -2px);
  }

  .quick-questions button:hover::before {
    transform: translateX(2px);
  }

  .topic-card:hover::after,
  .cooperation-card:hover::after {
    transform: scaleX(1);
  }

  .topic-card:hover .topic-icon {
    border-color: var(--brand);
    transform: translateY(-2px);
  }

  .cooperation-card:hover svg {
    transform: translateX(3px);
  }
}

@media (max-width: 619px) {
  .help-header {
    padding: 10px 0 14px;
  }

  .header-row {
    min-height: 44px;
  }

  .brand {
    min-width: 154px;
    height: 40px;
    gap: 8px;
  }

  .brand-symbol {
    width: 38px;
  }

  .brand-wordmark {
    width: 100px;
  }

  .header-actions {
    top: 1px;
  }

  .header-title {
    padding-top: 10px;
  }

  .help-shell {
    padding-top: 12px;
  }

  .assistant-heading {
    padding: 12px 14px;
  }

  .assistant-heading .section-kicker {
    display: none;
  }

  .assistant-mark {
    width: 38px;
    height: 38px;
  }

  .assistant-mark svg {
    width: 24px;
    height: 24px;
  }

  .assistant-heading h2 {
    font-size: 18px;
  }

  .assistant-subtitle-row {
    margin-top: 2px;
  }

  .chat-log {
    min-height: 0;
    padding: 10px 12px;
  }

  .message-content {
    padding: 10px 12px;
  }

  .message-meta,
  .matched-question {
    margin-top: 5px;
  }

  .composer {
    padding: 8px 10px 9px;
  }

  .composer-field {
    min-height: 50px;
  }

  .composer textarea {
    min-height: 48px;
    padding: 12px 4px 10px 12px;
  }

  .usage-note {
    padding: 8px 14px 10px;
  }

  .content-section {
    margin-top: 30px;
  }
}

@media (min-width: 620px) {
  .help-header,
  .help-shell,
  .site-footer {
    width: min(100% - 56px, 920px);
  }

  .help-header {
    padding-top: 24px;
  }

  .header-title {
    padding-top: 28px;
  }

  .help-shell {
    padding-top: 32px;
  }

  .assistant-heading {
    padding: 20px 24px;
  }

  .chat-log {
    min-height: 150px;
    padding: 18px 20px;
  }

  .composer {
    padding: 12px 20px 16px;
  }

  .usage-note {
    padding-inline: 24px;
  }

  .quick-questions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-card {
    min-height: 154px;
    padding: 20px;
  }

  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 359px) {
  .help-header,
  .help-shell,
  .site-footer {
    width: min(100% - 24px, 760px);
  }

  .brand {
    min-width: 144px;
    transform: translateX(-11px);
  }

  .brand-symbol {
    width: 37px;
  }

  .brand-wordmark {
    width: 96px;
  }

  .assistant-heading {
    padding-inline: 14px;
  }

  .assistant-mark {
    width: 38px;
    height: 38px;
  }

  .clear-chat span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .topic-card {
    min-height: 124px;
    padding: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .message.is-streaming .cherry-flow-session-cursor {
    animation: none;
    opacity: 1;
  }
}
