:root {
  --bg: #f8f5fc;
  --bg-card: #ffffff;
  --ink: #221a3d;
  --ink-dim: #5a5370;
  --ink-faint: #6f6782;
  --border: #e7deF5;

  --pink: #cf3a22;
  --pink-deep: #9c2c19;
  --pink-soft: #ffe4da;
  --pink-soft-border: #ffc0a5;

  --green: #7c3aed;
  --green-deep: #5b21b6;
  --green-soft: #efe4fe;
  --green-soft-border: #d9c3fa;

  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 28px rgba(36, 27, 46, 0.08);
  --font-display: "Unbounded", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); text-align: center; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 16px; color: var(--ink-dim); }

a { color: var(--pink-deep); }

/* header */
.site-header {
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: rgba(250, 246, 248, 0.9);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.logo-glyph { color: var(--green); font-size: 0.7rem; }

.header-nav { display: flex; gap: 24px; flex: 1; }
.header-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.header-nav a:hover { color: var(--ink); }

.header-cta { text-decoration: none; }

/* buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(236, 72, 153, 0.28); }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(36, 27, 46, 0.25); }

.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* hero */
.hero { padding: 32px 0 0; }

.hero-card {
  background: linear-gradient(135deg, var(--green-soft), #fff);
  border: 1px solid var(--green-soft-border);
  border-radius: var(--radius-xl);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.hero-lead { font-size: 1.05rem; max-width: 480px; }

.hero-visual {
  position: relative;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--green) 75%);
  opacity: 0.9;
}

.hero-digits {
  position: relative;
  width: 220px;
  height: 220px;
}

.hero-digits span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--green-deep);
  box-shadow: 0 8px 18px rgba(91, 33, 182, 0.2);
  transform:
    rotate(calc(var(--i) * 60deg))
    translate(95px)
    rotate(calc(var(--i) * -60deg));
}

.fact-row {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.fact-row li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.fact-row b { color: var(--ink); font-family: var(--font-display); font-weight: 700; }

/* quick links */
.quick-links { padding: 48px 0 8px; }

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.quick-card {
  display: block;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease;
}

.quick-card:hover { transform: translateY(-2px); }

.quick-card--green {
  background: var(--green-soft);
  border-color: var(--green-soft-border);
}

.quick-card--pink {
  background: var(--pink-soft);
  border-color: var(--pink-soft-border);
}

.quick-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quick-card--green .quick-label { color: var(--green-deep); }
.quick-card--pink .quick-label { color: var(--pink-deep); }

.quick-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 10px 0 6px;
}
.quick-card p { margin: 0 0 16px; }

.quick-cta {
  font-weight: 700;
  font-size: 0.92rem;
}

.quick-card--green .quick-cta { color: var(--green-deep); }
.quick-card--pink .quick-cta { color: var(--pink-deep); }

/* calculator */
.calc-section { padding: 40px 0 100px; }

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  max-width: 640px;
  margin: 0 auto;
}

.calc-card h2 { margin-bottom: 24px; }

.calc-form { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; text-align: left; }

.field label { font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.field .optional { font-weight: 400; color: var(--ink-faint); }

.field input {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
}

.field input:focus {
  outline: none;
  border-color: var(--pink);
}

.calc-form .btn { margin-top: 8px; }

/* results */
.results { margin-top: 56px; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.result-card--green { background: var(--green-soft); border-color: var(--green-soft-border); }
.result-card--pink { background: var(--pink-soft); border-color: var(--pink-soft-border); }

.coincidence-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--green-soft-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 56px;
}

.coincidence-note[hidden] { display: none; }

.coincidence-note::before {
  content: "✦";
  color: var(--green);
  font-size: 1.1rem;
  line-height: 1.4;
}

.coincidence-note p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.92rem;
}

.result-label {
  font-size: 0.85rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  font-weight: 600;
}

.result-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1;
}

.result-card--green .result-number { color: var(--green-deep); }
.result-card--pink .result-number { color: var(--pink-deep); }

.result-text { color: var(--ink-dim); font-size: 0.95rem; margin: 0; }

/* pythagoras square */
.square-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 56px;
  text-align: center;
  box-shadow: var(--shadow);
}

.square-intro { max-width: 600px; margin: 0 auto 28px; }

.square-wrap {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.pythagoras-grid {
  display: grid;
  grid-template-columns: repeat(3, 92px);
  grid-template-rows: repeat(3, 92px);
  gap: 6px;
}

.py-cell {
  background: var(--pink-soft);
  border: 1px solid var(--pink-soft-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.py-cell.is-empty { background: var(--bg); border-color: var(--border); opacity: 0.7; }

.py-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pink-deep);
  letter-spacing: 1px;
}

.py-cell.is-empty .py-value { color: var(--ink-faint); }

.py-count { font-size: 0.7rem; color: var(--ink-dim); }

.square-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  color: var(--ink-dim);
  font-size: 0.9rem;
  display: grid;
  gap: 8px;
}

.square-legend b { color: var(--pink-deep); }

/* report teaser */
.report-teaser {
  background: var(--ink);
  border-radius: var(--radius-xl);
  padding: 48px;
}

.report-teaser-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}

.report-teaser h3, .report-teaser p { color: #fff; }
.report-teaser .report-points { color: rgba(255,255,255,0.8); }

.report-points {
  margin: 0 0 28px;
  padding-left: 20px;
  color: var(--ink-dim);
}

.report-points li { margin-bottom: 8px; }

.price-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.report-sample {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  min-height: 220px;
}

.sample-lines { display: flex; flex-direction: column; gap: 12px; filter: blur(3px); opacity: 0.6; }
.sample-lines span { display: block; height: 10px; background: rgba(255,255,255,0.25); border-radius: 4px; }
.sample-lines span.short { width: 60%; }

.sample-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* methods */
.methods { padding: 90px 0; }

.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.methods-disclaimer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 640px;
  margin: 0 auto;
}

.methods-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 32px;
}

/* footer */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink-faint); }
.footer-legal { font-size: 0.8rem; color: var(--ink-faint); margin: 0; }

.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.field-consent input { margin-top: 3px; }
.field-consent a { color: var(--pink-deep); }

/* modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 27, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 60px rgba(36, 27, 46, 0.2);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-lead { font-size: 0.9rem; }

.order-form { display: flex; flex-direction: column; gap: 16px; }
.order-form .field input { width: 100%; }
.order-form .btn { margin-top: 4px; }

.order-success { color: var(--green-deep); font-weight: 700; }
.order-error { color: var(--pink-deep); font-weight: 600; font-size: 0.9rem; }

/* responsive */
@media (max-width: 760px) {
  .header-nav { display: none; }
  .header-cta { margin-left: auto; }
  .hero-card { grid-template-columns: 1fr; padding: 32px 24px; text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-visual { height: 200px; }
  .quick-grid { grid-template-columns: 1fr; }
  .calc-card, .square-block, .report-teaser { padding: 28px 20px; }
  .report-teaser-inner { grid-template-columns: 1fr; }
  .report-sample { order: -1; min-height: 140px; }
  .pythagoras-grid { grid-template-columns: repeat(3, 80px); grid-template-rows: repeat(3, 80px); }
}

/* ==================== полный разбор (report-render.js) ==================== */

.report-doc {
  max-width: 820px;
  margin: 0 auto;
}

.report-hero {
  background: linear-gradient(135deg, var(--green-soft), #fff);
  border: 1px solid var(--green-soft-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 28px;
}

.report-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--green-deep);
  margin: 0 0 8px;
}

.report-meta {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
}

.report-intro {
  margin: 0;
  color: var(--ink-dim);
}

.report-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.report-number-card {
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid var(--border);
}

.report-number-card.is-green { background: var(--green-soft); border-color: var(--green-soft-border); }
.report-number-card.is-pink { background: var(--pink-soft); border-color: var(--pink-soft-border); }

.report-number-label { font-size: 0.85rem; font-weight: 600; color: var(--ink-dim); margin: 0 0 8px; }
.report-number-value { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; margin: 0 0 10px; line-height: 1; }
.report-number-card.is-green .report-number-value { color: var(--green-deep); }
.report-number-card.is-pink .report-number-value { color: var(--pink-deep); }
.report-number-summary { margin: 0 0 10px; color: var(--ink-dim); font-size: 0.95rem; }
.report-number-extra { margin: 0; font-size: 0.9rem; color: var(--ink-dim); }

.report-section { margin-bottom: 40px; }
.report-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 18px;
}

.report-sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.report-sector-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.report-sector-card.is-empty { background: var(--bg); }

.report-sector-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.report-sector-label { font-weight: 700; color: var(--ink); }
.report-sector-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: 1px;
}

.report-sector-text { margin: 0; color: var(--ink-dim); font-size: 0.92rem; }

.report-sector-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--ink-dim);
}

.report-sector-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--pink-deep);
  margin-bottom: 8px;
}

.report-sector-details p { margin: 0 0 8px; }
.report-sector-details p:last-child { margin-bottom: 0; }
.report-sector-details b { color: var(--ink); }

.report-combo-list { display: flex; flex-direction: column; gap: 12px; }
.report-combo-item {
  margin: 0;
  padding: 16px 20px;
  background: var(--green-soft);
  border: 1px solid var(--green-soft-border);
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  font-size: 0.93rem;
}

.report-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.report-callout { border-radius: var(--radius); padding: 20px; }
.report-callout.is-green { background: var(--green-soft); }
.report-callout.is-pink { background: var(--pink-soft); }
.report-callout-title { font-weight: 700; margin: 0 0 8px; }
.report-callout.is-green .report-callout-title { color: var(--green-deep); }
.report-callout.is-pink .report-callout-title { color: var(--pink-deep); }
.report-callout p:last-child { margin: 0; color: var(--ink-dim); font-size: 0.93rem; }

.report-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.report-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: default;
}

.report-chip.is-highlight { background: var(--pink-soft); border-color: var(--pink-soft-border); }

.report-chip-value { font-family: var(--font-display); font-weight: 700; color: var(--green-deep); }
.report-chip.is-highlight .report-chip-value { color: var(--pink-deep); }
.report-chip-label { font-size: 0.85rem; color: var(--ink-dim); }

.report-chip-notes { display: none; }

.report-forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.report-forecast-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.report-forecast-card.is-current { background: var(--green-soft); border-color: var(--green-soft-border); }

.report-forecast-year { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin: 0 0 4px; }
.report-forecast-num { font-size: 0.85rem; color: var(--pink-deep); font-weight: 700; margin: 0 0 8px; }
.report-forecast-text { margin: 0; color: var(--ink-dim); font-size: 0.9rem; }

.report-spheres-base { color: var(--ink); font-weight: 600; margin: 0 0 16px; }

.report-spheres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.report-spheres-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.report-spheres-label { font-family: var(--font-display); font-weight: 700; color: var(--pink-deep); margin: 0 0 8px; }
.report-spheres-text { margin: 0; color: var(--ink-dim); font-size: 0.9rem; }

.report-spheres-note { font-size: 0.85rem; color: var(--ink-faint); margin: 0; }

.report-steps { margin: 0; padding-left: 22px; color: var(--ink-dim); }
.report-steps li { margin-bottom: 12px; }
.report-steps li::marker { font-weight: 700; color: var(--green-deep); }

.report-outro {
  font-size: 0.85rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}

@media print {
  .site-header, .report-actions, .admin-note, .admin-wrap > form, .admin-actions { display: none !important; }
  body { background: #fff; }
  .report-doc { max-width: none; }
  .report-hero, .report-sector-card, .report-number-card, .report-callout, .report-forecast-card, .report-spheres-card {
    box-shadow: none !important;
    break-inside: avoid;
  }
  .report-sector-details > * { display: block !important; }
}

@media (max-width: 760px) {
  .report-hero { padding: 28px 20px; }
  .report-number-value { font-size: 2rem; }
}
