/*
 * LuminariMUD DG Scripts documentation
 * Editorial technical-documentation theme for docs/web/dg-scripts/.
 */

:root {
  --dg-ink: #071827;
  --dg-ink-raised: #0d2638;
  --dg-ink-rule: #294052;
  --dg-paper: #fbf7ef;
  --dg-paper-deep: #f3ede3;
  --dg-paper-code: #081b2b;
  --dg-text: #14212d;
  --dg-muted: #59636b;
  --dg-rule: #d8d0c4;
  --dg-rule-strong: #bdb3a5;
  --dg-red: #a8202e;
  --dg-red-dark: #7f1420;
  --dg-red-soft: #f7e9e7;
  --dg-teal: #16777c;
  --dg-teal-soft: #e3f0ee;
  --dg-gold: #bd8d32;
  --dg-code-text: #dceaf0;
  --dg-code-comment: #68b9bd;
  --dg-code-keyword: #f38a94;
  --dg-code-variable: #73d1cc;
  --dg-code-string: #d8d88a;
  --dg-shadow: 0 14px 34px rgba(7, 24, 39, 0.12);
  --dg-shadow-small: 0 5px 16px rgba(7, 24, 39, 0.1);
  --dg-content: 1180px;
  --dg-article: 790px;
  --dg-radius: 8px;
  --dg-header-height: 68px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--dg-header-height) + 28px);
}

body.dg-docs {
  margin: 0;
  background: var(--dg-paper);
  color: var(--dg-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

body.dg-docs::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(168, 32, 46, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(7, 24, 39, 0.014) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  pointer-events: none;
}

.dg-docs a {
  color: var(--dg-red-dark);
  text-decoration-color: rgba(168, 32, 46, 0.36);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dg-docs a:hover {
  color: var(--dg-red);
  text-decoration-color: currentColor;
}

.dg-docs a:focus-visible,
.dg-docs button:focus-visible,
.dg-docs input:focus-visible {
  outline: 3px solid rgba(22, 119, 124, 0.4);
  outline-offset: 3px;
}

.dg-docs h1,
.dg-docs h2,
.dg-docs h3,
.dg-docs h4 {
  color: var(--dg-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.13;
}

.dg-docs h1 {
  margin: 0 0 18px;
  font-size: clamp(2.8rem, 6vw, 5.7rem);
}

.dg-docs h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.2vw, 3rem);
}

.dg-docs h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.dg-docs h4 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.dg-docs p {
  margin: 0 0 1.1rem;
}

.dg-docs code,
.dg-docs pre,
.dg-docs kbd,
.dg-mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.dg-docs :not(pre) > code {
  border: 1px solid #ddd4c7;
  border-radius: 4px;
  background: #f2ece2;
  color: #76202a;
  padding: 0.08em 0.34em;
  font-size: 0.9em;
  white-space: nowrap;
}

.dg-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  transform: translateY(-160%);
  border-radius: 4px;
  background: var(--dg-paper);
  color: var(--dg-ink);
  padding: 10px 14px;
  font-weight: 700;
}

.dg-skip-link:focus {
  transform: translateY(0);
}

.dg-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--dg-header-height);
  border-bottom: 1px solid var(--dg-ink-rule);
  background: rgba(7, 24, 39, 0.98);
  box-shadow: 0 5px 22px rgba(7, 24, 39, 0.18);
}

.dg-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--dg-content));
  min-height: var(--dg-header-height);
  margin: 0 auto;
  gap: 28px;
}

.dg-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.dg-brand:hover {
  color: #fff;
  text-decoration: none;
}

.dg-brand svg {
  width: 26px;
  height: 26px;
  color: #fff;
}

.dg-brand__mud {
  color: #ef4454;
}

.dg-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 4px;
}

.dg-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #e6edf2;
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.dg-nav a::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  transform: scaleX(0);
  transform-origin: center;
  background: #ef4454;
  content: "";
  transition: transform 160ms ease;
}

.dg-nav a:hover,
.dg-nav a[aria-current="page"],
.dg-nav a[data-active="true"] {
  color: #fff;
}

.dg-nav a:hover::after,
.dg-nav a[aria-current="page"]::after,
.dg-nav a[data-active="true"]::after {
  transform: scaleX(1);
}

.dg-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #526474;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.dg-nav-toggle svg {
  width: 22px;
  height: 22px;
}

.dg-container {
  width: min(calc(100% - 40px), var(--dg-content));
  margin: 0 auto;
}

.dg-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(480px, 1.14fr);
  align-items: center;
  min-height: 680px;
  padding: 72px 0 58px;
  gap: clamp(40px, 7vw, 90px);
}

.dg-hero__statement {
  margin-bottom: 18px;
  color: var(--dg-red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
}

.dg-hero__intro {
  max-width: 590px;
  color: #2a3742;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.7;
}

.dg-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 30px;
  gap: 12px;
}

.dg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--dg-red);
  border-radius: 5px;
  background: var(--dg-red);
  color: #fff !important;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none !important;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.dg-button:hover {
  transform: translateY(-1px);
  border-color: var(--dg-red-dark);
  background: var(--dg-red-dark);
}

.dg-button--secondary {
  border-color: #8d969d;
  background: transparent;
  color: var(--dg-ink) !important;
}

.dg-button--secondary:hover {
  border-color: var(--dg-ink);
  background: rgba(7, 24, 39, 0.05);
}

.dg-pulse {
  display: flex;
  align-items: center;
  max-width: 430px;
  margin-top: 42px;
  color: var(--dg-red);
}

.dg-pulse__room {
  width: 28px;
  height: 28px;
  border: 1px dashed #91a0aa;
  border-radius: 4px;
}

.dg-pulse__line {
  position: relative;
  flex: 1;
  height: 1px;
  margin: 0 9px;
  background: repeating-linear-gradient(90deg, var(--dg-red) 0 5px, transparent 5px 9px);
}

.dg-pulse__line::after {
  position: absolute;
  top: 50%;
  left: 53%;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 2px solid var(--dg-red);
  background: var(--dg-paper);
  content: "";
}

.dg-section {
  padding: 72px 0;
  border-top: 1px solid var(--dg-rule);
}

.dg-section--deep {
  border-top-color: transparent;
  background: var(--dg-ink);
  color: #dce4e9;
}

.dg-section--deep h2,
.dg-section--deep h3,
.dg-section--deep h4 {
  color: #fff;
}

.dg-section--muted {
  background: var(--dg-paper-deep);
}

.dg-section__intro {
  max-width: 720px;
  margin-bottom: 36px;
  color: var(--dg-muted);
  font-size: 1.08rem;
}

.dg-section--deep .dg-section__intro {
  color: #aebdc7;
}

.dg-step-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
}

.dg-step {
  position: relative;
  min-width: 0;
  padding: 0 24px 0 0;
}

.dg-step:not(:last-child)::after {
  position: absolute;
  top: 16px;
  right: 10px;
  left: 44px;
  border-top: 1px dashed var(--dg-red);
  content: "";
}

.dg-step__number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--dg-red-dark);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.dg-step h3 {
  margin-top: 20px;
  color: var(--dg-red-dark);
  font-size: 1.1rem;
}

.dg-step p {
  color: var(--dg-muted);
  font-size: 0.91rem;
  line-height: 1.58;
}

.dg-step a {
  font-size: 0.84rem;
  font-weight: 750;
}

.dg-anatomy {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: clamp(36px, 7vw, 84px);
}

.dg-anatomy-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.dg-anatomy-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid var(--dg-rule);
  gap: 12px;
}

.dg-anatomy-list b {
  color: var(--dg-red-dark);
}

.dg-anatomy-list small {
  display: block;
  color: var(--dg-muted);
}

.dg-anatomy-key {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 3px;
  background: var(--dg-red-dark);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.dg-anatomy-list li:nth-child(even) .dg-anatomy-key {
  background: var(--dg-teal);
}

.dg-code {
  position: relative;
  overflow: hidden;
  border: 1px solid #243b4d;
  border-radius: var(--dg-radius);
  background: var(--dg-paper-code);
  box-shadow: var(--dg-shadow);
}

.dg-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-bottom: 1px solid #294052;
  background: #0b2031;
  color: #c4d1d9;
  padding: 8px 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  gap: 12px;
}

.dg-code__source {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dg-code pre {
  overflow-x: auto;
  max-width: 100%;
  margin: 0;
  padding: 24px;
  color: var(--dg-code-text);
  font-size: 0.88rem;
  line-height: 1.72;
  tab-size: 2;
}

.dg-code code {
  color: inherit;
  white-space: pre;
}

.dg-copy {
  flex: 0 0 auto;
  border: 1px solid #506576;
  border-radius: 4px;
  background: transparent;
  color: #e6eef2;
  padding: 5px 9px;
  font: inherit;
  cursor: pointer;
}

.dg-copy:hover {
  border-color: #8aa3b3;
  background: rgba(255, 255, 255, 0.06);
}

.dg-code .tok-comment {
  color: var(--dg-code-comment);
}

.dg-code .tok-keyword {
  color: var(--dg-code-keyword);
}

.dg-code .tok-var {
  color: var(--dg-code-variable);
}

.dg-code .tok-string {
  color: var(--dg-code-string);
}

.dg-reference-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 36px;
  border-top: 1px solid var(--dg-rule);
  border-bottom: 1px solid var(--dg-rule);
}

.dg-reference-group {
  min-width: 0;
  padding: 24px 22px 26px 0;
}

.dg-reference-group + .dg-reference-group {
  border-left: 1px solid var(--dg-rule);
  padding-left: 22px;
}

.dg-reference-group h3 {
  color: var(--dg-red-dark);
  font-size: 1.15rem;
}

.dg-reference-group:nth-child(3n + 1) h3 {
  color: var(--dg-teal);
}

.dg-reference-group ul {
  margin: 0 0 18px;
  padding: 0;
  color: var(--dg-muted);
  font-size: 0.9rem;
  list-style: none;
}

.dg-reference-group a {
  font-size: 0.84rem;
  font-weight: 750;
}

.dg-case-band {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(40px, 8vw, 100px);
}

.dg-zone-ledger {
  margin: 28px 0 0;
  border-top: 1px solid #365064;
}

.dg-zone-ledger div {
  display: grid;
  grid-template-columns: 132px 1fr;
  border-bottom: 1px solid #263e51;
  padding: 10px 0;
  gap: 14px;
}

.dg-zone-ledger dt {
  color: #7dc8c8;
  font-weight: 750;
}

.dg-zone-ledger dd {
  margin: 0;
  color: #f2f6f8;
}

.dg-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 18px;
  border: 1px solid #29475a;
  border-radius: var(--dg-radius);
  background:
    linear-gradient(rgba(10, 33, 50, 0.92), rgba(10, 33, 50, 0.92)),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(100, 185, 189, 0.08) 19px 20px);
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.18);
  gap: 28px 36px;
}

.dg-map::before,
.dg-map::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--dg-red);
  content: "";
  opacity: 0.65;
}

.dg-map::before {
  width: 2px;
  height: 72%;
  transform: translate(-1px, -50%);
}

.dg-map::after {
  width: 72%;
  height: 2px;
  transform: translate(-50%, -1px);
}

.dg-map__room {
  position: relative;
  z-index: 1;
  border: 1px dashed #77909f;
  border-radius: 3px;
  background: var(--dg-ink-raised);
  color: #bed0da;
  padding: 12px 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.79rem;
  text-align: center;
}

.dg-map__room--active {
  border-style: solid;
  border-color: #e34453;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(227, 68, 83, 0.12);
}

.dg-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
  border-top: 1px solid var(--dg-rule);
}

.dg-check {
  position: relative;
  padding: 26px 28px 20px 30px;
  border-bottom: 1px solid var(--dg-rule);
}

.dg-check:nth-child(3n + 2),
.dg-check:nth-child(3n + 3) {
  border-left: 1px solid var(--dg-rule);
}

.dg-check::before {
  position: absolute;
  top: 30px;
  left: 5px;
  width: 14px;
  height: 14px;
  border: 1px solid var(--dg-teal);
  border-radius: 50%;
  content: "";
}

.dg-check::after {
  position: absolute;
  top: 33px;
  left: 9px;
  width: 5px;
  height: 3px;
  transform: rotate(-45deg);
  border-bottom: 1px solid var(--dg-teal);
  border-left: 1px solid var(--dg-teal);
  content: "";
}

.dg-check h3 {
  font-size: 1.05rem;
}

.dg-check p {
  color: var(--dg-muted);
  font-size: 0.89rem;
}

.dg-site-footer {
  border-top: 1px solid var(--dg-ink-rule);
  background: var(--dg-ink);
  color: #b9c5cc;
  padding: 50px 0 34px;
}

.dg-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}

.dg-site-footer h2,
.dg-site-footer h3 {
  color: #fff;
}

.dg-site-footer h3 {
  margin-bottom: 13px;
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dg-site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-site-footer li {
  margin: 7px 0;
}

.dg-site-footer a {
  color: #dce5ea;
  font-size: 0.89rem;
  text-decoration: none;
}

.dg-site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.dg-footer-note {
  margin-top: 13px;
  color: #94a4ae;
  font-size: 0.86rem;
}

.dg-footer-bottom {
  margin-top: 38px;
  border-top: 1px solid #263e51;
  padding-top: 22px;
  color: #8799a5;
  font-size: 0.78rem;
}

/* Article layout */
.dg-article-shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  align-items: start;
  width: min(calc(100% - 40px), var(--dg-content));
  min-height: calc(100vh - var(--dg-header-height));
  margin: 0 auto;
  gap: clamp(34px, 5vw, 62px);
}

.dg-sidebar {
  position: sticky;
  top: calc(var(--dg-header-height) + 28px);
  max-height: calc(100vh - var(--dg-header-height) - 56px);
  overflow-y: auto;
  padding: 48px 30px 48px 0;
  border-right: 1px solid var(--dg-rule);
  scrollbar-width: thin;
}

.dg-sidebar__label {
  display: block;
  margin-bottom: 14px;
  color: var(--dg-red-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dg-sidebar nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-sidebar nav li {
  margin: 2px 0;
}

.dg-sidebar nav a {
  position: relative;
  display: block;
  border-left: 2px solid transparent;
  color: #273743;
  padding: 8px 8px 8px 14px;
  font-size: 0.86rem;
  font-weight: 620;
  text-decoration: none;
}

.dg-sidebar nav a:hover,
.dg-sidebar nav a[aria-current="location"] {
  border-left-color: var(--dg-red);
  color: var(--dg-red-dark);
  background: linear-gradient(90deg, rgba(168, 32, 46, 0.06), transparent);
}

.dg-sidebar__section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--dg-rule);
}

.dg-article {
  min-width: 0;
  max-width: var(--dg-article);
  padding: 46px 0 80px;
}

.dg-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  color: var(--dg-muted);
  font-size: 0.82rem;
  gap: 8px;
}

.dg-breadcrumb a {
  font-weight: 700;
  text-decoration: none;
}

.dg-article h1 {
  font-size: clamp(2.7rem, 5vw, 4.6rem);
}

.dg-article__lede {
  max-width: 720px;
  margin-bottom: 34px;
  color: #34434e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.55;
}

.dg-article-section {
  margin-top: 54px;
  padding-top: 42px;
  border-top: 1px solid var(--dg-rule);
}

.dg-article-section > h2,
.dg-article-section > h3 {
  scroll-margin-top: calc(var(--dg-header-height) + 24px);
}

.dg-provenance {
  display: flex;
  align-items: flex-start;
  margin: 28px 0;
  border-left: 3px solid var(--dg-teal);
  background: var(--dg-teal-soft);
  color: #23464a;
  padding: 14px 18px;
  font-size: 0.86rem;
  gap: 10px;
}

.dg-provenance strong {
  color: #0e5559;
}

.dg-callout {
  margin: 28px 0;
  border: 1px solid #d6b2b4;
  border-radius: 6px;
  background: var(--dg-red-soft);
  padding: 18px 20px;
}

.dg-callout--info {
  border-color: #a9cbca;
  background: var(--dg-teal-soft);
}

.dg-callout--dark {
  border-color: #2d495d;
  background: var(--dg-ink);
  color: #d8e2e7;
}

.dg-callout h3,
.dg-callout h4 {
  color: var(--dg-red-dark);
}

.dg-callout--info h3,
.dg-callout--info h4 {
  color: #0f5e62;
}

.dg-callout--dark h3,
.dg-callout--dark h4 {
  color: #fff;
}

.dg-callout > :last-child {
  margin-bottom: 0;
}

.dg-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 24px 0 34px;
  border-top: 1px solid var(--dg-rule-strong);
  border-bottom: 1px solid var(--dg-rule-strong);
}

.dg-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: transparent;
  font-size: 0.88rem;
}

.dg-table th,
.dg-table td {
  vertical-align: top;
  border-bottom: 1px solid var(--dg-rule);
  padding: 12px 14px;
  text-align: left;
}

.dg-table th {
  background: rgba(216, 208, 196, 0.22);
  color: var(--dg-red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.93rem;
}

.dg-table td:first-child {
  color: #6f1923;
  font-weight: 750;
}

.dg-table tr:last-child td {
  border-bottom: 0;
}

.dg-table tbody tr:hover {
  background: rgba(22, 119, 124, 0.045);
}

.dg-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 28px 0 20px;
  border: 1px solid var(--dg-rule-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.35);
  padding: 6px 8px 6px 14px;
  gap: 10px;
}

.dg-filter input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--dg-text);
  padding: 9px 0;
  font: inherit;
}

.dg-filter input:focus {
  outline: 0;
}

.dg-filter__count {
  color: var(--dg-muted);
  padding: 0 7px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.dg-field-cloud {
  display: flex;
  flex-wrap: wrap;
  margin: 18px 0 30px;
  gap: 7px;
}

.dg-field {
  border: 1px solid var(--dg-rule);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.42);
  color: #243743;
  padding: 6px 9px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
}

.dg-field[data-hidden="true"],
.dg-reference-row[data-hidden="true"] {
  display: none;
}

.dg-syntax-list {
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.dg-syntax-list li {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  padding: 13px 0;
  border-bottom: 1px solid var(--dg-rule);
  gap: 22px;
}

.dg-syntax-list code {
  white-space: normal !important;
}

.dg-syntax-list span {
  color: var(--dg-muted);
  font-size: 0.9rem;
}

.dg-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--dg-rule);
  border-bottom: 1px solid var(--dg-rule);
}

.dg-related a {
  display: block;
  min-width: 0;
  padding: 22px 22px 22px 0;
  text-decoration: none;
}

.dg-related a + a {
  border-left: 1px solid var(--dg-rule);
  padding-left: 22px;
}

.dg-related strong {
  display: block;
  margin-bottom: 5px;
  color: var(--dg-teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
}

.dg-related span {
  color: var(--dg-muted);
  font-size: 0.82rem;
}

.dg-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 46px;
  border: 1px solid var(--dg-rule);
  border-radius: 5px;
}

.dg-article-nav a {
  display: block;
  padding: 16px 20px;
  text-decoration: none;
}

.dg-article-nav a + a {
  border-left: 1px solid var(--dg-rule);
  text-align: right;
}

.dg-article-nav small {
  display: block;
  color: var(--dg-muted);
}

.dg-article-nav strong {
  display: block;
  margin-top: 2px;
  color: var(--dg-red-dark);
  font-family: Georgia, "Times New Roman", serif;
}

.dg-fact-ledger {
  margin: 28px 0 42px;
  border-top: 1px solid var(--dg-rule-strong);
}

.dg-fact-ledger div {
  display: grid;
  grid-template-columns: 145px 1fr;
  border-bottom: 1px solid var(--dg-rule);
  padding: 9px 10px;
  gap: 18px;
}

.dg-fact-ledger dt {
  color: var(--dg-red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.dg-fact-ledger dd {
  margin: 0;
}

.dg-pattern {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(230px, 0.85fr);
  align-items: start;
  gap: 34px;
}

.dg-pattern-notes {
  border-top: 1px solid var(--dg-rule);
}

.dg-pattern-notes div {
  border-bottom: 1px solid var(--dg-rule);
  padding: 14px 0;
}

.dg-pattern-notes dt {
  color: var(--dg-red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.dg-pattern-notes dd {
  margin: 5px 0 0;
  color: var(--dg-muted);
  font-size: 0.88rem;
}

.dg-flow {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  margin: 24px 0 34px;
  border-radius: var(--dg-radius);
  background: var(--dg-ink);
  padding: 25px;
  color: #dce7ec;
  gap: 34px;
}

.dg-flow__node {
  position: relative;
  flex: 1 0 150px;
  border: 1px solid #496173;
  border-radius: 4px;
  background: var(--dg-ink-raised);
  padding: 15px;
  text-align: center;
}

.dg-flow__node:not(:last-child)::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  width: 18px;
  border-top: 1px dashed #63b1b5;
  content: "";
}

.dg-flow__node strong {
  display: block;
  color: #fff;
}

.dg-flow__node small {
  display: block;
  margin-top: 5px;
  color: #7dc8c8;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.dg-checklist {
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.dg-checklist li {
  position: relative;
  margin: 9px 0;
  padding-left: 27px;
}

.dg-checklist li::before {
  position: absolute;
  top: 0.2em;
  left: 2px;
  width: 7px;
  height: 12px;
  transform: rotate(42deg);
  border-right: 2px solid var(--dg-red);
  border-bottom: 2px solid var(--dg-red);
  content: "";
}

.dg-source-list {
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.dg-source-list li {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
  border-bottom: 1px solid var(--dg-rule);
  padding: 12px 0;
  gap: 20px;
}

.dg-source-list code {
  white-space: normal !important;
}

.dg-source-list span {
  color: var(--dg-muted);
  font-size: 0.88rem;
}

.dg-hidden {
  display: none !important;
}

.dg-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  border: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

@media (max-width: 1050px) {
  .dg-nav a {
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .dg-nav a::after {
    right: 8px;
    left: 8px;
  }

  .dg-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 58px;
  }

  .dg-hero__copy {
    max-width: 760px;
  }

  .dg-reference-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dg-reference-group:nth-child(4) {
    border-left: 0;
    padding-left: 0;
  }

  .dg-reference-group:nth-child(n + 4) {
    border-top: 1px solid var(--dg-rule);
  }
}

@media (max-width: 820px) {
  :root {
    --dg-header-height: 62px;
  }

  .dg-site-header__inner,
  .dg-container,
  .dg-article-shell {
    width: min(calc(100% - 28px), var(--dg-content));
  }

  .dg-nav-toggle {
    display: inline-flex;
  }

  .dg-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-self: auto;
    border-top: 1px solid #2a4052;
    border-bottom: 1px solid #2a4052;
    background: var(--dg-ink);
    padding: 8px 14px 14px;
    box-shadow: 0 12px 24px rgba(7, 24, 39, 0.22);
  }

  .dg-nav[data-open="true"] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .dg-nav a {
    min-height: 44px;
    padding: 8px 12px;
  }

  .dg-nav a::after {
    right: 12px;
    left: 12px;
  }

  .dg-step-rail {
    grid-template-columns: 1fr;
  }

  .dg-step {
    min-height: 112px;
    padding: 0 0 18px 54px;
  }

  .dg-step:not(:last-child)::after {
    top: 36px;
    right: auto;
    bottom: 0;
    left: 16px;
    height: calc(100% - 35px);
    border-top: 0;
    border-left: 1px dashed var(--dg-red);
  }

  .dg-step__number {
    position: absolute;
    top: 0;
    left: 0;
  }

  .dg-step h3 {
    margin-top: 0;
  }

  .dg-anatomy,
  .dg-case-band,
  .dg-pattern {
    grid-template-columns: 1fr;
  }

  .dg-reference-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dg-reference-group:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .dg-reference-group:nth-child(even) {
    border-left: 1px solid var(--dg-rule);
    padding-left: 22px;
  }

  .dg-reference-group:nth-child(n + 3) {
    border-top: 1px solid var(--dg-rule);
  }

  .dg-check-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dg-check:nth-child(n) {
    border-left: 0;
  }

  .dg-check:nth-child(even) {
    border-left: 1px solid var(--dg-rule);
  }

  .dg-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dg-article-shell {
    display: block;
  }

  .dg-sidebar {
    position: static;
    max-height: none;
    margin: 22px 0 0;
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--dg-rule);
  }

  .dg-sidebar nav ul {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 3px;
  }

  .dg-sidebar nav li {
    flex: 0 0 auto;
  }

  .dg-sidebar nav a {
    border-bottom: 2px solid transparent;
    border-left: 0;
    padding: 7px 10px;
  }

  .dg-sidebar nav a:hover,
  .dg-sidebar nav a[aria-current="location"] {
    border-bottom-color: var(--dg-red);
    border-left-color: transparent;
    background: transparent;
  }

  .dg-sidebar__section {
    display: none;
  }

  .dg-article {
    max-width: none;
    padding-top: 34px;
  }
}

@media (max-width: 560px) {
  body.dg-docs {
    font-size: 15px;
  }

  .dg-docs :not(pre) > code {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .dg-brand {
    font-size: 1.08rem;
  }

  .dg-brand svg {
    width: 22px;
    height: 22px;
  }

  .dg-hero {
    padding: 42px 0;
  }

  .dg-hero h1 {
    font-size: 3.3rem;
  }

  .dg-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dg-button {
    width: 100%;
  }

  .dg-section {
    padding: 52px 0;
  }

  .dg-reference-grid,
  .dg-check-grid,
  .dg-footer-grid,
  .dg-related,
  .dg-article-nav {
    grid-template-columns: 1fr;
  }

  .dg-reference-group:nth-child(n),
  .dg-check:nth-child(n),
  .dg-related a + a,
  .dg-article-nav a + a {
    border-left: 0;
    padding-left: 0;
  }

  .dg-reference-group:nth-child(n + 2),
  .dg-related a + a,
  .dg-article-nav a + a {
    border-top: 1px solid var(--dg-rule);
  }

  .dg-article-nav a + a {
    text-align: left;
  }

  .dg-code pre {
    padding: 18px;
    font-size: 0.8rem;
  }

  .dg-syntax-list li,
  .dg-source-list li {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .dg-fact-ledger div,
  .dg-zone-ledger div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .dg-filter {
    grid-template-columns: 1fr;
  }

  .dg-filter__count {
    padding-bottom: 7px;
  }
}

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

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

@media print {
  .dg-site-header,
  .dg-sidebar,
  .dg-site-footer,
  .dg-copy,
  .dg-filter,
  .dg-article-nav {
    display: none !important;
  }

  body.dg-docs {
    background: #fff;
    color: #000;
  }

  body.dg-docs::before {
    display: none;
  }

  .dg-article-shell,
  .dg-article,
  .dg-container {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .dg-code {
    border-color: #444;
    box-shadow: none;
    break-inside: avoid;
  }

  .dg-code pre {
    overflow: visible;
    white-space: pre-wrap;
  }

  .dg-table-wrap {
    overflow: visible;
  }

  .dg-table {
    min-width: 0;
  }
}
