/* Iterverse brand tokens (tokens.css/fonts.css, linked before this file
   in index.html) define --btech-*, --neutral-*, --font-sans, etc. This
   file's own --bg/--panel/--text/--muted/--accent/--danger/--border
   aliases are what every rule below actually references, so a future
   palette refinement only ever has to change this one block. See
   design-system/README.md for the source rules. */
:root {
  color-scheme: light;
  --bg: var(--surface-page);
  --panel: var(--surface-card);
  --text: var(--text-strong);
  --muted: var(--text-muted);
  --accent: var(--color-brand);
  --accent-hover: var(--color-brand-hover);
  --danger: var(--color-danger);
  --border: var(--border-subtle);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button, input, select, textarea {
  font-family: inherit;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.iterverse-lockup {
  height: 30px;
  width: auto;
}

.header-brand-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.header-brand-btech {
  height: 28px;
  width: auto;
}

.admin-link {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.admin-link:hover {
  color: var(--text);
  text-decoration: underline;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

#entry-screen {
  width: 100%;
  max-width: 360px;
}

#entry-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--panel);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#entry-form label {
  font-size: 0.85rem;
  color: var(--muted);
}

#entry-form input {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 1rem;
}

#entry-form button {
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: var(--fw-medium);
  cursor: pointer;
}

#entry-form button:hover {
  background: var(--accent-hover);
}

.error {
  color: var(--danger);
  margin-top: 0.75rem;
}

#loading-screen {
  text-align: center;
  color: var(--muted);
}

#lab-screen {
  width: 100%;
  max-width: 1320px;
  text-align: center;
}

.lab-instructions {
  color: var(--muted);
  margin-bottom: 1rem;
}

.lab-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-align: left;
}

/* Stacks above the console on narrow viewports rather than squeezing a
   320px sidebar next to an unusably-thin RDP frame. */
@media (max-width: 860px) {
  .lab-layout {
    flex-direction: column;
  }
}

.sidebar-column {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lab-title-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-xs);
}

.lab-title-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

#instructions-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xs);
}

.instructions-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.instructions-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.instructions-progress {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.instructions-steplist {
  list-style: decimal;
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.instructions-steplist li {
  cursor: pointer;
}

.instructions-steplist li:hover {
  color: var(--text);
}

.instructions-steplist li.active {
  color: var(--accent);
  font-weight: var(--fw-bold);
}

.instructions-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-line;
  flex: 1;
}

.instructions-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.instructions-nav button {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
}

.instructions-nav button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.instructions-nav button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.5;
}

.lab-console {
  flex: 1;
  min-width: 0;
}

.lab-console-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}

.lab-tabs {
  display: flex;
  gap: 0.5rem;
}

.role-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--panel);
  color: var(--muted);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.role-tab.active {
  color: var(--text);
  border-color: var(--accent);
}

.lab-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.lab-frames {
  margin-bottom: 1.5rem;
}

.lab-frame {
  width: 100%;
  height: 70vh;
  min-height: 480px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #000;
}

.reset-button {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
}

.reset-button:hover {
  background: var(--danger);
  color: white;
}

.end-button {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
}

.end-button:hover {
  border-color: var(--text);
  color: var(--text);
}

#reset-message {
  color: var(--muted);
  margin-top: 0.75rem;
}

[hidden] {
  display: none !important;
}
