/*
 * The extension's pages on GitHub Pages (tools/publish-site.mjs): the popup's colors and type, set for
 * reading. Red is left to the icon.
 */
:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --ink: #0f0f0f;
  --graphite: #606060;
  --line: rgb(15 15 15 / 0.1);
  --link: #065fd4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f0f0f;
    --ink: #f1f1f1;
    --graphite: #aaaaaa;
    --line: rgb(255 255 255 / 0.14);
    --link: #3ea6ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

header {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

/* The name as on the promo tile: the extension's own name first, the YouTube mark after it and quieter. */
.name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--graphite);
}

/* A hairline keeps the dark tile apart from a dark page. */
.name img {
  flex: none;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line);
}

.name strong {
  color: var(--ink);
  font-weight: 600;
}

main {
  padding: 48px 0 24px;
}

h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.updated {
  margin: 10px 0 0;
  color: var(--graphite);
  font-size: 15px;
}

.lead {
  margin: 32px 0 0;
  font-size: 21px;
  line-height: 1.5;
  text-wrap: pretty;
}

h2 {
  margin: 44px 0 12px;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
}

p {
  margin: 0 0 16px;
}

code {
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

main a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

footer {
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--graphite);
  font-size: 14px;
}

@media (max-width: 560px) {
  body {
    padding: 0 16px;
    font-size: 16px;
  }

  main {
    padding-top: 32px;
  }

  h1 {
    font-size: 28px;
  }

  .lead,
  h2 {
    font-size: 19px;
  }
}
