/* Публичный лендинг партнёрской программы */
.pt-page {
  --pt-ink: #102033;
  --pt-muted: #4a5d73;
  --pt-line: #d7e0ea;
  --pt-accent: #1f7a6b;
  --pt-hot: #c45c26;
  --pt-surface: #f3f6f9;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--pt-ink);
  background:
    radial-gradient(1000px 420px at 10% -8%, rgba(31, 122, 107, 0.14), transparent 55%),
    radial-gradient(800px 380px at 92% 0%, rgba(196, 92, 38, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f9fb 0%, #fff 40%, #f5f7fa 100%);
  min-height: 100vh;
}

.pt-shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.pt-top {
  background: #fff;
  border-bottom: 1px solid var(--pt-line);
  padding: 0.85rem 0;
}

.pt-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.pt-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--pt-ink);
  font-weight: 700;
}

.pt-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.pt-nav a {
  color: var(--pt-muted);
  text-decoration: none;
}

.pt-nav a:hover { color: var(--pt-accent); }

.pt-main { padding: 2.5rem 0 3.5rem; }

.pt-hero {
  text-align: left;
  margin-bottom: 2.25rem;
}

.pt-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--pt-accent);
  letter-spacing: 0.01em;
}

.pt-hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.75rem, 3.8vw, 2.55rem);
  line-height: 1.18;
  margin: 0 0 0.85rem;
  max-width: 22ch;
}

.pt-hero-lead {
  font-size: 1.15rem;
  color: var(--pt-ink);
  max-width: 40rem;
  margin: 0 0 0.75rem;
}

.pt-hero-body {
  font-size: 1.02rem;
  color: var(--pt-muted);
  max-width: 42rem;
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.pt-hero-body a {
  color: var(--pt-accent);
}

.pt-section-lead {
  margin: -0.35rem 0 1rem;
  color: var(--pt-muted);
  max-width: 42rem;
  line-height: 1.5;
}

.pt-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.pt-metric {
  background: #fff;
  border: 1px solid var(--pt-line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.pt-metric strong {
  display: block;
  font-size: 1.45rem;
  color: var(--pt-accent);
  margin-bottom: 0.2rem;
}

.pt-metric span {
  font-size: 0.88rem;
  color: var(--pt-muted);
}

.pt-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.pt-btn.primary {
  background: var(--pt-accent);
  color: #fff;
}

.pt-btn.primary:hover { filter: brightness(1.05); }

.pt-btn.ghost {
  background: #fff;
  border-color: var(--pt-line);
  color: var(--pt-ink);
}

.pt-section {
  background: #fff;
  border: 1px solid var(--pt-line);
  border-radius: 18px;
  padding: 1.5rem 1.35rem 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.04);
}

.pt-section h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.45rem;
  margin: 0 0 1rem;
}

.pt-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.pt-field label {
  display: block;
  font-size: 0.88rem;
  color: var(--pt-muted);
  margin-bottom: 0.35rem;
}

.pt-field input[type="number"],
.pt-field input[type="range"] {
  width: 100%;
  font: inherit;
}

.pt-field input[type="number"] {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
}

.pt-calc-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.pt-calc-card {
  background: var(--pt-surface);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.pt-calc-card .pt-period {
  font-size: 0.8rem;
  color: var(--pt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pt-calc-card .pt-sum {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: var(--pt-hot);
}

.pt-disclaimer {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--pt-muted);
}

.pt-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.pt-tool {
  --pt-tool-bg: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 168px;
  border: 1px solid var(--pt-line);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background-color: #1a2b3d;
  background-image: var(--pt-tool-bg);
  background-size: cover;
  background-position: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pt-tool::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(16, 32, 51, 0.22) 0%, rgba(16, 32, 51, 0.78) 58%, rgba(16, 32, 51, 0.9) 100%);
}

.pt-tool:hover,
.pt-tool:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 32, 51, 0.16);
  border-color: rgba(31, 122, 107, 0.55);
  outline: none;
}

.pt-tool--primary {
  border-color: rgba(31, 122, 107, 0.65);
  box-shadow: 0 0 0 1px rgba(31, 122, 107, 0.28), 0 10px 24px rgba(31, 122, 107, 0.12);
  min-height: 196px;
}

.pt-tool--primary::before {
  background: linear-gradient(180deg, rgba(31, 122, 107, 0.38) 0%, rgba(16, 40, 36, 0.78) 52%, rgba(10, 28, 26, 0.92) 100%);
}

.pt-tool-badge {
  align-self: flex-start;
  margin-bottom: 0.15rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pt-accent);
}

.pt-tool h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.pt-tool p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.pt-table-wrap {
  overflow-x: auto;
  margin: 0 0 0.25rem;
}

.pt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.pt-table th,
.pt-table td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--pt-line);
  vertical-align: top;
}

.pt-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pt-muted);
  font-weight: 650;
  background: var(--pt-surface);
}

.pt-table tbody th {
  font-weight: 650;
  color: var(--pt-ink);
  white-space: nowrap;
  width: 32%;
}

.pt-table tbody td {
  color: var(--pt-muted);
}

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

.pt-steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--pt-muted);
  line-height: 1.55;
}

.pt-steps li + li {
  margin-top: 0.35rem;
}

.pt-section--idea {
  border-color: rgba(31, 122, 107, 0.35);
  background: linear-gradient(180deg, #f3faf8 0%, #fff 55%);
}

.pt-optional {
  font-weight: 400;
  color: var(--pt-muted);
  font-size: 0.85em;
}

.pt-field textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  resize: vertical;
  min-height: 7rem;
  box-sizing: border-box;
}

.pt-field-honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.pt-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pt-modal.hidden,
.pt-modal[hidden] {
  display: none !important;
}

.pt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 51, 0.45);
}

.pt-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--pt-line);
  box-shadow: 0 18px 48px rgba(16, 32, 51, 0.18);
  padding: 1.35rem 1.25rem 1.4rem;
}

.pt-modal-panel h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  margin: 0 1.5rem 0.55rem 0;
  line-height: 1.25;
}

.pt-modal-lead {
  margin: 0 0 1rem;
  color: var(--pt-muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.pt-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--pt-muted);
  cursor: pointer;
}

.pt-modal-close:hover { color: var(--pt-ink); }

.pt-modal-msg {
  margin: 0.65rem 0;
  font-size: 0.9rem;
}

.pt-modal-err { color: #b91c1c; }
.pt-modal-ok { color: var(--pt-accent); font-weight: 600; }

.pt-modal .pt-field {
  margin-bottom: 0.85rem;
}

.pt-modal .pt-field input[type="email"],
.pt-modal .pt-field input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  box-sizing: border-box;
}

.pt-modal .pt-field input[readonly] {
  background: var(--pt-surface);
  color: var(--pt-muted);
}

body.pt-modal-open {
  overflow: hidden;
}

/* Минимальные стили входа (auth.js) на публичном /partners/ */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 32, 51, 0.45);
}

.auth-overlay.hidden {
  display: none !important;
}

.auth-panel.panel {
  width: min(360px, calc(100% - 2rem));
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--pt-line);
  padding: 1.25rem 1.15rem;
  color: var(--pt-ink);
  box-shadow: 0 18px 48px rgba(16, 32, 51, 0.18);
}

.auth-panel h2 {
  margin: 0 0 0.5rem;
}

.auth-panel label {
  display: block;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.auth-panel input {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  box-sizing: border-box;
  font: inherit;
}

.auth-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.auth-panel .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--pt-line);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.auth-panel .btn.primary {
  background: var(--pt-accent);
  border-color: var(--pt-accent);
  color: #fff;
}

.auth-error {
  color: #b91c1c;
  font-size: 0.875rem;
}

.auth-error.hidden {
  display: none;
}

.pt-footer {
  border-top: 1px solid var(--pt-line);
  padding: 1.25rem 0 2rem;
  font-size: 0.88rem;
  color: var(--pt-muted);
}

.pt-footer a { color: var(--pt-accent); }

@media (max-width: 560px) {
  .pt-table tbody th {
    white-space: normal;
    width: auto;
  }
}
