/* The vault screen's look, shipped with the kit so the practice page and the
   site share it: the brushed-steel door, the combination windows, the lamps,
   the nickel dial, the brass handle and the graph-paper contact chart. The
   host page sets the room, the fonts and where the two panels sit. */

:root {
  --room: #0a0f0d;
  --room-2: #13201a;
  --lamp: #ffe1a1;
  --steel-hi: #a9b1b6;
  --steel: #7a838a;
  --steel-lo: #485056;
  --brass-hi: #f0cf86;
  --brass: #c4953f;
  --brass-lo: #6f501d;
  --paper: #efe7d2;
  --paper-2: #e3d9bf;
  --ink: #1f2c26;
  --ink-soft: #5d6a62;
  --open: #3fb871;
  --close: #f28a3a;
  --warm: #f1cf4b;
  --cold: #3b444b;
  --display: "Limelight", "Didot", serif;
  --ui: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}

/* Base resets carry no specificity, so every component rule below wins over them. */
:where(.ft-vault),
:where(.ft-vault) * {
  box-sizing: border-box;
}

:where(.ft-vault) button {
  font: inherit;
  color: inherit;
}

/* ---------- the door ---------- */

.ft-vault {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.door {
  position: relative;
  border-radius: 18px;
  padding: 14px 14px 14px;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(255, 236, 190, 0.32), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, rgba(0, 0, 0, 0.04) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #8f989e, #687177 55%, #4e565c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.6),
    0 2px 0 #1b1f22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* rivets in the corners */
.door::before,
.door::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e7ebee, #6a7277 60%, #2e3438);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.door::before {
  left: 10px;
}

.door::after {
  right: 10px;
}

/* bolts: chrome rods into the frame, thrown back when the vault opens */
.bolt {
  position: absolute;
  right: -9px;
  width: 22px;
  height: 11px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f4f6f7, #9aa3a9 50%, #5d666c);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: transform 0.16s cubic-bezier(0.5, 0, 0.75, 0);
  z-index: -1;
}

.bolt.b1 {
  top: 16%;
}
.bolt.b2 {
  top: 38%;
}
.bolt.b3 {
  top: 60%;
}
.bolt.b4 {
  top: 82%;
}

.is-open .bolt {
  transform: translateX(-16px);
}
.is-open .bolt.b2 {
  transition-delay: 0.17s;
}
.is-open .bolt.b3 {
  transition-delay: 0.34s;
}
.is-open .bolt.b4 {
  transition-delay: 0.51s;
}

.is-open .door {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(63, 184, 113, 0.55),
    0 0 40px rgba(63, 184, 113, 0.25);
  transition: box-shadow 0.6s 0.8s;
}

/* ---------- combination windows ---------- */

.windows {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2b3136, #3c4348);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.35);
}

.win {
  position: relative;
  border: 0;
  border-radius: 8px;
  padding: 4px 0 5px;
  background: linear-gradient(180deg, #0c0f11, #1c2125);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.win.sel {
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.9),
    0 0 0 2px var(--brass),
    0 0 14px rgba(240, 207, 134, 0.35);
}

.win:disabled {
  cursor: default;
}

.wn {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--brass);
  line-height: 1;
}

.wv {
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: #f3ead2;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255, 220, 150, 0.25);
}

.win.ruled .wv {
  color: #7d7a70;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(242, 138, 58, 0.7);
}

.wr {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a39d8a;
  line-height: 1;
}

/* the wheel's window twitches as it reports, harder the closer it sat */
.win.tw-warm {
  animation: tw 0.22s 1;
}
.win.tw-close {
  animation: tw-hard 0.3s 1;
}
.win.tw-open {
  animation: tw-drop 0.36s 1;
}

@keyframes tw {
  30% {
    transform: translateY(1px);
  }
  60% {
    transform: translateY(-1px);
  }
}
@keyframes tw-hard {
  20% {
    transform: translate(-1px, 2px);
  }
  45% {
    transform: translate(1px, -2px);
  }
  70% {
    transform: translate(-1px, 1px);
  }
}
@keyframes tw-drop {
  25% {
    transform: translateY(4px) scale(0.98);
  }
  60% {
    transform: translateY(-1px);
  }
}

/* ---------- lamps ---------- */

.lamp {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  vertical-align: middle;
  background: radial-gradient(circle at 35% 30%, #4a5157, #15191c 70%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.15s, box-shadow 0.15s;
}

.lamp.sm {
  width: 17px;
  height: 17px;
  border-radius: 4px;
}

.lamp.open {
  background: radial-gradient(circle at 35% 30%, #c9ffd9, var(--open) 55%, #1d6b3d);
  box-shadow: 0 0 10px rgba(63, 184, 113, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.lamp.close {
  background: radial-gradient(circle at 35% 30%, #ffe0c4, var(--close) 55%, #9a4a12);
  box-shadow: 0 0 9px rgba(242, 138, 58, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.lamp.warm {
  background: radial-gradient(circle at 35% 30%, #fff6c8, var(--warm) 55%, #9c7e12);
  box-shadow: 0 0 7px rgba(241, 207, 75, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.lamp.cold {
  background: radial-gradient(circle at 35% 30%, #77818a, var(--cold) 60%, #1b2024);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

/* ---------- the dial ---------- */

.dial-wrap {
  width: clamp(190px, min(78vw, calc(100dvh - 470px)), 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.dial {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  border-radius: 50%;
}

.dial:active {
  cursor: grabbing;
}

.dial.busy {
  cursor: default;
}

.dial .tk {
  stroke: #1d2226;
  stroke-linecap: round;
  transition: opacity 0.25s;
}

.dial .num {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 15px;
  fill: #1d2226;
  transition: opacity 0.25s;
}

.dial .out .tk,
.dial .out .num {
  opacity: 0.22;
}

.dial .pip {
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 0.8;
}
.dial .pip.open {
  fill: var(--open);
}
.dial .pip.close {
  fill: var(--close);
}
.dial .pip.warm {
  fill: var(--warm);
}
.dial .pip.cold {
  fill: var(--cold);
}

.dial .index {
  fill: var(--brass-hi);
  stroke: var(--brass-lo);
  stroke-width: 1;
  transform-origin: 0 -105px;
}

.dial .index.tick {
  animation: index-tick 0.09s 1;
}

@keyframes index-tick {
  50% {
    transform: translateY(1.6px);
  }
}

/* ---------- handle ---------- */

.handle-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 9px);
  gap: 5px;
}

.tries li {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #262c30;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.25);
}

.tries li.used {
  background: radial-gradient(circle at 35% 30%, #fff1c8, var(--brass-hi) 50%, var(--brass-lo));
  box-shadow: 0 0 6px rgba(240, 207, 134, 0.6);
}

.handle {
  flex: 1;
  white-space: nowrap;
  height: 52px;
  border: 0;
  border-radius: 26px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2b1d06;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.6);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #9c7128);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 230, 0.8),
    inset 0 -2px 0 rgba(90, 60, 10, 0.5),
    0 4px 0 #5c4115,
    0 7px 14px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.2s;
}

.handle:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 230, 0.8),
    0 1px 0 #5c4115,
    0 3px 8px rgba(0, 0, 0, 0.5);
}

.handle:disabled {
  filter: saturate(0.35) brightness(0.8);
  cursor: default;
  font-size: 17px;
}

/* ---------- contact chart ---------- */

.paper {
  border-radius: 6px;
  padding: 10px 12px 8px;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 248, 225, 0.5), rgba(255, 248, 225, 0) 40%),
    var(--paper);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(140, 110, 50, 0.18);
  transform: rotate(-0.4deg);
}

.paper h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.chart {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-row,
.chart-axis {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 6px;
}

.chart-label {
  height: 26px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  font-family: var(--display);
  font-size: 15px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
}

.chart-row.sel .chart-label {
  color: var(--ink);
  border-color: rgba(31, 44, 38, 0.5);
  background: rgba(196, 149, 63, 0.18);
}

.strip {
  width: 100%;
  height: 26px;
  display: block;
  touch-action: manipulation;
  cursor: pointer;
}

.strip .cell {
  fill: transparent;
  stroke: rgba(40, 80, 70, 0.22);
  stroke-width: 0.6;
}

.strip .cell.five {
  stroke: rgba(40, 80, 70, 0.45);
}

.strip .cell.out {
  fill: rgba(60, 50, 30, 0.12);
}

.strip .strike {
  stroke: rgba(60, 50, 30, 0.16);
  stroke-width: 0.9;
}

.strip .mk {
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 0.6;
}
.strip .mk.open {
  fill: var(--open);
}
.strip .mk.close {
  fill: var(--close);
}
.strip .mk.warm {
  fill: var(--warm);
}
.strip .mk.cold {
  fill: #59636b;
}

.strip .caret {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.3;
}

.chart-row.sel .strip .caret {
  stroke: #9a2f12;
  stroke-width: 1.8;
}

.chart-axis div {
  position: relative;
  height: 14px;
}

.chart-axis i {
  position: absolute;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 12px;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .ft-vault *,
  .ft-vault *::before,
  .ft-vault *::after {
    animation: none !important;
    transition: none !important;
  }
}
/*$vite$:1*/