:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #68655f;
  --paper: #f6f2e9;
  --surface: #fffdf8;
  --line: #d8d1c3;
  --accent: #7752e8;
  --accent-dark: #5b3bc2;
  --focus: #ffb703;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgb(119 82 232 / 12%), transparent 34rem),
    var(--paper);
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  transform: translateY(-200%);
}

.skip:focus {
  transform: translateY(0);
}

header,
main,
footer {
  width: min(100% - 2rem, 68rem);
  margin-inline: auto;
}

header {
  padding-block: 1.5rem;
}

header > a {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

main {
  min-height: 42vh;
  padding: clamp(2rem, 6vw, 5.5rem);
  background: rgb(255 253 248 / 88%);
  border: 1px solid rgb(216 209 195 / 80%);
  border-radius: 1.5rem;
  box-shadow: 0 1.5rem 4rem rgb(54 43 27 / 9%);
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 14ch;
  margin-block: 0 1rem;
  font-size: clamp(2.25rem, 7vw, 4.75rem);
}

h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

p {
  max-width: 68ch;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  color: white;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  background: var(--accent);
  border: 0;
  border-radius: 0.65rem;
  cursor: pointer;
}

.button:hover,
button:hover {
  color: white;
  background: var(--accent-dark);
}

section {
  margin-block: 2rem;
}

.legal-draft-banner {
  max-width: 48rem;
  padding: 1rem 1.25rem;
  color: #4b2500;
  background: #fff0c2;
  border: 2px solid #a85b00;
  border-radius: 0.75rem;
}

.legal-draft-banner p {
  margin: 0.4rem 0 0;
}

.receipt-summary {
  max-width: 36rem;
  margin-block: 1.5rem;
  border-block: 1px solid var(--line);
}

.receipt-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.receipt-summary > div + div {
  border-top: 1px solid var(--line);
}

.receipt-summary dt {
  font-weight: 700;
}

.receipt-summary dd {
  margin: 0;
  text-align: right;
}

.pool {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
}

.pool > div,
.recipient,
.flash {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.pool b {
  display: block;
  font-size: 1.35rem;
}

.recent-usage {
  margin-block: 1.25rem;
}

.recent-usage h4,
.usage-empty {
  margin-block: 0 0.5rem;
}

.usage-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.recent-usage table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.recent-usage th,
.recent-usage td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.recent-usage th {
  color: var(--muted);
  font-size: 0.85rem;
}

.badge-readme {
  margin-block: 1.25rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.badge-readme h4,
.badge-preview-label,
.badge-markdown-label {
  margin-block: 0 0.5rem;
}

.badge-preview {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 1rem;
}

.badge-preview img {
  display: block;
  max-width: 100%;
  height: auto;
}

.badge-markdown {
  margin-block: 0 0.75rem;
}

.badge-copy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.badge-copy-button[hidden] {
  display: none;
}

.badge-copy-feedback {
  min-height: 1.6em;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.show-once-heading,
.show-once-copy-row,
.show-once-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.show-once-heading {
  justify-content: space-between;
}

.show-once-heading h2 {
  margin-block: 0;
}

.show-once-copy-row pre {
  flex: 1 1 28rem;
  margin-block: 0;
}

.show-once-copy-feedback {
  min-height: 1.6em;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

[data-show-once-dismiss][hidden],
[data-virtual-key-copy-button][hidden],
[data-setup-copy-button][hidden] {
  display: none;
}

.packs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.packs button {
  flex-direction: column;
}

label {
  display: block;
  margin-block: 1rem;
  font-weight: 650;
}

input {
  display: block;
  width: min(100%, 30rem);
  min-height: 2.75rem;
  margin-top: 0.35rem;
  padding: 0.5rem 0.7rem;
  color: var(--ink);
  font: inherit;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

pre {
  max-width: 100%;
  padding: 1rem;
  overflow-x: auto;
  background: #242228;
  color: #f7f3ff;
  border-radius: 0.65rem;
}

.error {
  color: #a31f34;
  font-weight: 700;
}

footer {
  padding-block: 2.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 36rem) {
  main {
    padding: 1.5rem;
    border-radius: 1rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  button,
  a {
    transition:
      color 120ms ease,
      background-color 120ms ease;
  }
}
