/* JetBrains Mono, self-hosted (SIL Open Font License, fonts/OFL.txt): the
   variable font, Latin only. Headings, labels, and code use it. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #1d2330;
  --muted: #5d6676;
  --faint: #8a93a3;
  --border: #e3e6eb;
  --tag-border: #d3d8e0;
  --accent: #2456c7;
  --code-bg: #f3f5f8;
  --good: #0a6b44;
  --good-bg: #e3f4ec;
  --warn: #8a5300;
  --warn-bg: #fbf0d9;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --neutral: #4a5363;
  --neutral-bg: #eef0f3;
  --info: #1f4fbf;
  --info-bg: #e6eefc;
  --version: #076678;
  --version-bg: #e0eef0;
  --logo-ink: #0b0c0f;
  --logo-edge: transparent;
  --logo-dots: #0b0c0f;
  --glow-blue: rgb(55 118 171 / 22%);
  --glow-yellow: rgb(255 212 59 / 30%);
  --grid: rgb(29 35 48 / 9%);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218;
    --surface: #171b23;
    --text: #e6e9ef;
    --muted: #a3acbb;
    --faint: #7c8596;
    --border: #2a303c;
    --tag-border: #3a4252;
    --accent: #8fb1ff;
    --code-bg: #1f2530;
    --good: #6fd6a8;
    --good-bg: #173428;
    --warn: #f2c063;
    --warn-bg: #3a2c12;
    --bad: #ff9b90;
    --bad-bg: #3d1c1a;
    --neutral: #c2c9d6;
    --neutral-bg: #262c37;
    --info: #9dbbff;
    --info-bg: #1c2742;
    --version: #83a598;
    --version-bg: #1b2c30;
    --logo-ink: #232a36;
    --logo-edge: #8a93a3;
  --logo-dots: #a3acbb;
    --glow-blue: rgb(90 159 212 / 26%);
    --glow-yellow: rgb(255 212 59 / 14%);
    --grid: rgb(230 233 239 / 7%);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1218;
  --surface: #171b23;
  --text: #e6e9ef;
  --muted: #a3acbb;
  --faint: #7c8596;
  --border: #2a303c;
  --tag-border: #3a4252;
  --accent: #8fb1ff;
  --code-bg: #1f2530;
  --good: #6fd6a8;
  --good-bg: #173428;
  --warn: #f2c063;
  --warn-bg: #3a2c12;
  --bad: #ff9b90;
  --bad-bg: #3d1c1a;
  --neutral: #c2c9d6;
  --neutral-bg: #262c37;
  --info: #9dbbff;
  --info-bg: #1c2742;
  --version: #83a598;
  --version-bg: #1b2c30;
  --logo-ink: #232a36;
  --logo-edge: #8a93a3;
  --logo-dots: #a3acbb;
  --glow-blue: rgb(90 159 212 / 26%);
  --glow-yellow: rgb(255 212 59 / 14%);
  --grid: rgb(230 233 239 / 7%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

code,
pre {
  font-family: var(--mono);
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Header and footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-icon {
  display: block;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-family: var(--mono);
  font-size: 14px;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 6px;
}

/* Shows the theme it switches to: a moon on the light page, a sun on the dark. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

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

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }

  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

.button {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.1);
}

.site-footer {
  margin-top: 64px;
  padding-top: 16px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

/* Shared text styles */

.lede {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.55;
}

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

.meta {
  margin: 0;
  font-size: 15px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* A section's small heading, such as "Latest issues". */
.section-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The top of a page other than the homepage and the issues. */
.page-head {
  padding: 16px 0 8px;
}

.page-head h1 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: -0.03em;
}

/* Homepage: the logo, a line in the style of the Python prompt, the title,
   and the signup form, centred on a faint dot grid. */

.hero {
  position: relative;
  isolation: isolate;
  padding: 32px 0 8px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -16px -16px 0;
  z-index: -1;
  background-image: radial-gradient(var(--grid) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse 65% 70% at 50% 35%, #000 25%, transparent 75%);
}

/* The logo without its tile, on a glow in the Python blue and yellow. */
.hero-logo {
  position: relative;
  width: 208px;
  height: 208px;
  margin: 0 auto 4px;
}

.hero-logo::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 42%, var(--glow-blue), transparent 58%),
    radial-gradient(circle at 60% 62%, var(--glow-yellow), transparent 52%);
  filter: blur(6px);
}

.hero-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-logo .logo-tile {
  display: none;
}

/* On the dark page the grinder is lighter than the page and outlined, so it
   does not vanish, and the peppercorns are light. The stroke keeps its width
   at any size. */
.hero-logo path.logo-ink {
  fill: var(--logo-ink);
  stroke: var(--logo-edge);
  stroke-width: 1.25px;
  vector-effect: non-scaling-stroke;
}

.hero-logo g.logo-ink {
  fill: var(--logo-dots);
}

.prompt {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
}

.prompt-mark {
  margin-right: 4px;
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  margin: 0 auto 14px;
  font-family: var(--mono);
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 750;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero .lede {
  max-width: 34em;
  margin: 0 auto;
  color: var(--muted);
  text-wrap: pretty;
}

.hero .subscribe {
  max-width: 480px;
  margin: 28px auto 0;
}

.hero .subscribe-row {
  justify-content: center;
}

.features,
.guide-teaser,
.page-home .archive {
  margin-top: 56px;
}

/* What an issue holds: three cards, each with a sample of how it looks. */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.feature-sample {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  margin: 0 0 12px;
}

.feature-sample code {
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--code-bg);
  font-size: 13px;
}

.feature h3 {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.feature p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

.guide-teaser p {
  margin: 0;
}

.archive-more {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 14px;
}

/* Email signup */

.subscribe {
  margin: 20px 0 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.subscribe-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.subscribe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subscribe-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.subscribe-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.subscribe .button {
  border: 0;
  cursor: pointer;
}

.subscribe-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.issue-subscribe {
  margin-top: 40px;
}

/* Lists of issues, on the homepage and on issues/index.html */

.issue-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.issue-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.issue-entry:first-child {
  border-top: 1px solid var(--border);
}

.issue-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  color: var(--text);
  text-decoration: none;
}

.issue-link time {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.issue-link:hover time {
  color: var(--accent);
  text-decoration: underline;
}

.issue-count {
  color: var(--muted);
  font-size: 14px;
}

.issue-intro {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}

/* About PEPs: what a PEP is, its statuses and types, and how an issue shows
   them. */

.guide h2 {
  margin: 36px 0 8px;
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: -0.01em;
}

.guide p {
  margin: 0 0 14px;
}

.guide-list {
  margin: 0 0 14px;
}

/* One row per term: its badge or name, then what it means. */
.guide-list > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  align-items: baseline;
  gap: 4px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.guide-list > div:first-child {
  border-top: 0;
}

.guide-list dt,
.guide-list dd {
  margin: 0;
}

.guide-list dd {
  font-size: 16px;
}

.guide-term {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 650;
}

.guide-more {
  color: var(--muted);
}

@media (max-width: 540px) {
  .guide-list > div {
    grid-template-columns: 1fr;
  }
}

/* Issue page */

.issue-head {
  padding: 16px 0 8px;
}

.issue-head h1 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: -0.03em;
}

.meta-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.toc {
  margin: 28px 0 8px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.toc h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc-group {
  margin: 12px 0 2px;
  font-size: 14px;
  font-weight: 600;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 15px;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.group-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 40px 0 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-count {
  color: var(--muted);
  font-weight: 500;
}

/* One PEP */

.pep {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.pep:last-child {
  border-bottom: 0;
}

/* The badge row: status, Python version, and topics. */
.pep-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 6px;
}

.pep-kicker .pep-number {
  margin-right: 2px;
}

.pep-number {
  font-family: var(--mono);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.pep-kicker .pep-number {
  font-size: 14px;
  color: var(--muted);
}

.pep-title {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.pep-title a {
  color: var(--text);
  text-decoration-color: var(--border);
}

.pep-title a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.pep-summary {
  margin: 0 0 14px;
}

.status {
  flex: none;
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  white-space: nowrap;
}

.status-good {
  color: var(--good);
  background: var(--good-bg);
}

.status-warn {
  color: var(--warn);
  background: var(--warn-bg);
}

.status-bad {
  color: var(--bad);
  background: var(--bad-bg);
}

.status-neutral {
  color: var(--neutral);
  background: var(--neutral-bg);
}

.status-info {
  color: var(--info);
  background: var(--info-bg);
}

/* The Python version a PEP targets, in its own colour (Gruvbox blue). */
.version {
  color: var(--version);
  background: var(--version-bg);
  font-variant-numeric: tabular-nums;
}

/* A value before and after its change: the old badge, an arrow, the new badge. */
.transition {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* The value before the change: faded and struck through. */
.status-was,
.tag-was {
  opacity: 0.6;
  text-decoration: line-through;
}

/* A fact, not a status: a topic, an end of life, or a new Python version. */
.tag {
  flex: none;
  display: inline-block;
  padding: 0 8px;
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  color: var(--neutral);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag-new {
  color: var(--accent);
  border-color: currentColor;
}

.tag-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.example {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--code-bg);
  border-radius: 8px;
  font-size: 15px;
}

.example-code {
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre;
}

.example-scenario {
  border-left: 3px solid var(--border);
  border-radius: 0 8px 8px 0;
  white-space: pre-line;
}

.example-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.change-arrow {
  color: var(--faint);
  font-size: 13px;
}

/* The quiet line closing a card: authors or date on the left, links on the right. */
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
  color: var(--muted);
  font-size: 14px;
}

.byline-facts {
  margin: 0 auto 0 0;
}

.byline-facts a {
  color: inherit;
  text-decoration-color: var(--border);
}

.byline-facts a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.byline-facts s {
  color: var(--faint);
}

.byline-sep {
  margin: 0 7px;
  color: var(--faint);
}

.byline-link {
  font-weight: 600;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  white-space: nowrap;
}

.byline-link:hover {
  text-decoration-color: currentColor;
}

.overflow {
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Changes past the cap: one line each, no note */

.more-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.more-list li {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

.more-list li:first-child {
  border-top: 0;
}

.more-list a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.more-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.more-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 4px 0 0;
}

.more-list .byline {
  margin-top: 4px;
}

/* Python releases: one card per release, then the version support list */

.release-highlights {
  margin: 0 0 14px;
  padding-left: 20px;
}

.release-highlights li {
  padding: 2px 0;
}

.release-highlights li::marker {
  color: var(--faint);
}

/* The last release card's bottom rule sits above this heading. */
.subgroup-heading {
  margin: 0;
  padding: 18px 0 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.support-list > li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.support-list > li:first-child {
  border-top: 0;
}

.support-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 4px;
  font-weight: 650;
}

.support-head > a,
.support-head > span:first-child {
  margin-right: 2px;
}

.support-head a {
  color: var(--text);
  text-decoration-color: var(--border);
}

.support-head a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.support-note {
  margin: 0;
  font-size: 16px;
}

.issue-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 40px;
  font-size: 15px;
}

.issue-nav-all {
  margin: 0 auto;
}
