.detail-screen .source-tag {
  margin-left: 0;
}
.source-total {
  color: #626d65;
  font-size: 14px;
}
.source-track {
  display: flex;
  gap: 2px;
  height: 12px;
  margin-top: 10px;
}
.source-track span {
  border-radius: 2px;
}
.track-actual {
  background: #477c5d;
}
.track-rule {
  background: #6b8da5;
}
.track-estimate {
  background: #d8a07c;
}
.track-entered {
  background: #9aa39d;
}
.source-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  font-size: 14px;
}
.source-legend dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #626d65;
}
.source-legend i {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 2px;
}
.source-legend dd {
  margin-top: 4px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.check-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e4e8e5;
}
.check-list li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-block: 14px;
  border-bottom: 1px solid #e4e8e5;
}
.check-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.check-list .source-tag {
  justify-self: start;
  margin-top: 1px;
}
.check-list p {
  color: #626d65;
  font-size: 14px;
  line-height: 1.5;
}
.check-list strong {
  display: block;
  color: var(--ink);
}

.creative-rank {
  margin: 0;
  padding: 0;
  list-style: none;
}
.creative-rank li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 12px;
  margin-inline: -12px;
  border-top: 1px solid #e4e8e5;
}
.rank-number {
  color: #626d65;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.creative-rank h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.creative-rank dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 10px;
}
.creative-rank dt {
  color: #626d65;
  font-size: 14px;
  line-height: 1.4;
}
.creative-rank dd {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.creative-rank .rank-result dd {
  color: #2c6046;
}
.creative-rank .is-loss {
  background: #fcf1e9;
}
.creative-rank .is-loss .rank-result dd {
  color: #88502c;
}
.creative-rank .is-unranked {
  padding-bottom: 0;
}
.creative-rank .is-unranked p {
  margin-top: 4px;
  color: #626d65;
  font-size: 14px;
  line-height: 1.5;
}

.fit-table {
  font-size: 14px;
  line-height: 1.4;
}
.fit-table th,
.fit-table td {
  padding: 9px 8px;
  text-align: right;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.fit-table th:first-child {
  padding-left: 10px;
  text-align: left;
}
.fit-table td:last-child {
  padding-right: 10px;
}
.fit-table thead th {
  color: #626d65;
  vertical-align: bottom;
}
.fit-table tbody tr,
.fit-table tfoot tr {
  border-top: 1px solid #e6eae7;
}
.fit-table tbody th {
  font-weight: 550;
}
.fit-table .is-flagged {
  background: #fcf1e9;
}
.fit-table .is-flagged td:nth-child(4),
.fit-table .is-flagged td:nth-child(5) {
  color: #88502c;
  font-weight: 600;
}
.fit-table tfoot tr {
  border-top-color: #cbd4ce;
}
.fit-table tfoot th,
.fit-table tfoot td {
  font-weight: 550;
}
.fit-finding {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 4px;
  background: #f1f5f7;
  color: #526877;
  font-size: 14px;
  line-height: 1.5;
}
.fit-finding strong {
  display: block;
  color: #3c5e73;
}
.fit-outcomes {
  margin-top: 14px;
  color: #626d65;
  font-size: 14px;
}
.fit-outcomes strong {
  color: var(--ink);
}

.brief-email {
  border: 1px solid #dce3dd;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 32px -24px #1d332c40;
}
.email-header {
  padding: 20px 26px 18px;
  border-bottom: 1px solid #e4e8e5;
}
.email-from {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #626d65;
  font-size: 14px;
}
.email-from strong {
  color: var(--ink);
}
.email-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.email-time {
  margin-left: auto;
  white-space: nowrap;
}
.email-subject {
  margin-top: 14px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.email-body {
  padding: 22px 26px 26px;
  font-size: 15px;
  line-height: 1.55;
}
.email-body p {
  line-height: 1.55;
}
.email-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}
.email-figures dt {
  color: #626d65;
  font-size: 14px;
}
.email-figures dd {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.email-figures .email-baseline {
  color: #626d65;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}
.email-body h3 {
  margin: 24px 0 10px;
  padding-top: 20px;
  border-top: 1px solid #e4e8e5;
  font-size: 15px;
  font-weight: 600;
}
.email-causes {
  margin: 0;
  padding-left: 20px;
}
.email-causes li + li {
  margin-top: 12px;
}
.email-causes .cause-effect {
  margin-top: 2px;
  color: #626d65;
  font-size: 14px;
}
.ai-panel {
  max-width: 520px;
  padding: 24px;
  border: 1px solid #dce3dd;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 32px -24px #1d332c40;
}
.ai-prompt {
  color: #626d65;
  font-size: 14px;
}
.ai-summary {
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.ai-summary strong {
  font-weight: 600;
}
.ai-surfaces {
  margin-top: 18px;
  border-top: 1px solid #e4e8e5;
  font-size: 14px;
}
.ai-surfaces > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-block: 10px;
  border-bottom: 1px solid #e4e8e5;
}
.ai-surfaces dd {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #626d65;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.run-marks {
  display: inline-flex;
  gap: 4px;
}
.run-marks i {
  width: 10px;
  height: 10px;
  border: 1px solid #9aafa1;
  border-radius: 50%;
}
.run-marks .is-named {
  border-color: #477c5d;
  background: #477c5d;
}
.ai-note {
  margin-top: 16px;
  color: #88502c;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .detail-dashboard,
  .brief-email {
    max-width: 620px;
  }
}
@media (max-width: 520px) {
  .source-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .check-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .creative-rank dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fit-table th,
  .fit-table td {
    padding-inline: 4px;
  }
  .fit-table th:first-child {
    padding-left: 6px;
  }
  .fit-table td:last-child {
    padding-right: 6px;
  }
  .email-header,
  .email-body {
    padding-inline: 16px;
  }
  .email-subject {
    font-size: 17px;
  }
  .ai-panel {
    padding: 20px 16px;
  }
}
@media (max-width: 360px) {
  .fit-table th,
  .fit-table td {
    padding-inline: 2px;
  }
  .fit-table th:last-child,
  .fit-table td:last-child {
    display: none;
  }
}
