:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --panel-strong: #eef5f2;
  --ink: #182322;
  --muted: #64706e;
  --line: #d8e1de;
  --accent: #12685f;
  --accent-dark: #0e4f49;
  --accent-soft: #d9ebe6;
  --red: #b43845;
  --gold: #c8912b;
  --shadow: 0 18px 48px rgba(19, 38, 35, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  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;
}

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

a {
  color: var(--accent-dark);
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  padding: 24px;
  background: #112b29;
  color: #f9fbf7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.brand img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

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

.brand strong {
  font-size: 18px;
  line-height: 1.15;
}

.brand span {
  margin-top: 3px;
  color: #bed2cf;
  font-size: 13px;
}

.status-panel,
.quick-panel,
.feedback-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.status-panel,
.quick-panel {
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  margin-top: 3px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 760;
}

h2 {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 740;
}

.rail h2 {
  color: #f7faf8;
}

.panel-links {
  display: flex;
  gap: 6px;
}

.panel-heading a,
#sourceBadge {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 9px;
  color: #e8f5ef;
  font-size: 12px;
  text-decoration: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-grid div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.metric-grid dt {
  color: #bed2cf;
  font-size: 12px;
}

.metric-grid dd {
  margin-top: 7px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 760;
}

.prompt {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #f9fbf7;
  text-align: left;
}

.prompt:hover,
.prompt:focus-visible {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.13);
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 720;
}

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

.pilot-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #e0c987;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff7e0;
  color: #644a13;
  font-size: 12px;
  font-weight: 780;
}

.ghost-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 13px;
  background: #ffffff;
  color: var(--ink);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--accent);
}

.pilot-guardrail {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 28px;
  border-bottom: 1px solid #ead9ae;
  background: #fff8e6;
  color: #5d4712;
  font-size: 13px;
  line-height: 1.4;
}

.pilot-guardrail strong {
  flex: 0 0 auto;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  min-height: 0;
  flex: 1;
  padding: 18px;
}

.conversation,
.source-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.conversation {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.messages {
  min-height: 420px;
  overflow-y: auto;
  padding: 20px;
}

.message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.message.user .avatar {
  order: 2;
  background: var(--red);
}

.message.user .bubble {
  order: 1;
  justify-self: end;
  background: #f7eeef;
  border-color: #ead1d5;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 760;
}

.bubble {
  max-width: 860px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--panel-strong);
  line-height: 1.52;
  white-space: pre-wrap;
}

.bubble p + p {
  margin-top: 8px;
}

.action-plan {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  white-space: normal;
}

.action-plan__label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.action-plan h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.action-plan__summary {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.action-plan__steps {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: action-step;
}

.action-plan__steps li {
  position: relative;
  min-height: 32px;
  padding-left: 42px;
  counter-increment: action-step;
}

.action-plan__steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #f2e4e7;
  color: var(--accent-dark);
  content: counter(action-step);
  font-size: 12px;
  font-weight: 800;
}

.action-plan__steps strong,
.action-plan__steps span {
  display: block;
}

.action-plan__steps span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.action-plan__prepare {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f4f5;
  font-size: 13px;
}

.action-plan__prepare ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.action-plan__prepare li + li {
  margin-top: 4px;
}

.action-plan__attention {
  margin-top: 12px;
  color: #68424a;
  font-size: 13px;
  line-height: 1.45;
}

.action-plan__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.action-plan__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.action-plan__actions .action-plan__link {
  margin-top: 0;
}

.action-plan__save {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 760;
}

.action-plan__save:hover,
.action-plan__save:focus-visible,
.action-plan__save.is-saved {
  border-color: var(--accent-dark);
  background: #f7eeef;
}

.action-plan__save svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.action-plan__link:hover,
.action-plan__link:focus-visible {
  background: var(--accent);
}

.action-plan__link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.home-cases-section h2 span,
.cases-toolbar h2 span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  margin-left: 6px;
  border-radius: 50%;
  background: #f2e4e7;
  color: var(--accent-dark);
  font-size: 12px;
  vertical-align: 3px;
}

.home-cases-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.home-case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 180px) 20px;
  width: 100%;
  min-height: 76px;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.home-case-row + .home-case-row {
  border-top: 1px solid var(--line);
}

.home-case-row:hover,
.home-case-row:focus-visible {
  background: #f8f5f6;
}

.home-case-row > span,
.home-case-row strong,
.home-case-row small {
  display: block;
  min-width: 0;
}

.home-case-row strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-case-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.home-case-row > svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.home-case-progress,
.case-progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  appearance: none;
  background: #e8dde0;
}

.home-case-progress::-webkit-progress-bar,
.case-progress::-webkit-progress-bar {
  background: #e8dde0;
}

.home-case-progress::-webkit-progress-value,
.case-progress::-webkit-progress-value {
  background: var(--accent-dark);
}

.home-case-progress::-moz-progress-bar,
.case-progress::-moz-progress-bar {
  background: var(--accent-dark);
}

.cases-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.cases-back,
.cases-clear,
.cases-empty button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 720;
}

.cases-back svg,
.cases-clear svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.cases-clear:disabled {
  cursor: default;
  opacity: 0.45;
}

.cases-empty {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  padding: 40px 20px;
  text-align: center;
}

.cases-empty > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  stroke: var(--accent-dark);
  fill: none;
}

.cases-empty h2,
.cases-empty p {
  margin: 0;
}

.cases-empty p {
  max-width: 430px;
  margin-top: 8px;
  color: var(--muted);
}

.cases-empty button {
  margin-top: 18px;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}

.student-cases-list {
  border-top: 1px solid var(--line);
}

.student-case {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
}

.student-case > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.student-case > header p,
.student-case > header h2 {
  margin: 0;
}

.student-case > header p {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
}

.student-case > header h2 {
  margin-top: 4px;
  font-size: 23px;
  line-height: 1.25;
}

.case-remove {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}

.case-remove:hover,
.case-remove:focus-visible {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.case-remove svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.student-case > .case-progress {
  margin-top: 16px;
}

.student-case__summary {
  max-width: 70ch;
  margin: 16px 0 0;
  color: var(--muted);
}

.case-checklist {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.case-checklist li {
  border-top: 1px solid var(--line);
}

.case-checklist li:last-child {
  border-bottom: 1px solid var(--line);
}

.case-checklist label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  min-height: 68px;
  align-items: start;
  padding: 14px 4px;
  cursor: pointer;
}

.case-checklist input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent-dark);
}

.case-checklist strong,
.case-checklist small {
  display: block;
}

.case-checklist small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.case-checklist input:checked + span strong,
.case-checklist input:checked + span small {
  color: var(--muted);
  text-decoration: line-through;
}

.case-completion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f4f5;
}

.case-completion__heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.case-completion__heading h3,
.case-completion__heading p {
  margin: 0;
}

.case-completion__heading h3 {
  font-size: 16px;
}

.case-completion__heading p {
  max-width: 52ch;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.case-completion__mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-dark);
  color: #fff;
}

.case-completion__mark svg,
.case-rating svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.case-completion__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.case-rating {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 720;
}

.case-rating:hover,
.case-rating:focus-visible,
.case-rating.is-selected {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}

.case-documents {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f7f4f5;
}

.case-documents summary {
  cursor: pointer;
  font-weight: 720;
}

.case-documents ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.case-attention {
  max-width: 70ch;
  margin: 14px 0 0;
  color: #68424a;
  font-size: 13px;
}

.case-official-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 760;
}

.case-official-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.study-mode-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.study-mode-tabs button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 740;
}

.study-mode-tabs button:hover,
.study-mode-tabs button:focus-visible {
  background: #f7f4f5;
  color: var(--ink);
}

.study-mode-tabs button.is-active {
  background: var(--accent-dark);
  color: #fff;
}

.study-mode-tabs button span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #f2e4e7;
  color: var(--accent-dark);
  font-size: 11px;
}

.deadline-panel {
  margin-top: 28px;
}

.schedule-panel[hidden],
.deadline-panel[hidden] {
  display: none;
}

.deadline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.deadline-heading p,
.deadline-heading h2,
.deadline-heading span {
  margin: 0;
}

.deadline-heading p {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
}

.deadline-heading h2 {
  margin-top: 4px;
  font-size: 28px;
}

.deadline-heading span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.deadline-heading > strong {
  flex: 0 0 auto;
  color: var(--accent-dark);
}

.deadline-sources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.deadline-sources a {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.deadline-sources a:hover,
.deadline-sources a:focus-visible {
  border-color: var(--accent-dark);
  background: #f7f4f5;
}

.deadline-sources span,
.deadline-sources strong,
.deadline-sources small {
  display: block;
  min-width: 0;
}

.deadline-sources strong {
  font-size: 13px;
}

.deadline-sources small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.deadline-sources svg,
.deadline-form button svg,
.deadline-item a svg,
.deadline-remove svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
}

.deadline-form {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) 150px 170px 180px auto;
  gap: 10px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: #f7f4f5;
}

.deadline-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.deadline-form input,
.deadline-form select,
.deadline-form button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.deadline-form input::placeholder {
  color: #65585d;
  opacity: 1;
}

.deadline-form input:focus,
.deadline-form select:focus {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent-dark);
}

.deadline-form button {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
  font-weight: 760;
}

.deadline-form button:hover,
.deadline-form button:focus-visible {
  background: var(--accent);
}

.deadline-state {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.deadline-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.deadline-list-heading h3 {
  margin: 0;
  font-size: 18px;
}

.deadline-list-heading button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 720;
}

.deadline-list-heading button:disabled {
  cursor: default;
  opacity: 0.42;
}

.deadline-empty {
  display: flex;
  min-height: 128px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.deadline-empty svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.deadline-empty p {
  margin: 0;
}

.deadline-list {
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.deadline-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  min-height: 86px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.deadline-date {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  align-content: center;
  border-radius: 8px;
  background: #f2e4e7;
  color: var(--accent-dark);
  text-align: center;
}

.deadline-date strong,
.deadline-date span {
  display: block;
  line-height: 1;
}

.deadline-date strong {
  font-size: 23px;
}

.deadline-date span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.deadline-item__body {
  min-width: 0;
}

.deadline-item__body > strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.deadline-item__body > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.deadline-item__body a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  color: var(--accent-dark);
  font-weight: 720;
}

.deadline-item__body a svg {
  width: 14px;
  height: 14px;
}

.deadline-timing {
  color: var(--accent-dark);
  font-weight: 760;
}

.deadline-item__actions {
  display: flex;
  gap: 6px;
}

.deadline-toggle,
.deadline-remove {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.deadline-toggle {
  cursor: pointer;
}

.deadline-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent-dark);
}

.deadline-remove {
  color: var(--muted);
}

.deadline-remove:hover,
.deadline-remove:focus-visible {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.deadline-item.is-overdue .deadline-date {
  background: #f7e9ec;
  color: #7a2230;
}

.deadline-item.is-complete {
  color: var(--muted);
}

.deadline-item.is-complete .deadline-date {
  background: #eef1ef;
  color: #446058;
}

.deadline-item.is-complete .deadline-item__body > strong {
  text-decoration: line-through;
}

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

  .deadline-form {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.7fr);
  }

  .deadline-form button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .action-plan__actions {
    flex-direction: column;
  }

  .action-plan__link,
  .action-plan__save {
    width: 100%;
    justify-content: center;
  }

  .home-case-row {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .home-case-progress {
    grid-column: 1 / -1;
  }

  .cases-heading {
    align-items: start;
    flex-direction: column;
  }

  .cases-back {
    order: -1;
  }

  .case-completion {
    align-items: stretch;
    flex-direction: column;
    padding: 16px 0;
  }

  .case-completion__actions,
  .case-rating {
    flex: 1 1 0;
  }

  .study-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .deadline-heading {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .deadline-heading h2 {
    font-size: 24px;
  }

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

  .deadline-sources a {
    min-height: 66px;
  }

  .deadline-form {
    padding: 14px;
  }

  .deadline-form button {
    min-height: 48px;
  }

  .deadline-list-heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .deadline-item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
  }

  .deadline-date {
    width: 54px;
    height: 54px;
  }

  .deadline-item__actions {
    grid-column: 2;
    justify-self: end;
  }
}

.message.meta .bubble {
  background: #fff7e6;
  border-color: #ead9ae;
  color: #644a13;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.composer textarea {
  width: 100%;
  min-height: 54px;
  max-height: 160px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
}

.composer textarea:focus {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}

.composer button {
  min-height: 54px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.composer button:hover,
.composer button:focus-visible {
  background: var(--accent-dark);
}

.source-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
}

.source-panel .panel-heading {
  margin-bottom: 0;
}

.source-panel h2,
.feedback-panel h2 {
  color: var(--ink);
}

.source-panel #sourceBadge {
  border-color: var(--line);
  color: var(--accent-dark);
}

.source-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
}

.source-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.source-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.source-card a {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 720;
  word-break: break-word;
}

.source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.source-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 12px;
}

.sources-empty,
.feedback-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.feedback-panel {
  margin-top: auto;
  padding: 14px;
  border-color: var(--line);
  background: #fafbfb;
}

.feedback-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 10px;
}

.feedback {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

.feedback:hover:not(:disabled),
.feedback:focus-visible:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.feedback-reason,
.feedback-comment {
  display: block;
  margin-bottom: 10px;
}

.feedback-reason select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
}

.feedback-comment textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
}

.feedback-reason select:focus,
.feedback-comment textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.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;
}

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

  .rail {
    min-height: auto;
    padding: 18px;
  }

  .quick-panel {
    display: none;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .source-panel {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
  }

  .pilot-guardrail {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 18px;
  }

  .chat-layout {
    padding: 10px;
  }

  .messages {
    min-height: 360px;
    padding: 14px;
  }

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

  .composer button {
    min-height: 46px;
  }

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

.admin-page {
  background: #f5f7f8;
}

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

.is-hidden {
  display: none !important;
}

.pilot-guide-body {
  min-height: 100vh;
  background: #f1f2ee;
  color: #111310;
}

.pilot-guide-body .eyebrow {
  color: #111310;
  font-weight: 900;
  text-transform: uppercase;
}

.pilot-guide-page {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.pilot-guide-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 2px solid #111310;
  padding: 24px 0 22px;
}

.pilot-guide-hero img {
  width: 52px;
  height: 52px;
}

.pilot-guide-hero h1 {
  color: #111310;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.pilot-guide-hero p:not(.eyebrow) {
  max-width: 720px;
  color: #50544d;
  font-size: 16px;
  line-height: 1.55;
}

.pilot-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 15px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.primary-link {
  border: 1px solid #111310;
  background: #111310;
  color: #c9f34a;
}

.secondary-link {
  border: 1px solid #111310;
  background: #ffffff;
  color: #111310;
}

.pilot-install {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid #111310;
  border-radius: var(--radius);
  padding: 24px;
  background: #c9f34a;
  box-shadow: 5px 5px 0 #111310;
  scroll-margin-top: 16px;
}

.pilot-install-copy h2 {
  margin: 5px 0 10px;
  color: #111310;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 24px;
  line-height: 1.2;
}

.pilot-install-copy > p:not(.eyebrow) {
  max-width: 620px;
  color: #33362f;
  font-size: 14px;
  line-height: 1.5;
}

.pilot-install-copy ol {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-left: 20px;
  color: #111310;
  font-size: 14px;
  line-height: 1.5;
}

.pilot-qr {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
}

.pilot-qr img {
  display: block;
  width: min(100%, 236px);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid #111310;
  padding: 10px;
  background: #ffffff;
}

.pilot-qr figcaption {
  color: #33362f;
  font-size: 12px;
  text-align: center;
}

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

.pilot-guide-grid article,
.pilot-guide-examples {
  border: 1px solid #111310;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: none;
}

.pilot-guide-grid article {
  padding: 18px;
}

.pilot-guide-grid h2,
.pilot-guide-examples h2 {
  margin-bottom: 11px;
  color: #111310;
  font-weight: 850;
  font-size: 15px;
}

.pilot-guide-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #555950;
  font-size: 14px;
  line-height: 1.45;
}

.pilot-guide-examples {
  margin-top: 12px;
  padding: 18px;
}

.pilot-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pilot-example-list span {
  border: 1px solid #111310;
  border-radius: 999px;
  padding: 7px 10px;
  background: #ecffc0;
  color: #111310;
  font-size: 13px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 16px 24px;
  background: #112b29;
  color: #f9fbf7;
}

.admin-brand span {
  color: #bed2cf;
}

.admin-nav {
  display: flex;
  gap: 8px;
}

.admin-nav a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 8px 11px;
  color: #f9fbf7;
  text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.38);
}

.admin-main {
  padding: 18px;
}

.admin-auth {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 78px);
  padding: 18px;
}

.admin-auth-box {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-auth-box h1 {
  margin-bottom: 14px;
  font-size: 22px;
}

.admin-auth-box label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.admin-auth-box input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 11px;
  color: var(--ink);
}

.admin-auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.admin-auth-actions button {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

#authStatus {
  color: var(--red);
  font-size: 13px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-summary article,
.review-toolbar,
.review-list,
.pilot-panel,
.eval-panel,
.regression-panel,
.provider-panel,
.entity-panel,
.fix-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-summary article {
  min-height: 84px;
  padding: 14px;
}

.admin-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.admin-summary strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.1;
}

.review-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}

.review-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 190px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.review-toolbar select,
.review-toolbar button,
.review-card select,
.review-card textarea,
.review-card button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.review-toolbar select {
  padding: 0 10px;
}

.review-toolbar button,
.review-card button {
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.review-toolbar .secondary-button {
  margin-left: auto;
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.review-toolbar button:hover,
.review-card button:hover {
  background: var(--accent-dark);
}

.review-toolbar .secondary-button:hover {
  border-color: var(--accent);
  background: #ffffff;
  color: var(--accent-dark);
}

.toolbar-status {
  max-width: 180px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.review-list,
.pilot-panel,
.eval-panel,
.regression-panel,
.provider-panel,
.entity-panel,
.fix-panel {
  padding: 16px;
}

.admin-side-panel {
  display: grid;
  gap: 14px;
}

.review-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.review-list-heading h1 {
  font-size: 22px;
}

#reviewRange {
  color: var(--muted);
  font-size: 13px;
}

.review-items {
  display: grid;
  gap: 12px;
}

.review-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfc;
}

.review-card-header,
.review-card-body,
.review-card-actions,
.review-card-sources {
  padding: 12px;
}

.review-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.review-rating {
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff7e6;
  color: #644a13;
  font-size: 12px;
  font-weight: 760;
}

.review-decision {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
}

.review-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.review-card-body {
  display: grid;
  gap: 10px;
}

.review-card-body p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.review-answer {
  max-height: 150px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
  white-space: pre-wrap;
}

.review-card-sources {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.review-source {
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  font-size: 13px;
}

.review-source a {
  word-break: break-word;
}

.review-card-actions {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 120px;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.review-card textarea {
  min-height: 38px;
  padding: 8px 10px;
  resize: vertical;
}

.pilot-panel h2,
.eval-panel h2,
.regression-panel h2,
.provider-panel h2,
.entity-panel h2 {
  margin-bottom: 12px;
}

.pilot-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pilot-panel-heading h2 {
  margin-bottom: 0;
}

.pilot-status-badge {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 760;
}

.pilot-status-badge.blocked {
  background: #f7eeef;
  color: var(--red);
}

.pilot-status-badge.caution {
  background: #fff7e6;
  color: #644a13;
}

.pilot-status-badge.ready {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.pilot-launch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 12px;
}

.pilot-launch-row a,
.pilot-launch-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.pilot-launch-row a {
  display: inline-flex;
  align-items: center;
}

.pilot-metrics {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}

.pilot-checks {
  display: grid;
  gap: 7px;
}

.pilot-check {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fbfcfc;
}

.pilot-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.pilot-check.yellow .pilot-dot {
  background: var(--gold);
}

.pilot-check.red .pilot-dot {
  background: var(--red);
}

.pilot-check strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.pilot-check span,
.pilot-check small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.pilot-check-value {
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.usage-subheading {
  margin: 16px 0 8px;
  font-size: 12px;
}

.scenario-metrics {
  display: grid;
  border-top: 1px solid var(--line);
}

.scenario-metric {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.scenario-metric > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.scenario-metric strong {
  font-size: 12px;
  line-height: 1.35;
}

.scenario-metric span,
.scenario-metric small,
.scenario-metrics-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.scenario-metric progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  appearance: none;
  background: #eadfe2;
}

.scenario-metric progress::-webkit-progress-bar {
  background: #eadfe2;
}

.scenario-metric progress::-webkit-progress-value,
.scenario-metric progress::-moz-progress-bar {
  background: var(--accent-dark);
}

.scenario-metrics-empty {
  margin: 0;
  padding: 10px 0;
}

.pilot-recent-issues {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.pilot-recent-issues h3 {
  margin: 0;
  font-size: 12px;
}

.pilot-issue {
  border-left: 3px solid var(--red);
  padding-left: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.regression-panel-heading,
.provider-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.regression-panel-heading h2,
.provider-panel-heading h2 {
  margin-bottom: 0;
}

.regression-panel-heading button,
.provider-panel-heading button {
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.regression-panel-heading button:hover,
.provider-panel-heading button:hover {
  background: var(--accent-dark);
}

.provider-summary,
.provider-results {
  display: grid;
  gap: 8px;
}

.provider-panel-top {
  margin-bottom: 14px;
}

.provider-panel.is-focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

.provider-summary {
  margin-bottom: 10px;
}

.provider-summary-row,
.provider-result {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: #fbfcfc;
}

.provider-summary-row strong,
.provider-result strong {
  font-size: 13px;
  line-height: 1.3;
}

.provider-summary-row span,
.provider-result span,
.provider-result p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.provider-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.provider-metrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 720;
}

.provider-result p {
  max-height: 96px;
  overflow: auto;
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}

.provider-result.skipped p {
  border-left-color: var(--gold);
}

.provider-result.error p {
  border-left-color: var(--red);
}

.entity-panel-heading,
.entity-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.entity-panel-heading h2 {
  margin-bottom: 0;
}

.entity-panel-heading button,
.entity-controls button,
.entity-form button {
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.entity-controls {
  margin-bottom: 10px;
}

.entity-controls select,
.entity-form input,
.entity-form select,
.entity-form textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.entity-controls select,
.entity-form input,
.entity-form select {
  padding: 0 9px;
}

.entity-form textarea {
  padding: 8px 9px;
  resize: vertical;
}

.entity-items {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.entity-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fbfcfc;
  color: var(--ink);
  text-align: left;
}

.entity-item.selected {
  border-color: var(--accent);
  background: #eef6ff;
}

.entity-item strong {
  font-size: 13px;
  line-height: 1.25;
}

.entity-item span {
  color: var(--muted);
  font-size: 12px;
}

.entity-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.entity-form label {
  display: grid;
  gap: 4px;
}

.entity-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.entity-active-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.entity-active-row input {
  width: 18px;
  min-height: 18px;
}

.eval-details {
  display: grid;
  gap: 10px;
}

.eval-details div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fbfcfc;
}

.eval-details dt {
  color: var(--muted);
  font-size: 12px;
}

.eval-details dd {
  margin-top: 5px;
  font-weight: 760;
  word-break: break-word;
}

.fix-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.fix-panel-controls {
  display: flex;
  gap: 6px;
}

.fix-panel-heading select,
.fix-panel-heading button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

.fix-panel-heading select {
  max-width: 132px;
}

.fix-panel-heading button {
  padding: 0 9px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 760;
}

.regression-status {
  min-height: 18px;
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.fix-task-items {
  display: grid;
  gap: 10px;
}

.fix-task {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fbfcfc;
}

.fix-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fix-task-title {
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.fix-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fix-task-meta span {
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 760;
}

.fix-task p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.fix-task-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}

.fix-task-actions select,
.fix-task-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.fix-task-actions button {
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.regression-label-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.regression-label-editor label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.regression-label-editor label:nth-child(1),
.regression-label-editor label:nth-child(2),
.regression-label-editor label:nth-child(7) {
  grid-column: 1 / -1;
}

.regression-label-editor input,
.regression-label-editor select,
.regression-label-editor textarea,
.regression-label-editor button {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.regression-label-editor input,
.regression-label-editor select,
.regression-label-editor textarea {
  padding: 6px 8px;
}

.regression-label-editor textarea {
  min-height: 58px;
  resize: vertical;
}

.regression-label-editor button {
  grid-column: 1 / -1;
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

@media (max-width: 1020px) {
  .admin-summary,
  .review-grid {
    grid-template-columns: 1fr;
  }

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

  .review-toolbar label {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .pilot-guide-page {
    width: min(100% - 24px, 1040px);
    padding-top: 16px;
  }

  .pilot-guide-hero h1 {
    font-size: 28px;
  }

  .pilot-guide-grid {
    grid-template-columns: 1fr;
  }

  .pilot-install {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .pilot-install-copy h2 {
    font-size: 21px;
  }

  .pilot-qr {
    order: -1;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-card-actions {
    grid-template-columns: 1fr;
  }
}
