/* Results section (res-*) */
.res-root { display: grid; gap: 20px; --zs: #565b66; --ft: #a3a7b0; }
.res-root > * { min-width: 0; }
.res-h { font-size: clamp(24px, 2.6vw, 30px); margin-top: 6px; }
.res-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.res-delta { font-family: var(--mono); font-size: 12px; color: var(--c, var(--text)); white-space: nowrap; }
.res-dim { color: var(--dim); }

/* KPIs */
.res-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.res-kpi { padding: 24px 24px 22px; border-right: 1px solid var(--line); display: grid; gap: 10px; align-content: start; min-width: 0; }
.res-kpi:last-child { border-right: 0; }
.res-kpi-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.res-kpi-v { font-family: var(--serif); font-size: clamp(46px, 5.2vw, 68px); line-height: 0.95; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--c, var(--text)); }
.res-kpi .res-delta { padding: 4px 8px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c, #fff) 40%, transparent); background: color-mix(in srgb, var(--c, #fff) 10%, transparent); }
.res-kpi p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 980px) { .res-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .res-kpi:nth-child(2) { border-right: 0; } .res-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .res-kpis { grid-template-columns: minmax(0, 1fr); } .res-kpi { border-right: 0; border-bottom: 1px solid var(--line); } .res-kpi:last-child { border-bottom: 0; } }

/* main: strip + radar */
.res-main { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.res-main-r { display: grid; gap: 10px; justify-items: center; text-align: center; padding-left: clamp(0px, 3vw, 44px); border-left: 1px solid var(--line); }
.res-main-r .tag { justify-self: start; }
@media (max-width: 980px) { .res-main { grid-template-columns: minmax(0, 1fr); } .res-main-r { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; } }

.res-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.res-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.res-legend .res-dot, .res-legend .res-dp-dot { position: static; transform: none; margin: 0; --c: var(--text); }
.res-legend .res-dot-other { opacity: 1; }
.res-legend[data-set="key"] .res-legend-other { display: none; }
.res-gain-key { width: 22px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--text) 25%, transparent), color-mix(in srgb, var(--text) 70%, transparent)); }

.res-strip { display: grid; }
.res-row:not([data-lens]) { --c: var(--text); }
.res-row { display: grid; grid-template-columns: 124px minmax(0, 1fr) 96px; gap: 16px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.res-row:first-child { border-top: 0; }
.res-row-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--c); min-width: 0; }
.res-row-name svg { width: 17px; height: 17px; flex: none; }
.res-allmark { width: 15px; height: 15px; border-radius: 50%; flex: none; background: conic-gradient(var(--lit), var(--fig), var(--emo), var(--abs), var(--bkg), var(--lit)); opacity: 0.9; }
.res-track { position: relative; height: 30px; }
.res-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.res-grid { position: absolute; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.res-gain { position: absolute; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 75%, transparent)); transition: left 0.8s var(--ease), width 0.8s var(--ease); }
.res-dot { position: absolute; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); transition: left 0.8s var(--ease), opacity 0.35s, width 0.3s, height 0.3s; box-sizing: border-box; }
.res-dot-other { width: 8px; height: 8px; background: var(--zs); opacity: 0; pointer-events: none; z-index: 1; }
.res-strip[data-set="all"] .res-dot-other { opacity: 1; pointer-events: auto; }
.res-dot-zs { width: 12px; height: 12px; background: #7d828d; border: 2px solid var(--panel); z-index: 2; }
.res-dot-ft { width: 14px; height: 14px; background: var(--panel); border: 2.5px solid var(--c); z-index: 3; }
.res-dot-ours { width: 18px; height: 18px; background: var(--c); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--c), 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); z-index: 4; }
.res-dot:hover { z-index: 6; }
.res-row-val { display: grid; justify-items: end; line-height: 1.2; }
.res-row-val b { font-size: 17px; font-weight: 500; color: var(--c); }
.res-axis { border-top: 0; padding: 0 0 6px; }
.res-axis .res-track { height: 16px; }
.res-axis .res-track::before { display: none; }
.res-axis .res-track span, .res-dp-axis .res-dp-track span { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
@media (max-width: 600px) {
  .res-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0 6px; }
  .res-row .res-track { grid-column: 1 / -1; grid-row: 2; margin: 0 9px; }
  .res-row-val { grid-row: 1; grid-column: 2; display: flex; gap: 8px; align-items: baseline; }
  .res-axis > div:first-child, .res-axis > div:last-child { display: none; }
  .res-axis .res-track { grid-row: 1; }
}

/* radar */
.res-radar { width: 100%; max-width: 400px; height: auto; overflow: visible; }
.res-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.res-ring:nth-of-type(4) { stroke: var(--line-2); }
.res-ring-t { font-family: var(--mono); font-size: 9px; fill: var(--dim); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.res-spoke { stroke: var(--line); stroke-width: 1; }
.res-poly { stroke-linejoin: round; }
.res-poly-zs { fill: rgba(125, 130, 141, 0.16); stroke: #7d828d; stroke-width: 1.5; stroke-dasharray: 4 4; }
.res-poly-ft { fill: rgba(163, 167, 176, 0.1); stroke: var(--ft); stroke-width: 1.5; }
.res-poly-lenses { fill: rgba(238, 237, 232, 0.1); stroke: var(--text); stroke-width: 2.2; }
.res-vert { stroke: var(--panel); stroke-width: 2; pointer-events: none; }
.res-hit { fill: transparent; cursor: default; outline: none; }
.res-hit:focus-visible { stroke: var(--text); stroke-width: 1.5; }
.res-ax { font-family: var(--sans); font-size: 13px; font-weight: 500; }
.res-ax-v { font-family: var(--mono); font-size: 11px; font-weight: 400; fill: var(--muted); }
.res-legend-radar { justify-content: center; margin: 0; }
.res-line { width: 22px; height: 0; border-top: 2px solid var(--text); }
.res-line-ft { border-top-color: var(--ft); border-top-width: 1.5px; }
.res-line-zs { border-top: 1.5px dashed #7d828d; }
.res-main-r .note { max-width: 40ch; }

/* full table */
.res-details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.res-details summary { cursor: pointer; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14.5px; font-weight: 500; list-style: none; width: fit-content; max-width: 100%; }
.res-details summary::-webkit-details-marker { display: none; }
.res-details summary::before { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.25s var(--ease); margin: 0 2px 0 3px; }
.res-details[open] summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.res-details:not([open]) .res-sum-open, .res-details[open] .res-sum-closed { display: none; }
.res-table-wrap { margin: 16px 0 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.res-table { border-collapse: separate; border-spacing: 0; font-size: 12.5px; white-space: nowrap; width: 100%; }
.res-table th, .res-table td { padding: 7px 9px; text-align: right; }
.res-table thead th { font-weight: 500; color: var(--muted); font-size: 11.5px; text-align: center; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.res-table thead tr:last-child th { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.res-table .res-th-lens { color: var(--c, var(--text)); font-size: 13px; border-left: 1px solid var(--line); }
.res-table .res-th-dir { font-family: var(--sans); font-size: 11px; border-bottom-color: transparent; }
.res-table tbody th { position: sticky; left: 0; z-index: 2; background: var(--panel); text-align: left; font-weight: 500; color: var(--muted); border-right: 1px solid var(--line); }
.res-table .res-th-model { position: sticky; left: 0; z-index: 3; text-align: left; vertical-align: bottom; border-right: 1px solid var(--line); }
.res-table td { --c: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); background: color-mix(in srgb, var(--c) var(--h, 0%), transparent); border-bottom: 1px solid rgba(10, 11, 14, 0.5); }
.res-table td[data-lens] { --c: inherit; }
.res-table td[data-lens="Literal"] { --c: var(--lit); } .res-table td[data-lens="Figurative"] { --c: var(--fig); } .res-table td[data-lens="Abstract"] { --c: var(--abs); } .res-table td[data-lens="Background"] { --c: var(--bkg); } .res-table td[data-lens="Emotional"] { --c: var(--emo); }
.res-table .res-td-first { border-left: 1px solid var(--line); }
.res-table .res-td-best { color: var(--text); font-weight: 600; }
.res-table .res-tr-group th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); background: var(--bg-2); border-right: 0; }
.res-table .res-tr-group td { background: var(--bg-2); border: 0; padding: 0; }
.res-table .res-tr-ours th { color: var(--text); }

/* split layouts */
.res-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(22px, 4vw, 52px); align-items: start; }
.res-split-art { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }
.res-split-text { display: grid; gap: 14px; align-content: start; }
.res-split-text .res-legend { margin: 6px 0 0; }
@media (max-width: 900px) { .res-split, .res-split-art { grid-template-columns: minmax(0, 1fr); } }

/* horizontal bars */
.res-hbar { --bar: var(--zs); display: grid; grid-template-columns: 150px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); height: 26px; }
.res-hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.res-hbar-name em { font-style: normal; color: var(--dim); font-size: 11.5px; }
.res-hbar-track { height: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.04); overflow: hidden; display: block; }
.res-hbar-track i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--bar); transition: width 0.9s var(--ease); }
.res-hbar b { text-align: right; font-weight: 400; font-size: 12.5px; }
.res-hbar-ft { --bar: var(--ft); }
.res-hbar-ours { --bar: var(--text); color: var(--text); }
.res-hbar-ours b { font-weight: 600; }
.res-sw { width: 12px; height: 12px; border-radius: 3px; background: var(--zs); }
.res-sw-ft { background: var(--ft); } .res-sw-ours { background: var(--text); }

.res-t4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 32px; }
.res-t4-block { display: grid; gap: 4px; align-content: start; }
.res-t4-block h4 { font-size: 13.5px; font-weight: 500; }
.res-t4-block p { font-size: 13px; color: var(--muted); line-height: 1.45; margin-bottom: 8px; min-height: 2.9em; }
.res-t4 .res-hbar { grid-template-columns: 112px minmax(0, 1fr) 38px; }
.res-t4 .res-hbar-name { display: block; line-height: 1.1; }
.res-t4 .res-hbar-name em { display: block; font-size: 10.5px; }
.res-t4 .res-hbar { height: 30px; }
@media (max-width: 560px) { .res-t4 { grid-template-columns: minmax(0, 1fr); } .res-t4-block p { min-height: 0; } }

.res-art { position: relative; }
.res-art-row { position: absolute; left: 0; right: 0; top: 0; height: 32px; grid-template-columns: 178px minmax(0, 1fr) 46px; transition: transform 0.7s var(--ease); }
.res-art-row .dot { width: 8px; height: 8px; }
@media (max-width: 560px) { .res-art-row { grid-template-columns: 132px minmax(0, 1fr) 42px; font-size: 11.5px; gap: 8px; } .res-art-row .res-hbar-name em { display: none; } }

/* ablations */
.res-sub { margin-top: clamp(20px, 3vw, 36px); }
.res-ab { display: flex; flex-direction: column; gap: 14px; }
.res-ab-h { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.12; }
.res-ab-top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.res-ab .note { margin-top: auto; padding-top: 4px; }
.res-ab .res-legend { margin: 0; }
.res-steps { display: grid; gap: 8px; }
.res-step { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.res-step.is-full { border-color: var(--line-2); background: rgba(255, 255, 255, 0.06); }
.res-step-l { display: flex; flex-wrap: wrap; gap: 5px; }
.res-loss { padding: 3px 7px; border-radius: 7px; border: 1px dashed var(--line); opacity: 0.28; font-size: 12.5px; }
.res-loss.is-on { opacity: 1; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); }
.res-step-v { display: grid; justify-items: end; line-height: 1.15; flex: none; }
.res-step-v b { font-size: 19px; font-weight: 500; }
.res-step-v .res-delta { color: var(--muted); font-size: 11px; }
.res-step.is-full .res-delta, .res-step:nth-child(2) .res-delta { color: var(--bkg); }
.res-mini { display: grid; gap: 1px; }
.res-mini-l { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.res-hbar-sm { grid-template-columns: 44px minmax(0, 1fr) 44px; height: 22px; }
.res-hbar-sm .res-hbar-name { color: var(--muted); font-size: 11.5px; }
.res-hbar-sm .res-hbar-track { height: 9px; }
.res-hbar-sm b { font-weight: 400; }
.res-dp { display: grid; gap: 2px; }
.res-dp-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 46px; gap: 12px; align-items: center; font-size: 12.5px; color: var(--muted); height: 34px; }
.res-dp-row.is-full { color: var(--text); }
.res-dp-track { position: relative; height: 100%; margin: 0 6px; }
.res-dp-track::before { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 1px; background: var(--line); }
.res-dp-dot { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%); box-sizing: border-box; display: inline-block; }
.res-dp-i2t { background: var(--text); }
.res-dp-t2i { background: var(--panel); border: 2px solid var(--ft); }
.res-dp-row:not(.is-full) .res-dp-i2t { background: var(--ft); }
.res-dp-row:not(.is-full) .res-dp-t2i { border-color: var(--zs); }
.res-dp-v { font-size: 11.5px; line-height: 1.2; text-align: right; }
.res-dp-v em { display: block; font-style: normal; color: var(--dim); }
.res-dp-axis { height: 16px; }
.res-dp-axis .res-dp-track::before { display: none; }
@media (max-width: 900px) { .res-abs { gap: 16px; } }
