/* vacansija commercial & trust pages — pricing / moderation policy
   Design system: inherits tokens from ux-refresh.css (Inter, --blue #1f5eff).
   Both light and dark themes are supported via html[data-theme="dark"]. */

/* ---------- Page scaffold ---------- */

.commercial-page {
  padding-bottom: 72px;
}

.commercial-page h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.06;
  letter-spacing: -1.4px;
  font-weight: 720;
  margin: 8px 0 14px;
  max-width: 21ch;
}

.commercial-page h2 {
  font-size: clamp(21px, 2.4vw, 28px);
  letter-spacing: -0.6px;
  font-weight: 700;
  margin: 0 0 8px;
}

.commercial-page h3.pricing-group-title {
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.2px;
  margin: 26px 0 14px;
  color: var(--text2);
  text-transform: none;
}

/* ---------- Hero ---------- */

.pricing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: 44px 0 34px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.pricing-hero-copy {
  max-width: 680px;
}

.pricing-hero::before {
  content: "";
  position: absolute;
  inset: -80px -40px auto -40px;
  height: 340px;
  background:
    radial-gradient(42% 60% at 18% 20%, rgba(31, 94, 255, 0.1), transparent 70%),
    radial-gradient(30% 55% at 85% 10%, rgba(15, 159, 110, 0.07), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.pricing-hero .lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text2);
  max-width: 56ch;
  margin: 0 0 20px;
}

.pricing-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fact-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.fact-chip b {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.2px;
  color: var(--blue);
}

.fact-chip span {
  font-size: 12.5px;
  color: var(--text2);
}

/* ---------- Sticky in-page nav ---------- */

.pricing-subnav {
  position: sticky;
  top: calc(var(--header-h, 64px) + 14px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pricing-subnav::before {
  content: attr(data-title);
  padding: 0 12px 10px;
  font-size: 10.5px;
  font-weight: 720;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.pricing-subnav a {
  position: relative;
  padding: 8px 12px 8px 24px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 560;
  color: var(--text2);
  transition: background 0.15s ease, color 0.15s ease;
}

.pricing-subnav a::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line2);
  transform: translateY(-50%);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.pricing-subnav a:hover {
  background: var(--blueSoft);
  color: var(--blue);
}

.pricing-subnav a.is-active {
  background: var(--blueSoft);
  color: var(--blue);
  font-weight: 660;
}

.pricing-subnav a.is-active::before {
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blueGlow);
}

/* ---------- Section rhythm ---------- */

.pricing-section {
  padding: 40px 0 8px;
  scroll-margin-top: calc(var(--header-h, 64px) + 16px);
}

.pricing-section-head {
  max-width: 72ch;
  margin-bottom: 22px;
}

.pricing-section-head p {
  margin: 0;
  color: #4a545f;
  font-size: 14.5px;
  line-height: 1.65;
}

html[data-theme="dark"] .pricing-section-head p {
  color: #a7b1bd;
}

.pricing-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #6a7480;
}

html[data-theme="dark"] .pricing-note {
  color: #97a1ad;
}

/* ---------- Free tier cards ---------- */

.free-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.free-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.free-card:hover {
  transform: translateY(-2px);
  border-color: var(--line2);
  box-shadow: var(--shadow-lg);
}

.free-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--greenSoft);
  color: var(--green);
}

.free-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.free-card strong {
  font-size: 14.5px;
  font-weight: 680;
  letter-spacing: -0.2px;
}

.free-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}

/* ---------- Price cards ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.price-card:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 94, 255, 0.4);
  box-shadow: 0 10px 34px rgba(31, 94, 255, 0.12);
}

.price-card header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.price-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blueSoft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-card header strong {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.25px;
  line-height: 1.3;
}

.price-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.price-value b {
  font-size: 30px;
  font-weight: 780;
  letter-spacing: -1px;
  background: linear-gradient(120deg, var(--text) 30%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.price-value span {
  font-size: 12.5px;
  color: var(--muted);
}

.price-features {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.price-features li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text2);
}

.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 13px;
  height: 8px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
  border-radius: 1px;
}

.price-card .btn {
  margin-top: auto;
}

.price-card.is-featured {
  border-color: rgba(31, 94, 255, 0.45);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(31, 94, 255, 0.06), transparent 55%),
    var(--surface);
  box-shadow: 0 10px 34px rgba(31, 94, 255, 0.1);
}

.price-card.is-featured:hover {
  box-shadow: 0 14px 44px rgba(31, 94, 255, 0.18);
}

.price-choice {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Fee cards (escrow) ---------- */

.fee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.fee-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.fee-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fee-card header strong {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.fee-rate {
  font-size: 26px;
  font-weight: 780;
  letter-spacing: -1px;
  color: var(--blue);
  padding: 2px 12px;
  border-radius: 10px;
  background: var(--blueSoft);
}

.fee-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.fee-card ul li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text2);
}

.fee-card ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.55;
}

/* ---------- Terms tables ---------- */

.terms-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.terms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.terms-table th[scope="row"] {
  text-align: left;
  vertical-align: top;
  padding: 15px 18px;
  width: 30%;
  font-weight: 660;
  letter-spacing: -0.1px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  background: var(--surface2);
}

.terms-table td {
  padding: 15px 18px;
  vertical-align: top;
  line-height: 1.62;
  color: #454f5a;
  border-bottom: 1px solid var(--line);
}

html[data-theme="dark"] .terms-table td {
  color: #aeb8c4;
}

.terms-table tbody tr th,
.terms-table tbody tr td {
  transition: background 0.12s ease;
}

.terms-table thead th {
  text-align: left;
  padding: 13px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--line);
}

.terms-table tbody tr:last-child th,
.terms-table tbody tr:last-child td {
  border-bottom: 0;
}

.terms-table tbody tr:hover th,
.terms-table tbody tr:hover td {
  background: color-mix(in srgb, var(--blueSoft) 45%, transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.ok {
  background: var(--greenSoft);
  color: var(--green);
}

.badge.part {
  background: var(--amberSoft);
  color: var(--amber);
}

/* ---------- FAQ ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 860px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: rgba(31, 94, 255, 0.35);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  padding-right: 46px;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.2px;
  position: relative;
  user-select: none;
}

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

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.faq-body {
  padding: 0 18px 18px;
}

.faq-body p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text2);
}

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

.faq-body a {
  color: var(--blue);
  font-weight: 620;
}

.faq-body a:hover {
  text-decoration: underline;
}

/* ---------- Policy stepper ---------- */

.policy-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  counter-reset: step;
}

.policy-steps li {
  position: relative;
  padding: 20px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.policy-steps li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), rgba(31, 94, 255, 0.25));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.policy-steps li:hover::after {
  opacity: 1;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--blueSoft);
  color: var(--blue);
  font-size: 15px;
  font-weight: 760;
}

.policy-steps strong {
  display: block;
  font-size: 14.5px;
  font-weight: 690;
  letter-spacing: -0.2px;
  margin-bottom: 7px;
}

.policy-steps p {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.58;
  color: var(--text2);
}

/* ---------- Rules cards ---------- */

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rule-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--red);
}

.rule-card.rule-amber {
  border-top-color: var(--amber);
}

.rule-card strong {
  display: block;
  font-size: 14.5px;
  font-weight: 690;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
}

.rule-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}

/* ---------- Signals ---------- */

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.signal-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.signal-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blueSoft);
  color: var(--blue);
}

.signal-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.signal-card strong {
  display: block;
  font-size: 14.5px;
  font-weight: 690;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
}

.signal-card p {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.58;
  color: var(--text2);
}

/* ---------- Severity strip ---------- */

.severity-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.severity-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.severity-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.severity-item b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.severity-item span {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.45;
}

.severity-item.sev-low::before { background: #94a3b8; }
.severity-item.sev-medium::before { background: var(--amber); }
.severity-item.sev-high::before { background: #ea8c00; }
.severity-item.sev-critical::before { background: var(--red); }

.severity-item.sev-critical b { color: var(--red); }

/* ---------- CTA ---------- */

.pricing-cta {
  margin-top: 44px;
}

.pricing-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 140% at 85% 0%, rgba(31, 94, 255, 0.16), transparent 60%),
    linear-gradient(135deg, #12314f 0%, #0d2440 100%);
  color: #fff;
  box-shadow: 0 18px 50px rgba(13, 36, 64, 0.35);
}

.pricing-cta-card h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: clamp(19px, 2.2vw, 26px);
  letter-spacing: -0.5px;
}

.pricing-cta-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.6;
  max-width: 52ch;
}

.pricing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.pricing-cta-card .btn.primary {
  background: #fff;
  color: #0d2440;
}

.pricing-cta-card .btn.primary:hover {
  background: #e9f0ff;
}

.pricing-cta-card .btn:not(.primary) {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.pricing-cta-card .btn:not(.primary):hover {
  background: rgba(255, 255, 255, 0.22);
}

.pricing-legal {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Dark theme ---------- */

html[data-theme="dark"] .free-card,
html[data-theme="dark"] .price-card,
html[data-theme="dark"] .fee-card,
html[data-theme="dark"] .terms-table-wrap,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .policy-steps li,
html[data-theme="dark"] .rule-card,
html[data-theme="dark"] .signal-card,
html[data-theme="dark"] .severity-item,
html[data-theme="dark"] .pricing-subnav,
html[data-theme="dark"] .fact-chip {
  background: var(--surface2);
  border-color: var(--line);
  box-shadow: none;
}

html[data-theme="dark"] .terms-table th[scope="row"],
html[data-theme="dark"] .terms-table thead th {
  background: var(--surface3);
}

html[data-theme="dark"] .price-value b {
  background: linear-gradient(120deg, #fff 30%, #7aa5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="dark"] .price-card.is-featured {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(31, 94, 255, 0.14), transparent 55%),
    var(--surface2);
}

html[data-theme="dark"] .pricing-hero::before {
  background:
    radial-gradient(42% 60% at 18% 20%, rgba(31, 94, 255, 0.16), transparent 70%),
    radial-gradient(30% 55% at 85% 10%, rgba(15, 159, 110, 0.09), transparent 70%);
}

html[data-theme="dark"] .pricing-cta-card {
  background:
    radial-gradient(60% 140% at 85% 0%, rgba(31, 94, 255, 0.28), transparent 60%),
    linear-gradient(135deg, #101c30 0%, #0b1524 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .severity-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pricing-hero {
    grid-template-columns: 1fr;
  }
  .pricing-subnav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .pricing-cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .free-grid,
  .rules-grid,
  .signal-grid,
  .policy-steps,
  .severity-strip {
    grid-template-columns: 1fr;
  }
  .pricing-section { padding-top: 30px; }
  .pricing-hero { padding-top: 26px; }
  .terms-table th[scope="row"] { width: 38%; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .free-card,
  .price-card,
  .policy-steps li::after {
    transition: none;
  }
  .free-card:hover,
  .price-card:hover {
    transform: none;
  }
}

/* r14: SLA-строка в правилах модерации */
.policy-sla {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  background: var(--blueSoft, #eaf0fa); color: var(--blue2, #1c468e);
  font-size: 13px; display: inline-block;
}
