:root {
  touch-action: manipulation;
  color-scheme: light;
  color: #172033;
  background: white;
  font-family: system-ui, -apple-system, sans-serif;
  --accent: hsl(27 86% 51%);
  --accent-ink: hsl(27 85% 31%);
  --accent-soft: hsl(27 86% 51% / .1);
  --border: #e2e6ed;
  --muted: #586479;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main {
  width: min(100%, 30rem);
  margin: 0 auto;
  padding: max(1.15rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
}
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .35rem 1rem; border-bottom: 1px solid var(--border); }
.brand { display: block; width: 7rem; height: auto; }
h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); margin-block: 1.6rem .55rem; line-height: 1.07; letter-spacing: -.035em; }
p { margin-block: .6rem; line-height: 1.45; }
.muted { color: var(--muted); font-size: .875rem; }
progress { width: 100%; height: .375rem; accent-color: var(--accent); display: block; }
.step-header {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  margin-top: .45rem;
  padding-inline: 2.75rem;
}
#progress-label { margin: 0; text-align: center; font-variant-numeric: tabular-nums; }
#instruction { color: var(--muted); }
.question {
  margin-block: 1.5rem .65rem;
  font-size: clamp(1.375rem, 5.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}
#test { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
button {
  min-height: 2.8rem;
  border-radius: .7rem;
  border: 1px solid transparent;
  padding: .55rem .8rem;
  font: inherit;
  font-weight: 650;
  background: var(--accent);
  color: #172033;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: default; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.outline, .answer, .review-item { background: white; color: #172033; border-color: var(--border); }
.diagnostic-summary { margin-top: .7rem; }
.diagnostic-summary summary { padding: .55rem 0; color: var(--accent-ink); cursor: pointer; font-size: .875rem; font-weight: 650; }
.diagnostic-summary .diagnostic-details { margin-block: .25rem .8rem; }
.diagnostic-details { padding: .75rem; border: 1px solid var(--border); border-radius: .7rem; }
.diagnostic-details div { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .25rem; }
.diagnostic-details dd { margin: 0; color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.step-menu {
  position: absolute;
  inset-inline-end: 0;
  z-index: 2;
}
.step-menu summary {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .65rem;
  font-size: 1.5rem;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}
.step-menu summary::-webkit-details-marker { display: none; }
.step-menu summary:focus-visible { outline: 2px solid var(--accent); }
.step-menu-items {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 100%;
  min-width: 10rem;
  padding: .25rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: white;
  box-shadow: 0 .4rem 1rem rgb(23 32 51 / .1);
}
.step-menu-items button {
  display: block;
  width: 100%;
  text-align: start;
  background: transparent;
  color: #172033;
  font-size: .875rem;
}
.step-menu-items button:hover, .step-menu-items button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.checklist-actions { position: fixed; z-index: 1; inset: auto 0 0; border-top: 1px solid var(--border); background: white; touch-action: none; }
.checklist-actions-inner {
  width: min(100%, 30rem);
  margin-inline: auto;
  padding: .7rem max(1.25rem, env(safe-area-inset-right)) max(.5rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
}
.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.answer { border-radius: 999px; font-size: 1.35rem; line-height: 1; }
.answer[data-answer="sim"] { color: #187354; }
.answer[data-answer="nao"] { color: #942323; }
#instruction.settings-path {
  padding: 1rem;
  text-align: center;
  color: #172033;
  background: var(--accent-soft);
  border-radius: .85rem;
  font-size: clamp(1.2rem, 5.5vw, 1.65rem);
  font-weight: 700;
}
.answers .parts-history-answer { font-size: .9rem; border-radius: .7rem; }
.answers .parts-history-answer[data-answer] { color: var(--accent-ink); }
.battery-health { display: grid; justify-items: center; gap: .5rem; margin-top: .7rem; font-weight: 650; }
.battery-health-value { display: flex; align-items: baseline; gap: .35rem; font-size: 1.65rem; }
.battery-health-value input {
  width: 5rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  padding: .4rem;
  text-align: center;
  font: inherit;
  color: inherit;
  background: white;
}
.answers .answer[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
#tool { display: grid; gap: .65rem; margin-top: 1.1rem; }
#tool .outline { background: var(--accent-soft); color: var(--accent-ink); border-color: hsl(27 86% 51% / .38); }
#tool .tool-status { color: var(--muted); font-size: .875rem; margin-block: 0; }
#tool p:empty, #tool-feedback p:empty { display: none; }
#tool-feedback .tool-status { color: var(--muted); font-size: .875rem; }
.test-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.test-controls:empty { display: none; }
.test-controls .outline[aria-pressed="true"] { background: var(--accent); color: #172033; }
.hardware-checks { display: grid; gap: .45rem; }
.hardware-checks label { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .45rem .65rem; border: 1px solid var(--border); border-radius: .65rem; }
.hardware-checks input { flex: none; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.lens-options { display: grid; gap: .55rem; }
.lens-options button[disabled][aria-pressed="true"] { opacity: 1; }
.camera-frame { position: relative; }
.camera-frame video { display: block; }
.camera-zoom { position: absolute; inset-inline: .4rem; inset-block-end: .5rem; justify-content: center; gap: .25rem; }
#tool .camera-zoom .outline { min-height: 2.35rem; padding: .2rem .55rem; border-radius: 999px; background: white; color: #172033; }
#tool .camera-zoom .outline[aria-pressed="true"] { background: var(--accent); }
#tool .camera-zoom .outline:disabled { opacity: 1; background: #283142; color: #d3dae6; }
.vibration-hold { touch-action: none; user-select: none; }
.vibration-hold:active { background: var(--accent); color: #172033; }
#tool video, #tool audio { width: 100%; }
#tool video { max-height: 42vh; object-fit: contain; border-radius: .8rem; background: #131820; }
.sound-meter { width: 100%; height: 5.5rem; border-radius: .7rem; background: var(--accent-soft); color: var(--accent); }
.screen-test {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
.screen-test::backdrop { background: #fff; }
.touch-grid {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
}
.touch-cell { border: 1px solid white; background: #eef1f4; }
.touch-grid .visited { background: var(--accent); }
.touch-status, .touch-exit {
  position: absolute;
  inset-block-start: max(.3rem, env(safe-area-inset-top));
  padding: .4rem .6rem;
  border: 0;
  border-radius: 1rem;
  background: white;
  color: #172033;
  font-size: .75rem;
  font-weight: 650;
}
.touch-status { inset-inline-start: max(.3rem, env(safe-area-inset-left)); pointer-events: none; }
.touch-exit { inset-inline-end: max(.3rem, env(safe-area-inset-right)); min-height: 2rem; }
.color-sample {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
  touch-action: none;
}
.color-sample:focus-visible { outline: none; }
.color-hint {
  position: absolute;
  inset-inline: 1rem;
  inset-block-end: max(1.25rem, env(safe-area-inset-bottom));
  width: fit-content;
  margin-inline: auto;
  padding: .45rem .75rem;
  border-radius: 1rem;
  background: #172033;
  color: white;
  font-size: .85rem;
  animation: hide-color-hint .2s ease-out 2s both;
}
@keyframes hide-color-hint {
  from { opacity: 1; }
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .color-hint { animation-duration: 0s; }
}
.color-sample[data-color="preto"] { background: #000; }
.color-sample[data-color="vermelho"] { background: #f00; }
.color-sample[data-color="verde"] { background: #0f0; }
.color-sample[data-color="azul"] { background: #00f; }
.color-sample[data-color="cinza"] { background: #888; }
#review-list { list-style: none; padding: 0; display: grid; gap: .4rem; }
.review-item { width: 100%; display: flex; justify-content: space-between; align-items: baseline; text-align: left; gap: .7rem; }
.review-item .muted { text-align: right; }
#submit, #resume-test { width: 100%; }
.message { margin-top: 1rem; }
.startup-help { animation: show-startup-help 0s 12s both; }
@keyframes show-startup-help {
  from { visibility: hidden; }
  to { visibility: visible; }
}
.error { padding: .65rem .8rem; color: #942323; background: #fff0ee; border-radius: .65rem; }
#done { min-height: 60vh; display: grid; place-content: center; text-align: center; }
.check { margin-inline: auto; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; color: #187354; background: #e9f8f0; border-radius: 50%; font-size: 2.25rem; }
