.winning-element-view { --element-accent: #e96a4d; --element-ink: #24372f; --element-muted: #6e7973; }
.winning-element-shell { display: grid; gap: 14px; min-width: 0; }
.element-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.element-hero h2 { margin: 4px 0 6px; font-size: clamp(25px, 2.2vw, 38px); color: var(--element-ink); }
.element-hero p { max-width: 820px; margin: 0; color: var(--element-muted); }
.element-stats { display: grid; grid-template-columns: repeat(3, minmax(116px, 1fr)); gap: 8px; min-width: 380px; }
.element-stat { padding: 11px 14px; border: 1px solid #ddd5bd; border-radius: 10px; background: #fffdf8; }
.element-stat b { display: block; font-size: 22px; color: var(--element-ink); }
.element-stat span { color: var(--element-muted); font-size: 12px; }
.element-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid #d8cfb7; scrollbar-width: thin; }
.element-tabs button { flex: 0 0 auto; padding: 11px 18px 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #657069; font-weight: 800; }
.element-tabs button[aria-selected="true"] { color: var(--element-ink); border-bottom-color: var(--element-accent); }
.element-toolbar { display: grid; grid-template-columns: minmax(240px, 1.7fr) repeat(4, minmax(135px, .7fr)) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid #ded5bc; border-radius: 10px; background: #fffdf7; }
.element-toolbar input,.element-toolbar select,.element-form input,.element-form select,.element-form textarea,.element-review-box textarea { width: 100%; box-sizing: border-box; }
.element-workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); gap: 12px; align-items: start; }
.element-list-card,.element-detail-card { min-width: 0; border: 1px solid #ddd5bd; border-radius: 12px; background: #fffdf8; overflow: hidden; }
.element-list { display: grid; }
.element-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid #e5decc; background: transparent; text-align: left; color: inherit; cursor: pointer; }
.element-row:last-child { border-bottom: 0; }
.element-row:hover,.element-row.active { background: #fbf1cf; }
.element-row.active { box-shadow: inset 4px 0 var(--element-accent); }
.element-row h3 { margin: 4px 0 7px; font-size: 18px; color: var(--element-ink); }
.element-row p { margin: 0 0 8px; color: #56645e; line-height: 1.55; }
.element-kicker,.element-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.element-kicker { color: var(--element-accent); font-size: 12px; font-weight: 800; }
.element-badge { display: inline-flex; padding: 3px 8px; border-radius: 99px; background: #f1ecd9; color: #56645e; font-size: 12px; }
.element-badge.good { background: #e6f1e9; color: #3d6b53; }
.element-badge.warn { background: #fff0d7; color: #8a5b16; }
.element-badge.bad { background: #fde8e0; color: #a24432; }
.element-row-meta { display: grid; justify-items: end; align-content: space-between; gap: 12px; color: var(--element-muted); font-size: 12px; white-space: nowrap; }
.element-detail-card { position: sticky; top: 12px; max-height: calc(100vh - 150px); overflow: auto; }
.element-detail-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid #ded5bd; background: rgba(255,253,248,.96); backdrop-filter: blur(8px); }
.element-detail-head h3 { margin: 3px 0 0; color: var(--element-ink); }
.element-detail-body { display: grid; gap: 13px; padding: 16px; }
.element-section { display: grid; gap: 7px; padding-bottom: 13px; border-bottom: 1px solid #ebe4d2; }
.element-section:last-child { border: 0; padding-bottom: 0; }
.element-section h4 { margin: 0; color: var(--element-ink); }
.element-section p,.element-section pre { margin: 0; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.element-pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.element-pair { padding: 10px; border-radius: 8px; background: #f7f3e7; }
.element-pair small { display: block; color: var(--element-muted); margin-bottom: 4px; }
.element-gate { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: #f7f3e7; }
.element-gate.blocked { background: #fdebe5; color: #913f2e; }
.element-review-box { display: grid; gap: 8px; padding: 12px; border: 1px solid #e1c5b9; border-radius: 9px; background: #fff8f3; }
.element-review-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.element-review-actions button { min-height: 36px; }
.element-pagination { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid #e5decc; color: var(--element-muted); }
.element-pagination div { display: flex; gap: 6px; }
.element-source-grid,.element-evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.element-source-card,.element-evidence-card { padding: 14px; border: 1px solid #ddd5bd; border-radius: 10px; background: #fffdf8; }
.element-source-card h3,.element-evidence-card h3 { margin: 5px 0 8px; color: var(--element-ink); }
.element-source-card p,.element-evidence-card p { color: var(--element-muted); }
.element-form { display: grid; gap: 10px; }
.element-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.element-form label { display: grid; gap: 5px; color: var(--element-ink); font-weight: 700; }
.element-form label span { font-size: 12px; color: var(--element-muted); font-weight: 500; }
.element-form .span2 { grid-column: 1 / -1; }
.element-empty,.element-error,.element-loading { display: grid; place-items: center; min-height: 230px; padding: 24px; text-align: center; color: var(--element-muted); }
.element-error { color: #963f2f; }
.element-scope-note { padding: 10px 13px; border-left: 4px solid var(--element-accent); background: #fff6df; color: #5d5b4e; }
.creative-element-picker { display: grid; gap: 10px; margin-top: 14px; padding: 13px; border: 1px solid #ddd5bd; border-radius: 10px; background: #fffdf8; }
.creative-element-picker .style-heading { margin: 0; align-items: center; }
.creative-element-picker .style-heading h4 { margin: 0 0 3px; }
.creative-element-picker .style-heading small { color: #6e7973; }
.creative-element-search { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.creative-element-results,.selected-creative-elements { display: flex; gap: 8px; overflow-x: auto; padding: 3px 1px 7px; scrollbar-width: thin; }
.creative-element-choice { flex: 0 0 min(310px, 82vw); display: grid; gap: 5px; padding: 10px 12px; border: 1px solid #ddd5bd; border-radius: 9px; background: #fff; text-align: left; }
.creative-element-choice.selected { border-color: #e96a4d; background: #fff5e5; }
.creative-element-choice b { color: #24372f; }
.creative-element-choice small { color: #69756f; line-height: 1.4; }
.creative-element-choice .element-badges { margin-top: 3px; }
.selected-creative-elements .creative-element-choice { flex-basis: min(270px, 78vw); }
@media (max-width: 1180px) { .element-workspace { grid-template-columns: 1fr; } .element-detail-card { position: static; max-height: none; } .element-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(130px,.7fr)); } }
@media (max-width: 760px) { .element-hero { align-items: stretch; flex-direction: column; } .element-stats { min-width: 0; grid-template-columns: repeat(3,1fr); } .element-toolbar { grid-template-columns: 1fr 1fr; } .element-toolbar .element-query { grid-column: 1 / -1; } .element-workspace { display: block; } .element-detail-card { margin-top: 10px; } .element-pair-grid,.element-form-grid { grid-template-columns: 1fr; } .element-form .span2 { grid-column: auto; } .element-row { grid-template-columns: 1fr; } .element-row-meta { justify-items: start; } }
