:root {
  --aibook-brand-primary: #0f4c5c;
  --aibook-brand-accent: #d97d54;
  --aibook-brand-ink: #16323a;
  --aibook-brand-surface: #f5f2ea;
  --aibook-brand-panel: #fffdf8;
  --aibook-brand-border: rgba(15, 76, 92, 0.14);
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--aibook-brand-primary);
  --md-primary-fg-color--light: #3d6d79;
  --md-primary-fg-color--dark: #0b3641;
  --md-accent-fg-color: var(--aibook-brand-accent);
}

.md-header {
  background: linear-gradient(90deg, #0f4c5c 0%, #1f6f78 100%);
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 2rem;
  width: auto;
}

.md-tabs {
  background-color: rgba(11, 54, 65, 0.92);
}

/* Reader sign-in / sign-out
   ONE control in the header, rightmost after search: "Sign in" in the public edition (→ /private/, whose
   reader route answers anonymous with a 302 to the door carrying the right next=), "Sign out" in the private
   edition (→ the door's /logout). Material's own header tokens only — the header ink, a hairline border and
   the accent on hover — so this reads as the header's, not a second navigation. Small caps-size type keeps it
   legible at mobile width, where it is the only text control in the bar. */
.md-header__auth {
  align-items: center;
  border: 0.05rem solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  color: var(--md-primary-bg-color, #fff);
  display: inline-flex;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0 0.2rem 0 0.4rem;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  transition: background-color 125ms, border-color 125ms, color 125ms;
  white-space: nowrap;
}

.md-header__auth:focus,
.md-header__auth:hover {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: var(--md-primary-bg-color, #fff);
  color: var(--md-primary-bg-color, #fff);
  text-decoration: none;
}

@media screen and (max-width: 44.984375em) {
  .md-header__auth {
    font-size: 0.55rem;
    margin-left: 0.2rem;
    padding: 0.4rem 0.6rem;
  }
}

.md-typeset .hero {
  background:
    radial-gradient(circle at top right, rgba(217, 125, 84, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(15, 76, 92, 0.08), rgba(255, 253, 248, 0.95));
  border: 1px solid var(--aibook-brand-border);
  border-radius: 1.25rem;
  padding: 2rem;
  margin: 0 0 1.5rem;
  box-shadow: 0 1rem 2rem rgba(15, 76, 92, 0.08);
}

.md-typeset .hero h1 {
  color: var(--aibook-brand-ink);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.md-typeset .hero h1 .hero__subtitle {
  display: block;
  font-size: 0.52em;
  font-weight: 400;
  line-height: 1.25;
  margin-top: 0.35rem;
  color: rgba(22, 50, 58, 0.72);
}

.md-typeset .hero__eyebrow {
  color: var(--aibook-brand-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.md-typeset .hero__lead {
  color: rgba(22, 50, 58, 0.88);
  font-size: 1.08rem;
  margin: 0 0 1.25rem;
  max-width: 42rem;
}

.md-typeset .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.md-typeset .hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: rgba(22, 50, 58, 0.78);
  font-size: 0.92rem;
}

.md-typeset .hero__meta span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 76, 92, 0.1);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

.md-typeset .md-button--primary {
  background-color: var(--aibook-brand-primary);
  border-color: var(--aibook-brand-primary);
}

.md-typeset .md-button:hover {
  background-color: rgba(217, 125, 84, 0.12);
  border-color: var(--aibook-brand-accent);
  color: var(--aibook-brand-ink);
}

.md-typeset table:not([class]) {
  background: var(--aibook-brand-panel);
  border: 1px solid var(--aibook-brand-border);
  border-radius: 0.8rem;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background: rgba(15, 76, 92, 0.08);
}

@media screen and (max-width: 44.984375em) {
  .md-typeset .hero {
    padding: 1.35rem;
  }

  .md-typeset .hero__actions,
  .md-typeset .hero__meta {
    flex-direction: column;
    align-items: stretch;
  }
}
/* ---------------------------------------------------------------------------
   One frame, one palette
   The header carries the brand gradient; Material's footer default is black-based
   (--md-footer-bg-color: #000000de), which reads as a third colour under a teal
   header. The footer therefore repeats the header treatment, with a deeper band for
   the meta strip that holds the copyright and the edition line.
   --------------------------------------------------------------------------- */
.md-footer {
  background: linear-gradient(90deg, #0f4c5c 0%, #1f6f78 100%);
}

.md-footer-meta {
  background-color: rgba(11, 54, 65, 0.55);
}

.md-footer,
.md-footer-meta {
  --md-footer-fg-color: #ffffff;
  --md-footer-fg-color--light: rgba(255, 255, 255, 0.78);
  --md-footer-fg-color--lighter: rgba(255, 255, 255, 0.62);
}

/* Edition footer (build metadata)
   The version and build source sit at the foot of every page, substituted from the
   build environment by scripts/mkdocs_build_hooks.py. Legible on the brand band,
   quieter than body text — and never faded: an earlier opacity override made the
   line effectively invisible, which is why the colour is set explicitly here. */
.md-copyright {
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  color: var(--md-footer-fg-color--light);
}
