:root {
  --body-bg: #fbfbfb;
  --text-color: #403f53;
  --link-color: #0077cc;
  --link-hover-color: #004466;
  --link-visited-color: #440099;
  --link-visited-hover-color: #220066;
  --border-color: #282828;
  --code-bg: #f6f6f6;
  --code-color: #403f53;
  --code-border-color: #282828;
  --max-chars: 60ch;
}
* {
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro,
    sans-serif;
  font-weight: normal;
  line-height: 1.5;
}


body {
  margin: 0 auto;
  padding: 0 0.5rem;
}

/**  */
html { font-size: 16px; }
/** 1.125 — Major second */
h1 { font-size: 1.424rem; }
h2 { font-size: 1.266rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.889rem; }
h6 { font-size: 0.79rem; }
.layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
}
section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: start;
  align-items: start;
  min-width: 100%;
}
#tool {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
  max-width: var(--max-chars);
}

header {
  max-width: var(--max-chars);
  margin: 0 auto;
}
article {
  max-width: var(--max-chars);
  margin: 0 auto;
}
footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}
ul,
ol {
  padding-left: 1rem;
}



#shadow-host {
  max-width: 100%;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: start;
  align-items: start;
  min-width: 100%;
}

.row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: start;
  align-items: start;
  min-width: 100%;
}

section#input > .column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: start;
  align-items: left;
  min-width: 100%;
}
.input-row {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: left;
  min-width: 100%;
}
.input-row > label {
  font-size: small;
  font-weight: bold;
}
.input-row > input,
select {
  height: 1.25rem;
  padding: 0 0.25rem;
}


#output {
  overflow: hidden !important;
  max-width: 100% !important;
}
pre {
  position: relative;
  margin: 5px 0;
  padding: 1.75rem 0 1.75rem 1rem;

  /* padding: 1rem 1rem; */
  white-space: pre-wrap;
  color: var(--code-color);
  background: linear-gradient(to left, var(--code-bg), var(--body-bg));
  border-left: 1px dashed var(--code-border-color);
  border-radius: 0 0.5rem 0 0;
  width: 100%;
}

pre {
  cursor: pointer;
}
pre::selection {
  background-color: rgba(
    0,
    123,
    255,
    0.3
  ); /* Light blue background when selected */
}

pre button {
  cursor: copy;
}

pre button {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 0.25rem 0.5rem;
  color: var(--code-color);
  /* border: 1px dashed var(--code-border-color); */
  border: none;

  border-radius: 0.5rem;
  background-color: var(--code-bg);
  font-family: ui-monospace, 'Cascadia Code', '
  Source Code Pro', Menlo,
    Consolas, 'DejaVu Sans Mono', monospace;
  font-weight: normal;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
pre button::before {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

pre button:hover {
  /* background-color: var(--body-bg); */
  filter: brightness(0.9);
}

pre button:active {
  background-color: var(--body-bg);
  filter: brightness(0.8);
}

pre button.clicked {
  outline: none;
  box-shadow: 0 0 0 2px var(--code-border-color);
}

code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas,
    'DejaVu Sans Mono', monospace;
  font-weight: normal;
  font-size: 0.9rem;
}

@media screen and (min-width: 600px) {
  #tool {
    margin: 0 auto;
  }
}

@media screen and (min-width: 1000px) {
  html { font-size: 18px; }
/** 1.125 — Major second */

h1 { font-size: 1.424rem; }
h2 { font-size: 1.266rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.889rem; }
h6 { font-size: 0.79rem; }
  .layout {
    display: grid;
    gap: 1rem;
    grid-template-areas:
      'header'
      'article'
      'tool';
    max-width: 60vw;
    margin: 0 auto;
  }
  header {
    grid-area: header;
    max-width: 50vw;
    align-self: flex-start;
    margin: 0;
  }
  header, article > p {
    max-width: var(--max-chars);
  }

  article {
    grid-area: article;
    align-self: flex-start;
    max-width: 50vw;
    margin: 0;
  }
  #tool {
    display: grid;
    gap: 1rem;
    grid-area: tool;
    grid-template-columns: 30ch auto;
    grid-template-areas:
    'chart chart'
    'input output'
    'additional additional';
    max-width: 60vw;
  }
  section#chart {
    grid-area: chart;
  }
  section#input {
    grid-area: input;
  }
  section#output {
    grid-area: output;
  }
  section#additional {
    grid-area: additional;
  }
}
