:root {
  --dh-red: #b5222a;
  --dh-ink: #242221;
  --dh-muted: #7f7773;
  --dh-line: #e9e1dc;
  --dh-paper: #fbf9f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--dh-paper);
  color: var(--dh-ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

body.dh-sheet-open {
  overflow: hidden;
}

.dh-county-sheet[hidden] {
  display: none !important;
}

.dh-error[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.dh-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: max(0px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 0 max(22px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--dh-line);
  background: rgba(255, 255, 255, .9);
}

.dh-brand {
  color: var(--dh-red);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .12em;
}

.dh-site-header nav {
  display: flex;
  gap: 20px;
  color: #6d6561;
  font-size: 13px;
}

.dh-site-header nav a:hover {
  color: var(--dh-red);
}

.dh-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.dh-hero {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(340px, 1.1fr);
  min-height: 450px;
  overflow: hidden;
  border-bottom: 1px solid var(--dh-line);
  background: linear-gradient(120deg, #f5eeea, #fff);
}

.dh-hero-copy {
  align-self: center;
  padding: 46px clamp(22px, 5vw, 70px);
}

.dh-eyebrow {
  margin: 0;
  color: var(--dh-red);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
}

.dh-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1.08;
}

.dh-hero-subtitle {
  margin: 0;
  color: #756b66;
  font-size: 18px;
}

.dh-county-trigger {
  min-height: 48px;
  margin-top: 30px;
  padding: 0 15px;
  border: 1px solid rgba(181, 34, 42, .24);
  border-radius: 999px;
  background: #fff;
  color: var(--dh-red);
  font-size: 14px;
}

.dh-county-trigger:hover,
.dh-county-trigger:focus-visible {
  border-color: var(--dh-red);
  outline: 3px solid rgba(181, 34, 42, .12);
}

.dh-county-notice {
  max-width: 290px;
  margin: 13px 0 0;
  color: var(--dh-muted);
  font-size: 12px;
  line-height: 1.6;
}

.dh-hero-visual {
  position: relative;
  min-height: 450px;
  overflow: hidden;
  isolation: isolate;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .12)), var(--dh-backdrop);
  background-position: center;
  background-size: cover;
}

.dh-hero-visual::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(251, 249, 247, .92), rgba(251, 249, 247, .04) 45%, rgba(30, 20, 15, .14));
  content: "";
}

.dh-hero-visual img {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 1;
  width: min(64%, 410px);
  height: 92%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 20px rgba(43, 27, 20, .16));
}

.dh-asset-status {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #795c52;
  font-size: 11px;
}

.dh-experience {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  padding: 48px 0;
}

.dh-profile {
  padding: 26px 0;
}

.dh-profile h2 {
  margin: 13px 0 6px;
  font-size: 27px;
  line-height: 1.25;
}

.dh-persona-subtitle,
.dh-persona-role {
  margin: 0;
  color: var(--dh-muted);
  font-size: 13px;
  line-height: 1.7;
}

.dh-persona-role {
  margin-top: 14px;
  color: #4c433f;
}

.dh-profile h3 {
  margin: 28px 0 9px;
  font-size: 13px;
  font-weight: 600;
}

.dh-knowledge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  list-style: none;
}

.dh-knowledge-list li {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1e9e4;
  color: #725a51;
  font-size: 11px;
}

.dh-clear {
  min-height: 44px;
  margin-top: 25px;
  padding: 0 13px;
  border: 1px solid var(--dh-line);
  border-radius: 10px;
  background: transparent;
  color: #776b66;
  font-size: 12px;
}

.dh-chat-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--dh-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(54, 37, 30, .06);
}

.dh-welcome {
  margin-bottom: 15px;
  padding: 15px 16px;
  border-radius: 13px;
  background: #fff6f1;
  color: #543d35;
  font-size: 14px;
  line-height: 1.75;
}

.dh-quick-questions,
.dh-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dh-question-chip,
.dh-suggestion {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #ead8d2;
  border-radius: 999px;
  background: #fff;
  color: #70433e;
  font-size: 12px;
  line-height: 1.35;
}

.dh-question-chip:hover,
.dh-suggestion:hover,
.dh-question-chip:focus-visible,
.dh-suggestion:focus-visible {
  border-color: var(--dh-red);
  background: #fff7f3;
  outline: none;
}

.dh-messages {
  min-height: 100px;
  max-height: 480px;
  margin-top: 16px;
  overflow-y: auto;
  padding: 4px 2px;
  overscroll-behavior: contain;
}

.dh-message {
  max-width: 92%;
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.75;
}

.dh-user-message {
  margin-left: auto;
  background: #f8e8e6;
  color: #60262a;
}

.dh-answer-message {
  max-width: 100%;
  border: 1px solid #eee1dc;
  background: #fff;
}

.dh-answer-message p {
  margin: 7px 0 0;
}

.dh-answer-source {
  color: var(--dh-red);
  font-size: 11px;
}

.dh-answer-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.dh-answer-card {
  padding: 10px;
  border-radius: 10px;
  background: #fff6f1;
}

.dh-answer-card strong,
.dh-answer-card span {
  display: block;
}

.dh-answer-card strong {
  color: #633b38;
  font-size: 12px;
}

.dh-answer-card span {
  margin-top: 3px;
  color: #8d7770;
  font-size: 11px;
}

.dh-answer-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.dh-answer-suggestions small {
  width: 100%;
  color: #8b7b74;
  font-size: 11px;
}

.dh-loading {
  padding: 12px 14px;
  color: #8c7770;
  font-size: 13px;
}

.dh-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0ee;
  color: #9d3131;
  font-size: 12px;
  line-height: 1.5;
}

.dh-error button {
  min-width: 76px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #9d3131;
}

.dh-suggestion-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--dh-line);
}

.dh-suggestion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #6f625d;
  font-size: 12px;
}

.dh-suggestion-heading button {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f5eeea;
  color: var(--dh-red);
  font-size: 12px;
}

.dh-chat-form {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  padding-bottom: max(2px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--dh-line);
}

.dh-chat-form input {
  min-width: 0;
  min-height: 50px;
  flex: 1;
  padding: 0 14px;
  border: 1px solid #dfd2cd;
  border-radius: 12px;
  background: #fff;
  color: var(--dh-ink);
  font-size: 16px;
  outline: none;
}

.dh-chat-form input:focus {
  border-color: var(--dh-red);
  box-shadow: 0 0 0 3px rgba(181, 34, 42, .1);
}

.dh-chat-form button {
  min-width: 70px;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--dh-red);
  color: #fff;
  font-size: 13px;
}

.dh-chat-form button:disabled,
.dh-question-chip:disabled,
.dh-suggestion:disabled,
.dh-clear:disabled {
  cursor: wait;
  opacity: .5;
}

.dh-mode-note {
  display: block;
  min-height: 17px;
  margin-top: 9px;
  color: #9a857e;
  font-size: 11px;
}

.dh-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 0 56px;
}

.dh-links a {
  display: block;
  padding: 18px;
  border: 1px solid var(--dh-line);
  background: #fff;
}

.dh-links span,
.dh-links strong {
  display: block;
}

.dh-links span {
  color: var(--dh-red);
  font-size: 12px;
}

.dh-links strong {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
}

.dh-county-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.dh-sheet-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(25, 17, 15, .44);
}

.dh-sheet-dialog {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(680px, calc(100vh - 22px - env(safe-area-inset-top)));
  overflow-y: auto;
  padding: 16px max(22px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -20px 60px rgba(25, 17, 15, .2);
}

.dh-sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 20px;
  border-radius: 99px;
  background: #d9cdc8;
}

.dh-sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dh-sheet-heading h2 {
  margin: 9px 0 0;
  font-size: 22px;
}

.dh-sheet-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: #f8f1ed;
  color: #6e5f59;
  font-size: 23px;
}

.dh-county-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.dh-county-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--dh-line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
}

.dh-county-option.is-active {
  border-color: var(--dh-red);
  background: #fff7f3;
}

.dh-county-option-copy strong,
.dh-county-option-copy small {
  display: block;
}

.dh-county-option-copy strong {
  font-size: 14px;
}

.dh-county-option-copy small {
  margin-top: 5px;
  color: #8c7a73;
  font-size: 11px;
  line-height: 1.4;
}

.dh-county-option em {
  flex: 0 0 auto;
  color: var(--dh-red);
  font-size: 10px;
  font-style: normal;
}

.dh-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  border-top: 1px solid var(--dh-line);
  color: #887a74;
  font-size: 12px;
}

.dh-footer a {
  color: var(--dh-red);
  font-weight: 600;
}

@media (max-width: 720px) {
  .dh-site-header {
    min-height: 58px;
  }

  .dh-site-header nav {
    gap: 10px;
    font-size: 11px;
  }

  .dh-page {
    width: 100%;
  }

  .dh-hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .dh-hero-copy {
    order: 1;
    padding: 18px 16px 9px;
  }

  .dh-hero h1 {
    margin-top: 7px;
    font-size: 31px;
  }

  .dh-hero-subtitle {
    font-size: 14px;
  }

  .dh-county-trigger {
    min-height: 42px;
    margin-top: 10px;
  }

  .dh-county-notice {
    margin-top: 4px;
    font-size: 11px;
  }

  .dh-hero-visual {
    order: 0;
    min-height: 170px;
    height: 170px;
  }

  .dh-hero-visual img {
    width: min(48%, 210px);
    height: 96%;
  }

  .dh-asset-status {
    right: 14px;
    bottom: 13px;
  }

  .dh-experience {
    display: block;
    padding: 8px 10px 30px;
  }

  .dh-profile {
    display: none;
  }

  .dh-chat-panel {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 16px;
  }

  .dh-welcome {
    order: 1;
    margin-bottom: 7px;
    padding: 9px 10px;
  }

  .dh-quick-questions {
    order: 2;
    display: grid;
    grid-template-columns: 1fr;
  }

  .dh-question-chip {
    width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    border-radius: 11px;
    text-align: left;
  }

  .dh-messages {
    order: 3;
    min-height: 0;
    max-height: 34vh;
  }

  .dh-error {
    order: 4;
  }

  .dh-chat-form {
    order: 5;
    margin-top: 10px;
    padding-right: 90px;
  }

  .dh-suggestion-block {
    order: 6;
  }

  .dh-mode-note {
    order: 7;
  }

  .dh-links {
    grid-template-columns: 1fr;
    padding: 0 14px 34px;
  }

  .dh-county-options {
    grid-template-columns: 1fr;
  }

  .dh-footer {
    flex-direction: column;
  }
}

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