/* ---------- Ф10 А: sign-in page, profile, the foot of the menu ---------- */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
    background-color: var(--light-gray);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 44px 40px 28px;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}
.login-brand .brand__mark { background: var(--primary); color: var(--white); }
.login-brand__name { font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; }

.login-card h1 {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    text-align: center;
}

.login-card .subtitle {
    color: var(--text-gray);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 28px;
    text-align: center;
}

.login-field { margin-bottom: 18px; }
.login-field label {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 6px;
}
.login-field .field-note { margin: 6px 0 0; }
.login-field .fld__head label { margin-bottom: 0; }
.login-field.fld + .login-field.fld { margin-top: 0; }

.login-submit { width: 100%; margin-top: 6px; }

.login-message {
    margin: 0 0 18px;
    padding: 10px 14px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent-wash);
    color: var(--primary);
    font-size: 0.88rem;
    line-height: 1.45;
}
.login-message--ok { border-color: var(--border-strong); background: var(--light-gray); }

.login-note {
    margin-top: 18px;
    color: var(--text-gray);
    font-size: 0.82rem;
    text-align: center;
}

.login-out { display: block; margin: 14px auto 0; }

.login-version {
    margin-top: 24px;
    color: var(--text-faint);
    font-size: 0.75rem;
    text-align: center;
}

.env-badge {
    padding: 4px 28px;
    border-radius: 4px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}
.env-badge--fixed {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* The foot of the menu: the user above Collapse, the version under it. */
.sidebar-user { padding-top: 12px; padding-bottom: 12px; }
.sidebar-user.active { border-left-color: var(--accent); }

.sidebar-version {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 0 24px 2px 27px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    line-height: 1.4;
    white-space: nowrap;
}
.sidebar-version:empty { display: none; }
.sidebar-version__env {
    padding: 0 6px;
    border-radius: 4px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.6;
}
.app.sidebar-collapsed .sidebar-version { justify-content: center; padding: 0 0 2px; }
.app.sidebar-collapsed .sidebar-version__text { display: none; }
.app.sidebar-collapsed .sidebar-user { padding-left: 0; padding-right: 0; justify-content: center; gap: 0; }

/* A platform administrator has no client account: the admin menu instead of the product's, no context, no "New research". */
.app.is-platform-admin .sidebar .client-nav,
.app.is-platform-admin .topbar__ctx .ctx-pick,
.app.is-platform-admin .topbar__new,
.app.is-platform-admin .stage-badge { display: none; }
.sidebar .admin-nav { display: none; }
.app.is-platform-admin .sidebar .admin-nav { display: flex; }

.profile-wrap { max-width: 640px; }
.profile-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; overflow-wrap: anywhere; }
.profile-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px 20px;
    margin: 0 0 20px;
    font-size: 0.9rem;
}
.profile-facts dt { color: var(--text-gray); }
.profile-facts dd { margin: 0; overflow-wrap: anywhere; }
.profile-form { display: flex; flex-direction: column; gap: 16px; max-width: 380px; }
.profile-form .login-message { margin: 0; }

.profile-form .btn { align-self: flex-start; }


/* ---------- Ф10 Б: rights, the menu's groups, credits, users, the admin area ---------- */

/* What the user's rights do not cover (app.js applyRights) — [hidden] must win over display: flex. */
.nav-item[hidden], .nav-group[hidden], .btn[hidden], [data-perm][hidden] { display: none !important; }
.app.no-research_delete .rv-delete,
.app.is-read-only .rv-delete { display: none; }

/* A menu group folds by its title; the chevron turns. The narrow menu shows every item. */
.nav-group__header { cursor: pointer; transition: color 0.15s ease; }
.nav-group__header:hover { color: rgba(255, 255, 255, 0.75); }
.nav-group__header:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-group__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-group__chev { width: 14px; height: 14px; margin-left: auto; transition: transform 0.2s; }
.nav-group.is-folded .nav-group__chev { transform: rotate(-90deg); }
.nav-group.is-folded .nav-group__items { display: none; }
.app.sidebar-collapsed .nav-group.is-folded .nav-group__items { display: flex; }
/* Only the menu between the logo and the foot scrolls. */
.sidebar .client-nav, .sidebar .admin-nav { flex: 1 1 auto; min-height: 0; }
.sidebar .admin-nav .nav-group:first-child .nav-group__header { padding-top: 0; }

/* The "view account" mode: a banner above the page, the whole app read-only. */
.view-banner {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 32px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.86rem;
    line-height: 1.4;
}
.view-banner[hidden] { display: none; }
.view-banner__text { flex: 1 1 auto; min-width: 0; }
.view-banner__exit { flex: 0 0 auto; background: var(--white); color: var(--primary); border: 0; }
.view-banner__exit:hover { background: var(--light-gray); }

/* Pages of the admin area, Billing and Users. */
.adm .panel { padding: 28px 32px; }
.adm-head { align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; }
.adm-head h2 { display: flex; align-items: center; gap: 10px; }
.adm-head .ac-select { min-width: 190px; }
.adm-table-wrap { overflow-x: auto; margin: 0 -4px; }
.adm-table td { vertical-align: top; }
.adm-table td.num, .adm-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-table .adm-what { white-space: normal; min-width: 180px; }
.adm-table .adm-what > b, .adm-table .adm-what > span:not(.adm-sub) { display: block; }
.adm-table td.adm-what { white-space: normal; }
.adm-table td.adm-rights { white-space: normal; min-width: 200px; max-width: 360px; color: var(--text-gray); font-size: 0.84rem; }
.adm-table td.adm-when { color: var(--text-gray); font-size: 0.84rem; }
.adm-sub { display: block; color: var(--text-gray); font-size: 0.8rem; white-space: normal; overflow-wrap: anywhere; }
.adm-name { font-weight: 600; color: var(--primary); text-decoration: none; }
.adm-name:hover { color: var(--accent-dark); }
.adm-row-link { cursor: pointer; }
.adm-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.02em; }
.adm-plus { color: var(--primary); font-weight: 600; }
.adm-minus { color: var(--accent-dark); }
.adm-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.adm-table td.adm-actions, .adm-table td.adm-actions-cell { white-space: normal; }
.adm-table td.adm-actions { min-width: 150px; }
.adm-line { color: var(--text-gray); font-size: 0.88rem; margin: -8px 0 16px; }
.adm-more { font-size: 0.86rem; color: var(--text-gray); }
.adm-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-filters .ac-select { min-width: 180px; }

.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 4px 0 20px; }
.adm-kpi { border: 1px solid var(--border-gray); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.adm-kpi__label { color: var(--text-gray); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.adm-kpi__value { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; overflow-wrap: anywhere; }
.adm-kpi__note { color: var(--text-gray); font-size: 0.8rem; margin-top: 2px; }
.adm-kpi--warn { border-color: var(--accent); background: var(--accent-wash); }
.adm-kpi--warn .adm-kpi__value { color: var(--accent-dark); }
.adm-kpi--action { display: flex; flex-direction: column; align-items: flex-start; }
.adm-kpi--action .btn { margin-top: 10px; }

.adm-redeem, .adm-inline-form { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.adm-redeem .form-group, .adm-inline-form .form-group { flex: 0 1 280px; min-width: 200px; }
.adm-redeem .fld--action, .adm-inline-form .fld--action { flex: none; min-width: 0; }
.adm-personas-form { margin-top: 4px; max-width: 720px; }
.adm-redeem .login-message, .adm .login-message { margin: 12px 0 0; }
.adm .set-what { margin-top: 14px; }
.adm-toggles { display: flex; flex-direction: column; gap: 12px; }
.adm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }

/* The role and its rights (users.js). */
.rights { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.rights .form-group { max-width: 320px; }
.rights__groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.rights__group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rights__title { color: var(--text-gray); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rights__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 900px) {
    .rights__groups, .rights__pair, .adm-form-grid { grid-template-columns: 1fr; }
}

/* The temporary password, shown once. */
.temp-pass { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.temp-pass__value {
    flex: 1 1 auto;
    padding: 10px 14px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    background: var(--light-gray);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    user-select: all;
    overflow-wrap: anywhere;
}

/* Settings → Models / Providers: which level the page shows (Ф10 Б). */
.set-level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
    margin: 0 0 20px;
    padding: 12px 16px;
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: var(--light-gray);
    font-size: 0.86rem;
}
.set-level__text { flex: 1 1 320px; min-width: 0; }
.app.is-platform-admin .crumbs:empty + .crumbs__sep--title { display: none; }
.adm-head .ac-select, .adm-filters .ac-select { width: auto; flex: 0 0 auto; }
.adm-filters { flex-direction: row; align-items: center; }
.adm-table a { color: var(--primary); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.adm-table a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
.adm-table a.adm-name { text-decoration: none; }
/* A tick with its explanation under the label (rights, the account's sections). */
.rights .ac-check, .adm-toggles .ac-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 2px;
    align-items: start;
}
.rights .ac-check .ac-check__box, .adm-toggles .ac-check .ac-check__box { grid-row: 1; margin-top: 1px; }
.rights .ac-check .ac-check__label, .adm-toggles .ac-check .ac-check__label { grid-column: 2; font-weight: 600; }
.rights .ac-check .ac-check__note, .adm-toggles .ac-check .ac-check__note { grid-column: 2; color: var(--text-gray); font-size: 0.8rem; line-height: 1.4; margin: 0; }
/* The admin tables fit 1280 without a scroll of their own: headers and dates wrap. */
.adm-table th, .adm-table td { padding: 11px 12px; }
.adm-table th { white-space: normal; }
.adm-table td.adm-when { white-space: normal; min-width: 92px; }
.adm-table .adm-what { min-width: 140px; }
.adm-table .adm-what span { overflow-wrap: anywhere; }

/* ---------- SA-051: Voice of the audience (voice.js) ---------- */
.voa-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: -8px; }
.voa-caveat {
    display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
    line-height: 1.6; border: 1px solid var(--accent); background: var(--accent-wash); color: var(--accent-dark); cursor: pointer; white-space: nowrap;
}
.voa-caveat.has-tip:hover, .voa-caveat.has-tip--open { box-shadow: 0 0 0 2px var(--accent-ring); }
.voa-anon { font-size: 0.78rem; color: var(--text-gray); }
.voa-form { margin-top: 4px; }
.voa-subject { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.voa-subject > .voa-site-err { grid-column: 1 / -1; margin-top: -4px; font-size: 0.8rem; font-weight: 600; color: var(--accent-dark); }
.voa-subject > .voa-site-err[hidden] { display: none; }
.voa-subject > .voa-site.is-invalid { border-color: var(--accent); }
.voa-tp { display: flex; align-items: center; gap: 6px; }
.voa-tpline .tip-icon { vertical-align: -2px; }
.voa-subject > .link-btn { white-space: nowrap; }
.voa-subject > .btn { height: var(--ac-control-h); padding-top: 0; padding-bottom: 0; }
.voa-competitors { display: flex; flex-direction: column; gap: 10px; }
.voa-comp-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.voa-known { cursor: pointer; border: 1px solid var(--border-gray); font: inherit; font-size: 0.8rem; }
.voa-known:hover { border-color: var(--primary); }
.voa-known-label { font-size: 0.8rem; margin-left: 6px; }
.voa-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.voa-sources .ac-check { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: start; }
.voa-sources .ac-check__box { grid-row: 1; margin-top: 1px; }
.voa-sources .ac-check__label { grid-column: 2; font-weight: 600; }
.voa-sources .ac-check__note { grid-column: 2; color: var(--text-gray); font-size: 0.8rem; line-height: 1.4; margin: 0; }
.voa-sources .voa-later { opacity: 0.6; }
.voa-go { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border-gray); }
.voa-price { font-size: 0.85rem; line-height: 1.5; flex: 1 1 400px; min-width: 0; }
.voa-parts { margin: 8px 0 10px 18px; font-size: 0.86rem; line-height: 1.5; }
.voa-apps { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.voa-app-row { text-align: left; background: var(--white); border: 1px solid var(--border-gray); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 0.86rem; cursor: pointer; }
.voa-app-row:hover { border-color: var(--primary); }
.voa-step { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; margin: 0 0 10px; }
.voa-sourcelist { margin: 0; padding-left: 18px; font-size: 0.84rem; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.voa-meta { margin-bottom: 12px; overflow-wrap: anywhere; }
.voa-summary { margin: 14px 0 6px; font-size: 0.92rem; line-height: 1.55; }
.voa-tools { margin: 14px 0 6px; }
.voa-filters { flex-wrap: wrap; gap: 10px; align-items: center; }
.voa-filters .voa-filter { width: 220px; flex: none; }
.voa-kinds { margin: 0; }
.voa-total { margin: 0 0 12px; font-size: 0.84rem; }
.voa-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.voa-theme { border: 1px solid var(--border-gray); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--white); }
.voa-theme--motive { border-top: 3px solid var(--primary); }
.voa-theme--barrier { border-top: 3px solid var(--accent); }
.voa-theme--complaint { border-top: 3px solid var(--accent-dark); }
.voa-theme--praise { border-top: 3px solid #737373; }
.voa-theme__top { display: flex; align-items: center; gap: 8px; }
.voa-theme__n { font-size: 0.8rem; margin-left: auto; }
.voa-kind { font-size: 0.72rem; font-weight: 700; }
.voa-theme__title { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.voa-theme__meaning { margin: 0; font-size: 0.86rem; color: var(--text-gray); line-height: 1.45; }
.voa-theme__by { margin: 0; font-size: 0.78rem; }
.voa-bars { display: flex; flex-direction: column; gap: 5px; margin: 2px 0; }
.voa-bar { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 0.78rem; }
.voa-bar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-gray); }
.voa-bar__track { height: 8px; border-radius: 4px; background: var(--light-gray); overflow: hidden; }
.voa-bar__fill { display: block; height: 100%; border-radius: 4px; }
.voa-bar__fill--product { background: var(--accent); }
.voa-bar__fill--comp { background: #737373; }
.voa-bar__num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--primary); }
.voa-quotes { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.voa-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--border-strong); background: var(--light-gray); border-radius: 0 8px 8px 0; }
.voa-quote__text { margin: 0; font-size: 0.88rem; line-height: 1.45; overflow-wrap: anywhere; }
.voa-quote__tr { margin: 4px 0 0; font-size: 0.82rem; color: var(--text-gray); line-height: 1.45; overflow-wrap: anywhere; }
.voa-quote__meta, .voa-snippet__meta { margin: 4px 0 0; font-size: 0.74rem; color: var(--text-gray); overflow-wrap: anywhere; }
.voa-quote__meta a, .voa-snippet__meta a { color: var(--text-gray); text-decoration: underline; text-underline-offset: 2px; }
.voa-theme__all { align-self: flex-start; }
.voa-theme__list:empty { display: none; }
.voa-snippets { display: flex; flex-direction: column; border-top: 1px solid var(--border-gray); }
.voa-snippet { padding: 8px 0; border-bottom: 1px solid var(--border-gray); }
.voa-snippet__text { margin: 0; font-size: 0.84rem; line-height: 1.45; overflow-wrap: anywhere; }
.voa-more { display: flex; gap: 10px; margin-top: 18px; }
.voa-more__box { margin-top: 10px; }
.voa-how__line { margin: 8px 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--text-gray); }
.voa-history { display: flex; flex-direction: column; }
.voa-hrow { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border-gray); }
.voa-hrow:first-child { border-top: 0; }
.voa-hrow.is-on .voa-hrow__title { color: var(--accent-dark); }
.voa-hrow__main { flex: 1 1 auto; min-width: 0; }
.voa-hrow__title { font-weight: 600; color: var(--primary); overflow-wrap: anywhere; }
.voa-hrow__meta { margin: 2px 0 0; font-size: 0.8rem; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
    .voa-themes { grid-template-columns: 1fr; }
    .voa-subject { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* «Show password» eye inside every password field (password-toggle.js) */
.pw { position: relative; display: block; min-width: 0; }
.pw > .ac-input,
.pw > input { width: 100%; padding-right: 42px; }
.pw__btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-gray);
    cursor: pointer;
}
.pw__btn:hover,
.pw__btn:focus-visible { color: var(--text-dark, currentColor); }

/* A button standing in one row with a control is as tall as that control (the rule of SA_FIELD.action, for rows that are
   not a field grid): the merge select and “Remove” of a segment card, “Confirm” beside the type / channel of an ad message,
   the “×” beside a stimulus of a hypothesis. Checked by ui:check-forms. */
.sch-card__tools > .btn,
.msg-field__line > .btn,
.stim-edit__row > .btn { align-self: stretch; height: auto; min-height: 0; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; justify-content: center; }
.sch-card__tools, .msg-field__line { align-items: stretch; }

/* The persona agent's questions as one chat (2026-10-05): on the Personas tab directly under the progress
   block while the dialogue goes on; afterwards the answers are a section of the report (.run-answers). The chat
   pattern of the segments discussion (.sd__log, .msg). */
.run-ask { border-left: 3px solid var(--accent); display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 84px; }
.run-ask .section-head { margin-bottom: 0; }
.run-ask .section-note { margin: 0; }
.run-ask__log { max-height: 520px; }
.run-ask .msg--them .msg__body { font-size: 0.9rem; }
.run-ask .msg__body.md h1, .run-ask .msg__body.md h2, .run-ask .msg__body.md h3 { font-size: 0.95rem; margin: 0.6em 0 0.3em; }

/* The progress of a build: the first block of the tab, one line of a fixed height — nothing below it moves while
   the line changes (runs.js paintBuild). */
.run-progress .section-head { margin-bottom: 12px; }
.run-progress .thinking { margin-bottom: 0; align-items: center; }
.run-progress .thinking__label, .run-progress .thinking__text { line-height: 1.4; min-height: 1.4em; }
.thinking__text--plain { direction: ltr; }
.thinking__dot.is-paused { animation: none; opacity: 0.45; }

/* The marketer's answers to the agent: a section of the report. */
.run-answers { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-gray); }
.run-answers h3 { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.run-answers .section-note { margin: 0 0 14px; }
.run-answers__pair { padding: 14px 0; border-top: 1px solid var(--border-gray); }
.run-answers__pair:first-of-type { border-top: 0; padding-top: 0; }
.run-answers__label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-gray); margin-bottom: 4px; }
.run-answers__q { font-size: 0.9rem; margin-bottom: 12px; }
.run-answers__q.md h1, .run-answers__q.md h2, .run-answers__q.md h3 { font-size: 0.95rem; margin: 0.6em 0 0.3em; }
.run-answers__a { font-size: 0.92rem; white-space: pre-wrap; margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--light-gray); }

/* The questions of the market sizing as small threads (Market & segments, 2026-10-05). */
.mkt-thread { padding: 14px 0; border-top: 1px solid var(--border-gray); display: flex; flex-direction: column; gap: 10px; }
.mkt-thread__head { display: flex; gap: 10px; align-items: baseline; }
.mkt-thread__head b { font-weight: 600; line-height: 1.45; }
.mkt-thread__meta { margin: 0 0 0 32px; font-size: 0.8rem; color: var(--text-gray); }
.mkt-thread__body { margin-left: 32px; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.mkt-thread .sd__log { max-height: 420px; }
.mkt-thread .msg__body { font-size: 0.88rem; }
.mkt-thread__why { vertical-align: -3px; }
.mkt-thread--done .sd__log { max-height: none; overflow: visible; }
.mkt-thread__label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-gray); display: block; margin-bottom: 2px; }
.msg--me .mkt-thread__label { color: rgba(255, 255, 255, 0.72); }
.mkt-thread--done { padding: 10px 0; }
.mkt-q__past { margin-top: 12px; }

/* The open questions, compact (2026-10-06): the question, then one row of fields — suggested answers, own answer,
   “Find data” and “Ask to explain” — and under it only what was asked for (data found, explanations). */
.mkt-qa { padding: 12px 0; border-top: 1px solid var(--border-gray); display: flex; flex-direction: column; gap: 8px; }
.mkt-qa__note .tip-icon { vertical-align: -3px; }
.mkt-qa__body { margin-left: 32px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mkt-qa__row.fgrid { --fgap: 0px; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.5fr) auto; column-gap: 12px; }
.mkt-qa__row--text.fgrid { grid-template-columns: minmax(0, 1fr) auto; }
.mkt-qa__acts .fld__ctl { gap: 8px; }
.mkt-qa__acts .btn { white-space: nowrap; }
@media (max-width: 860px) {
    .mkt-qa__row.fgrid, .mkt-qa__row--text.fgrid { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
}
.mkt-qx { border: 1px solid var(--border-gray); border-radius: 10px; background: var(--white); }
.mkt-qx__sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 40px 8px 12px; cursor: pointer; font-size: 0.84rem; }
.mkt-qx.fold-details > .mkt-qx__sum { padding-right: 40px; }
.mkt-qx > .mkt-qx__sum > .fold-btn { right: 8px; }
.mkt-qx__title { font-weight: 600; }
.mkt-qx__note { font-size: 0.78rem; color: var(--text-gray); }
.mkt-qx:not(.is-folded) > .mkt-qx__sum { border-bottom: 1px solid var(--border-gray); }
.mkt-qx__body { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.mkt-qx__text { margin: 0; font-size: 0.88rem; line-height: 1.5; white-space: pre-wrap; max-width: 860px; }
.mkt-qx__asked { margin: 0; font-size: 0.8rem; color: var(--text-gray); line-height: 1.45; }
.mkt-qfind { display: flex; flex-direction: column; gap: 8px; }
.mkt-qfind__item { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; min-width: 0; }
.mkt-qfind__use { align-self: flex-start; margin-top: 3px; }
.mkt-qfind__foot { display: flex; justify-content: flex-end; }

/* ---------- the research's steps as a progress line (top of Overview; wizard.js stepsLine) ----------
 * Circles as in the steps list (.wz-plan__num): done — filled, the next step — the accent, later ones — outlined. */
.rv-steps-panel { padding-top: 18px; padding-bottom: 16px; }
.rv-steps { list-style: none; display: grid; margin: 0; padding: 0; }
.rv-step { position: relative; min-width: 0; display: flex; justify-content: center; }
/* The line from the circle before to this one (behind the circles). */
.rv-step + .rv-step::before {
    content: '';
    position: absolute;
    top: 13px;
    left: calc(-50% + 14px);
    right: calc(50% + 14px);
    height: 2px;
    background: var(--border-gray);
}
.rv-step.is-reached::before { background: var(--primary); }
.rv-step__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    padding: 0 6px;
    color: var(--text-gray);
    text-decoration: none;
    text-align: center;
}
.rv-step__num {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--white);
    font-size: 0.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: var(--transition);
}
.rv-step__name { font-size: 0.82rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rv-step.is-done .rv-step__num { background: var(--primary); border-color: var(--primary); color: var(--white); }
.rv-step.is-done .rv-step__name { color: var(--primary); }
.rv-step.is-current .rv-step__num { background: var(--accent); border-color: var(--accent); color: var(--white); box-shadow: 0 0 0 3px var(--accent-ring); }
.rv-step.is-current .rv-step__name { color: var(--primary); font-weight: 700; }
a.rv-step__link:hover .rv-step__name { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a.rv-step__link:hover .rv-step__num { border-color: var(--primary); }

/* ---------- Personas and Hypotheses: two tabs in one view (runs.js sets data-tab) ---------- */
#view-run[data-tab="hypotheses"] :is(.run-head, #runProgress, #runAsk, #runError, #cellsPanel, #schemePanel, #segSummary, #personaGrid, #runReport, #archivePanel) { display: none !important; }
#view-run[data-tab="personas"] :is(#hypTop, #hypSection) { display: none !important; }
/* The top of the Hypotheses tab: the note on the left, the two chat buttons on the right. */
.hyp-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.hyp-top__text { flex: 1 1 auto; min-width: 0; }
.hyp-top h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.hyp-top .section-note { margin: 4px 0 0; }
.hyp-top .section-note a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.hyp-top .result-acts { flex-shrink: 0; flex-wrap: nowrap; }
.hyp-top .result-acts .btn { white-space: nowrap; }
/* "Chat with a persona": the personas of the research, a row each. */
.hyp-pick { display: flex; flex-direction: column; gap: 8px; }
.hyp-pick__row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 14px; border: 1px solid var(--border-gray); border-radius: 10px;
    color: var(--primary); text-decoration: none; transition: var(--transition);
}
.hyp-pick__row:hover, .hyp-pick__row:focus-visible { border-color: var(--primary); }
.hyp-pick__who { display: flex; flex-direction: column; min-width: 0; font-size: 0.92rem; }
.hyp-pick__who .cell-muted { font-size: 0.82rem; }


