/* SPDX-License-Identifier: Apache-2.0 */
/* Brand alignment with livingprooflabs.com (website styles/main.css on main): DM Sans body,
   Instrument Serif headings, teal accent with #0f766e for light-mode text. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --md-text-font: "DM Sans";
  --lpl-serif: "Instrument Serif", Georgia, serif;
}

/* Named brand tokens (values from livingprooflabs.com styles/main.css).
   Theme variables below point at these, so a manual can retheme by changing only --lpl-*. */
[data-md-color-scheme="default"] {
  --lpl-accent: #0f766e;
  --lpl-accent-hover: #115e59;
  --lpl-on-accent: #ffffff;
  --lpl-bg: #f8fafc;
  --lpl-text: #0f172a;
  --lpl-text-muted: #475569;
  --lpl-accent-tint: rgba(15, 118, 110, 0.1);
}

[data-md-color-scheme="slate"] {
  --lpl-accent: #2dd4bf;
  --lpl-accent-hover: #5eead4;
  --lpl-on-accent: #042f2e;
  --lpl-bg: #0b1120;
  --lpl-text: #e2e8f0;
  --lpl-text-muted: #94a3b8;
  --lpl-accent-tint: rgba(45, 212, 191, 0.12);
}

[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-default-fg-color: var(--lpl-text);
  --md-default-bg-color: var(--lpl-bg);
  --md-primary-fg-color: var(--lpl-accent);
  --md-primary-fg-color--light: var(--lpl-accent);
  --md-primary-fg-color--dark: var(--lpl-accent-hover);
  --md-primary-bg-color: var(--lpl-on-accent);
  --md-accent-fg-color: var(--lpl-accent-hover);
  --md-accent-fg-color--transparent: var(--lpl-accent-tint);
  --md-typeset-a-color: var(--lpl-accent);
}

.md-typeset h1,
.md-typeset h2 {
  font-family: var(--lpl-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.md-header__button.md-logo .lpl-logo {
  width: 1.7rem;
  color: var(--lpl-accent);
  height: auto;
}

/* Heading permalinks (¶) use the website's muted text color so they meet contrast. */
.md-typeset .headerlink {
  color: var(--lpl-text-muted);
}

.md-typeset .headerlink:hover,
.md-typeset .headerlink:focus-visible,
.md-typeset :target > .headerlink {
  color: var(--lpl-accent);
}

/* Keep the robot mark beside the title at every width (the theme hides it below 76.25em).
   On narrow screens the menu button stays first, then the mark, then the title. */
@media screen and (max-width: 76.234375em) {
  .md-header__button.md-logo {
    display: inline-block;
    padding: 0.3rem 0.15rem;
    margin: 0.2rem 0;
  }

  .md-header__button.md-logo .lpl-logo {
    width: 1.5rem;
  }

  .md-header__inner > label.md-header__button[for="__drawer"] {
    order: -1;
  }

  .md-header__title {
    margin-left: 0.3rem;
  }
}

/* Shared content components for every manual (ported from living-proof-labs.github.io PR #17).
   Pages opt in with a wrapper class, e.g. <div class="glossary" markdown>. */

/* Glossary: term column stands out; narrow screens stack term, meaning, muted example. */
.md-typeset .glossary table:not([class]) td:first-child {
  white-space: nowrap;
}

.md-typeset .glossary table:not([class]) td:last-child {
  color: var(--lpl-text-muted);
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .glossary table:not([class]) { display: block; border: 0; }
  .md-typeset .glossary thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .md-typeset .glossary tbody, .md-typeset .glossary tr, .md-typeset .glossary td { display: block; }
  .md-typeset .glossary tr { padding: 0.6rem 0; border-top: 1px solid var(--md-default-fg-color--lightest); }
  .md-typeset .glossary table:not([class]) td { padding: 0.1rem 0.2rem; border: 0; white-space: normal; }
  .md-typeset .glossary td:last-child { font-size: 0.9em; }
  .md-typeset .glossary td:last-child::before { content: "Example: "; font-weight: 600; }
}

/* Landing components: call-to-action row, step cards, Available now / Next cards, status badges. */
.md-typeset .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 1.2rem 0; }
.md-typeset .hero-actions .md-button { margin: 0; }
.md-typeset .hero-tertiary { font-weight: 600; }
.md-typeset .how-steps,
.md-typeset .now-building { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; margin: 1rem 0; }
.md-typeset .how-steps > div,
.md-typeset .now-building > div { border: 1px solid var(--md-default-fg-color--lightest); border-radius: 0.6rem; padding: 0.9rem 1rem; }
.md-typeset .how-steps h3 { margin-top: 0; font-size: 1em; }
.md-typeset .now-building ul { margin-top: 0.5rem; }
.md-typeset .badge { display: inline-block; font-size: 0.75em; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; }
.md-typeset .badge-now { background: var(--lpl-accent-tint); color: var(--lpl-accent); }
.md-typeset .badge-next { background: transparent; color: var(--lpl-text-muted); box-shadow: inset 0 0 0 1px var(--md-default-fg-color--lightest); }
