/* Pretty Jason's site in the extension's GitHub Primer palette, light and dark.
   Type is all system: sans for text and headings, mono for code. Nothing
   loads from anywhere else. */

:root {
  color-scheme: light dark;
  --base: #ffffff;
  --raised: #f6f8fa;
  --line: #d0d7de;
  --text: #1f2328;
  --subtext: #59636e;
  --accent: #b91c4b;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* Dark follows the system unless the theme switch (theme.js) picks one */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --base: #0d1117;
    --raised: #161b22;
    --line: #30363d;
    --text: #e6edf3;
    --subtext: #8b949e;
    --accent: #f47296;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --base: #0d1117;
  --raised: #161b22;
  --line: #30363d;
  --text: #e6edf3;
  --subtext: #8b949e;
  --accent: #f47296;
}

:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { flex: 1; }

.page.home { max-width: 52rem; }

h1, h2 {
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p, li { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: from-font;
  text-underline-offset: 0.2em;
}

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--raised);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

/* Theme switch, added by theme.js */

.theme-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.25rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--base);
  color: var(--subtext);
  cursor: pointer;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle svg { display: block; }

/* Home */

.hero {
  padding: clamp(3.5rem, 14vh, 8rem) 0 3rem;
  text-align: center;
}

.hero img {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 1.5rem;
  border-radius: 22.5%;
  filter: drop-shadow(0 6px 16px rgb(0 0 0 / 0.1));
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2.75rem;
}

.lede {
  max-width: 27rem;
  margin: 0 auto;
  color: var(--subtext);
  font-size: 1rem;
  text-wrap: balance;
}

.lede.lead {
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 1.125rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem 0.45rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--base);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.status svg { flex-shrink: 0; }
.status:focus-visible { border-radius: 999px; }

.status.primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--base);
}

.hint {
  margin: 0 auto 3.5rem;
  color: var(--subtext);
  font-size: 0.875rem;
  text-align: center;
}

.points {
  display: grid;
  gap: 1.75rem;
}

.points h2,
.install h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.points p { margin: 0; }

.install {
  margin-top: 1.5rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--line);
}

.install p { margin: 0 0 0.5rem; }

/* Privacy and Support */

.masthead { padding: 1.5rem 0 0; }

.masthead a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}

.masthead img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 22.5%;
}

.doc { padding: 2.5rem 0 1rem; }

.doc h1 {
  margin: 0 0 0.25rem;
  font-size: 2.5rem;
}

.doc h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.375rem;
}

.doc p,
.doc ul { margin: 0 0 1rem; }

.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.5rem; }
.doc li::marker { color: var(--accent); }

.meta,
.intro { color: var(--subtext); }

.meta {
  margin: 0 0 1.75rem;
  font-size: 0.875rem;
}

.doc h1 + .intro { margin-top: 1rem; }

.intro { font-size: 1.0625rem; line-height: 1.6; }

/* Footer */

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--subtext);
  font-size: 0.8125rem;
}

footer .owner { margin-right: auto; }

/* Hover only where there is a pointer that hovers */
@media (hover: hover) {
  a:hover { text-decoration-color: var(--text); }

  .theme-toggle:hover {
    border-color: var(--accent);
    color: var(--text);
  }

  .status:hover { border-color: var(--accent); }
  .status.primary:hover { border-color: var(--text); opacity: 0.88; }
}

@media (prefers-reduced-motion: no-preference) {
  .status { transition: border-color 150ms ease-out, opacity 150ms ease-out, transform 150ms ease-out; }
  .status:active { transform: scale(0.96); }
}

@media (min-width: 38rem) {
  .points { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 2.25rem; }
}

@media (min-width: 46rem) {
  .hero h1 { font-size: 3.25rem; }
}
