/* pages.css — MyNUC.ru shared stylesheet for sub-pages */

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

:root {
  --a:   #0057ff;
  --bg:  #f0f2f5;
  --sur: #ffffff;
  --t1:  #0a0d14;
  --t2:  #5c6474;
  --t3:  #9399a6;
  --brd: rgba(0,0,0,.07);
  --brdm: rgba(0,0,0,.12);
}

html, body {
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--t1);
}

/* ── TOPBAR ── */
.topbar {
  background: var(--sur);
  border-bottom: 1px solid var(--brd);
  height: 54px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: filter .25s ease;
}
.logo-link:hover {
  filter: drop-shadow(0 0 4px rgba(0,87,255,.65)) drop-shadow(0 0 12px rgba(0,87,255,.3));
}
.logo-text {
  font-size: 15px;
  font-weight: 400;
  color: var(--t1);
  letter-spacing: -.01em;
}
.logo-text b { font-weight: 600; color: var(--t1); }
.logo-text span { color: var(--a); }

/* Topbar right group */
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* Speaker button + equalizer on sub-pages */
.pg-snd-wrap { display: flex; align-items: center; gap: 6px; }
.pg-eq {
  display: flex; align-items: flex-end; gap: 2px; height: 14px;
  transition: opacity .3s;
}
.pg-eq .b {
  width: 3px; border-radius: 2px; background: var(--a); opacity: .6;
  animation: pgEqBar 0s ease-in-out infinite alternate;
}
.pg-eq .b:nth-child(1){ height:4px;  animation-duration:.55s; animation-delay:0s; }
.pg-eq .b:nth-child(2){ height:11px; animation-duration:.4s;  animation-delay:.1s; }
.pg-eq .b:nth-child(3){ height:7px;  animation-duration:.65s; animation-delay:.05s; }
.pg-eq .b:nth-child(4){ height:13px; animation-duration:.45s; animation-delay:.18s; }
.pg-eq .b:nth-child(5){ height:5px;  animation-duration:.5s;  animation-delay:.08s; }
@keyframes pgEqBar {
  0%   { transform: scaleY(.25); opacity: .35; }
  100% { transform: scaleY(1);   opacity: .7; }
}
.pg-snd-wrap.m .pg-eq { opacity: .18; }
.pg-snd-wrap.m .pg-eq .b { animation-play-state: paused; }
.pg-snd {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: rgba(0,60,200,.08); cursor: pointer; color: rgba(0,60,200,.4);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s; flex-shrink: 0;
}
.pg-snd:hover { background: rgba(0,60,200,.15); color: rgba(0,80,220,.75); }
.pg-snd svg { width: 13px; height: 13px; }
.pg-snd-wrap.m .son { display: none; }
.pg-snd-wrap:not(.m) .sof { display: none; }

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--a);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 7px;
  border: 1.5px solid rgba(0,87,255,.28);
  transition: background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.back-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.back-btn:hover {
  background: rgba(0,87,255,.05);
  border-color: var(--a);
  box-shadow: 0 0 0 3px rgba(0,87,255,.08);
}

/* ── PAGE LAYOUT ── */
.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

/* Page heading block */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--brd);
}
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--a);
  margin-bottom: 11px;
}
.page-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--a);
  box-shadow: 0 0 5px rgba(0,87,255,.45);
}
.page-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--t1);
  line-height: 1.25;
  margin-bottom: 8px;
}
.page-desc {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.75;
  max-width: 600px;
  text-align: justify;
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 12px;
  margin-top: 28px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--brd);
}

/* ── CARD ── */
.card {
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card:last-child { margin-bottom: 0; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.01em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title .num {
  width: 20px; height: 20px;
  border-radius: 5px;
  background: var(--a);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card p {
  font-size: 13.5px;
  line-height: 1.82;
  color: var(--t2);
  margin-bottom: 11px;
  text-align: justify;
}
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--t1); font-weight: 600; }
.card a { color: var(--a); font-weight: 500; text-decoration: none; }
.card a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── CALLOUT ── */
.callout {
  border-left: 3px solid var(--a);
  background: rgba(0,87,255,.04);
  padding: 13px 16px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.78;
  color: var(--t1);
  text-align: justify;
}
.callout.warn {
  border-left-color: #d97706;
  background: rgba(217,119,6,.05);
}
.callout strong { font-weight: 600; }

/* ── NORMS LIST ── */
.norms { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.norm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: rgba(0,0,0,.018);
}
.norm-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--a);
  background: rgba(0,87,255,.08);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 1px;
}
.norm-desc { font-size: 13px; color: var(--t2); line-height: 1.58; text-align: justify; }
.norm-desc strong { color: var(--t1); font-weight: 500; }

/* ── CHIP GRID ── */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.chip {
  padding: 14px 15px;
  border-radius: 9px;
  border: 1px solid rgba(0,87,255,.12);
  background: rgba(0,87,255,.04);
}
.chip-icon { font-size: 18px; margin-bottom: 7px; display: block; }
.chip-title { font-size: 12.5px; font-weight: 600; color: var(--t1); margin-bottom: 3px; }
.chip-desc { font-size: 11.5px; color: var(--t3); line-height: 1.45; }

/* ── PRINCIPLE GRID ── */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.principle {
  padding: 16px 15px 14px;
  border-radius: 9px;
  border: 1px solid rgba(0,87,255,.12);
  background: rgba(0,87,255,.03);
}
.principle-icon { font-size: 19px; margin-bottom: 8px; display: block; }
.principle-title { font-size: 12.5px; font-weight: 600; color: var(--t1); margin-bottom: 4px; }
.principle-desc { font-size: 11.5px; color: var(--t2); line-height: 1.5; }

/* ── STEPS ── */
.steps { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 9px;
  border: 1px solid rgba(0,87,255,.1);
  background: rgba(0,87,255,.025);
}
.step-n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--a);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.step-body { font-size: 13.5px; color: var(--t2); line-height: 1.68; text-align: justify; }
.step-body strong { color: var(--t1); font-weight: 500; }
.step-body a { color: var(--a); font-weight: 500; text-decoration: none; }
.step-body a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── DATA ROWS ── */
.data-rows { display: flex; flex-direction: column; gap: 8px; }
.data-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: rgba(0,0,0,.018);
}
.data-icon { font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.data-text { font-size: 13.5px; color: var(--t2); line-height: 1.68; text-align: justify; }
.data-text strong { color: var(--t1); font-weight: 500; }

/* ── MONO INLINE ── */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: rgba(0,87,255,.07);
  color: var(--a);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── STATUS ROW ── */
.status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--t3);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--brd);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34,197,94,.5);
  flex-shrink: 0;
}

/* ── PAGE FOOTER NOTE ── */
.page-foot {
  margin-top: 32px;
  padding: 15px 20px;
  border-radius: 10px;
  background: rgba(0,0,0,.025);
  border: 1px solid var(--brd);
  font-size: 12px;
  color: var(--t3);
  line-height: 1.7;
  text-align: center;
}
.page-foot a { color: var(--a); text-decoration: none; }
.page-foot a:hover { text-decoration: underline; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .page-wrap { padding: 28px 16px 56px; }
  .card { padding: 18px 20px; }
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 22px; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .page-wrap { padding: 20px 13px 48px; }
  .card { padding: 15px 16px; }
  .chip-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .principle-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .page-title { font-size: 20px; }
  .norm { flex-direction: column; gap: 5px; }
  .step { padding: 10px 12px; gap: 10px; }
  .back-btn { padding: 6px 10px; font-size: 12px; }
}
