@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --text: light-dark(#333, #ddd);
  --ink: light-dark(#111, #f2f2f2);
  --muted: light-dark(#6b6b6b, #a3a3a3);
  --line: light-dark(#d9d9d9, #444);
  --soft: light-dark(#f5f5f5, #222);
  --error: light-dark(#c62828, #ff8a80);
  accent-color: var(--ink);
  color: var(--text);
  font: 13px/1.5 Montserrat, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

main {
  margin: auto;
  max-width: 1200px;
}

hgroup,
.done {
  text-align: center;
}

hgroup {
  margin-bottom: 40px;

  & p {
    font-size: 22px;
  }
}

h1 {
  margin: 0;
  font-size: 30px;
}

h2,
h3,
legend {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

a {
  color: inherit;
}

small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

hgroup + ol {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  list-style: none;

  & li {
    flex: 1 1 240px;
    padding: 24px;
    background: var(--soft);
    text-align: center;
  }

  & li::before {
    content: counter(list-item);
    display: grid;
    place-items: center;
    width: 36px;
    aspect-ratio: 1;
    margin: auto;
    border-radius: 50%;
    background: var(--ink);
    color: Canvas;
    font-weight: 700;
  }

  & p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
  }
}

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 0 64px;

  & > :last-child {
    grid-column: 1 / -1;
    text-align: center;
  }
}

fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
  counter-increment: product;

  &:only-of-type [command=--remove],
  &:not(:has(option:last-child:checked)) label:has([name=reasonOther]) {
    display: none;
  }
}

legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 28px 0 12px;
  padding: 0;

  &::before {
    content: "Produkt " counter(product);
  }
}

label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);

  &:has(> [type=checkbox]) {
    display: flex;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: inherit;
  }
}

input:not([type=checkbox]),
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 0;
  background: Field;
  color: var(--text);
  font: inherit;
  font-size: 13px;

  @media (pointer: coarse) {
    font-size: 16px;
  }

  &:focus {
    outline: none;
    border-color: var(--ink);
  }

  &:user-invalid {
    border-color: var(--error);
  }

  &:disabled {
    opacity: 50%;
  }
}

textarea {
  field-sizing: content;
  min-block-size: 6lh;
  resize: vertical;
}

[type=number] {
  width: 7rem;
}

::placeholder {
  color: var(--muted);
  opacity: .67;
}

::file-selector-button {
  margin-right: 12px;
  padding: 6px 14px;
  border: 0;
  background: var(--ink);
  color: Canvas;
  font: inherit;
  font-weight: 700;
}

button {
  width: 100%;
  padding: 14px;
  border: 1.5px dashed var(--ink);
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

[type=submit] {
  max-width: 420px;
  margin: 40px 0 12px;
  border-style: solid;
  background: var(--ink);
  color: Canvas;

  form:invalid & {
    opacity: .6;
  }

  form[aria-busy=true] & {
    border-color: var(--error);
    background: none;
    color: var(--error);
  }
}

[command=--remove] {
  width: auto;
  padding: 6px 12px;
  border: 1.5px solid var(--error);
  color: var(--error);
  font-size: 11px;

  &:hover {
    background: var(--error);
    color: Canvas;
  }
}

output {
  display: block;
  color: var(--error);
}

.done {
  max-width: 640px;

  & svg {
    width: 32px;
    vertical-align: middle;
  }

  & output {
    margin: 8px 0 20px;
    padding: 24px;
    background: var(--soft);
    color: inherit;
    font-size: 28px;
    font-weight: 700;
  }

  & a {
    display: inline-block;
    padding: 14px 28px;
    background: var(--ink);
    color: Canvas;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
  }
}
