/* Protero styles */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --success: #16a34a;
  --warn: #b45309;
  --warn-50: #fffbeb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .05);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .18);
  --sidebar-w: 248px;
  /* Charts: one series hue, and an indigo / amber pair for Yes / No (distinct for colour-blind readers too). */
  --chart-1: #4f46e5;
  --chart-track: #eef2f7;
  --chart-yes: #4f46e5;
  --chart-no: #d97706;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute always wins over component display styles (buttons, flex rows). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
.stack { display: grid; gap: 8px; }
.link { color: var(--primary); font-weight: 500; }
.link:hover { text-decoration: underline; }
.ta-right { text-align: right; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-pad { padding-top: 24px; padding-bottom: 48px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(79, 70, 229, .3); }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: #9ca3af; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-ghost { background: var(--surface); color: var(--danger); border-color: #fecaca; }
.btn-danger-ghost:hover { background: var(--danger-50); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover:not(:disabled) { background: #f1f5f9; color: var(--text); }
.icon-btn.danger:hover:not(:disabled) { background: var(--danger-50); color: var(--danger); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .icon { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Form controls ---------- */
.input, .select { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 64px; }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.input-sm { height: 34px; }
.select { appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.select-sm { height: 32px; width: auto; font-size: 13px; padding-left: 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field .sub { font-weight: 600; font-size: 13px; color: var(--text); }
.field .sub { color: var(--text-2); }
.req { color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); display: flex; align-items: flex-start; gap: 6px; }
.hint .icon { width: 15px; height: 15px; margin-top: 2px; }
.hint-inline { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field-row .field { margin-bottom: 0; }
.field-row.compact { max-width: 360px; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; }
.field-error { display: none; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.has-error .field-error { display: block; }
.has-error .input { border-color: var(--danger); }
.has-error .input:focus { box-shadow: 0 0 0 3px #fee2e2; }

.segmented { display: inline-flex; flex-wrap: wrap; background: #f1f5f9; border-radius: 10px; padding: 3px; gap: 2px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: block; padding: 6px 12px; border-radius: 8px; font-weight: 500; font-size: 13px; color: var(--text-2); transition: background .15s, color .15s; }
.seg-opt input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); }
.segmented.small .seg-opt span { padding: 5px 10px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 36px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .2s; flex: none; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch-text { font-weight: 500; }

/* ---------- Badges ---------- */
.status-badge { --c: #64748b; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: color-mix(in srgb, var(--c) 72%, #000); background: color-mix(in srgb, var(--c) 13%, #fff); border: 1px solid color-mix(in srgb, var(--c) 28%, #fff); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.status-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.status-badge.lg { font-size: 13px; padding: 4px 12px 4px 10px; }
.lifecycle { display: inline-flex; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lifecycle-concept { background: #f1f5f9; color: #475569; }
.lifecycle-low-fi { background: #e0f2fe; color: #075985; }
.lifecycle-high-fi { background: #dbeafe; color: #1e40af; }
.lifecycle-poc { background: #e0e7ff; color: #3730a3; }
.lifecycle-functional { background: #ede9fe; color: #5b21b6; }
.lifecycle-alpha { background: #fef3c7; color: #92400e; }
.lifecycle-beta { background: #ffedd5; color: #9a3412; }
.lifecycle-production { background: #dcfce7; color: #166534; }.vis { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.vis .icon { width: 14px; height: 14px; }
.vis-live { color: var(--success); }
.vis-draft { color: var(--warn); }
.vis-hidden { color: var(--muted); }
.count-pill { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: #f1f5f9; color: var(--text-2); font-size: 12px; font-weight: 600; }
.category-label { --cc: var(--primary); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: color-mix(in srgb, var(--cc) 85%, #000); min-width: 0; }
.category-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-label .icon { width: 14px; height: 14px; }
.category-pill { --cc: var(--primary); display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--cc) 12%, #fff); color: color-mix(in srgb, var(--cc) 80%, #000); font-weight: 600; font-size: 13px; transition: background .15s; }
a.category-pill:hover { background: color-mix(in srgb, var(--cc) 20%, #fff); }

/* Card links: the title link stretches over the whole card; the launch button sits above it. */
.demo-card { position: relative; }
.demo-card.is-link { cursor: pointer; }
.card-link { color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.demo-card-actions { position: relative; z-index: 2; display: grid; gap: 8px; padding-top: 4px; }
.launch-btn { position: relative; z-index: 2; }
.demo-card-actions .launch-btn, .demo-card-actions .card-feedback-btn { width: 100%; }
.card-feedback-btn .icon { width: 15px; height: 15px; }
.launch-btn .icon { width: 15px; height: 15px; }
.demo-card.just-launched { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100), var(--shadow); }
.demo-card.just-launched .demo-card-media::after { content: "Last opened"; position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(15,23,42,.78); color: #fff; font-size: 11.5px; font-weight: 600; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.detail-actions .launch-hint { font-size: 13px; color: var(--muted); }
.summary-actions { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.summary-actions .btn, .summary-actions #fb-cta, .summary-actions #fb-cta .btn { width: 100%; }
.summary-actions #fb-cta { display: block; }
.summary-actions .launch-hint { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: -4px; }
.link-row { display: flex; gap: 8px; }
.link-row .input { flex: 1; min-width: 0; }
.link-cell { display: inline-flex; color: var(--primary); }
.link-cell .icon { width: 15px; height: 15px; }

/* ---------- Feedback (end user) ---------- */
.btn-feedback { background: #0f172a; color: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.3); }
.btn-feedback:hover { background: #1e293b; }
.btn-feedback.is-preview { cursor: default; opacity: .9; }
.modal-lg { max-width: 760px; }
.fb-panel { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: linear-gradient(90deg, var(--primary-50), var(--surface)); border: 1px solid var(--primary-100); }
.fb-panel.done { background: linear-gradient(90deg, #f0fdf4, var(--surface)); border-color: #bbf7d0; }
.fb-panel-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; }
.fb-panel.done .fb-panel-icon { background: var(--success); }
.fb-panel-text { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.fb-panel-text span { color: var(--text-2); font-size: 13px; }
.fb-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-body { background: var(--bg); }
.fb-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; flex: none; }
.q-answer { background: var(--surface); transition: border-color .15s; }
.q-answer.answered { border-color: #c7d2fe; }
.q-answer.answered .q-num { background: var(--success); }
.scale-input .scale-point { cursor: pointer; position: relative; }
.scale-input input, .yesno-input input { position: absolute; opacity: 0; pointer-events: none; }
.scale-input .scale-btn { cursor: pointer; transition: all .12s; }
.scale-input .scale-point:hover .scale-btn { border-color: var(--primary); color: var(--primary); }
.scale-input input:checked + .scale-btn { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 3px var(--primary-100); }
.scale-input input:focus-visible + .scale-btn, .yesno-input input:focus-visible + .yesno-btn { outline: 2px solid var(--primary); outline-offset: 2px; }
.yesno-input label { position: relative; cursor: pointer; }
.yesno-input .yesno-btn { cursor: pointer; transition: all .12s; }
.yesno-input label:hover .yesno-btn { border-color: var(--primary); }
.yesno-input label:first-child input:checked + .yesno-btn { background: var(--success); border-color: var(--success); color: #fff; }
.yesno-input label:last-child input:checked + .yesno-btn { background: var(--danger); border-color: var(--danger); color: #fff; }
.clear-answer { margin-top: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.clear-answer.is-hidden { visibility: hidden; }
.fb-foot { align-items: center; }
.fb-progress { margin-right: auto; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.fb-bar { width: 90px; height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.fb-bar span { display: block; height: 100%; background: var(--success); transition: width .2s; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.review-list li { padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 8px; }
.review-q { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; overflow-wrap: anywhere; }
.q-num.sm { width: 22px; height: 22px; font-size: 11px; }
.review-a { padding-left: 32px; }
.answer-empty { color: var(--warn); font-style: italic; font-size: 13px; }
.answer-text { white-space: pre-wrap; color: var(--text-2); overflow-wrap: anywhere; }
.answer-yn { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.answer-yn .icon { width: 14px; height: 14px; }
.answer-yn.yes { background: #dcfce7; color: #166534; }
.answer-yn.no { background: #fee2e2; color: #991b1b; }
.answer-scale { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; }
.answer-scale strong { font-size: 18px; }
.answer-scale-label { padding: 1px 8px; border-radius: 999px; background: var(--primary-50); color: var(--primary-600); font-size: 12px; font-weight: 600; }
.fb-confirm { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 20px 8px; }
.fb-confirm-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: var(--success); margin-bottom: 6px; }
.fb-confirm-icon .icon { width: 30px; height: 30px; }
.fb-confirm h3 { font-size: 20px; }
.fb-confirm p { max-width: 460px; color: var(--text-2); }
.survey-settings { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- Feedback (admin) ---------- */
.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card.static:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }
.small-value { font-size: 22px; }
.fb-cell { display: grid; gap: 1px; }
.fb-table .table-row { grid-template-columns: minmax(180px, 1fr) 96px 120px 76px 132px; }
.big-count { font-size: 18px; }
.fb-table .table-row > .row-actions { display: flex; }
.resp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.resp-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.resp-grid .panel + .panel { margin-top: 0; }
.search-input.sm { height: 36px; margin-bottom: 10px; }
.resp-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; max-height: 560px; overflow: auto; }
.resp-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.resp-item:hover { background: var(--surface-2); }
.resp-item.active { background: var(--primary-50); }
.resp-item-main { flex: 1; min-width: 0; display: grid; }
.resp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resp-email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resp-item-side { display: grid; justify-items: end; gap: 3px; flex: none; }
.resp-date { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.edited-pill, .removed-pill { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--warn-50); color: var(--warn); border: 1px solid #fde68a; }
.removed-pill { background: #f1f5f9; color: var(--muted); border-color: var(--border); font-weight: 500; }
.resp-none { padding: 12px 8px; }
.resp-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.resp-detail-head .avatar { width: 44px; height: 44px; font-size: 14px; }
.resp-detail-name { font-size: 18px; }
.resp-facts { margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.resp-facts dt { font-size: 12px; color: var(--muted); }
.resp-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.resp-detail .review-list li { background: var(--surface-2); }
.q-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.qs-card { padding: 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); display: grid; gap: 10px; align-content: start; }
.qs-head { display: grid; gap: 2px; }
.qs-q { font-weight: 600; overflow-wrap: anywhere; }
.qs-avg strong { font-size: 24px; }
.qs-dist { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; align-items: end; }
.qs-col { display: grid; justify-items: center; gap: 2px; }
.qs-bar-wrap { height: 60px; width: 100%; max-width: 28px; display: flex; align-items: flex-end; background: #eef2f7; border-radius: 4px; overflow: hidden; }
.qs-bar { width: 100%; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 0; }
.qs-n { font-size: 11px; font-weight: 700; }
.qs-v { font-size: 11px; color: var(--muted); }
.qs-yn { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; }
.qs-yn-yes { background: var(--chart-yes); }
.qs-yn-no { background: var(--chart-no); }
.qs-yn-legend { display: flex; gap: 14px; font-size: 13px; }
.qs-yn-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.qs-yn-legend .dot.yes { background: var(--chart-yes); }
.qs-yn-legend .dot.no { background: var(--chart-no); }
.qs-texts { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.qs-texts li { padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mini-stats { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
.mini-stats > a { display: grid; gap: 2px; font-size: 12.5px; }
.mini-stats > a:hover .mini-value { color: var(--primary); }

/* Status visuals */
.status-solid { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(15,23,42,.15); letter-spacing: .01em; }
.status-solid .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.status-solid.lg { font-size: 14px; padding: 6px 14px 6px 12px; }
.status-solid.on-media { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 8px rgba(15,23,42,.25); max-width: calc(100% - 24px); }
.demo-card-media { position: relative; }
.status-filter-row { display: flex; align-items: center; gap: 12px; margin: -4px 0 16px; flex-wrap: wrap; }
[data-filters][hidden] { display: none; }
.chip-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.chip.status-chip.active { background: var(--c); border-color: var(--c); color: var(--on); }
.chip.status-chip.active .dot { background: currentColor; }
.chip.status-chip.active .chip-count { background: rgba(255,255,255,.25); color: inherit; }
.result-meta .status-badge { margin-left: 4px; vertical-align: middle; }
.status-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.status-option { position: relative; cursor: pointer; }
.status-option input { position: absolute; opacity: 0; pointer-events: none; }
.status-option-pill { --c: #64748b; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); background: color-mix(in srgb, var(--c) 8%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); font-weight: 600; font-size: 13px; transition: all .12s; }
.status-option-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.status-option:hover .status-option-pill { background: color-mix(in srgb, var(--c) 16%, #fff); }
.status-option input:checked + .status-option-pill { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.status-option input:checked + .status-option-pill .dot { background: #fff; }
.status-option input:focus-visible + .status-option-pill { outline: 2px solid var(--primary); outline-offset: 2px; }
.status-add { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.status-add:hover { border-color: var(--primary); color: var(--primary); }
.status-add .icon { width: 15px; height: 15px; }
.status-preview .status-solid { flex: none; }
.status-form-preview { display: flex; gap: 24px; flex-wrap: wrap; padding: 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 18px; }
.status-form-preview > div { display: grid; gap: 6px; justify-items: start; }
.hex-input { width: 96px; height: 32px; }
.status-table .table-row { grid-template-columns: 84px minmax(0, 1fr) 120px 120px 96px; }
.order-cell { display: flex; gap: 2px; }
.status-table .table-row > .row-actions { display: flex; }
.cell-status { display: grid; justify-items: start; gap: 4px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.cell-status .row-sub { white-space: normal; }
.cell-status:hover .status-solid { filter: brightness(1.08); }
.status-panel { margin-top: 16px; }
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; background: #f1f5f9; margin-bottom: 16px; }
.stack-bar span { min-width: 6px; }
.stack-none { background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 4px, #f8fafc 4px, #f8fafc 8px); }
.status-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.status-legend li { display: inline-flex; align-items: center; gap: 6px; }
.status-legend a { display: inline-flex; align-items: center; gap: 6px; }
.status-legend li.zero { opacity: .5; }
.legend-count { font-weight: 700; font-size: 13px; color: var(--text-2); }

/* Category visuals */
.cat-tile { --cc: #64748b; flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--cc) 14%, #fff); color: var(--cc); border: 1px solid color-mix(in srgb, var(--cc) 22%, #fff); }
.cat-tile .icon { width: 18px; height: 18px; }
.cat-tile.lg { width: 52px; height: 52px; border-radius: 14px; }
.cat-tile.lg .icon { width: 26px; height: 26px; }
.cat-tile.xs { width: 22px; height: 22px; border-radius: 6px; }
.cat-tile.xs .icon { width: 13px; height: 13px; }
.cat-letter { font-weight: 700; font-size: 14px; line-height: 1; }
.cat-tile.lg .cat-letter { font-size: 20px; }
.cat-tile.xs .cat-letter { font-size: 11px; }
.cat-chip .icon { width: 15px; height: 15px; color: var(--cc); }
.chip.cat-chip.active { background: var(--cc); border-color: var(--cc); color: #fff; }
.chip.cat-chip.active .icon { color: #fff; }
.category-banner { --cc: var(--primary); display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 16px; border-radius: var(--radius); background: linear-gradient(90deg, color-mix(in srgb, var(--cc) 10%, #fff), var(--surface)); border: 1px solid color-mix(in srgb, var(--cc) 25%, #fff); border-left: 4px solid var(--cc); }
.category-banner-text { flex: 1; min-width: 0; }
.category-banner-eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: color-mix(in srgb, var(--cc) 80%, #000); }
.category-banner h2 { font-size: 20px; margin-top: 2px; }
.category-banner p:not(.category-banner-eyebrow) { color: var(--text-2); margin-top: 4px; }
.bar-name { display: inline-flex; align-items: center; gap: 8px; }
.text-warn { color: var(--warn); font-weight: 500; }
.notice.warn { background: var(--warn-50); color: #78350f; border: 1px solid #fde68a; }

.cat-table .table-row { grid-template-columns: minmax(0, 1fr) 120px 120px 120px; }
.cell-cat { display: flex; align-items: center; gap: 12px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.cell-cat:hover .row-title { color: var(--primary); }
.cell-cat .row-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.count-link { color: var(--primary); font-weight: 600; }
.count-link:hover { text-decoration: underline; }
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
/* The feedback dialog wraps its steps in .fb (and the identify step in a form), so they must pass the height limit down too. */
.modal > .fb, .fb > form, .modal > .auth, .auth > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cat-preview { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 18px; min-width: 0; }
.cat-preview > div { min-width: 0; }
.cat-preview-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.cat-swatches { margin-bottom: 0; align-items: center; }
.swatch-none { display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.swatch-none .icon { width: 14px; height: 14px; }
.swatch-none.active { box-shadow: 0 0 0 2px var(--text-2); }
.swatch-picker { width: 32px; height: 32px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.icon-choice { height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); cursor: pointer; transition: all .12s; }
.icon-choice:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.icon-choice.active { border-color: var(--primary); background: var(--primary-50); color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.icon-choice .cat-letter { font-size: 13px; }
.affected-list { list-style: none; margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: 6px; }
.affected-list li { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.affected-list .icon { width: 15px; height: 15px; color: var(--muted); }
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--danger); flex: none; }
.category-pill .icon { width: 14px; height: 14px; }

/* ---------- Thumbnails ---------- */
.thumb { width: 100%; height: 100%; object-fit: cover; background: #e2e8f0; }
.thumb-placeholder { --h: 240; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 70% 52%)); color: rgba(255,255,255,.95); font-weight: 700; font-size: 28px; letter-spacing: .02em; }
.thumb.full { height: auto; aspect-ratio: 16 / 10; }
.thumb-placeholder.full { font-size: 56px; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head .panel-title { margin-bottom: 0; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.panel-title.small { font-size: 14px; margin-bottom: 12px; }
.panel-title .icon { color: var(--muted); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--primary-50); color: #3730a3; font-size: 13px; margin-bottom: 16px; }
.notice .icon { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- States ---------- */
.empty-state { text-align: center; padding: 48px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); display: grid; justify-items: center; gap: 8px; }
.empty-state h3 { font-size: 16px; }
.empty-state p { color: var(--muted); max-width: 420px; margin-bottom: 8px; }
.empty-icon { width: 36px; height: 36px; color: #94a3b8; margin-bottom: 4px; }
.empty-state.error .empty-icon { color: var(--danger); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 56px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-mark { color: var(--primary); display: inline-flex; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: var(--primary-50); color: var(--primary); }

/* ---------- Public shell ---------- */
.pub { min-height: 100vh; display: flex; flex-direction: column; }
.pub-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.pub-header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.pub-nav { display: flex; align-items: center; gap: 20px; }
.pub-nav-link { font-weight: 500; color: var(--text-2); }
.pub-nav-link:hover { color: var(--text); }
.pub-main { flex: 1; }
.pub-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: 13px; background: var(--surface); }

.hero { background: radial-gradient(1200px 400px at 10% -10%, #e0e7ff 0%, transparent 60%), radial-gradient(900px 400px at 100% 0%, #fae8ff 0%, transparent 55%), var(--surface); border-bottom: 1px solid var(--border); padding: 56px 0 44px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.hero h1 { font-size: clamp(28px, 4vw, 40px); max-width: 720px; letter-spacing: -0.02em; }
.lead { font-size: 16px; color: var(--text-2); max-width: 640px; margin-top: 12px; }
.hero-search { margin-top: 28px; display: flex; align-items: center; gap: 10px; max-width: 560px; height: 50px; padding: 0 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); color: var(--muted); }
.hero-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); }
.hero-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); height: 100%; min-width: 0; }

.catalogue { padding-top: 28px; padding-bottom: 56px; }
.filters-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 500; font-size: 13px; cursor: pointer; color: var(--text-2); transition: all .15s; }
.chip:hover { border-color: #94a3b8; color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.chip-count { font-size: 11.5px; font-weight: 600; padding: 0 6px; border-radius: 999px; background: #f1f5f9; color: var(--text-2); }
.chip.active .chip-count { background: rgba(255,255,255,.2); color: #fff; }
.select-wrap { display: flex; align-items: center; gap: 10px; }
.select-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.select-label .icon { width: 15px; height: 15px; }
.select-wrap .select { width: 200px; height: 36px; }
.result-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin-bottom: 14px; min-height: 20px; }
.result-meta strong { color: var(--text); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.demo-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; min-width: 0; }
.demo-card.is-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.demo-card.is-link:focus-within:has(.card-link:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.demo-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #e2e8f0; border-bottom: 1px solid var(--border); }
.demo-card-media .thumb { transition: transform .3s; }
.demo-card.is-link:hover .demo-card-media .thumb { transform: scale(1.03); }
.demo-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.demo-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.demo-card-title { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.demo-card-notes { color: var(--text-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.demo-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid #f1f5f9; color: var(--muted); font-size: 12.5px; }
.demo-card-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.demo-card-foot .icon { width: 15px; height: 15px; }
.view-link { color: var(--primary); font-weight: 600; }
.demo-card.is-link:hover .view-link .icon { transform: translateX(2px); }
.view-link .icon { transition: transform .15s; }

/* ---------- Details ---------- */
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 500; margin-bottom: 14px; }
.back-link:hover { color: var(--primary); }
.back-link .icon { width: 16px; height: 16px; }
.detail-header { margin-bottom: 20px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.detail-header h1 { font-size: clamp(26px, 3.5vw, 34px); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.detail-hero { position: relative; margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #e2e8f0; box-shadow: var(--shadow); }
.status-solid.hero-status { left: auto; right: 14px; top: 14px; max-width: calc(100% - 28px); }
.notes-full { white-space: pre-wrap; color: var(--text-2); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.detail-side { position: sticky; top: 88px; }
.summary-list { margin: 0; display: grid; gap: 0; }
.summary-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }

.survey { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-preview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.q-preview { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--surface-2); }
.q-preview-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.q-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 700; }
.q-preview-text { flex: 1; min-width: 0; }
.q-title { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.q-desc { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.q-type { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; }
.q-type .icon { width: 13px; height: 13px; }
.q-preview-body textarea { background: var(--surface); }
.scale { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.scale-point { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.scale-btn { width: 100%; max-width: 56px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-weight: 600; color: var(--text-2); }
.scale-label { font-size: 11.5px; color: var(--muted); line-height: 1.25; overflow-wrap: anywhere; }
.yesno { display: flex; gap: 10px; }
.yesno-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 20px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-weight: 600; color: var(--text-2); }
.yesno-btn .icon { width: 16px; height: 16px; }

/* ---------- Admin shell ---------- */
.admin { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; transition: transform .25s; }
.sidebar .brand { color: #fff; padding: 4px 8px 20px; }
.sidebar .brand-mark { color: #6366f1; }
.sidebar .brand-tag { background: rgba(99,102,241,.2); color: #a5b4fc; }
.side-nav { display: grid; gap: 2px; }
.side-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 16px 10px 6px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-weight: 500; color: #cbd5e1; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(99,102,241,.18); color: #fff; }
.side-nav a.active .icon { color: #a5b4fc; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-weight: 700; font-size: 12px; }
.side-foot-name { color: #fff; font-weight: 600; font-size: 13px; }
.side-foot-sub { font-size: 12px; color: #94a3b8; }
.sidebar-backdrop { display: none; }
.admin-body { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar { display: none; }
.admin-main { padding: 28px 32px 56px; max-width: 1280px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { --tone: var(--primary); --tone-bg: var(--primary-50); display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon label" "value value" "sub sub"; align-items: center; column-gap: 10px; row-gap: 6px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s, transform .15s; }
.stat-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); transform: translateY(-1px); }
.stat-icon { grid-area: icon; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone); }
.stat-label { grid-area: label; font-weight: 600; color: var(--text-2); font-size: 13px; }
.stat-value { grid-area: value; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; }
.stat-sub { grid-area: sub; font-size: 12.5px; color: var(--muted); }
.tone-green { --tone: #16a34a; --tone-bg: #dcfce7; }
.tone-amber { --tone: #d97706; --tone-bg: #fef3c7; }
.tone-slate { --tone: #475569; --tone-bg: #f1f5f9; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-grid .panel + .panel { margin-top: 0; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-item { display: flex; align-items: center; gap: 14px; padding: 10px; margin: 0 -10px; border-radius: 10px; transition: background .15s; }
.recent-item:hover { background: var(--surface-2); }
.recent-thumb { width: 64px; height: 40px; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid var(--border); }
.recent-thumb .thumb-placeholder { font-size: 13px; }
.recent-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.recent-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-sub { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.recent-side { display: grid; justify-items: end; gap: 4px; flex: none; max-width: 40%; }
.recent-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bar-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.bar-list a { display: grid; gap: 6px; }
.bar-label { display: flex; justify-content: space-between; font-weight: 500; font-size: 13px; }
.bar-track { height: 8px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.bar-fill { --h: 240; display: block; height: 100%; border-radius: inherit; background: hsl(var(--h) 65% 58%); }
.bar-list a:hover .bar-label span:first-child { color: var(--primary); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.mini-stats > div { display: grid; gap: 2px; font-size: 12.5px; }
.mini-value { font-size: 20px; font-weight: 700; }

/* Demo list */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px; margin-bottom: 14px; }
.search-input { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface); }
.search-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.search-input input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; color: var(--text); min-width: 0; }
.toolbar-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar-filters .select { width: auto; min-width: 140px; }
.table { padding: 0; overflow: hidden; }
.table-row { display: grid; grid-template-columns: minmax(220px, 2.4fr) minmax(110px, 1.1fr) 120px 110px 110px 100px 176px; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.table-row:last-child { border-bottom: 0; }
.table-row:not(.table-head):hover { background: var(--surface-2); }
.table-head { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.cell-demo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-thumb { width: 64px; height: 40px; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid var(--border); }
.row-thumb .thumb-placeholder { font-size: 13px; }
.cell-demo-text { display: grid; min-width: 0; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-demo:hover .row-title { color: var(--primary); }
.row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell { min-width: 0; font-size: 13px; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }

/* Editor */
.editor-head { position: sticky; top: 0; z-index: 15; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: -28px -32px 20px; padding: 20px 32px 16px; background: rgba(246,247,251,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.editor-head .back-link { margin-bottom: 6px; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.dirty-flag { font-size: 12.5px; font-weight: 600; color: var(--warn); background: var(--warn-50); border: 1px solid #fde68a; padding: 3px 10px; border-radius: 999px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.side-sticky { position: sticky; top: 112px; }
.card-preview { margin-bottom: 12px; }
.card-preview .demo-card { box-shadow: var(--shadow); }
.vis-info { display: flex; gap: 12px; align-items: flex-start; }
.vis-info .icon { width: 20px; height: 20px; margin-top: 1px; }
.vis-info.ok .icon { color: var(--success); }
.vis-info.off .icon { color: var(--warn); }
.vis-info p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.meta-line { margin-top: 12px; }

.dropzone { position: relative; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); min-height: 180px; display: grid; place-items: center; cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over, .dropzone:focus-visible { border-color: var(--primary); background: var(--primary-50); outline: none; }
.dropzone.has-image { border-style: solid; cursor: default; background: #e2e8f0; display: block; min-height: 0; }
.dropzone.has-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.dz-empty { text-align: center; padding: 28px 20px; display: grid; justify-items: center; gap: 6px; }
.dz-icon { width: 36px; height: 36px; color: #94a3b8; }
.dz-empty .hint { justify-content: center; }
.dz-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.dz-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(255,255,255,.85); font-weight: 600; color: var(--text-2); }

.status-row { grid-template-columns: 1fr auto; }
.color-field { display: flex; gap: 8px; align-items: center; }
.color-field input[type="color"] { width: 44px; height: 40px; padding: 3px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; flex: none; }
.color-field .input { width: 100px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.swatch:hover { transform: scale(1.1); }
.swatch.active { box-shadow: 0 0 0 2px var(--c); }
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-chip { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 999px; }
.preset-chip:hover .status-badge { filter: brightness(.96); box-shadow: var(--shadow-sm); }
.status-preview { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); margin-top: 16px; font-size: 13px; }

.q-edit-list { display: grid; gap: 12px; margin-bottom: 16px; }
.q-edit { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: box-shadow .15s, opacity .15s; position: relative; }
.q-edit:focus-within { border-color: #c7d2fe; box-shadow: 0 0 0 3px var(--primary-50); }
.q-edit.dragging { opacity: .45; }
.q-edit.drop-before::before, .q-edit.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--primary); }
.q-edit.drop-before::before { top: -8px; }
.q-edit.drop-after::after { bottom: -8px; }
.q-edit-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 6px; border-bottom: 1px solid #f1f5f9; background: var(--surface-2); border-radius: 10px 10px 0 0; }
.drag-handle { display: grid; place-items: center; width: 28px; height: 30px; border: 0; background: transparent; color: #94a3b8; cursor: grab; border-radius: 6px; touch-action: none; }
.drag-handle:hover { background: #eef2f7; color: var(--text-2); }
.drag-handle:active { cursor: grabbing; }
.q-index { font-weight: 700; font-size: 13px; color: var(--primary); min-width: 26px; }
.q-edit-body { padding: 16px; }
.q-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 16px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--muted); }
.q-empty .icon { width: 28px; height: 28px; color: #94a3b8; }
.scale-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.scale-label-row { display: flex; align-items: center; gap: 8px; }
.scale-num { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: #f1f5f9; font-weight: 700; font-size: 13px; color: var(--text-2); }
.scale-preview { padding: 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.add-question { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.add-label { font-weight: 600; font-size: 13px; color: var(--text-2); margin-right: 4px; }

/* Preview */
.preview-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); background: var(--primary-50); border: 1px solid var(--primary-100); color: #312e81; margin-bottom: 20px; }
.preview-banner.warn { background: var(--warn-50); border-color: #fde68a; color: #78350f; }
.preview-banner-text { display: flex; gap: 10px; align-items: flex-start; }
.preview-banner-text .icon { margin-top: 2px; }
.preview-banner-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.preview-frame { background: var(--bg); border-radius: var(--radius); }
.admin-main .preview-frame { padding: 24px; border: 1px solid var(--border); }

/* ---------- Modals ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .5); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; }
.modal-backdrop.show { opacity: 1; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; transform: translateY(8px) scale(.98); transition: transform .18s; overflow: hidden; }
.modal-backdrop.show .modal { transform: none; }
.modal-sm { max-width: 440px; }
.modal-md { max-width: 640px; }
.modal-xl { max-width: 1120px; }
.modal-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.modal-head > div:first-child { flex: 1; min-width: 200px; }
.modal-title { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.modal-head, .modal-foot { flex: none; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.confirm { display: flex; gap: 16px; align-items: flex-start; }
.confirm .modal-title { margin-bottom: 6px; }
.confirm-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.confirm-icon.danger { background: #fee2e2; color: var(--danger); }
.preview-body { background: var(--bg); }
.preview-body .preview-frame { padding: 4px; }
.preview-body .detail-side { top: 0; }
.preview-card-pane { display: grid; place-items: center; padding: 24px 0; }
.preview-card-pane .card-preview { width: 100%; max-width: 360px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: grid; gap: 10px; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #0f172a; color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; min-width: 260px; max-width: 420px; transform: translateY(10px); opacity: 0; transition: transform .2s, opacity .2s; }
.toast.show { transform: none; opacity: 1; }
.toast .icon { color: #4ade80; }
.toast-error .icon { color: #f87171; }
.toast-info .icon { color: #93c5fd; }
.toast span { flex: 1; }
.toast-action { background: rgba(255,255,255,.12); border: 0; color: #fff; font-weight: 600; padding: 5px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.toast-action:hover { background: rgba(255,255,255,.22); }

/* ---------- Feedback reports ---------- */
.anon-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: var(--text-2); font-size: 12px; font-weight: 600; }
.anon-pill .icon { width: 12px; height: 12px; }
.survey-switch-2 { margin-top: 14px; }
.rpt-filters { padding: 14px 16px; margin-bottom: 16px; }
.rpt-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(0, 1.5fr)) repeat(2, minmax(0, 1fr)); gap: 10px; }
.rpt-field { display: grid; gap: 4px; min-width: 0; }
.rpt-field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.rpt-field .select, .rpt-field .input { width: 100%; min-width: 0; height: 34px; font-size: 13px; }
.rpt-filter-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; min-height: 20px; }
.stat-unit { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.rpt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.rpt-grid .panel + .panel { margin-top: 0; }
.chart-note { margin-top: 10px; }
.hbar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name value" "track track"; align-items: center; gap: 5px 12px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; }
.hbar-name { grid-area: name; }
.hbar-track { grid-area: track; }
.hbar-value { grid-area: value; }
.hbar-row:hover, .hbar-row:focus-visible { background: var(--surface-2); outline: none; }
.hbar-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; border-radius: 0 4px 4px 0; background: var(--chart-track); overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--chart-1); border-radius: 0 4px 4px 0; }
.hbar-value { font-size: 13px; text-align: right; white-space: nowrap; }
.col-chart { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: 160px auto; column-gap: 8px; }
.col-grid { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); text-align: right; line-height: 1; }
.col-plot { grid-row: 1; grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; align-items: end; border-bottom: 1px solid var(--border-strong); background: linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 50%; }
.col-slot { height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; border-radius: 4px 4px 0 0; }
.col-slot:hover, .col-slot:focus-visible { background: rgba(79, 70, 229, .06); }
.col-bar { width: 100%; max-width: 28px; background: var(--chart-1); border-radius: 4px 4px 0 0; }
.col-axis { grid-row: 2; grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; font-size: 11px; color: var(--muted); padding-top: 6px; }
.col-axis span { white-space: nowrap; overflow: visible; }
.table-panel { padding: 20px 0 0; }
.table-panel .panel-head { padding: 0 20px; }
.rpt-table-wrap { overflow-x: auto; position: relative; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rpt-table th { text-align: left; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); white-space: nowrap; }
.rpt-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.rpt-table tr:last-child td { border-bottom: 0; }
.rpt-table tbody tr:hover { background: var(--surface-2); }
.rpt-table th:first-child, .rpt-table td:first-child { padding-left: 20px; }
.rpt-table th:last-child, .rpt-table td:last-child { padding-right: 20px; }
.rpt-table .num { text-align: right; white-space: nowrap; }
.rpt-table .cell-demo { min-width: 200px; }
.rpt-table .row-title { white-space: normal; color: var(--text); }
.rpt-table tbody tr:hover .row-title { color: var(--primary); }
.rpt-demo-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.rpt-demo-thumb { width: 96px; height: 60px; border-radius: 8px; overflow: hidden; flex: none; border: 1px solid var(--border); }
.rpt-demo-main { flex: 1; min-width: 0; }
.rpt-demo-main h2 { font-size: 20px; }
.rq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rq-grid .panel + .panel { margin-top: 0; }
.rq-wide { grid-column: 1 / -1; }
.rq-card { display: grid; gap: 14px; }
.rq-head { display: flex; gap: 10px; align-items: flex-start; }
.rq-head .q-num { margin-top: 2px; }
.rq-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.rq-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.rq-stats > div { display: grid; gap: 0; }
.rq-big { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.dist-chart { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; align-items: end; }
.dist-col { display: grid; justify-items: center; gap: 4px; outline: none; border-radius: 6px; padding: 2px 0; cursor: default; }
.dist-col:hover, .dist-col:focus-visible { background: rgba(79, 70, 229, .06); }
.dist-n { font-size: 12px; font-weight: 600; min-height: 16px; }
.dist-track { height: 110px; width: 100%; max-width: 40px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border-strong); }
.dist-bar { width: 100%; background: var(--chart-1); border-radius: 4px 4px 0 0; }
.dist-v { font-size: 12px; color: var(--muted); }
.yn-bar { display: flex; gap: 2px; height: 28px; }
.yn-bar > span { display: flex; align-items: center; padding: 0 10px; color: #fff; font-size: 12px; font-weight: 700; outline: none; min-width: 6px; }
.yn-bar > span:first-child { border-radius: 4px 0 0 4px; }
.yn-bar > span:last-child { border-radius: 0 4px 4px 0; }
.yn-bar > span:only-child { border-radius: 4px; }
.yn-yes { background: var(--chart-yes); }
.yn-no { background: var(--chart-no); color: #1f1300 !important; justify-content: flex-end; }
.yn-legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.key-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.key-dot.yes { background: var(--chart-yes); }
.key-dot.no { background: var(--chart-no); }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.comment-list li { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: 6px; }
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.comment-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.comment-who { font-weight: 600; color: var(--text-2); overflow-wrap: anywhere; }
.rpt-tip { position: fixed; z-index: 80; max-width: 280px; padding: 6px 10px; border-radius: 6px; background: #0f172a; color: #fff; font-size: 12.5px; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow); }

/* ---------- Sliding scale (survey Scale questions) ---------- */
.slider { display: grid; gap: 6px; padding: 2px 4px 0; outline: none; border-radius: 10px; user-select: none; -webkit-user-select: none; }
.slider:focus-visible { box-shadow: 0 0 0 3px var(--primary-100); }
.slider-readout { min-height: 22px; font-size: 13.5px; }
.slider-readout strong { color: var(--primary-600); font-size: 15px; }
.slider-rail { position: relative; padding: 12px 12px 0; cursor: pointer; touch-action: none; }
.slider.is-static .slider-rail { cursor: default; }
.slider-track { position: relative; height: 6px; border-radius: 999px; background: #e2e8f0; }
.slider-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--primary); }
.slider-tick { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--surface); border: 2px solid #cbd5e1; }
.slider-tick.on { border-color: var(--primary); background: var(--primary); }
.slider-thumb { position: absolute; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: 0 2px 6px rgba(15,23,42,.25); display: none; cursor: grab; transition: transform .1s; }
.slider.has-value .slider-thumb { display: block; }
.slider.dragging .slider-thumb { cursor: grabbing; transform: scale(1.12); }
.slider:not(.is-static) .slider-rail:hover .slider-track { background: #d5dce6; }
.slider-nums { position: relative; height: 20px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.slider-nums span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.slider-nums span.on { color: var(--primary-600); font-weight: 700; }
.slider-ends { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--text-2); }
.slider-ends span:last-child { text-align: right; }

/* ---------- Protero.app splash page ---------- */
.splash-body { background: var(--surface); }
.sp-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.sp-header-inner { display: flex; align-items: center; height: 64px; }
.sp-hero { background: radial-gradient(1100px 420px at 0% -10%, #e0e7ff 0%, transparent 60%), radial-gradient(900px 420px at 100% 0%, #fae8ff 0%, transparent 55%), var(--surface); border-bottom: 1px solid var(--border); }
.sp-hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.sp-hero h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.03em; line-height: 1.08; overflow-wrap: anywhere; }
.sp-lead { font-size: 18px; color: var(--text-2); margin-top: 18px; max-width: 560px; overflow-wrap: anywhere; }
.sp-art { position: relative; height: 340px; }
.sp-art-card { position: absolute; left: 6%; top: 0; width: 64%; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 12px; transform: rotate(-3deg); }
.sp-art-thumb { position: relative; height: 130px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #a855f7); }
.sp-art-pill { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; }
.sp-art-lines { display: grid; gap: 7px; margin: 14px 4px; }
.sp-art-lines span { height: 9px; border-radius: 99px; background: #e2e8f0; }
.sp-art-lines span.short { width: 60%; }
.sp-art-btn { margin: 0 4px 4px; padding: 8px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
.sp-art-rating { position: absolute; right: 0; top: 46%; display: grid; gap: 4px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 12px; font-weight: 600; color: var(--text-2); transform: rotate(2deg); }
.sp-art-rating .star-static { width: 20px; height: 20px; }
.sp-art-qr { position: absolute; left: 30%; bottom: 0; width: 120px; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: rotate(4deg); }
.sp-features { padding-top: 64px; padding-bottom: 24px; }
.sp-features h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; text-align: center; margin-bottom: 32px; overflow-wrap: anywhere; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.sp-card { padding: 22px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); display: grid; gap: 8px; align-content: start; }
.sp-card-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.sp-card h3 { font-size: 16px; overflow-wrap: anywhere; }
.sp-card p { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.sp-closing { padding-top: 40px; padding-bottom: 56px; text-align: center; }
.sp-closing p { font-size: 18px; font-weight: 600; color: var(--text); max-width: 640px; margin: 0 auto; overflow-wrap: anywhere; }
.sp-footer { border-top: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 13px; }
.sp-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.sp-admin-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.sp-admin-link:hover { color: var(--primary); text-decoration: underline; }
.sp-admin-link .icon { width: 14px; height: 14px; }
/* Compact version for the admin live preview. */
.sp-compact { font-size: 11px; }
.sp-compact .container { padding: 0 12px; }
.sp-compact .sp-header-inner { height: 36px; }
.sp-compact .brand { font-size: 13px; }
.sp-compact .brand-mark svg { width: 20px; height: 20px; }
.sp-compact .sp-hero-inner { grid-template-columns: 1fr; padding-top: 16px; padding-bottom: 16px; gap: 0; }
.sp-compact .sp-hero h1 { font-size: 18px; }
.sp-compact .eyebrow { font-size: 10px; margin-bottom: 4px; }
.sp-compact .sp-lead { font-size: 11.5px; margin-top: 6px; }
.sp-compact .sp-features { padding-top: 14px; padding-bottom: 4px; }
.sp-compact .sp-features h2 { font-size: 13px; margin-bottom: 10px; }
.sp-compact .sp-grid { grid-template-columns: 1fr; gap: 6px; }
.sp-compact .sp-card { padding: 8px 10px; gap: 2px; border-radius: 8px; }
.sp-compact .sp-card-icon { display: none; }
.sp-compact .sp-card h3 { font-size: 12px; }
.sp-compact .sp-card p { font-size: 11px; }
.sp-compact .sp-closing { padding-top: 10px; padding-bottom: 12px; }
.sp-compact .sp-closing p { font-size: 12px; }
.sp-compact .sp-footer { font-size: 11px; }
.sp-compact .sp-footer-inner { padding-top: 8px; padding-bottom: 8px; }
.sp-compact .sp-admin-link { font-size: 11px; pointer-events: none; }
@media (max-width: 860px) {
  .sp-hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; gap: 28px; }
  .sp-art { height: 280px; max-width: 420px; }
}

/* Admin > Site */
.site-address { display: grid; gap: 12px; }
.slug-row { display: flex; align-items: center; gap: 0; max-width: 560px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.slug-row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.slug-prefix { padding: 0 4px 0 12px; color: var(--muted); white-space: nowrap; font-size: 14px; }
.slug-row .input { border: 0; box-shadow: none !important; padding-left: 0; min-width: 0; }
.slug-suffix { padding: 0 12px 0 0; color: var(--muted); }
.has-error .slug-row { border-color: var(--danger); }
.site-url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-url code { padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; overflow-wrap: anywhere; }
.site-prev { font-size: 13px; color: var(--text-2); }
.site-prev:empty { display: none; }
.site-section-title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 24px 0 12px; }
.site-section-title .icon { color: var(--muted); }
.site-address { margin-bottom: 4px; }
.site-prev code { font-size: 12.5px; }

/* ---------- Catalogues and roles ---------- */
.cat-switch { display: grid; gap: 6px; margin: 4px 4px 10px; }
.cat-switch .side-label { padding: 0 4px; margin: 0; }
.cat-switch .select { background-color: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
.cat-switch .select option { color: var(--text); }
.cat-switch.single .select { pointer-events: none; background-image: none; }
.side-site { display: contents; }
.acct-role { font-size: 12px; color: var(--primary-600); font-weight: 600; margin-top: 2px; }
.hint-block { display: block; }
.hint-block code { font-size: 12px; background: #f1f5f9; padding: 0 4px; border-radius: 4px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cat-member-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #f1f5f9; color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
a.cat-member-chip:hover { background: var(--primary-50); color: var(--primary-600); }
.cat-member-chip.is-admin { background: #dcfce7; color: #166534; }
.cat-member-chip.is-pending { background: var(--warn-50); color: var(--warn); }
.cat-member-chip .avatar.xs { width: 18px; height: 18px; font-size: 9px; }
.chip-x { display: inline-grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; opacity: .7; }
.chip-x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.chip-x .icon { width: 11px; height: 11px; }
.role-pill.is-demo { background: var(--primary-50); color: var(--primary-600); }
.all-users-table .cat-chips { max-width: 340px; }
.users-foot { padding: 12px 20px 16px; }
.vis-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #dcfce7; color: #166534; }
.vis-pill.private { background: #f1f5f9; color: var(--text-2); }
.vis-pill .icon { width: 12px; height: 12px; }
.cat-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.cat-admin-grid .panel + .panel { margin-top: 0; }
.cat-admin-card { display: grid; gap: 12px; align-content: start; }
.cat-admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cat-admin-head h2 { font-size: 17px; overflow-wrap: anywhere; }
.cat-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.cat-admin-stats dt { font-size: 11.5px; color: var(--muted); }
.cat-admin-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.cat-admin-admins { display: grid; gap: 6px; }
.cat-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--border); padding-top: 12px; }
.choice-group { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.choice-group legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; padding: 0; }
.option-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; background: var(--surface); }
.option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.option-card input { margin-top: 3px; accent-color: var(--primary); }
.option-card > span { display: grid; gap: 2px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.settings-grid .panel + .panel { margin-top: 0; }
.settings-side { display: grid; gap: 10px; position: sticky; top: 112px; }
@media (max-width: 1100px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } .settings-side { position: static; } }
.sp-catalogues { padding-top: 40px; }
.sp-catalogues h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; text-align: center; margin-bottom: 24px; }
.sp-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.sp-cat-card { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s, border-color .15s; }
.sp-cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary); }
.sp-cat-top { display: flex; justify-content: space-between; align-items: center; }
.sp-cat-card h3 { font-size: 16px; overflow-wrap: anywhere; }
.sp-cat-card p { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.sp-cat-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 13.5px; }
.sp-cat-link .icon { width: 15px; height: 15px; }

/* ---------- Accounts ---------- */
.account-slot { display: inline-flex; }
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; }
.acct-btn:hover { background: var(--surface-2); }
.acct-btn .icon { width: 14px; height: 14px; color: var(--muted); }
.acct-btn .avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; padding: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; }
.acct-menu[hidden] { display: none; }
.acct-who { display: grid; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: 13px; overflow-wrap: anywhere; }
.acct-menu button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 7px; background: none; text-align: left; cursor: pointer; font-size: 13.5px; }
.acct-menu button:hover, .acct-menu button:focus-visible { background: var(--surface-2); outline: none; }
.acct-menu .icon { width: 15px; height: 15px; color: var(--muted); }
.auth-tabs { display: flex; gap: 2px; padding: 3px; margin-bottom: 16px; border-radius: 10px; background: #e9edf3; }
.auth-tabs .seg-btn { flex: 1; justify-content: center; }
.auth-error { margin-bottom: 14px; background: var(--danger-50); color: #991b1b; border-color: #fecaca; }
.auth-error[hidden] { display: none; }
.access-panel { max-width: 520px; margin: 24px auto; text-align: center; display: grid; justify-items: center; gap: 10px; padding: 32px 24px; }
.access-panel h1 { font-size: 22px; }
.access-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.access-icon .icon { width: 24px; height: 24px; }
.access-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.side-foot-text { flex: 1; min-width: 0; }
.side-foot-text .side-foot-name, .side-foot-text .side-foot-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-signout { color: #94a3b8; flex: none; }
.side-signout:hover:not(:disabled) { background: rgba(255,255,255,.08); color: #fff; }
.users-head { padding-bottom: 14px; }
.users-head .search-input { max-width: 340px; margin: 0; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.user-cell .row-title { white-space: normal; }
.you-pill, .role-pill, .status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.you-pill { background: var(--primary-50); color: var(--primary-600); margin-left: 4px; }
.role-pill { background: #f1f5f9; color: var(--text-2); }
.role-pill.is-admin { background: #dcfce7; color: #166534; }
.role-pill .icon { width: 12px; height: 12px; }
.status-pill.on { background: #dcfce7; color: #166534; }
.status-pill.off { background: #f1f5f9; color: var(--muted); }
.status-pill.warn { background: var(--warn-50); color: var(--warn); }
.users-table tr.is-disabled td { opacity: .65; }
.user-actions { display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end; }
.users-empty { padding: 0 20px 20px; }
/* All users: Name, Access, Catalogues, Status, Last sign-in, Actions. Members: Name, Role, Added, Last sign-in, Actions. */
@media (max-width: 1100px) {
  .all-users-table th:nth-child(4), .all-users-table td:nth-child(4), .all-users-table th:nth-child(5), .all-users-table td:nth-child(5),
  .members-table th:nth-child(3), .members-table td:nth-child(3), .members-table th:nth-child(4), .members-table td:nth-child(4) { display: none; }
  .user-cell { min-width: 0; } .user-cell .row-sub { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 640px) { .all-users-table th:nth-child(3), .all-users-table td:nth-child(3), .users-table th:nth-child(2), .users-table td:nth-child(2) { display: none; } }
.temp-pw { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.temp-pw code { flex: 1; font-size: 18px; font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }

/* ---------- Open in mobile (QR code) ---------- */
.demo-card-actions .mobile-btn, .summary-actions .mobile-btn { width: 100%; }
.mobile-btn .icon { width: 15px; height: 15px; }
.mobile-qr-field { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.qr-body { display: grid; justify-items: center; gap: 14px; text-align: center; }
.qr-frame { width: min(280px, 100%); padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.qr-svg { display: block; width: 100%; height: auto; }
.qr-hint { display: flex; align-items: flex-start; gap: 8px; max-width: 320px; color: var(--text-2); font-size: 13.5px; text-align: left; }
.qr-hint .icon { width: 16px; height: 16px; margin-top: 2px; flex: none; color: var(--muted); }
.qr-url { display: flex; justify-content: center; width: 100%; }

/* ---------- Choose one / Select all that apply ---------- */
.choice-list { display: grid; gap: 8px; }
.choice { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark { flex: none; width: 18px; height: 18px; border: 2px solid #94a3b8; border-radius: 50%; background: var(--surface); display: grid; place-items: center; transition: all .12s; }
.is-multi .choice-mark { border-radius: 5px; }
.choice-label { overflow-wrap: anywhere; }
.choice:hover { border-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.choice input:checked + .choice-mark { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--surface); }
.is-multi .choice input:checked + .choice-mark { box-shadow: none; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.choice input:focus-visible + .choice-mark { outline: 2px solid var(--primary); outline-offset: 2px; }
.choice:has(input:disabled) { cursor: default; }
.choice:has(input:disabled):hover { border-color: var(--border-strong); }
.choice-hint { margin-top: 6px; }

/* ---------- Star ratings ---------- */
.stars { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; --star: 34px; }
.stars.stars-10 { --star: 28px; gap: 2px; }
.star { position: relative; display: grid; place-items: center; width: var(--star); height: var(--star); cursor: pointer; color: #cbd5e1; transition: color .1s, transform .1s; }
.star input { position: absolute; opacity: 0; pointer-events: none; }
.star svg { width: 100%; height: 100%; fill: currentColor; }
/* Lit: the chosen star and every star before it. While hovering, the hovered star and those before it. */
.star:has(input:checked), .star:has(~ .star input:checked) { color: #f59e0b; }
.stars:not(.is-static):hover .star { color: #cbd5e1; }
.stars:not(.is-static) .star:hover, .stars:not(.is-static) .star:has(~ .star:hover) { color: #fbbf24; }
.stars:not(.is-static) .star:hover { transform: scale(1.1); }
.star:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: 6px; }
.stars.is-static .star { cursor: default; }
.stars-readout { margin-left: 8px; font-size: 13px; color: var(--muted); }
.star-row { display: inline-flex; gap: 1px; vertical-align: middle; }
.star-static { width: 16px; height: 16px; color: #cbd5e1; }
.star-static svg { width: 100%; height: 100%; fill: currentColor; }
.star-static.on { color: #f59e0b; }
.rq-stars { display: inline-block; vertical-align: 3px; margin-left: 4px; }
.answer-stars { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.answer-choices { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.answer-choice { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--primary-50); color: var(--primary-600); font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }

/* Editor: option list */
.opt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.opt-row { display: flex; align-items: center; gap: 6px; }
.opt-row .input { flex: 1; min-width: 0; }
.opt-mark { flex: none; width: 16px; height: 16px; border: 2px solid #94a3b8; border-radius: 50%; }
.opt-mark.is-multi { border-radius: 4px; }
.opt-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.has-error .opt-list .input:placeholder-shown { border-color: var(--danger); }

/* ---------- Catalogue text (admin) ---------- */
.text-field .field-foot .hint { flex: 1; display: block; }
.text-field code { font-size: 12px; background: #f1f5f9; padding: 0 4px; border-radius: 4px; }
.text-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin-bottom: 16px; border-radius: 10px; background: #e9edf3; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 0; border-radius: 8px; background: none; font-weight: 500; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.seg-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.tab-changed { font-size: 11.5px; font-weight: 600; color: var(--warn); }
.tab-changed:empty { display: none; }
.text-main { display: grid; gap: 16px; align-content: start; }
.text-main > .panel { margin: 0; }
.text-main > .panel[hidden] { display: none; }
.tp-back { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-2); margin-bottom: 8px; }
.tp-back .icon, .tp-pill .icon, .tp-btn .icon { width: 12px; height: 12px; }
.tp-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; font-size: 10.5px; font-weight: 600; margin-bottom: 6px; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tp-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; }
.tp-btn.fb { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.tp-btn.sm { padding: 2px 6px; font-size: 10.5px; flex: none; }
.tp-section { display: grid; gap: 5px; margin: 8px 10px 0; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
.tp-section:last-child { margin-bottom: 10px; }
.tp-invite { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--primary-50); font-size: 11px; }
.tp-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 11px; }
.tp-dl dt { color: var(--muted); }
.tp-dl dd { margin: 0; color: var(--border-strong); }
.reset-head { flex-wrap: wrap; margin-bottom: 0; }
.reset-head .panel-title { margin-bottom: 4px; }
.char-count { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.text-default { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12.5px; }
.text-default:empty { display: none; }
.text-default .muted { overflow-wrap: anywhere; }
.text-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); margin-bottom: 12px; font-size: 12px; }
.tp-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tp-header .brand { font-size: 13px; gap: 6px; min-width: 0; }
.tp-header .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-header .brand-mark svg { width: 20px; height: 20px; }
.tp-nav { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 11px; flex: none; }
.tp-admin { border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 6px; }
.tp-hero { padding: 14px 12px; background: radial-gradient(400px 160px at 10% -10%, #e0e7ff 0%, transparent 60%), var(--surface); border-bottom: 1px solid var(--border); }
.tp-hero .eyebrow { font-size: 10px; margin-bottom: 4px; overflow-wrap: anywhere; }
.tp-title { font-size: 16px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tp-lead { color: var(--text-2); margin-top: 6px; overflow-wrap: anywhere; }
.tp-search { display: flex; align-items: center; gap: 6px; margin-top: 10px; height: 28px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--muted); overflow: hidden; white-space: nowrap; }
.tp-search .icon { width: 13px; height: 13px; }
.tp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px 0; }
.tp-chips:last-child { padding-bottom: 10px; }
.tp-chip { border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 8px; background: var(--surface); font-size: 11px; }
.tp-chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.tp-label { font-size: 11px; font-weight: 600; color: var(--text-2); }
.tp-footer { margin-top: 10px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .table-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 112px 100px 176px; gap: 10px; }
  .row-actions { gap: 0; }
  .table-row > :nth-child(5), .table-row > :nth-child(6) { display: none; }
}
@media (max-width: 1100px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .side-sticky { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
  .side-sticky .panel + .panel { margin-top: 0; }
  .card-preview { max-width: 380px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpt-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rpt-table:not(.users-table) th:nth-child(6), .rpt-table:not(.users-table) td:nth-child(6), .rpt-table:not(.users-table) th:nth-child(2), .rpt-table:not(.users-table) td:nth-child(2) { display: none; }
}
@media (max-width: 860px) {
  .rpt-grid, .rq-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15,23,42,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .admin-body { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .topbar .brand { font-size: 16px; }
  .topbar .brand-mark svg { width: 26px; height: 26px; }
  .topbar-add { margin-left: auto; }
  .admin-main { padding: 20px 16px 48px; }
  .editor-head { top: 56px; margin: -20px -16px 16px; padding: 14px 16px 12px; }
  .dash-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-side { position: static; order: -1; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 1fr auto; grid-template-areas: "demo demo" "status actions"; gap: 10px 12px; padding: 14px; }
  .table-row > .cell-demo { grid-area: demo; }
  .table-row > :nth-child(2) { grid-area: status; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .table-row > :nth-child(3), .table-row > :nth-child(4) { display: none; }
  .table-row > .row-actions { grid-area: actions; }
  .cat-table .table-row { grid-template-columns: 1fr auto; grid-template-areas: "demo demo" "status actions"; }
  .cat-table .table-row > .cell-cat { grid-area: demo; }
  .cat-table .table-row > :nth-child(3) { display: none; }
  .cat-table .table-row > .row-actions { display: flex; }
  .resp-grid { grid-template-columns: minmax(0, 1fr); }
  .resp-list { max-height: 320px; }
  .stats.stats-3 { grid-template-columns: minmax(0, 1fr); }
  .fb-table .table-row > :nth-child(3) { display: none; }
  .fb-table .table-row > .row-actions { display: flex; }
  .fb-table .table-row > :nth-child(2) { grid-area: status; display: block; }
  .status-table .table-row { grid-template-columns: auto 1fr auto; grid-template-areas: "order demo demo" "order status actions"; }
  .status-table .table-row > .order-cell { grid-area: order; flex-direction: column; display: flex; }
  .status-table .table-row > .cell-status { grid-area: demo; }
  .status-table .table-row > :nth-child(3) { grid-area: status; display: block; }
  .status-table .table-row > :nth-child(4) { display: none; }
  .status-table .table-row > .row-actions { grid-area: actions; display: flex; }
}
@media (max-width: 640px) {
  .scale-input.scale-wide { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 10px; }
  .fb-progress .fb-bar { display: none; }
  .category-banner { flex-wrap: wrap; }
  .category-banner .btn { width: 100%; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  h1 { font-size: 22px; }
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 28px; }
  .pub-nav-link { display: none; }
  .stats { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 26px; }
  .page-head .btn-lg { width: 100%; }
  .page-head > .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .status-row { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .select-wrap .select { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .chip { flex: none; }
  .toolbar-filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-filters .select { min-width: 0; width: 100%; }
  .card-grid { grid-template-columns: 1fr; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .dirty-flag { display: none; }
  .panel { padding: 16px; }
  .q-edit-head { flex-wrap: wrap; }
  .recent-side { display: none; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 92vh; max-height: 92dvh; border-radius: 14px 14px 0 0; }
  .modal-body { padding: 16px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .toast { min-width: 0; max-width: none; }
  .scale-btn { height: 34px; }
  .admin-main .preview-frame { padding: 12px; }
  .topbar-add span { display: none; }
  .rpt-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpt-field-wide { grid-column: 1 / -1; }
  .rpt-demo-head { flex-wrap: wrap; }
  .rpt-demo-thumb { width: 72px; height: 45px; }
  .rpt-table:not(.users-table) th:nth-child(2), .rpt-table:not(.users-table) td:nth-child(2), .rpt-table:not(.users-table) th:nth-child(6), .rpt-table:not(.users-table) td:nth-child(6) { display: none; }
}
