:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17201b;
  --muted: #68736d;
  --line: #ded8cc;
  --accent: #27685f;
  --accent-strong: #164c45;
  --gold: #c78a2d;
  --rose: #b55353;
  --shadow: 0 18px 55px rgba(42, 36, 24, 0.12);
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
  background: rgba(246, 244, 239, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-actions a {
  font-weight: 750;
  text-decoration: none;
}

.service-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.9rem;
}

.service-pill.online {
  color: var(--accent-strong);
  border-color: rgba(39, 104, 95, 0.25);
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px) 0 56px;
}

.home-grid,
.admin-layout,
.interview-layout {
  display: grid;
  gap: 20px;
}

.home-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: stretch;
}

.admin-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.interview-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.panel,
.intro-panel,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-panel {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(26px, 5vw, 56px);
  background:
    linear-gradient(140deg, rgba(39, 104, 95, 0.12), rgba(199, 138, 45, 0.12)),
    var(--surface);
}

.panel {
  padding: clamp(18px, 3vw, 28px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  max-width: 760px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #28342f;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  border-color: rgba(39, 104, 95, 0.65);
  box-shadow: 0 0 0 3px rgba(39, 104, 95, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.primary-button,
.ghost-button,
.copy-button,
.option-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  justify-self: start;
  background: var(--accent);
  color: white;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.ghost-button,
.copy-button {
  background: transparent;
  border-color: var(--line);
  color: var(--accent-strong);
}

.form-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.error {
  color: var(--rose);
  font-weight: 750;
}

.section-heading.tight h2 {
  margin-bottom: 0;
}

.created-box {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(39, 104, 95, 0.25);
  border-radius: 8px;
  background: rgba(39, 104, 95, 0.08);
}

.created-box strong {
  font-size: 1.5rem;
}

.created-box a,
.session-row a {
  color: var(--accent-strong);
  font-weight: 800;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.session-row strong,
.session-row span {
  display: block;
}

.session-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.interview-meta {
  position: sticky;
  top: 88px;
}

.interview-meta h1 {
  font-size: 2rem;
  line-height: 1.05;
}

.code-card {
  display: grid;
  gap: 4px;
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.code-card span {
  color: var(--muted);
}

.code-card strong {
  font-size: 1.65rem;
}

.chat-panel {
  overflow: hidden;
}

.message-list {
  display: grid;
  align-content: start;
  gap: 14px;
  height: min(58vh, 620px);
  min-height: 320px;
  overflow-y: auto;
  padding: 18px;
  background: #f1eee6;
}

.message {
  width: min(86%, 680px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface);
}

.message.user {
  justify-self: end;
  background: #e9f0ed;
  border-color: rgba(39, 104, 95, 0.18);
}

.message span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.message p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.answer-box {
  gap: 18px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.question-header h2 {
  margin-bottom: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option-button {
  min-width: 0;
  text-align: left;
  color: var(--ink);
  background: var(--surface-strong);
  border-color: var(--line);
}

.option-button.selected {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.answer-text textarea {
  min-height: 96px;
}

.file-drop {
  border: 1px dashed rgba(39, 104, 95, 0.42);
  border-radius: 8px;
  padding: 14px;
  background: rgba(39, 104, 95, 0.06);
  cursor: pointer;
}

.file-drop input {
  display: none;
}

.file-drop span {
  color: var(--accent-strong);
}

.answer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.loading-strip {
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 920px) {
  .home-grid,
  .admin-layout,
  .interview-layout {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 320px;
  }

  .interview-meta {
    position: static;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .form-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .message {
    width: 100%;
  }
}
