/* String hashing page */

.hash-stage {
  padding: 24px 28px 32px;
  display: flex; flex-direction: column; gap: 18px;
}

/* The character strip — one tile per character */
.char-strip {
  display: flex;
  gap: 4px;
  align-items: flex-start;
  font-family: 'system-ui', monospace;
  flex-wrap: wrap;
}
.char-tile {
  width: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.char-tile .idx {
  font-size: 9.5px;
  color: var(--muted);
  margin-bottom: 2px;
}
.char-tile .box {
  width: 100%;
  height: 38px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.char-tile .ord {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.char-tile.in-window .box {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.char-tile.leaving .box {
  background: oklch(0.93 0.06 25 / 0.5);
  border-color: oklch(0.7 0.1 25);
  color: oklch(0.4 0.14 25);
}
.char-tile.entering .box {
  background: var(--good-soft);
  border-color: var(--good);
  color: oklch(0.32 0.1 145);
}
.char-tile.collision .box {
  background: var(--good);
  border-color: var(--good);
  color: white;
  transform: translateY(-2px);
}

/* Power tiles — distinct color from character tiles */
.char-tile.power-tile .box {
  background: var(--cool-soft);
  border-color: var(--cool);
  color: var(--cool);
  font-size: 13px;
}
.char-tile.power-tile.in-window .box {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}
.char-tile.power-tile.power-key .box {
  background: oklch(0.88 0.1 50 / 0.5);
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 700;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px oklch(0.6 0.16 50 / 0.3);
}
.power-key-label {
  color: var(--accent-deep);
  font-weight: 700;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Polynomial display */
.poly-display {
  font-family: 'system-ui', monospace;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.8;
}
.poly-term {
  display: inline-block;
  padding: 2px 6px;
  margin: 1px 2px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.poly-term.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
}
.poly-term sup { font-size: 11px; color: var(--muted); }

/* Hash value display */
.hash-display {
  font-family: 'system-ui', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.hash-display .label {
  font-family: 'system-ui', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

/* Windows table */
.windows-table {
  font-family: 'system-ui', monospace;
  font-size: 11.5px;
  border-collapse: collapse;
  width: 100%;
}
.windows-table th, .windows-table td {
  padding: 3px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.windows-table th {
  font-family: 'system-ui', sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.windows-table tr.collide td {
  background: var(--good-soft);
  color: oklch(0.32 0.1 145);
  font-weight: 500;
}
.windows-table tr.current td { background: var(--accent-soft); }
.windows-table td.h-val { color: var(--accent-deep); font-weight: 600; }
