/* /demos/wasm-keygrind page chrome.
 *
 * Loaded only by this page, through Tags.PageCSS. Not a shell asset, so sw.js's
 * CACHE_VERSION has nothing to say about it — the ?v= in PageCSSHref is the
 * whole cache-busting story, and it is served with a 30-day max-age.
 */

.wkg__lede {
  max-width: 62ch;
}

.wkg__safety {
  border-left: 3px solid #b4531f;
  padding: 0.75rem 0 0.75rem 1rem;
  margin: 1.5rem 0;
  max-width: 62ch;
}

.wkg__safety h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.wkg__safety p {
  margin: 0 0 0.6rem;
}

.wkg__panel {
  margin: 1.5rem 0;
  max-width: 62ch;
}

.wkg__regime {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0 0 0.75rem;
}

.wkg__launch,
.wkg__start,
.wkg__stop {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #1d4ed8;
  color: #fff;
}

.wkg__launch:disabled,
.wkg__start:disabled {
  opacity: 0.6;
  cursor: default;
}

.wkg__stop {
  background: #6b7280;
}

.wkg__phase {
  margin: 0.75rem 0 0;
  font-variant-numeric: tabular-nums;
}

.wkg__controls {
  margin-top: 1rem;
}

.wkg__controls label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.wkg__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wkg__fixed {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0.7;
}

.wkg__prefix {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  width: 8ch;
  padding: 0.45rem 0.5rem;
  border: 1px solid #9ca3af;
  border-radius: 6px;
}

.wkg__hint {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0.4rem 0 0;
}

.wkg__progress {
  margin: 0.75rem 0 0;
  font-variant-numeric: tabular-nums;
}

.wkg__result {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #9ca3af;
  border-radius: 8px;
}

.wkg__result dl {
  margin: 0;
}

.wkg__result dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-top: 0.5rem;
}

.wkg__result dd {
  margin: 0.15rem 0 0;
}

.wkg__result code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.wkg__disposable {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0.75rem 0 0;
}

/* AN ENTROPY FAILURE MUST NOT READ AS ANOTHER PROGRESS LINE. It is the one
 * outcome on this page that invalidates everything above it, so it is given its
 * own colour, weight and border rather than sharing the neutral status style. */
.wkg__rngfail {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 2px solid #b91c1c;
  border-radius: 8px;
  background: #fef2f2;
  color: #7f1d1d;
  font-weight: 600;
}

.wkg__footnote {
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

@media (prefers-color-scheme: dark) {
  .wkg__rngfail {
    background: #2a1111;
    color: #fca5a5;
  }
}
