/* apk-info theme: neutral surfaces, one olive accent (the cursor and the
   selected byte of the logo). */

:root {
  --apk-olive: #4d7c0f;
  --apk-olive-bright: #65a30d;
}

[data-md-color-primary="custom"] {
  --md-primary-fg-color: var(--apk-olive);
  --md-primary-fg-color--light: var(--apk-olive-bright);
  --md-primary-fg-color--dark: #3f6212;
  --md-primary-bg-color: #ffffff;
}

[data-md-color-accent="custom"] {
  --md-accent-fg-color: var(--apk-olive);
  --md-accent-fg-color--transparent: rgb(77 124 15 / 10%);
  --md-accent-bg-color: #ffffff;
}

[data-md-color-scheme="default"] {
  --md-typeset-a-color: var(--apk-olive);
  --md-code-hl-color: rgb(77 124 15 / 100%);
  --md-code-hl-color--light: rgb(77 124 15 / 14%);
  --apk-cursor: var(--apk-olive);
  --apk-hl-bg: var(--apk-olive);
}

[data-md-color-scheme="slate"] {
  --md-typeset-a-color: var(--apk-olive-bright);
  --md-code-hl-color: rgb(101 163 13 / 100%);
  --md-code-hl-color--light: rgb(101 163 13 / 20%);
  --md-accent-fg-color: var(--apk-olive-bright);
  --md-accent-fg-color--transparent: rgb(101 163 13 / 12%);
  --apk-cursor: var(--apk-olive-bright);
  --apk-hl-bg: var(--apk-olive-bright);
}

/* Type: Plex for text, JetBrains Mono for code and small labels */
/* Plex loads in 300/400/500/700; 600 would be synthesised */
.md-typeset h1,
.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.md-typeset h3 {
  font-weight: 500;
}

/* The selected-byte highlight: marks what to look at, like 4B in the logo.
   Use on inline code with attr_list: `!`{ .hl } */
.md-typeset .hl,
.md-typeset code.hl {
  background: var(--apk-hl-bg);
  color: #ffffff;
  border-radius: 0.15em;
  padding: 0 0.3em;
}

/* Home page */
.apk-hero {
  margin: 1rem 0 1.5rem;
}

.apk-hero__title {
  margin: 0 0 0.8rem !important;
  line-height: 1;
}

.apk-hero__title svg {
  display: block;
  width: min(19rem, 100%);
  height: auto;
}

.apk-hero__title path {
  fill: currentColor;
}

.apk-hero__lead {
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: 34rem;
  margin: 0 0 1.4rem;
  color: var(--md-default-fg-color--light);
}

.apk-hero__lead strong {
  color: var(--md-default-fg-color);
  font-weight: 600;
}

/* Room between the Quickstart and GitHub buttons, also when they wrap */
.apk-hero .md-button {
  margin: 0 0.4rem 0.4rem 0;
}

/* No "Edit this page" on the landing page */
.md-content__inner:has(.apk-hero) > .md-content__button {
  display: none;
}

/* One slow blink, like a terminal cursor; static for reduced motion */
@keyframes apk-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

.apk-hero__title .cursor {
  fill: var(--apk-cursor);
  animation: apk-blink 1.1s steps(1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .apk-hero__title .cursor {
    animation: none;
  }
}

/* A plain two-column list instead of feature cards */
.apk-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.2rem 2.5rem;
}

.apk-points > p {
  margin: 0.6rem 0;
}

.apk-points strong {
  display: block;
  font-family: var(--md-code-font-family);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color);
}

/* Terminal demo, rendered by scripts/render-demo.py: real apk-info output
   whose ANSI colors map to the theme, so it follows light and dark mode */
[data-md-color-scheme="default"] {
  --apk-term-green: var(--apk-olive);
  --apk-term-red: #b91c1c;
  --apk-term-yellow: #a16207;
}

[data-md-color-scheme="slate"] {
  --apk-term-green: var(--apk-olive-bright);
  --apk-term-red: #f87171;
  --apk-term-yellow: #facc15;
}

.md-typeset .apk-terminal {
  margin: 1em 0;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.4rem;
  background: var(--md-code-bg-color);
  overflow: hidden;
}

.md-typeset .apk-terminal__bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset .apk-terminal__bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--md-default-fg-color--lighter);
}

.md-typeset .apk-terminal pre {
  margin: 0;
}

.md-typeset .apk-terminal pre > code {
  padding: 0.8em 1.2em;
  background: transparent;
  color: var(--md-code-fg-color);
}

.md-typeset .apk-terminal .t-prompt,
.md-typeset .apk-terminal .t-green {
  color: var(--apk-term-green);
}

.md-typeset .apk-terminal .t-red {
  color: var(--apk-term-red);
}

.md-typeset .apk-terminal .t-yellow {
  color: var(--apk-term-yellow);
}

/* section headers: the one accent stays olive, headers just stand out */
.md-typeset .apk-terminal .t-blue {
  color: var(--md-default-fg-color);
}

.md-typeset .apk-terminal .t-bold {
  font-weight: 700;
}

.md-typeset .apk-terminal .t-dim {
  color: var(--md-default-fg-color--light);
}
