/* Struck. A museum object label under a row of keys. Light scheme only: the label is paper. */
* { box-sizing: border-box; border-radius: 0; }
html { background: var(--c-cream); }
body {
  margin: 0;
  background: var(--c-cream);
  color: #1A1A1A;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
main { max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; }
[hidden] { display: none !important; }

header .wordmark { display: block; width: 140px; height: auto; }
h1 { font-size: clamp(64px, 16vw, 112px); font-weight: var(--fw-bold); line-height: 1; letter-spacing: -0.03em; margin: 48px 0 12px; }
.lede { font-size: clamp(22px, 5vw, 28px); font-weight: var(--fw-thin); margin: 0 0 40px; }

.field-label { display: block; font-size: 14px; margin-bottom: 6px; }
#name {
  display: block; width: 100%; max-width: 420px;
  font: inherit; font-size: 18px; color: #1A1A1A;
  background: var(--c-cream); border: 1px solid #1A1A1A; padding: 10px 12px;
}
#name:focus-visible { outline: 2px solid #1A1A1A; outline-offset: 2px; }

.ways { display: flex; flex-wrap: wrap; gap: 16px; margin: 20px 0 12px; align-items: stretch; }
button {
  font: inherit; color: #1A1A1A; background: transparent;
  border: 1px solid #1A1A1A; padding: 12px 22px; cursor: pointer;
}
button:hover:not(:disabled) { background: #1A1A1A; color: var(--c-cream); }
button:focus-visible { outline: 2px solid #1A1A1A; outline-offset: 2px; }
button:disabled { color: var(--ink-soft); border-color: var(--ink-soft); cursor: not-allowed; }
#listen, #stop { min-width: 132px; font-size: 18px; }

/* The drop box: four corner marks, like the guide marks on a copier glass. */
.drop {
  position: relative; flex: 1 1 260px; display: flex; align-items: center;
  min-height: 72px; padding: 14px 20px; cursor: pointer; font-size: 15px;
}
.drop .mk { position: absolute; width: 12px; height: 12px; border: 0 solid #1A1A1A; }
.drop .tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.drop .tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.drop .bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.drop .br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.drop.over { outline: 1px solid #1A1A1A; }
.drop:focus-within { outline: 2px solid #1A1A1A; outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

.hint { font-size: 14px; color: var(--ink-soft); margin: 0 0 24px; }
#status, #error, .hint { text-wrap: pretty; }
#status { min-height: 1.45em; margin: 0 0 8px; font-size: 17px; }
.level { width: 100%; max-width: 420px; height: 4px; background: rgba(26, 26, 26, 0.1); margin-bottom: 8px; }
.level i { display: block; height: 100%; width: 0; background: var(--c-mustard); }
#error { min-height: 1.45em; margin: 0; color: var(--error); }

#label-wrap { margin: 8px 0 24px; }
#label { display: block; max-width: 100%; height: auto; }

#keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin-bottom: 24px; }
.key {
  min-height: 88px; padding: 10px 6px 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  font-size: 20px; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.key::after { content: attr(data-letter); font-size: 12px; color: var(--ink-soft); }
.key:hover:not(:disabled) { background: transparent; color: #1A1A1A; }
.key:active, .key:active:hover, .key.down, .key.down:hover {
  background: #1A1A1A; color: var(--c-cream); outline: 3px solid var(--c-mustard); outline-offset: -3px;
}
.key:active::after, .key.down::after { color: var(--c-cream); }

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

#notes { margin-top: 64px; padding-top: 14px; border-top: 1px solid #1A1A1A; font-size: 13px; color: var(--ink-soft); }
#notes h2 { font-size: 13px; font-weight: var(--fw-bold); margin: 0 0 6px; color: #1A1A1A; }
#notes ol { margin: 0; padding-left: 22px; }
#notes li { margin: 0 0 4px; }
code { font-family: ui-monospace, monospace; font-size: 12px; }

@media print {
  header, #intake, #keys, .actions, #notes, button { display: none !important; }
  main { padding: 0; }
  #label-wrap { margin: 0; }
}
