/* Focus — app UI styled to sit inside the hugo-coder light theme.
   Root font-size on the site is 62.5%, so 1rem = 10px here. */

.focus-page article {
  max-width: 68rem;
  width: 100%;
  margin: 0;
}

.focus-page *,
.focus-page *::before,
.focus-page *::after {
  box-sizing: border-box;
}

.focus-page .focus-sub {
  color: #616161;
  font-size: 1.6rem;
  line-height: 1.6;
  margin: -1.2rem 0 2.8rem;
}

.focus-page .panel {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1.6rem 1.6rem 1.8rem;
  margin-bottom: 1.2rem;
}

.focus-page .row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.focus-page .row:last-child {
  margin-bottom: 0;
}

.focus-page .label {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #616161;
  margin-bottom: 0.7rem;
}

.focus-page .hint {
  text-transform: none;
  letter-spacing: 0;
  color: #757575;
}

.focus-page .seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.focus-page .seg button {
  background: #fff;
  color: #424242;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  padding: 0.7rem 1.1rem;
  font-family: inherit;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.focus-page .seg button:hover {
  color: #000;
  border-color: #9e9e9e;
}

.focus-page .seg button[aria-pressed="true"] {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
  font-weight: 600;
}

.focus-page input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  outline: none;
  margin: 0.8rem 0 0.2rem;
}

.focus-page input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1565c0;
  border: none;
  cursor: pointer;
}

.focus-page input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1565c0;
  border: none;
  cursor: pointer;
}

.focus-page .slider-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.focus-page .val {
  font-variant-numeric: tabular-nums;
  color: #616161;
  font-size: 1.3rem;
  min-width: 3.6rem;
  text-align: right;
}

.focus-page #play {
  width: 100%;
  padding: 1.2rem;
  border-radius: 4px;
  border: 1px solid #1565c0;
  background: #1565c0;
  color: #fff;
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.focus-page #play:hover {
  background: #0d47a1;
  border-color: #0d47a1;
}

.focus-page #play.on {
  background: transparent;
  color: #1565c0;
}

.focus-page #play.on:hover {
  background: #e8f0fb;
}

.focus-page .status {
  font-size: 1.3rem;
  color: #616161;
  text-align: center;
  margin-top: 0.8rem;
  min-height: 1.6em;
}

.focus-page .meter {
  height: 3px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-top: 1rem;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s;
}

.focus-page .meter.on {
  opacity: 1;
}

.focus-page .meter i {
  display: block;
  height: 100%;
  width: 0;
  background: #1565c0;
  transition: width 0.12s linear;
}

.focus-page .note {
  font-size: 1.3rem;
  color: #616161;
  line-height: 1.7;
}

.focus-page .note strong {
  color: #212121;
  font-weight: 600;
}

.focus-page .divider {
  height: 1px;
  background: #ececec;
  margin: 1.4rem 0;
}

.focus-page select {
  background: #fff;
  color: #212121;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 1.3rem;
}

.focus-page #dl {
  background: #fff;
  color: #1565c0;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  padding: 0.7rem 1.2rem;
  font-family: inherit;
  font-size: 1.3rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.focus-page #dl:hover:not(:disabled) {
  border-color: #1565c0;
}

.focus-page #dl:disabled {
  opacity: 0.5;
  cursor: default;
}

.focus-page button:focus-visible,
.focus-page select:focus-visible,
.focus-page input:focus-visible {
  outline: 2px solid #1565c0;
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .focus-page .val {
    min-width: 3rem;
    font-size: 1.2rem;
  }

  .focus-page .seg button {
    padding: 0.6rem 0.9rem;
    font-size: 1.2rem;
  }

  .focus-page .panel {
    padding: 1.4rem 1.4rem 1.6rem;
  }
}
