:root {
  --bg: #eef3fb;
  --panel: #ffffff;
  --primary: #254aa3;
  --primary-dark: #16327b;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e2f0;
  --soft: #eef4ff;
  --green: #047857;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  background: radial-gradient(circle at top right, #dce6f7 0, #eef3fb 34%, #f7f9fd 100%);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.workspace-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 38px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(37, 74, 163, 0.28);
}

.eyebrow,
.step-label {
  margin: 0 0 5px;
  color: #315bcc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 25px;
}

h2 {
  font-size: 40px;
  color: #fff;
}

h3 {
  font-size: 20px;
}

.topbar-links {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-entry-link,
.readonly-badge {
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #cfe0ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.readonly-badge {
  background: #e8fbf3;
  color: var(--green);
  border-color: #a6ead2;
}

.hero {
  padding: 48px;
  border-radius: 24px;
  background: var(--primary);
  box-shadow: var(--shadow);
}

.hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
}

.hero .step-label {
  color: #c9d8ff;
}

.filter-grid {
  display: grid;
  grid-template-columns: 180px 280px 180px 1fr;
  gap: 14px;
  margin-top: 30px;
}

label,
.filter-control {
  position: relative;
  display: grid;
  gap: 8px;
}

label span,
.filter-control > label {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

select,
input {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 11px;
  padding: 0 16px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(185, 205, 255, 0.8);
}

.combobox-input-wrap {
  position: relative;
}

.combobox-input-wrap input {
  padding-right: 58px;
}

.combobox-clear,
.combobox-search-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.combobox-clear {
  right: 34px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #edf2ff;
  color: var(--primary);
  cursor: pointer;
}

.combobox-search-icon {
  right: 14px;
  color: var(--primary);
}

.combobox-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.2);
  padding: 6px;
}

.combobox-option {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.combobox-option:hover,
.combobox-option[aria-selected="true"] {
  background: var(--soft);
}

.results-layout {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 22px;
  margin-top: 24px;
}

.question-panel,
.answer-panel {
  min-height: 510px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 26px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

#resultCount {
  min-width: 42px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--primary);
  text-align: center;
  padding: 10px 12px;
}

.question-list {
  max-height: 396px;
  overflow: auto;
  padding-right: 6px;
}

.question-item {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 9px;
  text-align: left;
  background: #f4f6fb;
  color: var(--ink);
  cursor: pointer;
}

.question-item:hover,
.question-item.active {
  background: #eaf1ff;
  box-shadow: inset 0 0 0 2px #315bcc;
}

.question-meta,
.answer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.pill {
  border-radius: 7px;
  background: #dfe8ff;
  color: var(--primary);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.pill.green {
  background: #dff8ed;
  color: var(--green);
}

.question-text {
  line-height: 1.55;
}

.copy-button {
  border: 0;
  border-radius: 11px;
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

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

.answer-question {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 800;
}

.answer-copy {
  margin-top: 28px;
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 18px;
}

.usage-note {
  margin-top: 28px;
  border-radius: 10px;
  background: #e9f8f4;
  color: var(--green);
  padding: 12px 14px;
  font-size: 13px;
}

.empty {
  color: var(--muted);
  padding: 24px;
  border-radius: 12px;
  background: #f4f6fb;
}

@media (max-width: 940px) {
  .workspace-shell {
    width: min(100% - 24px, 720px);
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-links {
    flex-direction: column;
    align-items: flex-end;
  }

  .hero {
    padding: 30px;
  }

  h2 {
    font-size: 30px;
  }

  .filter-grid,
  .results-layout {
    grid-template-columns: 1fr;
  }
}
