* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #e6e0d4;
  color: #1c1916;
  font-family: Inter, "Noto Sans", sans-serif;
  font-synthesis: none;
}

main {
  display: grid;
  grid-template-columns: minmax(300px, 460px) minmax(300px, 1fr);
  gap: 36px;
  align-items: start;
  min-height: 100vh;
  padding: 32px 40px 48px;
}

.mark {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5e574e;
}

h1 {
  margin: 0;
  font-family: "Libre Baskerville", serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.1;
}

.lede {
  margin: 12px 0 22px;
  max-width: 38em;
  font-size: 16px;
  line-height: 1.45;
  color: #3f3a34;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #3f3a34;
}

input, textarea, select {
  width: 100%;
  border: 1px solid #c9c0b2;
  border-radius: 6px;
  background: #fffcf7;
  color: #1c1916;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.4;
}

input[type="color"] {
  height: 44px;
  padding: 6px;
}

.picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pick {
  display: grid;
  gap: 8px;
  align-content: start;
}

.upload-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.file-button {
  position: relative;
  display: inline-flex;
  width: auto;
  border: 1px solid #1c1916;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  color: #1c1916;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.file-note {
  min-height: 1.2em;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.file-note.error {
  color: #8a2e24;
}

.hint, .fine {
  margin: 0;
  max-width: 46em;
  font-size: 13px;
  line-height: 1.4;
  color: #5e574e;
}

button {
  justify-self: start;
  border: 0;
  border-radius: 6px;
  background: #1c1916;
  color: #fffcf7;
  font: inherit;
  font-size: 15px;
  padding: 11px 16px;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: #1c1916;
  border: 1px solid #1c1916;
}

button.linkish {
  border: 0;
  background: transparent;
  color: #1c1916;
  padding: 0;
  font-size: 13px;
  text-decoration: underline;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button:hover:not(:disabled) {
  background: #34302b;
  color: #fffcf7;
}

button.secondary:hover:not(:disabled),
button.linkish:hover:not(:disabled) {
  background: transparent;
  color: #34302b;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

:focus-visible {
  outline: 2px solid #1c1916;
  outline-offset: 2px;
}

#status {
  min-height: 1.2em;
  margin: 0;
  font-size: 14px;
}

#status.error {
  color: #8a2e24;
}

.stage {
  display: flex;
  justify-content: center;
}

.sheet {
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  min-height: 720px;
  padding: 28px 26px 22px;
  background: #fffcf7;
  color: #1c1916;
  box-shadow: 0 16px 40px rgba(48, 38, 22, 0.14);
  font-synthesis: none;
}

.sheet-label,
.swatch-label,
.sheet-names span,
.license,
.style-line span {
  font-family: Inter, "Noto Sans", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
}

.sheet-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a6258;
}

.sheet-headline {
  margin: 0.55em 0 0.35em;
  font-weight: 400;
  font-style: normal;
  font-size: 32px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.sheet-body {
  margin: 0;
  font-weight: 400;
  font-style: normal;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.swatch-label {
  margin: 0 0 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a6258;
}

.on-color,
.in-color {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
  font-style: normal;
}

.on-color {
  border: 1px solid #ddd4c6;
}

.scale {
  margin-top: 16px;
}

.scale p {
  margin: 0;
  font-weight: 400;
  font-style: normal;
  line-height: 1.15;
}

.scale-headline { font-size: 26px; }
.scale-subhead { font-size: 18px; }
.scale-body { font-size: 14px; }
.scale-caption { font-size: 11px; }

.specimens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.specimens section {
  min-width: 0;
  font-weight: 400;
  font-style: normal;
}

.specimen-name {
  display: block;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.license {
  margin: 3px 0 6px;
  font-size: 11px;
  line-height: 1.3;
  color: #6a6258;
}

.style-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  margin: 2px 0;
}

.style-line span {
  flex: 0 0 auto;
  font-size: 11px;
  color: #6a6258;
}

.style-line b {
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  font-synthesis: none;
}

.style-line.bold b {
  font-weight: 700;
}

.style-line.italic b {
  font-style: italic;
}

.charset {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.sheet-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #ddd4c6;
}

.sheet-names span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a6258;
}

.sheet-names strong {
  display: block;
  font-weight: 400;
  font-style: normal;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

noscript {
  display: block;
  padding: 16px 20px;
  background: #fff4e8;
}

@media (min-width: 861px) {
  .stage {
    position: sticky;
    top: 24px;
  }
}

@media (max-width: 860px) {
  main {
    grid-template-columns: 1fr;
    padding: 24px 18px 40px;
  }

  .picks,
  .specimens,
  .color-row {
    grid-template-columns: 1fr;
  }
}
