* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  background: #f8f9fa;
  color: #212529;
  font-family: "Roboto Slab", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button {
  font: inherit;
}

.site-header {
  background: #212529;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 17px 24px;
}

.site-brand {
  display: block;
  line-height: 0;
}

.site-brand img {
  width: 320px;
  max-width: 100%;
  height: auto;
}

.back-link {
  color: #fff;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover,
.back-link:focus-visible {
  color: #8ab0ff;
}

.back-link span {
  margin-right: 6px;
  font-size: 20px;
  vertical-align: -1px;
}

.page-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}

.page-heading {
  max-width: 900px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-label {
  color: #4365ac;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 14px 0 18px;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  text-transform: uppercase;
}

.page-heading p {
  margin: 0;
  color: #555f6e;
  font-size: 18px;
  line-height: 1.7;
}

.prototype-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 28px;
  align-items: start;
}

.demo-panel,
.instructions-panel {
  box-shadow: 0 12px 30px rgba(32, 49, 75, 0.1);
}

.demo-panel {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.05fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 28px;
  background: #212529;
  color: #fff;
}

.clock-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 282px;
}

.clock-container {
  position: relative;
  width: 200px;
  height: 200px;
  transform: scale(1.2);
}

.demo-details {
  min-width: 0;
}

.dot {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #64707c;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dot.lit {
  background: #fff;
  box-shadow: 0 0 12px 5px rgba(138, 176, 255, 0.7);
}

.dot-label {
  position: absolute;
  color: #aeb8c3;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  user-select: none;
}

.cycle-badge {
  display: flex;
  overflow: hidden;
  margin-bottom: 14px;
  border-radius: 4px;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.cycle-label,
.cycle-value {
  padding: 10px 14px;
}

.cycle-label {
  background: #3b4652;
}

.cycle-value {
  flex: 1;
  background: #303945;
  text-align: center;
}

.badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.badge {
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.badge-led,
.badge-weight {
  padding: 8px 10px;
}

.badge-led {
  background: #3b4652;
  color: #fff;
}

.badge-weight {
  flex: 1;
  background: #303945;
  color: #fff;
  text-align: center;
}

.badge.config-pointer {
  outline: 2px solid #8ab0ff;
  box-shadow: 0 0 10px rgba(138, 176, 255, 0.6);
}

.controls {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  touch-action: manipulation;
  user-select: none;
}

.btn:focus-visible {
  outline: 3px solid #8ab0ff;
  outline-offset: 3px;
}

.btn-start {
  border-color: #4373ae;
  background: #4889da;
  color: #fff;
}

.btn-start:hover {
  background: #4373ae;
}

.btn-config {
  border-color: #d3d9e0;
  background: #fff;
  color: #212529;
}

.btn-config:hover {
  background: #eef3fa;
}

.instructions-panel {
  padding: 36px;
  background: #fff;
}

.instructions-panel h2 {
  margin: 0 0 25px;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 26px;
}

.instructions {
  display: grid;
  gap: 22px;
}

.instruction-row + .instruction-row {
  padding-top: 22px;
  border-top: 1px solid #e3e8ef;
}

.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 7px 10px;
  background: #eef3fa;
  color: #4365ac;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.instruction-row p {
  margin: 0;
  color: #555f6e;
  font-size: 16px;
  line-height: 1.7;
}

.site-footer {
  padding: 28px 16px;
  border-top: 1px solid #e3e8ef;
  background: #fff;
  color: #626c77;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 900px) {
  .prototype-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .demo-panel {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 600px) {
  .site-header-inner {
    gap: 12px;
    padding: 14px 16px;
  }

  .site-brand img {
    width: 190px;
  }

  .back-link {
    font-size: 12px;
  }

  .page-content {
    padding: 42px 16px 56px;
  }

  .page-heading {
    margin-bottom: 30px;
  }

  .page-heading p {
    font-size: 16px;
  }

  .demo-panel,
  .instructions-panel {
    padding: 24px;
  }

  .clock-stage {
    height: 240px;
  }

  .clock-container {
    transform: scale(1.08);
  }

  .badges {
    gap: 6px;
  }

  .badge {
    font-size: 12px;
  }

  .badge-led,
  .badge-weight {
    padding: 7px 5px;
  }

  .controls {
    gap: 8px;
  }

  .btn {
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .site-brand img {
    width: 160px;
  }
}
