:root {
  --ink: #12201d;
  --muted: #66736f;
  --line: #dde5e2;
  --paper: #f6f8f7;
  --card: #fff;
  --green: #1f7a5b;
  --green2: #e5f4ee;
  --amber: #b76b18;
  --amber2: #fff1dd;
  --blue: #3478b9;
  --violet: #7456b7;
  --shadow: 0 10px 30px rgba(21, 51, 43, 0.07);
}
[hidden] {
  display: none !important;
}
.network-activity {
  position: fixed;
  z-index: 9999;
  top: 10px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid #c9e7dc;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  box-shadow: 0 5px 20px rgba(21, 51, 43, 0.14);
  font-size: 12px;
  font-weight: 700;
}
.network-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #c9e7dc;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: network-spin 0.75s linear infinite;
  flex: 0 0 auto;
}
@keyframes network-spin { to { transform: rotate(360deg); } }
.cest-evidence:empty { display: none; }
.cest-evidence {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.cest-evidence > strong { display: block; color: var(--ink); margin-bottom: 6px; }
.cest-candidates { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.cest-candidate {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.cest-candidate[aria-pressed="true"] { border-color: var(--green); background: var(--green2); }
.fiscal-knowledge { margin: 12px 0; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.fiscal-knowledge details { margin-top: 9px; }
.fiscal-knowledge summary { cursor: pointer; color: var(--green); font-weight: 700; }
.fiscal-knowledge p { line-height: 1.5; white-space: pre-line; }
.fiscal-knowledge details details p { max-height: 240px; overflow-y: auto; }
.fiscal-reference { padding: 9px 0; border-bottom: 1px solid var(--line); }
.rtc-candidate { white-space: normal; text-align: left; height: auto; }
.rtc-results, .rtc-search-results { max-height: 280px; overflow-y: auto; }
.field-origin { color: #936000; font-size: 9px; line-height: 1.3; }
.tax-review-confirm { display: block; padding: 10px 0; font-size: 12px; line-height: 1.5; }
.classification-attributes { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f5faf8; }
.classification-attributes label { display: block; margin: 8px 0; font-size: 12px; }
.classification-attributes input { display: block; width: 100%; margin-top: 4px; }
.cest-candidate b { white-space: nowrap; color: var(--green); }
.priority.valid {
  background: var(--green2);
  color: var(--green);
}
.official-link {
  display: inline-block;
  color: var(--green);
  font-weight: 800;
  margin-top: 8px;
  text-decoration: none;
}
.evidence li small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.bulkbar {
  flex-wrap: wrap;
}
.safe-button + button {
  margin-left: 0 !important;
}
.top-actions {
  display: flex;
  gap: 9px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.safe-button {
  background: #e4f2ed !important;
  color: #176348 !important;
  border: 1px solid #b7dacd !important;
  margin-left: auto !important;
}
.dialog-copy {
  color: var(--muted);
  font-size: 13px;
}
.field {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  font-size: 12px;
  font-weight: 700;
}
.field small {
  font-weight: 400;
  color: var(--muted);
}
.field select {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.hero-card.empty {
  background: linear-gradient(120deg, #29463e, #355f52);
}
.hero-card.empty .progress-ring {
  background: rgba(255, 255, 255, 0.12);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: #10251f;
  color: #d7e4df;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 30px;
  color: #fff;
  text-decoration: none;
  font: 800 19px Manrope;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #46bd8b;
  color: #10251f;
}
nav {
  display: grid;
  gap: 7px;
}
nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  color: #adc0ba;
  text-decoration: none;
  border-radius: 9px;
  font-weight: 600;
}
nav a.active,
nav a:hover {
  background: #1c3a31;
  color: #fff;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #2b463e;
  padding: 20px 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  background: #cdeadd;
  color: #174c3c;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}
.sidebar-foot strong,
.sidebar-foot small {
  display: block;
}
.sidebar-foot strong {
  font-size: 13px;
}
.sidebar-foot small {
  color: #8ba29b;
  margin-top: 2px;
  font-size: 11px;
}
main {
  margin-left: 236px;
  padding: 30px 38px 70px;
  max-width: 1600px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--green);
}
h1,
h2,
h3 {
  font-family: Manrope;
  margin: 0;
}
h1 {
  font-size: 29px;
  margin-top: 3px;
}
.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 11px 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.hero-card {
  background: linear-gradient(120deg, #17382e, #1f5a46);
  color: #fff;
  padding: 26px 30px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.hero-card h2 {
  font-size: 21px;
  margin: 12px 0 6px;
}
.hero-card p {
  margin: 0;
  color: #c5dbd3;
}
.pill {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
}
.pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #61d9a6;
  margin-right: 6px;
  box-shadow: 0 0 0 4px rgba(97, 217, 166, 0.15);
}
.progress-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(#67d5a8 82%, rgba(255, 255, 255, 0.14) 0);
  display: grid;
  place-content: center;
  text-align: center;
  position: relative;
}
.progress-ring:after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #205440;
}
.progress-ring > * {
  z-index: 1;
}
.progress-ring strong {
  font: 800 23px Manrope;
}
.progress-ring span {
  font-size: 10px;
  color: #c8ded6;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.metrics article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
  display: flex;
  gap: 13px;
  box-shadow: 0 3px 14px rgba(20, 52, 43, 0.03);
}
.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
}
.metric-icon.green {
  background: var(--green2);
  color: var(--green);
}
.metric-icon.amber {
  background: var(--amber2);
  color: var(--amber);
}
.metric-icon.blue {
  background: #e8f2fb;
  color: var(--blue);
}
.metric-icon.violet {
  background: #f0ebfa;
  color: var(--violet);
}
.metrics small,
.metrics strong,
.metrics em {
  display: block;
}
.metrics small {
  font-size: 11px;
  color: var(--muted);
  min-height: 28px;
}
.metrics strong {
  font: 800 23px Manrope;
  margin: 2px 0;
}
.metrics em {
  font-size: 10px;
  color: #82908c;
  font-style: normal;
}
.workbench {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.section-head h2 {
  font-size: 21px;
  margin: 5px 0;
}
.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}
.filters {
  display: flex;
  background: #f1f4f3;
  padding: 4px;
  border-radius: 10px;
}
.filter {
  border: 0;
  background: transparent;
  color: #68746f;
  padding: 8px 10px;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
}
.filter.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.filter b {
  background: #dfe6e3;
  border-radius: 10px;
  padding: 2px 6px;
  margin-left: 4px;
}
.bulkbar {
  margin: 22px 0 10px;
  padding: 10px 12px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.bulkbar label {
  color: var(--ink);
  font-weight: 600;
}
.bulkbar button {
  margin-left: auto;
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 7px;
  padding: 8px 12px;
  font-weight: 700;
}
.bulkbar button:disabled {
  opacity: 0.35;
}
.groups {
  display: grid;
  gap: 10px;
}
.group {
  display: grid;
  grid-template-columns: auto 1.4fr 0.7fr 0.7fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px;
  transition: 0.2s;
}
.group:hover {
  border-color: #aac7bc;
  box-shadow: 0 5px 14px rgba(21, 70, 55, 0.06);
}
.group.approved {
  opacity: 0.55;
  background: #f3faf7;
}
.group-title strong {
  display: block;
  font-size: 14px;
}
.group-title[data-action="details"] {
  cursor: pointer;
}
.group-title[data-action="details"]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}
.group-title span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.ncm small,
.confidence small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.ncm strong {
  font-family: Manrope;
}
.ncm-code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: help;
  font: 800 15px Manrope, sans-serif;
  text-align: left;
}
.ncm-code.suggested {
  color: var(--green);
}
.ncm-tooltip {
  position: fixed;
  z-index: 20;
  display: grid;
  gap: 5px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid #b6d5c7;
  border-radius: 9px;
  background: #17382e;
  color: #f4fffb;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}
.ncm-tooltip strong { color: #78dfb4; }
.confidence strong {
  font-size: 12px;
}
.bar {
  height: 5px;
  background: #e7ecea;
  border-radius: 4px;
  margin-top: 6px;
  width: 80px;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--green);
}
.priority {
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 12px;
}
.priority.high {
  background: #fee9e5;
  color: #ad3d2d;
}
.priority.medium {
  background: var(--amber2);
  color: var(--amber);
}
.group-actions {
  display: flex;
  gap: 7px;
}
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}
.icon-btn.approve {
  color: var(--green);
  border-color: #aed8c8;
}
.upload-card {
  margin-top: 18px;
  border: 1.5px dashed #b9cac4;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fbfdfc;
}
.upload-card.drag {
  background: #ebf7f2;
  border-color: var(--green);
}
.upload-icon {
  width: 43px;
  height: 43px;
  border-radius: 11px;
  background: var(--green2);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.upload-card h3 {
  font-size: 15px;
}
.upload-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 0;
}
.text-button {
  border: 0;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
.file-hint {
  margin-left: auto;
  font-size: 11px;
  color: #87948f;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #17382e;
  color: #fff;
  padding: 13px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transform: translateY(100px);
  opacity: 0;
  transition: 0.25s;
  z-index: 5;
}
.toast.show {
  transform: none;
  opacity: 1;
}
dialog {
  border: 0;
  border-radius: 15px;
  padding: 0;
  max-width: 580px;
  width: calc(100% - 32px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}
dialog::backdrop {
  background: rgba(9, 24, 19, 0.55);
}
dialog form {
  padding: 28px;
  position: relative;
}
.dialog-close {
  position: absolute;
  right: 18px;
  top: 15px;
  border: 0;
  background: none;
  font-size: 24px;
  cursor: pointer;
}
.evidence {
  background: #f5f8f7;
  padding: 14px;
  border-radius: 9px;
  margin: 16px 0;
  font-size: 13px;
}
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.evidence-grid div {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
}
.evidence-grid small,
.evidence-grid strong {
  display: block;
}
.evidence-grid small {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
dialog menu {
  padding: 18px 0 0;
  margin: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 1050px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .group {
    grid-template-columns: auto 1.5fr 0.8fr auto;
  }
  .priority {
    display: none;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    height: 68px;
    padding: 12px 18px;
    flex-direction: row;
    align-items: center;
  }
  .brand {
    padding: 0;
  }
  .sidebar nav {
    display: none;
  }
  .sidebar-foot {
    display: none;
  }
  main {
    margin: 0;
    padding: 20px 14px;
  }
  .topbar h1 {
    font-size: 23px;
  }
  .hero-card {
    padding: 22px;
  }
  .hero-progress {
    display: none;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .section-head {
    display: block;
  }
  .filters {
    margin-top: 16px;
    overflow: auto;
  }
  .group {
    grid-template-columns: auto 1fr auto;
  }
  .ncm,
  .confidence {
    display: none;
  }
  .upload-card {
    align-items: flex-start;
  }
  .file-hint {
    display: none;
  }
}
@media (max-width: 470px) {
  main {
    display: flex;
    flex-direction: column;
  }
  .topbar { order: 1; }
  .hero-card { order: 2; }
  .workbench { order: 3; }
  .upload-card { order: 4; }
  .metrics { order: 5; grid-template-columns: 1fr 1fr; }
  .source-strip { order: 6; }
  .quick-guide { order: 7; }
  /* No celular, a fila vem antes do material explicativo. */
  .quick-guide,
  .source-strip {
    display: none;
  }
  .topbar h1 {
    font-size: 18px;
  }
  .topbar #openGuide {
    display: none;
  }
  .topbar #exportAudit {
    min-width: 36px;
    padding: 8px 10px;
    font-size: 0;
  }
  .topbar #exportAudit:after {
    content: "↓";
    font-size: 18px;
  }
  .topbar #newAudit {
    padding: 9px 10px;
    font-size: 0;
  }
  .topbar #newAudit:after {
    content: "Importar";
    font-size: 11px;
  }
  .topbar .eyebrow {
    font-size: 9px;
  }
  .group {
    gap: 9px;
    padding: 13px 10px;
  }
  .group-actions .details {
    display: block;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0;
  }
  .group-actions .details:after {
    content: attr(data-mobile-label);
    font-size: 11px;
    white-space: nowrap;
  }
}
.priority.compatible,
.priority.corrected {
  background: var(--green2);
  color: var(--green);
}
.priority.suspect,
.priority.invalid {
  background: #fee9e5;
  color: #ad3d2d;
}
.priority.uncertain {
  background: var(--amber2);
  color: var(--amber);
}
.bar.suspect i,
.bar.invalid i {
  background: #c54a37;
}
.bar.uncertain i {
  background: var(--amber);
}
.group-score {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 5px;
  white-space: nowrap;
}
.metric-explain {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  margin: 14px 0;
  font-size: 12px;
}
.metric-explain > strong {
  font-size: 13px;
}
.metric-explain span {
  display: flex;
  gap: 8px;
  align-items: center;
}
.metric-explain b {
  font-size: 16px;
  color: var(--green);
}
.decision-field {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
.decision-field legend {
  font: 700 14px Manrope;
  margin-bottom: 10px;
}
.tax-chip {
  display: inline-flex;
  width: max-content;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.tax-chip.ready { color: #176b50; background: #e2f4ec; }
.tax-chip.pending { color: #965b00; background: #fff0d6; }
.tax-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #cddbd6;
  border-radius: 12px;
  background: #f7faf9;
}
.tax-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.tax-panel-head > div { display: grid; gap: 7px; }
.tax-panel-head p { margin: 0; color: #596862; font-size: 12px; }
.tax-panel-head > small { max-width: 220px; text-align: right; color: #61726b; }
.tax-status {
  display: inline-flex;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.tax-status.confirmed { color: #176b50; background: #dff3ea; }
.tax-status.manual { color: #275ca8; background: #e2edff; }
.tax-status.pending { color: #965b00; background: #fff0d6; }
.tax-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.tax-grid > label {
  min-width: 0;
  padding: 9px;
  border: 1px solid #dce6e2;
  border-radius: 8px;
  background: white;
}
.tax-grid small { display: block; color: #64736d; margin-bottom: 4px; }
.tax-grid input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: #17211d;
  font: 700 14px Manrope, sans-serif;
}
.tax-grid input:not(:disabled) {
  padding: 7px;
  border: 1px solid #17825f;
  border-radius: 6px;
  background: #fff;
}
.edit-tax {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #17825f;
  border-radius: 8px;
  background: white;
  color: #176b50;
  font-weight: 700;
  cursor: pointer;
}
.edit-tax:disabled { opacity: .7; cursor: default; }
.tax-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lookup-tax {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #176b50;
  border-radius: 8px;
  background: #17825f;
  color: white;
  font-weight: 700;
  cursor: pointer;
}
.lookup-tax:disabled { opacity: .7; cursor: wait; }
@media (max-width: 700px) {
  .tax-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tax-panel-head { display: grid; }
  .tax-panel-head > small { max-width: none; text-align: left; }
}
.candidate-option,
.similar-option {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 7px 0;
  cursor: pointer;
}
.candidate-option:has(input:checked),
.similar-option:has(input:checked) {
  background: #edf8f3;
  border-color: #78bba1;
}
.candidate-option span,
.similar-option span {
  display: grid;
  gap: 2px;
  font-size: 11px;
}
.candidate-option strong,
.similar-option strong {
  font-size: 12px;
}
.candidate-option small,
.similar-option small,
.field-help {
  color: var(--muted);
  font-size: 10px;
}
.manual-ncm {
  margin: 14px 0;
  padding: 12px;
  border: 1px dashed #9bb8ad;
  border-radius: 9px;
  background: #f8fbfa;
}
.manual-ncm label,
.manual-ncm label strong,
.manual-ncm label small {
  display: block;
}
.manual-ncm label small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.manual-ncm input {
  width: 100%;
  margin: 9px 0 5px;
  padding: 10px 11px;
  border: 1px solid #aec8bd;
  border-radius: 7px;
  font:
    600 13px "DM Sans",
    sans-serif;
}
#manualNcmPreview {
  margin-top: 8px;
  font-size: 11px;
}
.ncm-match,
.ncm-search-result {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #add1c0;
  border-radius: 7px;
  background: #edf8f3;
}
.ncm-search-results {
  display: grid;
  gap: 5px;
}
.ncm-search-result {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.ncm-search-result:hover {
  border-color: var(--green);
  background: #e2f3eb;
}
.catalog-lookup {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #d6e4de;
  font-size: 11px;
}
.catalog-lookup > span {
  color: var(--muted);
}
.catalog-search {
  justify-self: start;
  padding: 7px 10px;
  border: 1px solid #168161;
  border-radius: 6px;
  background: #fff;
  color: #116a50;
  font: 700 11px "DM Sans", sans-serif;
  cursor: pointer;
}
.catalog-search:disabled {
  opacity: .6;
  cursor: wait;
}
#catalogSearchResults {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}
.catalog-results {
  display: grid;
  gap: 5px;
}
.catalog-result {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #b8d5c7;
  border-radius: 7px;
  background: #f3faf6;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.catalog-result:hover {
  border-color: var(--green);
  background: #e2f3eb;
}
.similar-list {
  max-height: 190px;
  overflow: auto;
  padding-right: 3px;
}
.evidence.warning {
  border-left: 4px solid var(--amber);
}
.cosmosbar {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #cfe0f0;
  border-radius: 10px;
  background: #f3f8fc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cosmosbar strong,
.cosmosbar span {
  display: block;
}
.cosmosbar strong {
  font-size: 12px;
  color: #245d91;
}
.cosmosbar span {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}
.cosmosbar button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.quick-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 0;
}
.quick-guide article {
  display: flex;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.quick-guide b {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green2);
  color: var(--green);
}
.quick-guide strong,
.quick-guide span {
  display: block;
}
.quick-guide strong {
  font-size: 12px;
}
.quick-guide span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  margin-top: 3px;
}
.demo-button {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 7px 0 0;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
}
.source-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.source-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.source-strip strong,
.source-strip span {
  display: block;
}
.source-strip strong {
  font-size: 10px;
}
.source-strip span {
  font-size: 9px;
  color: var(--muted);
}
.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aeb8b4;
  flex: 0 0 auto;
}
.source-dot.active {
  background: var(--green);
}
.source-dot.limited {
  background: var(--amber);
}
.source-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 9px;
  background: #eef3f1;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}
.guide-content {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.guide-content section {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.guide-content b {
  color: var(--green);
}
.guide-content p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.context-warning { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff5e6; color: #7a4a00; font-size: 11px; line-height: 1.45; }
@media (max-width: 760px) {
  .quick-guide,
  .source-strip {
    grid-template-columns: 1fr;
  }
  .cosmosbar {
    align-items: stretch;
    flex-direction: column;
  }
  .context-grid { grid-template-columns: 1fr; }
}
