/* Settings share the UI-kit tokens with the workspace. */

/* «Настройки» over the menu reads as the menu's title, level with its first row (proto: 24 px, not the page's 30). */
.w-snav .settings-title { margin: 0 0 8px 10px; font-size: 24px; line-height: 32px; }
/* The page of a template is one column without the menu (scr §10.3), «← Шаблоны» over it at every width. */
.w-settings.is-template .w-settings-layout { grid-template-columns: minmax(0, 720px); }
.w-settings.is-template .w-snav { display: none; }
.w-settings.is-template .w-settings-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.settings-layout .settings-nav {
  display: block;
  position: sticky;
  top: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-nav-group + .settings-nav-group { margin-top: 24px; }
.settings-nav-group h2 {
  margin: 0 12px 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
}

.settings-layout .settings-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--body);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
}

.settings-layout .settings-nav button.active {
  background: var(--secondary);
  color: var(--foreground);
  font-weight: 500;
}

.settings-layout .settings-nav button:hover { background: var(--hover); }
.settings-layout .settings-nav button.active:hover { background: var(--secondary); }
.settings-nav button svg { width: 16px; height: 16px; flex: 0 0 16px; }
.settings-layout .settings-mobile-nav { display: none; }
.settings-content { min-width: 0; }

.settings-content .settings-card {
  max-width: none;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: none;
}

.settings-content .settings-card + .settings-card { margin-top: 24px; }
.settings-card h3 {
  margin: 0 0 20px;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -.01em;
}

.settings-card h4 {
  margin: 0 0 12px;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.settings-card p {
  max-width: 72ch;
  margin: 0 0 20px;
  color: var(--body);
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.settings-content .settings-hint,
.settings-content .field > small {
  margin: 12px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 20px;
}

.settings-content .settings-hint:empty { display: none; }
.settings-content .field { min-width: 0; gap: 8px; margin: 0 0 20px; }
.settings-content .field > span {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.settings-content .field > small { margin: 0; }
.settings-content .field-row { gap: 16px; }
.settings-content input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
  font-size: 14px;
  line-height: 20px;
}

.settings-content input:disabled { background: var(--sunken); color: var(--muted-foreground); cursor: not-allowed; }
.settings-content input:user-invalid { border-color: var(--danger); }
.settings-section { margin-top: 32px; }
.settings-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.settings-section-heading h3 { margin: 0; }
.settings-section-heading .chip { flex-shrink: 0; }
.settings-actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.settings-actions:empty { display: none; }
.settings-card > .settings-actions + .toggle-row { margin-top: 20px; }
.settings-card-title { align-items: center; gap: 12px; margin: 0 0 20px; }
.settings-card-title > div { min-width: 0; }
.settings-card-title > .avatar { flex: 0 0 32px; width: 32px; height: 32px; font-size: 12px; }
.settings-card-title strong { font-size: 15px; font-weight: 600; line-height: 22px; }
.settings-card-title p { margin: 2px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 20px; }

.settings-content .toggle-row {
  min-height: 72px;
  padding: 16px 0;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.settings-content .toggle-row > div { min-width: 0; }
.settings-content .toggle-row strong { font-size: 14px; font-weight: 500; line-height: 22px; }
.settings-content .toggle-row small { margin-top: 4px; color: var(--muted-foreground); font-size: 13px; line-height: 20px; }
.settings-role,
.settings-value { color: var(--muted-foreground); font-size: 13px; line-height: 20px; }
.settings-value { flex-shrink: 0; }

.settings-content .member-row,
.settings-content .consent-row,
.settings-content .visibility-example,
.settings-content .reference-row { min-height: 56px; padding: 16px 0; gap: 12px; border: 0; border-bottom: 1px solid var(--border); }
.settings-content .member-row:last-of-type,
.settings-content .consent-row:last-child,
.settings-content .visibility-example:last-child,
.settings-content .reference-row:last-of-type { margin-bottom: 0; border-bottom: 0; }
.settings-content .member-row > div,
.settings-content .consent-row > div,
.settings-content .visibility-example > div,
.settings-content .reference-row > span { min-width: 0; overflow-wrap: anywhere; }
.settings-content .member-row strong,
.settings-content .consent-row strong,
.settings-content .visibility-example strong { font-size: 14px; font-weight: 500; line-height: 22px; }
.settings-content .member-row small,
.settings-content .consent-row p,
.settings-content .visibility-example p { margin: 2px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 20px; }
.settings-content .member-row .avatar { flex-shrink: 0; }
.settings-content .member-row .settings-role { margin-left: auto; text-align: right; }
.settings-content .consent-row > svg,
.settings-content .visibility-example > svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--muted-foreground); }
.settings-content .consent-row .chip { flex-shrink: 0; }
.settings-content .reference-row > span { color: var(--body); font-size: 14px; line-height: 22px; }
.settings-content .reference-row > button { flex-shrink: 0; }

.settings-content .integration-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 16px 0; }
.integration-status-copy { min-width: 0; }
.settings-content .integration-status p { margin: 8px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 20px; }
.settings-content .integration-status > button { flex-shrink: 0; }
.settings-content .fetch-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.settings-content .settings-facts { margin: 16px 0 0; }
.settings-facts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.settings-facts dt { color: var(--muted-foreground); font-size: 13px; line-height: 20px; }
.settings-facts dd { margin: 0; color: var(--body); font-size: 14px; line-height: 22px; }
.settings-content .settings-disclosure { padding: 0; }
.settings-disclosure > summary { padding: 20px 24px; color: var(--foreground); font-size: 15px; font-weight: 600; line-height: 22px; cursor: pointer; }
.settings-disclosure > summary:focus-visible { outline: 2px solid var(--ring); outline-offset: -4px; border-radius: 12px; }
.settings-disclosure-body { padding: 4px 24px 24px; }

.settings-content .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.settings-content .quality-grid > div { padding: 20px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.settings-content .quality-grid b { font-size: 28px; font-weight: 600; line-height: 34px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.settings-content .quality-grid span { margin-top: 4px; color: var(--muted-foreground); font-size: 13px; line-height: 20px; }
.settings-content .empty { padding: 24px 0; color: var(--muted-foreground); font-size: 14px; line-height: 22px; }
.settings-content .background-picker { gap: 12px; }
.settings-content .background-picker > button { min-width: 0; border: 1px solid var(--input-border); border-radius: 8px; font-size: 13px; }
.settings-content .background-picker > button.active { border-color: var(--foreground); background: var(--secondary); }

@media (max-width: 860px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .settings-layout .settings-nav { display: none; }
  .settings-layout .settings-mobile-nav { display: grid; margin: 0; gap: 8px; }
  .settings-mobile-nav > span { color: var(--muted-foreground); font-size: 13px; font-weight: 500; line-height: 20px; }
}

@media (max-width: 540px) {
  .settings-content .settings-card { padding: 20px 16px; }
  .settings-content .settings-disclosure { padding: 0; }
  .settings-disclosure > summary { padding: 20px 16px; }
  .settings-disclosure-body { padding: 0 16px 20px; }
  .settings-content .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .settings-content input,
  .settings-content .btn,
  .settings-content .quality-button { min-height: 44px; }
  .settings-content .settings-section-heading { align-items: flex-start; flex-wrap: wrap; }
  .settings-content .integration-status { align-items: flex-start; flex-wrap: wrap; }
  .settings-content .member-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 12px; }
  .settings-content .member-row .avatar { grid-row: 1 / 3; }
  .settings-content .member-row .settings-role { grid-column: 2; margin-left: 0; text-align: left; }
  .settings-content .consent-row { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px 12px; }
  .settings-content .consent-row > .chip { grid-column: 2; justify-self: start; }
  .settings-facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- WP07: the organization's sections («Сотрудники», «Должности», «Вход и гости», «Журнал»), «Профиль»,
   «Первые шаги» and the page of an invitation. Colours are theme.css tokens only. ---------- */
/* .w-h3 (app.css, loaded later) has no margin: a heading of a part of a section needs the class twice. */
.org-gap, .w-h3.org-gap { margin-top: 16px; }
/* A row ends in its own padding; a card or a note does not, so the next part's heading keeps the same air after them. */
.w-scontent > :is(.w-card, .w-note, .w-section-text) + .w-h3.org-gap { margin-top: 32px; }
.w-scontent > .w-section-text + .w-srow { margin-top: 12px; } /* the line of the row does not touch the text above it */
.org-label { display: block; margin: 16px 0 6px; }
.org-head { display: flex; align-items: flex-start; gap: 16px; }
.org-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 13px; line-height: 20px; color: var(--muted-foreground); }
.org-note .w-i { width: 14px; height: 14px; margin-top: 3px; flex-shrink: 0; }
.org-tabs { margin-top: 16px; }
.org-tabs .w-tab { text-decoration: none; }
.org-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.org-search { flex: 1 1 240px; }
.org-filter { flex: 0 0 auto; }
.org-block { margin-top: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.org-block .w-h3 { margin-bottom: 4px; color: var(--muted-foreground); font-size: 13px; font-weight: 500; }
.org-list { margin-top: 8px; }
.org-row { display: grid; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.org-row:last-child { border-bottom: 0; }
/* «Люди» (designer spec B): a person and an invitation in one grid — avatar, who, the position over the teams or when
   the invitation went, the role, ⋯ — with no lines between the rows. */
.org-staff { grid-template-columns: 32px minmax(0, 1fr) 176px 120px 36px; min-height: 52px; border-bottom: 0; }
.org-who { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.org-who b { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* An address standing for a name is not a name: plain weight, «Имя укажет сам при входе» under it. */
.org-who b.is-bare { font-weight: 400; color: var(--body); }
.org-who small { font-size: 12px; color: var(--muted-foreground); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* The row of a person opens their card: the link of «who» is stretched over the row, ⋯ stays above it. */
.org-staff { position: relative; border-radius: 10px; }
.org-who-link { color: inherit; text-decoration: none; }
.org-who-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.org-who-link:focus-visible { outline: none; }
.org-who-link:focus-visible::after { box-shadow: 0 0 0 2px var(--ring); }
.org-staff:has(.org-who-link:hover) { background: var(--hover); }
.org-work { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 18px; color: var(--body); }
.org-pos, .org-teams-names { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* «и ещё N» never shrinks: a long name of a team is cut before it. */
.org-teams { display: flex; min-width: 0; gap: 4px; font-size: 12px; color: var(--muted-foreground); }
.org-teams-names { min-width: 0; }
.org-teams-more { flex-shrink: 0; white-space: nowrap; }
.org-inv-state { align-items: flex-start; color: var(--muted-foreground); }
.org-role { font-size: 13px; }
.org-menu { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 10px; color: var(--foreground); }
.org-menu .w-i { width: 18px; height: 18px; }
.org-menu-gap { width: 36px; }
.org-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; background: var(--secondary); color: var(--body); }
.org-badge.is-warn { background: var(--warning-bg); color: var(--warning); }
.org-value { color: var(--body); font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.org-dialog-text { margin: 0; color: var(--body); overflow-wrap: anywhere; }
.org-bullets { margin: 12px 0 0; padding: 0 0 0 20px; color: var(--body); font-size: 14px; line-height: 22px; }
.org-bullets li + li { margin-top: 6px; }

/* Positions: the list, the field of a new one, renaming in place. */
.org-positions { margin-top: 8px; }
.org-position { grid-template-columns: minmax(0, 1fr) auto 28px; }
/* A position leads to «Люди» of it: the name is a plain link, the whole row its target. */
.org-position { position: relative; }
.org-position-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--foreground); text-decoration: none; }
.org-position-name::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.org-position-name:focus-visible { outline: none; }
.org-position-name:focus-visible::after { box-shadow: 0 0 0 2px var(--ring); }
.org-position:has(.org-position-name:hover) { background: var(--hover); }
.org-position .w-popwrap { position: relative; z-index: 1; }
.org-position.is-none .org-position-name { color: var(--muted-foreground); }
.org-position .org-menu-gap { width: 28px; }
.org-positions-top { display: flex; justify-content: flex-end; margin-top: 12px; }
.org-add-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; text-decoration: none; color: var(--body); }
.org-add-link:hover { color: var(--foreground); }
.org-add-link .w-i { width: 14px; height: 14px; }
/* The position the list of «Люди» is narrowed to: a chip whose × shows everyone. */
.org-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.org-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; max-width: 100%; padding: 0 10px 0 12px; border-radius: 16px; background: var(--secondary); color: var(--foreground); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.org-chip:hover { background: var(--hover); }
.org-chip .w-i { flex-shrink: 0; width: 14px; height: 14px; color: var(--muted-foreground); }
.org-position.is-editing { grid-template-columns: minmax(0, 1fr); }
.org-count { font-size: 13px; }
.org-inline-form { margin-top: 8px; }
.org-inline-row { display: flex; align-items: center; gap: 8px; }
.org-inline-row .w-input { flex: 1; min-width: 0; }
.org-radios { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }

/* The dialogs: a card over the scrim, a sheet from below on a phone. */
.org-dialog-wrap { display: contents; }
/* Centred by margins, not by a transform: a transform would hold the list of a select inside the dialog and cut it. */
.org-dialog { position: fixed; z-index: 41; inset: 0; margin: auto; height: fit-content; width: 560px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; border-radius: 20px; background: var(--card); color: var(--foreground); box-shadow: var(--w-sheet-shadow); overflow: hidden; font-size: 14px; line-height: 22px; }
.org-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 0 24px; }
.org-dialog-body { flex: 1; overflow: auto; padding: 12px 24px 20px; }
.org-dialog-foot { padding: 16px 24px; border-top: 1px solid var(--border); }
.org-dialog-buttons { justify-content: flex-end; }
.org-inv-text { min-height: 112px; }
.org-inv-result { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--body); overflow-wrap: anywhere; }
.org-inv-line { margin: 0; }
.org-inv-line b { font-weight: 500; color: var(--foreground); }
.org-inv-line.is-ok { color: var(--foreground); }
.org-inv-line.is-warn { color: var(--late); }
.org-inv-role { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.org-inv-role .w-srow-hint { flex: 1 1 200px; margin: 0; }
.org-inv-one .org-dialog-buttons { margin-top: 16px; }

/* «Журнал» */
.org-table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.org-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
.org-table th { padding: 8px 12px; text-align: left; font-weight: 500; color: var(--muted-foreground); background: var(--sunken); border-bottom: 1px solid var(--border); white-space: nowrap; }
.org-table td { padding: 8px 12px; vertical-align: top; color: var(--body); border-bottom: 1px solid var(--border); overflow-wrap: break-word; } /* «anywhere» let a column shrink to a letter */
.org-table tr:last-child td { border-bottom: 0; }
.org-nowrap { white-space: nowrap; }
/* «Журнал»: «Когда» and «Кто» keep to their words, «Что» takes the rest and wraps a long address anywhere. */
.org-audit td:nth-child(2) { width: 30%; }
.org-audit-what { width: 55%; overflow-wrap: anywhere; }
/* «Роли и права» (proto): the rule on top, the actions by group, a column per role with how many hold it, a check or a
   dash in its cell and the condition, if any, under the check. */
.org-roles-rule { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; color: var(--foreground); font-size: 14px; line-height: 22px; }
.org-roles-rule .w-i { flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; color: var(--muted-foreground); }
.org-roles thead th { vertical-align: bottom; }
.org-roles thead th small { display: block; font-size: 12px; font-weight: 400; }
.org-roles thead th:not(:first-child), .org-roles td { width: 128px; text-align: center; }
.org-roles tbody th { font-weight: 400; color: var(--body); background: none; white-space: normal; text-align: left; vertical-align: top; }
.org-roles tbody tr:last-child th { border-bottom: 0; }
.org-roles .org-roles-group th { padding-top: 16px; background: none; color: var(--foreground); font-weight: 500; }
.org-roles-mark { display: inline-flex; color: var(--success); }
.org-roles-mark .w-i { width: 16px; height: 16px; }
.org-roles td small { display: block; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.org-roles td.is-no { color: var(--muted-foreground); }

/* «Первые шаги» on «Сегодня» */
.org-steps-card { margin-top: 20px; }
.org-steps-head { display: flex; align-items: flex-start; gap: 12px; }
.org-steps-head p { margin: 2px 0 0; }
.org-progress { height: 4px; margin-top: 14px; border-radius: 2px; background: var(--secondary); overflow: hidden; }
.org-progress span { display: block; height: 100%; border-radius: 2px; background: var(--success); }
.org-steps { margin: 8px 0 0; padding: 0; list-style: none; }
.org-step { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.org-step:last-child { border-bottom: 0; }
.org-step b { font-weight: 500; }
.org-step small { display: block; font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.org-step.is-done b { color: var(--muted-foreground); }
.org-step .w-step-ic { font-size: 11px; font-weight: 600; color: var(--muted-foreground); }
.org-step .w-step-ok { color: var(--primary-foreground); }
.org-step-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.org-step-done { font-size: 13px; }

/* The page of an invitation (#/invite/:token) */
.org-accept-who { margin: 4px 0 0; color: var(--body); font-weight: 500; overflow-wrap: anywhere; }
.org-accept .w-h2 { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  /* «Журнал» на телефоне: запись — карточка из строк «когда / кто / что / над кем», четыре колонки не помещаются. */
  .org-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .org-table tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .org-table tbody tr:last-child { border-bottom: 0; }
  .org-table td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; }
  .org-table td:first-child { font-size: 12px; line-height: 18px; color: var(--muted-foreground); }
  .org-table td:nth-child(2) { color: var(--foreground); font-weight: 500; }
  /* «Роли и права» на телефоне: действие, под ним в одну строку роли, которым оно можно; «нет» не рисуется. */
  .org-roles tbody th { display: block; padding: 0 0 4px; border: 0; color: var(--foreground); font-weight: 500; }
  .org-roles .org-roles-group { padding-bottom: 0; border-bottom: 0; }
  .org-roles .org-roles-group th { padding: 8px 0 0; color: var(--muted-foreground); font-size: 12px; }
  .org-table.org-roles td, .org-table.org-roles td:nth-child(2) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 4px; width: auto; margin-right: 12px; color: var(--body); font-weight: 400; font-size: 13px; text-align: left; }
  .org-roles td.is-no { display: none; }
  .org-roles td::after { content: attr(data-label); order: 1; }
  .org-roles td small { order: 2; display: inline; }
  .org-roles td small::before { content: "· "; }
  /* «События Meetvo»: the name keeps at least 160 px; when the two switches do not fit beside it they go under it. */
  .nt .w-srow-copy { flex: 1 1 160px; }
  .nt .w-srow-control { margin-left: auto; }
  .org-head { flex-wrap: wrap; }
  .org-head > .w-btn { width: 100%; height: 44px; }
  /* «Люди» reads only: avatar, who and the muted role; an invitation shows when it went in place of the role. */
  .org-staff { grid-template-columns: 32px minmax(0, 1fr) auto; min-height: 56px; }
  .org-staff .org-work:not(.org-inv-state), .org-invite .org-role, .org-menu-gap { display: none; }
  .org-staff .org-role { color: var(--muted-foreground); }
  .org-position { grid-template-columns: minmax(0, 1fr) auto; min-height: 48px; }
  .org-position .org-menu-gap { display: none; }
  .org-add-link { min-height: 44px; }
  .org-chip { min-height: 44px; }
  /* The search has its row, so its placeholder is read whole; the filters share the next one. All 44 high. */
  .org-search { flex: 1 1 100%; min-height: 44px; }
  .org-tools .org-filter { flex: 1 1 0; min-width: 0; }
  .org-filter .w-pick-btn { height: 44px; }
  .org-inline-row { flex-wrap: wrap; }
  .org-inline-row .w-btn { height: 44px; }
  .org-dialog { inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .org-dialog .w-btn { height: 44px; }
  .org-step { flex-wrap: wrap; }
  .org-step .w-btn { margin-left: 32px; height: 44px; }
}

/* WP16: «AI и расшифровка» — «Расход» (features/settings/org/usage.js). */
.usage { margin-top: 32px; }
.usage:first-child { margin-top: 0; }
/* Under .usage: app.css comes later and zeroes the margins of .w-h2 and .w-h3. */
.usage .usage-title { margin-bottom: 8px; }
.usage-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 24px 0 8px; }
.usage .usage-sub { margin: 32px 0 8px; }
.usage-val { font-size: 14px; color: var(--foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
.usage-warn .w-srow-hint { color: var(--warning); }
.usage-zone { margin: 12px 0 0; }

/* WP14: «Уведомления» — the switches of the channels of a kind, each with its name. */
.nt-switches { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.nt-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
/* A part read on request (settings/more.js, scr §11 «Подробнее»): the title and one line of what is inside, a chevron
   that turns when it is open. */
.set-more { margin-top: 12px; }
.set-more > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; list-style: none; }
.set-more > summary::-webkit-details-marker { display: none; }
.set-more > summary .w-grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-more > summary b { font-weight: 500; color: var(--foreground); }
.set-more > summary small { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--muted-foreground); }
.set-more > summary .w-i { flex-shrink: 0; width: 16px; height: 16px; color: var(--muted-foreground); transition: transform .12s; }
.set-more[open] > summary .w-i { transform: rotate(180deg); }
.set-more > summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
/* «Фон камеры»: the tiles keep their gap from the hint over them. */
.w-srow-copy > .background-picker { margin-top: 12px; }
/* The server's mail and storage: the card keeps its gap from the row under it. */
.set-admin .w-status-card { margin-top: 8px; }
.set-admin .w-status-card + .w-srow { margin-top: 12px; }
/* «Что и куда приходит»: the kinds by group, then one line of those that always come. */
.nt-group { margin: 16px 0 4px; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--muted-foreground); }
.nt-always { margin-top: 12px; }

/* WP20: Telegram — the account keeps its width and its two buttons go under it on a phone; the link and the code of
   linking, the code read aloud in groups of three. */
.tg-account .w-srow-copy { flex: 1 1 200px; }
.tg-code { display: grid; gap: 8px; justify-items: start; margin: 8px 0 0; }
.tg-code p { margin: 0; overflow-wrap: anywhere; }
.tg-digits { color: var(--foreground); font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }

/* WP40: the example of the morning list as the message reads, its lines kept and its buttons as chips. */
.tg-sample { display: grid; gap: 8px; justify-items: start; margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.tg-sample-text { white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; color: var(--foreground); }
.tg-sample-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-sample-button { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); }

/* WP28: «Моё → Календарь» — the person's calendars and the form that checks one before connecting it. */
.cal-srcs { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cal-src { padding: 14px 16px 4px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); }
.cal-src-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cal-src-copy { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.cal-src-copy b { font-weight: 500; overflow-wrap: anywhere; }
.cal-src-copy small { font-size: 13px; line-height: 20px; color: var(--muted-foreground); }
.cal-src-acts { display: flex; gap: 8px; }
.cal-src-error { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--warning-bg); color: var(--warning); font-size: 13px; line-height: 20px; }
.cal-src-error > span { flex: 1 1 220px; color: var(--body); }
.cal-src-error > .w-i { width: 14px; height: 14px; }
.cal-src .w-note { margin: 8px 0 0; }
.cal-providers { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cal-provider { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); text-align: left; color: var(--foreground); }
.cal-provider:hover { background: var(--hover); }
.cal-provider small { display: block; font-size: 13px; color: var(--muted-foreground); }
.cal-provider > .w-i { color: var(--muted-foreground); }
.cal-form { margin-top: 24px; display: flex; flex-direction: column; align-items: stretch; }
.cal-tabs { margin: 12px 0 0; }
.cal-methods { align-self: flex-start; margin-top: 12px; }
.cal-steps { margin: 4px 0 8px; padding-left: 20px; color: var(--body); font-size: 13px; line-height: 22px; }
.cal-label { margin-top: 12px; }
.cal-form .w-note { margin: 6px 0 0; }
.cal-form .cal-lock { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; }
.cal-lock .w-i { flex-shrink: 0; width: 14px; height: 14px; margin-top: 3px; }
.cal-form .w-actions, .cal-probe .w-actions { margin-top: 16px; }
.cal-probe { margin-top: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); }
.cal-probe p { margin: 0; }
.cal-sample { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 20px; }
.cal-sample li { display: flex; gap: 12px; min-width: 0; }
.cal-sample li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.cal-sample-when { flex-shrink: 0; color: var(--muted-foreground); }
.cal-picks { margin: 12px 0 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.cal-pick { display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* ---------- WP27: «Хранение» — the shortening that waits, with the term to give back, and the term without an end. */
.org-retention-pending, .org-retention-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warning-bg); color: var(--warning); }

/* ---------- WP41: «Ключи и MCP» — the keys with their facts, the key just made with the fragments of the clients. */
.mcp-block { margin-top: 24px; }
.mcp-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.mcp-keys { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mcp-key { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.mcp-key-head { display: flex; align-items: center; gap: 8px 12px; }
.mcp-key-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mcp-key-copy b { font-weight: 500; overflow-wrap: anywhere; }
.mcp-key-copy small, .mcp-key-facts { font-size: 13px; line-height: 20px; color: var(--muted-foreground); }
.mcp-key-facts { margin: 6px 0 0; overflow-wrap: anywhere; }
.mcp-key-soon { color: var(--warning); }
.mcp-badge { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 13px; line-height: 20px; }
.mcp-badge-on { color: var(--foreground); font-weight: 500; }
.mcp-badge-off { padding: 0 8px; border-radius: 999px; background: var(--secondary); color: var(--muted-foreground); }
.mcp-created { margin-top: 16px; padding: 16px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.mcp-created .w-note { margin: 0; overflow-wrap: anywhere; }
.mcp-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--warning-bg); color: var(--body); font-size: 13px; line-height: 20px; }
.mcp-warn > .w-i { flex-shrink: 0; width: 14px; height: 14px; margin-top: 3px; color: var(--warning); }
.mcp-tabs { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.mcp-snippet { display: flex; align-items: flex-start; gap: 8px; }
.mcp-snippet pre { flex: 1; min-width: 0; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--secondary); overflow-x: auto; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; line-height: 18px; white-space: pre; }
.mcp-snippet .w-btn { flex-shrink: 0; }
.mcp-created-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mcp-form { display: flex; flex-direction: column; gap: 6px; }
.mcp-form .w-note { margin: 0; }
.mcp-form .mcp-warn { margin-top: 10px; }
.mcp-fieldset { margin: 12px 0 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; }
.mcp-terms { align-self: flex-start; }
.mcp-check { align-items: flex-start; }
.mcp-check-copy { display: flex; flex-direction: column; }
.mcp-check-copy b { font-weight: 500; }
.mcp-check-copy small { font-size: 13px; line-height: 20px; color: var(--muted-foreground); }
@media (max-width: 540px) {
  .mcp-snippet { flex-direction: column; align-items: stretch; }
}
