:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef3f6;
  --ink: #15202b;
  --muted: #627080;
  --line: #d9e0e7;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warn: #b45309;
  --danger: #b91c1c;
  --focus: rgba(15, 118, 110, 0.18);
  --shadow: 0 18px 50px rgba(20, 32, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.brand img {
  width: 112px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

.status-strip {
  display: grid;
  grid-template-columns: auto auto 44px auto auto 44px auto auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.status-dot.active {
  border-color: var(--accent);
  background: var(--accent);
}

.status-dot.done {
  border-color: var(--accent);
  background: #ccfbf1;
}

.status-strip [data-step-label].active {
  color: var(--ink);
  font-weight: 800;
}

.status-strip [data-step-label].done {
  color: var(--accent);
  font-weight: 800;
}

.status-line {
  height: 1px;
  background: var(--line);
}

.status-line.done {
  background: var(--accent);
}

.language-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.language-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(420px, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

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

.setup-panel,
.output-panel {
  padding: 18px;
}

.input-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 660px;
}

.input-column {
  padding: 18px;
}

.input-column + .input-column {
  border-left: 1px solid var(--line);
}

.panel-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title span,
.panel-head span,
.privacy-note,
.file-meta,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

label,
.field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.field-label {
  font-size: 14px;
  font-weight: 650;
}

.hidden {
  display: none !important;
}

input[type="text"],
input[type="url"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input[type="text"],
input[type="url"],
input[type="password"],
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 330px;
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.tabs,
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tabs button,
.segmented button,
.icon-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tabs button.selected,
.segmented button.selected {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 32, 43, 0.1);
}

.icon-button {
  width: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.dropzone {
  display: grid;
  position: relative;
  place-items: center;
  min-height: 236px;
  padding: 24px;
  border: 1px dashed #9aa7b5;
  border-radius: 8px;
  background: #fbfcfd;
  cursor: pointer;
  text-align: center;
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone strong {
  margin-top: 12px;
  font-size: 16px;
}

.dropzone span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.file-meta {
  min-height: 34px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
}

.primary-action {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

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

.privacy-note {
  margin: 12px 0 0;
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.metric {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  font-size: 22px;
}

.result-block {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.result-block ul {
  margin: 0;
  padding-left: 18px;
}

.result-block li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.question-list,
.interview-stage {
  display: grid;
  gap: 10px;
}

.question-item,
.interview-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.question-item strong,
.interview-card strong {
  display: block;
  margin-bottom: 6px;
}

.question-item span,
.interview-card p {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.interview-meta {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.answer-input {
  min-height: 86px;
  margin-top: 10px;
  font-size: 13px;
}

.question-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.question-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

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

.inline-followup {
  margin-top: 10px;
  padding: 10px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #ecfdf5;
  font-size: 13px;
  line-height: 1.5;
}

.followup-box {
  min-height: 76px;
  padding: 12px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #ecfdf5;
  line-height: 1.5;
}

.followup-entry + .followup-entry {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 118, 110, 0.22);
}

.followup-entry strong {
  display: block;
  margin-bottom: 6px;
}

.followup-entry p {
  margin-bottom: 6px;
  font-size: 13px;
}

.followup-entry p:first-of-type {
  color: var(--muted);
}

.followup-entry p:last-child {
  margin-bottom: 0;
}

.followup-stack {
  display: grid;
  gap: 6px;
}

.followup-stack p {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 260px minmax(420px, 1fr);
  }

  .output-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .brand,
  .panel-head,
  .section-title {
    align-items: flex-start;
  }

  .topbar,
  .workspace,
  .input-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-strip {
    grid-template-columns: auto auto 1fr;
    white-space: normal;
  }

  .status-strip span:nth-child(n + 4) {
    display: none;
  }

  .input-column + .input-column {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 86px;
    height: 52px;
  }
}
