/* ============================================================
   DG Brand CSS — Site-wide Digital Grease visual layer
   Replaces styles.css + components.css for DG pages.
   ============================================================ */

/* ── Variables & Reset ── */
:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-variant: #eeeeee;
  --ink: #1a1a1a;
  --ink-muted: #666666;
  --primary: #0793FF;
  --secondary: #33cc77;
  --accent: #f5a623;
  --border: #dddddd;
  --shadow: rgba(0,0,0,0.1);
  --highlight: #ffffff;
  --bg-rgb: 255,255,255;
  --nav-height: 60px;
}

.dark-mode {
  --bg: #1e1e1e;
  --surface: #2a2a2a;
  --surface-variant: #383838;
  --ink: #ffffff;
  --ink-muted: #b7c6e0;
  --primary: #0793ff;
  --secondary: #33cc77;
  --accent: #f5a623;
  --border: #3a3a3a;
  --shadow: rgba(0,0,0,0.5);
  --highlight: #b7c6e0;
  --bg-rgb: 45,45,45;
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; scroll-behavior: smooth; overflow-y: scroll; scrollbar-gutter: stable; }
html:has(.overlay-shell.is-open) { overflow-y: hidden; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  position: relative;
}

/* ── Graph Paper Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(7,147,255,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,147,255,0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

/* ── Links ── */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Full-Width Page Layout ── */
.dg-page {
  position: relative;
  z-index: 1;
}

/* Sub-pages get top padding for fixed nav */
.dg-page:not(.home-page) {
  padding-top: var(--nav-height);
}

.dg-page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  position: relative;
  z-index: 1;
  font-size: 1.35em;
  line-height: 1.6;
  min-height: calc(100vh - var(--nav-height) - 3rem);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.dg-page-content.content-ready {
  opacity: 1;
}

/* ── Nav Component ── */
.dg-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.dg-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 100%;
}

.dg-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.dg-nav__brand:hover { text-decoration: none; opacity: 0.85; }

.dg-nav__logo {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* Nav logo: CSS glow for the <img> nav icon in dark mode.
   The main homepage SVG logo uses SVG-native <filter> in logo.js instead. */
.dark-mode .dg-nav__logo {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15))
         drop-shadow(0 0 10px rgba(245, 166, 35, 0.3))
         drop-shadow(0 0 3px rgba(245, 166, 35, 0.2));
}

.dg-nav__name {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.dg-nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dg-nav__links a {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.25rem 0;
  position: relative;
}
.dg-nav__links a:hover,
.dg-nav__links a.active {
  color: var(--ink);
  text-decoration: none;
}
.dg-nav__links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Active page underline indicator */
.dg-nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.dg-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}

/* Hamburger icon */
.dg-nav__hamburger,
.dg-nav__hamburger::before,
.dg-nav__hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: all 0.25s ease;
}
.dg-nav__hamburger {
  position: relative;
}
.dg-nav__hamburger::before,
.dg-nav__hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.dg-nav__hamburger::before { top: -6px; }
.dg-nav__hamburger::after { top: 6px; }

/* Hamburger open state */
.dg-nav--open .dg-nav__hamburger {
  background: transparent;
}
.dg-nav--open .dg-nav__hamburger::before {
  top: 0;
  transform: rotate(45deg);
}
.dg-nav--open .dg-nav__hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Nav theme toggle wrapper (positions the mode label) */
.dg-nav__theme-wrap {
  position: relative;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.dg-nav__theme-toggle {}

/* Nav solidifies on scroll (all pages) */
.dg-nav--scrolled {
  background: rgba(var(--bg-rgb), 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px var(--shadow);
}

/* ── Footer (single-line minimal) ── */
.dg-footer {
  position: relative;
  z-index: 1;
  padding: 0.75rem 2rem;
}
.dg-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.dg-footer__copyright { opacity: 0.7; }
.dg-footer__sep { opacity: 0.4; }
.dg-footer__email {
  color: var(--primary);
  text-decoration: none;
}
.dg-footer__email:hover { text-decoration: underline; }
.dg-footer__privacy {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.dg-footer__privacy:hover { color: var(--ink); }

/* ── Buttons ── */
.btn {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  border: none;
}
.btn--primary {
  background: var(--secondary);
  color: #fff;
}
.btn--primary:hover {
  background: #2bb866;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--ghost {
  background: rgba(var(--bg-rgb), 0.5);
  color: var(--ink);
  border: 2px solid var(--primary);
}
.btn--ghost:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-cta {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 1.6rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-cta:hover {
  background: #2bb866;
  color: #fff;
  text-decoration: none;
}

/* ── CTA Card (used by about.js, services.js) ── */
.cta-card {
  text-align: center;
  background: var(--surface-variant);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem auto 0;
  max-width: 80%;
}
.cta-card__heading {
  color: var(--primary);
  font-size: 1.8em;
  margin: 0 0 1rem 0;
}
.cta-card__message {
  color: var(--secondary);
  margin: 0 0 1.5rem 0;
  font-size: 1.1em;
}
.cta-card__button {
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1em;
  font-family: inherit;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.cta-card__button:hover {
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--ink-muted);
}

/* ── Font-size Reset for DG-native pages ──
   Shared .dg-page-content has font-size: 1.35em from modal era.
   DG-native renderers use proportional sizing, so reset to 1rem. */
.dg-page.about-page .dg-page-content,
.dg-page.services-page .dg-page-content,
.dg-page.service-detail-page .dg-page-content,
.dg-page.faq-page .dg-page-content,
.dg-page.insights-page .dg-page-content {
  font-size: 1rem;
}

/* Page backgrounds */
.dg-page.about-page,
.dg-page.services-page,
.dg-page.service-detail-page,
.dg-page.faq-page,
.dg-page.insights-page {
  background: var(--bg);
}

/* ── Contact Modal Overrides ──
   Contact modal still uses shared components.js/contact.js DOM.
   These overrides match DG design language. */
.dg-page .contact-submit {
  background: var(--secondary);
  color: #fff;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  border: none;
}
.dg-page .contact-submit:hover {
  background: #2bb866;
  color: #fff;
}

.dg-page .contact-service-chip {
  background: rgba(51, 204, 119, 0.08);
  border: 1.5px solid rgba(51, 204, 119, 0.25);
  border-radius: 20px;
  color: var(--secondary);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}
.dg-page .contact-service-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.dg-page .contact-service-chip.selected {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

/* Contact modal — DG design language overrides */
.dg-page .contact-modal {
  font-size: 1rem;
  background: var(--bg);
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 2rem);
}
.dg-page .contact-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(7,147,255,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,147,255,0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}
.dg-page .contact-header-image {
  display: none;
}
.dg-page .contact-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 2.4em;
  color: var(--ink);
}

/* Modal watermarks — bottom-right, opposite page watermarks (top-right) */
.dg-page .contact-modal::after,
#privacy-overlay .modal-shell::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: clamp(180px, 25vw, 300px);
  height: clamp(180px, 25vw, 300px);
  opacity: 0.10;
  pointer-events: none;
  z-index: -1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.dg-page .contact-modal::after {
  background-image: url('../assets/ui/watermarks/blue-gear.svg');
}
#privacy-overlay .modal-shell::after {
  background-image: url('../assets/ui/watermarks/green-gear.svg');
}

/* Success notification — DG design language */
.dg-page .contact-success-notification {
  background: var(--bg);
  border: none;
  border-radius: 16px;
  isolation: isolate;
  overflow: hidden;
  position: relative;
}
.dg-page .contact-success-notification::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(7,147,255,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,147,255,0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}
.dg-page .contact-success-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 1.6em;
  color: var(--ink);
}

/* Lighter field backgrounds for readability */
.dg-page .contact-field-input,
.dg-page .contact-field-select,
.dg-page .contact-textarea {
  background: var(--surface);
}
.dg-page .contact-subtitle {
  font-size: 1rem;
  color: var(--ink-muted);
}
.dg-page .contact-section-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.dg-page .contact-field-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ── Page Watermark Accents ──
   Large decorative SVGs in the top-right, nearly transparent.
   Uses proper logo SVGs as background-image (not mask). */
.dg-page.about-page .dg-page-content,
.dg-page.services-page .dg-page-content,
.dg-page.service-detail-page .dg-page-content,
.dg-page.faq-page .dg-page-content,
.dg-page.insights-page .dg-page-content {
  position: relative;
}

.dg-page.about-page .dg-page-content::after,
.dg-page.services-page .dg-page-content::after,
.dg-page.service-detail-page .dg-page-content::after,
.dg-page.faq-page .dg-page-content::after,
.dg-page.insights-page .dg-page-content::after {
  content: '';
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 0;
  width: clamp(350px, 40vw, 600px);
  height: clamp(350px, 40vw, 600px);
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* About → grease drop */
.dg-page.about-page .dg-page-content::after {
  background-image: url('../assets/ui/watermarks/grease-drop.svg');
}

/* Services index → blue gear */
.dg-page.services-page .dg-page-content::after {
  background-image: url('../assets/ui/watermarks/blue-gear.svg');
}

/* FAQ → green gear */
.dg-page.faq-page .dg-page-content::after {
  background-image: url('../assets/ui/watermarks/green-gear.svg');
}

/* Service detail → grease drop */
.dg-page.service-detail-page .dg-page-content::after {
  background-image: url('../assets/ui/watermarks/grease-drop.svg');
}

/* Insights → grease drop */
.dg-page.insights-page .dg-page-content::after {
  background-image: url('../assets/ui/watermarks/grease-drop.svg');
}

/* ════════════════════════════════════════════════════
   DG-Native Component Classes
   Generated by dg-about.js, dg-services.js, dg-faq.js
   ════════════════════════════════════════════════════ */

/* ── Section + Divider ── */
.dg-section { margin-bottom: 2rem; }

.dg-section__divider {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--ink-muted));
  margin: 2.5rem auto 1.5rem;
}

.dg-section__body { max-width: 800px; }
.dg-section__body p { margin: 0 0 1em; line-height: 1.7; }
.dg-section__body p:last-child { margin-bottom: 0; }

/* ── Headings ── */
.dg-heading {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
.dg-heading--xl { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.dg-heading--lg { font-size: clamp(1.4rem, 3vw, 2rem); }
.dg-heading--md { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

/* ── Subtext ── */
.dg-subtext {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.dg-subtext p { margin: 0 0 0.5em; }

/* ── List with colored bullets ── */
.dg-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.dg-list li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.6;
}
.dg-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bullet-color, var(--primary));
}

/* ── Quote ── */
.dg-quote {
  position: relative;
  padding: 1.5rem 0 1.5rem 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid var(--quote-color, var(--primary));
}
.dg-quote blockquote {
  margin: 0;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink);
}
.dg-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-style: normal;
}

/* ── Insights Page ── */
.dg-insights__cloud {
  margin: 2rem 0;
  text-align: center;
  background: var(--bg);
  border: 3px solid var(--surface-variant, var(--border));
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.08));
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  position: relative;
  z-index: 2;
}
.dg-insights__cloud:hover {
  box-shadow: 0 4px 20px var(--shadow, rgba(0, 0, 0, 0.18));
}
.dg-insights__cloud-img {
  max-width: 100%;
  height: auto;
  display: block;
}
.dark-mode .dg-insights__cloud {
  background: var(--surface);
}
.dark-mode .dg-insights__cloud-img {
  filter: invert(1) hue-rotate(180deg);
}
/* Lightbox for enlarged word cloud */
.dg-insights__lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.dg-insights__lightbox--visible {
  opacity: 1;
}
.dg-insights__lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.dg-insights__sub {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 1.5rem;
}
/* Expandable details (methodology) */
.dg-insights__details {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.dg-insights__summary {
  padding: 1rem 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  list-style: none;
}
.dg-insights__summary::-webkit-details-marker { display: none; }
.dg-insights__summary::before {
  content: '\25B6';
  display: inline-block;
  margin-right: 0.75rem;
  font-size: 0.7rem;
  transition: transform 0.2s;
  color: var(--ink-muted);
}
.dg-insights__details[open] > .dg-insights__summary::before {
  transform: rotate(90deg);
}
.dg-insights__details-body {
  padding: 1rem 1.5rem 1.5rem;
  background: var(--surface);
}
.dg-insights__details-body p {
  color: var(--ink-muted);
  line-height: 1.7;
}
/* Methodology section headings */
.dg-insights__method-heading {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
  letter-spacing: 0.02em;
}
.dg-insights__method-heading:first-child { margin-top: 0.5rem; }
/* Rules block */
.dg-insights__rules {
  margin: 1.25rem 0 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.dg-insights__rules-heading {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dg-insights__rules .dg-insights__list { margin: 0; }
.dg-insights__rules .dg-insights__list li { font-size: 0.9rem; }

/* ── VS Code Editor Block ── */
.code-editor {
  margin: 1.25rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink-muted) 50%, transparent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  position: relative;
  z-index: 1;
}
.code-editor__tab-bar {
  background: #252526;
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: 1px solid #1e1e1e;
}
.code-editor__tab {
  padding: 0.5rem 1rem 0.45rem;
  font-size: 0.78rem;
  color: #969696;
  background: #2d2d2d;
  border-right: 1px solid #1e1e1e;
}
.code-editor__tab--active {
  color: #d4d4d4;
  background: #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
}
.code-editor__body {
  background: #1e1e1e;
  padding: 0.75rem 0;
  overflow-x: auto;
}
.code-editor__pre {
  margin: 0;
  background: transparent;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #d4d4d4;
  tab-size: 2;
}
.code-editor__pre code {
  display: block;
  font-family: inherit;
}
.code-editor__line {
  display: block;
  padding: 0 1rem 0 4rem;
  text-indent: -4rem;
  min-height: 1.65em;
}
.code-editor__line:hover {
  background: rgba(255, 255, 255, 0.04);
}
.code-editor__gutter {
  display: inline-block;
  width: 3rem;
  text-align: right;
  padding-right: 1rem;
  color: #505050;
  user-select: none;
  -webkit-user-select: none;
}
/* Syntax highlighting — markdown flavor */
.ce-heading { color: #569cd6; font-weight: 700; }
.ce-bold { color: #ce9178; }
.ce-placeholder { color: #9cdcfe; font-style: italic; }
.ce-comment { color: #6a9955; }
/* Full session entries */
.dg-insights__entry {
  margin: 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.dg-insights__entry-summary {
  padding: 1rem 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  list-style: none;
}
.dg-insights__entry-summary::-webkit-details-marker { display: none; }
.dg-insights__entry-summary::before {
  content: '\25B6';
  display: inline-block;
  margin-right: 0.75rem;
  font-size: 0.7rem;
  transition: transform 0.2s;
  color: var(--ink-muted);
}
.dg-insights__entry[open] > .dg-insights__entry-summary::before {
  transform: rotate(90deg);
}
.dg-insights__entry-body {
  padding: 0.5rem 1.5rem 1.5rem;
  background: var(--surface);
}
.dg-insights__cat-heading {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 1.25rem 0 0.5rem;
}
.dg-insights__cat-heading--lg {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
}
.dg-insights__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dg-insights__list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.65;
  color: var(--ink);
}
.dg-insights__list li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--ink-muted);
}
/* Highlight session tags */
.dg-insights__session-tag {
  display: inline-block;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--ink-muted);
  background: var(--surface);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.25rem;
  vertical-align: baseline;
}
/* Back link */
.dg-insights__back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.dg-insights__back-link {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  text-decoration: none;
}
.dg-insights__back-link:hover {
  text-decoration: underline;
}

/* ── Insights Floating Bubble (About page) ── */
.dg-insights-bubble {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: var(--ink);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  z-index: 100;
  opacity: 0;
  transform: translateY(1.5rem);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease,
              padding 0.5s ease, border-radius 0.5s ease;
}
/* Visible state (triggered by scroll) */
.dg-insights-bubble--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Phase 2: arrived — throb to say "this is it" */
.dg-insights-bubble--arrived {
  border-color: var(--accent);
  animation: bubble-throb 1.2s ease-in-out 3;
}
@keyframes bubble-throb {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0), 0 4px 24px rgba(0, 0, 0, 0.15);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(245, 166, 35, 0.2), 0 4px 24px rgba(0, 0, 0, 0.15);
  }
}
/* Phase 3: fade out — job done */
.dg-insights-bubble--fading {
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
/* Hover */
.dg-insights-bubble:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.2);
}
/* Icon: grease drop SVG */
.dg-insights-bubble__icon {
  height: 36px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  transition: filter 0.3s ease;
}
/* Text */
.dg-insights-bubble__text {
  white-space: nowrap;
  transition: opacity 0.4s ease, width 0.5s ease;
}
/* Arrow (replaces grease drop in Phase 2) */
.dg-insights-bubble__arrow {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
}
/* Dark mode glow on grease drop */
.dark-mode .dg-insights-bubble__icon {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15))
         drop-shadow(0 0 10px rgba(245, 166, 35, 0.3))
         drop-shadow(0 0 3px rgba(245, 166, 35, 0.2));
}
.dark-mode .dg-insights-bubble {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
/* Mobile */
@media (max-width: 600px) {
  .dg-insights-bubble {
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
  }
  .dg-insights-bubble__icon { height: 28px; }
}

/* ── CTA Block ── */
.dg-cta {
  text-align: center;
  margin: 3rem 0 2rem;
}
.dg-cta .dg-section__divider { margin-bottom: 1rem; }
.dg-cta .dg-heading { text-align: center; }
.dg-cta__message {
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
}

/* ── CTA Link — callout aside ── */
.dg-cta-link {
  margin: 3rem 1.5rem;
  padding: 2rem 2.5rem;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-right: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 2px 12px var(--shadow, rgba(0, 0, 0, 0.08));
  position: relative;
}
.dg-cta-link .dg-section__divider { display: none; }
.dg-cta-link .dg-heading { text-align: left; }
.dg-cta-link__message {
  color: var(--ink-muted);
  margin: 0.5rem 0 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
}
.dg-cta-link__btn {
  display: inline-block;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  transition: letter-spacing 0.2s ease;
}
.dg-cta-link__btn:hover {
  letter-spacing: 0.06em;
}
/* Callout card border flash — mirrors bubble-throb timing */
.dg-cta-link--flash {
  animation: card-border-flash 1.2s ease-in-out 3;
}
@keyframes card-border-flash {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0), 0 2px 12px var(--shadow, rgba(0, 0, 0, 0.08));
  }
  50% {
    box-shadow: 0 0 0 8px rgba(245, 166, 35, 0.2), 0 2px 12px var(--shadow, rgba(0, 0, 0, 0.08));
  }
}

/* ── Media ── */
.dg-media {
  margin: 1.5rem 0 2rem;
  text-align: center;
}
.dg-media__img {
  max-width: 100%;
  max-height: 400px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}
.dg-media__caption {
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 0.75rem;
}
.dg-media__gallery {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Hero (about page) ── */
.dg-hero { margin-bottom: 2rem; }

/* Hero split layout (image left, text right) */
.dg-hero--split {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}
.dg-hero__media {
  flex: 0 0 38%;
  max-width: 380px;
}
.dg-hero__img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.dg-hero__content {
  flex: 1;
  min-width: 0;
  padding-top: 0.5rem;
}
.dg-hero__caption {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}
.dg-hero__caption-phrase {
  white-space: nowrap;
}

/* ── Services Grid ── */
.dg-services { padding-bottom: 2rem; }
.dg-services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* ── Phase Grouping ── */
.dg-phase {
  margin-bottom: 2.5rem;
}
.dg-phase__header {
  margin-bottom: 0.25rem;
}
.dg-phase__badge {
  display: inline-block;
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.35rem 1.2rem;
  border-radius: 20px;
  border: 1.5px solid var(--phase-color);
  color: var(--phase-color);
  background: transparent;
}
.dg-phase__badge--understand { --phase-color: var(--primary); }
.dg-phase__badge--build { --phase-color: var(--secondary); }
.dg-phase__badge--sustain { --phase-color: var(--accent); }

/* ── Service Card ── */
.dg-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.dg-card__accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--primary));
}
.dg-card__title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--card-accent, var(--primary));
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.dg-card__desc {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1;
  margin: 0;
}
.dg-card__cta {
  margin-top: 1rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--card-accent, var(--primary));
  opacity: 0;
  transition: opacity 0.2s;
}
.dg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--ink-muted);
  text-decoration: none;
  color: var(--ink);
}
.dg-card:hover .dg-card__cta { opacity: 1; }

/* ── Service Detail ── */
.dg-service-detail { padding-bottom: 2rem; }

/* Breadcrumb */
.dg-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}
.dg-breadcrumb__phase {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--phase-color, var(--primary));
}
.dg-breadcrumb__badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  border: 1.5px solid var(--phase-color, var(--primary));
  color: var(--phase-color, var(--primary));
  background: transparent;
}
.dg-breadcrumb__sep { color: var(--ink-muted); font-weight: 400; }
.dg-breadcrumb__current { color: var(--ink-muted); font-weight: 400; }
.dg-breadcrumb a { text-decoration: none; }
.dg-breadcrumb a:hover { text-decoration: none; opacity: 0.8; }

/* One-liner hook */
.dg-detail__hook {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 700px;
  margin: 0 0 2rem;
  font-style: italic;
}

/* Situation block (intro) */
.dg-detail__situation {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  margin: 0 0 0.5rem;
  max-width: 800px;
  border-left: 3px solid var(--primary);
  background: linear-gradient(135deg, rgba(7,147,255,0.04) 0%, transparent 60%);
  border-radius: 0 8px 8px 0;
}
.dg-detail__situation p {
  margin: 0;
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Two-column layout for lists */
.dg-detail__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 0 0 1rem;
  padding-top: 2rem;
}
.dg-detail__col-header {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

/* Short divider variant */
.dg-section__divider--short {
  height: 50px;
  margin: 1.5rem auto 1rem;
}

/* Context strip */
.dg-detail__context {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 0.5rem;
}
.dg-detail__context-item {
  flex: 1;
  min-width: 180px;
  padding: 1rem 1.5rem;
  background: var(--surface);
}
.dg-detail__context-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}
.dg-detail__context-value {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.4;
}

/* Related services */
.dg-detail__related { margin: 0 0 0.5rem; }
.dg-detail__related-heading {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.dg-detail__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  max-width: calc(3 * 280px + 2 * 1.25rem + 40px);
  gap: 1.25rem;
}
.dg-related-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.dg-related-card__accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--primary));
}
.dg-related-card__title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--card-accent, var(--primary));
  margin: 0 0 0.4rem;
  line-height: 1.2;
}
.dg-related-card__desc {
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  margin: 0;
}
.dg-related-card__cta {
  margin-top: 0.75rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--card-accent, var(--primary));
  opacity: 0;
  transition: opacity 0.2s;
}
.dg-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--ink-muted);
  text-decoration: none;
  color: var(--ink);
}
.dg-related-card:hover .dg-related-card__cta { opacity: 1; }

/* ════════════════════════════════════════════════════
   DG FAQ — Structural + Visual Styles
   (replaces shared faq.css for DG pages)
   ════════════════════════════════════════════════════ */

/* Sticky header below fixed nav */
.dg-page.faq-page .faq-header {
  position: sticky;
  top: var(--nav-height);
  background: transparent;
  z-index: 50;
  padding: 1.5rem 0;
  margin: 0 -2rem 2rem -2rem;
  padding-left: 2rem;
  padding-right: 2rem;
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s, opacity 0.3s ease;
  opacity: 0;
}
.dg-page.faq-page .faq-header.faq-header--ready {
  opacity: 1;
}
.dg-page.faq-page .faq-header.faq-header--scrolled {
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* FAQ title gets DG heading treatment from JS */
.dg-page.faq-page #faq-title { margin: 0 0 0.3em; }
.dg-page.faq-page #faq-subtitle {
  color: var(--accent);
  font-size: 1.1rem;
  margin: 0 0 1rem;
}
.dg-page.faq-page #faq-subtitle.hidden { display: none; }

/* Tab pills */
.dg-faq-tab {
  background: rgba(7, 147, 255, 0.08);
  border: 1.5px solid rgba(7, 147, 255, 0.25);
  border-radius: 20px;
  color: var(--primary);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.dg-faq-tab:hover {
  background: rgba(7, 147, 255, 0.15);
  border-color: var(--primary);
}
.dg-faq-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dg-faq-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Tabs container */
.dg-page.faq-page .faq-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* Search box */
.dg-page.faq-page .faq-search-container {
  position: relative;
  max-width: 600px;
}
.dg-page.faq-page .faq-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-family: 'Source Sans 3', sans-serif;
  transition: border-color 0.2s;
}
.dg-page.faq-page .faq-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 147, 255, 0.1);
}
.dg-page.faq-page .faq-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

/* FAQ body */
.dg-page.faq-page .faq-body {
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.dg-page.faq-page .faq-body.faq-body--ready {
  opacity: 1;
}

/* FAQ section */
.dg-faq-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 280px;
}
.dg-faq-section:last-child { margin-bottom: 0; }

/* FAQ questions container */
.dg-faq-questions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* FAQ question item */
.dg-faq-question { scroll-margin-top: 280px; }

/* Accordion button */
.dg-faq-question__btn {
  width: 100%;
  text-align: left;
  padding: 0.85rem 3rem 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  display: block;
  line-height: 1.4;
}
.dg-faq-question__btn:hover {
  border-color: var(--primary);
}
.dg-faq-question__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.dg-faq-question__btn[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--border);
}

/* Accordion +/− icon */
.dg-faq-question__btn::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4em;
  font-weight: 400;
  color: var(--primary);
}
.dg-faq-question__btn[aria-expanded="true"]::after {
  content: "\2212";
}

/* Answer panel (collapsed by default) */
.dg-faq-answer {
  background: var(--surface-variant, var(--surface));
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
}
.dg-faq-answer.open {
  max-height: 5000px;
  opacity: 1;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
}
.dg-faq-answer__content {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.7;
}
.dg-faq-answer__content p { margin: 0 0 1em; }
.dg-faq-answer__content p:last-child { margin-bottom: 0; }
.dg-faq-answer__content ul { padding-left: 1.5em; margin: 0 0 1em; }
.dg-faq-answer__content li { margin-bottom: 0.5em; }
.dg-faq-answer__content strong { font-weight: 800; color: var(--ink); }

/* Service link in FAQ answer */
.dg-faq-service-link {
  margin-top: 1rem;
  font-size: 0.85rem;
  padding: 0.55rem 1.4rem;
}

/* Search results + no-results */
.dg-faq-search-results { margin-bottom: 1.5rem; }
.dg-faq-no-results { text-align: center; padding: 3rem 1rem; color: var(--ink-muted); }
.dg-faq-no-results__icon { font-size: 3em; margin-bottom: 1rem; }
.dg-faq-no-results__message { font-size: 1.1rem; margin-bottom: 0.5rem; }
.dg-faq-no-results__suggestion { font-size: 0.9rem; }

.hidden { display: none; }

/* ── Modal & Overlay (for contact modal) ── */
.modal-shell {
  max-width: 920px;
  width: 100%;
  padding: 3rem 3rem 2rem;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: var(--surface);
  position: relative;
  font-size: 1.35em;
  line-height: 1.6;
  margin: auto 0;
}

.overlay-shell {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  padding: 3rem 2rem;
  overflow-y: auto;
}
.overlay-shell.is-open {
  display: flex;
}

/* ── Privacy Modal ── */
#privacy-overlay .modal-shell {
  background: var(--bg);
  isolation: isolate;
  overflow: hidden;
}
#privacy-overlay .modal-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(7,147,255,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,147,255,0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}
.dg-privacy-modal {
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}
.dg-privacy-modal h2,
.dg-privacy-modal h3,
.dg-privacy-modal h4 {
  font-family: 'Roboto', sans-serif;
  color: var(--ink);
}
.dg-privacy-modal h2 {
  font-weight: 900;
  font-size: 1.8em;
  margin: 0 0 1rem;
}
.dg-privacy-modal h3 {
  font-weight: 700;
  font-size: 1.4em;
  margin: 1.5em 0 0.8em;
}
.dg-privacy-modal h4 {
  font-weight: 700;
  font-size: 1.15em;
  margin: 1.5em 0 0.8em;
  padding-left: 1.5em;
}
.dg-privacy-modal h4 ~ p {
  padding-left: 1.5em;
}
.dg-privacy-modal p {
  margin-bottom: 1.5em;
  line-height: 1.7;
}

.btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  z-index: 1001;
  padding: 0;
}
.btn-close:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Theme Toggle ── */
.theme-toggle {
  position: relative;
  width: 48px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle-track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
}
.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  outline: 2px solid color-mix(in srgb, var(--ink-muted) 30%, transparent);
  outline-offset: -2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.theme-toggle[data-theme="light"] .theme-toggle-thumb { transform: translateX(0); }
.theme-toggle[data-theme="auto"] .theme-toggle-thumb { transform: translateX(12px); }
.theme-toggle[data-theme="dark"] .theme-toggle-thumb { transform: translateX(24px); }
.theme-toggle:hover .theme-toggle-track { border-color: var(--primary); }
.theme-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 12px; }

.theme-mode-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
}
.theme-mode-label.show {
  animation: slideUpFade 1.5s ease forwards;
}

/* ── Utilities ── */
.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;
}

/* ── Animations ── */
@keyframes slideUpFade {
  0% { opacity: 0; transform: translate(-50%, -50%); }
  20% { opacity: 0.9; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, calc(-50% - 48px)); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive: Mobile (<768px) ── */
@media (max-width: 767px) {
  .dg-page-content { padding: 1.5rem 1rem 2rem; }

  /* Nav mobile */
  .dg-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
  .dg-nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
    gap: 0;
    box-shadow: 0 4px 12px var(--shadow);
  }
  .dg-nav--open .dg-nav__links { display: flex; }
  .dg-nav__links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    -webkit-tap-highlight-color: rgba(245, 166, 35, 0.35);
  }
  /* Active underline via text-decoration — follows text width exactly */
  .dg-nav__links a.active::after { display: none; }
  .dg-nav__links a.active {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
  }

  /* Modal mobile */
  .modal-shell { width: 90vw; max-width: 90vw; padding: 2.5rem 1.5rem 1.5rem; }
  .overlay-shell { padding: 1rem 0; }
  .btn-close { top: 0.75rem; right: 0.75rem; width: 28px; height: 28px; font-size: 16px; }
  .contact-close.btn-close { width: 40px; height: 40px; font-size: 20px; }

  /* Contact modal — iOS bottom sheet (overrides .modal-shell sizing above) */
  .contact-modal-overlay.overlay-shell { padding: 0; align-items: flex-end; }
  .contact-modal.modal-shell {
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    border: none;
    max-height: 90vh;
    padding: 0 1.5rem 2rem;
  }

  /* DG-native sections */
  .dg-section__divider { margin: 1.5rem auto 1rem; height: 55px; }

  /* Hero split → stack vertically */
  .dg-hero--split {
    flex-direction: column;
    gap: 1.5rem;
  }
  .dg-hero__media {
    flex: none;
    max-width: 280px;
    width: 100%;
  }

  /* Service cards — single column */
  .dg-services__grid { grid-template-columns: 1fr; }

  /* Service detail — stack columns, context strip */
  .dg-detail__columns { grid-template-columns: 1fr; gap: 1rem; }
  .dg-detail__context { flex-direction: column; }
  .dg-detail__context-item { min-width: auto; }
  .dg-detail__related-grid { grid-template-columns: 1fr; }

  /* Watermarks — smaller on mobile */
  .dg-page.about-page .dg-page-content::after,
  .dg-page.services-page .dg-page-content::after,
  .dg-page.service-detail-page .dg-page-content::after,
  .dg-page.faq-page .dg-page-content::after,
  .dg-page.insights-page .dg-page-content::after {
    width: 280px;
    height: 280px;
  }

  /* Code editor mobile — smaller font, tighter gutter, word-wrap long lines */
  .code-editor { margin: 1rem -0.5rem; border-radius: 6px; }
  .code-editor__pre { font-size: 0.72rem; line-height: 1.55; }
  .code-editor__gutter { width: 2.25rem; padding-right: 0.6rem; }
  .code-editor__line { white-space: pre-wrap; word-break: break-word; padding-left: 3rem; text-indent: -3rem; }
  .code-editor__tab { font-size: 0.72rem; padding: 0.4rem 0.75rem; }

  /* FAQ mobile */
  .dg-page.faq-page .faq-header {
    margin: 0 -1rem 1rem -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem;
    padding-bottom: 0.75rem;
  }
  .dg-page.faq-page #faq-subtitle { display: none; }
  .dg-faq-section,
  .dg-faq-question { scroll-margin-top: 200px; }
  .dg-faq-tab { font-size: 0.75rem; padding: 0.35rem 0.7rem; }
  .dg-faq-question__btn { padding: 0.75rem 2.5rem 0.75rem 1rem; font-size: 0.9rem; }
  .dg-faq-question__btn::after { right: 0.75rem; font-size: 1.3em; }
  .dg-faq-answer.open { padding: 1rem; }

  /* Contact modal — allow sheet scroll (overrides desktop overflow:hidden) */
  .dg-page .contact-modal { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
  .dg-page .contact-header {
    background: transparent;
  }
  .dg-page .contact-header::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    top: -4rem;
    background: rgba(var(--bg-rgb), 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .dg-page .contact-header.contact-header--scrolled::before {
    opacity: 1;
  }

  /* Footer mobile — wrap centered */
  .dg-footer__inner { flex-wrap: wrap; gap: 0.25rem 0.75rem; }
  .dg-footer__sep { display: none; }
}

/* Portrait mobile — center hero image + caption */
@media (max-width: 767px) and (orientation: portrait) {
  .dg-hero__media {
    align-self: center;
    text-align: center;
  }
}

/* ── Responsive: Tablet (768–1024px) ── */
@media (min-width: 768px) and (max-width: 1024px) {
  .dg-page-content { padding: 2rem 1.5rem 3rem; }
  .modal-shell { width: 95vw; max-width: 700px; }
  .dg-services__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Dark Mode ── */

/* Gridlines: pure white, slightly boosted for dark backgrounds */
.dark-mode body::before {
  background:
    linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Modal gridlines in dark mode */
.dark-mode .dg-page .contact-modal::before,
.dark-mode #privacy-overlay .modal-shell::before,
.dark-mode .dg-page .contact-success-notification::after {
  background:
    linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Watermarks — dark mode: uniform opacity, accent glow on grease-drop pages */
.dark-mode .dg-page.about-page .dg-page-content::after,
.dark-mode .dg-page.services-page .dg-page-content::after,
.dark-mode .dg-page.service-detail-page .dg-page-content::after,
.dark-mode .dg-page.faq-page .dg-page-content::after,
.dark-mode .dg-page.insights-page .dg-page-content::after,
.dark-mode .dg-page .contact-modal::after,
.dark-mode #privacy-overlay .modal-shell::after {
  opacity: 0.20;
}
/* Grease-drop watermarks: accent glow instead of invert.
   Blur scaled up proportionally for watermark size (~400-600px).
   Higher rgba opacities compensate for the element's 0.20 base opacity. */
.dark-mode .dg-page.about-page .dg-page-content::after,
.dark-mode .dg-page.service-detail-page .dg-page-content::after,
.dark-mode .dg-page.insights-page .dg-page-content::after {
  filter: drop-shadow(0 0 48px rgba(245, 166, 35, 0.3)) drop-shadow(0 0 14px rgba(245, 166, 35, 0.2));
}
