/* Страница «Как мы считаем» — в стиле сайта */

.guide-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
}

.guide-back:hover { text-decoration: underline; }

.guide-wrap { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

.guide-page {
  flex: 1;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 20px 56px;
}

.guide-page h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(26px, 6vw, 32px);
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.2;
}

.guide-lead {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.guide-section { margin-bottom: 32px; scroll-margin-top: 24px; }

.guide-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.guide-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 14px;
}

.guide-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
}

.guide-card + .guide-card { margin-top: 10px; }

.guide-card-head {
  padding: 10px 16px;
  background: var(--blue-light);
  border-bottom: 1px solid var(--blue-border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.guide-card-body { padding: 16px; }

/* формула */
.guide-formula {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

.guide-formula .f-out { color: var(--blue-dark); font-weight: 700; }
.guide-formula .f-in { color: var(--blue); font-weight: 600; }
.guide-formula .f-op { color: var(--light); }

.guide-formula-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* шаги */
.guide-steps { list-style: none; margin: 0; padding: 0; }

.guide-steps li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.guide-steps li:last-child { border-bottom: none; }

.guide-steps .n {
  font-size: 12px;
  font-weight: 700;
  color: var(--light);
}

.guide-steps .what { font-weight: 500; color: var(--text); }

.guide-steps .to {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

/* таблицы */
.guide-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.guide-table th {
  text-align: left;
  padding: 9px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light);
  background: #FAFCFF;
  border-bottom: 1px solid var(--border);
}

.guide-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.guide-table tr:last-child td { border-bottom: none; }

.guide-table td.cat {
  color: var(--muted);
  font-size: 12px;
  vertical-align: top;
}

.guide-table td.val {
  text-align: right;
  font-weight: 600;
  color: var(--blue-dark);
  white-space: nowrap;
}

.guide-table td.mul {
  text-align: right;
  font-weight: 700;
  color: var(--blue);
}

/* пример */
.guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.guide-tag-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  color: var(--blue-dark);
}

.guide-calc-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  padding: 3px 0;
}

.guide-calc-line b { color: var(--text); font-weight: 600; }

.guide-example-result {
  margin-top: 4px;
}

.guide-example-result .plabel { margin-bottom: 4px; }

/* заметка */
.guide-note {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--blue-border);
  background: var(--blue-light);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.guide-note strong {
  display: block;
  color: var(--dark);
  font-size: 14px;
  margin-bottom: 4px;
}

.guide-cta {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 28px;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s;
}

.guide-cta:hover { transform: translateY(-1px); }

@media (max-width: 480px) {
  .guide-steps li { grid-template-columns: 20px 1fr; }
  .guide-steps .to { grid-column: 2; margin-top: -2px; }
}

@media print {
  .guide-cta, .guide-back { display: none; }
}
