@font-face {
  font-family: "Sana Sans";
  src: url("fonts/SanaSans-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Sana palette */
  --tarmac: #0a1217;
  --canvas-white: #ffffff;
  --limestone: #e4eff7;
  --jet-black: #000000;
  --cloud-gray: #85898b;
  --steel-gray: #6c7174;
  --green: #cdfe00;
  --green-hover: #d8ff33;

  --border: rgba(10, 18, 23, 0.12);
  --border-strong: rgba(10, 18, 23, 0.18);
  --surface-soft: #f5f8fb;

  --radius-card: 24px;
  --radius-sm: 14px;
  --radius-pill: 9999px;

  --font-sans: "Sana Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --font-display: "Sana Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

/* ---------- Password gate ---------- */
/* App stays hidden until the page is unlocked; gate hides once unlocked. */
html:not(.unlocked) .app {
  display: none;
}
html.unlocked .gate {
  display: none;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--canvas-white);
}

.gate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.gate-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green);
  margin-bottom: 28px;
}

.gate-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--tarmac);
}

.gate-subtitle {
  margin: 12px 0 32px;
  font-size: 16px;
  color: var(--steel-gray);
}

.gate-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--tarmac);
  background: var(--canvas-white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 14px 22px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gate-input::placeholder {
  color: var(--cloud-gray);
}

.gate-input:focus {
  border-color: var(--tarmac);
  box-shadow: 0 0 0 3px rgba(10, 18, 23, 0.08);
}

.gate-button {
  width: 100%;
  margin-top: 12px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--tarmac);
  background: var(--green);
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.gate-button:hover {
  background: var(--green-hover);
}

.gate-button:active {
  transform: translateY(1px);
}

.gate-error {
  margin: 18px 0 0;
  font-size: 14px;
  color: #c0392b;
}

.gate-card.shake {
  animation: gate-shake 0.4s ease;
}

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--canvas-white);
  color: var(--tarmac);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--canvas-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 32px 24px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--green);
  flex-shrink: 0;
}

.sidebar-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sidebar-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--steel-gray);
}

.demo-list {
  padding: 8px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-item {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--tarmac);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 0.15s, border-color 0.15s;
}

.demo-item:hover {
  background: var(--limestone);
}

.demo-item.active {
  background: var(--tarmac);
  color: var(--canvas-white);
}

.demo-item .demo-item-count {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--cloud-gray);
}

.demo-item.active .demo-item-count {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Main ---------- */
.main {
  display: flex;
  flex-direction: column;
  padding: 40px 56px;
  overflow-y: auto;
}

.main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
  max-width: 860px;
}

.demo-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.demo-description {
  margin: 14px 0 0;
  color: var(--steel-gray);
  font-size: 16px;
  line-height: 1.5;
  max-width: 640px;
}

.progress {
  flex-shrink: 0;
  color: var(--steel-gray);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  padding-top: 6px;
}

/* ---------- Step panel ---------- */
.step-panel {
  flex: 1;
  padding: 32px 0;
  max-width: 860px;
}

.empty-state {
  color: var(--steel-gray);
  font-size: 17px;
}

.step-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.block-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cloud-gray);
  margin-bottom: 10px;
}

/* Heads-up / caution note */
.step-note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: #fbf4d9;
  border: 1px solid #efe2a8;
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 0 0 28px;
}

.step-note-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a6d00;
}

.step-note-text {
  font-size: 15px;
  line-height: 1.5;
  color: #5c4a06;
}

/* Script - the big, easy-to-read talk track */
.step-script {
  margin: 0 0 28px;
}

.step-script-text {
  margin: 0;
  font-size: 24px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--tarmac);
  letter-spacing: -0.01em;
  max-width: 760px;
}

/* Instructions - the action to perform */
.step-action {
  background: var(--limestone);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin: 24px 0 0;
}

.step-action .block-label {
  margin-bottom: 6px;
}

.step-action-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--tarmac);
}

.prompt-box {
  background: var(--canvas-white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.prompt-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.prompt-box-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-gray);
}

.copy-btn {
  background: var(--green);
  color: var(--tarmac);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.copy-btn:hover {
  background: var(--green-hover);
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn.copied {
  background: var(--tarmac);
  color: var(--canvas-white);
}

.prompt-text {
  margin: 0;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.6;
  color: var(--tarmac);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Step dots ---------- */
.step-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
  max-width: 860px;
}

.step-dot {
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--canvas-white);
  color: var(--steel-gray);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.step-dot:hover {
  background: var(--limestone);
  color: var(--tarmac);
}

.step-dot.active {
  background: var(--tarmac);
  border-color: var(--tarmac);
  color: var(--canvas-white);
}

/* ---------- Footer nav ---------- */
.footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  max-width: 860px;
}

.nav-btn {
  background: transparent;
  color: var(--tarmac);
  border: 1px solid var(--tarmac);
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.nav-btn:hover:not(:disabled) {
  background: var(--tarmac);
  color: var(--canvas-white);
}

.nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.step-counter {
  color: var(--steel-gray);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
    height: auto;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .main {
    padding: 28px 22px;
  }
  .demo-title {
    font-size: 32px;
  }
}
