:root {
  color-scheme: light;

  --font: "Poppins", "Century Gothic", "Avenir Next", -apple-system,
          BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg:            #ffffff;
  --surface:       #ffffff;
  --surface-sunk:  #f6f6f6;
  --field:         #f1f1f1;
  --field-hover:   #e9e9e9;
  --border:        #e4e4e4;
  --border-strong: #cfcfcf;
  --ink:           #141414;
  --ink-soft:      #3d3d3d;
  --muted:         #757575;
  
  --lav:           #c4a8ff;
  --lav-soft:      #e6dbff;
  
  --lav-text:      #7c5ce0;
  
  --lav-deep:      #6d4ade;

  --link:          var(--lav-deep);
  --btn:           #101010;

  --radius:   8px;
  --font-num: 'Rubik', var(--font);
  --radius-s: 6px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--lav);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  
  font-weight: 300;
  line-height: 1.75;
}

b, strong { font-weight: 500; }

.wrap {

  width: calc(100% - clamp(20px, 3.2vw, 40px));
  
  max-width: calc(1018px + 2 * 26px);
  margin: clamp(10px, 1.6vw, 20px) auto;
  padding: clamp(20px, 3.4vw, 26px) clamp(16px, 4.2vw, 26px) 44px;
  background: var(--surface);
  border-radius: 12px;
}

@media (max-width: 600px) {
  .wrap { border-radius: 10px; }

  .downloads { grid-template-columns: 1fr; }
}

code { font-size: 0.92em; }

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  
  gap: clamp(20px, 2.4vw, 36px);
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 800px) {
  .masthead { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
}

.masthead__brand {
  grid-column: 2;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.masthead__mark {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--lav-text);
  text-decoration: none;
}

.masthead__nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  
  gap: clamp(12px, 1.6vw, 18px);
}

@media (max-width: 800px) {
  .masthead__brand, .masthead__nav { grid-column: 1; justify-self: center; }
  
  .masthead__nav { flex-wrap: wrap; justify-content: center; }
}

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

.masthead__nav a:hover { color: var(--lav-deep); }

.masthead__nav a[aria-current="page"] {
  color: var(--lav-deep);
  text-decoration: underline;
  text-decoration-color: var(--lav);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.wrap--centered { text-align: center; }

.wrap--centered p,
.wrap--centered .lede,
.wrap--centered .qa,
.wrap--centered .stat,
.wrap--centered .downloads,
.wrap--centered .license {
  margin-left: auto;
  margin-right: auto;
}

h1, h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 36px 0 12px;
  color: var(--lav-text);
}

.badge {
  display: inline-block;
  vertical-align: 1px;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--lav);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

main > :first-child { margin-top: 36px; }

p { margin: 0 0 18px; max-width: 76ch; }

a {
  color: var(--ink);
  text-decoration-color: var(--lav-text);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover { color: var(--lav-deep); text-decoration-color: currentColor; }

.lede { font-size: 15px; max-width: 74ch; }

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

.small { font-size: 12.5px; }

.jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 26px;
}

.jump a {
  padding: 7px 16px;
  border: 1px solid var(--lav);
  border-radius: 999px;
  color: var(--lav-deep);
  text-decoration: none;
}

.jump a:hover { background: var(--lav-soft); }

@media (prefers-reduced-motion: no-preference) {
  html:has(.jump) { scroll-behavior: smooth; }
}

.qa-section {
  max-width: 76ch;
  margin-left: auto;
  margin-right: auto;
  
  scroll-margin-top: 16px;
}

.qa-section > h2 { margin-top: 0; }

.qa-section + .qa-section {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 30px;
}

.qa { margin: 0 0 26px; max-width: 76ch; }

.qa__q {
  font-weight: 500;
  margin: 0 0 4px;
}

.qa__a { margin: 0; color: var(--ink-soft); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.panel__body { padding: 16px; }

.panel--sunk {
  background: var(--surface-sunk);
  border-color: var(--border);
}

.field { display: block; margin-bottom: 4px; }

.field__label { font-weight: 500; display: block; margin-bottom: 8px; }

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  padding: 9px 11px;
  appearance: none;
  cursor: pointer;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: right 15px center, right 10px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

select:hover { background-color: var(--field-hover); }

select:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--btn);
  border: 1px solid var(--btn);
  border-radius: var(--radius-s);
  padding: 11px 18px;
  cursor: pointer;
}

.btn:hover { background: #2c2c2c; }

.btn--ghost {
  color: var(--ink);
  background: var(--field);
  border-color: transparent;
  font-weight: 400;
}

.btn--ghost:hover { background: var(--field-hover); }

.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.downloads {
  display: grid;
  
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 18px;
  max-width: 76ch;
}

.downloads a {
  display: block;
  text-align: center;
  padding: 13px 10px;
  border: 1px solid var(--lav);
  border-radius: 999px;
  color: var(--lav-deep);
  text-decoration: none;
}

.downloads a:hover { background: var(--lav-soft); }

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  max-width: 76ch;
  margin: 0 0 18px;
}

.stat p { margin: 0; line-height: 1.6; max-width: none; }

.license {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}
