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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #242424;
  --text: #f0ece6;
  --text-muted: #666;
  --gold: #c9a84c;
  --gold-dim: #8a6e2f;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.logo {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.header-meta {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Interview chat ──────────────────────────────── */
.chat-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 40px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.message {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message.ai .message-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.message.user .message-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
}

.message.ai .message-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.message.user .message-text {
  font-size: 16px;
  line-height: 1.6;
  color: #b0a89e;
  text-align: right;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--gold);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.input-bar {
  padding: 20px 0 32px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  border-top: 1px solid var(--border);
}

.input-bar textarea {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  min-height: 52px;
  max-height: 160px;
  outline: none;
  transition: border-color 0.15s;
}

.input-bar textarea:focus {
  border-color: var(--gold-dim);
}

.input-bar textarea::placeholder {
  color: var(--text-muted);
}

.btn-send {
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-send:hover { opacity: 0.85; }
.btn-send:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-complete {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  display: none;
}

.btn-complete:hover { background: var(--gold); color: #0a0a0a; }
.btn-complete.visible { display: block; }

/* ── Check-in form ───────────────────────────────── */
.checkin-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  width: 100%;
}

.checkin-intro {
  margin-bottom: 48px;
}

.checkin-intro h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.checkin-intro p {
  color: var(--text-muted);
  font-size: 14px;
}

.section {
  margin-bottom: 56px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #999;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.field input[type="number"],
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}

.field input[type="number"] { max-width: 120px; }

.field input:focus, .field textarea:focus {
  border-color: var(--gold-dim);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.field textarea.tall { min-height: 120px; }

.score-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.score-btn {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-btn:hover { border-color: var(--gold-dim); color: var(--text); }
.score-btn.active { background: var(--gold); border-color: var(--gold); color: #0a0a0a; }

.personal-question {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.personal-question p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.pivot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pivot-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.pivot-row label {
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  margin: 0;
}

.submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: center;
}

.btn-submit {
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius);
  padding: 14px 48px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  max-width: 340px;
  width: 100%;
}

.btn-submit:hover { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Static pages ────────────────────────────────── */
.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.center-card {
  max-width: 480px;
  text-align: center;
}

.center-card .mark {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.center-card h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.3;
}

.center-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Loading state ───────────────────────────────── */
.loading-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 2px;
  animation: dot-pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}
