.rag {
  --sheet: var(--theme-color-white); --paper: var(--theme-color-lighter2); --scan: #f7f5ef;
  --ink: var(--headings-color); --ink-2: var(--text-color); --rule: var(--line);
  --marker: var(--theme-color1); --arrow: var(--theme-color3);
  --f-head: var(--heading-font-family); --f-body: var(--body-font-family);
  font-family: var(--body-font-family); color: var(--headings-color);
}
:root:not([data-primary]) .rag { --marker: var(--review-color); }
:root[data-primary="brown"] .rag { --marker: #E9C25B; }
.rag { margin: 0; --cg: 32px; --rg: 32px; --head-r: conic-gradient(from 238deg at 100% 50%, var(--arrow) 0 64deg, transparent 0); --head-l: conic-gradient(from 58deg at 0% 50%, var(--arrow) 0 64deg, transparent 0); --head-d: conic-gradient(from 328deg at 50% 100%, var(--arrow) 0 64deg, transparent 0); --head-u: conic-gradient(from 148deg at 50% 0%, var(--arrow) 0 64deg, transparent 0); --arrow-line: linear-gradient(var(--arrow), var(--arrow)); }
.rag figcaption { margin-top: 28px; }
.rag .node { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px 16px; }
.rag .node h4 { font: 600 1rem/1.3 var(--f-body); margin: 0 0 6px; }
.rag .node p { font-size: .875rem; line-height: 1.45; color: var(--ink-2); }
.rag .node p + p, .rag .node p + div, .rag .node ul + p, .rag .node div + p { margin-top: 10px; }
.rag .small-note { padding-top: 8px; border-top: 1px dashed var(--rule); font-size: .8125rem !important; }
.rag .lane { font: 400 1.375rem/1.2 var(--f-head); word-spacing: -0.06em; }
.rag .grp-label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); margin-bottom: -16px; }
.rag .fund--s { font-size: .8125rem; padding: .2em .55em .2em .45em; border-left-width: 3px; }
.rag .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rag .src li { display: flex; gap: 8px; align-items: flex-start; font-size: .875rem; line-height: 1.35; padding: 5px 0; }
.rag .src svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.rag .check li { display: flex; gap: 8px; align-items: center; font-size: .875rem; line-height: 1.3; padding: 3px 0; }
.rag .check li::before { content: ""; flex: none; width: 15px; height: 15px; border-radius: 3px; border: 1.5px solid var(--ink); }
.rag .check .yes::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }
.rag .check .no { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(74,86,100,.6); }
.rag .check .no::before { border-color: #a3abb4; }
.rag .ocr-mini { display: flex; align-items: center; gap: 8px; }
.rag .ocr-scan { width: 38px; height: 46px; flex: none; transform: rotate(-3deg); background: var(--scan); box-shadow: 0 0 0 1px rgba(var(--theme-color2-rgb), .12); padding: 7px 6px; display: grid; gap: 4px; align-content: start; }
.rag .ocr-scan i { display: block; height: 3px; background: rgba(42,42,40,.3); border-radius: 1px; }
.rag .ocr-scan i:nth-child(2) { width: 70%; }
.rag .ocr-scan i:nth-child(4) { width: 55%; }
.rag .ocr-arrow { width: 22px; height: 10px; flex: none; background: var(--head-r) right center / 7px 9px no-repeat, var(--arrow-line) left center / calc(100% - 6px) 1.5px no-repeat; }
.rag .ocr-text { font-size: .8125rem; line-height: 1.35; color: var(--ink); }
.rag .bubble { color: var(--ink) !important; background: var(--paper); border: 1px solid var(--ink); border-radius: 10px 10px 10px 2px; padding: 8px 10px; }
.rag .answer-mini { color: var(--ink) !important; }
.rag .legend { display: grid; gap: 8px; justify-items: start; }
.rag .legend p { font-size: .875rem; line-height: 1.45; color: var(--ink-2); max-width: 22em; }
.rag .map { position: relative; height: 220px; margin: 12px 0 10px; border-radius: 6px; overflow: hidden; background: radial-gradient(circle, rgba(var(--theme-color2-rgb), .09) 1px, transparent 1.3px) 0 0 / 14px 14px, var(--sheet); border: 1px solid var(--rule); }
.rag .map .d { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #b3bac2; }
.rag .map .d.c { background: var(--arrow); }
.rag .map .d.hit { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--marker); box-shadow: 0 0 0 1.5px var(--ink); z-index: 2; }
.rag .map .lbl { position: absolute; z-index: 3; white-space: nowrap; font-size: .75rem; line-height: 1.2; color: var(--ink); transform: translate(9px, -50%); text-shadow: 0 0 3px var(--sheet), 0 0 3px var(--sheet), 0 0 3px var(--sheet); }
.rag .map .lbl.l { transform: translate(calc(-100% - 9px), -50%); }
.rag .map .ring { position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; border: 1.5px dashed var(--ink); background: color-mix(in srgb, var(--marker) 20%, transparent); z-index: 1; }
.rag .map .qd { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--ink); transform: rotate(45deg); z-index: 2; }
.rag .map .lbl.lbl-q { font-weight: 600; transform: translate(-50%, 58px); }
.rag .map-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8125rem; color: var(--ink-2); }
.rag .map-key span { display: inline-flex; align-items: center; gap: 6px; }
.rag .map-key i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.rag .map-key .k-q { border: 1.5px dashed var(--ink); }
.rag .map-key .k-hit { width: 9px; height: 9px; background: var(--marker); box-shadow: 0 0 0 1.5px var(--ink); }
.rag .ar-r, .rag .ar-d, .rag .ar-u { content: ""; position: absolute; pointer-events: none; }
@media (max-width: 1199.98px) {
.rag .rag-grid { display: flex; flex-direction: column; gap: 32px; max-width: 600px; }
.rag .zone, .rag .ret, .rag .pass { display: none; }
.rag .lane { margin-top: 24px; margin-bottom: -8px; }
.rag .lane--1 { margin-top: 0; }
.rag .grp { position: relative; display: flex; flex-direction: column; gap: 32px; }
.rag .grp--dc { padding: 16px 14px 14px; border: 1px dashed rgba(var(--theme-color3-rgb), 0.45); border-radius: 10px; background: var(--paper); }
.rag .grp--dc .grp-label { margin-bottom: -18px; }
.rag .grp.arr::before, .rag .grp > .node + .node::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 1px); width: 10px; height: 31px; margin-left: -5px; background: var(--head-d) center bottom / 10px 8px no-repeat, var(--arrow-line) center top / 1.5px calc(100% - 7px) no-repeat; }
.rag .grp > .node + .node::before { bottom: calc(100% + 2px); }
.rag .map { height: 260px; }
.rag .legend { margin-top: 4px; }
}
@media (max-width: 560px) {
.rag .map { height: 240px; }
.rag .map .minor { display: none; }
.rag .map .ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.rag .map .lbl.lbl-q { transform: translate(-50%, 48px); }
}
@media (min-width: 1200px) {
.rag .rag-grid { position: relative; display: grid; grid-template-columns: 1.2fr .95fr 1fr 1fr 1fr; grid-template-rows: 30px auto auto auto auto auto; column-gap: var(--cg); row-gap: var(--rg); }
.rag .grp { display: contents; }
.rag .grp-label { display: none; }
.rag .zone { grid-row: 1 / 6; margin: -16px -14px -16px; border-radius: 12px; padding: 12px 14px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.rag .zone--you { grid-column: 1; }
.rag .zone--gate { grid-column: 2; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(var(--theme-color2-rgb), .05) 7px 8px); border: 1px solid var(--rule); }
.rag .zone--dc { grid-column: 3 / 6; background: var(--paper); border: 1px dashed rgba(var(--theme-color3-rgb), 0.45); }
.rag .lane--1 { grid-row: 2; grid-column: 1; align-self: end; }
.rag .n-sources { grid-row: 3; grid-column: 1; }
.rag .n-gate { grid-row: 3; grid-column: 2; }
.rag .n-ocr { grid-row: 3; grid-column: 3; }
.rag .n-chunks { grid-row: 3; grid-column: 4; }
.rag .n-embed { grid-row: 3; grid-column: 5; }
.rag .legend { grid-row: 4; grid-column: 1; align-self: start; padding-top: 8px; }
.rag .n-index { grid-row: 4; grid-column: 3 / 6; }
.rag .lane--2 { grid-row: 4; grid-column: 1; align-self: end; }
.rag .n-ask { grid-row: 5; grid-column: 1; }
.rag .pass { grid-row: 5; grid-column: 2; align-self: start; margin-top: 20px; }
.rag .n-search { grid-row: 5; grid-column: 3; }
.rag .n-hits { grid-row: 5; grid-column: 4; }
.rag .n-llm { grid-row: 5; grid-column: 5; }
.rag .n-answer { grid-row: 6; grid-column: 1; }
.rag .ret { grid-row: 6; grid-column: 2 / 6; position: relative; }
.rag .n-sources::after, .rag .n-gate::after, .rag .n-ocr::after, .rag .n-chunks::after, .rag .n-ask::after, .rag .n-hits::after { content: ""; position: absolute; top: 25px; left: calc(100% + 1px); width: calc(var(--cg) - 2px); height: 10px; margin-top: -5px; background: var(--head-r) right center / 8px 10px no-repeat, var(--arrow-line) left center / calc(100% - 7px) 1.5px no-repeat; }
.rag .n-ask::after { background: var(--arrow-line) left center / 100% 1.5px no-repeat; width: calc(var(--cg) + 2px); }
.rag .pass { height: 10px; margin-right: calc(-1 * var(--cg) + 2px); background: var(--head-r) right center / 8px 10px no-repeat, var(--arrow-line) left center / calc(100% - 7px) 1.5px no-repeat; }
.rag .n-embed::after { content: ""; position: absolute; left: 50%; top: calc(100% + 1px); width: 10px; height: calc(var(--rg) - 2px); margin-left: -5px; background: var(--head-d) center bottom / 10px 8px no-repeat, var(--arrow-line) center top / 1.5px calc(100% - 7px) no-repeat; }
.rag .n-search::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 1px); width: 10px; height: calc(var(--rg) - 2px); margin-left: -5px; background: var(--head-u) center top / 10px 8px no-repeat, var(--arrow-line) center bottom / 1.5px calc(100% - 7px) no-repeat; }
.rag .n-hits::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 1px); width: 10px; height: calc(var(--rg) - 2px); margin-left: -5px; background: var(--head-d) center bottom / 10px 8px no-repeat, var(--arrow-line) center top / 1.5px calc(100% - 7px) no-repeat; }
.rag .ret::before { content: ""; position: absolute; top: 40px; height: 10px; margin-top: -5px; left: calc(-1 * var(--cg) + 2px); right: calc((100% - 3 * var(--cg)) / 7.9); background: var(--head-l) left center / 8px 10px no-repeat, var(--arrow-line) right center / calc(100% - 7px) 1.5px no-repeat; }
.rag .ret::after { content: ""; position: absolute; top: calc(-1 * var(--rg) - 1px); height: calc(var(--rg) + 41px); width: 1.5px; right: calc((100% - 3 * var(--cg)) / 7.9 - .75px); background: var(--arrow); }
}
.rag .grp--rights { display: none; }
.rag-wrap { max-width: 1400px; margin: 0 auto; padding: 0 clamp(15px, 2.4vw, 34px); position: relative; z-index: 1; }
.rag ul { list-style: none; padding: 0; margin: 0; }
.rag p { margin: 0; font-family: var(--body-font-family); }
.rag .node { border-radius: 14px; padding: 18px 18px 20px; }
.rag .node h4 { font: 600 16px/1.3 var(--heading-font-family); color: var(--headings-color); }
.rag .node p { font-size: 14px; line-height: 1.5; }
.rag .lane { font: 600 22px/1.2 var(--heading-font-family); letter-spacing: -0.03em; color: var(--headings-color); word-spacing: 0; margin-bottom: 0; }
.rag .fund { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.35; font-weight: 500; padding: 4px 10px 4px 9px; background: var(--sheet); color: var(--headings-color); border: 1px solid var(--rule); border-left: 3px solid var(--marker); border-radius: 8px; }
.rag .bubble { border-color: var(--arrow); border-radius: 14px 14px 14px 3px; padding: 10px 14px; background: var(--sheet); }
.rag .map { border-radius: 10px; }
.rag .map .lbl { text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.rag .map .d { background: rgba(var(--theme-color2-rgb), 0.28); }
.rag .map .d.c { background: var(--arrow); opacity: 0.6; }
.rag .map .d.hit { background: var(--marker); opacity: 1; }
.rag .map .ring { border-color: var(--arrow); }
.rag .map .qd { background: var(--arrow); }
.rag .map-key .k-q { border-color: var(--arrow); }
.rag .check li::before { border-color: var(--arrow); }
.rag .check .yes::before { background-color: var(--arrow); }
.rag .check .no { text-decoration-color: currentColor; }
.rag .check .no::before { border-color: rgba(var(--theme-color2-rgb), 0.3); }
.rag .src svg { color: var(--arrow); }
.rag .ocr-scan i { background: rgba(var(--theme-color2-rgb), 0.3); }
.rag figcaption { font-size: 14px; line-height: 1.6; color: var(--text-color); }
@media (min-width: 1200px) {
  .rag .zone { border-radius: 14px; }
  .rag .zone--gate { background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(var(--theme-color3-rgb), 0.07) 7px 8px), rgba(var(--theme-color-white-rgb), 0.5); }
  .rag .zone--you { background: rgba(var(--theme-color-white-rgb), 0.5); border: 1px solid var(--rule); }
}
@media (max-width: 1199.98px) {
  .rag .rag-grid { margin: 0 auto; }
  .rag .grp--dc { border-radius: 14px; }
}
