.hhcn-dna-root,
.hhcn-dna-root * {
  box-sizing: border-box;
}

.hhcn-dna-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  color: #173246;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  pointer-events: none;
}

.hhcn-dna-launcher {
  position: fixed;
  top: 43%;
  right: 14px;
  display: flex;
  width: 112px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 16px;
  background: linear-gradient(135deg, #1769aa, #2f8fd3);
  box-shadow: 0 12px 30px rgba(20, 77, 123, .24);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

.hhcn-dna-launcher:hover {
  box-shadow: 0 15px 34px rgba(20, 77, 123, .32);
  color: #fff;
  transform: translateY(-2px);
}

.hhcn-dna-launcher:focus-visible,
.hhcn-dna-root button:focus-visible,
.hhcn-dna-root a:focus-visible,
.hhcn-dna-root input:focus-visible {
  outline: 3px solid #f2a66f;
  outline-offset: 2px;
}

.hhcn-dna-launcher-badge {
  display: inline-flex;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #1769aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -.4px;
}

.hhcn-dna-root.hhcn-dna-is-open .hhcn-dna-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}

.hhcn-dna-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 36, 47, .12);
  opacity: 0;
  cursor: default;
  pointer-events: none;
  transition: opacity .22s ease;
}

.hhcn-dna-root.hhcn-dna-is-open .hhcn-dna-overlay {
  opacity: 1;
  pointer-events: auto;
}

.hhcn-dna-dialog {
  position: absolute;
  top: 76px;
  right: 0;
  bottom: 0;
  display: flex;
  width: 420px;
  max-width: calc(100vw - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d8e5f2;
  border-radius: 22px 0 0 0;
  background: #f7faff;
  box-shadow: -18px 12px 48px rgba(24, 61, 96, .2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(102%);
  visibility: hidden;
  transition: opacity .24s ease, transform .24s ease, visibility 0s linear .24s;
}

.hhcn-dna-root.hhcn-dna-is-open .hhcn-dna-dialog {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
  transition: opacity .24s ease, visibility 0s linear 0s;
}

.hhcn-dna-header {
  position: relative;
  flex: 0 0 auto;
  padding: 20px 54px 16px 20px;
  border-bottom: 1px solid #dbe7f2;
  background: linear-gradient(135deg, #eef6ff, #fff7ef);
}

.hhcn-dna-title {
  margin: 0 0 7px;
  color: #173b5b;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
}

.hhcn-dna-subtitle {
  margin: 0;
  color: #58717a;
  font-size: 13px;
  line-height: 1.65;
}

.hhcn-dna-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #cdddec;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #274b6a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.hhcn-dna-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 18px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.hhcn-dna-search-form {
  display: flex;
  gap: 8px;
  margin: 0 0 15px;
}

.hhcn-dna-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bfcede;
  border-radius: 12px;
  background: #fff;
  color: #173246;
  font-size: 14px;
  line-height: 1.45;
}

.hhcn-dna-input::placeholder {
  color: #829298;
}

.hhcn-dna-submit {
  min-width: 68px;
  min-height: 44px;
  padding: 9px 13px;
  border: 0;
  border-radius: 12px;
  background: #1769aa;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.hhcn-dna-submit:hover {
  background: #0f4f8a;
  color: #fff;
}

.hhcn-dna-status {
  min-height: 21px;
  margin: -4px 0 12px;
  color: #5d737b;
  font-size: 12px;
  line-height: 1.65;
}

.hhcn-dna-section-title {
  margin: 16px 0 10px;
  color: #294d55;
  font-size: 14px;
  font-weight: 800;
}

.hhcn-dna-quick-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.hhcn-dna-quick {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #d4e1ef;
  border-radius: 12px;
  background: #fff;
  color: #214b70;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.hhcn-dna-quick:hover,
.hhcn-dna-quick[aria-pressed="true"] {
  border-color: #6aa6d8;
  background: #edf6ff;
  transform: translateY(-1px);
}

.hhcn-dna-results {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.hhcn-dna-empty,
.hhcn-dna-error {
  padding: 14px;
  border: 1px solid #ecd9c9;
  border-radius: 13px;
  background: #fff8f1;
  color: #6d5746;
  font-size: 13px;
  line-height: 1.7;
}

.hhcn-dna-result {
  padding: 15px;
  border: 1px solid #d9e6f2;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(29, 74, 116, .06);
}

.hhcn-dna-result-category {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #185b96;
  font-size: 11px;
  font-weight: 700;
}

.hhcn-dna-result-title {
  margin: 0 0 8px;
  color: #173b5b;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

.hhcn-dna-result-answer,
.hhcn-dna-result-risk {
  margin: 0 0 10px;
  color: #4f6871;
  font-size: 13px;
  line-height: 1.75;
}

.hhcn-dna-result-risk {
  padding: 9px 10px;
  border-left: 3px solid #e58a62;
  border-radius: 4px 9px 9px 4px;
  background: #fff7f1;
  color: #765543;
}

.hhcn-dna-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hhcn-dna-result-link,
.hhcn-dna-human-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.hhcn-dna-result-link {
  border: 1px solid #9cc2e3;
  background: #fff;
  color: #155f9e;
}

.hhcn-dna-human-link {
  border: 1px solid #1769aa;
  background: #1769aa;
  color: #fff;
}

.hhcn-dna-result-link:hover,
.hhcn-dna-human-link:hover {
  color: #fff;
  text-decoration: none;
}

.hhcn-dna-result-link:hover {
  background: #165b96;
}

.hhcn-dna-boundary {
  margin: 20px 0 0;
  padding: 13px 14px;
  border: 1px solid #dbe6f0;
  border-radius: 13px;
  background: #fdfefe;
}

.hhcn-dna-boundary summary {
  color: #294d6b;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.hhcn-dna-boundary ul {
  margin: 10px 0 0;
  padding-left: 19px;
}

.hhcn-dna-boundary li {
  margin: 6px 0;
  color: #5c7077;
  font-size: 12px;
  line-height: 1.65;
}

.hhcn-dna-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #d8e4ef;
  background: #fff;
  box-shadow: 0 -8px 22px rgba(31, 72, 112, .07);
}

.hhcn-dna-action {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border: 1px solid #c7daeb;
  border-radius: 11px;
  background: #fff;
  color: #1a568a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.hhcn-dna-action:first-child {
  grid-column: 1 / -1;
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
}

.hhcn-dna-action:hover {
  border-color: #1769aa;
  background: #edf6ff;
  color: #164f86;
  text-decoration: none;
}

.hhcn-dna-action:first-child:hover {
  background: #0f4f8a;
  color: #fff;
}

.hhcn-dna-copy-feedback {
  grid-column: 1 / -1;
  min-height: 17px;
  margin: -2px 0 0;
  color: #1f5f96;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

/* Keep legacy front-end success and palette classes within the blue brand system. */
.asb-post-footer b,
.readers a.item-2 h4,
.text-success,
.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline {
  color: #2f80c9 !important;
}

.comt-tip,
.widget_ui_textasb a.style03 strong,
.btn-success,
.label-success,
.progress-bar-success,
.bg-success,
.has-vivid-green-cyan-background-color {
  border-color: #2f80c9 !important;
  background-color: #2f80c9 !important;
}

.widget_ui_textasb a.style03,
.widget_ui_textasb a.style03:hover,
.has-success .form-control,
.has-success .input-group-addon {
  border-color: #2f80c9 !important;
  color: #2f80c9 !important;
}

.alert-success,
.panel-success > .panel-heading {
  border-color: #c8dff3 !important;
  background-color: #edf6ff !important;
  color: #245a85 !important;
}

.prettyprint .typ,
.prettyprint .atn,
.prettyprint .dec,
.prettyprint .var,
.has-vivid-green-cyan-color {
  color: #79c6f2 !important;
}

@media (max-width: 767px) {
  .hhcn-dna-launcher {
    top: auto;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    min-height: 48px;
    border-radius: 999px;
  }

  .hhcn-dna-overlay {
    background: rgba(11, 36, 47, .38);
  }

  .hhcn-dna-dialog {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 22px 22px 0 0;
    transform: translateY(102%);
  }

  .hhcn-dna-header {
    padding: 17px 52px 13px 16px;
  }

  .hhcn-dna-title {
    font-size: 19px;
  }

  .hhcn-dna-scroll {
    padding: 15px 14px 22px;
  }
}

@media (max-width: 390px) {
  .hhcn-dna-search-form {
    align-items: stretch;
  }

  .hhcn-dna-submit {
    min-width: 62px;
  }

  .hhcn-dna-result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hhcn-dna-root *,
  .hhcn-dna-root *::before,
  .hhcn-dna-root *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
