:root {
  font-family: system-ui, sans-serif;
  background: #f1f4f8;
  color: #152339;
  --muted: #4b5c71;
  --border: #dbe4ee;
  --blue: #2056ad;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #3985eb; outline-offset: 3px; }

.screen {
  width: min(440px, calc(100% - 32px));
  margin: clamp(34px, 12vh, 106px) auto 40px;
}

.brand {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 780;
  letter-spacing: -0.05em;
}

.brand span { color: var(--blue); }

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  box-shadow: 0 6px 24px #192b4510;
}

h1 { margin: 0; font-size: clamp(26px, 5.5vw, 32px); letter-spacing: -0.035em; }
.environment { margin: 5px 0 23px; color: var(--muted); font-size: 14px; }
label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 650; }

input {
  width: 100%;
  min-height: 44px;
  margin-bottom: 16px;
  padding: 9px 12px;
  border: 1px solid #aabbd0;
  border-radius: 7px;
  color: inherit;
  background: white;
}

input:read-only { color: var(--muted); background: #f1f4f8; border-color: var(--border); }
input:read-only::placeholder { color: var(--muted); opacity: 1; }

.primary {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: white;
  background: var(--blue);
  cursor: pointer;
  font-weight: 670;
}

.primary:hover:not(:disabled) { background: #18478f; }
.primary:disabled { background: #e1e9f3; color: #4d607b; cursor: default; }

.device {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 15px;
}

.status {
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  background: #edf2f8;
}

.status[data-tone="good"], .result[data-tone="good"] { color: #09624b; background: #e4f4ee; }
.status[data-tone="bad"], .result[data-tone="bad"] { color: #9e2a3c; background: #fae9ec; }

.verified { display: inline-flex; align-items: center; gap: 6px; }
.verified::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #13785c; }

.slide-demo {
  margin-bottom: 16px;
}

.slide-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.slide {
  --slide-inset: 4px;
  --handle-size: 44px;
  --slide-offset: 0px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 54px;
  padding-inline: calc(var(--handle-size) + var(--slide-inset));
  border: 1px solid #ead4da;
  border-radius: 8px;
  background: #fcf0f3;
  color: #83253a;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  user-select: none;
}

.slide[data-dragging] > span { opacity: 0.6; }
.slide[data-complete] { color: #09624b; background: #e4f4ee; border-color: #c7e3d8; }

.slide-handle {
  position: absolute;
  inset-block-start: var(--slide-inset);
  inset-inline-start: var(--slide-inset);
  display: grid;
  place-items: center;
  width: var(--handle-size);
  height: var(--handle-size);
  border: 1px solid #ddbec7;
  border-radius: 5px;
  color: #83253a;
  background: white;
  box-shadow: 0 1px 3px #42111e18;
  font-size: 25px;
  line-height: 1;
  transform: translateX(var(--slide-offset));
  transition: transform 150ms ease-out;
  touch-action: none;
  cursor: grab;
}

.slide[data-dragging] .slide-handle { transition: none; cursor: grabbing; }
.slide-handle:disabled { color: var(--muted); cursor: default; }
.slide[data-complete] .slide-handle {
  inset-inline-start: auto;
  inset-inline-end: var(--slide-inset);
  border-color: #c7e3d8;
  color: #09624b;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .slide-handle { transition: none; }
}

.message { margin: 12px 0 0; font-size: 14px; line-height: 1.45; }
.message:empty { display: none; }
.error { color: #9e2a3c; }
.result { padding: 9px 11px; border-radius: 7px; color: var(--muted); background: #edf2f8; }

.text-button {
  margin-top: 14px;
  min-height: 40px;
  padding: 5px 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-weight: 620;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 400px) {
  .card { padding: 20px; }
}
