/* Site chrome shared by the landing page, the policy pages and the legacy
   entry: tokens, type, header, buttons and footer. Landing sections live in
   home.css. */
@font-face {
  font-family: Inter;
  src: url('/_assets/dmsg/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
.dmsg-site {
  --ink: #10251f;
  --muted: #4e6257;
  --canvas: #f7f8f4;
  --line: #dae3d9;
  --action: #145c45;
  --pale: #e8f0e9;
  --accent: #a9d5bd;
  background: var(--canvas);
  color: var(--ink);
  font:
    16px/1.65 Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  min-height: 100dvh;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}
body:has(.dmsg-site) {
  margin: 0;
  background: #f7f8f4;
}
html:has(.dmsg-site) {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
.dmsg-site * {
  box-sizing: border-box;
}
.dmsg-site [hidden] {
  display: none !important;
}
.dmsg-site h1,
.dmsg-site h2,
.dmsg-site h3 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: -0.045em;
}
.dmsg-site h2 {
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 650;
}
.dmsg-site h3 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.dmsg-site p {
  margin: 0 0 20px;
  color: var(--muted);
}
.dmsg-site a {
  color: inherit;
  text-decoration: none;
}
.dmsg-site a:hover {
  color: var(--action);
}
.dmsg-site button,
.dmsg-site input {
  font: inherit;
}
.dmsg-site button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
.dmsg-site button,
.dmsg-site a,
.dmsg-site summary {
  touch-action: manipulation;
  transition:
    background 0.16s,
    color 0.16s,
    border-color 0.16s;
}
.dmsg-site :is(button, a, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 5px;
}
.dmsg-site img {
  display: block;
  max-width: 100%;
}
.dmsg-site .wrap {
  max-width: 1280px;
  margin: auto;
  padding: 0 48px;
}
.dmsg-site .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.dmsg-site .glyph {
  display: inline-block;
  flex-shrink: 0;
}
/* Arrows point along the reading direction. */
html[dir='rtl'] .dmsg-site :is(.glyph-arrow-right, .glyph-arrow-up-right) {
  scale: -1 1;
}
.dmsg-site .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  flex-shrink: 0;
}
.dmsg-site .brand-mark {
  width: 23px;
  height: 26px;
  fill: var(--action);
  overflow: visible;
}
/* The waiting request turns a quarter, like a key, under the pointer. */
.dmsg-site .brand-gem {
  fill: #b45309;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.3, 1.45, 0.5, 1);
}
.dmsg-site .brand:is(:hover, :focus-visible) .brand-gem {
  transform: rotate(90deg);
}
.dmsg-site .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 14px 20px;
  font-weight: 550;
  font-size: 15px;
  line-height: 1.4;
  min-height: 48px;
  text-align: center;
}
.dmsg-site .button.primary {
  background: var(--action);
  color: white;
}
.dmsg-site .button.primary:hover {
  background: #0d4433;
}
.dmsg-site .primary .icon {
  filter: brightness(0) invert(1);
}
.dmsg-site .button.secondary {
  border-color: #607566;
  background: white;
}
.dmsg-site .button.secondary:hover {
  background: var(--pale);
}
.dmsg-site .text-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--action);
  font-size: 15px;
  font-weight: 550;
  min-height: 44px;
  padding: 0;
}
.dmsg-site .text-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.dmsg-site .eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--action);
  font-weight: 650;
  line-height: 1.6;
}
.dmsg-site .section-label {
  margin-bottom: 22px;
}
.dmsg-site .rule {
  border-top: 1px solid var(--line);
}
.dmsg-site .section {
  padding: 88px 0;
}
.dmsg-site .small {
  font-size: 14px;
  line-height: 1.6;
}
.dmsg-site .skip {
  position: fixed;
  left: 12px;
  top: -80px;
  background: var(--ink);
  color: white;
  padding: 12px;
  z-index: 100;
}
.dmsg-site .skip:focus {
  top: 12px;
}
.dmsg-site .site-header {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.98);
  position: sticky;
  top: 0;
  z-index: 20;
}
.dmsg-site .nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.dmsg-site nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-inline-start: auto;
  font-size: 14px;
}
.dmsg-site nav a {
  padding: 12px 0;
  white-space: nowrap;
}
/* A compact action: 40px to fit the bar, with a 44px touch target. */
.dmsg-site .header-action {
  position: relative;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
}
.dmsg-site .header-action::after {
  content: '';
  position: absolute;
  inset: -2px 0;
}
.dmsg-site .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 8px;
  padding: 10px;
}
.dmsg-site .icon-button:hover {
  background: var(--pale);
}
.dmsg-site .icon-button.menu-toggle {
  display: none;
}
.dmsg-site .hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.dmsg-site .step-number {
  font:
    13px ui-monospace,
    monospace;
  color: var(--action);
  margin-bottom: 20px;
  display: block;
}
.dmsg-site code {
  font:
    13px/1.5 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.dmsg-site .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;
}
.dmsg-site .site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}
.dmsg-site .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}
.dmsg-site .footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.dmsg-site .footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (min-width: 1500px) {
  .dmsg-site .wrap {
    max-width: 1376px;
  }
}
@media (max-width: 1100px) {
  .dmsg-site .nav-wrap {
    gap: 18px;
  }
  .dmsg-site nav {
    gap: 18px;
  }
  .dmsg-site .header-action {
    font-size: 13px;
    padding: 8px 12px;
  }
}
@media (max-width: 1000px) {
  .dmsg-site .header-action {
    margin-inline-start: auto;
  }
  .dmsg-site .icon-button.menu-toggle {
    display: flex;
  }
  .dmsg-site .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .dmsg-site .site-header nav.open {
    display: flex;
  }
  .dmsg-site .wrap {
    padding: 0 32px;
  }
  .dmsg-site .section {
    padding: 72px 0;
  }
  .dmsg-site .hero-actions {
    gap: 12px;
  }
}
@media (max-width: 760px) {
  .dmsg-site .wrap {
    padding: 0 24px;
  }
  .dmsg-site .site-header {
    height: 56px;
  }
  .dmsg-site .brand {
    gap: 8px;
    font-size: 22px;
  }
  .dmsg-site .brand-mark {
    width: 21px;
    height: 24px;
  }
  .dmsg-site .nav-wrap {
    gap: 8px;
  }
  .dmsg-site .header-action {
    margin-inline-start: auto;
    font-size: 12px;
    padding: 8px 10px;
  }
  .dmsg-site .hero-actions {
    gap: 16px;
  }
  .dmsg-site .eyebrow {
    font-size: 11px;
  }
  .dmsg-site .section {
    padding: 56px 0;
  }
  .dmsg-site .footer-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .dmsg-site .footer-links {
    gap: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.dmsg-site) {
    scroll-behavior: auto;
  }
  .dmsg-site * {
    transition: none !important;
    animation: none !important;
  }
}

/* Marketing also remains scrollable after leaving the SPA archive. */
html:has(.dmsg-site):not(:has(.legacy-app)),
body:has(.dmsg-site):not(:has(.legacy-app)) {
  height: auto;
  overflow: visible;
}

@media (max-width: 600px) {
  .dmsg-site .header-action {
    display: none;
  }
  .dmsg-site .nav-wrap > .locale-picker {
    margin-inline-start: auto;
  }
}

@media (max-width: 360px) {
  .dmsg-site .nav-wrap {
    gap: 4px;
  }
}

/* The shared site stylesheet is prepended at build time. */
.dmsg-reading {
  margin: 0;
}
.dmsg-reading .reading-body {
  max-width: 850px;
  margin-inline: auto;
  padding: 48px 32px 80px;
  overflow-wrap: anywhere;
}
.dmsg-reading h1 {
  max-width: 720px;
  margin-block: 0 24px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 650;
}
.dmsg-reading h2 {
  margin-block: 48px 20px;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--line);
  font-size: 28px;
}
.dmsg-reading:lang(zh) :is(h1, h2) {
  letter-spacing: 0;
  line-height: 1.3;
}
.dmsg-reading a {
  color: var(--action);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dmsg-reading li {
  margin-block: 10px;
}
.dmsg-reading pre {
  overflow-x: auto;
  padding: 20px;
  background: var(--pale);
  border-radius: 8px;
}
.dmsg-reading code {
  font-size: 0.875em;
}
.dmsg-reading .reading-table {
  overflow-x: auto;
}
.dmsg-reading table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: start;
}
.dmsg-reading th,
.dmsg-reading td {
  padding: 12px;
  border-block-end: 1px solid var(--line);
  white-space: nowrap;
}
.dmsg-reading footer {
  margin-block-start: 40px;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 560px) {
  .dmsg-reading .reading-body {
    padding: 32px 24px 56px;
  }
}
