/* ==========================================================================
   pages.css — страница проекта, модалка новости, terms, prose (v2)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Проект: «immersive» обложка
   -------------------------------------------------------------------------- */
.immerse {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(420px, 58vh, 620px);
  margin-bottom: 40px;
  padding: 32px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #0c0c0e;
  color: #fff;
}

.immerse__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  contain: paint;
}

.immerse__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.2s var(--ease);
}

.immerse:hover .immerse__media img {
  transform: scale(1.07);
}

.immerse__media--contain {
  display: grid;
  place-items: center;
  padding: 8%;
  background: linear-gradient(135deg, #15151a, #0b0b0d);
}

.immerse__media--contain img {
  object-fit: contain;
  transform: none;
}

.immerse__media--fallback {
  display: grid;
  place-items: center;
}

.immerse__monogram {
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #fff;
  opacity: 0.9;
}

.immerse__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.82) 100%);
}

.immerse__head {
  max-width: 780px;
}

.immerse__head .eyebrow {
  color: #d9ccff;
}

.immerse__title {
  margin: 12px 0 12px;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: #fff;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.immerse__lead {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.immerse .tags {
  margin-top: 16px;
}

.immerse .tag {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.immerse__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.immerse__actions .btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.immerse__actions .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* --------------------------------------------------------------------------
   Тело страницы проекта
   -------------------------------------------------------------------------- */
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  padding-bottom: 64px;
  align-items: start;
}

.project-main {
  min-width: 0;
}

.project-aside {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 12px;
  transition: background-color var(--dur-2);
}

a.side-row:hover {
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
}

.side-row__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--neon-soft);
  color: var(--neon);
}

.side-row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.side-row__label {
  color: var(--text-1);
  font-size: 0.875rem;
  font-weight: 550;
}

.side-row__sub {
  color: var(--text-3);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  color: var(--text-3);
  font-size: 0.875rem;
}

.stat-row + .stat-row {
  border-top: 1px solid var(--hairline);
}

.stat-row strong {
  min-width: 0;
  color: var(--text-1);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.stat-row__mono {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

/* Таймлайн обновлений */
.timeline {
  margin-top: 52px;
}

.timeline__list {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 18px;
  padding-left: 26px;
}

.timeline__list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--neon), var(--hairline) 60%);
}

.timeline__item {
  position: relative;
  padding: 14px 4px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color var(--dur-2), box-shadow var(--dur-2);
}

/* Hover: подсветка фона + лёгкий подъём контента.
   ВАЖНО: раньше здесь были `padding-left: 14px; margin-left: -14px`.
   Блок визуально оставался на месте, но padding-бокс сдвигался, а
   `.timeline__dot` позиционирован от него (left: -26px) — круг уезжал
   на 14px влево от линии. Сдвиг содержимого делаем transform'ом,
   чтобы абсолютный маркер и линия оставались привязанными.
   z-index:1 поднимает точку над линией (у ::before списка авто-уровень). */
.timeline__item:hover {
  background: color-mix(in srgb, var(--text-1) 4%, transparent);
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--neon) 55%, transparent);
}

.timeline__item:hover .timeline__body {
  transform: translateX(10px);
}

.timeline__body {
  transition: transform var(--dur-2) var(--ease);
  will-change: transform;
}

.timeline__dot {
  position: absolute;
  left: -26px;
  top: 22px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--neon);
  box-shadow: 0 0 12px color-mix(in srgb, var(--neon) 55%, transparent);
  z-index: 1;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2);
  transform-origin: center;
}

/* Круг остаётся на линии: только масштаб из центра, без сдвига. */
.timeline__item:hover .timeline__dot {
  transform: scale(1.18);
  box-shadow: 0 0 18px color-mix(in srgb, var(--neon) 80%, transparent);
}

.timeline__date {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.timeline__title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 5px 0 4px;
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.timeline__title .icon {
  color: var(--neon);
}

.timeline__text {
  color: var(--text-3);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .project-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .project-aside {
    position: static;
  }
  .immerse {
    min-height: 380px;
    padding: 22px;
  }
}

/* --------------------------------------------------------------------------
   Prose (markdown)
   -------------------------------------------------------------------------- */
.prose {
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.prose > * + * {
  margin-top: 16px;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-1);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}

.prose h1 {
  font-size: 1.875rem;
}

.prose h2 {
  margin-top: 34px;
  font-size: 1.4375rem;
}

.prose h3 {
  margin-top: 26px;
  font-size: 1.125rem;
}

.prose h1 + *,
.prose h2 + *,
.prose h3 + * {
  margin-top: 8px;
}

.prose p {
  color: var(--text-2);
}

.prose strong {
  color: var(--text-1);
}

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--neon) 40%, transparent);
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  padding-left: 2px;
}

.prose li {
  position: relative;
  padding-left: 26px;
  margin: 8px 0;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
}

.prose ol {
  counter-reset: ol;
}

.prose ol > li {
  counter-increment: ol;
}

.prose ol > li::before {
  content: counter(ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text-1) 7%, transparent);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0;
}

.prose pre {
  padding: 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose blockquote {
  padding: 12px 16px;
  border-left: 2px solid var(--neon);
  border-radius: 0 10px 10px 0;
  background: var(--neon-soft);
  color: var(--text-2);
}

.prose img {
  border-radius: var(--r-sm);
}

.prose hr {
  border: 0;
  height: 1px;
  margin: 28px 0;
  background: var(--hairline);
}

.prose--lead {
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   Модалка-«лист»
   -------------------------------------------------------------------------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 10, 12, 0.5);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  animation: scrim-in 0.34s var(--ease);
}

.scrim--closing {
  animation: scrim-out 0.26s var(--ease) forwards;
}

@keyframes scrim-in {
  from {
    opacity: 0;
  }
}
@keyframes scrim-out {
  to {
    opacity: 0;
  }
}

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  max-height: min(88vh, 920px);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-3);
  animation: sheet-in 0.52s var(--ease-spring);
}

.scrim--closing .sheet {
  animation: sheet-out 0.24s var(--ease) forwards;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
}

@keyframes sheet-out {
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

.sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-glass-strong);
  border: 1px solid var(--hairline);
  color: var(--text-1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform var(--dur-1) var(--ease), background-color var(--dur-2);
}

.sheet__close:hover {
  transform: scale(1.06);
}

.sheet__scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet__media {
  position: relative;
  max-height: 320px;
  overflow: hidden;
  background: var(--surface-2);
}

.sheet__media img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.sheet__media--contain img {
  object-fit: contain;
  padding: 24px;
}

.sheet__body {
  padding: 28px clamp(20px, 4vw, 40px) 34px;
}

.sheet__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-3);
  font-size: 0.8125rem;
}

.sheet__type {
  color: var(--text-2);
  font-weight: 550;
}

.sheet__project {
  padding: 2px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text-1) 7%, transparent);
  color: var(--text-2);
}

.sheet__title {
  padding-right: 40px;
  color: var(--text-1);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.sheet__comment {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  padding: 16px;
  border-radius: 14px;
  background: var(--hot-soft);
  color: var(--text-1);
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.5;
}

.sheet__comment .icon {
  flex: none;
  margin-top: 2px;
  color: var(--hot);
}

.sheet__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 12px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text-1) 6%, transparent);
  color: var(--text-1);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color var(--dur-2), transform var(--dur-2) var(--ease-spring);
}

.pill-link:hover {
  background: var(--neon-soft);
  color: var(--neon);
  transform: translateY(-1px);
}

.pill-link .icon:first-child {
  color: var(--neon);
}

@media (max-width: 640px) {
  .scrim {
    padding: 0;
    align-items: end;
  }
  .sheet {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .sheet__body {
    padding: 22px 18px 30px;
  }
}

/* --------------------------------------------------------------------------
   Terms
   -------------------------------------------------------------------------- */
.terms {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  padding-bottom: 40px;
}

.terms__toc {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
}

.terms__toc-title {
  padding: 4px 10px 10px;
  color: var(--text-4);
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.terms__toc a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 0.8125rem;
  transition: background-color var(--dur-2), color var(--dur-2);
}

.terms__toc a:hover {
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
  color: var(--text-1);
}

.terms__article {
  max-width: 720px;
}

.terms__content h2 {
  margin: 34px 0 10px;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text-1);
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}

.terms__content h2:first-child {
  margin-top: 0;
}

.terms__section + .terms__section {
  margin-top: 6px;
}

@media (max-width: 900px) {
  .terms {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .terms__toc {
    position: static;
  }
}

/* --------------------------------------------------------------------------
   Админ-панель
   -------------------------------------------------------------------------- */
.admin-hero {
  padding-bottom: 22px;
}

.admin-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  color: var(--text-3);
}

.footer--admin {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
  background: none;
}

/* ---- Вход ---- */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 30px);
  border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-2);
}

.auth-card__head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.auth-card__logo {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  object-fit: contain;
}

.auth-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-card__head .muted {
  margin-top: 2px;
  font-size: 0.8125rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form__submit {
  width: 100%;
  margin-top: 6px;
}

/* ---- Поля (панель) ---- */
.afield {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.afield__label {
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.afield__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--hairline-strong);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 0.9375rem;
  line-height: 1.35;
  transition: border-color var(--dur-2), background-color var(--dur-2), box-shadow var(--dur-2);
}

.afield__input:focus {
  outline: 0;
  border-color: var(--neon);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--neon) 16%, transparent);
}

.afield__textarea {
  min-height: 96px;
  resize: vertical;
  font-family: var(--font);
}

.afield--tall .afield__textarea {
  min-height: 180px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.55;
}

.afield__select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.afield__hint {
  color: var(--text-4);
  font-size: 0.75rem;
  line-height: 1.4;
}

.aform {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aform--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.afield--full {
  grid-column: 1 / -1;
}

/* ---- Бар и вкладки ---- */
.admin {
  padding-bottom: 20px;
}

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-bar__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-chip {
  padding: 6px 11px;
  border-radius: var(--r-pill);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 0.8125rem;
}

.admin-chip strong {
  color: var(--text-1);
  font-family: var(--font-mono);
  font-weight: 700;
}

.admin-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.admin-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 0.8125rem;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--text-3);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--dur-2), color var(--dur-2);
}

.admin-tab:hover {
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
  color: var(--text-1);
}

.admin-tab[aria-selected="true"] {
  background: var(--text-1);
  color: var(--bg);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
  border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  min-width: 0;
}

.apanel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.apanel-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.apanel-sub {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 0.875rem;
}

.apanel-actions {
  display: flex;
  gap: 8px;
}

.apanel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-hint {
  color: var(--text-4);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.admin-hint b {
  color: var(--text-2);
}

/* ---- Поиск ---- */
.admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text-4);
  transition: border-color var(--dur-2), background-color var(--dur-2);
}

.admin-search:focus-within {
  border-color: var(--neon);
  background: var(--bg-elevated);
}

.admin-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-1);
  font-size: 0.9375rem;
}

.admin-search__clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-1) 10%, transparent);
  color: var(--text-2);
}

/* ---- Списки ---- */
.alist {
  display: flex;
  flex-direction: column;
}

.arow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 4px;
  border-top: 1px solid var(--hairline);
}

.alist > .arow:first-child,
.acard__list > .arow:first-child {
  border-top: 0;
}

.arow--flat {
  width: 100%;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  text-align: left;
  transition: background-color var(--dur-2);
}

.arow--flat:hover {
  background: color-mix(in srgb, var(--text-1) 4%, transparent);
}

.arow__thumb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  color: var(--text-3);
  font-weight: 700;
}

.arow__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arow__thumb--empty {
  font-size: 1.125rem;
}

.arow__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c, var(--neon));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--neon)) 18%, transparent);
}

.arow__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--neon-soft);
  color: var(--neon);
}

.arow__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.arow__title {
  color: var(--text-1);
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.arow__meta {
  color: var(--text-3);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.arow__desc {
  color: var(--text-4);
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.arow__text {
  color: var(--text-2);
  font-size: 0.875rem;
}

.arow__hintIcon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
}

.arow--hint.is-ok .arow__hintIcon {
  background: var(--ok-soft);
  color: var(--ok);
}

.arow__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.abtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--dur-2), color var(--dur-2), border-color var(--dur-2);
}

.abtn:hover {
  background: color-mix(in srgb, var(--text-1) 6%, transparent);
  color: var(--text-1);
}

.abtn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.abtn--icon {
  width: 32px;
  padding: 0;
  justify-content: center;
}

.icon--up {
  transform: rotate(180deg);
}

.abtn--danger {
  color: var(--hot);
  border-color: color-mix(in srgb, var(--hot) 35%, transparent);
}

.abtn--danger:hover {
  background: var(--hot-soft);
  color: var(--hot);
}

.abadge {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 650;
  white-space: nowrap;
}

.abadge--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.abadge--draft {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
}

.admin-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 4px;
  color: var(--text-3);
  font-size: 0.9375rem;
}

/* ---- Карточки обзора ---- */
.astats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.astat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid transparent;
  text-align: left;
  transition: border-color var(--dur-2), background-color var(--dur-2), transform var(--dur-2);
}

.astat:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-3);
  transform: translateY(-1px);
}

.astat__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-elevated);
  color: var(--neon);
}

.astat__value {
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.astat__label {
  color: var(--text-3);
  font-size: 0.8125rem;
}

.admin-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.acard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}

.acard--wide {
  grid-column: 1 / -1;
}

.acard__title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-1);
  font-size: 0.9375rem;
  font-weight: 650;
}

.acard__title .icon {
  color: var(--neon);
}

.acard__list {
  display: flex;
  flex-direction: column;
  margin: 0 -4px;
}

.acard__list .arow {
  padding: 8px 4px;
}

.acard__list .arow__thumb {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.aquick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- Медиа ---- */
.amedia {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: 12px;
}

.amedia__card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}

.amedia__img {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface-3);
}

.amedia__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.amedia__card figcaption {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 10px;
}

.amedia__name {
  flex: 1;
  min-width: 0;
  color: var(--text-3);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amedia__actions {
  display: flex;
  gap: 4px;
}

.amedia__preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.amedia__preview img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--surface-2);
}

.amedia__previewLabel {
  color: var(--text-3);
  font-size: 0.8125rem;
}

/* ---- Лист формы ---- */
.scrim--admin {
  overflow-y: auto;
  align-items: flex-start;
  padding: 40px 24px;
}

.asheet {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  margin: auto;
  max-height: calc(100vh - 80px);
  border-radius: var(--r-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-3);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}

.scrim--admin.is-open .asheet {
  opacity: 1;
  transform: none;
}

.asheet--confirm {
  width: min(100%, 420px);
}

.asheet__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 12px 22px;
  border-bottom: 1px solid var(--hairline);
}

.asheet__title {
  flex: 1;
  min-width: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.asheet__body {
  padding: 18px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.asheet__text {
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.asheet__error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hot-soft);
  color: var(--hot);
  font-size: 0.875rem;
}

.asheet__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--hairline);
}

.asheet__danger {
  background: var(--hot) !important;
  box-shadow: none !important;
}

/* ---- Поле-картинка в форме ---- */
.amedia-field__row {
  display: flex;
  gap: 8px;
}

.amedia-field__upload {
  flex: none;
  height: 44px;
}

.amedia-field__upload.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.amedia-field__preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.amedia-field__preview img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}

.amedia-field__preview img.is-broken {
  outline: 1px dashed var(--hot);
}

.amedia-field__empty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-4);
  font-size: 0.8125rem;
}

/* ---- Теги ---- */
.atags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}

.atag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 6px 0 10px;
  border-radius: var(--r-pill);
  background: var(--neon-soft);
  color: var(--text-1);
  font-size: 0.8125rem;
  font-weight: 600;
}

.atag button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--text-3);
}

.atag button:hover {
  background: color-mix(in srgb, var(--text-1) 10%, transparent);
  color: var(--text-1);
}

.atags__row {
  display: flex;
  gap: 8px;
}

/* ---- Список ссылок в форме ---- */
.alinks__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alink {
  display: grid;
  grid-template-columns: 34px 130px minmax(0, 0.8fr) minmax(0, 1.4fr) 32px;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.alink .afield__input {
  min-height: 38px;
  padding: 6px 10px;
  font-size: 0.875rem;
}

.alink__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--neon-soft);
  color: var(--neon);
}

.alinks__add {
  align-self: flex-start;
}

/* ---- Цветовая схема (нативный color input) ---- */
input.afield__input[type="color"] {
  height: 44px;
  padding: 4px;
  cursor: pointer;
}

/* ---- Мобильная раскладка ---- */
@media (max-width: 900px) {
  .astats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .aform--grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .alink {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
  }
  .alink__iconSelect {
    grid-column: 2;
  }
  .alink [data-link="label"] {
    grid-column: 2;
  }
  .alink [data-link="url"] {
    grid-column: 2;
  }
  .alink [data-link-remove] {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 700px) {
  .arow {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .arow > .abadge {
    grid-column: 2;
  }
  .arow__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .arow__thumb {
    width: 44px;
    height: 44px;
  }
  .scrim--admin {
    padding: 12px;
  }
  .asheet {
    max-height: calc(100vh - 24px);
  }
  .asheet__body {
    padding: 14px 16px;
  }
  .asheet__head,
  .asheet__foot {
    padding-left: 16px;
    padding-right: 16px;
  }
}
