/* reset from https://www.joshwcomeau.com/css/custom-css-reset/ */
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Increase line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}

/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}
/* end reset */


:root {
  --measure: 60ch;
    --ratio: 1.5;
    --s0: 1rem;
    --s1: calc(var(--s0) * var(--ratio));
    --s2: calc(var(--s1) * var(--ratio));
    --s3: calc(var(--s2) * var(--ratio));
    --s4: calc(var(--s3) * var(--ratio));
    --s5: calc(var(--s4) * var(--ratio));
    --s-5: calc(var(--s-4) / var(--ratio));
    --s-4: calc(var(--s-3) / var(--ratio));
    --s-3: calc(var(--s-2) / var(--ratio));
    --s-2: calc(var(--s-1) / var(--ratio));
    --s-1: calc(var(--s0) / var(--ratio));
}

* {
  max-inline-size: var(--measure);
}

html,
body,
div,
header,
nav,
main,
footer{
  max-inline-size: none;
}

body {
    font-size: 16px;
    font-family: sans-serif;
}

.center {
    /* ↓ Remove padding from the width calculation */
    box-sizing: content-box;
    /* ↓ The maximum width is the maximum measure */
    max-width: var(--measure);
    /* ↓ Only affect horizontal margins */
    margin-left: auto;
    margin-right: auto;
    /* ↓ Apply the minimum horizontal space */
    padding-left: var(--s1);
    padding-right: var(--s1);
}

.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stack > * {
  margin-block: 0;
}

.stack > * + * {
  margin-block-start: var(--space, 1.5rem);
}

main > section.stack {
    --space: var(--s1);
}

figure {
    padding: var(--s1);
    border: 1px black solid;
    background-color: white;
    box-shadow: 5px 10px 10px grey;
}

#button-info {
    background-color: #0088cc;
    color: white;
    padding: var(--s1);
}
#button-info > * {
    --space: var(--s-1);
}

#button-info pre {
    background-color: black;
    padding: 0.5rem;
    border-radius: 1rem;
    overflow: scroll;
}
#button-info code{
    font-family: monospace;
    color: lime;
}
