/* Bead Wonder — лёгкая тема без Tailwind (VDS-friendly) */
:root {
  --primary: #bd7880;
  --primary-dark: #a66068;
  --text: #611820;
  --text-muted: #783038;
  --bg: #fffafb;
  --card: #ffffff;
  --border: rgba(189, 120, 128, 0.2);
  --radius: 14px;
  --shadow: 0 2px 15px rgba(189, 120, 128, 0.12);
  --font: "Lato", system-ui, sans-serif;
  --display: "Playfair Display", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(189, 120, 128, 0.08), transparent 50%);
  line-height: 1.55;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

@media (max-width: 420px) {
  .container {
    width: min(1120px, 100% - 1.25rem);
  }
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0);
}

.site-header__inner {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem 0.75rem;
  padding: 0.75rem 0;
}

@media (min-width: 900px) {
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
  }
}


.logo {
  font-family: var(--display);
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  min-width: 0;
}

.logo span {
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav a:hover,
.nav a.is-active {
  color: var(--primary-dark);
  text-decoration: none;
}

.nav--desktop {
  display: none;
}

@media (min-width: 900px) {
  .nav--desktop {
    display: flex;
    flex: 1;
    justify-content: center;
    min-width: 0;
  }
}

.site-header__contact {
  justify-self: end;
}

.header-drawer {
  justify-self: end;
}

@media (min-width: 900px) {
  .header-drawer {
    display: none;
  }
}

.header-drawer__toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  user-select: none;
}

.header-drawer__toggle::-webkit-details-marker {
  display: none;
}

.header-drawer__icon {
  display: block;
  width: 1.05rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

.header-drawer__text {
  line-height: 1;
}

.header-drawer__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 30;
  padding: 0.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nav--drawer {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.1rem;
}

.nav--drawer a {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
}

.nav--drawer a:hover,
.nav--drawer a.is-active {
  background: rgba(189, 120, 128, 0.1);
  text-decoration: none;
}

.hero {
  padding: 3rem 0 2.5rem;
  background: linear-gradient(135deg, #ffe8e9 0%, #fff 45%, #e8f0ea 100%);
}

.hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero__accent {
  color: var(--primary);
}

.hero-art {
  display: block;
  /* Иначе в grid + justify-self:end ширина родителя → 0, рамка с width:100% не рисуется */
  width: min(100%, 18rem);
  max-width: 18rem;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .hero-art {
    width: min(100%, 20rem);
    max-width: 20rem;
    margin-inline: 0;
    justify-self: end;
  }
}

.hero-art__frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: #f5e8ec;
}

/* Перебиваем глобальные img { max-width:100%; height:auto } — иначе картинка не заполняет рамку */
.hero-art__frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero .lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 34rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.btn--ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.section {
  padding: 2.75rem 0;
}

.section--white {
  background: #fff;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  text-align: center;
  margin: 0 0 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.grid-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card__img {
  aspect-ratio: 1;
  background: #fff5f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.card__body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-family: var(--display);
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.card__meta {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.price-with-note {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-with-note__value {
  font-weight: 700;
  color: var(--primary-dark);
}

.card__meta.price-with-note {
  font-weight: 400;
  color: inherit;
}

.card__meta.price-with-note .price-with-note__value {
  font-weight: 700;
  color: var(--primary-dark);
}

.price-with-note__star {
  margin-left: 0.12em;
  font-weight: 700;
  color: var(--primary-dark);
}

.price-with-note__hint {
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-muted);
}

.product-info__price.price-with-note {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.product-info__price.price-with-note .price-with-note__hint {
  font-size: 0.82rem;
}

.card__text {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex: 1;
}

.card__link {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.chip.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chip:hover {
  text-decoration: none;
  border-color: var(--primary);
}

.product-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff5f6;
  border: 1px solid var(--border);
}

.thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.thumbs button {
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: 72px;
  height: 72px;
  cursor: pointer;
  background: #fff;
}

.thumbs button.is-active {
  border-color: var(--primary);
}

.meta-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.review {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 0.75rem;
}

.review__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  margin-bottom: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0));
  margin-top: 2rem;
  background: #fff;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 720px) {
  .footer-inner {
    gap: 1.25rem;
  }
}

.site-footer a {
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer-nav a:hover {
  color: var(--primary-dark);
}

.footer-version {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.footer-note {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.9;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.faq-item {
  margin-bottom: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item[open] .faq-q {
  margin-bottom: 0.5rem;
}

.faq-q {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-q::after {
  content: '−';
}

.faq-a {
  margin: 0;
  color: var(--text-muted);
}

.faq-a p {
  margin: 0;
}

.page-hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #ffe8e9 0%, #fff 50%);
}

.page-hero h1 {
  font-family: var(--display);
  margin: 0 0 0.5rem;
}

.muted {
  color: var(--text-muted);
}

/* Admin */
.admin-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.admin-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.admin-nav a {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-nav a.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.badge-log {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.12em 0.4em;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-log--admin {
  background: #ede4f7;
  color: #4a2c7a;
}

.badge-log--public {
  background: #e8f4ec;
  color: #1f5c2e;
}

.badge-cm {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-cm--new {
  background: #fff3e0;
  color: #b35c00;
}

.badge-cm--done {
  background: #ecfdf3;
  color: #166534;
}

.badge-cm--archived {
  background: #f4f4f5;
  color: #52525b;
}

.admin-log-table .admin-log-json {
  font-size: 0.75rem;
  max-width: min(32rem, 90vw);
  max-height: 14rem;
  overflow: auto;
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.65rem;
  background: #f6f6f8;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-upload-label {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.admin-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  align-items: flex-start;
}

.admin-upload-preview--pending {
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px dashed var(--primary);
  background: #fffafb;
}

.admin-upload-preview__item {
  margin: 0;
  max-width: 200px;
}

.admin-upload-preview__item img {
  display: block;
  max-height: 140px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-upload-preview__caption {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.3;
}

.admin-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: #fff;
}

.admin-fieldset__legend {
  padding: 0 0.35rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}

.admin-content-form textarea {
  min-height: 2.5rem;
  font-size: 0.92rem;
}

.admin-col-thumb {
  width: 1%;
  vertical-align: middle;
  padding-right: 0.5rem;
}

.admin-table-thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: #fff5f6;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: #fff3f4;
  border: 1px solid #ffb8bc;
  color: var(--text);
  margin-bottom: 1rem;
}

.inline-form {
  display: inline;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
}

.breadcrumbs__sep {
  opacity: 0.45;
}

.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 720px) {
  .catalog-toolbar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.catalog-toolbar__search {
  flex: 1;
  min-width: 0;
}

.catalog-toolbar__search label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.catalog-toolbar__search input {
  width: 100%;
  max-width: 22rem;
}

.catalog-toolbar__sort label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.catalog-toolbar__sort select {
  min-width: 11rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
}

.contact-form textarea {
  min-height: 8rem;
  resize: vertical;
}


.stars-rating {
  color: #c9a227;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
}

.thumb-btn {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.thumb-btn.is-active {
  border-color: var(--primary);
}

.alert--success {
  background: #ecfdf3;
  border-color: #86efac;
}

.admin-page-title {
  margin-top: 0;
}

@media (max-width: 600px) {
  .section {
    padding: 2rem 0;
  }

  .page-hero {
    padding: 1.75rem 0 1.15rem;
  }

  .page-hero h1 {
    font-size: clamp(1.45rem, 6vw, 2rem);
  }

  .hero {
    padding: 2rem 0 2rem;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .admin-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    margin-bottom: 1.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .admin-nav a {
    flex: 0 0 auto;
  }

  .admin-wrap {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

/* Раздел статей — навигация */
.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.breadcrumb__sep {
  margin: 0 0.2rem;
  opacity: 0.4;
  font-size: 0.8em;
}

/* Сетка тем */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: var(--text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.topic-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(189, 120, 128, 0.18);
  border-color: var(--primary);
}

.topic-card:hover::before {
  opacity: 1;
}

.topic-card__icon {
  font-size: 2rem;
  line-height: 1;
}

.topic-card__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
}

.topic-card__desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  flex: 1;
}

.topic-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.topic-card__count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.topic-card__arrow {
  font-size: 1.1rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.topic-card:hover .topic-card__arrow {
  transform: translateX(4px);
}

/* Страница темы — герой */
.topic-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.topic-hero__icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Список статей в теме */
.article-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.article-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: var(--text);
  text-decoration: none;
}

.article-card:hover {
  text-decoration: none;
  transform: translateX(4px);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(189, 120, 128, 0.15);
}

.article-card__num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  opacity: 0.35;
  line-height: 1;
  flex-shrink: 0;
  min-width: 2rem;
  text-align: center;
  padding-top: 0.15rem;
}

.article-card:hover .article-card__num {
  opacity: 0.7;
}

.article-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.article-card__title {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
}

.article-card__excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.article-card__arrow {
  font-size: 1.1rem;
  color: var(--primary);
  flex-shrink: 0;
  align-self: center;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.article-card:hover .article-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

.topic-back {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.topic-back a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.topic-back a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Страница статьи */
.article-page__kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  background: rgba(189, 120, 128, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  margin-bottom: 0.65rem;
}

.article-page__lead {
  font-size: 1.08rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.article-nav {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.article-nav__back {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.article-nav__back:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Тело статьи */
.article-body {
  max-width: 720px;
  margin: 0 auto;
}

.article-body h2,
.article-body h3 {
  font-family: var(--display);
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

.article-body h2 {
  font-size: 1.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.15rem;
}

.article-body p {
  margin: 0 0 1rem;
  line-height: 1.65;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1rem 1.25rem;
  line-height: 1.65;
}

.article-body li + li {
  margin-top: 0.35rem;
}

.article-body img {
  border-radius: var(--radius);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-x: auto;
  display: block;
}

.article-table thead {
  display: table;
  width: 100%;
  table-layout: auto;
}

.article-table tbody {
  display: table;
  width: 100%;
  table-layout: auto;
}

.article-table th {
  background: rgba(189, 120, 128, 0.08);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--primary);
  white-space: nowrap;
}

.article-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-table tbody tr:last-child td {
  border-bottom: none;
}

.article-table tbody tr:hover {
  background: rgba(189, 120, 128, 0.04);
}

@media (max-width: 640px) {
  .article-table {
    font-size: 0.82rem;
  }
  .article-table th,
  .article-table td {
    padding: 0.4rem 0.5rem;
  }
}

.article-body blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--primary);
  background: rgba(189, 120, 128, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Мобильная адаптация статей */
@media (max-width: 640px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    padding: 1rem;
  }

  .article-card__num {
    font-size: 1.2rem;
    min-width: 1.5rem;
  }

  .article-card__arrow {
    display: none;
  }

  .topic-hero__icon {
    font-size: 2rem;
  }
}

@media print {
  .site-header, .site-footer, .hero, .breadcrumb, .admin-wrap,
  .article-nav, .topic-back, button, .btn, nav { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  main { padding: 0; margin: 0; }
  a { color: #000; text-decoration: underline; }
  .article-table { border: 1px solid #000; }
  .article-table th, .article-table td { border: 1px solid #666; padding: 4px; }
  img { max-width: 100% !important; }
}
