:root {
  --dh-navy: #0f1834;
  --dh-navy-2: #172144;
  --dh-accent: #4d48f5;
  --dh-accent-soft: #ecebff;
  --dh-text: #33343a;
  --dh-muted: #6e7077;
  --dh-line: #dedfe4;
  --dh-page: #f7f7f8;
  --dh-card: #ffffff;
  --dh-green: #4fac68;
  --dh-red: #e24661;
  --dh-orange: #e3913e;
  --dh-shadow: 0 12px 34px rgba(20, 24, 42, 0.1);
  --dh-radius: 8px;
  --dh-radius-pill: 999px;
  --dh-control-h: 44px;
  --dh-bar: 64px;
  font-family: Poppins, Arial, Helvetica, sans-serif;
}

html[data-theme="dark"] {
  --dh-navy: #6352e8;
  --dh-navy-2: #7b6af0;
  --dh-accent: #7b6af0;
  --dh-accent-soft: rgba(99, 82, 232, 0.18);
  --dh-text: #e4e6f0;
  --dh-muted: #8b8fa8;
  --dh-line: rgba(255, 255, 255, 0.1);
  --dh-page: #0d0f1a;
  --dh-card: #13162b;
  --dh-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

@font-face {
  font-family: Poppins;
  src: url("../../fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("../../fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("../../fonts/Poppins-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--dh-text);
  background: var(--dh-page);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(77, 72, 245, 0.34);
  outline-offset: 2px;
}

a {
  color: var(--dh-accent);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 20px;
  font-weight: 700;
}

h2 {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
}

.dh-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dh-topbar {
  min-height: var(--dh-bar);
  background: var(--dh-navy);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 clamp(18px, 3vw, 54px);
  gap: 26px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.dh-brand {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 24px;
  white-space: nowrap;
}

.dh-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-block;
  background:
    radial-gradient(circle at 55% 48%, var(--dh-navy) 0 28%, transparent 29%),
    radial-gradient(circle at 50% 50%, transparent 0 47%, #9bd45d 49% 62%, transparent 64%),
    conic-gradient(from 210deg, #9bd45d, #7dd3fc, #4d48f5, #9bd45d);
}

.dh-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  cursor: pointer;
}

.dh-menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.dh-mainnav {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: var(--dh-bar);
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.dh-nav-btn {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  padding: 0 18px;
  cursor: pointer;
  white-space: nowrap;
}

.dh-nav-btn.is-active {
  color: var(--dh-text);
  background: #fff;
  border-radius: 8px 8px 0 0;
}

.dh-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.dh-session-chip {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.dh-icon-circle,
.dh-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.dh-avatar {
  border: 0;
  background: var(--dh-accent-soft);
  color: var(--dh-accent);
}

.dh-profile-menu {
  display: none;
  position: absolute;
  z-index: 40;
  top: 58px;
  right: 0;
  min-width: 260px;
  padding: 10px 0;
  background: var(--dh-card);
  border: 1px solid var(--dh-line);
  border-radius: var(--dh-radius);
  box-shadow: var(--dh-shadow);
}

.dh-profile-menu.is-open {
  display: block;
}

.dh-profile-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: var(--dh-card);
  padding: 14px 18px;
  color: var(--dh-text);
  text-align: left;
  cursor: pointer;
}

.dh-profile-menu button:hover {
  background: var(--dh-page);
}

.dh-main {
  flex: 1;
  padding-top: clamp(18px, 2vw, 28px);
}

.dh-content {
  width: min(1680px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.dh-muted {
  color: var(--dh-muted);
}

.dh-title-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  justify-content: space-between;
}

.dh-title-row > div:first-child {
  min-width: 0;
}

.dh-title-row h1 {
  margin-bottom: 16px;
}

.dh-title-actions {
  display: flex;
  align-self: flex-start;
  padding-top: 18px;
}

.dh-primary,
.dh-secondary {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}

.dh-primary {
  background: var(--dh-accent);
  color: #fff;
  border-radius: var(--dh-radius-pill);
  min-height: var(--dh-control-h);
  padding: 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 14px rgba(77, 72, 245, 0.2);
}

.dh-secondary {
  background: var(--dh-accent-soft);
  color: var(--dh-accent);
  border-radius: var(--dh-radius-pill);
  min-height: var(--dh-control-h);
  padding: 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dh-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.dh-service-grid--three {
  margin-bottom: 26px;
}

.dh-service-card {
  min-height: 214px;
  padding: 28px 30px;
  position: relative;
  background: var(--dh-card);
  border: 1px solid var(--dh-line);
  border-radius: var(--dh-radius);
}

.dh-service-card h2 {
  max-width: 70%;
}

.dh-service-card > p {
  max-width: 72%;
  color: var(--dh-muted);
}

.dh-service-card .dh-line-icon {
  position: absolute;
  right: 28px;
  top: 28px;
}

.dh-card-meta,
.dh-card-actions,
.dh-ch-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dh-card-meta {
  margin: 22px 0;
  color: var(--dh-muted);
}

.dh-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 4px;
  padding: 0 8px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
}

.dh-status.is-green {
  color: var(--dh-green);
  background: rgba(79, 172, 104, 0.12);
}

.dh-line-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  color: #8a8d94;
  position: relative;
}

.dh-line-icon::before,
.dh-line-icon::after {
  content: "";
  position: absolute;
  border: 3px solid currentColor;
}

.dh-line-icon::before {
  inset: 8px;
  border-radius: 12px;
  background: #eef3fb;
}

.dh-line-icon::after {
  width: 18px;
  height: 18px;
  right: 8px;
  bottom: 8px;
  border-radius: 6px;
  background: #fff;
}

.dh-line-icon[data-icon="hosting"]::before {
  border-radius: 16px;
}

.dh-line-icon[data-icon="hosting"]::after {
  width: 12px;
  height: 12px;
  left: 14px;
  top: 14px;
  right: auto;
  bottom: auto;
  border-radius: 50%;
  box-shadow: 22px 0 0 -3px #fff, 22px 0 0 0 currentColor, 11px 22px 0 -3px #fff, 11px 22px 0 0 currentColor;
}

.dh-line-icon[data-icon="bot"]::before,
.dh-line-icon[data-icon="domain"]::before,
.dh-line-icon[data-icon="cdn"]::before {
  border-radius: 50%;
}

.dh-line-icon[data-icon="bot"]::after {
  width: 34px;
  height: 24px;
  inset: 24px 19px;
  border-radius: 14px;
}

.dh-line-icon[data-icon="server"]::before {
  border-radius: 2px;
}

.dh-line-icon[data-icon="db-server"]::before {
  border-radius: 50%;
  inset: 18px 8px;
}

.dh-line-icon[data-icon="db-server"]::after {
  border-radius: 50%;
  top: 10px;
  left: 8px;
  right: 8px;
  height: 10px;
  bottom: auto;
}

.dh-line-icon[data-icon="llm-server"]::before {
  border-radius: 4px;
  inset: 10px;
  transform: rotate(45deg) scale(0.7);
}

.dh-line-icon[data-icon="llm-server"]::after {
  inset: 16px;
  border-radius: 50%;
  background: var(--dh-accent);
  border: none;
}

.dh-line-icon[data-icon="openclaw"]::before {
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle 3px at 50% 35%, var(--dh-accent) 100%, transparent 100%),
    linear-gradient(165deg, transparent 40%, var(--dh-accent) 40%, var(--dh-accent) 46%, transparent 46%),
    linear-gradient(180deg, transparent 40%, var(--dh-accent) 40%, var(--dh-accent) 46%, transparent 46%),
    linear-gradient(195deg, transparent 40%, var(--dh-accent) 40%, var(--dh-accent) 46%, transparent 46%);
}

.dh-line-icon[data-icon="openclaw"]::after {
  display: none;
}

.dh-ch-promo {
  background: linear-gradient(135deg, #0f1834 0%, #172144 55%, #1a3268 100%);
  border-radius: 16px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.dh-ch-promo::before {
  content: "";
  position: absolute;
  right: 160px;
  top: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(77, 72, 245, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.dh-ch-promo-badge {
  display: inline-block;
  background: rgba(77, 72, 245, 0.25);
  border: 1px solid rgba(77, 72, 245, 0.45);
  color: #a8a5ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.dh-ch-promo-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}

.dh-ch-promo-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 24px;
  line-height: 1.6;
  max-width: 460px;
}

.dh-ch-promo-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.dh-ch-promo-visual {
  flex-shrink: 0;
}

.dh-ch-visual-mockup {
  width: 200px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dh-ch-visual-bar {
  height: 8px;
  background: rgba(77, 72, 245, 0.7);
  border-radius: 4px;
  width: 65%;
}

.dh-ch-visual-row {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.dh-ch-visual-row--short {
  width: 42%;
}

.dh-ch-visual-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.dh-ch-visual-btn {
  height: 8px;
  width: 52px;
  background: rgba(77, 72, 245, 0.55);
  border-radius: 4px;
}

.dh-ch-visual-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: 40px;
}

.dh-ch-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dh-text);
  margin: 0 0 14px;
}

.dh-ch-grid-2,
.dh-ch-grid-4 {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.dh-ch-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.dh-ch-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.dh-ch-card {
  background: var(--dh-card);
  border: 1.5px solid var(--dh-line);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dh-ch-card-icon {
  margin-bottom: 8px;
}

.dh-ch-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--dh-text);
}

.dh-ch-card--sm .dh-ch-card-name {
  font-size: 14px;
}

.dh-ch-card-desc {
  font-size: 13px;
  color: var(--dh-muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.dh-ch-card-desc b {
  color: var(--dh-text);
  font-weight: 700;
}

.dh-ch-card-actions {
  margin-top: 10px;
}

.dh-footer {
  min-height: 64px;
  display: grid;
  align-items: center;
  padding: 0 clamp(18px, 3vw, 54px);
  color: var(--dh-muted);
}

.dh-footer span {
  justify-self: center;
}

.dh-feedback {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: var(--dh-radius);
  background: var(--dh-navy);
  color: #fff;
  padding: 16px 20px;
  box-shadow: var(--dh-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dh-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .dh-service-grid,
  .dh-ch-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .dh-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: auto;
    padding: 12px 18px;
    gap: 10px;
  }

  .dh-brand {
    min-width: 0;
    font-size: 22px;
  }

  .dh-brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dh-menu-toggle {
    display: inline-flex;
  }

  .dh-mainnav {
    grid-column: 1 / -1;
    height: auto;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    background: var(--dh-navy);
  }

  .dh-mainnav.is-open {
    max-height: 360px;
  }

  .dh-nav-btn {
    min-height: 42px;
    text-align: left;
  }

  .dh-nav-btn.is-active {
    border-radius: 8px;
  }

  .dh-session-chip {
    display: none;
  }

  .dh-content {
    width: auto;
    padding-inline: 18px;
    padding-top: 30px;
  }

  .dh-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dh-title-actions {
    padding-top: 0;
  }

  .dh-service-grid,
  .dh-ch-grid-2,
  .dh-ch-grid-4 {
    grid-template-columns: 1fr;
  }

  .dh-service-card h2,
  .dh-service-card > p {
    max-width: calc(100% - 78px);
  }

  .dh-service-card .dh-line-icon {
    width: 54px;
    height: 54px;
    position: absolute;
    top: 22px;
    right: 22px;
    margin: 0;
  }

  .dh-service-card {
    min-height: 232px;
    padding: 26px 30px;
  }

  .dh-ch-promo {
    padding: 28px 24px;
  }

  .dh-ch-promo-visual {
    display: none;
  }

  .dh-feedback {
    top: calc(var(--dh-bar) + 8px);
    right: 18px;
    bottom: auto;
    left: 18px;
    max-width: none;
  }

  .dh-footer span {
    justify-self: start;
  }
}
