/* TaskPilot glasses display.
 *
 * Additive waveguide: #000000 emits no light and is transparent, so it is the
 * page background and never a UI surface. You are reading this while under a
 * car, so type is large and contrast is maximal.
 */

:root {
  --bg-page:    #000000;
  --surface-1:  #0a0a0f;
  --surface-2:  #14161a;
  --surface-3:  #1c1e21;
  --surface-4:  #24262b;

  --text-primary:   #ffffff;
  --text-secondary: #e4e6eb;
  --text-muted:     #b0b3b8;

  --accent:      #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.45);
  --warn:        #ffaa00;
  --warn-dim:    rgba(255, 170, 0, 0.16);
  --danger:      #ff4466;
  --ok:          #00ff88;

  --radius-md: 12px;
  --radius-lg: 16px;

  --focus-on:  475ms cubic-bezier(0.6, 0, 0.4, 1);
  --focus-off: 625ms cubic-bezier(0.24, 0.24, 0.6, 1);
  --color-on:  300ms cubic-bezier(0.4, 0.04, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app { position: relative; width: 600px; height: 600px; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
}
.screen.hidden { display: none !important; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.header {
  flex-shrink: 0;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}
.step-count {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
  transition: background var(--color-on);
}
.dot.stale { background: var(--warn); }
.dot.down  { background: var(--danger); }

/* ---------- Step body ---------- */
.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 18px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 40px), transparent 100%);
}
.content::-webkit-scrollbar { display: none; }

.step-title {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.step-detail {
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.safety {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--warn-dim);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 2px;
}
.safety-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--warn);
  padding-top: 3px;
}
.safety-text { font-size: 16px; line-height: 1.4; color: var(--text-primary); }

/* ---------- Focus model ---------- */
.focusable {
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--focus-off), border-color var(--color-on),
              box-shadow var(--color-on), background var(--color-on);
}
.focusable .fx { opacity: 0.8; transition: opacity var(--color-on); }
.focusable:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(calc(1 - 8 / 88));
  transition: transform var(--focus-on), border-color var(--color-on),
              box-shadow var(--color-on), background var(--color-on);
}
.focusable:focus .fx { opacity: 1; }

/* ---------- Nav ---------- */
.nav-bar {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 0 4px;
  height: 88px;
  align-items: stretch;
}
.nav-item {
  flex: 1;
  background: var(--surface-3);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 600;
}
.nav-item:focus  { background: var(--surface-4); }
.nav-item.primary { background: #06323d; color: #7fe9ff; }
.nav-item.primary:focus { background: #0a4a5c; }
.nav-item[disabled] { opacity: 0.3; }
.nav-item.sent .fx::after { content: ' ✓'; color: var(--ok); }

/* ---------- Centered states ---------- */
.centered {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 32px;
}
.glyph { font-size: 52px; line-height: 1; color: var(--accent); }
.glyph.warn { color: var(--warn); }
.glyph.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.t-h2  { font-size: 24px; font-weight: 700; }
.t-b2  { font-size: 17px; line-height: 1.45; color: var(--text-secondary); max-width: 420px; }
.t-m1  { font-size: 13px; color: var(--text-muted); }

/* ---------- Alert ---------- */
.alert-body { gap: 18px; }
.alert-text {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--warn);
  max-width: 460px;
}
