/* The resource library uses compact catalog rows and roomy, labeled edit surfaces. */
.res-form,.res-field,.res-intents,.res-subsection,.res-layout{display:grid;gap:var(--space-4)}
.res-form h3,.res-subsection h3,.res-form p,.res-post p{margin:0}
.res-field{gap:6px;font-size:var(--text-small);font-weight:600}
.res-form input:not([type=checkbox]):not([type=radio]),.res-field input,.res-field select,.res-field textarea,.res-earn input[type=number],input[id^=res-tier-]{width:100%}
.res-field textarea{resize:vertical}
.res-item,.res-search,.res-selection,.res-drawer-intro,.res-segment,.res-return{display:flex;align-items:center;gap:var(--space-3)}
.res-row[data-do]{cursor:pointer}
.res-row[data-do]:hover{background:var(--soft)}
.res-num,.res-chip{display:inline-block;font-weight:500;font-size:var(--text-xs);line-height:1.4;padding:2px 7px;background:var(--soft);border:1px solid var(--line);border-radius:var(--radius-pill);vertical-align:middle}
.res-chip{white-space:nowrap}.res-num{margin-left:var(--space-1)}
.res-search{padding:0 var(--space-3);gap:var(--space-2);border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);min-height:var(--control-md);font-size:var(--text-small);background:var(--surface)}
.res-search input[type=search]{padding:0;width:165px;max-width:100%;min-height:32px;border:0;background:transparent;font:inherit;color:inherit}
.res-search:focus-within{outline:var(--focus-width) solid var(--interactive-focus);outline-offset:1px}
.res-search input[type=search]:focus{outline:0}
.res-pack{width:45px;height:48px;display:inline-grid;place-items:center;border-radius:7px;flex:none;background:#f1eee1;--bag:#9ba56e;--label:#faf7de}
.res-pack-clay{background:#f2e9df;--bag:#c87f59}.res-pack-blue{background:#e8eff1;--bag:#819ba2}.res-pack-ochre{background:#f2ecdb;--bag:#c7ae6e}
.res-pack i{display:block;position:relative;width:21px;height:33px;transform:rotate(-4deg);background:linear-gradient(100deg,rgba(255,255,255,.25),transparent 20%,transparent 80%,#0002),var(--bag);clip-path:polygon(8% 0,92% 0,90% 12%,100% 92%,95% 100%,0 96%,8% 14%);box-shadow:inset -3px -2px 2px #0001}
.res-pack i:before{content:"";position:absolute;inset:25% 13% 20%;background:repeating-linear-gradient(to bottom,var(--label) 0 3px,var(--bag) 4px,var(--label) 5px);border:3px solid var(--label)}
.res-pack i:after{content:"";position:absolute;inset:8% 8% auto;height:1px;background:#0004}
.res-forward,.res-choice,.res-ref,.res-intents button,.res-segment button,.res-radio{font:inherit;color:inherit}
.res-forward{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:var(--radius-sm);background:transparent;cursor:pointer}
.res-table-empty{padding:var(--space-3) var(--space-5)}
.res-choice,.res-ref,.res-intents button{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);width:100%;padding:var(--space-3);text-align:left;background:transparent;border:0;cursor:pointer}
.res-choice+.res-choice,.res-kv+.res-kv{border-top:1px solid var(--line)}
.res-intents{gap:var(--space-1)}.res-intents button{border-radius:var(--radius-sm)}.res-intents [aria-pressed=true],.res-choice:hover,.res-ref:hover{background:var(--soft)}
.res-picker{display:grid;gap:var(--space-3)}
.res-layout{grid-template-columns:minmax(180px,1fr) minmax(0,2.3fr);align-items:start;gap:var(--space-5)}
.res-selection,.res-return{justify-content:space-between;flex-wrap:wrap;padding:var(--space-3) 14px;border:1px solid var(--line);border-radius:var(--radius-sm)}
.res-drawer-intro p,.res-subsection p{font-size:var(--text-small);color:var(--muted);margin:5px 0 0}
.res-drawer-intro .res-pack{width:60px;height:64px}.res-drawer-intro .res-pack i{transform:rotate(-4deg) scale(1.3)}
.res-ticket,.res-post{padding:var(--space-5);border-radius:var(--radius-sm);background:var(--soft)}
.res-ticket{display:flex;align-items:center;justify-content:space-between}
.res-ticket strong{font-size:var(--text-h2);letter-spacing:.05em}
.res-kv{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:10px 0}
.res-kv span,.res-post small{color:var(--muted);font-size:var(--text-small)}
.res-kv strong{text-align:right;font-size:var(--text-body)}
.res-community-account{flex-wrap:wrap;gap:var(--space-2) var(--space-3)}
.res-community-account-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--space-2) var(--space-3);margin-inline-start:auto}
.res-segment{gap:2px;padding:3px;border-radius:var(--radius-sm);background:var(--soft)}
.res-segment button{flex:1;padding:var(--space-2);border:0;border-radius:var(--radius-sm);background:transparent;cursor:pointer}
.res-segment button[aria-pressed=true]{background:var(--surface);box-shadow:var(--elevation-1)}
.res-question{display:grid;min-width:0;gap:10px;border:1px solid var(--line);border-radius:9px;padding:var(--space-4)}
.res-question legend{padding:0 6px;font-size:var(--text-small);font-weight:600}
.res-question .btn{justify-self:start}
.res-add{margin-top:var(--space-4)}.res-radio{display:flex;align-items:center;gap:var(--space-2)}
.res-earn input[type=number]{width:85px}
.res-return{margin:0 0 var(--space-4)}
.res-sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}
@media(max-width:720px){.res-layout{grid-template-columns:1fr}.res-search{max-width:100%;min-width:0}.res-search input[type=search]{width:115px}.res-filterable>.panel-head{flex-wrap:wrap}.res-choice{flex-wrap:wrap}.res-form .grid-2{grid-template-columns:1fr}}
.res-filterable th{position:relative}

/* Brand surveys question cards, step bar and answer distribution from DTC Dashboard,
   mapped to the Brand Hub surface, ink and accent tokens. */
.survey-editor { max-width: 1020px; }
.survey-wizard-stepbar { display:flex; flex-wrap:wrap; gap:var(--space-2); padding-bottom:var(--space-4); border-bottom:1px solid var(--line); }
.survey-wizard-step { display:flex; align-items:center; gap:var(--space-2); padding:6px var(--space-3); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface); color:var(--secondary); font-size:var(--text-body); }
.survey-wizard-step[aria-current=step] { border-color:var(--accent); background:var(--accent-soft); color:var(--ink); }
.survey-wizard-step-num { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:var(--line); font-size:var(--text-caption); font-weight:600; }
.survey-wizard-step[aria-current=step] .survey-wizard-step-num { background:var(--accent); color:var(--on-primary); }
.survey-wizard-footer,.survey-wizard-footer>div,.survey-list-tools,.survey-question-top,.survey-card-actions,.survey-option-editor,.survey-pager,.survey-overview { display:flex; gap:10px; align-items:center; }
.survey-wizard-footer,.survey-question-top,.survey-card-actions { justify-content:space-between; flex-wrap:wrap; }
.survey-wizard-footer { padding-top:var(--space-4); border-top:1px solid var(--line); }
.survey-wizard-footer>.primary:only-child { margin-left:auto; }
.survey-list { min-width:0; }
.survey-list .panel-head { flex-wrap:wrap; }
.survey-list-tools { flex-wrap:wrap; }
.survey-list-tools .res-field { display:flex; flex-direction:row; align-items:center; white-space:nowrap; }
.survey-list td small { display:block; font-size:var(--text-caption); color:var(--muted); }
.survey-list .survey-schedule { white-space:nowrap; }
.survey-title-link { padding:0; background:none; border:0; text-align:left; }
.survey-title-link:hover { text-decoration:underline; }
.survey-row-action { display:inline-grid; place-items:center; min-width:34px; height:34px; border:0; background:transparent; border-radius:var(--radius-sm); color:var(--secondary); }
.survey-row-action:enabled:hover { background:var(--soft); color:var(--accent); }
.survey-pager { padding:var(--space-3) 18px; justify-content:flex-end; }
.survey-question-card { min-width:0; margin:0; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); padding:var(--space-4) var(--space-6); display:flex; flex-direction:column; gap:var(--space-4); }
.survey-question-card:focus-within { border-left:6px solid var(--accent); padding-left:19px; box-shadow:var(--elevation-1); }
.survey-question-top>.res-field { flex:1 1 240px; }
.survey-option-label { font-size:var(--text-small); font-weight:600; }
.survey-option-editor { gap:10px; margin-top:5px; }
.survey-option-editor>i { flex:none; width:15px; height:15px; border:1px solid var(--quiet); border-radius:50%; }
.survey-option-editor textarea { resize:vertical; border:0; border-bottom:1px solid var(--line); padding:var(--space-2) var(--space-1); width:100%; min-width:0; min-height:36px; border-radius:0; }
.survey-card-actions { justify-content:flex-end; gap:var(--space-1); border-top:1px solid var(--line); padding-top:var(--space-2); }
.survey-audience { display:grid; gap:14px; min-width:0; margin:0; padding:14px; border:1px solid var(--line); border-radius:var(--radius-sm); }
.survey-audience legend { padding:0 6px; font-weight:600; }
.survey-audience-hint { margin:0; color:var(--muted); font-size:var(--text-small); }
.survey-audience-sample { display:flex; align-items:center; gap:var(--space-2); }
.survey-audience-list { display:grid; gap:var(--space-2); }
.survey-dimension-row { display:grid; grid-template-columns:minmax(150px,.8fr) minmax(220px,1.2fr); gap:var(--space-3); align-items:center; padding:10px 0; border-top:1px solid var(--line); }
.survey-dimension-toggle { display:flex; align-items:center; gap:var(--space-2); font-weight:500; }
.survey-dimension-value { display:grid; gap:5px; font-size:var(--text-caption); font-weight:600; }
.survey-dimension-value select { box-sizing:border-box; width:100%; min-width:0; min-height:40px; padding-inline-start:11px; border:1px solid var(--line); border-radius:var(--radius-sm); color:inherit; font:inherit; font-weight:400; }
.survey-audience input[type=checkbox] { width:16px; height:16px; accent-color:var(--accent); }
.survey-overview { gap:36px; flex-wrap:wrap; }
.survey-overview strong,.survey-overview span { display:block; }
.survey-overview [data-filled] { font-size:32px; letter-spacing:-.04em; line-height:1.25; }
.survey-overview span { color:var(--muted); }
.survey-answer-block { max-width:800px; padding:var(--space-2) 0 18px; }
.survey-answer-block+.survey-answer-block { border-top:1px solid var(--line); padding-top:18px; }
.survey-answer-block h3 { margin:0 0 14px; }
.survey-option-bars { display:flex; flex-direction:column; gap:10px; }
.survey-option-bar-head { display:flex; justify-content:space-between; gap:var(--space-3); align-items:center; margin-bottom:6px; font-size:var(--text-body); }
.survey-option-bar-track { height:8px; border-radius:var(--radius-pill); background:var(--soft); overflow:hidden; }
.survey-option-bar-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 70%, var(--surface))); }
.survey-review-questions { margin:1em 0 0; padding-left:22px; }
.survey-review-questions li { padding:5px; }
.survey-review-questions p { color:var(--muted); }
@media(max-width:700px) {
  .survey-list .data-table,.survey-list .data-table tbody { display:block; width:100%; min-width:0; }
  .survey-list .data-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .survey-list .data-table tr:not([hidden]) { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 10px; align-items:start; padding:var(--space-3); border-bottom:1px solid var(--line); }
  .survey-list .data-table td { border:0; padding:0; min-width:0; white-space:normal; }
  .survey-list td:first-child { grid-area:1/1; }
  .survey-list td:nth-child(5) { grid-area:1/2; justify-self:end; }
  .survey-list td:nth-child(3),.survey-list td:nth-child(4) { grid-column:1/-1; }
  .survey-list td:nth-child(2)::before { content:'Questions · '; }
  .survey-list td:nth-child(3)::before { content:'Audience · '; }
  .survey-list td:nth-child(4)::before { content:'Schedule · '; }
  .survey-list td:nth-child(6)::before { content:'Cards filled · '; }
  .survey-list td:nth-child(7)::before { content:'Updated · '; }
  .survey-list td:last-child { justify-self:end; }
  .survey-wizard-stepbar { gap:5px; }
  .survey-wizard-step { padding:5px 7px; font-size:var(--text-caption); }
  .survey-list-tools { width:100%; }
  .survey-card-actions { justify-content:flex-start; }
  .survey-dimension-row { grid-template-columns:1fr; gap:var(--space-2); }
  .survey-question-card { padding:var(--space-3); }
  .survey-question-card:focus-within { padding-left:7px; }
  .survey-editor,.survey-editor .panel,.survey-editor [data-section],.survey-editor .ops-fields>* { min-width:0; }
}
.survey-question-card [data-question-fields] { display:grid; gap:var(--space-4); }
.survey-question-summary { display:grid; justify-items:start; text-align:left; gap:7px; border:0; padding:2px; background:none; width:100%; }
.survey-question-summary [data-summary-options] { color:var(--muted); }
/* Quikr request routing and its editor. */
.qk-list {table-layout:fixed;min-width:520px}
.qk-list col:nth-child(1) {width:23%}
.qk-list col:nth-child(2) {width:30%}
.qk-list col:nth-child(3) {width:auto}
.qk-list col:nth-child(4) {width:88px}
.qk-list tbody :is(th,td) {vertical-align:top}
.qk-list tbody th {background:transparent;color:var(--ink);font-size:var(--text-small);font-weight:600;border:0}
.qk-list tbody + tbody {border-top:1px solid var(--line)}
.qk-list .qk-edit {text-align:right}
.qk-list thead th:last-child {text-align:right}
.qk-destination {display:grid;justify-items:start;gap:var(--space-1);min-width:0;overflow-wrap:anywhere}
.qk-list .qk-more td {padding-block:0 var(--space-2)}
.qk-save-scope {margin:var(--space-4) 0 0}
.qk-url {color:var(--accent-deep);text-decoration:underline;text-decoration-color:var(--edge);text-underline-offset:3px}
.qk-url:hover {text-decoration-color:currentColor}
.qk-source {color:var(--muted);font-size:var(--text-caption)}
.qk-chips {display:flex;flex-wrap:wrap;gap:var(--space-1);min-width:0}
.qk-chip {display:inline-flex;align-items:center;gap:var(--space-1);max-width:100%;min-width:0;padding:3px 9px;border-radius:var(--radius-pill);background:var(--soft);color:var(--secondary);font-size:var(--text-caption);overflow-wrap:anywhere}
.qk-chip > span {min-width:0}
.qk-remove {border:0;background:none;color:inherit;display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:var(--radius-pill);padding:0;cursor:pointer}
.qk-remove:hover {background:var(--interactive-hover);color:var(--ink)}
.qk-editor {display:flex;flex-direction:column;min-height:0}
.qk-capability {display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--space-1) var(--space-3);margin:0 0 var(--space-4)}
.qk-capability dt {color:var(--muted);font-size:var(--text-small)}
.qk-capability dd {margin:0;font-weight:600}
.qk-editor-fields {display:grid;gap:var(--space-4);border:0;min-width:0;margin:0;padding:0}
.qk-destination-fields,.qk-keyword-field {display:grid;gap:var(--space-3);min-width:0}
.qk-editor input {width:100%;min-width:0}
.qk-editor input[readonly] {background:var(--soft);color:var(--secondary)}
.qk-editor .res-error {margin:0}
.qk-editor > .overlay-body > .res-error {margin-top:var(--space-3)}
.qk-destination-controls:empty,.qk-keyword-field .qk-chips:empty {display:none}
.qk-destination-controls,.qk-keyword-field > .btn {justify-self:start}
.qk-note,.qk-notice {margin-bottom:var(--space-3)}
.qk-notice {display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}
.qk-notice p {margin:0}
.qk-query {overflow-wrap:anywhere}
.qk-skeleton {display:block;width:75%;height:14px;border-radius:var(--radius-pill);background:var(--soft)}
