:root {
  color-scheme: light;
  --background: #f4f6f5;
  --surface: #ffffff;
  --surface-subtle: #f8faf9;
  --surface-strong: #eef2f0;
  --foreground: #17201c;
  --muted-foreground: #68736e;
  --faint-foreground: #8b9590;
  --border: #dce3df;
  --border-strong: #cbd5d0;
  --primary: #0f766e;
  --primary-strong: #0b5d57;
  --primary-soft: #e5f4f1;
  --info: #2563eb;
  --info-soft: #eaf1ff;
  --warning: #a9560a;
  --warning-soft: #fff3dc;
  --danger: #b42318;
  --danger-soft: #ffebe9;
  --success: #167543;
  --success-soft: #e7f6ed;
  --sidebar: #18221e;
  --sidebar-muted: #9aaba3;
  --sidebar-hover: #25312c;
  --ring: rgba(15, 118, 110, 0.24);
  --shadow-sm: 0 1px 2px rgba(23, 32, 28, 0.05);
  --shadow-md: 0 12px 30px rgba(23, 32, 28, 0.12);
  --radius: 6px;
  --sidebar-width: 244px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-size: 14px;
  line-height: 1.55;
}

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

button,
a,
input,
select,
textarea {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  box-shadow: 0 0 0 3px var(--ring);
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: hidden;
  color: #f5f8f6;
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #d8fff5;
  background: #0f766e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-product {
  display: block;
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.nav-section {
  padding: 18px 10px 0;
}

.nav-label {
  padding: 0 10px 7px;
  color: #73867d;
  font-size: 11px;
  font-weight: 700;
}

.nav-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  color: #b8c5bf;
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.nav-item:hover {
  color: #fff;
  background: var(--sidebar-hover);
}

.nav-item.is-active {
  color: #fff;
  background: #2b3a34;
  box-shadow: inset 3px 0 0 #53c9b5;
}

.nav-item .nav-count {
  min-width: 20px;
  margin-left: auto;
  padding: 1px 5px;
  color: #bcecdf;
  background: rgba(83, 201, 181, 0.13);
  border-radius: 999px;
  font-size: 11px;
  text-align: center;
}

.main-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 64px;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.mobile-menu-button {
  display: none;
}

.topbar-title {
  min-width: 0;
  flex: 1;
}

.topbar-title strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title span {
  display: block;
  margin-top: 1px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--muted-foreground);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--success-soft);
}

.content {
  width: min(1440px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 26px 30px 48px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-heading {
  min-width: 0;
}

.page-heading h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.35;
  text-wrap: pretty;
}

.page-heading p {
  max-width: 700px;
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
  text-wrap: pretty;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 150ms ease, border 150ms ease, transform 100ms ease;
}

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

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

.button.secondary {
  color: var(--foreground);
  background: var(--surface);
  border-color: var(--border-strong);
}

.button.secondary:hover {
  background: var(--surface-subtle);
}

.button.ghost {
  color: var(--muted-foreground);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.button.ghost:hover {
  color: var(--foreground);
  background: var(--surface-strong);
}

.button.danger {
  color: var(--danger);
  background: var(--surface);
  border-color: #efc5c1;
}

.button.small {
  min-height: 31px;
  padding: 0 10px;
  font-size: 12px;
}

.button.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.button.icon-button.small {
  width: 31px;
  min-width: 31px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  min-width: 0;
  padding: 17px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 650;
}

.metric-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 5px;
}

.metric-icon.info {
  color: var(--info);
  background: var(--info-soft);
}

.metric-icon.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.metric-icon.success {
  color: var(--success);
  background: var(--success-soft);
}

.metric-value {
  margin-top: 13px;
  font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.metric-foot {
  display: flex;
  min-height: 20px;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--faint-foreground);
  font-size: 11px;
}

.metric-foot strong {
  color: var(--success);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
  gap: 16px;
}

.section-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section-panel + .section-panel,
.stack > * + * {
  margin-top: 16px;
}

.panel-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  min-width: 0;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
}

.panel-title p {
  margin: 3px 0 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.panel-body {
  padding: 18px;
}

.panel-body.flush {
  padding: 0;
}

.badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 1px 8px;
  color: var(--muted-foreground);
  background: var(--surface-strong);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.badge.success {
  color: var(--success);
  background: var(--success-soft);
}

.badge.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge.info {
  color: var(--info);
  background: var(--info-soft);
}

.badge.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge.outline {
  background: var(--surface);
  border-color: var(--border);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  height: 40px;
  padding: 0 14px;
  color: var(--muted-foreground);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  min-height: 48px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf0ee;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fbfcfb;
}

.data-table .number {
  font-family: Bahnschrift, sans-serif;
  font-variant-numeric: tabular-nums;
}

.data-table .row-title {
  min-width: 180px;
  font-weight: 700;
}

.data-table .row-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--faint-foreground);
  font-size: 10px;
  font-weight: 400;
}

.inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.progress {
  position: relative;
  width: 100%;
  height: 7px;
  overflow: hidden;
  background: #e9eeeb;
  border-radius: 999px;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
  transition: width 240ms ease;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(100px, 1.8fr) 42px;
  align-items: center;
  gap: 12px;
}

.progress-row + .progress-row {
  margin-top: 14px;
}

.progress-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-row output {
  color: var(--muted-foreground);
  font-family: Bahnschrift, sans-serif;
  font-size: 11px;
  text-align: right;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
}

.activity-item + .activity-item {
  border-top: 1px solid #edf0ee;
}

.activity-symbol {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
}

.activity-copy {
  min-width: 0;
}

.activity-copy p {
  margin: 0;
  font-size: 12px;
  text-wrap: pretty;
}

.activity-copy time {
  display: block;
  margin-top: 3px;
  color: var(--faint-foreground);
  font-size: 10px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.toolbar-spacer {
  flex: 1;
}

.input-shell {
  position: relative;
  display: inline-flex;
  min-width: 220px;
  align-items: center;
}

.input-shell > svg {
  position: absolute;
  left: 11px;
  color: var(--faint-foreground);
  pointer-events: none;
}

.input,
.select,
.textarea {
  width: 100%;
  color: var(--foreground);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border 150ms ease, box-shadow 150ms ease;
}

.input,
.select {
  min-height: 36px;
  padding: 0 11px;
}

.input-shell .input {
  padding-left: 34px;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #adb9b3;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.textarea {
  min-height: 124px;
  padding: 10px 11px;
  line-height: 1.6;
  resize: vertical;
}

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

.field {
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
}

.label .optional {
  color: var(--faint-foreground);
  font-size: 10px;
  font-weight: 500;
}

.field-help {
  margin: 6px 0 0;
  color: var(--faint-foreground);
  font-size: 10px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  background: var(--surface-strong);
  border-radius: var(--radius);
}

.segmented button {
  min-height: 30px;
  padding: 0 11px;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.segmented button.is-active {
  color: var(--foreground);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 32px;
  text-align: center;
}

.empty-state-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  place-items: center;
  color: var(--muted-foreground);
  background: var(--surface-strong);
  border-radius: 50%;
}

.empty-state h3 {
  margin: 0;
  font-size: 14px;
}

.empty-state p {
  max-width: 360px;
  margin: 6px auto 15px;
  color: var(--muted-foreground);
  font-size: 12px;
  text-wrap: pretty;
}

.brief-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.brief-list {
  margin: 0;
  padding: 6px;
  list-style: none;
}

.brief-list-item {
  width: 100%;
  padding: 13px 12px;
  color: var(--foreground);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
}

.brief-list-item:hover {
  background: var(--surface-subtle);
}

.brief-list-item.is-active {
  background: var(--primary-soft);
  border-color: #bee4dc;
}

.brief-list-top,
.brief-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brief-list-item strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-list-item p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.brief-meta {
  margin-top: 9px;
  color: var(--faint-foreground);
  font-size: 10px;
}

.brief-preview {
  min-height: 540px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.poster-wrap {
  display: grid;
  padding: 24px;
  place-items: center;
  background: #edf1ef;
}

.poster {
  width: min(100%, 430px);
  aspect-ratio: 3 / 4;
  padding: 28px;
  color: #18302a;
  background: #fbfdfc;
  border: 1px solid #d4ddd8;
  border-radius: 3px;
  box-shadow: 0 18px 44px rgba(31, 48, 41, 0.13);
}

.poster-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.poster-rule {
  height: 3px;
  margin: 11px 0 20px;
  background: var(--primary);
}

.poster h2 {
  margin: 0;
  color: #17201c;
  font-size: 25px;
  line-height: 1.35;
  text-wrap: pretty;
}

.poster-lead {
  margin: 12px 0 22px;
  color: #596760;
  font-size: 12px;
}

.poster-section + .poster-section {
  margin-top: 18px;
}

.poster-section h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
}

.poster-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 17px;
  font-size: 12px;
  line-height: 1.55;
}

.poster-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 10px;
  color: #748079;
  border-top: 1px solid #dbe2de;
  font-size: 9px;
}

.question-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.question-nav {
  margin: 0;
  padding: 7px;
  list-style: none;
}

.question-nav-button {
  display: grid;
  width: 100%;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  color: var(--foreground);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
}

.question-nav-button:hover {
  background: var(--surface-subtle);
}

.question-nav-button.is-active {
  background: var(--primary-soft);
  border-color: #bee4dc;
}

.question-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--muted-foreground);
  background: var(--surface-strong);
  border-radius: 50%;
  font-family: Bahnschrift, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.question-nav-button.is-active .question-index {
  color: #fff;
  background: var(--primary);
}

.question-nav-copy {
  min-width: 0;
}

.question-nav-copy strong,
.question-nav-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-nav-copy strong {
  font-size: 11px;
}

.question-nav-copy span {
  margin-top: 2px;
  color: var(--faint-foreground);
  font-size: 10px;
}

.question-editor {
  padding: 22px;
}

.question-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.question-prompt {
  margin: 0 0 20px;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.65;
  text-wrap: pretty;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-item {
  display: grid;
  min-height: 46px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.option-item.is-answer {
  background: var(--success-soft);
  border-color: #b8dfc7;
}

.option-letter {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-family: Bahnschrift, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.option-item.is-answer .option-letter {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.answer-analysis {
  margin-top: 18px;
  padding: 14px;
  color: #33413a;
  background: #f2f7f4;
  border: 1px solid #dce9e2;
  border-radius: var(--radius);
  font-size: 12px;
}

.answer-analysis strong {
  display: block;
  margin-bottom: 5px;
  color: var(--foreground);
}

.source-quote {
  margin-top: 10px;
  padding-left: 10px;
  color: var(--muted-foreground);
  border-left: 2px solid #9ccfc4;
}

.approval-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.approval-summary {
  color: var(--muted-foreground);
  font-size: 11px;
}

.approval-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-list {
  display: grid;
  gap: 10px;
}

.exam-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 0.8fr) minmax(130px, 0.7fr) auto;
  align-items: center;
  gap: 18px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.exam-row-title {
  min-width: 0;
}

.exam-row-title strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-row-title span,
.exam-stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.exam-stat strong {
  font-family: Bahnschrift, sans-serif;
  font-size: 14px;
}

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

.insight-item {
  min-width: 0;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.insight-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.insight-item h3 {
  margin: 11px 0 5px;
  font-size: 13px;
}

.insight-item p {
  min-height: 38px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.insight-score {
  font-family: Bahnschrift, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 16px;
}

.bar-chart {
  display: grid;
  min-height: 250px;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 18px 4px 0;
  border-bottom: 1px solid var(--border);
}

.bar-column {
  display: grid;
  height: 100%;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 8px;
}

.bar-track {
  position: relative;
  display: flex;
  height: 100%;
  align-items: end;
  justify-content: center;
}

.bar {
  width: min(32px, 70%);
  min-height: 8px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  transition: height 260ms ease, background 150ms ease;
}

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

.bar-label {
  color: var(--muted-foreground);
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.donut-wrap {
  display: grid;
  min-height: 250px;
  place-items: center;
}

.donut {
  position: relative;
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  background: conic-gradient(var(--success) 0 79%, var(--warning) 79% 92%, #dfe5e2 92% 100%);
  border-radius: 50%;
}

.donut::after {
  position: absolute;
  width: 104px;
  height: 104px;
  content: "";
  background: var(--surface);
  border-radius: 50%;
}

.donut-value {
  position: relative;
  z-index: 1;
  font-family: Bahnschrift, sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
}

.donut-value span {
  display: block;
  margin-top: 3px;
  color: var(--muted-foreground);
  font-family: "Microsoft YaHei UI", sans-serif;
  font-size: 10px;
  font-weight: 600;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
}

.settings-nav {
  padding: 7px;
}

.settings-nav button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-align: left;
}

.settings-nav button:hover,
.settings-nav button.is-active {
  color: var(--foreground);
  background: var(--surface-strong);
}

.settings-group + .settings-group {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.settings-group h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.settings-group > p {
  margin: 0 0 16px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  gap: 28px;
  padding: 14px 0;
}

.setting-row + .setting-row {
  border-top: 1px solid #edf0ee;
}

.setting-label strong {
  display: block;
  font-size: 12px;
}

.setting-label span {
  display: block;
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  padding: 0;
  background: #b9c3be;
  border: 0;
  border-radius: 999px;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.switch[aria-checked="true"] {
  background: var(--primary);
}

.switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  color: #4a4030;
  background: var(--warning-soft);
  border: 1px solid #efd6a9;
  border-radius: var(--radius);
  font-size: 11px;
}

.callout.info {
  color: #263b65;
  background: var(--info-soft);
  border-color: #cbd9f7;
}

.callout strong {
  display: block;
  margin-bottom: 2px;
  color: var(--foreground);
}

.api-key-clear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.api-key-clear input {
  width: 15px;
  height: 15px;
  accent-color: var(--danger);
}

.exam-shell {
  min-height: 100vh;
  background: #eef2f0;
}

.exam-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 60px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.exam-topbar-title {
  min-width: 0;
  flex: 1;
}

.exam-topbar-title strong,
.exam-topbar-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-topbar-title strong {
  font-size: 13px;
}

.exam-topbar-title span {
  color: var(--muted-foreground);
  font-size: 10px;
}

.exam-main {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 26px 18px 96px;
}

.exam-name-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.exam-name-field > span,
.exam-name-field strong,
.exam-name-field small {
  display: block;
}

.exam-name-field strong {
  font-size: 12px;
}

.exam-name-field small {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.exam-name-field .input {
  width: min(280px, 50%);
}

.exam-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.exam-card {
  margin-top: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.exam-question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.exam-question {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.7;
  text-wrap: pretty;
}

.answer-option {
  position: relative;
  display: grid;
  min-height: 54px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 150ms ease, border 150ms ease, box-shadow 150ms ease;
}

.answer-option + .answer-option {
  margin-top: 10px;
}

.answer-option:hover {
  background: var(--surface-subtle);
  border-color: #a7b4ae;
}

.answer-option.is-selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--muted-foreground);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: Bahnschrift, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.answer-option.is-selected .answer-marker {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.exam-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.question-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.question-dot {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--muted-foreground);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-family: Bahnschrift, sans-serif;
  font-size: 10px;
}

.question-dot.is-current {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.question-dot.is-answered:not(.is-current) {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #9ed6cb;
}

.exam-submit-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 9;
  display: flex;
  justify-content: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.exam-submit-inner {
  display: flex;
  width: min(724px, 100%);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 30px 18px;
  background: #eef2f0;
}

.result-panel {
  width: min(680px, 100%);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.result-summary {
  display: grid;
  place-items: center;
  padding: 34px 24px 28px;
  text-align: center;
}

.result-symbol {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 50%;
}

.result-symbol.fail {
  color: var(--danger);
  background: var(--danger-soft);
}

.result-score {
  margin-top: 14px;
  font-family: Bahnschrift, sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.result-summary h1 {
  margin: 9px 0 4px;
  font-size: 19px;
}

.result-summary p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.result-details {
  padding: 20px 24px 24px;
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.result-stats.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-stat {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.result-stat strong,
.result-stat span {
  display: block;
}

.result-stat strong {
  font-family: Bahnschrift, sans-serif;
  font-size: 18px;
}

.result-stat span {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.modal {
  width: min(620px, calc(100vw - 28px));
  max-height: min(86vh, 780px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--foreground);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.modal::backdrop {
  background: rgba(18, 27, 23, 0.5);
  backdrop-filter: blur(2px);
}

.modal-header {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 15px;
}

.modal-content {
  max-height: calc(86vh - 124px);
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px;
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
}

.toast-region {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 100;
  display: grid;
  width: min(390px, calc(100vw - 28px));
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  color: #eff9f5;
  background: #1d2a25;
  border: 1px solid #34463e;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease both;
}

.toast.success svg {
  color: #6ee7b7;
}

.toast.warning svg {
  color: #fbbf24;
}

.toast strong {
  display: block;
  font-size: 12px;
}

.toast span {
  display: block;
  margin-top: 2px;
  color: #aebdb6;
  font-size: 10px;
}

.sidebar-scrim {
  display: none;
}

.mobile-only {
  display: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .chart-layout {
    grid-template-columns: 1fr;
  }

  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-row {
    grid-template-columns: minmax(200px, 1fr) repeat(2, minmax(110px, 0.5fr)) auto;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: rgba(18, 27, 23, 0.4);
    border: 0;
  }

  .main-shell {
    margin-left: 0;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .topbar {
    padding: 0 18px;
  }

  .content {
    padding: 22px 18px 42px;
  }

  .brief-layout,
  .question-workspace,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .brief-preview {
    min-height: 0;
  }

  .settings-nav {
    display: flex;
    overflow-x: auto;
  }

  .settings-nav button {
    width: auto;
    flex: 0 0 auto;
  }
}

@media (max-width: 680px) {
  .topbar-title span,
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: inline-flex;
  }

  .content {
    padding: 18px 14px 34px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 17px;
  }

  .page-heading h1 {
    font-size: 19px;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .page-actions .button {
    flex: 1;
  }

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

  .metric-card {
    padding: 14px;
  }

  .metric-value {
    font-size: 23px;
  }

  .metric-foot {
    min-height: 34px;
    align-items: flex-start;
  }

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

  .field.full {
    grid-column: auto;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-spacer {
    display: none;
  }

  .input-shell {
    width: 100%;
    min-width: 0;
  }

  .exam-row {
    grid-template-columns: 1fr 1fr;
  }

  .exam-row-title,
  .exam-row .inline-actions {
    grid-column: 1 / -1;
  }

  .exam-row .inline-actions {
    justify-content: flex-start;
  }

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

  .setting-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .poster-wrap {
    padding: 12px;
  }

  .poster {
    padding: 20px;
  }

  .poster h2 {
    font-size: 21px;
  }

  .question-editor,
  .exam-card {
    padding: 18px;
  }

  .approval-bar,
  .exam-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .approval-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .exam-main {
    padding: 18px 12px 92px;
  }

  .exam-question {
    font-size: 16px;
  }

  .answer-option {
    min-height: 56px;
  }

  .question-dots {
    order: -1;
  }

  .exam-submit-inner span {
    max-width: 140px;
    font-size: 10px;
  }

  .modal-content {
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-foot {
    min-height: 20px;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.integration-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr) auto);
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--card);
}

.integration-strip > :last-child {
  grid-column: auto;
}

.integration-step {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.integration-step-index {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--muted);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 700;
}

.integration-step div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.integration-step strong,
.integration-step span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-step strong {
  font-size: 12px;
}

.integration-step div span {
  color: var(--muted-foreground);
  font-size: 10px;
}

.integration-arrow {
  display: inline-flex;
  color: var(--muted-foreground);
}

.exam-link-callout {
  margin: 0 18px 18px;
}

.exam-link-callout div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.exam-link-callout span {
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.exam-link-callout small {
  color: var(--muted-foreground);
}

.button[href] {
  text-decoration: none;
}

.table-empty {
  padding: 24px;
  color: var(--muted-foreground);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1100px) {
  .integration-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  .integration-strip {
    grid-template-columns: 1fr;
  }

  .exam-link-callout {
    margin: 0 12px 12px;
  }
}

/* HTTP report and exam workspace */
.review-split {
  display: grid;
  height: calc(100vh - 174px);
  min-height: 540px;
  grid-template-columns: minmax(250px, 32%) minmax(0, 68%);
  gap: 16px;
  align-items: stretch;
}

.report-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.report-rail-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.report-rail-search .input-shell {
  width: 100%;
  min-width: 0;
}

.report-rail-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.report-rail-item {
  display: block;
  width: 100%;
  padding: 12px 11px;
  color: var(--foreground);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
}

.report-rail-item + .report-rail-item {
  margin-top: 3px;
}

.report-rail-item:hover {
  background: var(--surface-subtle);
}

.report-rail-item.is-active {
  background: var(--primary-soft);
  border-color: #bee4dc;
}

.report-rail-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.report-rail-item > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.report-rail-item time {
  color: var(--muted-foreground);
  font-size: 10px;
}

.rail-empty {
  padding: 28px 12px;
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: center;
}

.review-question-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.review-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 0 2px 12px;
}

.review-column-header h2,
.review-column-header p {
  margin: 0;
}

.review-column-header h2 {
  font-size: 16px;
}

.review-column-header p {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.review-question-scroll {
  display: grid;
  min-height: 0;
  flex: 1;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  padding-right: 5px;
}

.review-question-card {
  padding: 19px;
}

.review-question-card .question-prompt {
  font-size: 15px;
}

.question-card-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.report-toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.report-table {
  min-width: 940px;
}

.report-table tbody tr.is-selected-row td {
  background: var(--primary-soft);
}

.type-counts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.type-counts span {
  padding: 2px 6px;
  color: var(--muted-foreground);
  background: var(--surface-strong);
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
}

.report-source-panel {
  margin-bottom: 24px;
}

.report-source-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 22px;
}

.report-source-copy,
.exam-link-block {
  min-width: 0;
}

.report-source-copy > strong,
.exam-link-block > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
}

.report-source-copy p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.75;
  text-wrap: pretty;
}

.exam-link-block {
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.exam-link-block code,
.link-preview {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--primary-strong);
  font-family: Consolas, "Microsoft YaHei UI", sans-serif;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-link-block span {
  display: block;
  margin-top: 7px;
  color: var(--faint-foreground);
  font-size: 10px;
}

.question-review-section {
  min-width: 0;
}

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

.section-heading-row h2 {
  margin: 0;
  font-size: 16px;
}

.section-heading-row p {
  margin: 3px 0 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.regenerate-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.regenerate-row label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.regenerate-row .select {
  width: 116px;
}

.exam-management-table {
  min-width: 860px;
}

.scope-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.scope-toolbar > span {
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: right;
}

.scope-select {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.scope-select .select {
  width: min(320px, 42vw);
}

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

.directory-group {
  display: flex;
  min-width: 0;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.directory-group div {
  min-width: 0;
}

.directory-group strong,
.directory-group span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-group strong {
  font-size: 12px;
}

.directory-group div span {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.settings-stack {
  display: grid;
  gap: 16px;
}

.settings-stack .section-panel + .section-panel {
  margin-top: 0;
}

.settings-stack .setting-row {
  grid-template-columns: minmax(220px, 1fr) minmax(140px, auto);
  align-items: center;
}

.compact-input {
  width: 120px;
}

.prompt-textarea {
  min-height: 150px;
}

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

.model-settings-grid .full {
  grid-column: 1 / -1;
}

.ai-table-body {
  display: grid;
  gap: 22px;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.setup-steps > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 9px;
  padding: 13px 14px;
}

.setup-steps > div + div {
  border-left: 1px solid var(--border);
}

.setup-steps > div > span {
  display: grid;
  width: 26px;
  height: 26px;
  grid-row: 1 / 3;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-family: Bahnschrift, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.setup-steps strong,
.setup-steps small {
  display: block;
  min-width: 0;
}

.setup-steps strong {
  font-size: 11px;
}

.setup-steps small {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.integration-endpoint {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 7px 12px;
  padding: 12px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.integration-endpoint > span {
  color: var(--muted-foreground);
  font-size: 11px;
}

.integration-endpoint > code {
  overflow-wrap: anywhere;
  color: var(--primary-strong);
  font-size: 11px;
}

.integration-endpoint > small {
  grid-column: 2;
  color: var(--muted-foreground);
  font-size: 10px;
}

.setup-block {
  min-width: 0;
}

.setup-block-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.setup-block-heading h3,
.setup-block-heading p {
  margin: 0;
}

.setup-block-heading h3 {
  font-size: 13px;
}

.setup-block-heading p {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.parameter-table {
  min-width: 720px;
}

.code-block {
  max-height: 520px;
  margin: 0;
  overflow: auto;
  padding: 17px;
  color: #dfe9e4;
  background: #1b211e;
  border: 1px solid #313b36;
  border-radius: 5px;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre;
}

.setup-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.setup-output strong,
.setup-output span {
  display: block;
}

.setup-output strong {
  font-size: 11px;
}

.setup-output span {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1.6;
}

.status-dot.is-muted {
  background: var(--faint-foreground);
  box-shadow: none;
}

.question-hint {
  margin: -11px 0 15px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.question-modal {
  max-width: 720px;
}

.mistake-layout .section-panel {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .directory-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .review-split {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .report-rail {
    max-height: 320px;
  }

  .review-question-scroll {
    overflow: visible;
  }

  .report-source-body {
    grid-template-columns: 1fr;
  }

  .exam-link-block {
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .section-heading-row,
  .scope-toolbar,
  .regenerate-row {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading-row .page-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scope-toolbar > span {
    text-align: left;
  }

  .scope-select {
    align-items: stretch;
    flex-direction: column;
  }

  .scope-select .select,
  .regenerate-row .select,
  .compact-input {
    width: 100%;
  }

  .directory-groups,
  .model-settings-grid {
    grid-template-columns: 1fr;
  }

  .review-column-header,
  .setup-block-heading,
  .exam-name-field {
    align-items: stretch;
    flex-direction: column;
  }

  .review-column-header .inline-actions,
  .setup-block-heading .button,
  .exam-name-field .input {
    width: 100%;
  }

  .setup-steps,
  .setup-output {
    grid-template-columns: 1fr;
  }

  .setup-steps > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .integration-endpoint {
    grid-template-columns: 1fr;
  }

  .integration-endpoint > small {
    grid-column: auto;
  }

  .settings-stack .setting-row {
    grid-template-columns: 1fr;
  }
}
