/* src/browser/styles.css */
:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #182033;
  background: #f5f7fa;
  font-synthesis: none;
  --ink: #182033;
  --muted: #6c7588;
  --line: #e4e8ef;
  --panel: #fff;
  --blue: var(--checktree-accent, #2f63d8);
  --blue-soft: #edf3ff;
  --green: #168457;
  --green-soft: #eaf8f1;
  --red: #c83d4d;
  --red-soft: #fff0f1;
  --amber: #a76a12;
  --amber-soft: #fff6e6;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  min-width: 320px;
  margin: 0;
  background: #f5f7fa;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 62px;
  border-bottom: 1px solid rgba(217, 223, 232, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  width: min(1380px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.product-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button,
.primary-button {
  border: 0;
  border-radius: 7px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: .15s ease;
}
.icon-button {
  background: transparent;
  color: #5d687b;
}
.icon-button:hover {
  background: #f0f3f7;
  color: var(--ink);
}
.primary-button {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(17, 25, 39, .16);
}
.primary-button:hover {
  background: #28324a;
  transform: translateY(-1px);
}
.workspace {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 80px;
}
.overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 28px;
}
.overview-title {
  max-width: 760px;
}
.eyebrow {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.overview h1 {
  margin: 0;
  color: #121a2c;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -.035em;
}
.overview-title > p:last-child {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.overall-status {
  min-width: 320px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid;
  border-radius: 12px;
  background: #fff;
}
.overall-status.success {
  border-color: #bfe7d4;
  background: var(--green-soft);
}
.overall-status.danger {
  border-color: #f2c7cc;
  background: var(--red-soft);
}
.overall-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}
.overall-status.success .overall-icon {
  background: var(--green);
}
.overall-status.danger .overall-icon {
  background: var(--red);
}
.overall-status div {
  display: grid;
  gap: 3px;
}
.overall-status strong {
  font-size: 15px;
}
.overall-status small {
  color: #647084;
  font-size: 12px;
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(31, 42, 68, .035);
}
.metric {
  min-height: 104px;
  display: grid;
  align-content: center;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border-right: 0;
}
.metric > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.metric strong {
  margin: 3px 0 1px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.metric small {
  color: #9299a8;
  font-size: 11px;
}
.metric.success strong {
  color: var(--green);
}
.metric.danger strong {
  color: var(--red);
}
.content-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 22px;
}
.category-nav > p,
.run-meta > p {
  margin: 0 0 9px;
  color: #8a93a4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.category-nav {
  display: grid;
  gap: 3px;
}
.category-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-left: -10px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #525e72;
  font-size: 13px;
  font-weight: 600;
}
.category-link:hover {
  background: #eceff4;
  color: var(--ink);
}
.category-link em {
  min-width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 10px;
  background: #e8ebf0;
  color: #737d8f;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}
.category-link em.has-issue {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 800;
}
.expect-panel {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.expect-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  color: #586376;
  font-size: 13px;
  font-weight: 700;
}
.expect-panel summary::-webkit-details-marker {
  display: none;
}
.expect-panel summary b {
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9edf3;
  font-size: 10px;
}
.expect-panel dl {
  display: grid;
  gap: 9px;
  margin: 13px 0 0;
}
.expect-panel dl div {
  display: grid;
  gap: 2px;
}
.expect-panel dt {
  color: #9098a7;
  font-size: 10px;
}
.expect-panel dd {
  margin: 0;
  color: #374257;
  font:
    11px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
}
.run-meta {
  min-width: 0;
}
.run-meta code {
  display: block;
  color: #657086;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.run-meta span {
  display: block;
  margin-top: 5px;
  color: #9aa2af;
  font-size: 10px;
}
.results-column {
  min-width: 0;
}
.results-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.results-toolbar h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.02em;
}
.results-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.search-box {
  width: 238px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #fff;
  transition: .15s ease;
}
.search-box:focus-within {
  border-color: #8ca9ef;
  box-shadow: 0 0 0 3px rgba(47, 99, 216, .08);
}
.search-box > span {
  color: #8c95a5;
  font-size: 20px;
}
.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.result-section {
  margin-bottom: 31px;
  scroll-margin-top: 82px;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce2ea;
}
.section-heading p {
  margin: 0 0 3px;
  color: #929aa9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-heading h2 {
  margin: 0;
  font-size: 16px;
}
.section-state {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 750;
}
.section-state.success {
  color: var(--green);
  background: var(--green-soft);
}
.section-state.danger {
  color: var(--red);
  background: var(--red-soft);
}
.result-list {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.result-item {
  border-top: 1px solid var(--line);
  background: #fff;
}
.result-item:first-child {
  border-top: 0;
}
.result-item[hidden],
.result-section[hidden] {
  display: none;
}
.result-item > summary {
  min-height: 72px;
  display: grid;
  grid-template-columns: 28px minmax(180px, 1fr) auto 88px 18px;
  align-items: center;
  gap: 13px;
  padding: 13px 14px 13px 12px;
  cursor: pointer;
  list-style: none;
  transition: background .13s ease;
}
.result-item > summary::-webkit-details-marker {
  display: none;
}
.result-item > summary:hover,
.result-item[open] > summary {
  background: #f8f9fb;
}
.result-item.has-attention.warning > summary {
  background: #fffbf3;
  box-shadow: inset 3px 0 var(--amber);
}
.result-item.has-attention.danger > summary {
  background: #fff7f8;
  box-shadow: inset 3px 0 var(--red);
}
.result-item.has-attention.warning > summary:hover,
.result-item.has-attention.warning[open] > summary {
  background: #fff7e8;
}
.result-item.has-attention.danger > summary:hover,
.result-item.has-attention.danger[open] > summary {
  background: #fff0f2;
}
.status-dot {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}
.status-dot.success {
  color: var(--green);
  background: var(--green-soft);
}
.status-dot.danger {
  color: var(--red);
  background: var(--red-soft);
}
.status-dot.warning {
  color: var(--amber);
  background: var(--amber-soft);
}
.status-dot.info {
  color: var(--blue);
  background: var(--blue-soft);
}
.status-dot.neutral {
  color: #7e8797;
  background: #edf0f4;
}
.result-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.result-main strong {
  color: #253047;
  font-size: 13px;
  font-weight: 720;
}
.result-main small {
  overflow: hidden;
  color: #7b8596;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.source-tags {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.source-tags i {
  padding: 3px 6px;
  border-radius: 4px;
  background: #f0f2f5;
  color: #7d8797;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.source-tags i.pass {
  color: #4f7c68;
  background: #edf7f2;
}
.source-tags i.fail {
  color: var(--red);
  background: var(--red-soft);
}
.result-status {
  justify-self: end;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.result-status.success {
  color: var(--green);
}
.result-status.danger {
  color: var(--red);
}
.result-status.warning {
  color: var(--amber);
}
.result-status.info {
  color: var(--blue);
}
.result-status.neutral {
  color: #818a9a;
}
.result-item.has-attention .result-status {
  padding: 4px 8px;
  border-radius: 5px;
  font-weight: 850;
}
.result-item.has-attention .result-status.warning {
  background: var(--amber-soft);
}
.result-item.has-attention .result-status.danger {
  background: var(--red-soft);
}
.chevron {
  color: #9ca4b1;
  font-size: 15px;
  transition: transform .15s ease;
}
.result-item[open] .chevron {
  transform: rotate(180deg);
}
.result-detail {
  padding: 0 14px 18px 53px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfd;
}
.detail-meta {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #9098a6;
  font-size: 10px;
}
.detail-meta code {
  color: #687386;
}
.detail-block,
.presentation-block {
  padding: 14px 0;
  border-top: 1px solid #eaedf2;
}
.detail-block h4,
.presentation-block h4 {
  margin: 0 0 9px;
  color: #667185;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.presentation-notice {
  margin-top: 2px;
  padding: 11px 12px;
  border: 1px solid #ecdcae;
  border-radius: 7px;
  background: #fffdf5;
}
.presentation-notice.danger {
  border-color: #f0cdd1;
  background: #fffafb;
}
.presentation-notice h4 {
  color: #9a7118;
}
.presentation-notice.danger h4 {
  color: #a23845;
}
.presentation-notice strong {
  display: block;
  margin: 0 0 4px;
  color: #4f596b;
  font-size: 11px;
  line-height: 1.55;
}
.presentation-notice p {
  margin: 0;
  color: #4f596b;
  font-size: 11px;
  line-height: 1.6;
}
.presentation-notice small {
  display: block;
  margin-top: 4px;
  color: #929aa8;
  font-size: 9px;
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  margin: 0;
}
.fact-card {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e6eaf0;
  border-radius: 7px;
  background: #fff;
}
.fact-card dt {
  margin: 0 0 4px;
  color: #8a94a5;
  font-size: 9px;
  font-weight: 700;
}
.fact-card dd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: #354057;
  font:
    11px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
}
.fact-reason {
  display: block;
  margin-top: 5px;
  color: #8c6b23;
  font-size: 9px;
  line-height: 1.45;
}
.fact-card.danger .fact-reason {
  color: #9c4650;
}
.fact-card.success {
  border-color: #cfe9dc;
  background: #fbfffd;
}
.fact-card.warning {
  border-color: #f0dfb8;
  background: #fffdf7;
}
.fact-card.danger {
  border-color: #f0cdd1;
  background: #fffafb;
}
.copy-value {
  flex: none;
  border: 0;
  border-radius: 4px;
  padding: 2px 6px;
  background: #edf1f6;
  color: #647084;
  cursor: pointer;
  font-size: 9px;
}
.copy-value:hover {
  color: var(--ink);
  background: #e3e8ef;
}
.data-table-wrap {
  max-height: 340px;
  overflow: auto;
  border: 1px solid #e4e8ee;
  border-radius: 7px;
  background: #fff;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.data-table th {
  position: sticky;
  top: 0;
  padding: 7px 9px;
  border-bottom: 1px solid #e4e8ee;
  text-align: left;
  color: #747f91;
  background: #f5f7fa;
  font-weight: 750;
}
.data-table td {
  padding: 7px 9px;
  border-top: 1px solid #edf0f4;
  color: #465168;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.presentation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.presentation-list li {
  padding: 8px 10px;
  border: 1px solid #e4e8ee;
  border-radius: 6px;
  background: #fff;
  color: #465168;
  font:
    10px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.code-block {
  position: relative;
}
.code-block > .copy-value {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
}
.presentation-image {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e4e8ee;
  border-radius: 7px;
  background: #fff;
}
.presentation-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.presentation-image figcaption {
  padding: 8px 10px;
  border-top: 1px solid #edf0f4;
  color: #7b8596;
  font-size: 10px;
}
.assertion-list {
  display: grid;
  gap: 7px;
}
.assertion-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.assertion-row > span {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}
.assertion-row.pass > span {
  color: var(--green);
  background: var(--green-soft);
}
.assertion-row.fail > span {
  color: var(--red);
  background: var(--red-soft);
}
.assertion-main {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}
.assertion-main > strong {
  color: #354057;
  font-size: 11px;
  font-weight: 650;
}
.assertion-main > small {
  color: #929aa8;
  font-size: 10px;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px;
}
.comparison-grid > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e4e8ee;
  border-radius: 6px;
  background: #fff;
}
.comparison-grid small,
.comparison-grid code {
  display: block;
}
.comparison-grid code {
  margin-top: 3px;
  color: #536078;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.comparison-grid details {
  margin-top: 6px;
}
.comparison-grid summary {
  cursor: pointer;
  color: #7d8797;
  font-size: 9px;
}
.raw-output {
  overflow: hidden;
  border: 1px solid #e4e8ee;
  border-radius: 7px;
  background: #fff;
}
.raw-output > summary {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}
.raw-output > summary::-webkit-details-marker {
  display: none;
}
.raw-output > summary span {
  color: #606b7e;
  font-size: 10px;
  font-weight: 750;
}
.raw-output > summary small {
  color: #9aa2af;
  font-size: 9px;
}
pre {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 11px;
  border: 1px solid #e4e8ee;
  border-radius: 7px;
  background: #fff;
  color: #3d485d;
  font:
    10px/1.65 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.raw-output pre {
  border: 0;
  border-radius: 0;
}
.detail-block.danger pre {
  border-color: #f0cdd1;
  color: #96333e;
  background: #fffafb;
}
.empty-state {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 50px 24px;
  border: 1px dashed #d7dde6;
  border-radius: 10px;
  color: #7f8999;
  background: #fff;
}
.empty-state strong {
  color: #4a566b;
  font-size: 14px;
}
.empty-state span {
  font-size: 11px;
}
.loading-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 62px 1fr;
  background: #f5f7fa;
}
.loading-brand {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 max(24px, calc((100vw - 1380px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}
.loading-panel {
  width: min(620px, calc(100% - 40px));
  margin: auto;
  padding-bottom: 10vh;
}
.loading-panel h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -.035em;
}
.loading-panel > p:not(.eyebrow) {
  margin: 14px 0 28px;
  color: var(--muted);
  line-height: 1.7;
}
.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #e1e6ee;
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .2s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: #8a94a5;
  font-size: 11px;
}
.error-panel pre {
  margin: 18px 0;
}
@media (max-width: 980px) {
  .workspace,
  .topbar-inner {
    width: min(100% - 32px, 900px);
  }
  .overview {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .overall-status {
    min-width: 0;
    width: 100%;
  }
  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
  .category-nav {
    grid-column: 1 / -1;
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .category-nav > p {
    display: none;
  }
  .category-link {
    flex: 0 0 auto;
    margin: 0;
    border: 1px solid var(--line);
    background: #fff;
  }
}
@media (max-width: 680px) {
  .topbar {
    height: auto;
  }
  .topbar-inner {
    min-height: 58px;
    padding: 8px 0;
  }
  #copy-run {
    display: none;
  }
  .topbar-actions {
    gap: 3px;
  }
  .icon-button,
  .primary-button {
    padding: 7px 9px;
    font-size: 11px;
  }
  .workspace {
    padding-top: 28px;
  }
  .metric {
    min-height: 90px;
    padding: 16px;
  }
  .metric strong {
    font-size: 22px;
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .expect-panel,
  .run-meta {
    display: none;
  }
  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .search-box {
    width: 100%;
  }
  .result-item > summary {
    grid-template-columns: 25px minmax(0, 1fr) auto 14px;
    gap: 10px;
    padding-inline: 10px;
  }
  .source-tags {
    display: none;
  }
  .result-status {
    font-size: 9px;
  }
  .result-detail {
    padding-left: 45px;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}
