/* Base components and effects. Responsive layout is in interface.css. */

:root {
  color-scheme: light dark;
  --page: #eaf1f4;
  --panel: #f5fafc;
  --panel-alt: #e6eff4;
  --ink: #122e42;
  --muted: #496779;
  --line: #afc6d0;
  --line-focus: #72a5b5;
  --fine: #cbdbe2;
  --accent: #006883;
  --bright: #00738d;
  --accent-ink: #fff;
  --accent-soft: #007b9120;
  --secondary: #4056af;
  --amber: #8a5500;
  --success: #00734d;
  --error: #b02c40;
  --field: #eef5f8;
  --button: #006883;
  --scan: #0ba6bd08;
  /* Brighter background stars: closest to an integer (base), and the two sides it leans toward. */
  --star: #122e42;
  --star-cool: #2f52b8;
  --star-warm: #a8520f;
  --mono: "SFMono-Regular",Consolas,"Liberation Mono",monospace;
  --sans: "Helvetica Neue",Arial,sans-serif;
  --display: "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 280px;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 0;
  color: inherit;
}

textarea {
  border-radius: 0;
  display: block;
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--bright);
  font: 24px/1.55 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  min-height: 124px;
  max-height: 196px;
  padding: 14px 15px;
  resize: vertical;
  overflow-wrap: anywhere;
  word-break: break-all;
}

select {
  font: inherit;
  cursor: pointer;
  border-radius: 0;
}

button:disabled {
  cursor: default;
  opacity: .46;
}

select:disabled {
  cursor: default;
  opacity: 1;
  color: var(--muted);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  width: 16px;
  height: 16px;
}

h1 {
  margin: 0;
  font-size: clamp(32px,3.3vw,49px);
  font-weight: 650;
  letter-spacing: -.065em;
  line-height: 1.12;
  margin-top: 4px;
  font-family: var(--display);
}

h2 {
  margin: 0;
}

h3 {
  margin: 0;
}

p {
  margin: 0;
}

.app {
  max-width: 1560px;
  padding: 24px 38px 20px;
  margin: 0 auto;
  position: relative;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(ellipse at 50% 33%,var(--accent-soft),transparent 60%),linear-gradient(var(--fine) 1px,transparent 1px),linear-gradient(90deg,var(--fine) 1px,transparent 1px);
  background-size: auto,64px 64px,64px 64px;
  opacity: .6;
  mask-image: linear-gradient(#0005,#000,transparent);
}




.system-mark {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
  transform: skew(-18deg);
}

.system-mark i {
  display: block;
  width: 4px;
  height: 18px;
  background: var(--accent);
}

.system-mark i:nth-child(2) {
  height: 12px;
  opacity: .7;
}

.system-mark i:nth-child(3) {
  height: 7px;
  opacity: .4;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  font: 10px var(--mono);
  letter-spacing: .035em;
  white-space: nowrap;
}

.tool:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tool[aria-pressed=true] {
  color: var(--accent);
  border-color: var(--accent);
}

.tool-light {
  width: 4px;
  height: 4px;
  background: currentColor;
}

.about-tool {
  min-width: 36px;
  font-size: 14px;
}


.eyebrow {
  font: 9px/1.5 var(--mono);
  letter-spacing: .15em;
  color: var(--muted);
}

.slash {
  color: var(--accent);
  font-weight: 300;
  padding: 0 6px 0 8px;
}

.title-cursor {
  font-weight: 300;
  color: var(--accent);
  margin-left: 6px;
}

.intro-meta {
  text-align: right;
  font: 9px/1.6 var(--mono);
  letter-spacing: .08em;
  color: var(--accent);
}

.intro-meta p {
  color: var(--muted);
  margin-top: 7px;
  letter-spacing: .19em;
}

.local-light {
  width: 5px;
  height: 5px;
  background: var(--success);
  display: inline-block;
  margin-right: 7px;
  box-shadow: 0 0 10px var(--accent-soft);
}

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(370px,1fr) 258px;
  gap: 16px;
  align-items: stretch;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 0;
}

.panel:before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 2;
  left: -1px;
  top: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.panel:after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 2;
  right: -1px;
  bottom: -1px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--fine);
  min-height: 43px;
}

.panel-heading h2 {
  font: 10px var(--mono);
  font-weight: 500;
  letter-spacing: .095em;
  white-space: nowrap;
  font-size: 10px;
}

.payload {
  display: flex;
  flex-direction: column;
}

.payload-body {
  padding: 20px 20px 17px;
  flex: 1;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font: 9px var(--mono);
  color: var(--muted);
  letter-spacing: .08em;
  font-size: 10px;
  min-width: 0;
}

.field-heading label {
  color: var(--ink);
}

.select-wrap {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 0;
}

.select-wrap select {
  width: 100%;
  min-height: 38px;
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 30px 8px 10px;
  appearance: none;
  font: 12px var(--mono);
  text-overflow: ellipsis;
}

.select-wrap>span {
  position: absolute;
  right: 11px;
  color: var(--accent);
  pointer-events: none;
  top: 6px;
}

.select-wrap select:hover:not(:disabled) {
  border-color: var(--accent);
}

select option {
  background: var(--panel);
  color: var(--ink);
}

select optgroup {
  background: var(--panel);
  color: var(--ink);
}

.input-frame {
  position: relative;
  margin-top: 12px;
}

textarea:read-only {
  color: var(--muted);
  background: var(--field);
}

textarea[aria-invalid=true] {
  border-color: var(--error);
}

.input-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font: 8px var(--mono);
  color: var(--muted);
  letter-spacing: .08em;
  margin-top: 8px;
  min-width: 0;
}

.candidate-block {
  margin: 23px 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--fine);
}

.candidate-block output {
  display: block;
  color: var(--accent);
  font: 22px/1.3 var(--mono);
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.candidate-note {
  display: block;
  color: var(--muted);
  font: 8px/1.6 var(--mono);
  letter-spacing: .025em;
  margin-top: 6px;
}

.limit-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.limit-row label {
  font: 9px var(--mono);
  letter-spacing: .04em;
  color: var(--muted);
  font-size: 10px;
}

.limit-row .select-wrap {
  width: 144px;
  max-width: 60%;
}

.limit-row select {
  font-size: 11px;
  min-height: 34px;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid var(--accent);
  background: var(--button);
  color: var(--accent-ink);
  font: 11px var(--mono);
  letter-spacing: .05em;
  overflow: hidden;
}

.primary:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,transparent 25%,#fff5 50%,transparent 75%);
  transform: translateX(-130%);
  pointer-events: none;
}

.primary:hover:not(:disabled):before {
  transition: transform .6s;
  transform: translateX(130%);
}

.primary:hover:not(:disabled) {
  box-shadow: 0 0 23px var(--accent-soft);
}

.primary:active:not(:disabled) {
  transform: translateY(1px);
}

.abort {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--amber);
  font: 10px var(--mono);
  padding: 9px;
  min-height: 49px;
}

.abort:hover:not(:disabled) {
  border-color: var(--amber);
  background: var(--accent-soft);
}

.key-hint {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font: 8px var(--mono);
  color: var(--muted);
  margin-top: 10px;
}

.payload-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-top: 1px solid var(--fine);
  font: 8px var(--mono);
  letter-spacing: .08em;
  color: var(--muted);
  min-height: 32px;
}

.mini-cross {
  color: var(--accent);
  font-size: 12px;
}

.error {
  font: 12px/1.7 var(--sans);
  color: var(--error);
  border-left: 2px solid var(--error);
  padding: 7px 10px;
  background: var(--accent-soft);
  margin-top: 14px;
  overflow-wrap: anywhere;
}

.core {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.core:after {
  z-index: 3;
}

.state-indicator {
  font: 9px var(--mono);
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
  max-width: 55%;
  text-overflow: ellipsis;
  overflow: hidden;
}

.state-indicator:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: currentColor;
  margin-right: 7px;
  vertical-align: middle;
}

.state-indicator[data-state=running] {
  color: var(--accent);
}

.state-indicator[data-state=found] {
  color: var(--accent);
}

.core-view {
  height: 300px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  min-height: 272px;
  max-height: 350px;
  background: var(--panel);
}

#reactor {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.core-state {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  height: auto;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

#core-word {
  font-size: 21px;
  font-weight: 500;
  color: var(--bright);
  font-family: var(--display);
  white-space: nowrap;
  position: relative;
  background: none;
  padding: 2px 12px;
  font: 400 clamp(14px,1.6vw,27px)/1.15 var(--display);
  letter-spacing: .18em;
  text-shadow: 0 0 16px var(--panel), 0 0 8px var(--panel);
}

#core-sub {
  color: var(--muted);
  padding: 0;
  white-space: nowrap;
  background: none;
  font: 7px/1.2 var(--mono);
  letter-spacing: .15em;
}



.trial-block {
  padding: 7px 23px 10px;
  min-width: 0;
}

.counter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.counter-heading h3 {
  font: 9px var(--mono);
  letter-spacing: .14em;
  color: var(--muted);
}

.live-tag {
  font: 7px var(--mono);
  letter-spacing: .09em;
  color: var(--accent);
}

.counter {
  min-height: 88px;
  display: flex;
  align-items: center;
  min-width: 0;
}

.counter-number {
  font: 400 62px/1.12 var(--mono);
  white-space: nowrap;
  width: 100%;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1.12;
  position: relative;
}

.stats {
  display: grid;
  gap: 22px;
  padding: 17px 23px;
  margin: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.stats>div {
  min-width: 0;
}

.stats>div+div {
  padding-left: 23px;
  border-left: 1px solid var(--line);
}

.stats dt {
  font: 8px var(--mono);
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.stats dd {
  font: 23px/1.2 var(--mono);
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--accent);
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 6px;
  white-space: nowrap;
}

.unit {
  font: 9px var(--mono);
  color: var(--muted);
  margin-left: 6px;
  white-space: nowrap;
}


.side-stack {
  display: grid;
  grid-template-rows: auto minmax(210px,1fr);
  gap: 16px;
  min-width: 0;
}

.telemetry-body {
  padding: 16px;
  min-width: 0;
}

.telemetry-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 8px var(--mono);
  letter-spacing: .05em;
  color: var(--muted);
  font-size: 9px;
}

#chart-peak {
  color: var(--accent);
  font-size: 10px;
  text-align: right;
  min-width: 0;
  width: 12ch;
  max-width: 56%;
}

#rate-chart {
  display: block;
  width: 100%;
  height: 70px;
  margin-top: 10px;
  overflow: visible;
}

.chart-grid {
  fill: none;
  stroke: var(--fine);
  stroke-width: .7;
}

#rate-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#rate-area {
  fill: var(--accent-soft);
  stroke: none;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  font: 7px var(--mono);
  color: var(--muted);
  letter-spacing: .05em;
}





.log-panel {
  display: flex;
  flex-direction: column;
  min-height: 206px;
}

.event-log {
  padding: 12px 13px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  font: 9px/1.75 var(--mono);
  color: var(--muted);
  overscroll-behavior: contain;
  font-size: 10px;
  flex: none;
  height: 156px;
  min-height: 156px;
  max-height: 156px;
}

.event {
  overflow-wrap: anywhere;
}

.event time {
  color: var(--muted);
  opacity: .85;
  font-size: 8px;
  margin-right: 6px;
}

.event b {
  font-weight: 400;
  color: var(--accent);
}

.event[data-level=hit] {
  color: var(--success);
}

.event[data-level=warn] {
  color: var(--amber);
}

.terminal-prompt {
  padding: 8px 14px 10px;
  font: 9px var(--mono);
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--fine);
  margin-top: auto;
}

.terminal-prompt i {
  display: inline-block;
  height: 9px;
  width: 5px;
  background: var(--accent);
  animation: cursor 1.7s ease-in-out infinite;
}

.output {
  grid-column: 1/-1;
  gap: 0;
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(125px, 190px) minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
}

.output-label {
  padding: 19px 22px;
  border-right: 1px solid var(--line);
  background: var(--panel-alt);
  position: relative;
  z-index: 1;
  min-width: 0;
}

.output-label h2 {
  font: 500 17px/1.3 var(--sans);
  letter-spacing: .05em;
  margin-top: 5px;
  color: var(--muted);
  white-space: pre-line;
  font-family: var(--display);
}

.verification {
  font: 8px var(--mono);
  color: var(--muted);
  margin-top: 7px;
}

.output-body {
  padding: 20px 27px;
  flex: 1;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  align-self: stretch;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.factor-empty {
  display: flex;
  align-items: center;
  gap: 25px;
  color: var(--muted);
  font: 11px var(--mono);
}

.empty-dashes {
  font: 24px var(--mono);
  color: var(--line);
  white-space: nowrap;
}

.factor-values {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font: 30px/1.3 var(--mono);
  color: var(--accent);
  min-width: 0;
}

.factor-values>span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.factor-values.long {
  font-size: 16px;
  line-height: 1.65;
}

.multiply {
  color: var(--muted);
  font-size: 20px;
}

.result-note {
  font: 11px/1.6 var(--sans);
  color: var(--muted);
  margin-top: 9px;
  overflow-wrap: anywhere;
}

.copy {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 23px 20px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  font: 9px var(--mono);
  color: var(--accent);
  white-space: nowrap;
  z-index: 1;
  min-height: 44px;
  position: relative;
  align-self: center;
  top: auto;
  right: auto;
  flex-shrink: 0;
}

.copy:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.result-flare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transform: none;
  background: linear-gradient(110deg, transparent 35%, var(--accent-soft) 50%, transparent 65%);
  background-size: 240% 100%;
  background-position: 180% 0;
}

body[data-state=running] .core {
  border-color: var(--accent);
}


body[data-state=paused] .state-indicator {
  color: var(--amber);
}

body[data-state=capped] .state-indicator {
  color: var(--amber);
}

body[data-state=prime] .state-indicator {
  color: var(--amber);
}

body[data-state=probable] .state-indicator {
  color: var(--amber);
}

body[data-state=error] .state-indicator {
  color: var(--error);
}

body[data-state=found] .core {
  border-color: var(--success);
}

body[data-state=found] .output {
  border-color: var(--success);
}

body[data-state=found] .output-label h2 {
  color: var(--success);
}

body[data-state=found] .verification {
  color: var(--success);
}

body[data-state=found] .factor-values {
  color: var(--success);
}

body[data-state=found] #core-word {
  color: var(--success);
}

.hit-effect .result-flare {
  animation: result-sheen 1.8s ease-out;
}

.start-effect .core-view {
  animation: energize .9s ease-out;
}

.start-effect .title-cursor {
  animation: cursor 1.2s ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 10px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-ink);
}

.skip-link:focus {
  transform: none;
}

#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--accent);
  color: var(--ink);
  font: 12px var(--mono);
  z-index: 30;
  max-width: 90vw;
  box-shadow: 0 5px 30px #0004;
}

dialog {
  max-width: 520px;
  width: calc(100% - 36px);
  padding: 30px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--accent);
  box-shadow: 0 20px 80px #0008;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

dialog::backdrop {
  background: #030b14b5;
}

dialog h2 {
  font-size: 30px;
  line-height: 1.1;
  margin: 15px 0;
  font: 500 62px/1 var(--display);
  letter-spacing: -.05em;
}

dialog p:not(.eyebrow) {
  font: 13px/1.8 var(--sans);
  margin-top: 13px;
  color: var(--muted);
}

dialog .credits {
  font-size: 11px !important;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 20px;
}

.dialog-close {
  float: right;
  border: 0;
  background: none;
  font-size: 25px;
  line-height: 1;
  padding: 8px;
  margin: -16px -16px 0 0;
  color: var(--accent);
  width: 40px;
  height: 40px;
}

body[data-state=paused] .terminal-prompt i {
  animation: none !important;
  transition: none !important;
}

.boot-title {
  font-family: var(--display);
  font-size: clamp(27px,6vw,86px);
  font-weight: 500;
  letter-spacing: -.06em;
  animation: boot-type .7s ease-out both;
}

#counter-reels {
  display: flex;
  align-items: flex-start;
  font-variant-numeric: tabular-nums;
  gap: .15em;
  height: 1.12em;
  font-family: var(--mono);
  letter-spacing: -.06em;
  mask-image: none;
  overflow: visible;
}

.worker-setting {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
}

.worker-setting label {
  font: 10px var(--mono);
  color: var(--muted);
  white-space: nowrap;
}

#workers-hint {
  font-size: 7px;
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.worker-setting .select-wrap {
  width: 144px;
  max-width: 60%;
}

.worker-setting select {
  min-height: 34px;
  font-size: 10px;
}

.worker-heading {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--fine);
  font: 8px var(--mono);
  color: var(--muted);
  letter-spacing: .05em;
  min-width: 0;
}

#workers-active {
  color: var(--accent);
  white-space: nowrap;
}

#worker-lanes {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: none;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.worker-lane {
  display: grid;
  align-items: center;
  gap: 8px;
  min-height: 13px;
  font: 9px var(--mono);
  color: var(--muted);
  min-width: 0;
  grid-template-columns: 2ch minmax(12px, 1fr) 12ch;
}

.worker-lane>i {
  height: 3px;
  background: var(--fine);
  position: relative;
  overflow: hidden;
}

.worker-lane>i>b {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  width: 0;
  box-shadow: 0 0 6px var(--accent-soft);
}

.worker-lane[data-state=running]>span {
  color: var(--accent);
}

.worker-lane>output {
  text-align: right;
  color: var(--ink);
}

.mobile-tabs {
  display: none;
}

.mobile-dock {
  display: none;
}

.about-hook {
  color: var(--ink) !important;
}

dialog h2>span {
  color: var(--accent);
}

/* FACTORING must fit a phone-width dialog. */
#about-title {
  font-size: min(62px, 12.5vw);
}

/* Points to the fine print below, like the header's "O(1)*". */
dialog h2 .note-mark {
  font-size: .4em;
  vertical-align: .95em;
  line-height: 0;
  letter-spacing: 0;
  margin-left: .06em;
  color: var(--muted);
}

dialog a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.fine-print {
  font: 10px/1.6 var(--mono) !important;
  color: var(--muted);
}

dialog .credits h3 {
  font: 10px var(--mono);
  letter-spacing: .12em;
  color: var(--accent);
}

dialog details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

dialog summary {
  font: 11px var(--mono);
  color: var(--muted);
  cursor: pointer;
}

#boot-intro {
  position: fixed;
  inset: 0;
  background: var(--page);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
  animation: boot-out 1.45s cubic-bezier(.4,0,.2,1) forwards;
}

.boot-title>span {
  color: var(--accent);
  margin: 0 .15em;
}

.boot-motto {
  font: 10px var(--mono);
  letter-spacing: .3em;
  color: var(--muted);
  margin-top: 17px;
}

.boot-line {
  width: 220px;
  height: 1px;
  background: var(--accent);
  margin-top: 20px;
  transform-origin: left;
  animation: boot-line 1s ease-out both;
  box-shadow: 0 0 18px var(--accent);
}

.boot-cross {
  position: absolute;
  inset: 12%;
  border: 1px solid var(--line);
  clip-path: polygon(0 0,12% 0,12% 1px,1px 1px,1px 12%,0 12%,0 0,100% 100%,88% 100%,88% calc(100% - 1px),calc(100% - 1px) calc(100% - 1px),calc(100% - 1px) 88%,100% 88%,100% 100%);
}

.count-group {
  display: inline-block;
  line-height: 1.12;
  white-space: nowrap;
  flex: 0 0 auto;
}

.metric-instrument {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0;
  min-width: 0;
  white-space: nowrap;
}

.metric-value {
  display: inline-flex;
  justify-content: flex-end;
  align-items: baseline;
  flex: 1 1 auto;
  min-width: 0;
  height: 1.16em;
  line-height: 1.16;
}

.metric-digit {
  display: inline-block;
  position: relative;
  height: 1.16em;
  line-height: 1.16;
  flex: 0 0 1ch;
  width: 1ch;
  overflow: hidden;
  vertical-align: bottom;
  white-space: pre;
}

.metric-mark {
  display: inline-block;
  position: relative;
  height: 1.16em;
  line-height: 1.16;
  flex: 0 0 1ch;
  overflow: hidden;
  vertical-align: bottom;
  white-space: pre;
  width: .6ch;
  flex-basis: .6ch;
  text-align: center;
}

.digit-glyph {
  display: block;
}

.is-rolling > .digit-glyph {
  visibility: hidden;
}

.digit-strip {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0 0 auto;
  pointer-events: none;
}

.digit-strip > span {
  display: block;
  height: 1.16em;
  line-height: 1.16;
  flex: 0 0 1.16em;
  text-align: center;
}

.metric-unit {
  display: inline-block;
  flex: 0 0 var(--unit-width, 3ch);
  width: var(--unit-width, 3ch);
  margin-left: .65ch;
  text-align: right;
  color: var(--muted);
  white-space: nowrap;
}

#core-word:before {
  content: "";
  position: absolute;
  top: 25%;
  width: 5px;
  height: 50%;
  border: 1px solid var(--accent);
  opacity: .7;
  left: 0;
  border-right: 0;
}

#core-word:after {
  content: "";
  position: absolute;
  top: 25%;
  width: 5px;
  height: 50%;
  border: 1px solid var(--accent);
  opacity: .7;
  right: 0;
  border-left: 0;
}

.stats .unit {
  margin: 0;
  flex: 0 0 auto;
}

#elapsed {
  min-width: 0;
  white-space: nowrap;
  overflow-wrap: normal;
}

#rate {
  min-width: 0;
  white-space: nowrap;
  overflow-wrap: normal;
  flex: 0 1 auto;
  max-width: 100%;
  justify-content: flex-start;
}

#rate-unit {
  min-width: var(--unit-width, 3ch);
  text-align: left;
}

.worker-lane > output {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.telemetry-label > span:first-child {
  flex: 0 0 auto;
}

#input-digits {
  white-space: nowrap;
}

#input-bits {
  white-space: nowrap;
}

#candidate-count {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

#core-workers {
  white-space: nowrap;
}

.factor-values > span {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.worker-lane > .lane-track {
  height: 4px;
  contain: layout paint;
  font-style: normal;
}

.worker-lane > .lane-track > .lane-fill {
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: none;
}

.lane-glint {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bright) 32%, var(--ink) 50%, var(--bright) 68%, transparent);
}

.chrome {
  display: contents;
}

@media(prefers-color-scheme:dark) {
  :root {
    --page: #070e18;
    --panel: #0a1522;
    --panel-alt: #0c1c2b;
    --ink: #e3f5ff;
    --muted: #87a4b8;
    --line: #254254;
    --line-focus: #3b7b8d;
    --fine: #162c3d;
    --accent: #65e4f7;
    --bright: #a8f5ff;
    --accent-ink: #05202b;
    --accent-soft: #4bddfa16;
    --secondary: #819df6;
    --amber: #f2bd74;
    --success: #7ff3bb;
    --error: #ff8d9f;
    --field: #08121e;
    --button: #65e4f7;
    --scan: #94d8ff06;
    --star: #f8f9ff;
    --star-cool: #aec9ff;
    --star-warm: #ffc99d
  }
}

@keyframes cursor {
  50% {
    opacity: .25
  }
}

@keyframes flare {
  0% {
    opacity: 0;
    transform: translateX(-100%)
  }
  30% {
    opacity: 1
  }
  100% {
    opacity: 0;
    transform: translateX(100%)
  }
}

@keyframes energize {
  0% {
    opacity: .6
  }
  100% {
    opacity: 1
  }
}

@keyframes boot-type {
  from {
    opacity: 0;
    letter-spacing: .2em;
    filter: blur(8px)
  }
  to {
    opacity: 1;
    letter-spacing: -.06em;
    filter: none
  }
}

@keyframes boot-line {
  from {
    transform: scaleX(0)
  }
  to {
    transform: scaleX(1)
  }
}

@keyframes boot-out {
  0%,70% {
    opacity: 1;
    visibility: visible
  }
  100% {
    opacity: 0;
    visibility: hidden
  }
}

@keyframes result-sheen {
  0% { opacity: 0; background-position: 180% 0; }
  30% { opacity: 1; }
  100% { opacity: 0; background-position: -80% 0; }
}
