/* Buttons, forms, selects, pills, toasts, accordions, shared panels */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  font-size: 0.75rem;
  line-height: 1.15;
  padding: 0.22rem 0.58rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: var(--control-height);
  min-height: var(--control-height);
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  padding: 0.56rem 0.85rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  transition: var(--transition-interactive);
  user-select: none;
}

.btn:not(:disabled):hover {
  background: var(--surface2);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible,
.acc-item:focus-visible,
.field__file-control:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.btn[aria-busy="true"] {
  cursor: progress;
}

.btn.is-loading {
  cursor: progress;
}

.ui-button[data-ui-icon]::before {
  content: attr(data-ui-icon-glyph);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  font-size: 1em;
  font-weight: 900;
  line-height: 1;
}

.ui-button[data-ui-line-icon]::before { content:none; }
.ui-button__line-icon { display:inline-flex; width:1em; height:1em; flex:0 0 1em; }
.ui-button__line-icon svg { width:100%; height:100%; }

.ui-button.is-loading::before {
  display: none;
}

.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.app-footer {
  margin-top: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid color-mix(in srgb, var(--brand2) 13%, var(--border));
  background: color-mix(in srgb, var(--app-surface-navigation) 82%, var(--bg));
}

.app-footer__inner {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  color: var(--faint);
  font-size: 0.78rem;
}

.app-footer__brand { display: inline-flex; align-items: center; gap: .28rem; direction: ltr; color: var(--text); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.app-footer__brand img { width: 26px; height: 26px; display: block; margin-block: 2px; }
.app-footer__wordmark { display: inline; white-space: nowrap; letter-spacing: 0.025em; }
.app-footer__tagline { background: linear-gradient(90deg, var(--text) 0%, #c9bdff 58%, #9175ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-footer__divider { width: 3px; height: 3px; border-radius: 50%; background: var(--brand2); opacity: .75; }
.app-footer__year { margin-inline-start: auto; font-variant-numeric: tabular-nums; }

/* Landing is deliberately a fixed single-screen surface. */
body:has(header[data-app-page="landing"]) .app-footer {
  margin-top: 0;
}

body:has(header[data-app-page="landing"]) .app-footer__inner {
  min-height: var(--footer-height);
  padding-block: 0;
}

@media (max-width: 640px) {
  .app-footer__inner { min-height: 64px; flex-wrap: wrap; gap: .25rem .55rem; padding-block: .55rem; }
  .app-footer__tagline { flex-basis: 100%; text-align: center; order: 3; }
  .app-footer__year { margin-inline-start: 0; }
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 14px 34px rgba(124, 92, 255, 0.28);
}

.btn--ghost {
  background: transparent;
  border-color: color-mix(in srgb, var(--brand) 24%, var(--border));
}

.btn--secondary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border-color: color-mix(in srgb, var(--brand) 25%, var(--border));
}

.btn--outline {
  color: color-mix(in srgb, var(--brand2) 78%, var(--text));
  background: transparent;
  border-color: color-mix(in srgb, var(--brand2) 58%, var(--border));
}

.btn--success {
  color: #07150d;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--ok) 92%, #fff),
    color-mix(in srgb, var(--brand2) 44%, var(--ok))
  );
  border-color: color-mix(in srgb, var(--ok) 62%, var(--border));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ok) 20%, transparent);
}

.btn--danger {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #ff5c7a 88%, #ff8ca0),
    color-mix(in srgb, #ff7a5c 84%, #ffb47a)
  );
  border-color: color-mix(in srgb, #ff6f84 55%, var(--border));
  box-shadow: 0 10px 30px rgba(255, 92, 122, 0.2);
}

.btn[data-selected="true"] {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.btn--block {
  width: 100%;
}

.btn--icon {
  width: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  aspect-ratio: 1;
}

.btn__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--lg {
  height: var(--control-height-lg);
  min-height: var(--control-height-lg);
  padding: 0.76rem 1.15rem;
  border-radius: calc(var(--radius-control) + 2px);
}

.btn--icon.btn--sm {
  width: var(--control-height-sm);
  min-width: var(--control-height-sm);
  height: var(--control-height-sm);
  border-radius: calc(var(--radius-control) - 2px);
}

.btn--sm:not(.btn--icon) {
  height: var(--control-height-sm);
  min-height: var(--control-height-sm);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 28px;
  padding: 0.24rem 0.62rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.15;
  color: var(--text);
}

.pill--small {
  font-size: 0.7rem;
  padding: 0.18rem 0.5rem;
}

.panel {
  border-radius: var(--radius-panel);
  border: 1px solid color-mix(in srgb, var(--brand2) 18%, var(--border));
  background: var(--app-surface-main);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.accordion {
  width: 100%;
  display: grid;
  gap: var(--faq-gap);
}

.acc-panel {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--app-surface-subcard);
  padding: 0.9rem 1rem;
  color: var(--muted);
}

.acc-item.is-priority {
  border-color: color-mix(in srgb, var(--brand2) 28%, var(--border));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand2) 10%, var(--surface)),
    color-mix(in srgb, var(--surface2) 82%, transparent)
  );
}

.acc-panel.is-priority {
  border-color: color-mix(in srgb, var(--brand2) 18%, var(--border));
}

.acc-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.1rem 0 0.5rem;
}

.acc-panel p {
  margin: 0;
  line-height: 1.6;
}

.form {
  width: 100%;
  padding: 0.65rem 0 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--brand2) 12%, var(--border));
  background: transparent;
  box-shadow: none;
  align-self: stretch;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--form-gap);
  align-items: start;
}

.form__row--primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 0.22rem;
  margin-bottom: 0.45rem;
}

.form__row .field {
  margin-bottom: 0;
}

.field__required {
  color: color-mix(in srgb, var(--bad) 78%, #fff);
}

.field__input {
  width: 100%;
  min-height: 40px;
  padding: 0.52rem 0.7rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, var(--surface));
  color: var(--text);
  line-height: 1.35;
  transition:
    border-color var(--t),
    box-shadow var(--t),
    background var(--t);
}

.field select.field__input {
  min-height: var(--control-height);
  padding-right: 2.2rem;
  color-scheme: dark;
  border-radius: var(--radius-control);
  background-color: color-mix(in srgb, var(--bg) 84%, var(--surface));
  color: var(--text);
}

.field__input--native-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.field__input--select-native {
  appearance: none;
  color-scheme: dark;
  border-radius: var(--radius-control);
  background-color: color-mix(in srgb, var(--bg) 84%, var(--surface));
  color: var(--text);
  padding-right: 2.8rem;
  background-image:
    linear-gradient(
      45deg,
      transparent 50%,
      color-mix(in srgb, var(--text) 70%, transparent) 50%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--text) 70%, transparent) 50%,
      transparent 50%
    );
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.field__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.field__counter {
  flex-shrink: 0;
  color: var(--faint);
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
}

.field__counter.is-near-limit {
  color: color-mix(in srgb, #f6c56d 82%, var(--text));
}

.field__counter.is-at-limit {
  color: color-mix(in srgb, var(--bad) 80%, var(--text));
}

.field__file-status {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field__file-status--hidden {
  display: none;
}

.field__file-name:empty {
  display: none;
}

.field__file-status.has-selected-file {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: min(100%, 320px);
  min-height: 34px;
  margin-top: 0.1rem;
  padding: 0.32rem 0.6rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand2) 18%, var(--border));
  background: color-mix(in srgb, var(--surface2) 72%, var(--surface));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field__input--file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field__file-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--control-height);
  padding: 0.66rem 0.84rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, var(--surface));
  cursor: pointer;
  transition:
    border-color var(--t),
    background var(--t),
    box-shadow var(--t);
}

.field__file-control:hover {
  border-color: color-mix(in srgb, var(--brand2) 32%, var(--border));
  background: color-mix(in srgb, var(--bg) 72%, var(--surface2));
}

.field__file-name {
  min-width: 0;
  color: var(--muted);
  text-align: end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field textarea.field__input {
  min-height: 76px;
}

.field__input--message {
  min-height: 112px !important;
  max-height: 180px;
  resize: vertical;
  overflow-y: auto;
}

.form__row--uploads .field__hint {
  min-height: 1.2em;
}

.field__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  box-shadow: var(--focus);
  background: color-mix(in srgb, var(--bg) 74%, var(--surface2));
}

.field__input.is-invalid {
  border-color: color-mix(in srgb, var(--bad) 70%, var(--border));
  box-shadow: 0 0 0 4px rgba(255, 92, 122, 0.16);
}

.field__error {
  min-height: 0.5em;
  color: color-mix(in srgb, var(--bad) 80%, var(--text));
  font-size: 0.4rem;
  font-weight: 650;
}

.field__meta .field__hint {
  min-width: 0;
}

.custom-select {
  position: relative;
}

.custom-select__trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--control-height);
  padding: 0.66rem 0.84rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, var(--surface));
  color: var(--text);
  cursor: pointer;
  transition:
    border-color var(--t),
    box-shadow var(--t),
    background var(--t);
}

.custom-select__trigger:hover {
  background: color-mix(in srgb, var(--bg) 74%, var(--surface2));
}

.custom-select__trigger:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  box-shadow: var(--focus);
}

.custom-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.custom-select.is-placeholder .custom-select__value {
  color: var(--faint);
}

.custom-select__chevron {
  flex-shrink: 0;
  color: var(--faint);
  transition: transform var(--t);
}

.custom-select.is-open .custom-select__chevron {
  transform: rotate(180deg);
}

.custom-select__menu {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 35;
  margin-top: 0.45rem;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand2) 18%, var(--border));
  background: color-mix(in srgb, var(--bg) 88%, var(--surface));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  max-height: min(320px, calc(100vh - 120px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brand2) 50%, var(--border))
    transparent;
}

.custom-select__menu[hidden] {
  display: none;
}

.custom-select__menu.is-upward {
  top: auto;
  bottom: calc(100% + 0.45rem);
  margin-top: 0;
}

.custom-select__menu::-webkit-scrollbar {
  width: 10px;
}

.custom-select__menu::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select__menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand2) 50%, var(--border));
  border: 2px solid transparent;
  background-clip: padding-box;
}

.custom-select__option {
  display: block;
  width: 100%;
  min-height: var(--control-height);
  padding: 0.62rem 0.72rem;
  border: 0;
  border-radius: calc(var(--radius-control) - 2px);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.custom-select__option[hidden] {
  display: none;
}

.custom-select__option:hover,
.custom-select__option:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--brand2) 14%, var(--surface2));
}

.custom-select__option.is-selected {
  background: color-mix(in srgb, var(--brand2) 18%, var(--surface2));
  color: #fff;
}

.custom-select__option--clear {
  min-height: auto;
  margin-bottom: 0.35rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  color: var(--muted);
}

.check {
  display: flex;
  gap: 0.5rem;
  align-items: start;
  margin: 0.25rem 0 0.5rem;
  color: var(--muted);
}

.check input {
  margin-top: 0.2rem;
}

.form__fineprint {
  margin: 0.45rem 0 0;
  color: var(--faint);
  font-size: 0.85rem;
}

.form__row--double {
  grid-template-columns: 1fr 1fr;
}

kbd {
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 0.85rem;
}

.toast[hidden] {
  display: none;
}

.workspace-toast[hidden] {
  display: none !important;
}

.toast__icon {
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

.toast__title {
  margin: 0;
  font-weight: 900;
}

.toast__text {
  margin: 0.12rem 0 0;
  color: var(--muted);
}

.workspace-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  bottom: auto;
  left: auto;
  z-index: 13000;
  width: min(420px, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid color-mix(in srgb, var(--brand2) 24%, var(--border));
  border-radius: var(--enterprise-radius-card, 12px);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 8%, transparent),
      color-mix(in srgb, var(--surface) 18%, transparent)
    ),
    color-mix(in srgb, var(--bg) 90%, var(--surface-raised));
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  color: var(--text);
  text-align: left;
}

.workspace-toast__icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: var(--brand2);
  font-weight: 900;
  line-height: 1;
}

.workspace-toast__content {
  min-width: 0;
}

.workspace-toast__title {
  display: block;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text);
}

.workspace-toast__text,
.workspace-toast p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.workspace-toast__close {
  align-self: start;
  justify-self: end;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: calc(var(--radius-control) - 2px);
}

.workspace-toast[data-type="success"] {
  border-color: color-mix(in srgb, var(--ok) 42%, var(--border));
}

.workspace-toast[data-type="success"] .workspace-toast__icon {
  color: var(--ok);
}

.workspace-toast[data-type="error"] {
  border-color: color-mix(in srgb, var(--bad) 44%, var(--border));
}

.workspace-toast[data-type="error"] .workspace-toast__icon {
  color: var(--bad);
}

.workspace-toast[data-type="warning"] {
  border-color: color-mix(in srgb, var(--warn) 46%, var(--border));
}

.workspace-toast[data-type="warning"] .workspace-toast__icon {
  color: var(--warn);
}

.workspace-toast[data-type="info"] .workspace-toast__icon {
  color: var(--brand2);
}

.btn,
.field__input,
.custom-select__trigger,
.field__file-control,
.acc-item {
  transition:
    transform var(--t-fast),
    background var(--t),
    border-color var(--t),
    box-shadow var(--t),
    color var(--t);
}

.custom-select__option:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.field__label {
  display: block;
  width: 100%;
  font-weight: 700;
  font-size: 0.86rem;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.field__hint {
  display: block;
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--faint) 84%, var(--muted));
}

.field__input:hover,
.custom-select__trigger:hover,
.field__file-control:hover {
  border-color: color-mix(in srgb, var(--brand2) 28%, var(--border));
  background: color-mix(in srgb, var(--surface-raised) 44%, var(--surface));
}

.field__input:focus,
.custom-select__trigger:focus-visible,
.field__file-control:focus-visible {
  border-color: color-mix(in srgb, var(--brand2) 48%, var(--border));
  background: color-mix(in srgb, var(--surface-raised) 48%, var(--surface));
}

.field__file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  min-height: var(--control-height-sm);
  padding: 0.45rem 0.8rem;
  border-radius: calc(var(--radius-control) - 2px);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  background: color-mix(in srgb, var(--brand) 12%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

.acc-item:hover {
  background: color-mix(in srgb, var(--surface-raised) 50%, var(--surface));
  border-color: color-mix(in srgb, var(--brand2) 24%, var(--border));
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 4000;
  width: min(420px, calc(100% - 32px));
  display: flex;
  gap: 0.75rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--brand2) 18%, var(--border));
  background: color-mix(in srgb, var(--bg) 84%, var(--surface-raised));
}

.toast[data-type="error"] {
  border-color: color-mix(in srgb, var(--bad) 46%, var(--border));
  background: color-mix(in srgb, var(--bad) 10%, var(--surface-raised));
}

.toast[data-type="error"] .toast__icon {
  color: var(--bad);
}

.panel__body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.pill,
.badge {
  min-height: 30px;
  border-radius: var(--radius-pill);
  border-color: color-mix(in srgb, var(--brand2) 20%, var(--border));
  background: color-mix(in srgb, var(--surface-raised) 46%, var(--surface));
  line-height: 1.2;
}

.acc-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  min-height: var(--control-height-lg);
  padding: 0.82rem 3rem 0.82rem 1rem;
  border-radius: var(--enterprise-radius-card);
}

.acc-item__icon {
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--brand2) 18%, var(--border));
  background: color-mix(in srgb, var(--bg) 68%, var(--surface));
  font-size: 1rem;
  line-height: 1;
}

.toast .btn--icon {
  margin-left: auto;
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: calc(var(--radius-control) - 2px);
  border: 1px solid color-mix(in srgb, var(--brand2) 42%, var(--border-strong));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 16%, transparent),
      color-mix(in srgb, var(--brand2) 10%, transparent)
    ),
    color-mix(in srgb, var(--surface-raised) 82%, var(--bg));
  color: color-mix(in srgb, var(--text) 96%, var(--brand2));
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  opacity: 1;
}

.toast .btn--icon:hover {
  border-color: color-mix(in srgb, var(--brand2) 68%, var(--border-strong));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 24%, transparent),
      color-mix(in srgb, var(--brand2) 16%, transparent)
    ),
    color-mix(in srgb, var(--surface-raised) 94%, var(--bg));
  color: var(--text);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.3),
    0 0 0 3px color-mix(in srgb, var(--brand2) 16%, transparent);
}

.toast .btn--icon:focus-visible {
  outline: none;
  box-shadow:
    var(--focus),
    0 14px 32px rgba(0, 0, 0, 0.3);
}

.acc-item__q {
  letter-spacing: -0.01em;
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.acc-item__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.btn.is-edited {
  border-color: color-mix(in srgb, var(--brand2) 38%, var(--border));
  background: color-mix(in srgb, var(--brand2) 14%, var(--surface));
  color: color-mix(in srgb, var(--brand2) 90%, var(--text));
}

.btn--sm {
  min-height: var(--control-height-sm);
  line-height: 1.1;
  padding: 0.48rem 0.68rem;
  border-radius: 11px;
  font-size: 0.82rem;
}

#toast,
.toast {
  z-index: 13000 !important;
}

.check.is-invalid {
  color: var(--bad);
}

.check__error {
  display: block;
  margin-top: 0.25rem;
  color: var(--bad);
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .form__row--primary {
    grid-template-columns: 1fr 1fr;
  }

  .form__row--primary .field:last-child {
    grid-column: 1 / -1;
  }

  .form__row--double {
    grid-template-columns: 1fr;
  }

  .panel {
    border-width: 1px;
  }
}

@media (max-width: 720px) {
  .form__row {
    grid-template-columns: 1fr;
  }

  .form {
    padding: 1rem 0 0;
  }

  .field__hint,
  .field__meta {
    white-space: normal;
  }

  .field__meta {
    display: grid;
    justify-content: stretch;
    gap: 0.18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .field__input,
  .custom-select__trigger,
  .field__file-control,
  .acc-item {
    transition: none;
  }

  .btn:not(:disabled):hover {
    transform: none;
  }
}

@media (max-width: 1080px) {
  .form__row--double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .form__row--double {
    grid-template-columns: 1fr;
  }
}
