:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #031007;
  --panel-strong: #061b0d;
  --line: #0f5f28;
  --line-soft: #0a3d1b;
  --text: #62ff86;
  --text-strong: #9dffb0;
  --text-dim: #35a952;
  --danger: #ff5f5f;
  --shadow: 0 0 36px rgba(39, 255, 104, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(30, 255, 83, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 255, 83, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
}

button,
input {
  font: inherit;
}

button,
input {
  border-radius: 6px;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--text-strong);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.password-gate {
  width: min(620px, calc(100% - 24px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0;
  display: grid;
  place-items: center;
}

.password-card {
  width: 100%;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.86);
  box-shadow: var(--shadow);
}

.gate-label,
.password-card label {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.8rem;
}

.gate-label {
  margin-bottom: 10px;
}

.password-card h1 {
  margin-bottom: 22px;
}

.password-card label {
  display: block;
  margin-bottom: 8px;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.password-row input {
  min-height: 46px;
  border: 1px solid var(--line);
  background: #000000;
  color: var(--text-strong);
  padding: 0 14px;
}

.password-row button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--text-strong);
  background: var(--text);
  color: #001104;
  font-weight: 700;
  cursor: pointer;
}

.gate-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--danger);
}

.app-shell {
  width: min(1120px, calc(100% - 24px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.score-surface {
  width: 100%;
  min-height: calc(100vh - 32px);
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.86);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-bar,
.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--text-strong);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1;
}

h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.25rem;
}

.controls,
.table-panel {
  border: 1px solid var(--line-soft);
  background: var(--panel);
}

.search-field span,
th {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.8rem;
}

.controls {
  padding: 14px;
  display: block;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: #000000;
  color: var(--text-strong);
  padding: 0 14px;
}

.search-field input::placeholder {
  color: rgba(98, 255, 134, 0.42);
}

.table-panel {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.table-heading p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-soft);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #000000;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  color: var(--text);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.name-cell {
  color: var(--text-strong);
  font-weight: 700;
}

.status-pill {
  display: inline-block;
  min-width: 150px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  text-align: center;
}

.status-pill.proficient {
  background: var(--text);
  color: #001104;
  border-color: var(--text-strong);
  font-weight: 700;
}

.status-pill.practice {
  color: var(--danger);
  border-color: rgba(255, 95, 95, 0.7);
}

.empty-row td {
  color: var(--text-dim);
  text-align: center;
  padding: 32px 12px;
}

@media (max-width: 720px) {
  .top-bar,
  .table-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .password-row button {
    width: 100%;
  }

}
