/* Doodle CSS
 * https://github.com/chr15m/DoodleCSS
 * Edited by Michael
 */
@import url('https://fonts.googleapis.com/css2?family=Short+Stack&display=swap');

body {
    margin: auto;
    max-width: 40em;
}

header, footer {
    text-align: center;
}

img {
    max-width: 100%;
}

:root {
    --bg: light-dark(white, #333);
    
    --frame-light: light-dark(#ccc, #b64);
    --frame: light-dark(#aaa, #a53);
    --frame-dark: light-dark(#666, #942);
    --shadow: light-dark(gray, black);
    --pen: light-dark(black, white);
    --pen-link: light-dark(#11b, white);
    --pen-heading: light-dark(#d22, white);
    --pen-line: light-dark(#2c7, white);

    --line: 1.5pt solid var(--pen-line);

    scrollbar-color: var(--pen) var(--frame);
}

body {
    font-family: 'Short Stack', cursive;
    padding: 18pt;
}

* {
    color-scheme: dark light;
  box-sizing: border-box;
}

html {
    background-color: var(--bg);
    color: var(--pen);

    box-shadow:
        var(--frame-light) 2pt 2pt 1pt 0 inset,        /* outer highlight */
        var(--frame-dark) -2pt -2pt 1pt 0 inset,      /* outer lowlight */
        var(--frame) 0 0 1pt 8pt inset,          /* main frame body */
        var(--frame-light) -10pt -10pt 0 0 inset,    /* inner highlight */
        var(--frame-dark) 10pt 10pt 0 0 inset,      /* inner lowlight */
        var(--shadow) 1pt 1pt 11pt 11pt inset; /* shadow on board */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--pen-heading);
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: inherit;
}

h1 { font-size: xxx-large; }

a {
    color: var(--pen-link);
    font-weight: bold;
}

ul li {
  list-style-type: "* ";
}

label {
  padding: 0.25em 0px;
  display: inline-block;
}

article {
    margin-block: 10pt;
    padding-inline: 10pt;
}

article, figure > img {
    border: var(--line);
    border-radius: 2pt;
    /*
    box-shadow: var(--shadow) 1pt 1pt 3pt 1.5pt;
   */
}

figure > img {
/*    border-color: var(--pen);*/
}

fieldset, textarea {
  border-style: solid;
  border-width: 10px 10px 10px 10px;
  border-image: url(border.svg) 10 10 10 10 stretch stretch;
}

button, input, select, input[type="file"]::file-selector-button, hr {
    border: var(--line);
    border-radius: 2pt;
}

button {
    color: var(--pen-line);
    text-align: center;
}

button:hover {

    border-style: dashed;
}

button:active {
    color: var(--bg);
    background-color: var(--pen-line);
}

input[type="color"] {
  min-height: 1.5em;    
}

blockquote {
  border-left-style: solid;
  border-width: 0px 6px 3px 6px;
  border-image: url(bq.svg) 0 6 3 6 stretch stretch;
  padding-left: 0.5em;
  border-right-width: 0px;
}

pre {
  overflow: auto;
}

table {
  border-collapse: collapse;
  overflow: auto;
  display: block;
}

table thead {
  border-bottom: var(--line);
}

table caption {
  border-bottom-style: solid;
  border-width: 0px 3px 6px 3px;
  border-image: url(hr.svg) 0 3 6 3 stretch stretch;
}

table td {
  vertical-align: top;
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 1.5em;
  background: url(caret.svg) no-repeat right transparent;
  background-position-x: calc(100% - 10px);
}

select[multiple] {
  background: none;
  padding: 0px;
}

textarea, input, select {
  background-color: unset;
  font-family: 'Short Stack', cursive;
  font-size: medium;
  color: var(--pen);
}

button {
  background-color: unset;
  font-family: 'Short Stack', cursive;
  font-size: medium;
  color: var(--pen-line);
}

button:disabled {
  color: grey;
}

input[type="checkbox"] {
  border-width: 6px 6px 6px 6px;
  border-image: url(checkbox.svg) 6 6 6 6 stretch stretch;
}

input[type="radio"] {
  border-width: 16px 16px 16px 16px;
  border-image: url(radio.svg) 16 16 16 16 stretch stretch;
}

input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  outline: 0;
  background: transparent;
  width: 1.5em;
  height: 1.5em;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

input[type="checkbox"]:after, input[type="radio"]:after {
  font-size: 1.25em;
  content: " ";
  margin-bottom: -0.25em;
}

input[type="checkbox"]:disabled:after, input[type="radio"]:disabled:after {
  content: "-";
  color: grey;
}

input[type="checkbox"]:checked:after, input[type="radio"]:checked:after {
  content: "*";
}

input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 0.8em;
  font-size: 1em;
  background-color: unset;
  color: var(--pen)
}

button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline-offset: -8px;
  outline: 2px dashed var(--pen);
  /* outline: transparent;
  filter: drop-shadow(0 0 3px #4d90fe) brightness(1.1) saturate(1.2); */
}

input, textarea, table, img {
  max-width: 100%;
}

fieldset * {
  max-width: calc(100vw - 100px);
}

table {
  overflow: scroll;
}
