[data-view-panel][hidden] {
  display: none !important;
}

body[data-view="result"] {
  background: #f5f5f8;
}

body[data-view="result"] .ambient-particles {
  background:
    radial-gradient(circle at 86% 6%, rgba(103, 83, 217, .11), transparent 30rem),
    radial-gradient(circle at 9% 68%, rgba(36, 134, 118, .06), transparent 28rem),
    #f5f5f8;
}

.agent-result-view {
  position: relative;
  z-index: 3;
  min-height: calc(100svh - var(--header-height));
  padding: 34px 0 82px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(247,247,250,.94) 500px, rgba(247,247,250,.98));
}

.agent-result-view::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(82, 70, 146, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 70, 146, .025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 520px);
}

.result-shell {
  position: relative;
  z-index: 2;
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
}

.result-view-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 42px;
  margin-bottom: 13px;
}

.result-view-tools > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #4d4f56;
  border: 1px solid rgba(206, 207, 214, .92);
  border-radius: 9px;
  background: rgba(255,255,255,.78);
  cursor: pointer;
  font-size: 11px;
  font-weight: 680;
  backdrop-filter: blur(12px);
}

.result-view-tools > button:hover {
  color: var(--violet);
  border-color: rgba(103,83,217,.35);
}

.result-view-tools > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-align: right;
}

.result-view-tools strong { font-size: 11px; }
.result-view-tools div span { color: #8a8d94; font-size: 9px; }

.result-query-card {
  overflow: hidden;
  border: 1px solid rgba(207, 208, 216, .96);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 22px 60px rgba(40,35,69,.08);
  backdrop-filter: blur(18px);
}

.result-query-heading {
  padding: 28px 30px 21px;
}

.result-query-heading > span,
.dense-section-heading small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: .14em;
}

.result-query-heading h1 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 3.1vw, 38px);
  line-height: 1.2;
  letter-spacing: -.045em;
}

.result-query-heading p {
  margin: 0;
  color: #686b72;
  font-size: 12px;
  line-height: 1.7;
}

.result-query-form {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 30px 22px;
}

.result-query-form > label {
  color: #777a81;
  font-size: 10px;
  font-weight: 700;
}

.result-query-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 44px;
  padding: 4px;
  border: 1px solid #d8d9df;
  border-radius: 10px;
  background: #fafafd;
}

.result-query-form input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.result-query-form button {
  height: 34px;
  padding: 0 14px;
  color: #fff;
  border-radius: 7px;
  background: var(--violet);
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}

.result-query-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-query-facts > div {
  min-width: 0;
  padding: 14px 17px 15px;
  border-left: 1px solid var(--line);
}

.result-query-facts > div:first-child { border-left: 0; }
.result-query-facts dt { color: #999ba1; font-size: 8px; font-weight: 740; letter-spacing: .06em; }
.result-query-facts dd { margin: 5px 0 0; font-size: 11px; font-weight: 650; line-height: 1.55; }

.result-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-process li {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  min-height: 60px;
  padding: 13px 16px;
  border-left: 1px solid var(--line);
}

.result-process li:first-child { border-left: 0; }
.result-process i {
  grid-row: 1 / 3;
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: #31a57f;
  box-shadow: 0 0 0 4px rgba(49,165,127,.1);
}
.result-process span { font-size: 10px; font-weight: 720; }
.result-process small { margin-top: 2px; color: #92949a; font-size: 8px; }

.dense-result-section {
  padding: 31px 0 28px;
  border-bottom: 1px solid rgba(205,206,213,.9);
}

.dense-section-heading {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.dense-section-heading > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--violet);
  border: 1px solid rgba(103,83,217,.22);
  border-radius: 8px;
  background: rgba(245,242,255,.9);
  font-size: 9px;
  font-weight: 800;
}

.dense-section-heading h2 {
  margin: 3px 0 1px;
  font-size: 20px;
  letter-spacing: -.025em;
}

.dense-section-heading p {
  margin: 0;
  color: #777a81;
  font-size: 10px;
  line-height: 1.6;
}

.result-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe0e5;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
}

.result-data-table,
.result-quality-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.result-data-table { min-width: 830px; }
.result-quality-table { min-width: 700px; }
.result-data-table th:first-child { width: 25%; }
.result-data-table th:nth-child(2) { width: 12%; }
.result-data-table th:nth-child(3) { width: 13%; }
.result-data-table th:nth-child(4) { width: 18%; }
.result-data-table th:nth-child(5) { width: 32%; }
.result-quality-table th:first-child { width: 24%; }
.result-quality-table th:nth-child(2) { width: 18%; }
.result-quality-table th:nth-child(3) { width: 12%; }

.result-data-table th,
.result-quality-table th {
  padding: 10px 13px;
  color: #777a81;
  border-bottom: 1px solid #dfe0e5;
  background: #f6f6f9;
  text-align: left;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .035em;
}

.result-data-table td,
.result-quality-table td {
  padding: 11px 13px;
  color: #55585f;
  border-top: 1px solid #ececf0;
  vertical-align: top;
  font-size: 9px;
  line-height: 1.55;
}

.result-data-table tbody tr:first-child td,
.result-quality-table tbody tr:first-child td { border-top: 0; }
.result-data-table td:first-child,
.result-quality-table td:first-child { color: #282a2f; font-weight: 680; }
.result-data-table td:nth-child(3),
.result-quality-table td:nth-child(3) { color: var(--violet); font-weight: 760; }

.result-method-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.result-method-rules > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  min-height: 68px;
  padding: 12px 13px;
  border: 1px solid rgba(217,217,224,.95);
  border-radius: 10px;
  background: rgba(255,255,255,.68);
}

.result-method-rules dt {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  border-radius: 6px;
  background: #34323d;
  font-size: 8px;
  font-weight: 760;
}

.result-method-rules dd { margin: 0; color: #5f6269; font-size: 9px; line-height: 1.6; }
.result-method-rules dd strong { display: block; margin-bottom: 2px; color: #2e3035; font-size: 9px; }

.result-overall-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  overflow: hidden;
  border: 1px solid rgba(198,195,215,.95);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 35px rgba(52,45,89,.06);
}

.result-overall-card > p {
  margin: 0;
  padding: 22px 24px;
  color: #303137;
  border-right: 1px solid #e0dee8;
  font-size: 13px;
  font-weight: 590;
  line-height: 1.9;
}

.result-overall-card ol { margin: 0; padding: 0; list-style: none; }
.result-overall-card li {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  min-height: 52px;
  padding: 9px 15px;
  border-top: 1px solid #e8e7ed;
}
.result-overall-card li:first-child { border-top: 0; }
.result-overall-card li strong { color: var(--violet); font-size: 13px; }
.result-overall-card li span { color: #55585f; font-size: 9px; line-height: 1.5; }

.result-findings {
  overflow: hidden;
  border: 1px solid #dedfe5;
  border-radius: 14px;
  background: rgba(255,255,255,.86);
}

.result-finding {
  padding: 19px 22px 20px;
  border-top: 1px solid #e4e4e9;
}
.result-finding:first-child { border-top: 0; }
.result-finding header {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
}
.result-finding header > span { color: #9b9da3; font-size: 9px; font-weight: 780; }
.result-finding h3 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
.result-finding header > strong {
  padding: 5px 8px;
  color: var(--violet);
  border-radius: 7px;
  background: #f1edff;
  font-size: 11px;
}
.result-finding > p { margin: 9px 0 0 38px; color: #50535a; font-size: 11px; font-weight: 600; line-height: 1.7; }
.result-finding dl { margin: 12px 0 0 38px; }
.result-finding dl > div {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px dashed #e5e5e9;
}
.result-finding dt { color: #92949a; font-size: 8px; font-weight: 720; }
.result-finding dd { margin: 0; color: #62656c; font-size: 9px; line-height: 1.62; }
.result-finding dl > div:last-child dd { color: #554b89; }

.result-limitations {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 14px;
  margin-top: 10px;
  padding: 14px 16px;
  border-left: 3px solid #69636f;
  border-radius: 0 10px 10px 0;
  background: rgba(238,238,242,.86);
}
.result-limitations > strong { font-size: 10px; }
.result-limitations ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.result-limitations li {
  position: relative;
  padding-left: 11px;
  color: #5f6269;
  font-size: 9px;
  line-height: 1.6;
}
.result-limitations li::before { content: ""; position: absolute; top: .62em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: #8c8792; }

.result-end-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 22px;
}
.result-end-actions button {
  height: 38px;
  padding: 0 14px;
  color: #565960;
  border: 1px solid #d7d8de;
  border-radius: 9px;
  background: rgba(255,255,255,.84);
  cursor: pointer;
  font-size: 10px;
  font-weight: 680;
}
.result-end-actions button:last-child { color: #fff; border-color: var(--violet); background: var(--violet); }

@media (max-width: 820px) {
  .result-shell { width: min(100% - 30px, 1060px); }
  .result-query-heading { padding-inline: 22px; }
  .result-query-form { grid-template-columns: 1fr; margin-inline: 22px; }
  .result-query-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-query-facts > div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .result-query-facts > div:nth-child(4) { border-top: 1px solid var(--line); }
  .result-process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-process li:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .result-process li:nth-child(4) { border-top: 1px solid var(--line); }
  .result-method-rules { grid-template-columns: 1fr; }
  .result-overall-card { grid-template-columns: 1fr; }
  .result-overall-card > p { border-right: 0; border-bottom: 1px solid #e0dee8; }
  .result-limitations { grid-template-columns: 1fr; }
  .result-limitations ul { grid-template-columns: 1fr; gap: 7px; }
}

@media (max-width: 540px) {
  .agent-result-view { padding-top: 20px; }
  .result-view-tools > div span { display: none; }
  .result-query-heading h1 { font-size: 26px; }
  .result-query-form > div { grid-template-columns: 1fr; padding: 5px; }
  .result-query-form button { width: 100%; }
  .result-query-facts { grid-template-columns: 1fr; }
  .result-query-facts > div { border-top: 1px solid var(--line); border-left: 0; }
  .result-query-facts > div:first-child { border-top: 0; }
  .dense-section-heading { grid-template-columns: 28px 1fr; }
  .result-finding { padding-inline: 15px; }
  .result-finding header { grid-template-columns: 24px 1fr; }
  .result-finding header > strong { grid-column: 2; justify-self: start; }
  .result-finding > p,
  .result-finding dl { margin-left: 34px; }
  .result-end-actions { flex-direction: column-reverse; }
  .result-end-actions button { width: 100%; }
}
