/* Datagoal Docs: Material UI visual language, rendered as static HTML. */
:root {
  --md-primary-fg-color: #2196f3;
  --md-primary-fg-color--light: #64b5f6;
  --md-primary-fg-color--dark: #1976d2;
  --md-accent-fg-color: #03a9f4;
  --md-accent-fg-color--transparent: rgba(3, 169, 244, 0.12);
  --dg-app-bar: #2196f3;
  --dg-app-bar-hover: rgba(255, 255, 255, 0.1);
  --dg-canvas: #f7f7f7;
  --dg-surface: #fff;
  --dg-surface-soft: #f8fafc;
  --dg-border: #e3e8ef;
  --dg-text: rgba(0, 0, 0, 0.87);
  --dg-text-muted: rgba(0, 0, 0, 0.6);
  --dg-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 4px rgba(15, 23, 42, 0.06);
  --dg-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --dg-radius: 12px;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #111827;
  --md-default-fg-color: rgba(255, 255, 255, 0.9);
  --dg-app-bar: #1565c0;
  --dg-canvas: #0f172a;
  --dg-surface: #182235;
  --dg-surface-soft: #1e293b;
  --dg-border: #334155;
  --dg-text: rgba(255, 255, 255, 0.9);
  --dg-text-muted: rgba(255, 255, 255, 0.64);
  --dg-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.18);
  --dg-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.24);
}

html { scroll-behavior: smooth; }

body {
  background: var(--dg-canvas);
  color: var(--dg-text);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* App bar */
.md-header {
  background: var(--dg-app-bar);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.md-header__inner {
  min-height: 3rem;
  max-width: 92rem;
  padding-inline: 1rem;
}

.md-header__button {
  border-radius: 50%;
  transition: background-color 160ms ease;
}

.md-header__button:hover { background: var(--dg-app-bar-hover); }

.md-header__button.md-logo {
  margin: 0 0.55rem 0 0;
  padding: 0.35rem 0.5rem 0.35rem 0;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: auto;
  height: 1.6rem;
  filter: brightness(0) invert(1);
}

.md-header__title {
  margin-left: 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.md-header__topic:first-child { font-weight: 500; }

/* Search field styled like a Material UI control. */
.md-search__form {
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.md-search__form:hover { background: rgba(255, 255, 255, 0.2); }

[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  border-color: var(--dg-border);
  background: var(--dg-surface);
  box-shadow: var(--dg-shadow-md);
}

.md-search__output {
  border-radius: 0 0 10px 10px;
  box-shadow: var(--dg-shadow-md);
}

.md-search__icon[for="__search"] {
  top: 0.5rem;
}

.md-search-result__meta {
  display: flex;
  min-height: 2rem;
  padding-block: 0.2rem;
  line-height: 1.35;
  align-items: center;
}

/* Page frame */
.md-grid { max-width: 92rem; }

.md-main__inner {
  margin-top: 1.5rem;
  gap: 1.25rem;
}

.md-sidebar { padding-top: 0; }

.md-sidebar__scrollwrap {
  scrollbar-width: thin;
  scrollbar-color: #b7c1ce transparent;
}

.md-sidebar--primary .md-sidebar__inner,
.md-sidebar--secondary .md-sidebar__inner { padding: 0.35rem; }

/* Navigation follows MUI List/ListItem conventions. */
.md-nav { font-size: 0.72rem; }

.md-nav__title {
  color: var(--dg-text);
  font-size: 0.72rem;
  font-weight: 600;
}

.md-nav__link {
  min-height: 2.15rem;
  margin: 0.12rem 0;
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  color: var(--dg-text-muted);
  transition: background-color 140ms ease, color 140ms ease;
}

.md-nav__link:hover {
  background: rgba(33, 150, 243, 0.08);
  color: var(--md-primary-fg-color--dark);
}

.md-nav__item .md-nav__link--active {
  background: #e3f2fd;
  color: #1565c0;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active {
  background: rgba(33, 150, 243, 0.16);
  color: #90caf9;
}

.md-sidebar--secondary { border-left: 1px solid var(--dg-border); }

/* Main document surface */
.md-content { min-width: 0; }

.md-content__inner {
  min-height: calc(100vh - 8rem);
  margin: 0 0 2rem;
  padding: 2.1rem 2.5rem 3rem;
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-radius);
  background: var(--dg-surface);
  box-shadow: var(--dg-shadow-sm);
}

.md-content__inner::before { display: none; }

.md-typeset {
  color: var(--dg-text);
  font-size: 0.82rem;
  line-height: 1.75;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--dg-text);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.md-typeset h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.2;
}

.md-typeset h2 {
  margin-top: 2.4rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--dg-border);
  font-size: 1.35rem;
}

.md-typeset h3 { font-size: 1.05rem; }

.md-typeset a {
  color: #1976d2;
  font-weight: 500;
}

[data-md-color-scheme="slate"] .md-typeset a { color: #64b5f6; }

.md-typeset a:hover {
  color: #0d47a1;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.md-typeset hr { border-bottom-color: var(--dg-border); }

/* Tables, code and callouts */
.md-typeset table:not([class]) {
  overflow: hidden;
  border: 1px solid var(--dg-border);
  border-radius: 10px;
  box-shadow: none;
}

.md-typeset table:not([class]) th {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--dg-border);
  background: var(--dg-surface-soft);
  color: var(--dg-text);
  font-weight: 600;
}

.md-typeset table:not([class]) td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--dg-border);
}

.md-typeset table:not([class]) tr:hover td { background: rgba(33, 150, 243, 0.035); }
.md-typeset code { border-radius: 5px; }

.md-typeset pre > code {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--dg-border);
  border-radius: 10px;
  background: #111827;
  box-shadow: none;
}

.md-typeset .highlight,
.md-typeset .highlighttable { border-radius: 10px; }
.md-clipboard { border-radius: 6px; }

.md-typeset .admonition,
.md-typeset details {
  overflow: hidden;
  border-width: 1px;
  border-radius: 10px;
  box-shadow: none;
}

.md-typeset blockquote {
  border-left: 4px solid #42a5f5;
  border-radius: 0 8px 8px 0;
  background: var(--dg-surface-soft);
}

/* Landing page */
.dg-hero {
  position: relative;
  overflow: hidden;
  margin: -2.1rem -2.5rem 2rem;
  padding: clamp(2.4rem, 7vw, 4.6rem) clamp(1.5rem, 6vw, 4.25rem);
  border-radius: var(--dg-radius) var(--dg-radius) 0 0;
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 48%, #29b6f6 100%);
  color: #fff;
}

.dg-hero::after {
  position: absolute;
  top: -70%;
  right: -12%;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(255, 255, 255, 0.04), 0 0 0 8rem rgba(255, 255, 255, 0.025);
  content: "";
}

.dg-hero__eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dg-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.dg-hero p {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  line-height: 1.65;
}

.dg-section-title {
  margin: 0 0 0.35rem !important;
  padding: 0 !important;
  border: 0 !important;
}

.dg-section-lead {
  margin-top: 0;
  color: var(--dg-text-muted);
}

.dg-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.md-typeset .dg-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--dg-border);
  border-radius: 10px;
  background: var(--dg-surface);
  color: var(--dg-text);
  box-shadow: var(--dg-shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.md-typeset .dg-card:hover {
  border-color: #90caf9;
  color: var(--dg-text);
  text-decoration: none;
  box-shadow: var(--dg-shadow-md);
  transform: translateY(-2px);
}

.dg-card__icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  border-radius: 9px;
  background: #e3f2fd;
  color: #1976d2;
  font-size: 1.25rem;
  place-items: center;
}

[data-md-color-scheme="slate"] .dg-card__icon {
  background: rgba(33, 150, 243, 0.16);
  color: #90caf9;
}

.dg-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
}

.dg-card span:last-child {
  color: var(--dg-text-muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.md-footer { background: #0f2942; }
.md-footer-meta { background: #0b2033; }

@media screen and (max-width: 76.234375em) {
  .md-content__inner { margin-inline: 0.8rem; }
  .md-sidebar--primary .md-sidebar__scrollwrap { background: var(--dg-surface); }
  .md-nav--primary .md-nav__title[for="__drawer"] {
    background: var(--dg-app-bar);
    color: #fff;
  }
}

@media screen and (max-width: 44.984375em) {
  .md-header__inner {
    min-height: 2.8rem;
    padding-inline: 0.35rem;
  }
  .md-header__button.md-logo img,
  .md-header__button.md-logo svg { height: 1.45rem; }
  .md-main__inner { margin-top: 0; }
  .md-content__inner {
    min-height: auto;
    margin: 0;
    padding: 1.4rem 1rem 2.2rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .dg-hero {
    margin: -1.4rem -1rem 1.6rem;
    border-radius: 0;
  }
  .dg-card-grid { grid-template-columns: 1fr; }
  .md-typeset table:not([class]) { border-radius: 8px; }
}

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