:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #15291f;
  background: #f4f7f2;
  line-height: 1.6;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #18523c; }
a:focus-visible, button:focus-visible { outline: 3px solid #2465b7; outline-offset: 4px; }

.shell {
  width: min(52rem, calc(100% - 2rem));
  margin-inline: auto;
}

header { padding-block: 1.75rem; }
.wordmark { color: inherit; font-weight: 800; font-size: 1.35rem; text-decoration: none; }
.wordmark span { color: #286b4d; }
main { padding-block: clamp(2rem, 7vw, 4.5rem) 2rem; }
h1 { max-width: 18ch; font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.1; letter-spacing: -.045em; margin: .35rem 0 1rem; }
.lede { max-width: 42rem; font-size: 1.15rem; }
.eyebrow { color: #38564a; font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }

.cards, .measurements { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.card { padding: 1.25rem; border: 1px solid #cbd9cd; border-radius: 1rem; background: #fff; }
a.card { display: grid; gap: .35rem; color: inherit; text-decoration: none; }
a.card:hover { border-color: #286b4d; }
a.card strong { color: #18523c; font-size: 1.25rem; text-decoration: underline; }
.measurements dt { font-weight: 650; }
.measurements dd { margin: .2rem 0 0; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
meter { display: block; width: 100%; height: 1.4rem; }
.feedback { min-height: 1.6em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

button {
  border: 1px solid #18523c;
  border-radius: .55rem;
  background: #18523c;
  color: white;
  padding: .55rem .9rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { color: #415349; background: #e1e8e0; border-color: #cbd9cd; cursor: default; }
footer { color: #38564a; border-top: 1px solid #cbd9cd; padding-block: 1rem 2rem; }

.test-area {
  min-height: 12rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 2px dashed #46725f;
  border-radius: .65rem;
  text-align: center;
}
.test-area:focus-visible { outline: 3px solid #2465b7; outline-offset: 4px; }
.preview { width: min(100%, 38rem); aspect-ratio: 4 / 3; object-fit: contain; background: #15291f; }
.pixel-panel {
  display: flex;
  align-items: end;
  min-height: 22rem;
  padding: .75rem;
  background: #000;
}
.pixel-panel[data-color="white"] { background: #fff; }
.pixel-panel[data-color="red"] { background: #f00; }
.pixel-panel[data-color="green"] { background: #0f0; }
.pixel-panel[data-color="blue"] { background: #00f; }
.pixel-panel[data-pattern="grayscale"] {
  background: linear-gradient(to right, #000 20%, #404040 20% 40%, #808080 40% 60%, #bfbfbf 60% 80%, #fff 80%);
}
.pixel-panel[data-pattern="gradient"] { background: linear-gradient(to right, #000, #fff); }
.pixel-panel[data-pattern="contrast"] {
  background: conic-gradient(#111 25%, #eee 0 50%, #111 0 75%, #eee 0) 0 0 / 5rem 5rem;
}
.pixel-panel:fullscreen { width: 100%; height: 100%; }
.pixel-controls { display: grid; gap: .35rem; padding: .5rem; border-radius: .55rem; background: #fff; }
.pixel-controls p { margin: 0; }
.checklist { padding-inline-start: 1.5rem; }
.checklist li { margin-block: .75rem; }

#touch-area {
  display: block;
  width: 100%;
  background: #edf5ee;
  outline: 2px dashed #46725f;
  border-radius: .5rem;
  touch-action: none;
}

main > .card + .card { margin-block-start: 1rem; }
fieldset { min-width: 0; }
fieldset > .actions + .actions { margin-block-start: 1rem; }
input, textarea { font: inherit; }
input:focus-visible, textarea:focus-visible { outline: 3px solid #2465b7; outline-offset: 2px; }
.rule-dimensions { display: flex; flex-wrap: wrap; gap: .75rem; }
.rule-dimensions input { display: block; width: 8rem; max-width: 100%; }
.share-fields { display: grid; gap: .55rem; }
.share-fields textarea { width: 100%; min-width: 0; padding: .4rem; resize: vertical; }
.share-fields button { justify-self: start; }
.share-fields p { margin-block: 0; }

.call-nav { margin-block-start: 1rem; }

.quick-check h1 { max-width: 23ch; }
.primary-reading {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 3.2rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.quick-check details { margin-block: 1rem; }
.quick-check summary { cursor: pointer; }
.quick-report { width: 100%; }

.quick-check #stop:disabled { display: none; }
