
.rg-section { display: flex; flex-direction: column; gap: var(--sp-100); min-width: 0; }
.rg-caption {
  margin: 0;
  padding: 0 var(--sp-200);
  font-family: var(--font);
  font-size: var(--fs-s); line-height: var(--lh-s);
  font-weight: var(--fw-semi);
  color: var(--ink2);
}
.rg-foot {
  padding: 0 var(--sp-200);
  font-size: var(--fs-s); line-height: var(--lh-s);
  color: var(--ink3);
  /* a footnote never leaves one word alone on its last line */
  text-wrap: pretty;
}
.rg-foot:has(> :only-child:empty) { display: none; }
.rg-group {
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: 0 0 0 var(--bw) var(--rg-ring, transparent);
  overflow: clip;
}
:root[data-theme="light"] .rg-group,
:root:not([data-theme]) .rg-group { --rg-ring: var(--a-100); }
/* 15.2882: a group with no rows yet draws nothing - its ring stood as a stray line between its caption and its note */
.rg-group:empty { display: none; }

.rg-row {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-150);
  width: 100%;
  min-height: calc(var(--h-field) + var(--sp-100));
  margin: 0;
  padding: var(--sp-100) var(--sp-200);
  border: 0; border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit; font-size: var(--fs); line-height: var(--lh);
  font-weight: var(--fw-reg);
  text-align: left;
}
@media (max-width: 700px) { .rg-row { padding-block: var(--sp-075); } }
@media (max-width: 700px) {
  .rg-row:not(.rg-field):not(.rg-stack):not(.rg-cells) { flex-wrap: wrap; row-gap: var(--sp-050); }
  .rg-row:not(.rg-field):not(.rg-stack) > .rg-main { flex-basis: 0; min-width: min(8em, 100%); }
  .rg-row > .rg-end { max-width: 100%; flex-wrap: wrap; }
  /* 15.890 («почему смещено так»): a palette moved under its label starts at the row's left edge - a short one kept
     to the right stood apart from the long one that filled the width */
  .rg-row > .rg-end:has(> .swatches) { flex-basis: 100%; margin-left: 0; justify-content: flex-start; }
}
/* 15.2892 («Что за кривые блять опять интерфейсы»): a value with its own switch beside it is one control - it stays at the
   row's right end on one line with the label, never dropped under it */
@media (max-width: 700px) {
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > .switch):has(> .rg-end > :is(input, .numfield)) {
    display: flex; flex-wrap: nowrap;
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > .switch):has(> .rg-end > :is(input, .numfield)) > .rg-end {
    flex-wrap: nowrap; margin-left: auto; justify-content: flex-end;
  }
}
/* 15.2506: on a phone a right part of several pieces (a chip and a value, a value and a meter) goes under the words, as
   iOS stacks a row whose value does not fit; the row's chevron stays centred at its right end */
@media (max-width: 700px) {
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)) {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "end";
  }
  .rg-row.rg-indent:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)) {
    grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "lead main" "lead end";
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)) > :first-child:not(.rg-main, .rg-end) {
    grid-area: lead;
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)) > .rg-main { grid-area: main; }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)) > .rg-end {
    grid-area: end; margin-left: 0; justify-content: flex-start;
  }
  /* its meter takes the rest of the line, or the whole next line where it wraps (iOS's storage bar) */
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)) > .rg-end > .row-meter {
    flex: 1 1 auto; width: auto; min-width: calc(var(--sp-500) * 2);
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .rg-chev) {
    padding-right: calc(var(--sp-200) + var(--sp-200) + var(--sp-100));
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)) > .rg-end > .rg-chev {
    position: absolute; top: 0; bottom: 0; right: var(--sp-200); align-items: center;
  }
  /* 15.2713: rows compared by their meters - the value stays at the words' right and the meter takes the whole next
     line, so every meter of a group starts and ends at one place (iOS's storage list) */
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main val" "meter meter"; column-gap: var(--sp-150);
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) > .rg-end {
    display: contents;
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) > .rg-end > .rg-val {
    grid-area: val; align-self: start;
  }
  .rg-row:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) > .rg-end > .row-meter {
    grid-area: meter; align-self: center; margin-block: var(--sp-050);
  }
  /* 15.2808: such a row with a leading mark (a company's logo) keeps the mark at its left; the words, the value and the
     meter stand one under another beside it - the areas of a row without a mark broke it apart */
  .rg-row.rg-indent:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) {
    grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "lead main" "lead end";
  }
  .rg-row.rg-indent:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) > :first-child:not(.rg-main, .rg-end) {
    align-self: start;
  }
  .rg-row.rg-indent:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) > .rg-end {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  }
  .rg-row.rg-indent:not(.rg-field, .rg-stack):has(> .rg-end > :not(.rg-chev, button, .rg-acts) ~ :not(.rg-chev, button, .rg-acts)):has(> .rg-end > .row-meter) > .rg-end > .row-meter {
    flex: 1 1 100%; min-width: 0;
  }
}
.rg-row + .rg-row::before {
  content: "";
  position: absolute; top: 0; right: 0; left: var(--sp-200);
  height: var(--bw);
  background: var(--line);
}
/* the hairline starts where the words do: past a row's leading mark (an avatar, an icon, an add row's plus) */
.rg-row.rg-indent + .rg-row::before,
.rg-row + .rg-row.rg-indent::before,
.rg-row:has(> .rg-plus) + .rg-row::before,
.rg-row + .rg-row:has(> .rg-plus)::before {
  left: calc(var(--sp-200) + var(--sp-400) + var(--sp-150));
}
/* a company's logo is a wide mark */
.rg-row:has(> .rg-avatar.rg-wide:not(.rg-big)) + .rg-row::before,
.rg-row + .rg-row:has(> .rg-avatar.rg-wide:not(.rg-big))::before {
  left: calc(var(--sp-200) + var(--sp-400) * 2 + var(--sp-150));
}
/* a usage dot is a small mark: the words start just past it */
.rg-row:has(> .usage-dot) + .rg-row::before,
.rg-row + .rg-row:has(> .usage-dot)::before {
  left: calc(var(--sp-200) + var(--sp-100) + var(--sp-150));
}
.rg-row[hidden], .rg-section[hidden] { display: none; }
/* a search hides rows: the first row still seen after hidden ones has no line above it */
.rg-row:not(.rg-row:not([hidden]) ~ .rg-row)::before { display: none; }
button.rg-row, label.rg-row { cursor: pointer; }
/* 15.2197: the pointer's shade only where there is a pointer - a finger's tap left it on the row it pressed */
@media (hover: hover) {
  button.rg-row:hover:not(:disabled), label.rg-row.rg-field:not(:has(:disabled)):hover { background: var(--a-100); }
}
label.rg-row.rg-field:has(:disabled) { cursor: default; }
button.rg-row:disabled, .rg-row[aria-disabled="true"] { color: var(--ink-dis); cursor: default; }
.rg-row.rg-sel { background: var(--acc-weak); }

.rg-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
/* 15.2677: a row's leading mark keeps its own box - a long sub-line squeezed the report's tick circle into an ellipse */
.rg-row.rg-indent > :first-child:not(.rg-main, .rg-end) { flex: none; }
/* 15.2677: a row whose words may run long (a list, a client's text) keeps its 32 px mark and its value at its head - the
   title, on however many lines, and the first line under it, where a two-line row centres them - never adrift mid-row
   (a three-line list item, Material). The title shares the mark's grid line (a subgrid), so the head is measured, not
   assumed; the mark and the value hang from that line by a margin box of no height and never stretch it */
.rg-row.rg-indent.rg-top {
  --rg-head: var(--lh-s);
  display: grid; grid-template-columns: auto minmax(0, 1fr) fit-content(60%); grid-template-rows: auto 1fr;
  align-items: start; row-gap: 0;
}
.rg-row.rg-indent.rg-top > .rg-main { grid-area: 1 / 2 / span 2; display: grid; grid-template-rows: subgrid; }
.rg-row.rg-indent.rg-top > :is(:first-child:not(.rg-main, .rg-end), .rg-end) { grid-row: 1; align-self: center; }
.rg-row.rg-indent.rg-top > :first-child:not(.rg-main, .rg-end) {
  grid-column: 1;
  margin-block: calc((var(--rg-head) - var(--sp-400)) / 2) calc((var(--rg-head) + var(--sp-400)) / -2);
}
.rg-row.rg-indent.rg-top > .rg-end {
  grid-column: 3; max-width: none;
  margin-block: calc((var(--rg-head) - var(--lh)) / 2) calc((var(--rg-head) + var(--lh)) / -2);
}
/* in a narrow group the value goes under the title, as iOS stacks a value that does not fit (15.2506) - never under the
   whole list, nor squeezing the title onto two lines */
@container (max-width: 360px) {
  .rg-row.rg-indent.rg-top:has(> .rg-end:not(:empty)) {
    --rg-head: var(--lh); grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr;
  }
  .rg-row.rg-indent.rg-top:has(> .rg-end:not(:empty)) > .rg-main { grid-row: 1 / span 3; }
  .rg-row.rg-indent.rg-top:has(> .rg-end:not(:empty)) > .rg-main > .rg-sub { grid-row: 3; }
  .rg-row.rg-indent.rg-top:has(> .rg-end:not(:empty)) > .rg-end {
    grid-area: 2 / 2; align-self: start; margin: 0; justify-content: flex-start;
  }
  /* 15.2716 («метку открытия строки и кнопки в одну кучу сгрузил к тексту»): the chevron stays centred at the row's right
     end (15.2506), the buttons leave the value for a line of their own under the words, with their names */
  .rg-row.rg-indent.rg-top:has(> .rg-end:not(:empty)):has(> .rg-end > .rg-chev) {
    padding-right: calc(var(--sp-200) + var(--sp-200) + var(--sp-100));
  }
  .rg-row.rg-indent.rg-top:has(> .rg-end:not(:empty)) > .rg-end > .rg-chev {
    position: absolute; top: 0; bottom: 0; right: var(--sp-200); display: flex; align-items: center;
  }
  .rg-row.rg-indent.rg-top:has(> .rg-end > .rg-acts) { grid-template-rows: auto auto 1fr auto; }
  .rg-row.rg-indent.rg-top:has(> .rg-end > .rg-acts) > .rg-end { display: contents; }
  .rg-row.rg-indent.rg-top > .rg-end > :not(.rg-acts, .rg-chev):has(~ .rg-acts) { grid-area: 2 / 2; justify-self: start; }
  .rg-row.rg-indent.rg-top > .rg-end > .rg-acts {
    grid-area: 4 / 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-300);
  }
  .rg-row .rg-acts > .icon-btn {
    width: auto; height: 44px; display: inline-flex; align-items: center; gap: var(--sp-075); padding: 0;
    color: var(--acc-ink); font-size: var(--fs); font-weight: var(--fw-med);
  }
  .rg-row .rg-acts > .icon-btn:hover { background: none; }
  .rg-acts .rg-act-word { display: inline; }
}
.rg-acts { display: contents; }
/* a part of a page drawn anew in its place (a role's rights after a section of them, 15.3016) - no box of its own */
.rg-holder { display: contents; }
/* on a wide row the chevron stands a step apart from the buttons before it, not one of them */
.rg-acts + .rg-chev { margin-left: var(--sp-150); }
.rg-act-word { display: none; }
/* a row's name never leaves one word alone on its last line («Наименьшая ширина двери, / мм» on a phone), as the footnote */
.rg-title { overflow-wrap: anywhere; text-wrap: pretty; }
.rg-sub { font-size: var(--fs-s); line-height: var(--lh-s); color: var(--ink3); text-wrap: pretty; }
/* 15.2867 (m:2026-11-23:646): a value long by nature stands under its label on a phone - a path wrapped at the right edge
   into three ragged lines */
@media (max-width: 599px) {
  .rg-row.rg-long:not(.rg-field):not(.rg-stack):not(.rg-cells) { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--sp-025); }
  .rg-row.rg-long > .rg-end { max-width: none; margin-left: 0; justify-content: flex-start; }
  .rg-row.rg-long .rg-val { text-align: left; }
}
.rg-end {
  flex: 0 0 auto; min-width: 0; max-width: 60%;
  margin-left: auto;
  display: flex; align-items: center; justify-content: safe flex-end; gap: var(--sp-100);
}
.rg-val {
  min-width: 0;
  color: var(--ink2);
  text-align: right;
  overflow-wrap: break-word;
}
.rg-end > :is(.chip, .rg-chev, .num) { flex: none; white-space: nowrap; }
.rg-chev { flex: none; display: inline-flex; color: var(--ink3); }


.rg-row.rg-field > .rg-main { flex: 0 1 auto; }
.rg-row.rg-field > :is(.numfield, .field-icon) { margin-left: auto; }
/* a number is never cut by a long label: the label wraps (15.832) */
.rg-row.rg-field > .numfield { flex: none; }
:root .rg-group .rg-row > :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.wp-num):not(.pin-input)) {
  flex: 1 1 120px; min-width: 0;
  height: auto;
  margin: 0; padding: var(--sp-075) 0;
  border: 0; border-radius: var(--r-s);
  background: none; box-shadow: none;
  color: var(--ink);
  font: inherit;
  text-align: right;
  outline: none;
}
:root .rg-group .rg-row.rg-field > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.wp-num):not(.pin-input):hover:not(:disabled):not([readonly]):not(:focus):not(.invalid),
:root .rg-group .rg-row.rg-field .numfield:not(.with-steps) > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.wp-num):not(.pin-input):hover:not(:disabled):not([readonly]):not(:focus):not(.invalid),
:root .rg-group .rg-row.rg-field .field-icon > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.wp-num):not(.pin-input):hover:not(:disabled):not([readonly]):not(:focus):not(.invalid),
:root .rg-group .rg-row.rg-stack > textarea:hover:not(:disabled):not([readonly]):not(:focus):not(.invalid) {
  box-shadow: none;
}
.rg-row > input::placeholder, .rg-row > textarea::placeholder { color: var(--ink3); }
/* The active line marks the row whose text is being typed - not a row of photos or of buttons pressed (15.609) */
.rg-row.rg-field:has(:is(input, textarea, [contenteditable]):focus),
.rg-row.rg-stack:has(:is(input, textarea, [contenteditable]):focus) {
  background: var(--a-100);
}
/* the line - a straight stripe of its own at the row's left, round caps: never bent by a group's rounded corner (15.1044) */
.rg-row.rg-field:has(:is(input, textarea, [contenteditable]):focus)::after,
.rg-row.rg-stack:has(:is(input, textarea, [contenteditable]):focus)::after {
  content: "";
  position: absolute; left: var(--sp-050); top: var(--sp-100); bottom: var(--sp-100);
  width: var(--bw-sel); border-radius: var(--r-full);
  background: var(--acc);
}
/* …and red while it holds what is not taken (15.831) */
.rg-row.rg-field:has(:is(input, textarea).invalid:focus)::after,
.rg-row.rg-stack:has(:is(input, textarea).invalid:focus)::after { background: var(--danger); }
/* A slider in a row (rowRange, 15.612): it takes the room the label leaves, at most a comfortable length */
.rg-row.rg-range > .rg-end { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.rg-row.rg-range .range { width: min(240px, 100%); }
.rg-row.rg-range .rg-readout { flex: none; min-width: 3ch; text-align: end; color: var(--ink2); font-variant-numeric: tabular-nums; }
.rg-row.rg-stack { flex-direction: column; align-items: stretch; gap: var(--sp-050); padding-block: var(--sp-150); }
:root .rg-group .rg-row.rg-stack > textarea {
  width: 100%;
  min-height: var(--h-field);
  margin: 0; padding: 0;
  border: 0; border-radius: var(--r-s);
  background: none; box-shadow: none;
  color: var(--ink);
  font: inherit;
  resize: none;
  field-sizing: content;
  outline: none;
}

.rg-row.rg-action { color: var(--acc-ink); font-weight: var(--fw-med); }
.rg-row.rg-action.rg-danger { color: var(--danger-ink); }
.rg-plus {
  flex: none;
  display: grid; place-items: center;
  width: var(--sp-400); height: var(--sp-400);
  border-radius: var(--r-full);
  background: var(--acc-weak);
}

.rg-avatar {
  flex: none;
  display: block;
  width: var(--sp-400); height: var(--sp-400);
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--avatar-fill, var(--a-200));
  color: var(--avatar-ink, var(--ink2));
  font-size: var(--fs-s); font-weight: var(--fw-semi);
}
.rg-avatar.rg-sq { border-radius: var(--r-s); }
/* a drawn icon in the square: the box centres it by its grid, the drawing is a block (no baseline gap) */
.rg-avatar:has(> .ic) { display: grid; place-items: center; }
.rg-avatar > .ic { display: grid; place-items: center; }
.rg-avatar > .ic > svg { display: block; }
/* 15.1069: a circle's letters - a drawing over the whole circle, its text set by the cap height in the middle
   (`initials()`); the messenger's circles take the same */
/* square by its width: in a grid circle (the messenger's) a height of 100 % had no height to take and the drawing
   grew to 150, the letters below the circle */
.avatar-letters { display: block; width: 100%; height: auto; aspect-ratio: 1; overflow: visible; fill: currentColor; }
.rg-avatar.rg-big { width: calc(var(--sp-600) + var(--sp-200)); height: calc(var(--sp-600) + var(--sp-200)); font-size: var(--fs-h); }
.rg-avatar > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rg-avatar.rg-fit { padding: var(--sp-075); background: var(--sheet-bg, var(--card)); }
.rg-avatar.rg-fit > img { object-fit: contain; }
.rg-avatar.rg-wide { width: calc(var(--sp-400) * 2); }
/* 15.2694: a project's picture in a row - 16:10, 64 x 40, a mark faint behind it */
.rg-avatar.rg-pic { position: relative; display: grid; place-items: center; width: calc(var(--sp-400) * 2); height: var(--sp-500);
                    border-radius: var(--r-s); background: var(--a-100); }
.rg-pic-back { position: absolute; inset: 0; display: grid; place-items: center; opacity: .07; pointer-events: none; }
.rg-pic-back > .ares-logo { display: block; height: 70%; }
.rg-pic-back > .ares-logo > svg { display: block; width: auto; height: 100%; }
.rg-avatar.rg-pic > img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
/* the mark stands only where there is no picture: a picture's clear ground never shows it through */
.rg-avatar.rg-pic:has(> img) > .rg-pic-back { display: none; }
.rg-avatar.rg-wide.rg-big { width: calc((var(--sp-600) + var(--sp-200)) * 2); }
.rg-foot:has(> span:only-child:empty) { display: none; }

.chip.rg-lock { display: inline-flex; align-items: center; gap: var(--sp-075); }
@container (max-width: 15em) {
  .chip.rg-lock > .rg-lock-word {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}
/* 15.2867 (m:2026-11-23:646): on a phone the words took half the row and «Подробное отслеживание ссылок» fell into three
   lines; the lock alone stays, a tap on the row says the rest */
@media (max-width: 599px) {
  .chip.rg-lock > .rg-lock-word {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

.rg-hero { display: flex; align-items: center; gap: var(--sp-200); padding: var(--sp-100) var(--sp-200) 0; }
.rg-hero-text { display: flex; flex-direction: column; gap: var(--sp-025); min-width: 0; }
.rg-hero h2 { margin: 0; font-family: var(--font); font-size: var(--fs-h); line-height: 1.25; font-weight: var(--fw-semi); }
/* a heading's line under it never leaves one word alone, as a footnote (15.2707) */
.rg-hero .rg-sub { text-wrap: pretty; }
.rg-hero-acts { display: flex; gap: var(--sp-200); }

.rg-link {
  padding: 0; border: 0; background: none;
  color: var(--acc-ink);
  font: inherit; font-size: var(--fs-s); font-weight: var(--fw-med);
  cursor: pointer;
}
.rg-link.rg-danger { color: var(--danger-ink); }

.rg-back {
  display: inline-flex; align-items: center; gap: var(--sp-050);
  align-self: flex-start;
  padding: 0; border: 0; background: none;
  color: var(--acc-ink);
  font: inherit; font-size: var(--fs-s); font-weight: var(--fw-med);
  cursor: pointer;
}
/* inside a page that has its own «Назад», the outer one waits: one way back at a time (16.11) */
.rg-back:has(+ * .rg-back) { display: none; }
:root .rg-group .rg-row .rg-end > .numfield:not(.with-steps) { width: auto; flex: none; }
:root .rg-group .rg-row .numfield:not(.with-steps) > input.input.num:not([type=checkbox]):not([type=radio]) {
  width: 8em; height: auto;
  padding: var(--sp-075) var(--sp-100);
  margin-right: calc(-1 * var(--sp-100));
  border: 0; border-radius: var(--r-s); background: none; box-shadow: none;
  text-align: right;
}
:root .rg-group .rg-row .field-icon { flex: 0 1 200px; min-width: 0; }
:root .rg-group .rg-row .field-icon > input.input.date:not([type=checkbox]):not([type=radio]) {
  height: auto; padding: var(--sp-075) var(--sp-400) var(--sp-075) var(--sp-100);
  border: 0; border-radius: var(--r-s); background: none; box-shadow: none;
  text-align: right;
}
/* values side by side (rowCells, 15.1026): the caption above, the number under it in the row's own look - the caption
   grey, the value ink, no fill; the field under the pointer and the one being typed in marked as a row is (15.1516) */
.rg-row.rg-cells {
  display: grid; grid-template-columns: repeat(var(--cells, 3), minmax(0, 1fr));
  align-items: end; gap: var(--sp-100);
  padding-block: var(--sp-050);
}
.rg-cell { display: flex; flex-direction: column; gap: var(--sp-025); min-width: 0; }
.rg-cell-label {
  display: flex; align-items: baseline; gap: var(--sp-050);
  color: var(--ink2); font-size: var(--fs-s); line-height: var(--lh-s);
}
.rg-cell-mark { color: var(--acc-ink); }
:root .rg-group .rg-row.rg-cells .numfield:not(.with-steps) { width: 100%; }
/* a field with its picker (time, date) in a cell: the cell's width; the row's 200 px basis would be its height here */
:root .rg-group .rg-row.rg-cells .rg-cell > .field-icon { flex: none; width: 100%; }
:root .rg-group .rg-row.rg-cells .numfield:not(.with-steps) > input.input.num:not([type=checkbox]):not([type=radio]) {
  width: calc(100% + var(--sp-050) * 2); height: var(--h-btn-sm);
  margin: 0 calc(-1 * var(--sp-050)); padding: 0 var(--sp-050);
  border: 0; border-radius: var(--r-xs); background: none; box-shadow: none;
  text-align: left; font-size: var(--fs-s);
}
:root .rg-group .rg-row.rg-cells .numfield:not(.with-steps) > input.input.num:not([type=checkbox]):not([type=radio]):is(:hover, :focus):not(:disabled):not([readonly]) {
  background: var(--a-100); box-shadow: none;
}

.rg-empty { padding: var(--sp-250) var(--sp-200); color: var(--ink3); text-align: center; }

.rg-val.rg-with-sample { display: inline-flex; align-items: center; gap: var(--sp-100); }
.rg-thumb {
  display: block;
  max-width: calc(var(--sp-600) * 2); height: var(--sp-400);
  object-fit: contain;
  border-radius: var(--r-xs);
}
.rg-foot .rg-danger-text { color: var(--danger-ink); }
.rg-hero.over { background: var(--acc-weak); border-radius: var(--r); }
.rg-hero-face { display: contents; }
.rg-hero.rg-hero-centered {
  flex-direction: column; text-align: center; gap: var(--sp-150);
  padding: var(--sp-400) var(--sp-300) var(--sp-300);
  background: var(--card); border-radius: var(--r-l);
}
.rg-hero-centered .rg-hero-text { align-items: center; gap: var(--sp-050); }
.rg-hero-centered .rg-hero-face { display: inline-grid; position: relative; }
.rg-hero-centered .rg-avatar.rg-big { width: calc(var(--sp-600) * 2); height: calc(var(--sp-600) * 2); font-size: var(--fs-num); }
.rg-hero-badge {
  position: absolute; right: 0; bottom: 0;
  width: var(--h-btn); height: var(--h-btn); border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--acc-solid); color: #FFFFFF; border: var(--sp-050) solid var(--card);
  box-sizing: content-box; padding: 0; cursor: pointer;
}
.rg-hero-badge:hover { filter: brightness(1.1); }
.rg-hero-facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-050) var(--sp-200);
  margin-top: var(--sp-050); color: var(--ink3); font-size: var(--fs-s);
}
.rg-hero-fact { display: inline-flex; align-items: center; gap: var(--sp-050); }

.rg-save-note { color: var(--ink2); flex: 0 1 auto; }

.si-groups { display: flex; flex-direction: column; gap: var(--sp-300); min-width: 0; }
.rg-list-wrap { display: flex; flex-direction: column; gap: var(--sp-200); min-width: 0; }
.si-wells { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-100); }

.rg-row.rg-logo-row { gap: var(--sp-300); padding-block: var(--sp-200); flex-wrap: wrap; }
.rg-logo-preview { display: flex; flex-direction: column; gap: var(--sp-100); flex: none; }
.rg-logo-tile {
  display: grid; grid-template-columns: 1fr 1px 1fr; align-items: stretch;
  width: var(--rail-w); height: var(--topbar-h);
  padding: var(--sp-100) var(--sp-150);
  border-radius: var(--r-s);
  box-shadow: inset 0 0 0 var(--bw) var(--line);
  overflow: hidden;
}
.rg-logo-half { display: flex; align-items: center; min-width: 0; min-height: 0; padding: var(--sp-050) var(--sp-100); }
.rg-logo-half.rg-logo-ours { justify-content: flex-end; }
.rg-logo-half.rg-logo-ours > svg { width: 100%; height: 100%; }
.rg-logo-half > img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rg-logo-line { width: 1px; background: currentColor; opacity: .2; }
.rg-logo-cap { font-size: var(--fs-s); line-height: var(--lh-s); color: var(--ink3); }
.rg-logo-tile.rg-logo-light { background: var(--sheet-bg); color: var(--sheet-ink); }
.rg-logo-tile.rg-logo-dark { background: var(--sheet-ink); color: var(--sheet-bg); }
.rg-logo-tile { zoom: 1.5; }
@container screen (max-width: 779px) { .rg-logo-tile { zoom: 1.25; } }
@container screen (max-width: 339px) { .rg-logo-tile { zoom: 1; } }

.rg-section.over > .rg-group { box-shadow: inset 0 0 0 var(--bw-sel) var(--acc); }

.rg-row.rg-storage { flex-direction: column; align-items: stretch; gap: var(--sp-150); padding-block: var(--sp-200); }
.rg-storage-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-150); flex-wrap: wrap; }
.rg-storage-num { font-size: var(--fs-l); line-height: var(--lh-l); font-weight: var(--fw-semi); }
.rg-storage-track { height: var(--sp-100); border-radius: var(--r-full); background: var(--a-200); }
/* a value still counted: a bar of the screen skeleton's look in the value's place (kit/space.js storageRows) */
.rg-val-wait { display: inline-block; inline-size: 64px; block-size: 0.75em; border-radius: var(--r-full);
               background: var(--a-300); vertical-align: middle; animation: skeleton-breathe 1.2s ease-in-out infinite alternate; }
html[data-motion="calm"] .rg-val-wait { animation: none; }
@media (prefers-reduced-motion: reduce) { .rg-val-wait { animation: none; } }
.rg-storage.tight .rg-storage-top .rg-sub { color: var(--warn-ink); }
.rg-storage.over .rg-storage-top .rg-sub { color: var(--danger-ink); }

.rg-row .code-value { font-size: var(--fs-num-s); letter-spacing: .12em; }
.rg-ring { flex: none; display: inline-flex; width: var(--h-btn); height: var(--h-btn); }
.rg-ring > svg { display: block; transform: rotate(-90deg); }
.rg-ring-track { fill: none; stroke: var(--a-200); stroke-width: 3; }
.rg-ring-live { fill: none; stroke: var(--acc); stroke-width: 3; stroke-linecap: round;
                transition: stroke-dashoffset 1s linear; }
.rg-soon .rg-ring-live { stroke: var(--warn); }
/* 15.2713: kit rowRing - it fills in as it comes in; its tone by the amount's state */
.rg-ring-fill .rg-ring-live { transition: stroke-dashoffset 1.1s var(--ease-out) .12s, stroke .3s ease; }
.rg-ring-good .rg-ring-live { stroke: var(--good); }
.rg-ring-warn .rg-ring-live { stroke: var(--warn); }
.rg-ring-danger .rg-ring-live { stroke: var(--danger); }
.rg-ring-quiet .rg-ring-live { stroke: var(--ink3); }
.rg-ring-danger .rg-ring-track { stroke: color-mix(in srgb, var(--danger) 30%, transparent); }
.rg-ring:has(.rg-ring-in) { position: relative; }
.rg-ring-in { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink2); }
.rg-ring-warn .rg-ring-in { color: var(--warn-ink); }
.rg-ring-danger .rg-ring-in { color: var(--danger-ink); }
.rg-ring-words { display: inline-flex; align-items: center; gap: var(--sp-100); min-width: 0; }
.rg-ring-text { display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-s); line-height: 1.35; }
.rg-ring-text > :last-child:not(:first-child) { color: var(--ink3); }
.rg-ring-words-warn .rg-ring-text > :last-child:not(:first-child) { color: var(--warn-ink); }
.rg-ring-words-danger .rg-ring-text > :last-child:not(:first-child) { color: var(--danger-ink); }
.rg-soon .rg-val { color: var(--warn-ink); }
.rg-val.rg-good { color: var(--good-ink); }
.rg-val.rg-warn { color: var(--warn-ink); }
.rg-val.rg-empty-val { color: var(--ink3); }
.rg-val.rg-over { color: var(--danger-ink); }
.rg-pick {
  display: inline-flex; align-items: center; gap: var(--sp-050);
  max-width: 100%; min-width: 0;
  margin-left: calc(-1 * var(--sp-100));
  padding: var(--sp-050) var(--sp-100);
  border: 0; border-radius: var(--r-s);
  background: none; color: var(--ink);
  font: inherit; text-align: left;
  cursor: pointer;
}
/* 15.2775: at a row's end the choice keeps its whole width (a negative margin made its box 8px short and cut the word)
   and is only drawn a step right, its chevron in line with the values of the rows around */
.rg-end > .rg-pick { margin-left: 0; translate: var(--sp-100) 0; }
.rg-pick:hover:not(:disabled) { background: var(--a-100); }
.rg-pick.rg-empty-val { color: var(--ink3); }
.rg-pick.invalid { color: var(--danger-ink); }
.rg-stale .code-value { opacity: .55; }
[data-motion="calm"] .rg-ring-live { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .rg-ring-live { transition: none !important; } }

.nd-sheet {
  padding: var(--sp-300);
  border-radius: var(--r);
  background: var(--sheet-desk, var(--a-100));
  overflow: hidden;
}
.nd-sheet-host { width: max-content; margin: 0 auto; }

.rg-group { container-type: inline-size; }
@container (max-width: 360px) {
  .rg-row:not(.rg-stack) { flex-wrap: wrap; row-gap: var(--sp-050); }
  .rg-row:not(.rg-stack):not(.rg-field) > .rg-main { flex-basis: 0; min-width: min(8em, 100%); }
  .rg-row > .rg-end { max-width: 100%; }
  .rg-row > .rg-end:has(> .swatches) { flex-basis: 100%; margin-left: 0; justify-content: flex-start; }
  /* 15.2550 (390#40): a value keeps the row's right edge in a narrow group too - beside its name or, when it does not
     fit, under it - as a chosen one does; typed ones turned left and the form read in three columns */
  :root .rg-group .rg-row > :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.wp-num):not(.pin-input)) {
    max-width: 100%;
  }
  .rg-row.rg-field > :last-child:not(.rg-main) { margin-left: auto; }
}

/* a how-to in numbered steps (15.971, `helpSteps`) */
.help-steps { display: flex; flex-direction: column; gap: var(--sp-150); margin: 0; padding: 0; list-style: none;
              counter-reset: help-step; color: var(--ink); }
.help-steps > li { display: grid; grid-template-columns: var(--sp-300) minmax(0, 1fr); gap: var(--sp-150);
                   align-items: start; counter-increment: help-step; }
.help-steps > li::before { content: counter(help-step); display: block; width: var(--sp-300); height: var(--sp-300);
                           border-radius: var(--r-full); background: var(--acc-weak); color: var(--acc-ink);
                           font-size: var(--fs-s); font-weight: var(--fw-semi); }

/* 15.2694: a row pressed whole with an action beside it (`rowPress`): the words press, the button is its sibling */
.rg-row.rg-split.rg-split { padding: 0; gap: 0; flex-wrap: nowrap; min-height: calc(var(--sp-400) * 2); align-items: stretch; }
.rg-split > .rg-press { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--sp-150);
                        padding: var(--sp-100) 0 var(--sp-100) var(--sp-200); }
.rg-split > .rg-press.go { cursor: pointer; }
.rg-split > .rg-press > .rg-avatar { flex: none; }
.rg-split > .rg-row-act { flex: none; align-self: center; width: 44px; height: 44px; margin-right: var(--sp-050); }
@media (hover: hover) { .rg-row.rg-split:has(> .rg-press.go):hover { background: var(--a-100); } }
.rg-row.rg-split:has(> .rg-press.go:active) { background: var(--a-100); }
.rg-row.rg-pic-lead + .rg-row::before, .rg-row + .rg-row.rg-pic-lead::before {
  left: calc(var(--sp-200) + var(--sp-400) * 2 + var(--sp-150));
}
/* the «new» row of picture rows: the plus on the picture's ground (64 x 40), so the words start where a picture row's do */
.rg-row.rg-action.rg-pic-lead { min-height: calc(var(--sp-400) * 2); }
.rg-plus.rg-plus-pic { width: calc(var(--sp-400) * 2); height: var(--sp-500); border-radius: var(--r-s);
                       background: var(--a-100); color: var(--ink2); }
.rg-row[aria-disabled="true"] .rg-plus-pic, button.rg-row:disabled .rg-plus-pic { opacity: .6; }
