/* The console and the two presenter windows. Loaded after styles.css, never by a marketing page. */

.warn-text {
  color: var(--warn);
}

.muted {
  color: var(--ink-soft);
}

.stack > * + * {
  margin-top: 14px;
}

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

.kbd {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--paper);
  color: var(--ink-soft);
}

/* Console */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tabs button {
  font: inherit;
  font-size: 15px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  padding: 12px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.panel {
  padding: 28px 0 64px;
}

.panel[hidden] {
  display: none;
}

.usage {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.bar {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin-top: 8px;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.bar.full span {
  background: var(--warn);
}

.builder {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .builder {
    grid-template-columns: 380px 1fr;
    align-items: start;
  }
}

.slide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: slide;
}

.slide-list li {
  counter-increment: slide;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: start;
}

.slide-list li::before {
  content: counter(slide);
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.slide-list .text {
  font-size: 15px;
}

.slide-list .meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.slide-list .btn {
  padding: 3px 8px;
  font-size: 12px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 15px;
}

.check input {
  width: auto;
  margin-top: 4px;
}

/* Run window: the interviewer's private view. Never shared. */

.run {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 20px 60px;
}

.run-bar {
  position: sticky;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  z-index: 3;
}

.run-bar .count {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  font-size: 14px;
}

.private {
  border: 2px solid var(--warn);
  border-radius: var(--radius);
  background: var(--warn-soft);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warn);
}

.question {
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ladder li {
  border-left: 2px solid var(--accent-soft);
  padding: 4px 0 4px 12px;
  margin-bottom: 6px;
}

.canary {
  font-family: var(--mono);
  background: var(--canary-soft);
  border: 1px solid var(--canary-line);
  border-radius: 5px;
  padding: 1px 6px;
}

/* Multiple choice option lists, in both windows. */

.options {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.options li {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.options li b {
  font-variant-numeric: tabular-nums;
}

/* Control window only: the shared window never marks an option, because the decoy block has no
   right answer as far as the candidate is concerned. */
.options li.correct {
  background: var(--ok-soft);
  border-color: var(--ok-line);
}

.answer-line {
  margin: 8px 0 0;
  font-size: 14px;
}

.letter {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 18px;
}

.timer.over {
  color: var(--warn);
}

/* Present window: the only thing a candidate ever sees. */

.present {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 32px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* The noise field.
 *
 * Two things a screenshot of the shared window should not give away cheaply: which pointer is the
 * real one, and what the slide says. The field answers both. Pointer glyphs identical to the real
 * cursor drift down the screen at a range of sizes, so "find the cursor" has a dozen answers and
 * the one the interviewer is pointing with is not distinguishable by shape. Decoy questions sit
 * behind them a few percent off the background: a person sees an empty page, a model reading pixel
 * values sees a page of interview questions, none of which is the one in the image.
 *
 * It is decoration and a trap, never content: aria-hidden so real assistive technology skips it,
 * and pointer-events: none so it cannot take a click. */
.noise-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* The drifting copies. Same shapes as the real cursor, which is the whole point: the pointer on
   screen must not be the only one of its shape. Which shapes an account draws is decided by the
   server and set per element by noise.js; this is the shape used before that answer arrives. */
:root {
  --cursor-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 2 4 19 8.6 14.9 11.4 21 14.3 19.6 11.4 13.6 17.6 13.6Z' fill='%23000'/%3E%3C/svg%3E");
}

/* The real pointer, drawn as the same shape the decoys use. White fill over a dark outline so it
   stays usable on either theme. noise.js overrides this with the account's own shape. */
.present,
.noise-cursor-host {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 2 4 19 8.6 14.9 11.4 21 14.3 19.6 11.4 13.6 17.6 13.6Z' fill='%23ffffff' stroke='%23111111' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E")
    4 2,
    default;
}

.noise-cursor {
  position: absolute;
  top: 0;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  background: var(--noise-ink);
  -webkit-mask-image: var(--glyph, var(--cursor-mask));
  mask-image: var(--glyph, var(--cursor-mask));
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: var(--opacity);
  will-change: transform;
  animation: noise-fall var(--duration) linear var(--delay) infinite;
}

@keyframes noise-fall {
  from {
    transform: translateY(-20vh) rotate(var(--tilt));
  }
  to {
    transform: translateY(120vh) rotate(var(--tilt));
  }
}

.noise-word {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  color: var(--noise-ink);
  font-size: var(--size);
  line-height: 1.25;
  transform: rotate(var(--tilt));
  /* The field must not reflow the page or bleed a scrollbar, whatever the string length. */
  white-space: normal;
  overflow-wrap: break-word;
}

/* A still screen is still a full field: only the falling stops. */
@media (prefers-reduced-motion: reduce) {
  .noise-cursor {
    animation: none;
    top: var(--y);
  }
}

.present-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 16px;
}

/* The column is minmax(0, 1fr), not auto: an auto column is sized to its max-content, so the
 * slide's own 1280px would become 100% and max-width would cap nothing. That is not cosmetic. The
 * image ran off the right of the window and the last word of the question went with it, which
 * makes the one thing the candidate has to read unreadable. e2e-browser/present.spec.ts measures
 * it in a browser at two widths, because no fetch of the PNG can see a layout. */
.present .slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  padding: 16px;
  min-height: 220px;
}

.present .slide img {
  width: auto;
  max-width: 100%;
}

.present .decoys {
  margin-top: 18px;
  font-size: 17px;
}

.present .decoys p {
  margin-bottom: 10px;
}

.reveal {
  font-size: 22px;
  line-height: 1.4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--paper-soft);
  margin-top: 16px;
}

/* Both selectors are one class, and this file loads last, so hiding it needs the pair. */
.watermark.hidden {
  display: none;
}

.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  font-size: 90px;
  font-weight: 700;
  color: var(--watermark);
  transform: rotate(-24deg);
  letter-spacing: 0.1em;
  z-index: 1;
}

.timer-bar {
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-top: auto;
}

.timer-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s linear;
}

/* A sprite-sheet design is animated by walking the sheet, so the PNG stays one request. */

.sprite {
  background-repeat: no-repeat;
  background-size: 100% auto;
}
