/* ============================================================
   AuditPortal — /baza/ публичная правовая база
   Адаптивно: 320 → 1920px.  Brand-tokens используются из brand-tokens.css.
   ============================================================ */

/* ---- глобальные защиты от overflow ---- */
html, body { max-width: 100%; overflow-x: hidden; }
body.baza-page { background: var(--cream); padding-top: 0; }
.baza-page * { min-width: 0; }
.baza-page img { max-width: 100%; height: auto; }

/* ---- main wrapper ---- */
.baza-main {
  padding: clamp(96px, 12vw, 140px) 0 clamp(60px, 7vw, 100px);
}
.baza-main .container {
  width: 100%;
  max-width: min(1100px, 100% - 32px);
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 32px);
  box-sizing: border-box;
}

/* ---- crumbs ---- */
.baza-crumbs {
  font-size: 13px;
  color: var(--ink-600);
  margin-bottom: clamp(18px, 2vw, 26px);
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center;
  line-height: 1.5;
}
.baza-crumbs a {
  color: var(--emerald);
  text-decoration: none;
  border-bottom: 1px dotted var(--stone);
}
.baza-crumbs a:hover { color: var(--gold); border-color: var(--gold); }
.baza-crumbs__sep { color: var(--stone); }

/* ---- hero ---- */
.baza-hero {
  margin-bottom: clamp(24px, 3.5vw, 40px);
  max-width: 820px;
}
.baza-hero__h {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--emerald);
  line-height: 1.15;
  margin: 12px 0 14px;
  letter-spacing: -.01em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.baza-hero__sub {
  font-size: clamp(14.5px, 1.6vw, 16.5px);
  color: var(--ink-700);
  line-height: 1.6;
  margin: 0;
}

/* ---- search ---- */
.baza-search { margin: clamp(20px, 2.5vw, 30px) 0; }
.baza-search input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--stone);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink-900);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}
.baza-search input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,75,.15);
}
.baza-search input::placeholder { color: var(--ink-600); }

/* ============================================================
   ИНДЕКС: карточки актов
   ============================================================ */
.baza-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(12px, 1.5vw, 20px);
  margin-bottom: clamp(40px, 5vw, 60px);
}
.baza-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(16px, 2vw, 22px);
  background: #fff;
  border: 1px solid var(--stone);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  min-height: 110px;
  box-sizing: border-box;
}
.baza-card:hover {
  border-color: rgba(201,162,75,.5);
  box-shadow: 0 14px 36px rgba(201,162,75,.18);
  transform: translateY(-3px);
}
.baza-card__label {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
  color: var(--emerald);
  line-height: 1.2;
}
.baza-card__desc {
  font-size: 13.5px;
  color: var(--ink-700);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   СТРАНИЦА АКТА: карточки норм (вместо широкой таблицы)
   ============================================================ */
.baza-norms {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 22px);
  margin-bottom: clamp(40px, 5vw, 60px);
}
.baza-norm {
  background: #fff;
  border: 1px solid var(--stone);
  border-radius: var(--r-md);
  padding: clamp(18px, 2vw, 26px);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
.baza-norm__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.baza-norm__num {
  flex-shrink: 0;
  display: inline-block;
  padding: 3px 12px;
  background: rgba(201,162,75,.12);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.baza-norm__clause {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 600;
  color: var(--emerald);
  line-height: 1.35;
  word-wrap: break-word;
}
.baza-norm__quote {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-700);
  font-style: italic;
  word-wrap: break-word;
}
.baza-norm__sanction {
  background: rgba(185,45,45,.04);
  border: 1px solid rgba(185,45,45,.18);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
}
.baza-norm__fine {
  font-weight: 700;
  color: var(--danger-600);
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  word-wrap: break-word;
}
.baza-norm__source {
  font-size: 11.5px;
  color: var(--ink-600);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
}
.baza-norm__fine-quote {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-600);
  font-style: italic;
}
.baza-norm__examples {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--stone);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.baza-norm__ex {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-700);
}
.baza-norm__ex-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold);
  color: var(--emerald);
  border-radius: 50%;
  font-weight: 800;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* ============================================================
   CTA + footer
   ============================================================ */
.baza-cta {
  margin: clamp(40px, 5vw, 60px) 0 clamp(20px, 3vw, 30px);
  padding: clamp(22px, 3vw, 32px) clamp(24px, 3vw, 36px);
  background: linear-gradient(135deg, var(--emerald), var(--emerald-mid));
  color: #fff;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.baza-cta__text { flex: 1 1 320px; min-width: 0; }
.baza-cta__h {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 600;
  margin: 0 0 6px;
  color: #fff;
  line-height: 1.25;
}
.baza-cta p {
  margin: 0;
  font-size: 14.5px;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
}
.baza-cta .btn-gold { flex-shrink: 0; }

.baza-back {
  text-align: center;
  margin: clamp(30px, 4vw, 50px) 0 0;
  font-size: 14px;
}
.baza-back a {
  color: var(--emerald);
  text-decoration: none;
  border-bottom: 1px solid var(--stone);
  padding-bottom: 2px;
  transition: var(--transition);
}
.baza-back a:hover { color: var(--gold); border-color: var(--gold); }

.baza-footer {
  background: var(--emerald);
  color: rgba(255,255,255,.55);
  padding: clamp(36px, 5vw, 56px) 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.65;
}
.baza-footer__brand { color: rgba(255,255,255,.85); margin: 0 0 8px; font-weight: 600; }
.baza-footer__note  { font-size: 12.5px; margin: 0 0 12px; }
.baza-footer__links a { color: rgba(255,255,255,.65); text-decoration: none; }
.baza-footer__links a:hover { color: var(--gold-light); }

/* ============================================================
   АДАПТИВ: ≤900px → norm в одну колонку
   ============================================================ */
@media (max-width: 900px) {
  .baza-norm { grid-template-columns: 1fr; }
  .baza-norm__sanction { margin-top: 4px; }
}

@media (max-width: 640px) {
  .baza-norm__examples { grid-template-columns: 1fr; gap: 10px; }
  .baza-cta { flex-direction: column; align-items: flex-start; text-align: left; }
  .baza-cta .btn-gold { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .baza-grid { grid-template-columns: 1fr; }
  .baza-card { min-height: 0; }
  .baza-norm { padding: 16px 14px; }
  .baza-hero__h { font-size: clamp(1.2rem, 5.5vw, 1.6rem); line-height: 1.25; }
  .baza-hero__sub { font-size: 14px; }
  .baza-norm__head { gap: 8px; }
  .baza-norm__num { padding: 2px 10px; font-size: 12px; }
  .baza-norm__clause { font-size: 0.98rem; }
  .baza-norm__quote { font-size: 13.5px; }
  .baza-main { padding-top: clamp(82px, 22vw, 120px); }
}

/* Подсветка активного пункта в шапке */
.header-nav a.is-active { color: var(--gold-light); }
