:root {
  color-scheme: light;
  --bg: #f5f7f5;
  --paper: #fff;
  --ink: #243b35;
  --muted: #71847a;
  --line: #dfe7e0;
  --brand: #236a51;
  --soft: #eaf3ed;
  --warn: #98691f;
  --warn-bg: #fbf3e3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  transition: background 0.15s;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #98bea5;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--brand);
  text-decoration: none;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  line-height: 1.35;
  margin: 0 0 14px;
  font-weight: 600;
}
h2 {
  font-size: 19px;
  margin: 0 0 12px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  margin: 0 0 10px;
  font-weight: 600;
}
p {
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--brand);
  margin: 0 0 12px;
  font-weight: 600;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 222px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 31px 18px 19px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 27px;
  font-weight: 650;
  padding: 0 10px;
  line-height: 1.2;
  letter-spacing: -1px;
}
.mark {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font:
    36px/1 Georgia,
    serif;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 6px;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 2px;
  color: #9ba79e;
  padding: 0 13px;
  margin: 42px 0 16px;
}
nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 13px;
}
nav button > span {
  font-size: 21px;
  width: 23px;
  text-align: center;
}
nav button.active {
  background: var(--soft);
  color: var(--brand);
  font-weight: 600;
}
nav button:hover {
  background: #f2f6f1;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 25px;
}
.user {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #ebe9df;
  border-radius: 50%;
  font-size: 12px;
}
.user strong,
.user small {
  display: block;
  font-size: 11px;
}
.user small {
  color: var(--muted);
  font-size: 10px;
}
.user button {
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 22px;
  color: var(--muted);
}
.content {
  margin-left: 222px;
  min-width: 0;
  flex: 1;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  font-size: 12px;
  color: var(--muted);
  gap: 12px;
}
.topbar b {
  font-weight: 400;
  margin: 0 14px;
  color: #b1bdb4;
}
.topbar strong {
  font-weight: 500;
  color: var(--ink);
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 36px 38px;
  min-height: calc(100vh - 141px);
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 19px 38px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #92a097;
  gap: 10px;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--brand);
  background: var(--soft);
  border: 1px solid #d9e8dc;
}
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: #eedecc;
}
.badge.gray {
  color: var(--muted);
  background: #f4f6f3;
  border-color: var(--line);
}
.heading {
  margin-bottom: 28px;
}
.heading p:last-child {
  margin-bottom: 0;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  padding: 24px;
  margin-bottom: 20px;
}
.query-box {
  padding: 22px 24px;
}
.query-box textarea {
  border: 0;
  background: transparent;
  box-shadow: none !important;
  width: 100%;
  padding: 0;
  resize: vertical;
  font-size: 17px;
  min-height: 72px;
}
.query-box textarea::placeholder {
  font-size: 16px;
}
.query-bottom,
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.query-bottom {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 8px;
}
.primary {
  padding: 10px 18px;
  border: 1px solid var(--brand);
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}
.primary:hover {
  background: #18593f;
}
.secondary {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-size: 12px;
}
.secondary:hover {
  background: var(--soft);
}
.text-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12px;
}
.examples {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 23px;
}
.examples button {
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dce4dd;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #236a5111;
}
input::placeholder,
textarea::placeholder {
  color: #9aa79d;
  font-size: 12px;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
label input,
label select,
label textarea {
  margin-top: 6px;
}
.fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr;
  gap: 15px;
  align-items: end;
}
.fields .primary {
  height: 44px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 27px 0 15px;
}
.section-title h2,
.section-title h3 {
  margin: 0;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.guide {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.guide .number {
  font:
    26px Georgia,
    serif;
  color: #b6cbbb;
  margin-bottom: 18px;
}
.guide p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: #f0f4ee;
}
tr:last-child td {
  border-bottom: 0;
}
td button {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: var(--brand);
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
tr:hover td {
  background: #fafcf8;
}
.empty {
  padding: 31px;
  text-align: center;
  border: 1px dashed #d3ded3;
  border-radius: 9px;
  font-size: 12px;
  color: var(--muted);
  background: #fcfdfb;
}
.notice {
  padding: 12px 15px;
  border-radius: 7px;
  font-size: 12px;
  margin: 13px 0;
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid #eadfc7;
}
.notice.info {
  background: var(--soft);
  color: var(--brand);
  border-color: #d3e3d5;
}
.steps {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin: 17px 0 25px;
}
.steps .done {
  color: var(--brand);
}
.candidates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.candidate {
  margin-bottom: 0;
}
.candidate p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.candidate button {
  margin-top: 12px;
}
.record-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.record-heading h1 {
  font-size: 25px;
}
.tabs {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid var(--line);
  margin: 23px 0 21px;
  overflow: auto;
}
.tabs button {
  padding: 11px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.summary {
  padding: 21px;
  border-radius: 9px;
  background: var(--soft);
  border: 1px solid #d7e7d9;
}
.summary .eyebrow {
  margin-bottom: 12px;
}
.finding {
  margin: 10px 0;
  font-size: 14px;
}
.citation {
  padding: 1px 5px;
  border: 1px solid #c8dbca;
  border-radius: 4px;
  background: white;
  color: var(--brand);
  font-size: 10px;
  margin: 0 2px;
  vertical-align: middle;
}
.summary .model {
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid #d2e2d4;
  padding-top: 12px;
  margin-top: 15px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(230px, 1fr);
  gap: 20px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px 25px;
  margin: 0;
}
.detail-grid dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.detail-grid dd {
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 20px;
}
.detail-section p {
  font-size: 13px;
  white-space: pre-wrap;
}
.evidence-list {
  max-height: 500px;
  overflow: auto;
}
.evidence-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.evidence-row:last-child {
  border-bottom: 0;
}
.evidence-row p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}
.review-form textarea {
  min-height: 100px;
  margin: 12px 0;
  resize: vertical;
}
.history-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.history-entry p {
  font-size: 12px;
  white-space: pre-wrap;
}
.history-entry small {
  font-size: 10px;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 17px 0;
}
.filters input {
  max-width: 330px;
}
.filters select {
  width: auto;
}
.batch-text {
  min-height: 135px;
  resize: vertical;
}
.mapping {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.mapping label {
  min-width: 145px;
  flex: 1;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline-check input {
  width: auto;
  margin: 0;
}
.status-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.metric {
  font-size: 30px;
  margin: 10px 0;
}
.metric small {
  font-size: 12px;
  color: var(--muted);
}
.change {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 14px;
}
.diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12px;
}
.diff > div {
  background: var(--bg);
  padding: 13px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.diff small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}
details summary {
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
  padding: 5px 0;
}
details[open] > summary {
  margin-bottom: 15px;
}
pre {
  background: var(--bg);
  padding: 14px;
  font-size: 11px;
  overflow: auto;
  max-height: 450px;
  white-space: pre-wrap;
  word-break: break-word;
}
#toast {
  position: fixed;
  right: 28px;
  top: 83px;
  max-width: 450px;
  z-index: 30;
  background: #213d30;
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 30px #0002;
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 25px;
  max-width: 850px;
  width: 94vw;
  max-height: 88vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #152b225c;
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.dialog-head button {
  background: none;
  border: 0;
  font-size: 27px;
  color: var(--muted);
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: white;
}
.login-intro {
  padding: 12vh 9vw;
  background: #1c4130;
  color: #e8f3e9;
}
.login-intro .mark {
  background: #b9dec5;
  color: #1c4130;
  margin-bottom: 60px;
}
.login-intro .eyebrow {
  color: #92b99e;
}
.login-intro h1 {
  font-size: 43px;
  line-height: 1.5;
  margin: 15px 0 25px;
}
.login-intro > p:not(.eyebrow) {
  color: #a5c4ac;
  line-height: 2;
}
.login-intro small {
  display: block;
  color: #91b099;
  margin-top: 75px;
}
.login-form {
  padding: 60px;
  max-width: 490px;
  margin: auto;
  width: 100%;
}
.login-form h2 {
  font-size: 24px;
}
.login-form button {
  display: flex;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: white;
  width: 100%;
  padding: 15px 19px;
  margin: 12px 0;
  border-radius: 8px;
  text-align: left;
}
.login-form button:hover {
  background: var(--soft);
}
#tenant-buttons {
  margin: 30px 0 23px;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .sidebar {
    width: 195px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .content {
    margin-left: 195px;
  }
  main {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .status-cards {
    grid-template-columns: 1fr 1fr;
  }
  .fields {
    grid-template-columns: 1.5fr 1fr;
  }
  .fields button {
    grid-column: 1/-1;
  }
  .guide {
    padding: 17px;
  }
  h1 {
    font-size: 27px;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: auto;
    padding: 17px;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 23px;
  }
  .mark {
    width: 34px;
    height: 34px;
    font-size: 29px;
  }
  .nav-caption {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 17px;
    gap: 6px;
  }
  nav button {
    min-width: max-content;
    width: auto;
    padding: 7px 10px;
    margin: 0;
  }
  nav button > span {
    display: none;
  }
  .sidebar-bottom {
    padding-top: 12px;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
  }
  .sidebar-bottom > p {
    display: none;
  }
  .user {
    padding-top: 10px;
    width: 100%;
  }
  .content {
    margin: 0;
  }
  .topbar {
    height: 51px;
    padding: 0 18px;
    font-size: 11px;
  }
  .topbar b {
    margin: 0 7px;
  }
  main {
    padding: 24px 17px;
    min-height: 500px;
  }
  .heading h1 {
    font-size: 25px;
  }
  .query-box {
    padding: 17px;
  }
  .guide-grid,
  .candidates,
  .detail-grid,
  .status-cards {
    grid-template-columns: 1fr;
  }
  .guide {
    padding: 18px;
  }
  .guide .number {
    display: none;
  }
  .guide h3 {
    margin-bottom: 5px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .record-heading h1 {
    font-size: 23px;
  }
  .tabs {
    gap: 20px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-intro {
    padding: 35px;
  }
  .login-intro .mark {
    margin-bottom: 28px;
  }
  .login-intro h1 {
    font-size: 33px;
  }
  .login-intro small {
    display: none;
  }
  .login-form {
    padding: 35px;
  }
  .diff {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 17px;
    font-size: 9px;
  }
  footer > span:last-child {
    display: none;
  }
  #toast {
    right: 17px;
    left: 17px;
    top: 18px;
  }
}

.query-status-row {
  margin-bottom: 10px;
}
.watch-actions {
  margin-top: 12px;
}

/* Company risk is the first reading priority, including unknown coverage. */
.risk-overview { margin: 20px 0; padding: 24px 28px; border: 1px solid #e6d3ad; border-left: 5px solid #b77a20; border-radius: 14px; background: #fffaf0; }
.risk-overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.risk-overview h2 { font-size: 24px; color: #77511c; margin-bottom: 8px; }
.risk-overview .eyebrow { color: #98691f; margin-bottom: 8px; }
.risk-overview-heading p { margin: 0 0 10px; max-width: 760px; }
.risk-overview-heading button { flex-shrink: 0; }
.risk-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 20px 0 12px; }
.risk-metric { padding: 12px 18px; border: 1px solid #eadeca; border-radius: 9px; background: #ffffffb8; }
.risk-metric strong { display: block; font-size: 30px; line-height: 1.4; color: #77511c; }
.risk-metric span { font-size: 13px; }
.risk-alert { background: #fff5f3; border-color: #e9b6aa; border-left-color: #b34a38; }
.risk-alert h2, .risk-alert .eyebrow, .risk-alert .risk-metric strong { color: #9c3d2c; }
.risk-record { border-left: 4px solid #b77a20; }
.risk-record > .record-heading h3 { font-size: 21px; }
@media (max-width: 720px) {
  .risk-overview { padding: 18px; }
  .risk-overview-heading { flex-direction: column; gap: 8px; }
  .risk-overview h2 { font-size: 21px; }
  .risk-metrics { grid-template-columns: 1fr; gap: 8px; }
  .risk-metric { display: flex; align-items: center; gap: 16px; }
  .risk-metric strong { font-size: 25px; min-width: 52px; }
}
