/* Zolensa app styles. Brand tokens from brand/BRAND.md. */
:root {
  /* Design system 2 (Oct 2026). Brand violet for actions, coral only for live and recording. */
  --violet: #6D4AFF;
  --violet-dark: #5233E6;
  --violet-ink: #4128B8;
  --coral: #EC4C55;
  --navy: #17152E;
  --ink: #17152E;
  --ink-2: #4C4964;
  --ink-3: #77748E;
  --lilac: #F0EDFF;
  --line: #E2E0EB;
  --line-2: #EDEBF3;
  --bg: #F4F3F8;
  --white: #FFFFFF;
  --sidebar: #17152E;
  --ok: #0E7A4C;
  --ok-bg: #E5F4EC;
  --warn: #9A5600;
  --warn-bg: #FFF3DC;
  --error: #BE2F36;
  --error-bg: #FCEBEC;
  --info-bg: #EFEDFF;
  --grad: linear-gradient(135deg, #6D4AFF 0%, #FF5E62 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: none;
  --shadow-pop: 0 2px 4px rgba(23, 21, 46, .06), 0 16px 40px -12px rgba(23, 21, 46, .22);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: Sora, "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 15px; }
img { max-width: 100%; display: block; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.01em; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.center { text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--font);
  padding: 12px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--violet); color: var(--white); }
.btn-primary:hover { background: var(--violet-dark); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }
.btn-block { width: 100%; }
.btn:focus-visible, input:focus-visible, .linklike:focus-visible, a:focus-visible { outline: 3px solid rgba(109, 74, 255, .35); outline-offset: 2px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--violet); cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* Forms */
.form { display: grid; gap: 16px; margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input { font: 400 15px var(--font); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); }
.field input:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 4px rgba(109, 74, 255, .12); }
.code-input { font: 600 22px/1 var(--font-head) !important; letter-spacing: .3em; text-align: center; }

/* Alerts */
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-top: 16px; }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-info { background: var(--info-bg); color: var(--violet-dark); }

/* Sign-in screens */
.auth-body { background: var(--white); }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-brand { position: relative; overflow: hidden; background: var(--grad); color: var(--white); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; bottom: -200px; background: rgba(255, 255, 255, .10); }
.auth-logo { width: 168px; height: auto; position: relative; z-index: 1; }
.auth-pitch { position: relative; z-index: 1; max-width: 440px; }
.auth-pitch h1 { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; }
.auth-pitch p { margin-top: 16px; font-size: 17px; opacity: .92; }
.auth-pitch ul { list-style: none; margin-top: 28px; display: grid; gap: 12px; }
.auth-pitch li { padding-left: 30px; position: relative; font-size: 15px; }
.auth-pitch li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .25); box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .9); }
.auth-by { position: relative; z-index: 1; font-size: 13px; opacity: .85; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-logo-small { display: none; width: 150px; height: auto; margin-bottom: 28px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 28px; }
.auth-card > .muted { margin-top: 8px; }
.auth-card > .small { margin-top: 20px; }
.auth-foot { margin-top: 40px; font-size: 12px; color: var(--ink-3); }

.steps { margin: 20px 0 0 20px; display: grid; gap: 14px; color: var(--ink-2); font-size: 14px; }
.steps strong { color: var(--ink); }
.qr-wrap { display: flex; gap: 16px; align-items: center; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.qr { width: 132px; height: 132px; flex: none; background: var(--white); padding: 8px; border-radius: 8px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-manual { display: grid; gap: 6px; min-width: 0; }
.secret { font: 600 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); word-break: break-all; }

/* App shell */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 32px; }
.topbar-logo img { width: 122px; height: auto; }
.topnav { display: flex; gap: 6px; flex: 1; }
.topnav a, .topnav span { padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.topnav a:hover { background: var(--lilac); text-decoration: none; color: var(--ink); }
.topnav .is-active { background: var(--lilac); color: var(--violet-dark); }
.topnav .is-soon { color: var(--ink-3); cursor: default; }
.usermenu { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.usermenu form { display: inline; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: var(--white); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.usermenu-name { font-weight: 600; }
.page { max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px; display: grid; gap: 20px; }
.page > .alert { margin-top: 0; }
.page-head h1 { font-size: 28px; }
.page-head p { margin-top: 6px; }
.appfoot { max-width: 1200px; margin: 0 auto; padding: 0 24px 32px; font-size: 12px; color: var(--ink-3); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card.narrow { max-width: 480px; }
.card-title { font-size: 17px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.org-list { list-style: none; display: grid; gap: 10px; }
.org-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.org-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--lilac); color: var(--violet-dark); display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); }
.org-name { font-weight: 600; flex: 1; min-width: 120px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--lilac); color: var(--violet-dark); }
.pill-quiet { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }

.facts { display: grid; gap: 10px; margin-bottom: 18px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.facts dt { color: var(--ink-2); }
.facts dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }

.roadmap { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.roadmap li { counter-increment: step; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.roadmap li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.roadmap li strong { color: var(--ink); font-size: 14px; }
.roadmap li.done { border-color: rgba(109, 74, 255, .35); background: var(--lilac); }
.roadmap li.done::before { content: "\2713"; background: var(--violet); color: var(--white); border-color: var(--violet); }

/* Error pages */
.plain-body { background: var(--bg); }
.plain { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 24px; padding: 24px; }
.plain-logo { width: 140px; height: auto; }
.plain-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; max-width: 440px; text-align: center; display: grid; gap: 12px; justify-items: center; box-shadow: var(--shadow); }

@media (max-width: 960px) {
  .roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-logo-small { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .topbar-logo img { width: 92px; }
  .topnav { gap: 2px; }
  .topnav a { padding: 6px 8px; }
  .usermenu { margin-left: auto; gap: 10px; }
  .usermenu-name { display: none; }
  .page { padding: 24px 16px 40px; }
  .appfoot { padding: 0 16px 24px; }
  .card { padding: 18px; }
  .roadmap { grid-template-columns: 1fr; }
  .qr-wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Milestone 2.1: studies ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.nowrap { white-space: nowrap; }
.opt { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.btn-small { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: var(--white); color: var(--error); border-color: #F3C3CA; }
.btn-danger:hover { background: var(--error-bg); }

.orgswitch select, .field select { font: 500 14px var(--font); padding: 8px 32px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234A4868' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; color: var(--ink); max-width: 240px; }
.field select { font-size: 15px; padding: 11px 36px 11px 14px; max-width: 100%; }
.orgname { font-size: 14px; color: var(--ink-2); font-weight: 500; padding: 6px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }

.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 .status { vertical-align: middle; margin-left: 8px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-2); }

.card-flush { padding: 0; overflow-x: auto; }
.card-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.card-head .card-title { margin-bottom: 4px; }

.empty { text-align: center; display: grid; justify-items: center; gap: 12px; padding: 48px 24px; }
.empty h2 { font-size: 22px; }
.empty p { max-width: 460px; }
.empty-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); box-shadow: inset 0 0 0 14px rgba(255, 255, 255, .55); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FBFAFF; }
.row-link { font-weight: 600; color: var(--ink); }

.status { display: inline-block; font: 600 12px/1 var(--font); padding: 5px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.status-draft { background: #FFF6E5; color: #92400E; border-color: #F8E1B4; }
.status-live { background: var(--ok-bg); color: var(--ok); border-color: #BFE6D3; }
.status-paused { background: #EEF0FF; color: var(--violet-dark); border-color: #D8D2FF; }
.status-closed, .status-archived { background: var(--bg); color: var(--ink-2); }

.form-wide { display: grid; gap: 8px; }
.form-section { border: 0; padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.form-section:first-of-type { padding-top: 0; }
.form-section legend { font: 600 16px var(--font-head); color: var(--ink); padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-inline { max-width: 420px; }
.field input[type=number] { max-width: 160px; }
.field.has-error input, .field.has-error select { border-color: var(--error); }
.field-error { color: var(--error); font-size: 13px; }
.form-section.has-error .chips-check { outline: 1px solid var(--error); outline-offset: 6px; border-radius: 10px; }
.form-actions { display: flex; gap: 12px; padding-top: 12px; flex-wrap: wrap; }

.chips-check { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--white); transition: background .12s, border-color .12s; }
.chip-check em { font-style: normal; color: var(--ink-3); margin-left: 4px; }
.chip-check input:checked + span { background: var(--lilac); border-color: var(--violet); color: var(--violet-dark); }
.chip-check input:checked + span::before { content: "\2713  "; }
.chip-check input:focus-visible + span { outline: 3px solid rgba(109, 74, 255, .35); outline-offset: 2px; }

.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.radio-card { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; align-items: flex-start; }
.radio-card input { margin-top: 3px; accent-color: var(--violet); }
.radio-card span { display: grid; gap: 4px; font-size: 14px; }
.radio-card em { font-style: normal; color: var(--ink-2); font-size: 13px; }
.radio-card:has(input:checked) { border-color: var(--violet); background: #FBFAFF; }

.study-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; }
.checklist { list-style: none; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.checklist li strong { color: var(--ink); font-size: 14px; grid-column: 2; }
.checklist li span { grid-column: 2; }
.checklist li::before { content: ""; grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); align-self: center; }
.checklist li.done { background: var(--lilac); border-color: rgba(109, 74, 255, .3); }
.checklist li.done::before { content: "\2713"; background: var(--violet); border-color: var(--violet); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.checklist li.optional::before { border-style: dashed; }
.checklist li.soon { opacity: .6; }

.group-list { list-style: none; display: grid; gap: 10px; margin-bottom: 16px; }
.group-list li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.group-main { display: grid; gap: 2px; }
.group-edit summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--violet); list-style: none; }
.group-edit summary::-webkit-details-marker { display: none; }
.group-edit[open] { flex-basis: 100%; display: grid; gap: 10px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form input[type=text] { font: 400 14px var(--font); padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 200px; flex: 1; }
.inline-form input[type=text]:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 4px rgba(109, 74, 255, .12); }
.add-group { padding-top: 14px; border-top: 1px dashed var(--line); }

.roadmap li.current { border-color: var(--coral); background: #FFF5F5; }
.roadmap li.current::before { background: var(--coral); color: #fff; border-color: var(--coral); }

@media (max-width: 860px) {
  .study-layout, .form-grid, .form-grid-3, .radio-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 8px; }
  .orgswitch { order: 3; flex-basis: 100%; }
  .orgswitch select { max-width: 100%; width: 100%; }
  .orgname { display: none; }
  .usermenu a[href="/account/password"] { display: none; }
  .table:not(.pt-table):not(.ag-table):not(.pl-table):not(.tm-table):not(.dl-table):not(.rq-table):not(.us-table) th:nth-child(3), .table:not(.pt-table):not(.ag-table):not(.pl-table):not(.tm-table):not(.dl-table):not(.rq-table):not(.us-table) td:nth-child(3), .table:not(.pt-table):not(.ag-table):not(.pl-table):not(.tm-table):not(.dl-table):not(.rq-table):not(.us-table) th:nth-child(5), .table:not(.pt-table):not(.ag-table):not(.pl-table):not(.tm-table):not(.dl-table):not(.rq-table):not(.us-table) td:nth-child(5), .table:not(.pt-table):not(.ag-table):not(.pl-table):not(.tm-table):not(.dl-table):not(.rq-table):not(.us-table) th:nth-child(6), .table:not(.pt-table):not(.ag-table):not(.pl-table):not(.tm-table):not(.dl-table):not(.rq-table):not(.us-table) td:nth-child(6) { display: none; }
}

/* ---------- Milestone 2.2: consent ---------- */
.field textarea { font: 400 15px/1.5 var(--font); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); resize: vertical; width: 100%; }
.field textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 4px rgba(109, 74, 255, .12); }
.hint { font-style: normal; font-size: 12px; color: var(--ink-3); }
.req { font-style: normal; font-weight: 600; color: var(--coral); margin-left: 4px; font-size: 12px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.check input, .table input[type=checkbox] { accent-color: var(--violet); width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.notice-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: var(--ok-bg); border: 1px solid #BFE6D3; }
.notice-bar > div { display: grid; gap: 2px; font-size: 14px; }
.table-compact th, .table-compact td { padding: 10px 12px; }
.table-compact td:not(:first-child), .table-compact th:not(:first-child) { width: 90px; text-align: center; }
.card .table-compact { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; border-collapse: separate; border-spacing: 0; }

.lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-tabs a { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.lang-tabs a:hover { text-decoration: none; border-color: var(--violet); }
.lang-tabs a.is-active { background: var(--lilac); border-color: var(--violet); color: var(--violet-dark); }
.lang-tabs .tick { color: var(--ok); font-weight: 700; }
.lang-tabs .miss { font-size: 11px; font-weight: 600; color: #92400E; background: #FFF6E5; padding: 2px 6px; border-radius: 999px; }

.consent-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.consent-main { display: grid; gap: 20px; min-width: 0; }
.consent-main .form { margin-top: 12px; }
.custom-list { display: grid; gap: 8px; margin-top: 14px; }
.custom-list .inline-form { justify-content: space-between; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.add-custom { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.missing-list { margin: 8px 0 16px 18px; font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }

.consent-preview { position: sticky; top: 84px; }
.preview-label { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.phone-frame { background: var(--navy); border-radius: 36px; padding: 10px; box-shadow: 0 24px 48px -20px rgba(20, 18, 58, .35); }
.phone-screen { background: #FAF9FF; border-radius: 28px; padding: 22px 18px; max-height: 760px; overflow-y: auto; font-size: 13px; color: var(--ink); display: grid; gap: 10px; align-content: start; }
.phone-screen h3 { font-size: 18px; }
.phone-screen p { color: var(--ink-2); }
.phone-screen .placeholder { color: var(--ink-3); font-style: italic; }
.pv-items { display: grid; gap: 8px; margin-top: 6px; }
.pv-item { display: grid; grid-template-columns: 20px 1fr; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.pv-box { width: 18px; height: 18px; border: 2px solid var(--violet); border-radius: 5px; margin-top: 1px; }
.pv-opt { font-style: normal; color: var(--ink-3); }
.pv-sign { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink-3); background: var(--white); }
.pv-btn { background: var(--violet); color: #fff; text-align: center; padding: 12px; border-radius: 12px; font-weight: 600; }

.checklist li a { color: inherit; }
.checklist li.todo::before { border-color: var(--violet); }
.checklist li.started { border-color: #F8E1B4; background: #FFFBF2; }
.checklist li.started::before { border-color: #E0A93B; border-style: solid; background: conic-gradient(#E0A93B 0 50%, transparent 50% 100%); }

@media (max-width: 1080px) {
  .consent-layout { grid-template-columns: minmax(0, 1fr); }
  .consent-preview { position: static; max-width: 380px; }
}

/* ---------- Milestone 2.3: tasks ---------- */
.warn-text { color: var(--warn); font-weight: 500; }
.placeholder { color: var(--ink-3); font-style: italic; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover:not([disabled]) { border-color: var(--violet); color: var(--violet); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.alert-error-flash { background: var(--error-bg); color: var(--error); }

.day-block { display: grid; gap: 10px; }
.day-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); display: flex; align-items: center; gap: 12px; }
.day-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-title span { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--violet-dark); }
.task-cards { display: grid; gap: 10px; }
.task-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; box-shadow: var(--shadow); flex-wrap: wrap; }
.task-card-main { display: grid; gap: 6px; min-width: 0; flex: 1; }
.task-title { font: 600 16px var(--font-head); color: var(--ink); }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.task-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.confirm { position: relative; }
.confirm summary { list-style: none; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm[open] .confirm-box { display: flex; }
.confirm-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); gap: 10px; align-items: center; white-space: nowrap; }
.q-card .confirm-box { position: static; margin-top: 10px; display: flex; }
.repeat-row { display: grid; gap: 12px; }

.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.builder-main { display: grid; gap: 14px; min-width: 0; }
.empty-small { padding: 28px 20px; }
.instructions-card p { color: var(--ink-2); }
.q-card { padding: 18px 20px; }
.q-head { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; }
.q-num { width: 28px; height: 28px; border-radius: 50%; background: var(--lilac); color: var(--violet-dark); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.q-tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.q-prompt { font-weight: 600; margin-top: 6px; }
.q-actions { display: flex; gap: 6px; }
.cond-note { font-size: 12px; color: var(--violet-dark); background: var(--lilac); display: inline-block; padding: 3px 8px; border-radius: 6px; margin-top: 6px; }
.q-edit { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.q-edit > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--violet); list-style: none; }
.q-edit > summary::-webkit-details-marker { display: none; }
.q-edit[open] > summary { margin-bottom: 4px; }
.gallery-check { align-self: end; padding-bottom: 12px; }
.options-edit { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.field-label { font-size: 13px; font-weight: 600; }
.option-row { display: flex; gap: 10px; align-items: center; }
.option-row input[type=text] { flex: 1; font: 400 14px var(--font); padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.field input[type=text] { font: 400 15px var(--font); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }

.type-pill { display: inline-block; font: 600 12px/1 var(--font); padding: 5px 9px; border-radius: 6px; background: var(--lilac); color: var(--violet-dark); }
.type-video { background: #FFE9EA; color: #B42332; }
.type-photo { background: #FFF1E0; color: #A3550A; }
.type-audio { background: #E8F7F0; color: #0F7650; }
.type-text { background: #EEF0FF; color: #4130C9; }
.type-single, .type-multi { background: #F3EAFF; color: #7A2FC7; }
.type-rating { background: #E6F4FF; color: #0B5FA5; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.type-btn { display: grid; gap: 6px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; font: inherit; }
.type-btn:hover { border-color: var(--violet); background: #FBFAFF; }

.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.preview-head .preview-label { margin: 0; }
.mini-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-tabs a { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-2); background: var(--white); }
.mini-tabs a.is-active { background: var(--violet); color: #fff; border-color: var(--violet); }
.pv-task { gap: 12px; }
.pv-day { font-size: 11px; font-weight: 700; color: var(--violet-dark); text-transform: uppercase; letter-spacing: .06em; }
.pv-q { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.pv-prompt { font-weight: 600; color: var(--ink) !important; }
.pv-help, .pv-alt { font-size: 12px; color: var(--ink-3) !important; }
.pv-cond { font-size: 11px; color: var(--violet-dark) !important; }
.pv-missing { font-size: 10px; font-weight: 700; color: #92400E; background: #FFF6E5; padding: 1px 5px; border-radius: 4px; font-style: normal; }
.pv-capture { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: #F3F0FF; font-weight: 600; font-size: 12px; color: var(--violet-dark); }
.pv-rec { width: 26px; height: 26px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--coral); flex: none; }
.pv-mic { width: 26px; height: 26px; border-radius: 50%; background: var(--violet); flex: none; position: relative; }
.pv-mic::after { content: ""; position: absolute; left: 9px; top: 5px; width: 8px; height: 12px; border-radius: 4px; background: #fff; }
.pv-photos { display: flex; gap: 8px; }
.pv-ph { width: 54px; height: 54px; border: 2px dashed #CBC3FF; border-radius: 10px; display: grid; place-items: center; color: var(--violet); font-size: 20px; }
.pv-text { border: 1px solid var(--line); border-radius: 10px; padding: 10px; height: 64px; color: var(--ink-3); }
.pv-opts { display: grid; gap: 6px; }
.pv-opt-row { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.pv-radio, .pv-check { width: 16px; height: 16px; border: 2px solid var(--violet); flex: none; }
.pv-radio { border-radius: 50%; }
.pv-check { border-radius: 4px; }
.pv-scale { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; }
.pv-scale span { text-align: center; border: 1px solid var(--line); border-radius: 6px; padding: 6px 0; font-size: 11px; font-weight: 600; }
.pv-scale-ends { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-3); }

@media (max-width: 1080px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder-preview { position: static; max-width: 380px; }
}
@media (max-width: 600px) {
  .q-head { grid-template-columns: 28px 1fr; }
  .q-actions { grid-column: 2; }
  .confirm-box { position: static; margin-top: 8px; white-space: normal; flex-wrap: wrap; }
  .task-actions { width: 100%; }
}

.field select { width: 100%; }
.field-inline select, .orgswitch select { width: auto; }
.page, .builder-main, .consent-main { grid-template-columns: minmax(0, 1fr); }
.field select, .field input, .field textarea { min-width: 0; max-width: 100%; }
.field, .form, .options-edit, .add-custom { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) {
  .study-layout, .form-grid, .form-grid-3, .radio-cards { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Milestone 2.4: translations ---------- */
.tr-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; }
.tr-tools .card-title { margin-bottom: 8px; }
.tr-tools p { margin-bottom: 12px; }
.tr-tools input[type=file] { font-size: 13px; max-width: 240px; }
.tr-form { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tr-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tr-bar-bottom { justify-content: flex-end; }
.tr-task { font: 600 15px var(--font-head); padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.tr-table { table-layout: fixed; }
.tr-table th.tr-what, .tr-table td.tr-what { width: 150px; }
.tr-table td { vertical-align: top; }
.tr-src { color: var(--ink-2); font-size: 14px; }
.tr-dst input, .tr-dst textarea { width: 100%; font: 400 14px/1.45 var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); resize: vertical; }
.tr-dst input:focus, .tr-dst textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.tr-table tr.is-missing td.tr-dst input, .tr-table tr.is-missing td.tr-dst textarea { border-color: #F2C879; background: #FFFCF5; }
@media (max-width: 860px) {
  .tr-tools { grid-template-columns: minmax(0, 1fr); }
  .tr-table, .tr-table tbody, .tr-table tr, .tr-table td { display: block; width: 100%; }
  .tr-table thead { display: none; }
  .tr-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .tr-table td { border: 0; padding: 4px 16px; }
  .tr-table th.tr-what, .tr-table td.tr-what { width: auto; }
}

/* ---------- Milestone 3.1: participants, email settings, participant pages ---------- */
.strong { font-weight: 600; }
label.check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
label.check input { accent-color: var(--violet); width: 16px; height: 16px; }
.pt-tabs { margin-bottom: 14px; }
.pt-tabs .count { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--bg); padding: 2px 7px; border-radius: 999px; }
.pt-tabs a.is-active .count { background: #fff; color: var(--violet-dark); }
.pt-filter { margin-bottom: 16px; }
.pt-filter select { font: 400 14px var(--font); padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); max-width: 100%; }
.pt-inviteall { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; background: var(--lilac); border-color: #D8D2FF; }
.pt-inviteall div { display: grid; gap: 2px; }
.pt-table td { vertical-align: middle; }
.pt-check { width: 44px; }
.pt-check input { width: 16px; height: 16px; accent-color: var(--violet); }
.pt-code { font: 600 14px var(--font-head); }
.pt-contact { word-break: break-all; }
.pt-status-added { background: var(--bg); color: var(--ink-2); }
.pt-status-invited { background: #EEF0FF; color: var(--violet-dark); border-color: #D8D2FF; }
.pt-status-consented, .pt-status-active { background: var(--ok-bg); color: var(--ok); border-color: #BFE6D3; }
.pt-status-completed { background: #E8F3FF; color: #1D4F91; border-color: #C7DDF7; }
.pt-status-withdrawn { background: var(--error-bg); color: var(--error); border-color: #F3C3CA; }
.pt-mail-sent { background: var(--ok-bg); color: var(--ok); border-color: #BFE6D3; }
.pt-mail-failed { background: var(--error-bg); color: var(--error); border-color: #F3C3CA; }
.pt-mail-queued, .pt-mail-sending { background: #FFF6E5; color: #92400E; border-color: #F8E1B4; }
.pt-bulkbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pt-bulkbar select { font: 400 14px var(--font); padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); max-width: 100%; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 16px 0; }
.pt-add { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-top: 24px; align-items: start; }
.pt-add .card-title { margin-bottom: 8px; }
.pt-add .form { margin-top: 8px; }
.pt-cols { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.pt-cols code { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.pt-add input[type=file] { font-size: 13px; max-width: 100%; }
.pt-sub { font: 600 14px var(--font-head); margin: 20px 0 8px; }
.pt-mails { list-style: none; display: grid; gap: 8px; }
.pt-mails li { display: grid; gap: 4px; justify-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.set-now p { margin-bottom: 6px; }
.set-now form { margin-top: 10px; }
.set-driver[hidden], [data-show-when][hidden] { display: none; }
.set-note { margin-top: 4px; }
.set-loghead { padding: 20px 20px 8px; }
.set-empty { padding: 0 20px 20px; }
@media (max-width: 860px) {
  .pt-add { grid-template-columns: minmax(0, 1fr); }
  .pt-table, .pt-table tbody, .pt-table tr, .pt-table td { display: block; width: 100%; }
  .pt-table thead { display: none; }
  .pt-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; position: relative; }
  .pt-table td { border: 0; padding: 3px 16px; }
  .pt-table td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 84px; font-size: 12px; color: var(--ink-3); }
  .pt-table td.pt-check { position: absolute; right: 4px; top: 10px; width: auto; }
}

/* Participant-facing pages (phone first) */
.pp-body { background: var(--lilac); min-height: 100vh; }
.pp { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.pp-app { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.pp-logo { width: 140px; height: auto; justify-self: center; margin: 8px 0; }
.pp-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pp-top-mark { width: 28px; height: 28px; }
.pp-top-study { font: 600 15px var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.pp-nav a { display: grid; justify-items: center; gap: 2px; padding: 10px 0 12px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.pp-nav a:hover { text-decoration: none; }
.pp-nav a.is-active { color: var(--violet); }
.pp-ico { width: 22px; height: 22px; border-radius: 6px; border: 2px solid currentColor; }
.pp-ico-help { border-radius: 50%; }
.pp-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 22px 20px; display: grid; gap: 12px; }
.pp-card h1 { font-size: 22px; }
.pp-card h2 { font-size: 17px; }
.pp-card p { color: var(--ink-2); }
.pp-center { text-align: center; justify-items: center; padding: 32px 22px; }
.pp-quiet { box-shadow: none; border: 1px dashed #D8D2FF; background: rgba(255, 255, 255, .6); }
.pp-sub { font-size: 13px; color: var(--ink-3) !important; }
.pp-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--grad); box-shadow: inset 0 0 0 12px rgba(255, 255, 255, .55); }
.pp-hello { display: grid; gap: 6px; padding: 4px 4px 0; }
.pp-hello h1 { font-size: 26px; }
.pp-hello p { color: var(--ink-2); }
.pp-day { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--violet) !important; }
.pp-h2 { font-size: 15px; color: var(--ink-2); margin: 8px 4px 0; }
.pp-prose { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.pp-alert { border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 500; }
.pp-alert-ok { background: var(--ok-bg); color: var(--ok); }
.pp-alert-error { background: var(--error-bg); color: var(--error); }
.pp-tip { font-size: 13px; color: var(--ink-3); text-align: center; }
.pp-back { justify-self: start; font-size: 14px; font-weight: 600; }
.pp-back::before { content: "\2039  "; }

.pp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 16px/1 var(--font); padding: 15px 20px; border-radius: 14px; border: 1px solid transparent; background: var(--violet); color: #fff; cursor: pointer; min-height: 52px; text-decoration: none; }
.pp-btn:hover { text-decoration: none; background: var(--violet-dark); }
.pp-btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.pp-btn-ghost:hover { background: #fff; border-color: var(--violet); color: var(--violet); }
.pp-btn-danger { background: #fff; color: var(--error); border-color: #F3C3CA; }
.pp-btn-danger:hover { background: var(--error-bg); }
.pp-btn-small { min-height: 0; padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.pp-btn-send { width: 100%; margin-top: 4px; }
.pp-btn[disabled] { opacity: .6; }
.pp-link { background: none; border: 0; color: var(--violet); font: 600 14px var(--font); cursor: pointer; padding: 6px 0; }
.pp-decline { text-align: center; }
.pp-decline .pp-link { color: var(--ink-3); font-weight: 500; }

.pp-form { display: grid; gap: 14px; }
.pp-tick { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 15px; }
.pp-tick input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--violet); }
.pp-tick:has(input:checked) { border-color: var(--violet); background: #FBFAFF; }
.pp-tag { display: inline-block; font: 600 11px var(--font); font-style: normal; padding: 2px 7px; border-radius: 999px; background: var(--lilac); color: var(--violet-dark); margin-left: 4px; vertical-align: 1px; }
.pp-tag-quiet { background: var(--bg); color: var(--ink-3); }
.pp-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.pp-field input, .pp-q textarea, .pp-other, .pp-row select, .pp-lang select { font: 400 16px var(--font); padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
.pp-field input:focus, .pp-q textarea:focus, .pp-other:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 4px rgba(109, 74, 255, .12); }
.pp-lang { justify-self: end; }
.pp-lang select { width: auto; padding: 8px 12px; font-size: 14px; }
.pp-row { display: flex; gap: 10px; align-items: center; }
.pp-signed { list-style: none; display: grid; gap: 8px; }
.pp-signed li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; color: var(--ink-2); }
.pp-signed li.is-yes span { color: var(--ok); font-weight: 700; }

.pp-tasks { list-style: none; display: grid; gap: 10px; }
.pp-task-link { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); }
.pp-task-link:hover { text-decoration: none; }
a.pp-task-link:active { transform: scale(.99); }
.pp-task-state { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #CBC3FF; flex: none; }
.pp-task.is-todo .pp-task-state { border-color: var(--violet); box-shadow: inset 0 0 0 5px #fff; background: var(--violet); }
.pp-task.is-done .pp-task-state { border-color: var(--ok); background: var(--ok); position: relative; }
.pp-task.is-done .pp-task-state::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pp-task.is-missed .pp-task-link, .pp-tasks-quiet .pp-task-link { box-shadow: none; background: rgba(255, 255, 255, .6); color: var(--ink-2); }
.pp-task.is-missed .pp-task-state { border-style: dashed; border-color: var(--ink-3); }
.pp-task-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.pp-task-main strong { font-size: 16px; }
.pp-task-meta { font-size: 13px; color: var(--ink-3); }
.pp-chev { width: 10px; height: 10px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: rotate(-45deg); flex: none; }

.pp-task-form { display: grid; gap: 14px; }
.pp-q { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 10px; scroll-margin-top: 80px; }
.pp-q[hidden] { display: none; }
.pp-q.has-error { box-shadow: 0 0 0 2px var(--error); }
.pp-q h2 { font-size: 17px; line-height: 1.35; }
.pp-help, .pp-hint { font-size: 14px; color: var(--ink-3); }
.pp-qerr { font-size: 14px; font-weight: 600; color: var(--error); }
.pp-count { font-size: 12px; color: var(--ink-3); text-align: right; }
.pp-options { display: grid; gap: 8px; }
.pp-option { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 15px; }
.pp-option input { width: 22px; height: 22px; accent-color: var(--violet); }
.pp-option:has(input:checked) { border-color: var(--violet); background: #FBFAFF; }
.pp-scale { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.pp-scale label { position: relative; }
.pp-scale input { position: absolute; opacity: 0; inset: 0; }
.pp-scale span { display: block; text-align: center; padding: 12px 0; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.pp-scale input:checked + span { background: var(--violet); color: #fff; border-color: var(--violet); }
.pp-scale input:focus-visible + span { box-shadow: 0 0 0 3px rgba(109, 74, 255, .3); }
.pp-scale-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-3); }
.pp-cap { display: grid; gap: 10px; }
.pp-cap-buttons { display: grid; gap: 8px; }
.pp-cap-buttons[hidden] { display: none; }
.pp-btn-rec { background: var(--navy); }
.pp-btn-rec:hover { background: #24215a; }
.pp-rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(255, 94, 98, .3); }
.pp-rec-dot.is-live { animation: pp-pulse 1s infinite; }
@keyframes pp-pulse { 50% { opacity: .35; } }
.pp-cam, .pp-mic { width: 16px; height: 14px; border: 2px solid #fff; border-radius: 4px; }
.pp-mic { width: 10px; height: 16px; border-radius: 6px; }
.pp-recording { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #FFF0F0; font: 600 16px var(--font); }
.pp-recording[hidden] { display: none; }
.pp-recording .pp-btn { margin-left: auto; background: var(--coral); }
.pp-files { list-style: none; display: grid; gap: 8px; }
.pp-file { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.pp-file:not(:has(.pp-file-preview)) { grid-template-columns: 1fr auto; }
.pp-file-preview img, .pp-file-preview video { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--bg); display: block; }
.pp-file-preview audio { width: 72px; }
.pp-file-body { display: grid; gap: 6px; min-width: 0; }
.pp-file-name { font-size: 14px; font-weight: 600; }
.pp-file.is-done .pp-file-name { color: var(--ok); }
.pp-file.is-paused .pp-file-name { color: var(--warn); font-weight: 500; }
.pp-progress { height: 6px; border-radius: 999px; background: var(--lilac); overflow: hidden; }
.pp-progress span { display: block; height: 100%; width: 0; background: var(--violet); transition: width .3s; }
.pp-file.is-done .pp-progress span { background: var(--ok); }

/* ---------- Admin, Integrations: settings console ---------- */
.ic { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 32px; align-items: start; }
.ic-rail { position: sticky; top: 24px; display: grid; gap: 6px; }
.ic-rail h1 { font-size: 24px; }
.ic-rail-note { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.ic-services { display: grid; gap: 2px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.ic-svc { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 12px; border-radius: 10px; color: var(--ink); }
.ic-svc:hover { background: var(--bg); text-decoration: none; }
.ic-svc.is-current { background: var(--lilac); box-shadow: inset 3px 0 0 var(--violet); }
.ic-svc-text { display: grid; min-width: 0; }
.ic-svc-text strong { font-size: 14px; font-weight: 600; }
.ic-svc-text small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-dot { width: 10px; height: 10px; border-radius: 50%; background: #CFCBE0; }
.ic-svc.is-on .ic-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.ic-svc.is-failed .ic-dot { background: var(--error); box-shadow: 0 0 0 3px var(--error-bg); }
.ic-svc.is-untested .ic-dot, .ic-svc.is-env .ic-dot { background: #D99A1E; box-shadow: 0 0 0 3px #FFF3DC; }

.ic-main { display: grid; gap: 20px; min-width: 0; }
.ic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ic-head h2 { font-size: 26px; margin-bottom: 6px; }
.ic-head p { color: var(--ink-2); max-width: 62ch; }
.ic-pill { flex: none; font: 600 13px/1 var(--font); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); white-space: nowrap; }
.ic-pill::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: 1px; }
.ic-pill.is-on { color: var(--ok); border-color: #BFE6D3; background: var(--ok-bg); }
.ic-pill.is-failed { color: var(--error); border-color: #F3C3CA; background: var(--error-bg); }
.ic-pill.is-untested, .ic-pill.is-env { color: #92400E; border-color: #F8E1B4; background: #FFF6E5; }
.ic-pill.is-off { color: var(--ink-3); }

.ic-current { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 20px; align-items: center; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.ic-current.is-off { display: block; background: var(--bg); border-style: dashed; color: var(--ink-2); font-size: 14px; }
.ic-current-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.ic-current-name { font: 600 17px var(--font-head); }
.ic-current-detail { font-size: 13px; color: var(--ink-3); word-break: break-word; }
.ic-current-test { font-size: 13px; color: var(--ink-2); min-width: 0; border-left: 1px solid var(--line); padding-left: 20px; }
.ic-test-head { font-weight: 600; }
.ic-test-msg { color: var(--ink-3); word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ic-current-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ic-sms-test { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.ic-sms-test input { font: 400 14px var(--font); padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 240px; flex: 1; max-width: 340px; }

.ic-mono { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 700 14px var(--font-head); color: var(--navy); background: var(--lilac); border: 1px solid #DDD6FF; }

.ic-form { display: grid; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.ic-block { border: 0; padding: 22px 22px 24px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; min-width: 0; }
.ic-block[hidden] { display: none; }
.ic-block legend { float: left; width: 100%; font: 600 15px var(--font-head); margin-bottom: 4px; }
.ic-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ic-provider { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--white); }
.ic-provider:hover { border-color: #C9BEFF; }
.ic-provider input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ic-provider .ic-mono { width: 34px; height: 34px; font-size: 12px; border-radius: 9px; }
.ic-provider-text { display: grid; min-width: 0; }
.ic-provider-text strong { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ic-provider-text small { font-size: 12px; color: var(--ink-3); }
.ic-provider:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); background: #FBFAFF; }
.ic-provider:has(input:checked) .ic-mono { background: var(--violet); color: var(--white); border-color: var(--violet); }
.ic-provider:has(input:focus-visible) { outline: 3px solid rgba(109, 74, 255, .35); outline-offset: 2px; }
.ic-saved { position: absolute; top: 8px; right: 8px; font: 600 10px var(--font); color: var(--ok); background: var(--ok-bg); padding: 2px 6px; border-radius: 999px; }
.ic-hint { font-size: 13px; color: var(--ink-3); }
.ic-save { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: var(--bg); border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.ic-save .ic-hint { max-width: 60ch; }

@media (max-width: 960px) {
  .ic { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ic-rail { position: static; }
  .ic-services { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: thin; }
  .ic-svc { flex: none; min-width: 150px; }
  .ic-svc.is-current { box-shadow: inset 0 -3px 0 var(--violet); }
  .ic-current { grid-template-columns: minmax(0, 1fr); }
  .ic-current-test { border-left: 0; padding-left: 0; }
  .ic-current-actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .ic-head { flex-direction: column; }
  .ic-providers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ic-block { padding: 18px 16px; }
}

/* ---------- AI translation ---------- */
.set-tabs { margin-bottom: 16px; }
.tr-ai { margin-bottom: 4px; }
.tr-ai-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tr-ai-head .card-title { margin-bottom: 4px; }
.tr-ai-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tr-ai-status { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); }
.tr-ai-status.is-ok { background: var(--ok-bg); color: var(--ok); }
.tr-ai-status.is-error { background: var(--error-bg); color: var(--error); }
.tr-dst .is-ai { border-color: #B7A6FF !important; background: #F7F4FF !important; }
.ic > * { min-width: 0; }
.ic-block .field { align-content: start; }
.secret-hint { font-size: 12px; font-style: normal; color: var(--ink-3); }
.ic-rail > * { min-width: 0; }
.ic-rail { grid-template-columns: minmax(0, 1fr); }
.ic-svc { position: relative; } /* keeps its hidden status text inside the scrolling list */
.field .is-ai, .field textarea.is-ai, .field input.is-ai { border-color: #B7A6FF; background: #F7F4FF; }

/* ---------- Milestone 4: review feed ---------- */
.fd-waiting { color: #92400E; }
.fd-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.fd-filters label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.fd-filters select, .fd-filters input { font: 400 14px var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); max-width: 260px; }
.fd-filter-actions { display: flex; gap: 12px; align-items: center; }
.fd-count { font-size: 13px; color: var(--ink-3); }
.fd-list { display: grid; gap: 16px; }
.fd-entry { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #FCFBFF; }
.fd-who { font: 700 15px var(--font-head); color: var(--ink); }
.fd-task { font-weight: 600; font-size: 15px; }
.fd-when { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.fd-left { background: var(--error-bg); color: var(--error); }
.fd-answers { display: grid; gap: 0; }
.fd-ans { padding: 16px 20px; display: grid; gap: 8px; border-top: 1px solid #F1EEFA; min-width: 0; }
.fd-ans:first-child { border-top: 0; }
.fd-q { font: 500 13px var(--font); color: var(--ink-3); }
.fd-media { display: flex; flex-wrap: wrap; gap: 10px; }
.fd-video { display: grid; gap: 6px; max-width: 520px; width: 100%; }
.fd-video video { width: 100%; border-radius: 12px; background: #0E0C24; aspect-ratio: 16 / 9; object-fit: contain; display: block; }
.fd-video.is-portrait { max-width: 300px; }
.fd-video.is-portrait video { aspect-ratio: 9 / 16; }
.fd-video figcaption { font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; }
.fd-photo { display: block; width: 160px; height: 160px; border-radius: 12px; overflow: hidden; background: var(--bg); }
.fd-photo img { width: 100%; height: 100%; object-fit: cover; }
.fd-photo:hover img { opacity: .9; }
.fd-audio { display: flex; align-items: center; gap: 10px; max-width: 100%; }
.fd-audio audio { max-width: 100%; }
.fd-audio span { font-size: 12px; color: var(--ink-3); }
.fd-pending { padding: 14px 16px; border-radius: 12px; background: #FFF6E5; color: #92400E; font-size: 13px; }
.fd-pending.is-failed { background: var(--error-bg); color: var(--error); }
.fd-text { margin: 0; padding: 10px 14px; border-left: 3px solid var(--violet); background: #FBFAFF; border-radius: 0 10px 10px 0; font-size: 15px; line-height: 1.6; max-width: 75ch; }
.fd-choices { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.fd-choices li { padding: 6px 12px; border-radius: 999px; background: var(--lilac); color: var(--violet-dark); font-size: 14px; font-weight: 500; }
.fd-rating { display: flex; align-items: center; gap: 10px; }
.fd-rating strong { font: 700 22px var(--font-head); }
.fd-rating span { font-size: 13px; color: var(--ink-3); }
.fd-bar { width: 140px; height: 6px; border-radius: 999px; background: var(--lilac); overflow: hidden; }
.fd-bar span { display: block; height: 100%; background: var(--violet); }
.fd-viewer { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; }
.fd-viewer::backdrop { background: rgba(14, 12, 36, .86); }
.fd-viewer img { display: block; max-width: 94vw; max-height: 90vh; border-radius: 10px; }
.fd-viewer-close { position: fixed; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 24px; cursor: pointer; }
@media (max-width: 600px) {
  .fd-head, .fd-ans { padding-left: 14px; padding-right: 14px; }
  .fd-when { margin-left: 0; width: 100%; }
  .fd-photo { width: calc(50% - 5px); height: auto; aspect-ratio: 1; }
  .fd-filters label { flex: 1 1 140px; }
  .fd-filters select, .fd-filters input { max-width: 100%; width: 100%; }
}

/* ---------- study status (draft, live, paused, closed) ---------- */
.status-card { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; border-left: 4px solid var(--line); }
.status-card-draft { border-left-color: #F0B65A; }
.status-card-live { border-left-color: var(--ok); }
.status-card-paused { border-left-color: var(--violet); }
.status-card-main { flex: 1; min-width: 0; }
.status-card-main > p { margin: 6px 0 0; color: var(--ink-2); }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: flex-end; }
.status-actions form { margin: 0; }
.status-close { position: relative; }
.status-close > summary { list-style: none; cursor: pointer; }
.status-close > summary::-webkit-details-marker { display: none; }
.status-close-box { position: absolute; right: 0; top: calc(100% + 8px); width: 290px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 12px 32px rgba(20, 16, 60, .14); z-index: 5; }
.status-close-box p { margin: 0 0 10px; }
.btn-danger-solid { background: var(--error); color: #fff; border-color: var(--error); }
.btn-danger-solid:hover { background: #A51F32; color: #fff; }
.readiness { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.readiness li { display: flex; gap: 12px; align-items: baseline; font-size: 14px; padding: 9px 12px; border-radius: 10px; }
.readiness li span { flex: 1; min-width: 0; }
.readiness .is-blocker { background: var(--error-bg); color: var(--error); }
.readiness .is-warning { background: #FFF6E5; color: #92400E; }
.readiness a { font-weight: 600; white-space: nowrap; color: inherit; text-decoration: underline; }
.pill-test { background: #FFF6E5; color: #92400E; }
.pt-testcheck { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.pt-testcheck input { margin-top: 3px; flex: none; }
.pt-testcheck .muted { display: block; margin-top: 2px; }
@media (max-width: 760px) {
  .status-card { flex-direction: column; }
  .status-actions { justify-content: flex-start; }
  .status-close-box { left: 0; right: auto; width: min(290px, calc(100vw - 64px)); }
}
.gallery-note { margin: -4px 0 4px; }
.q-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }

/* ---------- participant task page: question numbers, in-page recorder, review ---------- */
.pp-qnum { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--violet); margin-bottom: -6px; }
.pp-qnum[hidden], .pp-qnum:empty { display: none; }
.pp-cap-note { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: #FFF6E5; color: #92400E; }
.pp-cap-note[hidden] { display: none; }
.pp-live { display: grid; gap: 10px; }
.pp-live[hidden] { display: none; }
.pp-live-view { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0F0D2A; border-radius: 14px; display: block; }
.pp-live[data-kind=photo] .pp-live-view { aspect-ratio: 4 / 3; }
.pp-live-view.is-mirror { transform: scaleX(-1); }
.pp-live-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #FFF0F0; font: 600 16px var(--font); }
.pp-live[data-kind=photo] .pp-live-bar { background: var(--bg); }
.pp-live-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.pp-btn-go { margin-left: auto; background: var(--coral); }
.pp-btn-go:hover { background: #E94D52; }
.pp-live[data-kind=photo] .pp-btn-go { background: var(--violet); }
.pp-btn-go.is-stop, .pp-btn-go.is-stop:hover { background: var(--navy); }
.pp-file { grid-template-columns: 72px minmax(0, 1fr) auto; }
.pp-file-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pp-file-video, .pp-file-audio { grid-template-columns: minmax(0, 1fr) auto; }
.pp-file-video .pp-file-preview, .pp-file-audio .pp-file-preview { grid-column: 1 / -1; }
.pp-file-video .pp-file-preview video { width: 100%; height: auto; max-height: 360px; object-fit: contain; background: #000; }
.pp-file-audio .pp-file-preview audio { width: 100%; }
.pp-send-note { font-size: 13px; color: var(--ink-3); text-align: center; }
.pp-send-note[hidden] { display: none; }
.pp-alert-test { background: #FFF6E5; color: #92400E; margin-bottom: 14px; }
.pp-btn[hidden], .pp-cap-buttons [hidden] { display: none; }

/* ---------- review: tags and highlights ---------- */
.rv-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rv-tag { display: inline-flex; align-items: center; gap: 2px; font: 600 12px/1 var(--font); padding: 5px 4px 5px 10px; border-radius: 999px; background: var(--lilac); color: var(--violet-dark); }
.rv-tag a { color: inherit; text-decoration: none; }
.rv-tag a:hover { text-decoration: underline; }
.rv-tag form { margin: 0; display: inline; }
.rv-tag-small { padding: 4px 9px; font-size: 11px; }
a.rv-tag { text-decoration: none; }
.rv-tag-x { border: 0; background: none; color: inherit; opacity: .55; cursor: pointer; font: 600 15px/1 var(--font); padding: 0 5px; }
.rv-tag-x:hover { opacity: 1; }
.rv-c-violet { background: #EEEAFF; color: #4B32C3; }
.rv-c-coral { background: #FFE9E9; color: #B4232A; }
.rv-c-teal { background: #DDF5F1; color: #0F6B5E; }
.rv-c-amber { background: #FFF1D6; color: #8A4B05; }
.rv-c-blue { background: #E2EEFF; color: #1D4FB3; }
.rv-c-green { background: #E3F6E5; color: #23702D; }
.rv-c-pink { background: #FDE6F3; color: #9D1C67; }
.rv-c-slate { background: #ECEEF3; color: #3D4559; }
.rv-tag-add { display: inline-flex; gap: 6px; margin: 0; }
.rv-tag-add input { font: 400 13px var(--font); padding: 6px 10px; border: 1px dashed var(--line); border-radius: 999px; width: 140px; background: #fff; }
.rv-tag-add input:focus { border-style: solid; border-color: var(--violet); outline: none; }
.fd-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: #FCFBFF; }
.rv-hls { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rv-hls:empty { display: none; }
.rv-hl { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #FFF8EC; border: 1px solid #F8E1B4; font-size: 14px; }
.rv-hl form { margin: 0 0 0 auto; }
.rv-hl-time { flex: none; font: 600 13px var(--font); color: #8A4B05; background: none; border: 0; padding: 2px 0; cursor: pointer; white-space: nowrap; }
.rv-hl-time.is-whole { cursor: default; }
button.rv-hl-time:hover { text-decoration: underline; }
.rv-hl-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.rv-hl-note { color: var(--ink); }
.rv-hl-by { font-size: 12px; color: var(--ink-3); }
.rv-hl-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font: 600 16px/1 var(--font); padding: 0 4px; }
.rv-hl-x:hover { color: var(--error); }
.rv-new > summary { list-style: none; cursor: pointer; display: inline-block; font: 600 13px var(--font); color: var(--violet); }
.rv-new > summary::-webkit-details-marker { display: none; }
.rv-new > summary::before { content: '+ '; }
.rv-new[open] > summary { margin-bottom: 8px; }
.rv-new-form { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #FCFBFF; max-width: 560px; }
.rv-new-form textarea, .rv-new-form input[type=text], .rv-new-form select { font: 400 14px var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff; }
.rv-times { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rv-times label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.rv-times input[type=text] { width: 80px; }
.rv-new-actions { display: flex; align-items: center; gap: 12px; }
.rv-err { color: var(--error); font-size: 13px; margin: 0; }
.rv-err[hidden] { display: none; }
.hl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.hl-list { display: grid; gap: 14px; }
.hl-card { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.hl-media video { width: 100%; border-radius: 10px; background: #000; max-height: 260px; }
.hl-media video.is-portrait { max-height: 360px; }
.hl-media audio { width: 100%; }
.hl-media img { width: 100%; border-radius: 10px; display: block; }
.hl-info { display: grid; gap: 6px; align-content: start; min-width: 0; }
.hl-info p { margin: 0; }
.hl-meta { font-size: 14px; }
.hl-q { font-size: 13px; color: var(--ink-3); }
.hl-time { font: 600 13px var(--font); color: #8A4B05; }
.hl-note { font-size: 15px; }
.hl-remove { margin: 4px 0 0; }
.hl-tagsbox { position: sticky; top: 84px; }
.hl-taglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hl-taglist li { display: grid; gap: 4px; }
.hl-tagedit summary { cursor: pointer; font-size: 12px; color: var(--violet); }
.hl-tagedit form { margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hl-layout { grid-template-columns: 1fr; }
  .hl-tagsbox { position: static; }
  .hl-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .fd-foot { padding: 12px 14px; } }
.hl-taglist li { justify-items: start; }
.hl-main .fd-count { margin: 14px 0 10px; }
.hl-main .fd-filters { margin-bottom: 4px; }

/* ---------- messages: research team ---------- */
.fd-follow { font-size: 13px; font-weight: 600; }
.msg-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.msg-tabs { display: flex; gap: 4px; }
.msg-tabs a { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; color: var(--ink-2); }
.msg-tabs a.is-active { background: var(--lilac); color: var(--violet-dark); }
.msg-tabs a:hover { text-decoration: none; }
.msg-find { margin: 4px 0 14px; }
.msg-find input { max-width: 240px; }
.msg-empty { margin: 8px 0 0; }
.msg-threads { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.msg-threads li { border-bottom: 1px solid var(--line); }
.msg-threads a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 6px; color: var(--ink); }
.msg-threads a:hover { text-decoration: none; background: #FBFAFF; }
.msg-who { font-weight: 600; }
.msg-when { font-size: 12px; color: var(--ink-3); }
.msg-last { grid-column: 1; font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-last em { font-style: normal; color: var(--ink-3); }
.msg-badge { grid-column: 2; justify-self: end; font: 600 11px/1 var(--font); padding: 4px 8px; border-radius: 999px; background: var(--coral); color: #fff; }
.msg-threads li.is-unread .msg-last { color: var(--ink); font-weight: 500; }
.msg-thread { max-width: 820px; }
.msg-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.msg { display: grid; gap: 4px; max-width: 78%; }
.msg-team { justify-self: end; justify-items: end; }
.msg-them { justify-self: start; }
.msg-bubble { padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.msg-bubble p { margin: 0; }
.msg-team .msg-bubble { background: var(--violet); color: #fff; border-bottom-right-radius: 4px; }
.msg-team .msg-bubble a { color: #fff; text-decoration: underline; }
.msg-them .msg-bubble { background: #F1EEFA; color: var(--ink); border-bottom-left-radius: 4px; }
.msg-about { font-size: 12px; opacity: .85; margin: 0 0 4px !important; }
.msg-meta { font-size: 12px; color: var(--ink-3); margin: 0; }
.msg-compose { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.msg-compose textarea { font: 400 15px var(--font); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; width: 100%; }
.msg-compose .msg-about { color: var(--ink-2); font-size: 13px; opacity: 1; }
.msg-compose .form-actions { align-items: center; gap: 12px; }
@media (max-width: 900px) { .msg-layout { grid-template-columns: 1fr; } .msg { max-width: 92%; } }

/* ---------- messages: participant app ---------- */
.pp-nav { grid-template-columns: 1fr 1fr 1fr; }
.pp-nav a { position: relative; }
.pp-ico-msg { border-radius: 8px 8px 8px 2px; }
.pp-nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--coral); color: #fff; font: 700 11px/18px var(--font); text-align: center; }
.pp-quiet-text { color: var(--ink-3); font-size: 15px; }
.pp-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pp-msg { display: grid; gap: 4px; max-width: 86%; }
.pp-msg.is-team { justify-self: start; }
.pp-msg.is-me { justify-self: end; justify-items: end; }
.pp-msg-bubble { padding: 11px 14px; border-radius: 18px; font-size: 16px; line-height: 1.45; }
.pp-msg-bubble p { margin: 0; }
.pp-msg.is-team .pp-msg-bubble { background: #fff; box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.pp-msg.is-me .pp-msg-bubble { background: var(--violet); color: #fff; border-bottom-right-radius: 4px; }
.pp-msg-about { font-size: 12px; color: var(--violet); font-weight: 600; margin-bottom: 4px !important; }
.pp-msg-meta { font-size: 12px; color: var(--ink-3); margin: 0; }
.pp-msg-form { display: grid; gap: 10px; margin-top: 18px; }
.pp-msg-form textarea { font: 400 16px var(--font); padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; width: 100%; }

/* ---------- plan notice, sign-up ---------- */
.plan-bar { margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.plan-bar-info { background: var(--info-bg); color: var(--violet-dark); }
.plan-bar-warn { background: #FFF6E5; color: #92400E; }
.plan-bar-error { background: var(--error-bg); color: var(--error); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-card .check { align-items: flex-start; }
.auth-card .check input { margin-top: 3px; flex: none; }
.admin-tabs { margin-bottom: 18px; }
.ag-table td { vertical-align: top; }
.ag-actions { position: relative; }
.ag-actions > summary { list-style: none; cursor: pointer; }
.ag-actions > summary::-webkit-details-marker { display: none; }
.ag-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); display: grid; gap: 8px; min-width: 260px; }
.ag-box form { margin: 0; }
.ag-wrap { overflow: visible; margin-top: 16px; }
@media (max-width: 760px) { .ag-wrap { overflow-x: auto; } .ag-box { right: auto; left: 0; } }

/* ---------- billing ---------- */
.bl-now { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 24px; }
.bl-plan { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 4px 0; }
.bl-usage p { margin: 0 0 6px; }
.bl-bar { height: 8px; border-radius: 999px; background: var(--lilac); overflow: hidden; margin-bottom: 6px; }
.bl-bar span { display: block; height: 100%; background: var(--violet); }
.bl-portal { display: grid; gap: 4px; justify-items: end; margin: 0; }
.bl-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.bl-head h2 { font-size: 20px; }
.bl-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 12px; }
.bl-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 10px; align-content: start; }
.bl-card.is-current { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .15); }
.bl-card h3 { font-size: 17px; }
.bl-price { font: 700 30px var(--font-head); margin: 0; }
.bl-price span { font: 500 14px var(--font); color: var(--ink-3); margin-left: 4px; }
.bl-seats { margin: 0; font-size: 14px; }
.bl-incl { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.bl-cur { margin: 0; font-weight: 600; color: var(--violet); text-align: center; padding: 10px; }
.bl-card form { margin: 0; }
.bl-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bl-events li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.plan-bar a { font-weight: 600; margin-left: 6px; }
.pl-table input[type=text], .pl-table input[type=number] { font: 400 14px var(--font); padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; width: 100%; max-width: 160px; }
.pl-table .pl-order { max-width: 70px; }
.pl-new td { background: #FCFBFF; }
.pl-foot { display: flex; align-items: center; gap: 14px; padding: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 900px) { .bl-now { grid-template-columns: 1fr; } .bl-portal { justify-items: start; } }
.pl-online { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.pl-online .card-title { margin-bottom: 4px; }
.ag-request { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: #92400E; background: #FFF6E5; padding: 3px 8px; border-radius: 8px; }
.ag-delete > summary { list-style: none; cursor: pointer; }
.ag-delete > summary::-webkit-details-marker { display: none; }
.ag-delete-box { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid #F3C3CA; border-radius: 10px; background: #FFF8F8; white-space: normal; }
.ag-delete-box p { margin: 0; }
.ag-box { max-width: 320px; }
.del-card { max-width: 760px; border-left: 4px solid var(--error); }
.del-list { margin: 12px 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.del-form { margin-top: 16px; max-width: 460px; }

/* ---------- team ---------- */
.tm-table td { vertical-align: top; }
.tm-edit { position: relative; }
.tm-edit > summary { list-style: none; cursor: pointer; }
.tm-edit > summary::-webkit-details-marker { display: none; }
.tm-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); width: 320px; display: grid; gap: 10px; }
.tm-box form { margin: 0; }
.tm-studies { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 4px 0; }
.tm-studies .check { align-items: flex-start; }
.tm-pending { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tm-pending li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tm-pending form { margin: 0; }
.tm-roles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.js-studies[hidden] { display: none; }
.card-flush.tm-wrap, .card-flush:has(.tm-table) { overflow: visible; }
@media (max-width: 760px) { .tm-box { right: auto; left: 0; width: min(320px, calc(100vw - 48px)); } }

/* Admin, Requests */
.tab-count { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px; border-radius: 10px; background: var(--violet); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.rq-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 16px 0; }
.rq-search { display: flex; gap: 8px; }
.rq-search input { min-width: 220px; }
.rq-wrap { overflow-x: auto; }
.rq-table td { vertical-align: top; }
.rq-risk { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rq-low { background: var(--ok-bg); color: var(--ok); }
.rq-medium { background: #FFF6E5; color: #92400E; }
.rq-high { background: #FDECEC; color: #B42318; }
.rq-lang { display: inline-block; font-size: 11px; font-weight: 700; color: var(--violet-dark); background: #EEF0FF; padding: 1px 6px; border-radius: 6px; }
.rq-blocked { margin-top: 20px; }
.rq-blocked > summary { cursor: pointer; }
.rq-blocked table { margin-top: 12px; }
.rq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rq-grid .card { margin: 0; }
.rq-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; }
.rq-dl dt { color: var(--ink-2); font-size: 14px; }
.rq-dl dd { margin: 0; overflow-wrap: anywhere; }
.rq-h3 { font-size: 15px; margin: 18px 0 8px; }
.rq-msg { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin: 0; white-space: normal; }
.rq-reasons { margin: 0 0 14px; padding-left: 20px; }
.rq-reasons li { color: #92400E; margin-bottom: 4px; }
.rq-others { margin: 0 0 12px; padding-left: 20px; }
.rq-actions { margin-top: 20px; }
.rq-act { display: grid; grid-template-columns: 1fr minmax(200px, 280px) auto; gap: 14px; align-items: end; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rq-act p { margin: 4px 0 0; }
.rq-act .field { margin: 0; }
.rq-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.rq-row form { margin: 0; }
.rq-note { margin-top: 14px; }
.ok-text { color: var(--ok); }
@media (max-width: 860px) { .rq-grid { grid-template-columns: 1fr; } .rq-act { grid-template-columns: 1fr; } .rq-dl { grid-template-columns: 1fr; } .rq-dl dt { margin-top: 6px; } }
.rq-search input { font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.rq-search input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
/* Admin, agency page and users */
.zc-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.zc-kpi { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.zc-kpi span { font-size: 13px; color: var(--ink-2); }
.zc-kpi strong { font-size: 20px; line-height: 1.25; }
.zc-kpi em { font-style: normal; font-size: 12px; color: var(--ink-2); }
.zc-pad { padding: 18px 20px 0; margin: 0; }
p.zc-pad { padding-bottom: 16px; }
.zc-activity { list-style: none; margin: 0; padding: 0; }
.zc-activity li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.zc-activity li:last-child { border-bottom: 0; }
.us-table td { vertical-align: top; }
.us-off td { background: #FFF8F8; }
.us-del { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 6px; }
@media (max-width: 1000px) { .zc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .zc-kpis { grid-template-columns: 1fr; } }
/* Admin, Server */
.sv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.sv-card { margin: 0; border-top: 4px solid var(--line); }
.sv-card h2 { font-size: 15px; margin: 0 0 6px; color: var(--ink-2); font-weight: 600; }
.sv-big { font-size: 30px; font-weight: 700; margin: 0 0 8px; line-height: 1.1; }
.sv-bar { height: 8px; border-radius: 6px; background: var(--bg); overflow: hidden; margin-bottom: 8px; }
.sv-bar span { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.sv-ok { border-top-color: var(--ok); }
.sv-mid { border-top-color: #F0B65A; } .sv-mid .sv-bar span { background: #F0B65A; }
.sv-high { border-top-color: #D92D20; } .sv-high .sv-bar span { background: #D92D20; } .sv-high .sv-big { color: #B42318; }
.sv-spark { width: 100%; height: 56px; display: block; margin-top: 10px; background: var(--bg); border-radius: 8px; }
.sv-line { fill: none; stroke: var(--violet); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sv-limit { stroke: #D92D20; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.sv-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin: 4px 0 0; }
.sv-lower { margin-bottom: 20px; }
.sv-form { display: grid; grid-template-columns: 150px 170px minmax(0, 300px) auto; gap: 14px; align-items: end; margin-bottom: 10px; }
.sv-form .field { margin: 0; }
.sv-pct { display: flex; align-items: center; gap: 6px; }
.sv-pct input { width: 90px; }
@media (max-width: 700px) { .sv-form { grid-template-columns: 1fr; } }
.sv-tab-alert { background: #D92D20; }
.sv-bucket { margin-bottom: 20px; }
.sv-bucket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sv-of { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.sv-table { margin-top: 12px; }
.sv-table .num { text-align: right; white-space: nowrap; }
.sv-share { width: 28%; }
.sv-mini { display: block; height: 6px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.sv-mini span { display: block; height: 100%; background: var(--violet); }
@media (max-width: 700px) { .sv-share { display: none; } }
.sv-form .btn { justify-self: start; }


/* =====================================================================
   Design system 2: app shell with sidebar, study header, calmer surfaces.
   Panels are flat with hairline borders; only menus and popovers float.
   ===================================================================== */
body { font-size: 15px; line-height: 1.55; font-feature-settings: "tnum" 0; }
.table td, .facts dd, .sbar-tabs b, .kpi-num, .sv-big { font-variant-numeric: tabular-nums; }
h1, h2, h3 { letter-spacing: -.005em; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* shell */
.app-body { background: var(--bg); }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #CFCDE3; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; overflow-y: auto; }
.sb-logo img { width: 128px; height: auto; margin: 4px 8px 6px; }
.sb-top { display: grid; gap: 14px; }
.sb-org { position: relative; }
.sb-org summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); cursor: pointer; }
.sb-org summary::-webkit-details-marker { display: none; }
.sb-org summary:hover { background: rgba(255, 255, 255, .1); }
.sb-org-mark { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--grad); color: #fff; display: grid; place-items: center; font: 600 14px var(--font-head); }
.sb-org-text { display: grid; min-width: 0; line-height: 1.25; flex: 1; }
.sb-org-text strong { color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-org-text em { font-style: normal; font-size: 12px; color: #A9A6C4; }
.sb-caret { width: 18px; height: 18px; fill: none; stroke: #A9A6C4; stroke-width: 2; }
.sb-org-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--white); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 8px; display: grid; gap: 2px; }
.sb-org-menu p { font-size: 12px; color: var(--ink-3); padding: 4px 8px 6px; }
.sb-org-menu form { margin: 0; }
.sb-org-menu button { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 8px; border-radius: 8px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.sb-org-menu button:hover { background: var(--bg); }
.sb-nav { display: grid; gap: 2px; align-content: start; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #CFCDE3; font-weight: 500; font-size: 14.5px; }
.sb-link svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.sb-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.sb-link.is-active { background: rgba(109, 74, 255, .28); color: #fff; }
.sb-link.is-active svg { opacity: 1; }
.sb-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--violet); color: #fff; font-size: 12px; text-align: center; }
.sb-live { display: grid; gap: 1px; margin: 2px 0 8px 20px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .12); }
.sb-live a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; color: #B9B6D2; min-width: 0; }
.sb-live a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-live a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.sb-live a.is-active { color: #fff; background: rgba(255, 255, 255, .1); }
.sb-foot { margin-top: auto; display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sb-user { position: relative; }
.sb-user summary { list-style: none; display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.sb-user summary::-webkit-details-marker { display: none; }
.sb-user summary:hover { background: rgba(255, 255, 255, .07); }
.sb-user-text { display: grid; min-width: 0; line-height: 1.25; }
.sb-user-text strong { color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text em { font-style: normal; font-size: 12px; color: #A9A6C4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; background: var(--white); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; display: grid; }
.sb-user-menu a, .sb-user-menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--ink); font: 500 14px var(--font); background: none; border: 0; cursor: pointer; }
.sb-user-menu a:hover, .sb-user-menu button:hover { background: var(--bg); text-decoration: none; }
.sb-user-menu form { margin: 0; }
.avatar { width: 32px; height: 32px; flex: none; }
.mobilebar { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.page { max-width: 1240px; width: 100%; margin: 0; padding: 28px 40px 48px; gap: 22px; }
.appfoot { max-width: 1240px; margin: 0; padding: 0 40px 28px; margin-top: auto; }

/* live and recording marker: the one coral element */
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex: none; display: inline-block; box-shadow: 0 0 0 3px rgba(236, 76, 85, .22); }
@media (prefers-reduced-motion: no-preference) {
  .rec-dot { animation: rec 2.4s ease-in-out infinite; }
  @keyframes rec { 0%, 100% { box-shadow: 0 0 0 2px rgba(236, 76, 85, .28); } 50% { box-shadow: 0 0 0 5px rgba(236, 76, 85, 0); } }
}

/* study header */
.studybar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 0; }
.sbar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.sbar-title { min-width: 0; }
.sbar-crumb { font-size: 13px; color: var(--ink-3); }
.sbar-name { font-size: 24px; line-height: 1.2; margin-top: 2px; }
.sbar-name a { color: var(--ink); }
.sbar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.state { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; padding: 3px 10px 3px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.state-live { background: #FDEEEF; color: #A6252D; }
.state-draft { background: var(--warn-bg); color: var(--warn); }
.state-paused { background: var(--info-bg); color: var(--violet-ink); }
.sbar-tabs { display: flex; gap: 2px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.sbar-tabs::-webkit-scrollbar { display: none; }
.sbar-tabs a { position: relative; white-space: nowrap; padding: 10px 10px 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.sbar-tabs a:hover { color: var(--ink); text-decoration: none; }
.sbar-tabs a.is-active { color: var(--violet-ink); }
.sbar-tabs a.is-active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2.5px; border-radius: 2px; background: var(--violet); }
.sbar-tabs b { font-weight: 600; font-size: 12px; color: var(--ink-3); margin-left: 3px; }
.sbar-tabs b.is-new { color: #fff; background: var(--coral); border-radius: 9px; padding: 1px 6px; }
.sbar-sep { width: 1px; background: var(--line); margin: 9px 6px 14px; flex: none; }
.in-study .page-head .crumbs, .in-study .ov-head { display: none; }
.in-study .page-head h1 { font-size: 20px; }

/* page heads */
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--ink-2); }
.crumbs { font-size: 13px; }

/* surfaces */
.card { box-shadow: none; border-color: var(--line); border-radius: var(--radius); padding: 22px; }
.card-title { font-size: 16px; margin-bottom: 14px; }
.plan-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }

/* buttons */
.btn { font: 600 14.5px/1 var(--font); padding: 11px 16px; border-radius: 9px; transition: background .12s, border-color .12s, color .12s; }
.btn-small { padding: 7px 11px; font-size: 13px; border-radius: 8px; }
.btn-primary { background: var(--violet); }
.btn-primary:hover { background: var(--violet-dark); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: #C9C3EE; color: var(--violet-ink); background: #FBFAFF; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .linklike:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* forms */
.field span { font-size: 13.5px; font-weight: 500; }
.field input, .field textarea, .field select, .inline-form input[type=text] { border-color: #D9D6E4; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #C3BFD4; }

/* tables: sentence-case headers, quieter rules */
.table th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--ink-3); background: #FAFAFC; padding: 11px 16px; }
.table td { padding: 13px 16px; border-bottom-color: var(--line-2); }
.table tbody tr:hover { background: #FBFAFE; }

/* status pills */
.status { font: 600 12px/1 var(--font); padding: 4px 9px; border: 0; }
.status-live { background: var(--ok-bg); color: var(--ok); }
.status-draft { background: var(--warn-bg); color: var(--warn); }
.status-paused { background: var(--info-bg); color: var(--violet-ink); }

/* alerts */
.alert { border: 1px solid transparent; }
.alert-success { border-color: #C7E8D6; }
.alert-error { border-color: #F3CDD0; }

/* small screens: the sidebar becomes a panel under a top bar */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .mobilebar { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; justify-content: space-between; height: 58px; padding: 0 16px; background: var(--white); border-bottom: 1px solid var(--line); }
  .mb-logo img { width: 112px; height: auto; }
  .mb-toggle { font: 600 14px var(--font); padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); cursor: pointer; }
  .sidebar { display: none; position: fixed; inset: 58px 0 0 0; height: auto; z-index: 39; }
  .sidebar.is-open { display: flex; }
  .sb-logo { display: none; }
  .page { padding: 20px 16px 40px; }
  .appfoot { padding: 0 16px 24px; }
}
@media (max-width: 600px) {
  .studybar { padding: 14px 14px 0; }
  .sbar-name { font-size: 20px; }
}

/* design system 2: page-level refinements */
.card:has(> .table:only-child), .card:has(> .table-wrap:only-child) { padding: 0; overflow: hidden; }
.card > .table:only-child th:first-child, .card > .table:only-child td:first-child { padding-left: 22px; }
.card-flush > .table th:first-child, .card-flush > .table td:first-child { padding-left: 22px; }
.day-title { text-transform: none; letter-spacing: 0; font-size: 14px; }
.day-title span { border: 0; background: none; padding: 0; color: var(--ink); font: 600 15px var(--font-head); }
.checklist { gap: 0; }
.checklist li { border: 0; border-radius: 0; padding: 11px 4px; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist li.done { background: none; }
.checklist li.done::before { background: var(--ok); border-color: var(--ok); }
.checklist li.started { background: none; }
.status-card { border-left-width: 3px; margin-bottom: 0; }
.status-card-live { border-left-color: var(--coral); }
.set-tabs, .admin-tabs { gap: 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.set-tabs a, .admin-tabs a { border: 0; background: none; border-radius: 0; padding: 10px 14px 12px; position: relative; white-space: nowrap; color: var(--ink-2); }
.set-tabs a:hover, .admin-tabs a:hover { color: var(--ink); }
.set-tabs a.is-active, .admin-tabs a.is-active { background: none; color: var(--violet-ink); }
.set-tabs a.is-active::after, .admin-tabs a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--violet); }
.fd-filters { border-radius: var(--radius); padding: 14px 16px; gap: 12px; }
.fd-filters label { flex: 1 1 130px; font-weight: 500; font-size: 12.5px; }
.fd-filters select, .fd-filters input { width: 100%; max-width: none; border-color: #D9D6E4; }
.fd-filter-actions { flex: 0 0 auto; }
.pill { font-weight: 500; }

/* home */
.home-head p { margin-top: 4px; }
.home-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.home-sum > div { padding: 16px 22px; display: grid; gap: 2px; border-left: 1px solid var(--line-2); }
.home-sum > div:first-child { border-left: 0; }
.kpi-num { font: 600 26px/1.1 var(--font-head); color: var(--ink); }
.kpi-num.is-new { color: var(--coral); }
.home-sum span { font-size: 13.5px; color: var(--ink-2); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.home-sec-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 22px 12px; border-bottom: 1px solid var(--line-2); }
.home-sec-head h2 { font-size: 16px; }
.home-pad { padding: 16px 22px; }
.home-list { list-style: none; }
.home-list li { border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.home-list li:last-child { border-bottom: 0; }
.home-study, .home-resp { flex: 1; min-width: 0; display: grid; gap: 6px; padding: 14px 22px; color: var(--ink); }
.home-study:hover, .home-resp:hover { background: #FBFAFE; text-decoration: none; }
.home-study-name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.home-study-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.home-unread { flex: none; margin-right: 22px; font-size: 12.5px; font-weight: 600; color: #A6252D; background: #FDEEEF; padding: 4px 10px; border-radius: 999px; }
.home-resp { gap: 2px; }
.home-resp-top { display: flex; gap: 8px; align-items: center; }
.home-resp-top .muted { margin-left: auto; }
.home-resp-task { font-size: 14px; }
.home-start { display: grid; gap: 14px; padding: 28px; }
.home-start h2 { font-size: 22px; }
.home-steps { list-style: none; counter-reset: hs; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 6px 0 4px; }
.home-steps li { counter-increment: hs; display: grid; gap: 4px; padding-top: 40px; position: relative; font-size: 14px; color: var(--ink-2); }
.home-steps li::before { content: counter(hs); position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--lilac); color: var(--violet-ink); display: grid; place-items: center; font-weight: 600; }
.home-steps strong { color: var(--ink); }
.home-start .btn { justify-self: start; }
.home-account { display: grid; gap: 6px; padding: 16px 22px; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .home-sum { grid-template-columns: 1fr 1fr; } .home-sum > div:nth-child(3) { border-left: 0; } .home-sum > div:nth-child(n+3) { border-top: 1px solid var(--line-2); } .home-steps { grid-template-columns: 1fr 1fr; } }
.card.card-flush { padding: 0; }
.checklist li, .checklist li.done, .checklist li.started { border-color: var(--line-2); }

.preview-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }

/* =====================================================================
   Participant app, design system 2: calm white cards on a soft canvas,
   coral only for recording, real icons in the bottom bar.
   ===================================================================== */
.pp-body { background: #F6F5FB; }
.pp { gap: 14px; }
.pp-top { background: rgba(255, 255, 255, .94); border-bottom-color: var(--line-2); }
.pp-top-study { font: 600 15px var(--font); color: var(--ink); }
.pp-card, .pp-q, .pp-task-link { box-shadow: none; border: 1px solid var(--line-2); }
.pp-card { border-radius: 18px; }
.pp-q { border-radius: 18px; padding: 18px; }
.pp-hello h1 { font-size: 28px; }
.pp-day { justify-self: start; text-transform: none; letter-spacing: 0; font: 600 13px var(--font); color: var(--violet-ink) !important; background: var(--lilac); padding: 4px 11px; border-radius: 999px; }
.pp-h2 { font: 600 14px var(--font); color: var(--ink-2); margin: 10px 4px 0; }
.pp-qnum { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--violet-ink); margin-bottom: -4px; }
.pp-task-link { border-radius: 16px; padding: 16px; }
.pp-task.is-todo .pp-task-link { border-color: #D9D2FF; }
.pp-task.is-missed .pp-task-link, .pp-tasks-quiet .pp-task-link { background: transparent; border-style: dashed; }
.pp-task-main strong { font-weight: 600; }
.pp-btn { border-radius: 14px; font-weight: 600; }
.pp-option, .pp-tick { border-radius: 14px; }
.pp-scale span { border-radius: 12px; }
.pp-back { font-weight: 500; }

/* recording: the coral button, with drawn icons */
.pp-btn-rec { background: var(--coral); color: #fff; min-height: 56px; font-size: 17px; }
.pp-btn-rec:hover { background: #D63E47; }
.pp-btn-rec.pp-btn-ghost, .pp-btn-ghost.pp-btn-rec { background: #fff; color: var(--ink); }
.pp-cam, .pp-mic { border: 0; border-radius: 0; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.pp-cam { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.5 10.5 21 7v10l-5.5-3.5'/%3E%3Crect x='2.5' y='6' width='13' height='12' rx='2.5'/%3E%3C/svg%3E"); }
.pp-mic { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21'/%3E%3C/svg%3E"); }
.pp-recording { background: #FFF1F2; border: 1px solid #F8CED1; }

/* bottom bar icons */
.pp-nav { border-top-color: var(--line-2); background: #fff; }
.pp-nav a { font-weight: 500; }
.pp-nav a.is-active { color: var(--violet-ink); font-weight: 600; }
.pp-ico { border: 0; border-radius: 0; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.pp-ico-today { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3Ccircle cx='12' cy='15' r='1.6' fill='black'/%3E%3C/svg%3E"); }
.pp-ico-msg { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 14.5a2.5 2.5 0 0 1-2.5 2.5H8.5l-5 4V6a2.5 2.5 0 0 1 2.5-2.5h12A2.5 2.5 0 0 1 20.5 6z'/%3E%3C/svg%3E"); }
.pp-ico-help { border-radius: 0; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.6 9.3a2.5 2.5 0 0 1 4.8.9c0 1.7-2.4 2.2-2.4 3.8M12 17h.01'/%3E%3C/svg%3E"); }
.pp-nav-badge { background: var(--coral); }
.danger-zone { border-color: #F3CDD0; }
.danger-zone .card-title { color: var(--error); }
.danger-form { margin-top: 12px; gap: 12px; }
.home-2fa { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0; }
/* AI transcripts in the feed */
.tr { flex-basis: 100%; width: 100%; max-width: 640px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tr-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tr-switch button { border: 0; background: #fff; font: inherit; font-size: 12px; padding: 4px 10px; cursor: pointer; color: var(--ink-2); }
.tr-switch button[aria-pressed=true] { background: var(--violet); color: #fff; }
.tr-lines { list-style: none; margin: 0; padding: 6px 4px; max-height: 240px; overflow-y: auto; font-size: 14px; line-height: 1.45; }
.tr-lines li { display: grid; grid-template-columns: 52px 1fr; gap: 6px; padding: 3px 8px; border-radius: 6px; }
.tr-lines li:hover { background: var(--bg); }
.tr-time { border: 0; background: none; padding: 0; font: 600 12px/1.9 "IBM Plex Sans", sans-serif; color: var(--violet); cursor: pointer; text-align: left; font-variant-numeric: tabular-nums; }
.tr-time:hover { text-decoration: underline; }
.tr-note { margin: 0; padding: 8px 12px; font-size: 13px; color: var(--ink-2); }
.tr-retry { display: inline; }
.tr-again { border: 0; background: none; padding: 0; font: inherit; color: var(--violet); text-decoration: underline; cursor: pointer; }
/* search in the feed */
.fd-search { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding-bottom: 12px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.fd-filters .fd-search input[type=search] { flex: 1 1 280px; width: auto; max-width: none; font-size: 15px; padding: 10px 12px; }
.fd-filters .fd-smart { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.fd-filters .fd-smart input { width: auto; padding: 0; }
.fd-list mark { background: #FFE58A; color: inherit; border-radius: 3px; padding: 0 1px; }
.tr-lines li.is-hit { background: #FFF8D6; }
/* AI analysis */
.an-running { display: flex; align-items: center; gap: 10px; }
.an-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: an-spin .8s linear infinite; flex: none; }
@keyframes an-spin { to { transform: rotate(360deg); } }
.an-new { margin-bottom: 20px; }
.an-new summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.an-form { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 12px 16px; align-items: end; margin-top: 14px; }
.an-form .check { grid-column: 1 / -1; margin: 0; }
.an-form .btn { justify-self: start; }
@media (max-width: 700px) { .an-form { grid-template-columns: 1fr; } }
.an-overview { margin-bottom: 20px; }
.an-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.an-pick { max-width: 100%; }
.an-pick select { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
.an-focus { margin: 0 0 8px; font-size: 14px; }
.an-summary { font-size: 15.5px; line-height: 1.6; margin: 0 0 14px; }
.an-sent-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.an-sent-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; margin: 8px 0 0; color: var(--ink-2); }
.an-sent-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.s-positive { background: #1F9D6B; } .s-mixed { background: #F0B65A; } .s-neutral { background: #A9A6BD; } .s-negative { background: #D9534F; }
.an-theme { margin-bottom: 16px; border-left: 4px solid var(--violet); }
.an-theme.an-accepted { border-left-color: #1F9D6B; }
.an-theme.an-rejected { border-left-color: var(--line); opacity: .75; }
.an-th-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.an-th-head h2 { font-size: 18px; margin: 0 0 6px; }
.an-th-meta { margin: 0; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.an-pill { color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.an-pill.s-mixed, .an-pill.s-neutral { color: #2B2840; }
.an-ok { color: #1F7A54; font-weight: 600; }
.an-th-actions { display: flex; gap: 8px; flex: none; }
.an-th-summary { margin: 12px 0; line-height: 1.55; }
.an-edit summary { cursor: pointer; font-size: 13px; color: var(--violet); margin-bottom: 8px; }
.an-edit-form { display: grid; gap: 10px; max-width: 640px; margin-bottom: 12px; }
.an-ev { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.an-ev li { border-top: 1px solid var(--line); padding-top: 10px; }
.an-theme:not(.is-open) .an-ev li.an-more { display: none; }
.an-ev blockquote { margin: 0 0 4px; font-size: 14.5px; line-height: 1.5; }
.an-ev blockquote.is-quote::before { content: "\201C"; } .an-ev blockquote.is-quote::after { content: "\201D"; }
.an-ev-src { margin: 0; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.an-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 2px; }
.an-play, .an-link { border: 0; background: none; padding: 0; font: inherit; color: var(--violet); cursor: pointer; font-weight: 600; }
.an-link { font-weight: 500; }
.an-play:hover, .an-link:hover { text-decoration: underline; }
.an-inline { display: inline; }
.js-an-more { margin-top: 10px; }
.an-rejected { margin-top: 20px; }
.an-rejected > summary { cursor: pointer; color: var(--ink-2); margin-bottom: 12px; }
.an-player { border: 0; border-radius: 14px; padding: 0; background: #000; max-width: min(92vw, 900px); }
.an-player::backdrop { background: rgba(20, 18, 46, .7); }
.an-player video { display: block; max-width: 100%; max-height: 80vh; }
.an-player video.is-audio { width: min(90vw, 480px); height: 80px; }
.an-player form { position: absolute; right: 6px; top: 6px; z-index: 2; }
@media (max-width: 700px) { .an-th-head { flex-direction: column; } }
.an-ev-src .an-inline { display: inline-flex; width: auto; margin: 0; }
/* what photos show, read by AI */
.pt { flex-basis: 100%; width: 100%; max-width: 640px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
.pt summary { cursor: pointer; padding: 8px 12px; font-weight: 600; font-size: 13px; }
.pt-list { margin: 0; padding: 0 12px 10px 32px; display: grid; gap: 8px; line-height: 1.45; }
.pt-ocr { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.pt-screen > summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; }
.pt-screen:not([open]) > summary { border-bottom: 0; }
.pt-list.is-one { list-style: none; padding-left: 12px; }
/* highlight reels */
.rl-new { margin-bottom: 20px; }
.rl-new-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 12px 16px; align-items: end; }
.rl-new-form .check, .rl-new-form .btn { grid-column: 1 / -1; justify-self: start; margin: 0; }
@media (max-width: 700px) { .rl-new-form { grid-template-columns: 1fr; } }
.rl-state { font-weight: 600; font-size: 13px; }
.rl-ready .rl-state, .rl-state.rl-ready { color: #1F7A54; } .rl-state.rl-failed { color: var(--error); } .rl-state.rl-building, .rl-state.rl-queued { color: var(--violet); }
.rl-progress { margin-bottom: 16px; } .rl-progress p { margin: 0 0 8px; }
.rl-ready { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.rl-player { background: #000; border-radius: 12px; overflow: hidden; }
.rl-player video { display: block; width: 100%; max-height: 60vh; }
.rl-player.is-portrait { max-width: 340px; }
.rl-side { display: grid; gap: 10px; align-content: start; justify-items: start; }
.rl-built { margin: 0; font-size: 13px; color: var(--ink-2); }
.rl-changed { margin: 0; font-size: 13px; color: #8A5A00; background: #FFF4E5; padding: 6px 10px; border-radius: 8px; }
.rl-h3 { font-size: 14px; margin: 8px 0 0; }
.rl-link { display: flex; gap: 6px; width: 100%; }
.rl-link input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 900px) { .rl-ready { grid-template-columns: 1fr; } }
.rl-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .rl-grid { grid-template-columns: 1fr; } }
.rl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: clip; }
.rl-clip { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; counter-increment: clip; }
.rl-thumb { width: 96px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--sidebar, #17152E); display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; position: relative; }
.rl-thumb::before { content: counter(clip); position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; border-radius: 6px; padding: 0 6px; }
.rl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rl-who { margin: 0; font-size: 13px; }
.rl-note { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.rl-fields { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.rl-fields label { display: inline-flex; align-items: center; gap: 6px; }
.rl-fields input { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; width: 74px; }
.rl-fields .rl-card { flex: 1 1 240px; } .rl-fields .rl-card input { flex: 1; width: auto; min-width: 0; }
.rl-moves { display: grid; gap: 4px; align-content: start; justify-items: end; }
.rl-mv { width: 30px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; font-size: 15px; }
.rl-mv:hover { border-color: var(--violet); color: var(--violet); }
.rl-rm { font-size: 12px; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
@media (max-width: 600px) { .rl-clip { grid-template-columns: 64px minmax(0, 1fr); } .rl-thumb { width: 64px; height: 48px; } .rl-moves { grid-column: 1 / -1; display: flex; justify-content: flex-start; } }
.rl-aside { display: grid; gap: 16px; }
.rl-radios { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; font-size: 14px; }
.rl-radios legend { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.rl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rl-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; margin: 0 0 10px; }
.rl-tags a { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-2); }
.rl-tags a.is-on { background: var(--violet); border-color: var(--violet); color: #fff; }
.rl-av { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 520px; overflow-y: auto; }
.rl-av li { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13.5px; }
.rl-av-note { display: block; color: var(--ink-2); font-size: 12.5px; }
.rl-delete { margin-top: 24px; } .rl-delete summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
/* journey maps: participant app */
.pp-journey { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 10px; counter-reset: jstep; }
.pp-jstep { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; counter-increment: jstep; position: relative; }
.pp-jstep::before { content: counter(jstep); position: absolute; left: -9px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--violet); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.pp-jname { margin: 0 0 6px; font-weight: 600; font-size: 15px; }
input.pp-jname { width: 100%; font: inherit; font-weight: 500; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.pp-faces { display: flex; gap: 6px; }
.pp-faces label { flex: 1; cursor: pointer; }
.pp-faces input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pp-faces span { display: grid; place-items: center; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 24px; filter: grayscale(.85); opacity: .7; transition: all .12s; }
.pp-faces input:checked + span { filter: none; opacity: 1; border-color: var(--violet); background: #F1EDFF; transform: scale(1.06); }
.pp-faces input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
.pp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pp-jnote { width: 100%; margin-top: 8px; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; min-height: 38px; }
/* journey maps: feed and analysis */
.jr { margin: 0; max-width: 640px; }
.jr-chart { width: 100%; height: auto; display: block; background: var(--bg); border-radius: 10px; }
.jr-mid { stroke: #D6D3E3; stroke-dasharray: 4 4; }
.jr-line { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linejoin: round; }
.jr-dot { stroke: #fff; stroke-width: 2; }
.jr-dot.f1 { fill: #D9534F; } .jr-dot.f2 { fill: #EF8A5B; } .jr-dot.f3 { fill: #A9A6BD; } .jr-dot.f4 { fill: #5DBE8E; } .jr-dot.f5 { fill: #1F9D6B; }
.jr-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.jr-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 2px 8px; align-items: baseline; }
.jr-face { font-size: 18px; grid-row: span 2; }
.jr-note { margin: 0; padding: 4px 8px; font-size: 13.5px; }
.jr-sum { margin-bottom: 20px; }
.jr-big { margin: 10px 0 14px; }
.jr-table .num { text-align: right; white-space: nowrap; }
.jr-pain td { background: #FFF5F3; }
.jr-pill { background: #FBE3DF; color: #A23A2C; }
.pv-journey { display: grid; gap: 6px; }
.pv-jstep { display: grid; gap: 2px; font-size: 11px; }
.pv-faces { letter-spacing: 3px; font-size: 13px; }
.jr-mode { border: 0; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.jr-big { max-width: 720px; }
/* screen recording on phones: how to, then upload */
.pp-screen { width: 100%; border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; background: #FAF9FF; font-size: 14px; }
.pp-screen p { margin: 0 0 8px; }
.pp-screen ul { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 13.5px; }

/* Live interviews */
.iv-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; align-items: end; }
.iv-form .iv-topic { grid-column: 1 / -1; }
.iv-form .check, .iv-form .btn { grid-column: 1 / -1; justify-self: start; }
.iv-h2 { font-size: 16px; margin: 28px 0 10px; }
.iv-act { text-align: right; white-space: nowrap; }
.iv-rec video { width: 100%; max-height: 520px; background: #000; border-radius: 12px; }
.iv-manage { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.iv-manage form { margin: 0; }
@media (max-width: 860px) { .iv-form { grid-template-columns: 1fr 1fr; } }

.call-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.call-side { display: grid; gap: 16px; }
.call-side .card { padding: 18px; }
.call-side textarea { width: 100%; }
.call { display: grid; gap: 12px; }
.call-stage { position: relative; aspect-ratio: 16 / 9; background: #17152E; border-radius: 16px; overflow: hidden; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #17152E; }
.call-local { position: absolute; right: 12px; bottom: 12px; width: 22%; min-width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .8); background: #2A2748; transform: scaleX(-1); box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
.call:not(.is-started) .call-local { display: none; }
.call-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 80%; margin: 0; padding: 12px 16px; border-radius: 12px; background: rgba(23, 21, 46, .78); color: #fff; font-size: 14px; text-align: center; }
.call-status.is-warn { background: rgba(236, 76, 85, .92); }
.call-rec-badge { display: none; position: absolute; left: 12px; top: 12px; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(23, 21, 46, .7); color: #fff; font: 700 12px var(--font); letter-spacing: .06em; }
.call-rec-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: call-blink 1.2s infinite; }
.call.is-rec .call-rec-badge { display: inline-flex; }
@keyframes call-blink { 50% { opacity: .25; } }
.call-join { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.call.is-started .call-join { display: none; }
.call-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.call-bar .js-leave { margin-left: auto; }
.call-bar [aria-pressed="true"] { background: var(--lilac); border-color: var(--violet); color: var(--violet); }
.call-clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.call-clip { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--lilac); font-size: 12px; font-weight: 600; }
.call-clip img { width: 100%; height: 100%; object-fit: cover; }
.call-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; max-height: 260px; overflow: auto; }
@media (max-width: 1000px) { .call-page { grid-template-columns: 1fr; } }

.call-p .call-stage { aspect-ratio: 3 / 4; border-radius: 20px; }
.call-p .call-remote { object-fit: cover; }
.call-p .call-local { width: 30%; }
.call-p .call-bar { justify-content: center; }
.call-p .call-bar .js-leave { margin-left: 0; }
.call-p .call-bar .pp-btn { min-height: 44px; padding: 10px 14px; font-size: 15px; }

.pp-iv { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 16px 18px; color: var(--ink); }
.pp-iv:hover { text-decoration: none; }
.pp-iv-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--lilac); position: relative; }
.pp-iv-icon::before { content: ""; position: absolute; left: 9px; top: 13px; width: 16px; height: 14px; border-radius: 3px; background: var(--violet); }
.pp-iv-icon::after { content: ""; position: absolute; left: 25px; top: 15px; border: 5px solid transparent; border-left: 0; border-right: 7px solid var(--violet); }
.pp-iv-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pp-iv-main span { font-size: 13px; color: var(--ink-3); }
.pp-iv-go { flex: none; font-size: 13px; font-weight: 600; color: var(--ink-3); text-align: right; max-width: 40%; }
.pp-iv.is-open { box-shadow: 0 0 0 2px var(--coral), var(--shadow); }
.pp-iv.is-open .pp-iv-go { color: #fff; background: var(--coral); padding: 9px 14px; border-radius: 10px; }
.iv-rec textarea, .iv-notes textarea { width: 100%; }
.iv-save { margin-top: 10px; }

/* Admin, Agencies: the Change menu opens over the table instead of being cut off by it */
.card.card-flush.ag-wrap { overflow: visible; }
.ag-wrap .table thead th:first-child { border-top-left-radius: var(--radius); }
.ag-wrap .table thead th:last-child { border-top-right-radius: var(--radius); }
.ag-actions[open] > summary { border-color: var(--violet); color: var(--violet); }
.ag-box { z-index: 30; width: 300px; min-width: 0; max-width: calc(100vw - 32px); gap: 10px; padding: 14px; }
.ag-box .inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ag-box select { font: 400 14px var(--font); padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); min-width: 0; width: 100%; }
.ag-box select:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.ag-box form:not(.inline-form) .btn, .ag-box > a.btn { width: 100%; justify-content: center; }
.ag-box .inline-form + form:not(.inline-form) { border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 760px) {
  .card.card-flush.ag-wrap { overflow-x: auto; }
  .ag-box { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-width: none; z-index: 60; box-shadow: 0 12px 40px rgba(23, 21, 46, .3); }
}

/* Home dashboard */
.db-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 16px; }
.db-study select { font: 500 14px var(--font); padding: 8px 34px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); max-width: 340px; }
.db-period { display: inline-flex; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.db-period a { padding: 6px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.db-period a:hover { text-decoration: none; color: var(--violet); }
.db-period a.is-active { background: var(--lilac); color: var(--violet-ink); }
.db-note { margin-left: auto; }
.db-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.db-kpi { padding: 16px 18px; display: grid; gap: 4px; align-content: start; color: var(--ink); }
.db-kpi-link:hover { text-decoration: none; border-color: var(--violet); }
.db-kpi-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.db-delta { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.db-delta span { font-weight: 400; color: var(--ink-3); }
.db-delta.is-up { color: var(--ok); }
.db-delta.is-down { color: var(--error); }
.db-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.db-row-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.db-row-3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.db-card { padding: 18px 22px; display: grid; gap: 14px; align-content: start; }
.db-card.card-flush { padding: 0; gap: 0; }
.db-pad { padding: 16px 22px; }
.db-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.db-head h2 { font-size: 16px; }
.card-flush .db-head { border-bottom: 1px solid var(--line-2); }
.db-chart { position: relative; padding-top: 18px; }
.db-ymax { position: absolute; top: 0; left: 0; font-size: 11.5px; color: var(--ink-3); }
.db-bars { height: 170px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); background: linear-gradient(to bottom, var(--line-2) 1px, transparent 1px) 0 0 / 100% 50%; }
.db-chart-short .db-bars { height: 110px; }
.db-bars.is-dense { gap: 1px; }
.db-bar { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; }
.db-bar::before { content: ""; width: 100%; height: max(var(--h), 0%); background: var(--violet); border-radius: 4px 4px 0 0; }
.db-bar:hover::before { background: var(--violet-ink); }
.db-bar::after, .db-wd::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: #17152E; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 8px; border-radius: 6px; pointer-events: none; opacity: 0; transition: opacity .1s; z-index: 3; }
.db-bar:hover::after, .db-wd:hover::after { opacity: 1; }
.db-bar:first-child::after, .db-bar:nth-child(2)::after { left: 0; transform: none; }
.db-bar:last-child::after, .db-bar:nth-last-child(2)::after { left: auto; right: 0; transform: none; }
.db-bars .db-bar { height: 100%; }
.db-bar[style*="--h:0%"]::before { height: 2px; background: var(--line); border-radius: 1px; }
.db-xlabels { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.db-xlabels span { white-space: nowrap; overflow: visible; }
.db-table summary { cursor: pointer; color: var(--ink-3); }
.db-table table { margin-top: 8px; font-size: 13px; }
.db-table { max-height: 320px; overflow: auto; }
.db-funnel, .db-mix, .db-work { list-style: none; display: grid; gap: 12px; }
.db-funnel li { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; font-size: 14px; }
.db-f-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.db-f-num em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.db-track { grid-column: 1 / -1; display: block; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.db-track i { display: block; height: 100%; background: var(--violet); border-radius: 4px; }
.db-mix li { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; font-size: 14px; }
.db-mix b { font-variant-numeric: tabular-nums; }
.db-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.db-wd { position: relative; display: grid; gap: 4px; justify-items: center; font-size: 11.5px; color: var(--ink-3); }
.db-wd i { display: block; width: 100%; height: 44px; background: var(--line-2); border-radius: 6px; position: relative; overflow: hidden; }
.db-wd i::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); background: var(--violet); }
.db-wd b { font-weight: 600; }
.db-tip { margin: 0; }
.db-health { margin-bottom: 20px; }
.db-health .table td { vertical-align: middle; }
.db-pct { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.db-pct .db-track { flex: 1; }
.db-pct b { font-variant-numeric: tabular-nums; font-size: 13.5px; }
.db-behind { display: inline-block; font-size: 12.5px; font-weight: 700; color: #A6252D; background: #FDEEEF; padding: 3px 9px; border-radius: 999px; }
.db-spark { width: 130px; height: 28px; color: var(--violet); display: block; }
.db-nudge li { padding: 12px 22px; justify-content: space-between; }
.db-nudge-main { display: grid; gap: 2px; min-width: 0; }
.db-work { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.db-work li { display: grid; gap: 2px; }
.db-work b { font: 600 22px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.db-work span { font-size: 13px; color: var(--ink-2); }
.db-work em { font-style: normal; }
@media (max-width: 1280px) { .db-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .db-row-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1000px) { .db-row, .db-row-wide, .db-row-3 { grid-template-columns: 1fr; } .db-note { margin-left: 0; width: 100%; } }
@media (max-width: 600px) { .db-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .db-kpi { padding: 14px; } .db-study select { max-width: 100%; } .db-study { width: 100%; } }
.db-card { grid-template-columns: minmax(0, 1fr); }
.db-xlabels span:last-child { direction: rtl; text-align: left; }
.db-htable th, .db-htable td { display: table-cell !important; }
@media (max-width: 760px) { .db-htable th:nth-child(6), .db-htable td:nth-child(6), .db-htable th:nth-child(7), .db-htable td:nth-child(7), .db-htable th:nth-child(9), .db-htable td:nth-child(9) { display: none !important; } }
.db-bar::after, .db-wd::after { display: none; }
.db-bar:hover::after, .db-wd:hover::after { display: block; }
.db-wd:last-child::after { left: auto; right: 0; transform: none; }
.db-wd:first-child::after { left: 0; transform: none; }

/* Admin dashboard */
.db-kpi-trio i { font-style: normal; color: var(--ink-3); font-weight: 400; }
.db-h3 { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.db-mix em { font-style: normal; font-weight: 400; margin-left: 4px; }
.db-agtable td { white-space: nowrap; }
.db-agtable th, .db-agtable td { padding-left: 10px; padding-right: 10px; }
@media (max-width: 760px) { .db-agtable th:nth-child(n+5), .db-agtable td:nth-child(n+5) { display: table-cell !important; } }

/* Admin: plan controls (agency menu and agency page) */
.pf-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.pf-form select, .pf-form input[type=date] { font: 400 14px var(--font); padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); min-width: 0; }
.pf-label { flex: 1 0 100%; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.pf-hint { flex: 1 0 100%; }
.pf-plan select[name=plan] { flex: 1 1 100%; }
.pf-plan select[name=for] { flex: 1 1 auto; }
.ag-box { width: 360px; }
.ag-box .pf-form + .pf-form { border-top: 1px solid var(--line); padding-top: 10px; }
.pf-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.pf-box { align-items: start; }
.pf-box .pf-form { align-content: flex-start; }

/* Participant checks (participant side) */
.pp-check-note { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.pp-loc-join { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pp-loc.is-done { box-shadow: none; border: 1px solid #BFE6D3; background: var(--ok-bg); }

/* Participant checks (team side) */
.ck { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.ck-ok { background: var(--ok-bg); color: var(--ok); border-color: #BFE6D3; }
.ck-review { background: #FFF6E5; color: #92400E; border-color: #F8E1B4; }
.ck-blocked { background: #FDEEEF; color: #A6252D; border-color: #F3C3CA; }
.pt-tab-check { color: #92400E; }
.ck-card { display: grid; gap: 12px; margin-top: 20px; }
.ck-head { display: flex; align-items: center; gap: 12px; }
.ck-head .card-title { margin: 0; }
.ck-reasons { list-style: none; display: grid; gap: 6px; }
.ck-r { font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--bg); }
.ck-r b { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-right: 6px; }
.ck-r-high { color: #A6252D; } .ck-r.ck-r-high { background: #FDEEEF; }
.ck-r-medium { color: #92400E; } .ck-r.ck-r-medium { background: #FFF6E5; }
.ck-r-low { color: var(--ink-2); }
.ck-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ck-actions form { margin: 0; }
.ck-hist summary { cursor: pointer; color: var(--ink-3); }
.ck-hist table { font-size: 13px; margin-top: 8px; }
.ck-hist td { vertical-align: top; }
.ck-countries { min-height: 140px; }

/* Admin, Website analytics */
.ws-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.ws-live i { width: 8px; height: 8px; border-radius: 50%; background: #1FA971; box-shadow: 0 0 0 4px rgba(31, 169, 113, .18); }
.ws-chart { margin-bottom: 20px; }
.ws-table td:first-child { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-small { list-style: none; display: grid; gap: 4px; font-size: 13.5px; }

/* Admin, Integrations, WhatsApp */
.wa-test { margin-bottom: 16px; }
.wa-test select { font: 400 14px var(--font); padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.wa-tpl td, .wa-tpl th { padding: 6px 6px; vertical-align: top; }
.wa-tpl td:first-child { min-width: 190px; }
.wa-tpl input { width: 100%; min-width: 92px; font: 400 12px var(--font-mono, monospace); padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; }
.wa-tpl input:focus { border-color: var(--violet); outline: none; }

/* Sign-in codes by phone */
.code-resend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 6px; }
.code-resend form { margin: 0; }
.twofa-alt { margin: 4px 0 14px; font-size: 14px; font-weight: 600; }
.acct-2fa { display: grid; gap: 12px; margin-top: 20px; }
.acct-2fa-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.acct-2fa-actions form { margin: 0; }
.ic-block { min-width: 0; }
.wa-tpl-wrap { max-width: 100%; overflow-x: auto; }
.wa-recent { margin-top: 20px; display: grid; gap: 10px; }
.wa-recent h3 { font-size: 15px; }
.wa-recent table { font-size: 13px; }
.wa-nowa { list-style: none; display: grid; gap: 6px; }
.wa-nowa li { display: flex; align-items: center; gap: 12px; }
.wa-nowa form { margin: 0; }
.wa-recent td:nth-child(-n+4), .wa-recent th { white-space: nowrap; }
.ic-sub { font: 600 15px var(--font-head); margin: 0; }

/* ---------- Live sessions on the video server (room.js): tiles, icon toolbar, chat, people ---------- */
.call-main { display: grid; gap: 12px; min-width: 0; }
.call-head h1 { font-size: 22px; margin: 0 0 4px; }
.rt { position: relative; }
.rt-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); background: #17152E; border-radius: 16px; overflow: hidden; width: 100%; aspect-ratio: 16 / 10; color: #fff; }
.rt-stage.has-side { grid-template-columns: minmax(0, 1fr) 320px; }
.rt-grid { --cols: 1; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 6px; padding: 6px 6px 76px; min-height: 0; align-content: stretch; }
.rt-tile { position: relative; background: #26234A; border-radius: 12px; overflow: hidden; min-height: 0; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s; }
.rt-tile.is-speaking { outline-color: #8C74FF; }
.rt-tile video { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover !important; }
.rt-tile.is-local video { transform: scaleX(-1); }
.rt-tile.no-video video { visibility: hidden; }
.rt-avatar { display: none; position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: #6D4AFF; color: #fff; font: 700 30px var(--font-head); place-items: center; }
.rt-tile.no-video .rt-avatar { display: grid; }
.rt-name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: rgba(0, 0, 0, .55); font-size: 13px; line-height: 1.3; }
.rt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-mic { display: none; width: 16px; height: 16px; color: #FF8A8F; }
.rt-mic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rt-tile.is-muted .rt-mic { display: inline-block; }
.rt-prejoin { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 18px; padding: 20px; background: #17152E; z-index: 2; }
.rt-preview { width: min(420px, 80%); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #26234A; transform: scaleX(-1); }
.rt-join { min-height: 48px; padding: 12px 26px; border: 0; border-radius: 999px; background: #6D4AFF; color: #fff; font: 600 16px var(--font); cursor: pointer; }
.rt-join:hover { background: #5233E6; }
.rt-join:disabled { opacity: .6; cursor: default; }
.rt.is-ended .rt-preview { display: none; }
.rt-waiting, .rt-status { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); max-width: 80%; margin: 0; padding: 12px 16px; border-radius: 12px; background: rgba(23, 21, 46, .82); color: #fff; font-size: 14px; text-align: center; z-index: 3; }
.rt-status { top: auto; bottom: 86px; transform: translateX(-50%); }
.rt-status.is-warn { background: rgba(236, 76, 85, .92); }
.rt-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: 90%; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; box-shadow: var(--shadow-pop); z-index: 6; }
.rt-rec-badge { display: none; position: absolute; left: 12px; top: 12px; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(23, 21, 46, .75); color: #fff; font: 700 12px var(--font); letter-spacing: .06em; z-index: 4; }
.rt-rec-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: call-blink 1.2s infinite; }
.rt.is-rec.is-joined .rt-rec-badge { display: inline-flex; }
.rt-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 12px; background: linear-gradient(to top, rgba(10, 9, 24, .85), rgba(10, 9, 24, 0)); z-index: 4; }
.rt:not(.is-joined) .rt-bar { display: none; }
.rt-stage.has-side .rt-bar { right: 320px; }
.rt-btn { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background .15s; }
.rt-btn:hover { background: rgba(255, 255, 255, .26); }
.rt-btn:focus-visible { outline: 3px solid #B9A9FF; outline-offset: 2px; }
.rt-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rt-btn svg .fill { fill: currentColor; }
.rt-btn.is-off { background: #fff; color: var(--coral); }
.rt-btn.rt-rec.is-on { background: var(--coral); }
.rt-btn.rt-leave { width: 60px; border-radius: 24px; background: var(--coral); }
.rt-btn.rt-leave:hover { background: #D33A43; }
.rt-btn.rt-leave svg { transform: rotate(135deg); }
.rt-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; }
.rt-btn:hover .rt-tip, .rt-btn:focus-visible .rt-tip { opacity: 1; }
.rt-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font: 700 11px/18px var(--font); font-style: normal; }
.rt-menu { position: absolute; bottom: 70px; right: 12px; display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-pop); z-index: 7; }
.rt-menu button { border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 10px 14px; font: 500 14px var(--font); text-align: left; cursor: pointer; }
.rt-menu button.is-danger { background: var(--coral); border-color: var(--coral); color: #fff; }
.rt-side { display: flex; flex-direction: column; min-height: 0; background: #fff; color: var(--ink); border-left: 1px solid #2A2748; }
.rt-side[hidden] { display: none; }
.rt-side-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rt-x { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.rt-chat, .rt-people { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.rt-chat[hidden], .rt-people[hidden] { display: none; }
.rt-tabs { display: flex; gap: 4px; padding: 8px 10px 0; }
.rt-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: none; padding: 8px 4px; font: 500 13px var(--font); color: var(--ink-3); cursor: pointer; }
.rt-tabs button[aria-selected="true"] { color: var(--violet-ink); border-bottom-color: var(--violet); }
.rt-chat-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: grid; align-content: start; gap: 8px; min-height: 0; }
.rt-msg { padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.rt-msg.is-mine { background: var(--lilac); }
.rt-msg.is-back { border-left: 3px solid var(--violet); }
.rt-msg-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.rt-msg-head strong { color: var(--ink); font-weight: 600; }
.rt-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rt-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.rt-chat-form textarea { resize: none; font: 14px var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.rt-chat-form button { border: 0; border-radius: 8px; background: var(--violet); color: #fff; font: 600 14px var(--font); padding: 0 14px; cursor: pointer; }
.rt-chat-form button:disabled, .rt-chat-form textarea:disabled { opacity: .55; cursor: default; }
.rt-people { padding: 12px; gap: 10px; }
.rt-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rt-people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; overflow-y: auto; }
.rt-people-list li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.rt-p-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-mini { border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 5px 9px; font: 500 12px var(--font); cursor: pointer; }
.rt-mini:disabled { opacity: .5; cursor: default; }
.rt-mini-danger { color: var(--error); }
.rt-stage:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.rt-stage:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.rt-stage.is-pseudo-full { position: fixed; inset: 0; z-index: 1000; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100dvh; }
body.rt-noscroll { overflow: hidden; }
.rt-audio { display: none; }
.call-body { background: var(--bg); }
.call-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 16px; }
.call-logo { width: 150px; height: auto; }
.guest-head h1 { font-size: 22px; margin: 0 0 4px; }
@media (max-width: 760px) {
  .rt-stage { aspect-ratio: 3 / 4; min-height: 0; border-radius: 16px; }
  .rt-stage.has-side { grid-template-columns: minmax(0, 1fr); }
  .rt-stage.has-side .rt-side { position: absolute; inset: 0 0 68px 0; z-index: 8; border-left: 0; border-radius: 0 0 12px 12px; }
  .rt-stage.has-side .rt-bar { right: 0; }
  .rt-btn { width: 44px; height: 44px; }
  .rt-btn.rt-leave { width: 54px; }
  .rt-bar { gap: 8px; padding: 10px 6px; }
  .rt-tip { display: none; }
}
.iv-kind { border: 0; padding: 0; margin: 0; grid-column: 1 / -1; }
.iv-group, .iv-outside { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; }
.iv-group legend, .iv-outside legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.iv-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; max-height: 220px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.iv-out-rows { display: grid; gap: 6px; margin-bottom: 8px; }
.iv-out-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 140px auto; gap: 6px; align-items: center; }
.iv-out-rows .iv-out-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 140px; }
.iv-out-row input, .iv-out-row select { min-width: 0; }
.iv-roles { margin: 8px 0 0; padding-left: 18px; }
.iv-add { display: grid; gap: 10px; margin-top: 14px; }
.iv-people .iv-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.iv-chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; max-height: 420px; overflow-y: auto; }
.iv-chat li.is-back { padding-left: 10px; border-left: 3px solid var(--violet); }
@media (max-width: 700px) { .iv-out-row, .iv-out-rows .iv-out-row { grid-template-columns: 1fr; } }
.rt-prejoin[hidden], .rt-waiting[hidden], .rt-status[hidden], .rt-toast[hidden], .rt-badge[hidden] { display: none; }
.iv-form [hidden] { display: none !important; }
/* ---------- grid questions ---------- */
.grid-edit-parts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.grid-part { display: grid; gap: 8px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.grid-items { display: grid; gap: 8px; }
.grid-items .option-row input[type=text] { min-width: 0; }
.grid-items .icon-btn { flex: none; }
@media (max-width: 600px) { .grid-items .option-row { flex-wrap: wrap; } .grid-items .option-row input[type=text] { flex: 1 0 100%; } }
.pv-grid { display: grid; gap: 6px; }
.pv-grow { display: grid; gap: 4px; font-size: 11px; }
.pv-gcols { display: flex; flex-wrap: wrap; gap: 3px; }
.pv-gpill { border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; font-size: 10px; color: var(--ink-2); }
.fd-grid { margin: 0; display: grid; max-width: 560px; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; font-size: 14px; }
.fd-grid > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 7px 12px; }
.fd-grid > div + div { border-top: 1px solid var(--line-2); }
.fd-grid dt { color: var(--ink-2); }
.fd-grid dd { margin: 0; font-weight: 600; }
.gr-table td.gr-top { font-weight: 700; background: #F1EDFF; }
.pp-grid { display: grid; gap: 10px; }
.pp-grid-head { display: none; }
.pp-grow { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pp-grow:has(input:checked) { border-color: #D8D2FF; background: #FBFAFF; }
.pp-grow.is-missing { border-color: var(--error); background: var(--error-bg); }
.pp-grow-name { flex: 0 0 100%; margin: 0; font-weight: 600; font-size: 15px; line-height: 1.35; }
.pp-gcell { position: relative; cursor: pointer; }
.pp-gcell input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pp-gpill { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 15px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 15px; line-height: 1.25; }
.pp-gpill i { display: none; }
.pp-gpill b { font-weight: 500; }
.pp-gcell input:checked + .pp-gpill { background: var(--violet); border-color: var(--violet); color: #fff; }
.pp-gcell input:focus-visible + .pp-gpill { outline: 3px solid var(--violet); outline-offset: 2px; }
@media (min-width: 600px) {
  .pp-grid.can-table { gap: 0; }
  .pp-grid.can-table .pp-grid-head, .pp-grid.can-table .pp-grow { display: grid; grid-template-columns: minmax(120px, 1.6fr) repeat(var(--cols), minmax(0, 1fr)); align-items: center; gap: 4px; }
  .pp-grid.can-table .pp-grid-head span { font-size: 12.5px; color: var(--ink-2); text-align: center; padding: 0 2px 8px; line-height: 1.25; }
  .pp-grid.can-table .pp-grow { padding: 4px 8px; border: 0; border-top: 1px solid var(--line-2); border-radius: 8px; background: none; }
  .pp-grid.can-table .pp-grow:has(input:checked) { background: #FBFAFF; }
  .pp-grid.can-table .pp-grow.is-missing { background: var(--error-bg); }
  .pp-grid.can-table .pp-grow-name { font-weight: 500; }
  .pp-grid.can-table .pp-gcell { display: grid; place-items: center; min-height: 44px; }
  .pp-grid.can-table .pp-gpill { min-height: 0; padding: 0; border: 0; background: none; }
  .pp-grid.can-table .pp-gpill b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pp-grid.can-table .pp-gpill i { display: block; width: 24px; height: 24px; border: 2px solid #B9B3D6; border-radius: 50%; background: #fff; }
  .pp-grid.can-table.is-many .pp-gpill i { border-radius: 6px; }
  .pp-grid.can-table .pp-gcell:hover .pp-gpill i { border-color: var(--violet); }
  .pp-grid.can-table .pp-gcell input:checked + .pp-gpill { background: none; color: inherit; }
  .pp-grid.can-table .pp-gcell input:checked + .pp-gpill i { border-color: var(--violet); background: var(--violet); box-shadow: inset 0 0 0 4px #fff; }
  .pp-grid.can-table .pp-gcell input:focus-visible + .pp-gpill { outline: 0; }
  .pp-grid.can-table .pp-gcell input:focus-visible + .pp-gpill i { outline: 3px solid var(--violet); outline-offset: 2px; }
}

/* ---------- thank-you after the last task ---------- */
.pp-mark-done { position: relative; }
.pp-mark-done::after { content: ""; position: absolute; left: 50%; top: 46%; width: 16px; height: 9px; border: solid #fff; border-width: 0 0 3px 3px; transform: translate(-50%, -50%) rotate(-45deg); }
.pp-thanks-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 14px; border-color: #D8D2FF; background: #FBFAFF; }
.pp-thanks-card .pp-mark { width: 44px; height: 44px; box-shadow: inset 0 0 0 9px rgba(255, 255, 255, .55); }
.pp-thanks-card h2 { margin: 2px 0 4px; }
.field.has-error textarea { border-color: var(--error); }
.rt-status, .rt-waiting, .rt-toast { pointer-events: none; }
.rt:not(.is-joined) .rt-status { top: 14px; bottom: auto; transform: translateX(-50%); }
.wa-texts { margin-top: 14px; }
.wa-texts summary { cursor: pointer; font-weight: 600; }
.wa-texts .field { max-width: 360px; margin: 10px 0; }
.wa-text { margin: 12px 0; display: grid; gap: 6px; }
.wa-text textarea { width: 100%; font: 400 14px var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.wa-text .btn { justify-self: start; }
.pp-row .pp-btn-small { white-space: nowrap; flex: none; }

/* Material shown to participants above a task's questions */
.mat-card .muted.small { margin-bottom: 12px; }
.mat-list { list-style: none; display: grid; gap: 10px; margin: 0 0 16px; padding: 0; }
.mat-item { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.mat-thumb { position: relative; flex: none; width: 72px; height: 54px; border-radius: 8px; overflow: hidden; background: var(--lilac); display: grid; place-items: center; }
.mat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mat-ico { font-style: normal; font-size: 20px; color: var(--violet-dark); }
.mat-play { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.mat-play::after { content: ""; position: absolute; left: 8px; top: 6px; border: 5px solid transparent; border-left: 8px solid #fff; }
.mat-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mat-body strong, .mat-body .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-act { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.mat-edit summary { list-style: none; }
.mat-edit summary::-webkit-details-marker { display: none; }
.mat-edit[open] { flex-basis: 100%; }
.mat-edit-form { display: grid; gap: 8px; margin-top: 8px; min-width: 240px; }
.pill-warn { background: #FFF1E6; color: #8A3B00; border: 1px solid #F5C9A8; }
.mat-add { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mat-form { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.mat-form h3 { font-size: 15px; margin: 0; }
.mat-form .btn { justify-self: start; }
@media (max-width: 760px) { .mat-add { grid-template-columns: 1fr; } .mat-item { flex-wrap: wrap; } }
.pv-mat { display: block; width: 100%; border-radius: 10px; margin: 8px 0; }
.pv-mat-video { position: relative; }
.pv-mat-video img { display: block; width: 100%; border-radius: 10px; }
.pv-mat-video i { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.pv-mat-link { display: grid; gap: 1px; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #F3F0FF; font-size: 12px; }
.pv-mat-link em { font-style: normal; color: var(--ink-2); }

/* participant app */
.pp-material { display: grid; gap: 12px; margin: 14px 0 6px; }
.pp-mat { margin: 0; }
.pp-mat img, .pp-mat video { display: block; width: 100%; height: auto; border-radius: 14px; background: #EEEAF9; }
.pp-mat video { max-height: 70vh; background: #000; }
.pp-mat figcaption { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.pp-mat-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); text-decoration: none; color: var(--ink); }
.pp-mat-link-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pp-mat-link-text strong { font-size: 16px; }
.pp-mat-link-text span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-mat-go { flex: none; font-weight: 600; color: var(--violet); }
.pp-mat-tip { font-size: 13px; color: var(--ink-2); margin: 0; }
.pp-zoom { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.pp-zoom::backdrop { background: rgba(10, 8, 30, .9); }
.pp-zoom img { display: block; max-width: 96vw; max-height: 90vh; margin: auto; border-radius: 8px; }
.pp-zoom-close { position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 26px; cursor: pointer; }

/* calls: a shared screen shown large above the faces */
.rt-screen { position: relative; background: #000; min-height: 0; display: grid; place-items: center; }
.rt-screen[hidden] { display: none; }
.rt:not(.has-screen) .rt-grid[data-count="3"] .rt-tile:last-child { grid-column: 1 / -1; width: calc(50% - 3px); justify-self: center; }
.rt-screen video { width: 100%; height: 100%; object-fit: contain; }
.rt-screen-name { position: absolute; left: 10px; top: 10px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.rt.has-screen .rt-stage { grid-template-columns: minmax(0, 1fr) 200px; }
.rt.has-screen .rt-stage.has-side { grid-template-columns: minmax(0, 1fr) 150px 320px; }
.rt.has-screen .rt-screen { padding: 6px 0 76px 6px; }
.rt.has-screen .rt-grid { --cols: 1 !important; grid-auto-rows: 120px; align-content: start; overflow-y: auto; padding: 6px 6px 76px; }
@media (max-width: 760px) {
  .rt.has-screen .rt-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 96px; }
  .rt.has-screen .rt-stage.has-side { grid-template-columns: minmax(0, 1fr); }
  .rt.has-screen .rt-screen { padding: 6px 6px 0; }
  .rt.has-screen .rt-grid { --cols: 4 !important; grid-auto-rows: 84px; padding: 4px 6px 72px; }
}
.rt-btn.is-on[data-k="share"] { background: var(--violet); }
.pp-paste { display: grid; gap: 8px; margin-top: 22px; text-align: start; }
.pp-paste .pp-row input { font: 400 16px var(--font); padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.pp-paste .pp-qerr { color: #B42318; font-weight: 500; }
/* consent: several items in one tick box, one per line */
.pp-tick-line, .pv-line { display: block; }
.pp-tick-line + .pp-tick-line, .pv-line + .pv-line { margin-top: 6px; }

/* ---------- participant management (ptm) ---------- */
.ptm-ico { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ptm-ico-plus { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ptm-ico-up { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3'/%3E%3C/svg%3E"); }
.ptm-ico-search { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.ptm-ico-send { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z'/%3E%3C/svg%3E"); }
.ptm-head .muted { max-width: 720px; }
.ptm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ptm-actions .btn { gap: 6px; }

.ptm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 4px 0 16px; }
.ptm-stat { display: grid; gap: 2px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.ptm-stat:hover { text-decoration: none; border-color: #C9C0FF; }
.ptm-stat strong { font: 700 24px/1.1 var(--font-head); color: var(--ink); }
.ptm-stat span { font-size: 13px; }
.ptm-stat.is-active { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.ptm-stat.is-active strong { color: var(--violet-dark); }
.ptm-stat.is-check strong { color: var(--warn); }

.ptm-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ptm-search { flex: 1 1 280px; position: relative; display: flex; align-items: center; }
.ptm-search .ptm-ico { position: absolute; left: 12px; color: var(--ink-3); }
.ptm-search input { width: 100%; font: 400 14px var(--font); padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); }
.ptm-search input:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.ptm-toolbar select { font: 400 14px var(--font); padding: 9px 30px 9px 12px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--white); color: var(--ink); max-width: 220px; }
.ptm-clear { font-size: 13px; }

.ptm-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; background: var(--lilac); border: 1px solid #D8D2FF; border-radius: 12px; }
.ptm-banner > .ptm-ico { width: 20px; height: 20px; color: var(--violet); }
.ptm-banner div { flex: 1 1 260px; display: grid; gap: 2px; font-size: 14px; }
.ptm-banner div span { color: var(--ink-2); font-size: 13px; }

.ptm-card { overflow-x: auto; }
.ptm-tablehead { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); background: #FBFAFD; }
.ptm-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
.ptm-table td { font-size: 14px; }
.ptm-row { cursor: pointer; }
.ptm-row:hover td { background: #FAF9FF; }
.ptm-row.is-ticked td { background: #F4F1FF; }
.ptm-who { display: flex; align-items: center; gap: 12px; min-width: 170px; }
.ptm-table td, .ptm-table th { white-space: nowrap; }
.ptm-table td[data-label="Group"] { white-space: normal; min-width: 90px; }
.ptm-avatar { --h: 260; width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 600 13px/1 var(--font-head); color: hsl(var(--h) 55% 32%); background: hsl(var(--h) 80% 93%); }
.ptm-avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.ptm-whotext { display: grid; gap: 2px; min-width: 0; }
.ptm-name { font-weight: 600; color: var(--ink); }
a.ptm-name:hover { color: var(--violet); }
.ptm-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.ptm-code { font: 600 12px/1 var(--font-head); color: var(--violet-dark); background: var(--lilac); padding: 3px 6px; border-radius: 6px; }
.ptm-sub .pill { font-size: 11px; padding: 2px 7px; }
.ptm-contact span { display: block; white-space: nowrap; }
.ptm-table td.ptm-contact { word-break: normal; }
.ptm-contact .muted { font-size: 13px; }
.ptm-country { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ptm-country.is-seen { color: var(--ink-3); font-style: italic; }
.ptm-cc { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 4px; font: 700 10px/1 var(--font); letter-spacing: .04em; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); font-style: normal; }
.ptm-seen { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.ptm-inv { font-size: 13px; white-space: nowrap; }
.ptm-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

.ptm-bulkbar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px 10px 16px; background: var(--navy); color: #fff; border-radius: 14px; box-shadow: var(--shadow-pop); }
.ptm-bulkbar[hidden] { display: none; }
.ptm-bulkbar strong { font-size: 14px; margin-right: 6px; }
.ptm-bulkbar select { font: 400 14px var(--font); padding: 8px 10px; border-radius: 8px; border: 0; background: #fff; color: var(--ink); max-width: 100%; }
.ptm-linkbtn { background: none; border: 0; color: #CFCBEA; font: 500 13px var(--font); cursor: pointer; text-decoration: underline; }

.ptm-dialog { margin: auto; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px; box-shadow: var(--shadow-pop); color: var(--ink); background: var(--white); }
.ptm-dialog::backdrop { background: rgba(23, 21, 46, .55); }
.ptm-dialog > form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.ptm-dhead { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line-2); }
.ptm-dhead h2 { font-size: 19px; margin-bottom: 4px; }
.ptm-dhead p { font-size: 13px; color: var(--ink-2); }
.ptm-x { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--white); font-size: 20px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.ptm-x:hover { border-color: var(--violet); color: var(--violet); }
.ptm-dbody { padding: 18px 24px; overflow-y: auto; display: grid; gap: 18px; }
.ptm-dbody .alert { margin-top: 0; }
.ptm-dfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line-2); background: #FBFAFD; border-radius: 0 0 16px 16px; }
.ptm-dbtns { display: flex; gap: 8px; margin-left: auto; }
.ptm-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.ptm-fs legend { font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 10px; }
.ptm-fs + .ptm-fs { margin-top: 10px; }
.ptm-hint { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.ptm-switch { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ptm-switch input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--violet); }
.ptm-switch span { display: grid; gap: 2px; font-size: 14px; }
.ptm-switch em { font-style: normal; font-size: 13px; color: var(--ink-2); }
.ptm-switch:has(input:checked) { border-color: var(--violet); background: #FBFAFF; }

.ptm-steps { display: grid; gap: 10px; padding-left: 20px; font-size: 14px; }
.ptm-steps li::marker { color: var(--violet); font-weight: 700; }
.ptm-steps .pt-cols { margin: 8px 0 0; }
.ptm-rules { display: grid; gap: 4px; padding: 12px 14px 12px 32px; background: var(--bg); border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.ptm-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed #CFC8F5; border-radius: 12px; background: #FBFAFF; cursor: pointer; text-align: center; }
.ptm-drop .ptm-ico { width: 24px; height: 24px; color: var(--violet); }
.ptm-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ptm-drop.is-over, .ptm-drop:hover { border-color: var(--violet); background: var(--lilac); }
.ptm-drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }

.ptm-profile { margin-bottom: 20px; padding: 20px 24px; }
.ptm-back { display: inline-block; font-size: 13px; margin-bottom: 12px; color: var(--ink-2); }
.ptm-profile-main { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ptm-profile-text { flex: 1 1 240px; display: grid; gap: 6px; }
.ptm-profile-text h1 { font-size: 24px; margin: 0; }
.ptm-profile-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ptm-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ptm-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.ptm-meta div { display: grid; gap: 4px; }
.ptm-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ptm-meta dd { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.ptm-layout { margin-top: 0; }

@media (max-width: 760px) {
  .ptm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptm-toolbar select { flex: 1 1 140px; max-width: none; }
  .ptm-who { min-width: 0; }
  .ptm-bulkbar { bottom: 8px; }
  .ptm-dhead, .ptm-dbody, .ptm-dfoot { padding-left: 16px; padding-right: 16px; }
}
.ptm-states { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* WhatsApp: templates in Twilio */
.wa-cat-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.wa-cat-head h3 { margin-bottom: 4px; }
.wa-cat-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-cat-table td { vertical-align: top; }
.wa-cat-body { margin-top: 6px; max-width: 420px; white-space: normal; }
.wa-st { display: inline-block; font: 600 12px/1 var(--font); padding: 5px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.wa-st-approved { background: var(--ok-bg); color: var(--ok); border-color: #BFE6D3; }
.wa-st-rejected { background: var(--error-bg); color: var(--error); border-color: #F3C3CA; }
.wa-st-pending, .wa-st-received, .wa-st-unsubmitted, .wa-st-in_review { background: var(--warn-bg); color: var(--warn); border-color: #F8E1B4; }
.wa-ok { color: var(--ok); font-weight: 600; }
.wa-probs { margin: 0; padding-left: 16px; color: var(--error); display: grid; gap: 4px; }
.wa-cell.is-ok input { border-color: #8FD3B1; background: #F3FBF7; }
.wa-cell.is-bad input { border-color: #F0A7AE; background: #FFF6F7; }

.wa-cat-table td:first-child { min-width: 240px; }
.wa-cat-table td:last-child { min-width: 230px; }
.wa-tpl-pick td { vertical-align: top; }
.wa-tpl-pick select { font: 400 13px var(--font); padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); min-width: 190px; max-width: 260px; }
.wa-cell.is-ok select { border-color: #8FD3B1; background: #F3FBF7; }
.wa-cell.is-bad select { border-color: #F0A7AE; background: #FFF6F7; }
.wa-cell-note { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-3); max-width: 260px; white-space: normal; }
.wa-cell.is-ok .wa-cell-note { color: var(--ok); }
.wa-cell.is-bad .wa-cell-note { color: var(--error); }
.wa-name { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
/* Settings, WhatsApp and text messages */
.mx-ico { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; vertical-align: -3px; }
.mx-ico-mail { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.mx-ico-chat { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.3 7.5L3 21l2-5.5A8.5 8.5 0 1 1 21 11.5z'/%3E%3C/svg%3E"); }
.mx-ico-sms { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E"); }
.mx-ico-sync { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 1-15.5 6.2L3 16M3 12a9 9 0 0 1 15.5-6.2L21 8M21 3v5h-5M3 21v-5h5'/%3E%3C/svg%3E"); }
.mx-ico-send { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z'/%3E%3C/svg%3E"); }
.mx-ico-info { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E"); }
.mx-ico-chev { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

.mx-tile { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; flex: none; background: var(--bg); color: var(--ink-2); }
.mx-tile .mx-ico { width: 20px; height: 20px; }
.mx-tile-mail { background: var(--lilac); color: var(--violet); }
.mx-tile-wa { background: #E3F6EC; color: #128C4B; }
.mx-tile-sms { background: #E8F1FD; color: #2563B8; }
.mx-pill { font: 600 12px/1 var(--font); padding: 5px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-3); border: 1px solid var(--line); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.mx-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.mx-pill.is-on { background: var(--ok-bg); color: var(--ok); border-color: #BFE6D3; }
.mx-pill.is-on::before { opacity: 1; }

.mx-overview { margin-bottom: 28px; }
.mx-ov-head .card-title { margin-bottom: 2px; }
.mx-ov-head p { margin: 0 0 16px; }
.mx-channels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mx-channel { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.mx-channel:not(.is-on) .mx-tile { background: var(--bg); color: var(--ink-3); }
.mx-ch-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.mx-ch-text strong { font-size: 15px; }
.mx-ch-text span { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.mx-channel { align-items: flex-start; }
.mx-channel .mx-pill { margin-top: 2px; }
.mx-int .field { align-content: start; }
.mx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 0; border: 1px solid var(--line); border-radius: 12px; background: #FBFAFD; }
.mx-stat { padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.mx-stat + .mx-stat { border-left: 1px solid var(--line); }
.mx-stat dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
.mx-stat dd { margin: 0; font: 700 22px/1.2 var(--font-head); color: var(--ink); }
.mx-stat span { font-size: 12px; color: var(--ink-3); }
.mx-stat.is-warn dd { color: var(--warn); }
.mx-offer { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--lilac); border: 1px solid #D8D2FF; }
.mx-offer.is-warn { background: var(--warn-bg); border-color: #F3D9A6; }
.mx-offer-text { flex: 1 1 300px; display: grid; gap: 2px; }
.mx-offer-text span { font-size: 13px; color: var(--ink-2); }
.mx-offer-form { display: flex; gap: 8px; flex: 1 1 380px; margin: 0; }
.mx-offer-form input[type=text] { flex: 1; min-width: 0; font: 400 14px var(--font); padding: 8px 12px; border: 1px solid #D8D2FF; border-radius: 8px; background: var(--white); }
.mx-offer-form input[type=text]:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.mx-offer.is-warn .mx-offer-form { flex: 0 0 auto; }

.mx-section-head { margin: 0 0 12px; }
.mx-section-head h2 { font-size: 18px; margin: 0 0 2px; }
.mx-section-head p { margin: 0; }

.mx-int { padding: 0; margin-bottom: 14px; overflow: hidden; }
.mx-int-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; list-style: none; }
.mx-int-head::-webkit-details-marker { display: none; }
.mx-int-head:hover { background: #FBFAFD; }
.mx-int-title { flex: 1; display: grid; gap: 1px; min-width: 0; }
.mx-int-title strong { font: 600 16px/1.3 var(--font-head); }
.mx-int-title span { font-size: 13px; color: var(--ink-2); }
.mx-chev { width: 18px; height: 18px; background: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s; flex: none; }
.mx-int[open] .mx-chev { transform: rotate(180deg); }
.mx-int[open] .mx-int-head { border-bottom: 1px solid var(--line); }
.mx-int-body { padding: 4px 20px 20px; }
.mx-sub { font: 600 13px var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 18px 0 10px; }
.mx-sub-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.mx-sub-row .mx-sub { margin-bottom: 2px; }
.mx-sub-row p { margin: 0; max-width: 640px; }
.mx-sub-row .btn { gap: 6px; display: inline-flex; align-items: center; }
.mx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mx-meter { height: 6px; border-radius: 999px; background: var(--line-2); margin: 12px 0; overflow: hidden; }
.mx-meter span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.mx-tpl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.mx-tpl { width: 100%; margin: 0; }
.mx-tpl th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: #FBFAFD; white-space: nowrap; }
.mx-tpl td, .mx-tpl th { padding: 10px 12px; }
.mx-tpl tbody tr + tr td { border-top: 1px solid var(--line-2); }
.mx-tpl td:first-child { min-width: 200px; }
.mx-tpl select { min-width: 200px; width: 100%; max-width: 280px; }
.mx-tpl td:nth-child(n+3) { min-width: 210px; }
.mx-vars { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mx-vars span { font-size: 11px; color: var(--ink-3); background: var(--bg); border-radius: 4px; padding: 1px 5px; }
.mx-texts { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.mx-texts summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.mx-texts p { margin: 10px 0; }
.mx-text-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mx-text { display: grid; gap: 6px; }
.mx-text-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }
.mx-text textarea { width: 100%; font: 400 13px/1.5 var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #FBFAFD; color: var(--ink-2); resize: vertical; }
.mx-steps { list-style: none; counter-reset: mx; margin: 16px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mx-steps li { counter-increment: mx; display: grid; gap: 2px; padding: 14px 14px 14px 50px; position: relative; border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; }
.mx-steps li::before { content: counter(mx); position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--lilac); color: var(--violet-dark); font: 700 13px/24px var(--font); text-align: center; }
.mx-steps span { font-size: 13px; color: var(--ink-2); }
.mx-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; background: var(--info-bg); border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.mx-note .mx-ico { color: var(--violet); margin-top: 2px; }
.mx-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.mx-actions-main { display: flex; gap: 8px; flex-wrap: wrap; }
.mx-actions p { margin: 0; max-width: 460px; }
.mx-test { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; background: #FBFAFD; border: 1px solid var(--line); }
.mx-test-text { flex: 1 1 220px; display: grid; font-size: 14px; }
.mx-test-text span { font-size: 13px; color: var(--ink-2); }
.mx-test input { font: 400 14px var(--font); padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; width: 220px; max-width: 100%; }
.mx-test .btn { display: inline-flex; align-items: center; gap: 6px; }

.mx-log { margin-top: 28px; }
.mx-log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 20px 12px; }
.mx-log-head .card-title { margin: 0; }
.mx-log-table { margin: 0; width: 100%; }
.mx-log-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: #FBFAFD; }
.mx-log-table td, .mx-log-table th { padding: 11px 20px; font-size: 14px; }
.mx-nowrap { white-space: nowrap; }
.mx-mono { font-variant-numeric: tabular-nums; }
.mx-chan { font: 600 12px/1 var(--font); padding: 4px 8px; border-radius: 6px; }
.mx-chan.is-wa { background: #E3F6EC; color: #116B3C; }
.mx-chan.is-sms { background: #E8F1FD; color: #1E4F94; }
.mx-status { font: 600 12px/1 var(--font); padding: 4px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.mx-status.is-ok { background: var(--ok-bg); color: var(--ok); }
.mx-status.is-bad { background: var(--error-bg); color: var(--error); }
.mx-err { font-size: 12px; color: var(--ink-3); margin-top: 4px; max-width: 360px; }
.mx-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 20px 32px; border-top: 1px solid var(--line-2); }
.mx-empty .mx-tile { margin-bottom: 4px; }
@media (max-width: 900px) {
  .mx-channels, .mx-steps, .mx-grid-3 { grid-template-columns: 1fr; }
  .mx-stats { grid-template-columns: 1fr; }
  .mx-stat + .mx-stat { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .mx-offer-form { flex-direction: column; }
  .mx-int-head { flex-wrap: wrap; }
  .mx-int-title { flex-basis: calc(100% - 100px); }
  .mx-log-table thead { display: none; }
  .mx-log-table tr { display: grid; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
  .mx-log-table td { padding: 0; border: 0; }
}
.mx-usage { margin: 12px 0 0; }
.mx-credit { margin-bottom: 28px; }
.mx-credit .mx-ov-head p { margin: 2px 0 16px; max-width: 760px; }
.mx-wallets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mx-wallet { display: grid; gap: 14px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.mx-wallet.is-warn { border-color: #F3D9A6; background: #FFFCF5; }
.mx-wallet-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mx-wallet-head .mx-tile { width: 34px; height: 34px; }
.mx-wallet-head .mx-tile .mx-ico { width: 17px; height: 17px; }
.mx-wallet-head strong { font: 600 15px var(--font-head); flex: 1; }
.mx-balance { display: grid; gap: 2px; }
.mx-amount { font: 700 32px/1.1 var(--font-head); color: var(--ink); letter-spacing: -.02em; }
.mx-wallet.is-warn .mx-amount { color: var(--warn); }
.mx-wallet-use { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line-2); }
.mx-wallet-use div { display: grid; gap: 1px; }
.mx-wallet-use dt { font-size: 12px; color: var(--ink-3); }
.mx-wallet-use dd { margin: 0; font-weight: 600; font-size: 15px; }
.mx-low { margin: 0; font-size: 13px; color: var(--warn); font-weight: 500; }
.mx-wallet-off { margin: 0; }
.mx-buy { display: grid; gap: 10px; margin: 0; }
.mx-amounts { display: flex; flex-wrap: wrap; gap: 6px; border: 0; margin: 0; padding: 0; }
.mx-amounts label { position: relative; cursor: pointer; }
.mx-amounts input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.mx-amounts label span { display: inline-block; font: 600 13px/1 var(--font); padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink-2); transition: border-color .15s, background .15s; }
.mx-amounts label:hover span { border-color: #C9C0FF; }
.mx-amounts input:checked + span { border-color: var(--violet); background: var(--lilac); color: var(--violet-dark); }
.mx-amounts input:focus-visible + span { box-shadow: 0 0 0 3px rgba(109, 74, 255, .2); }
.mx-other-input { width: 92px; font: 400 13px var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: none; }
.mx-amounts:has(.mx-other input:checked) .mx-other-input { display: inline-block; }
.mx-buy .btn { justify-self: start; }
.mx-credit-foot { margin: 12px 0 0; }
.mx-prices, .mx-history { margin-top: 8px; }
.mx-price-table { margin: 0; width: 100%; }
.mx-price-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: #FBFAFD; white-space: nowrap; }
.mx-price-table td, .mx-price-table th { padding: 9px 14px; font-size: 14px; }
.mx-price-table td:nth-child(n+2) { font-variant-numeric: tabular-nums; }
.mx-prices > .table-wrap, .mx-history > .table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.mx-prices > p { margin: 8px 0 0; }
.mx-all-prices { max-height: 360px; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.mx-all-prices th { position: sticky; top: 0; }
.mx-pos { color: var(--ok); font-weight: 600; }
.mx-neg { color: var(--error); font-weight: 600; }
@media (max-width: 900px) { .mx-wallets { grid-template-columns: 1fr; } .mx-price-table th, .mx-price-table td { display: table-cell !important; } }
.zc-msg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zc-msg-sub { font: 600 14px var(--font-head); margin: 18px 0 8px; }
.zc-msg-ledger { margin: 0; }
.zc-msg-ledger td, .zc-msg-ledger th { font-size: 13px; padding: 8px 10px; }
/* Admin, Message prices */
.mp-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.mp-card { display: grid; gap: 8px; align-content: start; margin: 0; }
.mp-card .card-title { margin: 0; }
.mp-card p { margin: 0; }
.mp-card > .btn { justify-self: start; }
.mp-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.mp-inline .field { margin: 0; }
.mp-inline input[type=number] { width: 120px; }
.mp-table-head, .mp-table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; }
.mp-table-head .card-title { margin: 0; }
.mp-table-foot { border-top: 1px solid var(--line); }
.mp-table { margin: 0; width: 100%; }
.mp-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: #FBFAFD; white-space: nowrap; }
.mp-table td, .mp-table th { padding: 8px 14px; vertical-align: middle; }
.mp-table input { width: 110px; font: 400 13px var(--font-mono, monospace); padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.mp-table input:focus { border-color: var(--violet); outline: none; }
.mp-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.mp-any td { background: var(--lilac); }
.mp-nowrap { white-space: nowrap; }
.mp-remove { color: var(--ink-3); }
.mp-add { margin-top: 20px; }
.mp-table-card { overflow: hidden; }
@media (max-width: 900px) { .mp-top { grid-template-columns: 1fr; } .mp-table th, .mp-table td { display: table-cell !important; } }
.zc-msg { margin-bottom: 20px; }
.zc-msg-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.zc-msg-facts div { display: grid; gap: 2px; }
.zc-msg-facts dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.zc-msg-facts dd { font-weight: 600; font-size: 14px; }
.zc-msg-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.zc-msg-form { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.zc-msg-form .btn { justify-self: start; }

@media (max-width: 600px) { .mx-int-head .mx-pill { margin-left: 54px; } }
.mx-int-body > form > .mx-sub:first-of-type { margin-top: 20px; } .mx-int-body > .mx-steps + form > .mx-sub:first-of-type { margin-top: 18px; }
@media (max-width: 900px) { .mx-tpl th, .mx-tpl td, .mx-log-table th, .mx-log-table td { display: table-cell !important; } }
@media (max-width: 600px) {
  .mx-log-table td { display: block !important; }
  .mx-log-table tr { grid-template-columns: 1fr auto; }
  .mx-log-table td[data-label="When"] { font-size: 12px; color: var(--ink-3); }
  .mx-log-table td[data-label="Message"] { font-weight: 600; grid-column: 1; }
  .mx-log-table td[data-label="Status"] { grid-column: 1 / -1; }
}
/* Admin, Integrations, Payments: PayPal Sandbox and Live */
.pp-switch { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); }
.pp-switch-label { font-weight: 600; font-size: 14px; }
.pp-seg { display: inline-flex; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; gap: 2px; }
.pp-seg button { font: 600 13px var(--font); padding: 7px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.pp-seg button:hover:not(:disabled) { background: var(--white); color: var(--ink); }
.pp-seg button.is-on { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(23, 21, 46, .12); cursor: default; }
.pp-seg button.is-on.pp-live { background: var(--ok); color: #fff; }
.pp-seg button.is-on.pp-sandbox { background: #F0B65A; color: #3D2600; }
.pp-switch-note { font-size: 13px; color: var(--ink-3); }
.pp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pp-mode.is-on, .pp-mode:has(input:checked) { border-color: var(--violet); background: var(--lilac); }
.pp-mode span { display: grid; gap: 2px; }
.pp-mode em { font-style: normal; font-size: 13px; color: var(--ink-2); }
.pp-saved { font: 600 11px var(--font); color: var(--ok); background: var(--ok-bg); padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
@media (max-width: 700px) { .pp-modes { grid-template-columns: 1fr; } }
/* Billing: periods, details, invoices */
.bl-plans[data-period="month"] .bl-y, .bl-plans[data-period="year"] .bl-m { display: none; }
.bl-card { grid-template-rows: auto auto auto auto 1fr auto auto; }
.bl-act { align-self: end; }
.bl-act .btn.is-disabled { opacity: .5; pointer-events: none; }
.bl-toggle { display: inline-flex; padding: 3px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; gap: 2px; }
.bl-toggle button { font: 600 13px var(--font); padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.bl-toggle button.is-on { background: var(--violet); color: #fff; }
.bl-save { font: 600 11px var(--font); background: var(--ok-bg); color: var(--ok); padding: 2px 7px; border-radius: 999px; }
.bl-toggle button.is-on .bl-save { background: rgba(255, 255, 255, .2); color: #fff; }
.bl-due { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--warn-bg); border: 1px solid #F3D9A6; }
.bl-due > .mx-ico { color: var(--warn); width: 20px; height: 20px; }
.bl-due div { flex: 1 1 300px; display: grid; gap: 2px; font-size: 14px; }
.bl-due div span { font-size: 13px; color: var(--ink-2); }
.bl-details, .bl-invoices { margin-top: 24px; }
.bl-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.bl-sec-head .card-title { margin: 0; }
.bl-pad { padding: 18px 20px 10px; }
.bl-empty { padding-bottom: 20px; margin: 0; }
.bl-billto { display: grid; gap: 2px; font-size: 14px; }
.bl-billto span { color: var(--ink-2); }
.bl-inv-table { margin: 0; width: 100%; }
.bl-inv-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: #FBFAFD; }
.bl-inv-table td, .bl-inv-table th { padding: 10px 16px; font-size: 14px; vertical-align: top; }
.bl-nowrap { white-space: nowrap; }
.bl-st { font: 600 12px/1 var(--font); padding: 4px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.bl-st-paid { background: var(--ok-bg); color: var(--ok); }
.bl-st-due { background: var(--warn-bg); color: var(--warn); }
.bl-st-void { background: var(--bg); color: var(--ink-3); text-decoration: line-through; }
@media (max-width: 900px) { .bl-inv-table th, .bl-inv-table td { display: table-cell !important; } }
/* Checkout */
.co { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.co-main { display: grid; gap: 16px; }
.co-step.is-later { opacity: .6; }
.co-h { display: flex; align-items: center; gap: 10px; font: 600 17px var(--font-head); margin: 0 0 14px; }
.co-n { width: 26px; height: 26px; border-radius: 50%; background: var(--lilac); color: var(--violet-dark); display: inline-grid; place-items: center; font: 700 13px var(--font); }
.co-periods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-period { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.co-period:hover { text-decoration: none; border-color: #C9C0FF; }
.co-period.is-on { border-color: var(--violet); background: var(--lilac); box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.co-price { font: 700 22px var(--font-head); }
.co-price small { font: 500 13px var(--font); color: var(--ink-3); }
.co-save { font-size: 13px; font-weight: 600; color: var(--ok); }
.co-sub { font-size: 13px; color: var(--ink-3); }
.co-billto { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.co-billto div { display: grid; gap: 2px; font-size: 14px; }
.co-billto span { color: var(--ink-2); }
.co-list { margin: 8px 0 16px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.co-pp { max-width: 420px; min-height: 110px; margin-top: 8px; }
.co-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.co-secure { display: flex; gap: 6px; align-items: center; margin-top: 12px; }
.co-sum { position: sticky; top: 20px; }
.co-item { display: grid; gap: 4px; margin: 0 0 14px; font-size: 14px; }
.co-item span { color: var(--ink-2); font-size: 13px; }
.co-lines { margin: 0 0 12px; display: grid; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.co-lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.co-lines dt { color: var(--ink-2); }
.co-lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.co-total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; font-size: 16px !important; }
.co-total dt { color: var(--ink) !important; }
@media (max-width: 900px) { .co { grid-template-columns: 1fr; } .co-sum { position: static; order: -1; } .co-periods { grid-template-columns: 1fr; } }
/* Admin, Invoices */
.inv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.inv-stats > div { display: grid; gap: 2px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; align-content: start; }
.inv-stats span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
.inv-stats strong { font: 700 20px var(--font-head); }
.inv-stats em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.inv-stats .is-warn strong { color: var(--warn); }
.inv-stats .btn { justify-self: start; margin-top: 4px; }
.inv-filter { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.inv-filter input, .inv-filter select { font: 400 14px var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.inv-filter input { flex: 1 1 240px; }
.inv-empty { padding: 16px; margin: 0; }
.inv-table { margin: 0; width: 100%; }
.inv-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: #FBFAFD; }
.inv-table td, .inv-table th { padding: 10px 14px; vertical-align: top; font-size: 14px; }
.inv-nw { white-space: nowrap; }
.inv-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.inv-act form { margin: 0; }
.inv-pay { position: relative; }
.inv-pay > summary { list-style: none; }
.inv-pay > summary::-webkit-details-marker { display: none; }
.inv-pay-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 260px; display: grid; gap: 8px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); }
.inv-settings { margin-top: 24px; }
.inv-fs { border: 0; padding: 0; margin: 0 0 16px; }
.inv-fs legend { font: 600 13px var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 8px; }
@media (max-width: 900px) { .inv-table th, .inv-table td { display: table-cell !important; } }
.field[hidden], .form[hidden], form[hidden] { display: none !important; }
/* Billing centre */
.bc-nav { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 20px; padding: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.bc-nav a { padding: 8px 14px; border-radius: 8px; font: 500 14px var(--font); color: var(--ink-2); }
.bc-nav a:hover { text-decoration: none; background: var(--bg); color: var(--ink); }
.bc-nav a.is-active { background: var(--lilac); color: var(--violet-ink); font-weight: 600; }
.bc-sub { padding: 0; overflow: hidden; }
.bc-sub-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.bc-sub-head > div { flex: 1; min-width: 0; }
.bc-sub-head h2 { font-size: 19px; margin: 0 0 2px; }
.bc-sub-head p { margin: 0; }
.bc-logo { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font: 700 20px var(--font-head); }
.bc-st { font: 600 12px/1 var(--font); padding: 6px 10px; border-radius: 999px; white-space: nowrap; background: var(--bg); color: var(--ink-2); }
.bc-st-on { background: var(--ok-bg); color: var(--ok); }
.bc-st-warn { background: var(--warn-bg); color: var(--warn); }
.bc-st-info { background: var(--info-bg); color: var(--violet-ink); }
.bc-st-off { background: var(--bg); color: var(--ink-3); }
.bc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 0; }
.bc-sub .bc-facts { border-bottom: 1px solid var(--line-2); }
.bc-fact { display: grid; gap: 4px; align-content: start; padding: 16px 22px; border-right: 1px solid var(--line-2); }
.bc-fact:last-child { border-right: 0; }
.bc-fact dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
.bc-fact dd { margin: 0; font: 600 16px var(--font-head); }
.bc-fact .bl-bar { margin: 4px 0 0; }
.bc-facts-2 { grid-template-columns: 1fr 1fr; margin: 4px 0 14px; border: 1px solid var(--line-2); border-radius: 10px; }
.bc-facts-2 .bc-fact { padding: 12px 14px; }
.bc-pm { font-size: 14px !important; }
.bc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 22px; }
.bc-actions > p { margin: 0; }
.bc-recur { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 0 auto; }
.bc-recur-label { font-size: 14px; font-weight: 600; }
.bc-switch { position: relative; width: 42px; height: 24px; border-radius: 999px; border: 0; padding: 0; background: #CFCCDB; cursor: pointer; transition: background .15s; }
.bc-switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.bc-switch.is-on { background: var(--violet); }
.bc-switch.is-on span { left: 21px; }
.bc-switch:disabled { opacity: .5; cursor: not-allowed; }
.bc-switch:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.bc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.bc-grid-wide { grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); align-items: start; margin-top: 0; }
.bc-mini { display: grid; gap: 6px; align-content: start; }
.bc-mini .card-title { margin-bottom: 4px; }
.bc-mini p { margin: 0 0 6px; }
.bc-mini .btn { justify-self: start; }
.bc-fail { background: var(--error-bg); border-color: #F2C4C7; }
.bc-fail > .mx-ico { color: var(--error); }
.bc-lead { margin: -4px 0 14px; }
.bc-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.bc-filter a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line); }
.bc-filter a:hover { text-decoration: none; border-color: #C9C0FF; }
.bc-filter a.is-active { background: var(--violet); border-color: var(--violet); color: #fff; }
.bc-people, .bc-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.bc-people li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; }
.bc-list li { font-size: 14px; color: var(--ink-2); padding-left: 16px; position: relative; }
.bc-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.bc-list strong { color: var(--ink); }
/* Payment methods */
.pm-list { list-style: none; margin: 0; padding: 0; }
.pm-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pm-item form { margin: 0; }
.pm-icon { width: 46px; height: 30px; flex: none; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font: 700 10px var(--font); letter-spacing: .03em; color: var(--ink-2); background: #FBFAFD; }
.pm-visa { color: #1A1F71; }
.pm-mastercard { color: #EB001B; }
.pm-amex { color: #2E77BC; }
.pm-paypal { color: #003087; font-size: 15px; font-style: italic; }
.pm-text { flex: 1 1 220px; display: grid; gap: 2px; font-size: 14px; }
.pm-add { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; align-items: start; }
.pm-h { display: grid; gap: 2px; margin: 0 0 12px; font-size: 15px; }
.pm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.pm-f-wide { grid-column: 1 / -1; }
.pm-f { min-height: 54px; }
.pm-default { margin: 4px 0 12px; }
.pm-or { align-self: stretch; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; position: relative; min-width: 24px; }
.pm-or::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid var(--line); }
.pm-or span { position: relative; background: var(--white); padding: 6px 0; }
.pm-add .co-msg { grid-column: 1 / -1; margin: 0; }
.pm-choose { display: grid; gap: 8px; margin: 0 0 12px; }
.pm-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.pm-opt:has(input:checked) { border-color: var(--violet); background: var(--lilac); }
.pm-opt input { accent-color: var(--violet); }
@media (max-width: 900px) {
  .bc-grid-wide, .pm-add { grid-template-columns: 1fr; }
  .pm-or { min-height: 24px; }
  .pm-or::before { top: 50%; bottom: auto; left: 0; right: 0; border-left: 0; border-top: 1px solid var(--line); }
  .pm-or span { padding: 0 8px; }
  .bc-fact { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .bc-recur { margin-left: 0; }
}
.co-add { margin: 14px 0 0; border-top: 1px solid var(--line-2); padding-top: 12px; }
.co-add > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--violet-ink); margin-bottom: 12px; }
.co-add[open] > summary { margin-bottom: 16px; }
.co .pm-add { grid-template-columns: 1fr; }
.co .pm-or { min-height: 24px; }
.co .pm-or::before { top: 50%; bottom: auto; left: 0; right: 0; border-left: 0; border-top: 1px solid var(--line); }
.co .pm-or span { padding: 0 8px; }
#co-pay > p { margin: 0 0 14px; }
/* Area switch for platform admins: studies app or admin console */
.ws-switch { position: relative; }
.ws-switch summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 12px; cursor: pointer; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); transition: background .15s, border-color .15s; }
.ws-switch summary::-webkit-details-marker { display: none; }
.ws-switch summary:hover { background: rgba(255, 255, 255, .1); }
.ws-switch summary:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.ws-switch[open] summary { border-color: rgba(255, 255, 255, .22); }
.ws-now { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.ws-now em { font: 600 10.5px var(--font); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: #8F8BAE; }
.ws-now strong { font: 600 14px var(--font); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-caret { width: 16px; height: 16px; flex: none; fill: none; stroke: #8F8BAE; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; background: #FF5E62; box-shadow: 0 0 0 3px rgba(255, 94, 98, .18); flex: none; }
.ws-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; }
.ws-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ws-ico-app { background: var(--grad); }
.ws-ico-admin { background: #2B2950; }
.ws-ico-crm { background: linear-gradient(135deg, #0FA37F, #0B7C8F); }
.ws-ico-support { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.ws-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; display: grid; gap: 2px; }
.ws-menu-head { margin: 4px 8px 4px; font: 600 10.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--ink); }
.ws-item:hover { background: var(--bg); text-decoration: none; }
.ws-item.is-on { background: var(--lilac); }
.ws-item .ws-ico { width: 30px; height: 30px; border-radius: 8px; }
.ws-item .ws-ico svg { width: 16px; height: 16px; }
.ws-text { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.ws-text strong { font: 600 13.5px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-text em { font: 400 11.5px var(--font); font-style: normal; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-check { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--violet); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ws-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--violet); color: #fff; font: 700 11px/20px var(--font); text-align: center; flex: none; }
.zc-side .ws-switch summary { background: #fff; border-color: var(--line); box-shadow: 0 1px 2px rgba(23, 21, 46, .05); }
.zc-side .ws-switch summary:hover { background: var(--bg); }
.zc-side .ws-switch[open] summary { border-color: #CFC8FF; box-shadow: 0 0 0 3px var(--lilac); }
.zc-side .ws-now em { color: var(--ink-3); }
.zc-side .ws-now strong { color: var(--ink); }
.zc-side .ws-caret { stroke: var(--ink-3); }

/* Admin console */
.admin-body { background: #F6F7F9; }
.zc-side { background: #fff; color: var(--ink-2); border-right: 1px solid var(--line); gap: 14px; }
.zc-brand { display: flex; align-items: center; gap: 8px; margin: 4px 8px 4px; }
.zc-brand:hover { text-decoration: none; }
.zc-brand img { width: 112px; height: auto; }
.zc-brand span { font: 700 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--navy); padding: 3px 7px; border-radius: 6px; }
.zc-nav { display: grid; gap: 1px; align-content: start; }
.zc-group { margin: 14px 10px 6px; font: 600 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.zc-group:first-child { margin-top: 4px; }
.zc-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font: 500 14px var(--font); }
.zc-link svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.zc-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.zc-link.is-active { background: var(--lilac); color: var(--violet-ink); font-weight: 600; }
.zc-link.is-active svg { opacity: 1; }
.zc-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--violet); color: #fff; font-size: 11.5px; text-align: center; }
.zc-count-alert { background: var(--error); }
.zc-foot { border-top-color: var(--line); }
.zc-side .sb-user summary:hover { background: var(--bg); }
.zc-side .sb-user-text strong { color: var(--ink); }
.zc-side .sb-user-text em { color: var(--ink-3); }
.zc-side .sb-user-menu { box-shadow: var(--shadow-pop); border: 1px solid var(--line); }
.zc-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 40px; min-height: 58px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.zc-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); min-width: 0; }
.zc-crumbs a { color: var(--ink-2); }
.zc-crumbs strong { color: var(--ink); font-weight: 600; }
.zc-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.zc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font: 600 12px var(--font); border: 1px solid transparent; }
.zc-chip:hover { text-decoration: none; filter: brightness(.97); }
.zc-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.zc-chip-ok { background: var(--ok-bg); color: var(--ok); border-color: #C7E8D6; }
.zc-chip-warn { background: var(--warn-bg); color: var(--warn); border-color: #F3D9A6; }
.zc-chip-bad { background: var(--error-bg); color: var(--error); border-color: #F3CDD0; }
.zc-open { display: inline-flex; align-items: center; gap: 6px; }
.zc-open svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.zc-page { padding-top: 24px; }
.admin-body .page-head .crumbs { display: none; }
.admin-body .page-head h1 { font-size: 26px; }
.admin-body .card { border-color: #E4E6EB; }
.mobilebar .zc-brand { margin: 0; }
@media (max-width: 980px) {
  .zc-top { position: static; padding: 10px 16px; }
  .zc-side .sb-top .zc-brand { display: none; }
  .zc-side { border-right: 0; }
}
/* Sign-in code: other ways to get it */
.tfa-ways { display: grid; gap: 8px; margin: 18px 0 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.tfa-ways-h { margin: 0 0 2px; font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.tfa-ways form { margin: 0; }
.tfa-way { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tfa-way:hover { border-color: #C9C0FF; background: #FBFAFF; text-decoration: none; }
.tfa-way svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--violet); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tfa-way span { display: grid; gap: 1px; min-width: 0; }
.tfa-way strong { font-size: 14px; font-weight: 600; }
.tfa-way em { font-style: normal; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Invoice payment page */
.plain-card:has(.pay) { max-width: 680px; width: 100%; text-align: left; justify-items: stretch; padding: 32px 36px; }
.pay { display: grid; gap: 20px; }
.pay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pay-head h1 { font-size: 26px; margin: 2px 0 4px; }
.pay-head p { margin: 0; }
.pay-kicker { font: 600 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--violet-ink); }
.pay-done { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); border: 1px solid #C7E8D6; font-size: 14px; }
.pay-wait { padding: 14px 16px; border-radius: 12px; background: var(--info-bg); color: var(--violet-ink); font-size: 14px; }
.pay-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pay-parties > div { display: grid; gap: 2px; font-size: 14px; align-content: start; }
.pay-parties span { color: var(--ink-2); }
.pay-label { margin: 0 0 4px; font: 600 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pay-lines { margin: 0; display: grid; border-top: 1px solid var(--line); }
.pay-lines > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.pay-lines dt { color: var(--ink-2); }
.pay-lines dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-item dt { color: var(--ink) !important; display: grid; gap: 2px; }
.pay-item em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.pay-total { border-bottom: 0 !important; font-weight: 700; font-size: 17px !important; }
.pay-total dt { color: var(--ink) !important; }
.pay-now { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #FBFAFF; }
.pay-now h2 { font-size: 17px; margin: 0; }
.pay-now p { margin: 0; }
.pay-offline { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.pay-offline summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.pay-offline dl { margin: 12px 0 8px; display: grid; gap: 6px; }
.pay-offline dl div { display: flex; gap: 12px; font-size: 14px; }
.pay-offline dt { width: 130px; color: var(--ink-3); flex: none; }
.pay-offline dd { margin: 0; font-weight: 600; word-break: break-all; }
.pay-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
@media (max-width: 600px) { .plain-card:has(.pay) { padding: 22px 18px; } .pay-parties { grid-template-columns: 1fr; } }
/* Service desk */
.zc-count-muted { background: var(--bg); color: var(--ink-3); border: 1px solid var(--line); }
.sd-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sd-head-actions form { margin: 0; }
.sd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sd-kpi { display: grid; gap: 2px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
a.sd-kpi:hover { text-decoration: none; border-color: #C9C0FF; }
.sd-kpi span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
.sd-kpi strong { font: 700 22px var(--font-head); }
.sd-kpi em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.sd-kpi.is-warn strong { color: var(--warn); }
.sd-kpi.is-bad strong { color: var(--error); }
.sd-tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.sd-tabs a { padding: 9px 12px; border-bottom: 2px solid transparent; color: var(--ink-2); font: 500 14px var(--font); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.sd-tabs a:hover { text-decoration: none; color: var(--ink); }
.sd-tabs a.is-active { color: var(--violet-ink); border-bottom-color: var(--violet); font-weight: 600; }
.sd-tabs b { font-size: 11px; min-width: 18px; padding: 0 6px; line-height: 18px; border-radius: 9px; background: var(--bg); color: var(--ink-2); text-align: center; }
.sd-table td { vertical-align: top; }
.sd-row { cursor: pointer; }
.sd-row:hover td { background: #FBFAFF; }
.sd-ref { font-weight: 700; font-size: 13px; }
.sd-subj { font-weight: 600; margin: 2px 0; max-width: 420px; }
.sd-type { display: inline-block; font: 600 11px/1 var(--font); padding: 3px 7px; border-radius: 6px; vertical-align: 1px; }
.sd-type-incident { background: #FDECEC; color: #A3272F; }
.sd-type-request { background: #E8F1FD; color: #1F5AA6; }
.sd-type-problem { background: #F3EAFE; color: #6B2BB5; }
.sd-prio { display: inline-block; font: 700 11.5px/1 var(--font); padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.sd-p1 { background: #BE2F36; color: #fff; }
.sd-p2 { background: #FCE3E4; color: #A3272F; }
.sd-p3 { background: var(--warn-bg); color: var(--warn); }
.sd-p4 { background: var(--bg); color: var(--ink-2); }
.sd-st { display: inline-block; font: 600 12px/1 var(--font); padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: var(--bg); color: var(--ink-2); }
.sd-st-new { background: var(--info-bg); color: var(--violet-ink); }
.sd-st-open { background: #E8F1FD; color: #1F5AA6; }
.sd-st-pending, .sd-st-on_hold { background: var(--warn-bg); color: var(--warn); }
.sd-st-resolved { background: var(--ok-bg); color: var(--ok); }
.sd-st-closed { background: var(--bg); color: var(--ink-3); }
.sd-new-reply { color: var(--violet-ink); font-weight: 600; }
.sd-sla { display: inline-block; font: 600 12px/1.2 var(--font); padding: 4px 8px; border-radius: 6px; }
.sd-sla-ok { background: var(--ok-bg); color: var(--ok); }
.sd-sla-warn { background: var(--warn-bg); color: var(--warn); }
.sd-sla-bad { background: var(--error-bg); color: var(--error); }
.sd-sla-paused { background: var(--bg); color: var(--ink-2); }
.sd-sla-big { display: block; margin: 10px 0 0; padding: 8px 10px; font-size: 13px; }
.sd-breach { color: var(--error); margin: 6px 0 0; font-weight: 600; }
.sd-known { font: 600 11px var(--font); padding: 2px 7px; border-radius: 6px; background: #F3EAFE; color: #6B2BB5; }
.sd-kicker { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.sd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.sd-main { display: grid; gap: 16px; min-width: 0; }
.sd-side { display: grid; gap: 12px; position: sticky; top: 76px; }
.sd-card { padding: 16px 18px; display: grid; gap: 8px; }
.sd-card h3 { font-size: 14px; margin: 0; }
.sd-card p { margin: 0; }
.sd-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sd-fields { gap: 10px; margin-top: 6px; }
.sd-fields .field span { font-size: 12.5px; }
.sd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sd-req { display: grid; gap: 2px; font-size: 14px; }
.sd-req a { word-break: break-all; }
.sd-hist, .sd-linked { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.sd-linked li { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.sd-inline { display: flex; gap: 6px; margin: 4px 0; }
.sd-inline select { flex: 1; min-width: 0; font: 400 13px var(--font); padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.sd-facts dl { margin: 0; display: grid; gap: 8px; }
.sd-facts dl div { display: grid; gap: 1px; font-size: 13.5px; }
.sd-facts dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sd-facts dd { margin: 0; }
.sd-stars { color: #E7A600; letter-spacing: 2px; font-size: 16px; }
.sd-msgs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.sd-msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--white); }
.sd-msg.is-agent { background: #FBFAFF; border-color: #E2DCFF; }
.sd-msg.is-note { background: #FFFBEA; border-color: #F1E1A6; }
.sd-msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sd-av { width: 26px; height: 26px; font-size: 12px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; }
.sd-body { font-size: 14.5px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.sd-sys { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); padding: 0 6px; }
.sd-sys time { white-space: nowrap; }
.sd-compose { gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.sd-compose textarea { width: 100%; font: 400 14.5px/1.5 var(--font); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.sd-compose.is-note textarea { background: #FFFBEA; border-color: #F1E1A6; }
.sd-compose-tabs { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.sd-compose-tabs label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.sd-compose-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sd-then { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.sd-then select { font: 400 14px var(--font); padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sd-problem textarea { width: 100%; }
.sd-resolve-linked { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.sd-num { width: 90px; font: 400 14px var(--font); padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sd-narrow { max-width: 320px; margin-top: 12px; }
.sd-settings { display: grid; gap: 16px; }
.sd-sla-table td { vertical-align: middle; }
.sd-inbound { margin-top: 14px; padding: 14px; border-radius: 10px; background: var(--bg); display: grid; gap: 6px; }
.sd-inbound p { margin: 0; }
.sd-code { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sd-code code { font-size: 12.5px; padding: 6px 8px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; word-break: break-all; }
@media (max-width: 1100px) { .sd-layout { grid-template-columns: 1fr; } .sd-side { position: static; } }
/* Support, for requesters */
.sp-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.sp-choice { display: flex; gap: 12px; align-items: center; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.sp-choice:hover { text-decoration: none; border-color: #C9C0FF; box-shadow: 0 0 0 3px rgba(109, 74, 255, .08); }
.sp-choice span:last-child { display: grid; gap: 2px; }
.sp-choice em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.sp-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 700 18px var(--font-head); }
.sp-ico-inc { background: #FDECEC; color: #A3272F; }
.sp-ico-req { background: #E8F1FD; color: #1F5AA6; }
.sp-ico-help { background: var(--lilac); color: var(--violet-ink); }
.sp-form-card { max-width: 860px; }
.sp-type { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-type label, .sp-scale label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.sp-type label:has(input:checked), .sp-scale label:has(input:checked) { border-color: var(--violet); background: var(--lilac); }
.sp-type input, .sp-scale input { accent-color: var(--violet); }
.sp-type span { display: grid; gap: 1px; }
.sp-type em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.sp-scale { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sp-scale[hidden] { display: none; }
.sp-scale legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.sp-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp-wait { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: 14px; }
.sp-ticket { display: grid; gap: 16px; }
.sp-ticket.is-guest .sd-msgs { margin: 0; }
.sp-guest-h { font-size: 24px; margin: 0; }
.sp-reply { display: grid; gap: 10px; }
.sp-solved { margin: 0; }
.sp-rate.is-asked { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.sp-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.sp-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-stars label { font-size: 32px; line-height: 1; color: #D8D5E3; cursor: pointer; padding: 2px; }
.sp-stars label:hover, .sp-stars label:hover ~ label, .sp-stars input:checked ~ label { color: #E7A600; }
.sp-stars input:focus-visible + label { outline: 2px solid var(--violet); border-radius: 4px; }
.sp-contact { display: grid; gap: 12px; }
.sp-contact form { display: grid; gap: 12px; }
.sp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.plain-card:has(.sp-ticket), .plain-card:has(.sp-contact) { max-width: 720px; width: 100%; text-align: left; justify-items: stretch; padding: 32px 36px; }
@media (max-width: 700px) { .sp-type, .sp-scale { grid-template-columns: 1fr; } .plain-card:has(.sp-ticket), .plain-card:has(.sp-contact) { padding: 22px 18px; } }
.pp-sup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pp-sup-list a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
.pp-sup-list a:hover { text-decoration: none; border-color: var(--violet); }
.pp-sup-list span { font-size: 13px; color: var(--ink-3); }
.pp-sup-new > summary { list-style: none; width: 100%; }
.pp-sup-new > summary::-webkit-details-marker { display: none; }
.pp-sup-new[open] > summary { display: none; }
.pp-sup-solved { margin: 4px 0 0; }
.pp-sup-solved .pp-btn { width: 100%; }
.pp-field textarea { font: 400 16px var(--font); padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; resize: vertical; }
.pp-field textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 4px rgba(109, 74, 255, .12); }
/* Sales CRM and customer health */
.cr-stage { display: inline-block; font: 600 12px/1.2 var(--font); padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: var(--bg); color: var(--ink-2); }
.cr-stage-trial { background: var(--info-bg); color: var(--violet-ink); }
.cr-stage-paying { background: var(--ok-bg); color: var(--ok); }
.cr-stage-quiet, .cr-stage-past_due { background: var(--warn-bg); color: var(--warn); }
.cr-stage-trial_ended { background: #F1F0F5; color: var(--ink-3); }
.cr-stage-churned, .cr-stage-suspended { background: var(--error-bg); color: var(--error); }
.cr-stage-comp { background: #E8F1FD; color: #1F5AA6; }
.cr-mini { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font: 700 12px var(--font); }
.cr-band-healthy { background: var(--ok-bg); color: var(--ok); }
.cr-band-watch { background: var(--warn-bg); color: var(--warn); }
.cr-band-risk { background: var(--error-bg); color: var(--error); }
.cr-band-gone { background: var(--bg); color: var(--ink-3); }
.cr-due { display: inline-block; font: 600 11.5px/1.2 var(--font); padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.cr-due-bad { background: var(--error-bg); color: var(--error); }
.cr-due-warn { background: var(--warn-bg); color: var(--warn); }
.cr-due-ok { background: var(--bg); color: var(--ink-2); }
a.cr-due:hover { text-decoration: none; filter: brightness(.97); }
.cr-pill { font: 600 11px var(--font); padding: 2px 7px; border-radius: 6px; background: var(--bg); color: var(--ink-3); }
.cr-deal-st { display: inline-block; font: 600 11.5px/1.2 var(--font); padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.cr-ds-won { background: var(--ok-bg); color: var(--ok); }
.cr-ds-lost { background: var(--error-bg); color: var(--error); }
.cr-ds-trial { background: var(--info-bg); color: var(--violet-ink); }
.cr-ds-proposal, .cr-ds-demo { background: #E8F1FD; color: #1F5AA6; }
.cr-cstage { display: inline-block; font: 600 11.5px/1.2 var(--font); padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.cr-cs-customer { background: var(--ok-bg); color: var(--ok); }
.cr-cs-trial { background: var(--info-bg); color: var(--violet-ink); }
.cr-cs-churned, .cr-cs-lost { background: var(--error-bg); color: var(--error); }
/* agency page */
.cr-org { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.cr-health { display: flex; gap: 18px; align-items: flex-start; }
.cr-score { --p: 0; flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #EEECF4 0); position: relative; }
.cr-score::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--white); }
.cr-score strong, .cr-score span { position: relative; }
.cr-score strong { font: 700 26px/1 var(--font-head); }
.cr-score span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.cr-score.cr-band-healthy { --c: #1E9E63; background: conic-gradient(var(--c) calc(var(--p) * 1%), #EEECF4 0); color: var(--ink); }
.cr-score.cr-band-watch { --c: #E3A008; background: conic-gradient(var(--c) calc(var(--p) * 1%), #EEECF4 0); color: var(--ink); }
.cr-score.cr-band-risk { --c: #D9434B; background: conic-gradient(var(--c) calc(var(--p) * 1%), #EEECF4 0); color: var(--ink); }
.cr-score.cr-band-gone { --c: #A9A6BD; background: conic-gradient(var(--c) calc(var(--p) * 1%), #EEECF4 0); color: var(--ink); }
.cr-health-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.cr-health-main p { margin: 0; }
.cr-health-main .cr-stage { justify-self: start; }
.cr-factors { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.cr-factors li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.cr-factors b { font-variant-numeric: tabular-nums; }
.cr-factors em { grid-column: 1 / -1; font-style: normal; color: var(--ink-3); font-size: 12px; }
.cr-spark { width: 100%; height: 42px; margin-top: 4px; }
.cr-spark polyline { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cr-crm { display: grid; gap: 12px; }
.cr-crm .bl-sec-head { margin: 0; }
.cr-crm-facts { display: grid; gap: 8px; }
.cr-crm-facts p { margin: 0; font-size: 14px; }
/* log form and timeline */
.cr-log { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #FBFAFD; }
.cr-log-types { display: flex; gap: 4px; flex-wrap: wrap; }
.cr-log-types label { cursor: pointer; }
.cr-log-types input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cr-log-types span { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font: 600 12.5px var(--font); color: var(--ink-2); }
.cr-log-types input:checked + span { background: var(--violet); border-color: var(--violet); color: #fff; }
.cr-log-types input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.cr-in { width: 100%; font: 400 14px var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); resize: vertical; }
.cr-log-task { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.cr-log-task[hidden] { display: none; }
.cr-log-task label { display: grid; gap: 4px; }
.cr-tl { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.cr-tl-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--line-2); }
.cr-tl-item form { margin: 0; }
.cr-tl-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--font); background: var(--bg); color: var(--ink-2); }
.cr-t-call .cr-tl-ico { background: #E8F1FD; color: #1F5AA6; }
.cr-t-email .cr-tl-ico { background: var(--lilac); color: var(--violet-ink); }
.cr-t-meeting .cr-tl-ico { background: #F3EAFE; color: #6B2BB5; }
.cr-t-task .cr-tl-ico { background: var(--warn-bg); color: var(--warn); }
.cr-t-task.is-done .cr-tl-ico { background: var(--ok-bg); color: var(--ok); }
.cr-t-system .cr-tl-ico { background: transparent; color: var(--ink-3); }
.cr-t-system strong { font-weight: 500; color: var(--ink-2); font-size: 13.5px; }
.cr-tl-item.is-open { background: #FFFCF2; border-radius: 10px; }
.cr-tl-item.is-done strong { text-decoration: line-through; color: var(--ink-3); }
.cr-tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.cr-tl-body { margin: 4px 0; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.cr-tl-main p.small { margin: 2px 0 0; }
/* pipeline board */
.cr-owner { border-bottom: 0; padding: 0; }
.cr-board { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.cr-col { background: #EFEEF4; border-radius: 12px; padding: 8px; display: grid; grid-template-rows: auto 1fr; gap: 8px; min-height: 240px; transition: background .15s; }
.cr-col.is-over { background: var(--lilac); }
.cr-col header { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 4px 4px 0; font-size: 13px; }
.cr-col header span { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.cr-col-won header strong { color: var(--ok); }
.cr-col-lost header strong { color: var(--error); }
.cr-cards { display: grid; gap: 8px; align-content: start; }
.cr-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 4px; cursor: grab; }
.cr-card.is-drag { opacity: .5; }
.cr-card-title { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.3; }
.cr-card p { margin: 0; }
.cr-card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.cr-owner-av { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font: 700 11px var(--font); }
.cr-lost { font-size: 12px; }
.cr-move select { width: 100%; font: 400 12px var(--font); padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink-3); background: #FBFAFD; }
.cr-empty { margin: 6px 4px; font-size: 12.5px; color: var(--ink-3); }
/* tasks */
.cr-group { margin: 0; padding: 14px 18px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.cr-group span { font-weight: 500; }
.cr-group-overdue { color: var(--error); }
.cr-tasks { list-style: none; margin: 0; padding: 0; }
.cr-tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.cr-tasks form { margin: 0; }
.cr-tasks p { margin: 2px 0 0; }
.cr-check { width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid #C9C5D9; background: var(--white); cursor: pointer; }
.cr-check:hover { border-color: var(--ok); background: var(--ok-bg); }
/* contact */
.cr-org-strip { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
/* campaigns */
.cr-segs .sd-kpi span { text-transform: none; letter-spacing: 0; font-size: 13px; }
.cr-camp { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.cr-camp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.js-camp .field { margin-bottom: 14px; }
@media (max-width: 700px) {
  .cr-board { grid-template-columns: 1fr; overflow: visible; }
  .cr-col { min-height: 0; }
  .ag-wrap:has(.cr-ag-table) { overflow: visible; }
  .cr-ag-table thead { display: none; }
  .cr-ag-table, .cr-ag-table tbody, .cr-ag-table tr { display: block; width: auto; }
  .cr-ag-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .cr-ag-table td { display: block !important; position: relative; padding: 3px 0 3px 96px; border: 0; }
  .cr-ag-table td:first-child, .cr-ag-table td.cr-ag-act { padding-left: 0; }
  .cr-ag-table td:first-child { padding-bottom: 8px; }
  .cr-ag-table td:not(:first-child)[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 4px; font-size: 12px; color: var(--ink-3); }
  .cr-ag-table td.cr-ag-act { padding-top: 8px; }
}
.cr-preview { position: sticky; top: 76px; background: #F3F0FF; border-color: #E2DCFF; }
.cr-mail { background: var(--white); border-radius: 14px; padding: 20px; display: grid; gap: 8px; border-top: 5px solid var(--violet); }
.cr-mail p, .cr-mail h3 { margin: 0; }
.cr-mail h3 { font-size: 18px; }
.cr-mail-sub { font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.cr-mail div p { font-size: 14px; line-height: 1.55; margin: 0 0 10px; white-space: pre-line; }
.cr-mail-btn { justify-self: start; background: var(--violet); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 10px; }
.cr-mail-btn[hidden] { display: none; }
.cr-mail-foot { font-size: 11.5px; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 8px; }
/* automations */
.cr-autos { display: grid; gap: 12px; }
.cr-auto > summary { list-style: none; display: flex; gap: 14px; align-items: center; cursor: pointer; }
.cr-auto > summary::-webkit-details-marker { display: none; }
.cr-auto[open] > summary { margin-bottom: 14px; }
.cr-auto-t { flex: 1; display: grid; gap: 2px; }
.cr-auto-t em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.cr-auto .field { margin-bottom: 10px; }
.cr-narrow { max-width: 360px; }
.cr-switch { position: relative; width: 42px; height: 24px; flex: none; }
.cr-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cr-switch span { position: absolute; inset: 0; border-radius: 999px; background: #CFCCDB; transition: background .15s; }
.cr-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.cr-switch input:checked + span { background: var(--violet); }
.cr-switch input:checked + span::after { left: 21px; }
.cr-switch input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
@media (max-width: 1100px) { .cr-org, .cr-camp { grid-template-columns: 1fr; } .cr-preview { position: static; } }
@media (max-width: 600px) { .cr-health { flex-direction: column; } }

/* Separate addresses: support.zolensa.com for customers, the access pickers in Users, sign-in kickers */
.spt-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.spt-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.spt-bar { max-width: 1080px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 22px; }
.spt-brand img { height: 28px; width: auto; }
.spt-nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.spt-nav a { padding: 8px 12px; border-radius: 8px; font: 600 14px var(--font); color: var(--ink-2); white-space: nowrap; }
.spt-nav a:hover { background: var(--bg); text-decoration: none; }
.spt-nav a.is-on { background: var(--lilac); color: var(--violet-dark); }
.spt-right { display: flex; align-items: center; gap: 10px; }
.spt-user { position: relative; }
.spt-user summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px; border-radius: 10px; }
.spt-user summary::-webkit-details-marker { display: none; }
.spt-user summary:hover { background: var(--bg); }
.spt-user-name { font: 600 14px var(--font); color: var(--ink); }
.spt-user-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 10px; display: grid; gap: 6px; }
.spt-user-menu button { text-align: left; padding: 8px 10px; border-radius: 8px; background: none; border: 0; font: 500 14px var(--font); color: var(--ink); cursor: pointer; width: 100%; }
.spt-user-menu button:hover { background: var(--bg); }
.spt-page { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 24px 40px; }
.spt-foot { text-align: center; }
@media (max-width: 700px) {
  .spt-bar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .spt-nav { order: 3; flex-basis: 100%; }
  .spt-right { margin-left: auto; }
  .spt-user-name { display: none; }
  .spt-page { padding: 20px 16px 32px; }
}
.us-access { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.us-access label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-3); }
.us-access select { font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.us-access button { grid-column: 1 / -1; justify-self: start; }
.auth-kicker { margin: 0 0 14px !important; font: 700 13px var(--font); letter-spacing: .08em; text-transform: uppercase; opacity: .85 !important; }
.na-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
