/* ============================================================
   Профиам — component library
   Translates the Claude Design prototype (Профиам.dc.html) into
   reusable classes built on the Podlevskikh design-system tokens.
   Load order: ds/*.css (tokens)  →  profiam.css (components).
   ============================================================ */

/* ---------- reset / base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { line-height: 1.16; margin: 0; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.pf-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.pf-scroll::-webkit-scrollbar-thumb { background: rgba(12,26,46,.18); border-radius: 8px; }

@keyframes pf-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes pf-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pf-fade { animation: pf-fade var(--dur-slow) var(--ease-out); }

/* ---------- layout ---------- */
.pf-container { max-width: var(--container-max); margin: 0 auto; padding: 0 28px; }
.pf-wrap-1100 { max-width: 1100px; margin: 0 auto; }
.pf-wrap-1000 { max-width: 1000px; margin: 0 auto; }
.pf-wrap-prose { max-width: var(--container-prose); margin: 0 auto; }
.pf-page { max-width: var(--container-max); margin: 0 auto; padding: 52px 28px 72px; }
.pf-section { padding: 84px 28px; }
.pf-section--inset { background: var(--bg-inset); border-top: 1px solid var(--border-subtle); }
.pf-section--tight { padding: 60px 28px; }

main { display: block; }

/* ---------- typography helpers ---------- */
.pf-display { font-family: var(--font-display); font-weight: var(--w-semibold); color: var(--text-strong); letter-spacing: -.015em; line-height: var(--lh-heading); }
.pf-h1 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h1); color: var(--text-strong); letter-spacing: -.02em; }
.pf-h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-display-m); color: var(--text-strong); letter-spacing: -.015em; }
.pf-h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); color: var(--text-strong); }
.pf-lead { font-family: var(--font-sans); font-size: var(--fs-lead); line-height: 1.62; color: var(--text-muted); }
.pf-mono { font-family: var(--font-mono); font-weight: var(--w-medium); font-feature-settings: 'tnum' 1; }
.pf-muted { color: var(--text-muted); }
.pf-faint { color: var(--text-faint); }
.pf-strong { color: var(--text-strong); }
.pf-center { text-align: center; }

/* ---------- eyebrow ---------- */
.pf-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 700; font-size: 12px;
  /* --text-gold, а не --accent: базовый eyebrow всегда лежит на светлом фоне
     (на тёмном его перекрывают --ondark и .pf-hero ниже). */
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-gold);
}
.pf-eyebrow::before { content: ""; width: 24px; height: 1.5px; background: currentColor; opacity: .6; }
.pf-eyebrow--ondark { color: var(--gold-400); }
.pf-eyebrow--center { justify-content: center; }

/* ---------- buttons ---------- */
.pf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  white-space: nowrap; height: 46px; padding: 0 22px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  letter-spacing: .01em; line-height: 1; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: filter var(--dur-base), transform var(--dur-fast), box-shadow var(--dur-base);
}
.pf-btn:hover { filter: brightness(.94); }
.pf-btn:active { transform: translateY(1px); }
.pf-btn--lg { height: 54px; padding: 0 28px; font-size: 16px; }
.pf-btn--sm { height: 38px; padding: 0 14px; font-size: 13px; }
.pf-btn--full { width: 100%; }
.pf-btn[disabled], .pf-btn.is-disabled { opacity: .5; pointer-events: none; }
.pf-btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-sm); }
.pf-btn--gold { background: var(--accent); color: var(--text-on-gold); border-color: var(--accent); box-shadow: var(--shadow-gold); }
.pf-btn--secondary { background: transparent; color: var(--brand); border: 1.5px solid var(--border-default); }
.pf-btn--ghost { background: transparent; color: var(--brand); border-color: transparent; }
.pf-btn--danger { background: transparent; color: var(--danger-600); border: 1.5px solid var(--danger-500); }
.pf-btn--ondark { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.pf-btn .pf-i { width: 18px; height: 18px; }

/* ---------- icon wrapper (lucide) ---------- */
.pf-i { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pf-i svg { width: 100%; height: 100%; }

/* ---------- avatar ---------- */
.pf-avatar {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--navy-700); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  text-transform: uppercase;
}
.pf-avatar--sm { width: 30px; height: 30px; font-size: 12px; }
.pf-avatar--xs { width: 26px; height: 26px; font-size: 11px; }
.pf-avatar--lg { width: 96px; height: 96px; font-size: 38px; }
.pf-avatar--ring { box-shadow: 0 0 0 3px var(--gold-300); }

/* ---------- stars ---------- */
.pf-stars { color: var(--gold-500); font-size: 14px; letter-spacing: .06em; line-height: 1; white-space: nowrap; }
.pf-stars .pf-stars-empty { color: var(--stone-300); }

/* ---------- tag / chip ---------- */
.pf-tag {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  font-family: var(--font-sans); font-weight: 600; font-size: 12px; letter-spacing: .01em;
  background: var(--navy-50); color: var(--navy-700);
}
.pf-tag--on { background: var(--navy-500); color: #fff; }

/* ---------- status badge ---------- */
.pf-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-family: var(--font-sans); font-weight: 700; font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase;
}
.pf-status::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pf-status--new        { background: var(--gold-50);    color: var(--gold-700); }
.pf-status--in_progress{ background: var(--navy-50);    color: var(--navy-700); }
.pf-status--completed  { background: var(--success-50); color: var(--success-600); }
.pf-status--cancelled  { background: var(--sand-100);   color: var(--slate-600); }

/* ---------- cards ---------- */
.pf-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 24px;
}
.pf-card--flush { padding: 0; overflow: hidden; }
.pf-card--accent-top { border-top: 3px solid var(--accent); }
.pf-lift { transition: transform var(--dur-base), box-shadow var(--dur-base); }
.pf-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ---------- forms ---------- */
.pf-field { display: flex; flex-direction: column; gap: 7px; }
.pf-label { font-family: var(--font-sans); font-weight: 600; font-size: 13.5px; color: var(--text-strong); }
.pf-input, .pf-textarea, .pf-select {
  width: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--text-strong);
  background: var(--white); border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  padding: 0 14px; height: 48px; box-shadow: var(--shadow-inset);
  transition: border-color var(--dur-base), box-shadow var(--dur-base); outline: none;
}
.pf-textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.pf-select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.pf-input:focus, .pf-textarea:focus, .pf-select:focus { border-color: var(--focus-ring); box-shadow: var(--ring); }
.pf-input::placeholder, .pf-textarea::placeholder { color: var(--text-faint); }
.pf-input.is-error, .pf-textarea.is-error { border-color: var(--danger-500); }
.pf-hint { font-family: var(--font-sans); font-size: 12.5px; color: var(--text-muted); }
.pf-error { font-family: var(--font-sans); font-size: 12.5px; color: var(--danger-600); }

/* ---------- alert ---------- */
.pf-alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px;
  border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
  border: 1px solid transparent;
}
.pf-alert--info    { background: var(--navy-50);    color: var(--navy-700);    border-color: var(--navy-100); }
.pf-alert--success { background: var(--success-50); color: var(--success-600); border-color: #bfe3cd; }
.pf-alert--danger  { background: var(--danger-50);  color: var(--danger-600);  border-color: #f2c9c1; }
.pf-alert--warn    { background: var(--gold-50);    color: var(--gold-700);    border-color: var(--gold-100); }

/* ---------- skeleton ---------- */
.pf-skel {
  background: linear-gradient(90deg, var(--sand-100) 0px, #fff 200px, var(--sand-100) 400px);
  background-size: 800px 100%; animation: pf-shimmer 1.4s infinite linear; border-radius: var(--radius-sm);
}

/* ---------- grids ---------- */
.pf-grid { display: grid; gap: 18px; }
.pf-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pf-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pf-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   HEADER
   ============================================================ */
.pf-header {
  position: sticky; top: 0; z-index: 30;
  /* Opaque: a translucent sticky header let dark footer content (the logo)
     bleed through as a "ghost" over the footer tagline on the short mobile page.
     On light page content this is visually identical to the former .92 alpha. */
  background: rgb(250,248,243); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.pf-header-inner {
  display: flex; align-items: center; gap: 30px;
  max-width: var(--container-max); margin: 0 auto; padding: 0 28px; height: var(--header-height);
}
.pf-logo { display: flex; align-items: center; gap: 11px; background: none; border: none; cursor: pointer; padding: 0; text-decoration: none; }
.pf-logo-mark {
  display: inline-flex; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #0C1A2E, #18345A);
  align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
}
.pf-logo-mark span {
  background: linear-gradient(135deg, #E6C57E, #C18A2B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pf-logo-word { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--text-strong); letter-spacing: -.01em; }
.pf-nav { display: flex; align-items: center; gap: 26px; }
.pf-nav a {
  background: none; border: none; cursor: pointer; padding: 8px 2px; text-decoration: none;
  font-family: var(--font-sans); font-weight: 600; font-size: 14.5px; color: var(--slate-600);
  border-bottom: 2px solid transparent; transition: color var(--dur-fast);
}
.pf-nav a:hover { color: var(--brand); }
.pf-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.pf-header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pf-lang-desktop { display: inline-flex; gap: 6px; }
.pf-lang {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px;
  border-radius: 8px; border: 1px solid var(--border-subtle); background: var(--white); cursor: pointer;
  font-family: var(--font-sans); font-weight: 600; font-size: 13px; color: var(--slate-600); text-decoration: none;
}
.pf-lang.active { color: var(--brand); border-color: var(--navy-200); background: var(--navy-50); }
.pf-profile-pill {
  display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 12px; border-radius: 999px;
  border: 1px solid var(--border-subtle); background: var(--white); cursor: pointer; text-decoration: none;
  font-family: var(--font-sans); font-weight: 600; font-size: 13.5px; color: var(--text-strong);
}
.pf-bell {
  position: relative; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border-subtle); background: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--navy-700); text-decoration: none;
}
.pf-bell-dot {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--danger-500); color: #fff;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--paper);
}

/* ============================================================
   FOOTER
   ============================================================ */
.pf-footer { background: var(--ink-950); color: var(--text-on-dark); padding: 54px 28px 30px; }
.pf-footer-grid { max-width: var(--container-max); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.pf-footer-col-title { font-family: var(--font-sans); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-on-dark-muted); margin-bottom: 14px; }
.pf-footer-links { display: flex; flex-direction: column; gap: 9px; }
.pf-footer-links a { font-family: var(--font-sans); font-size: 14px; color: var(--text-on-dark); text-decoration: none; opacity: .85; }
.pf-footer-links a:hover { opacity: 1; color: #fff; }
.pf-footer-blurb { font-family: var(--font-sans); font-size: 14px; line-height: 1.6; color: var(--text-on-dark-muted); max-width: 300px; margin: 0; }
.pf-footer-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.pf-footer-bottom {
  max-width: var(--container-max); margin: 40px auto 0; padding-top: 22px;
  border-top: 1px solid var(--border-ondark);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
  font-family: var(--font-sans); font-size: 12.5px; color: var(--text-on-dark-muted);
}

/* ============================================================
   BOTTOM NAV (mobile, logged-in)
   ============================================================ */
.pf-bottomnav { display: none; }

/* ============================================================
   THEME TOGGLE (floating action button, injected by main.js as
   button.theme-toggle). Its styling formerly lived in main.css, which is
   no longer linked, so the button rendered as a tiny unstyled control pinned
   to the bottom-left / clipped by the edge. Restore it as a rounded floating
   button anchored fully inside the viewport (right/bottom insets).
   ============================================================ */
/* ⚠️ Правый нижний угол делят ДВА плавающих элемента: этот переключатель и
   кнопка «Что-то не работает?» (#fb-root, right:14px/bottom:14px, высота ~34px,
   z-index 2147483000). Раньше оба стояли на bottom:14–16px — виджет обратной
   связи ложился поверх и переключатель было не нажать. Переключатель поднят
   НАД кнопкой фидбэка: 14 (её отступ) + 34 (её высота) + 10 (зазор) = 58px. */
.theme-toggle {
  position: fixed; right: 16px; bottom: 58px; z-index: 45;
  width: 48px; height: 48px; padding: 0; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; cursor: pointer;
  background: linear-gradient(135deg, #18345A, #0C1A2E); color: #fff;
  box-shadow: 0 4px 18px rgba(12,26,46,.35);
  transition: transform var(--dur-fast, .15s) ease;
}
.theme-toggle:hover, .theme-toggle:focus-visible { transform: scale(1.06); outline: none; }
.theme-toggle:active { transform: scale(.96); }

/* ============================================================
   FAMILY band
   ============================================================ */
.pf-family-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 22px; }
.pf-family-links a {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px; background: var(--white);
  border: 1px solid var(--border-subtle); border-radius: 999px;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px; color: var(--navy-700); text-decoration: none;
}
.pf-family-links .pf-family-host { font-family: var(--font-mono); color: var(--text-faint); font-size: 13px; }

/* ============================================================
   HERO + landing pieces
   ============================================================ */
.pf-hero { background: var(--surface-hero); color: var(--text-on-dark); border-bottom: 1px solid var(--border-subtle); padding: 88px 28px 92px; }
.pf-hero-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.22fr .78fr; gap: 52px; align-items: center; }
.pf-hero h1 { font-family: var(--font-display); font-weight: 600; font-size: 46px; line-height: 1.13; letter-spacing: -.02em; color: #fff; margin: 18px 0 24px; }
.pf-hero p { font-family: var(--font-sans); font-size: 19px; line-height: 1.62; color: var(--text-on-dark-muted); max-width: 520px; margin: 0 0 26px; }
.pf-hero .pf-eyebrow { color: var(--gold-400); }
.pf-hero-stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.pf-hero-stat-num { font-family: var(--font-mono); font-weight: 600; font-size: 26px; color: #fff; }
.pf-hero-stat-num.is-gold { color: var(--gold-300); }
.pf-hero-stat-label { font-family: var(--font-sans); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-dark-muted); margin-top: 4px; }

.pf-trust { background: var(--white); border-bottom: 1px solid var(--border-subtle); padding: 34px 28px; }
.pf-trust-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pf-trust-num { font-family: var(--font-mono); font-weight: 600; font-size: 30px; color: var(--navy-600); }
.pf-trust-label { font-family: var(--font-sans); font-size: 12.5px; letter-spacing: .03em; color: var(--text-muted); margin-top: 5px; }

.pf-step-num { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.pf-icon-box { width: 46px; height: 46px; border-radius: 11px; background: var(--navy-50); color: var(--navy-600); display: flex; align-items: center; justify-content: center; }
.pf-icon-box--lg { width: 54px; height: 54px; border-radius: 13px; }

.pf-quote { font-family: var(--font-display); font-size: 17px; line-height: 1.55; color: var(--text-strong); margin: 0; font-weight: 400; }

/* FAQ */
.pf-faq-item { background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; }
.pf-faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; padding: 18px 20px; background: none; border: none; cursor: pointer; font-family: var(--font-sans); font-weight: 600; font-size: 16px; color: var(--text-strong); }
.pf-faq-q .pf-i { color: var(--navy-500); transition: transform var(--dur-base); }
.pf-faq-item.is-open .pf-faq-q .pf-i { transform: rotate(180deg); }
.pf-faq-a { padding: 0 20px 18px; font-family: var(--font-sans); font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }
.pf-faq-item:not(.is-open) .pf-faq-a { display: none; }

/* ============================================================
   Cabinet helpers (PageHead, StatTile, CabCard)
   ============================================================ */
.pf-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.pf-pagehead h1 { font-family: var(--font-display); font-weight: 600; font-size: 32px; letter-spacing: -.015em; color: var(--text-strong); margin: 10px 0 0; }
.pf-stat-tile { background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.pf-stat-tile .num { font-family: var(--font-mono); font-weight: 600; font-size: 28px; color: var(--navy-700); }
.pf-stat-tile .lbl { font-family: var(--font-sans); font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.pf-cab-card { background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.pf-cab-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--border-subtle); }
.pf-cab-card-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text-strong); }
.pf-cab-card-body { padding: 22px; }

/* divider */
.pf-rule { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }

/* ============================================================
   RESPONSIVE — mobile
   ============================================================ */
@media (max-width: 860px) {
  .pf-container, .pf-header-inner { padding: 0 16px; }
  .pf-page { padding: 24px 16px 96px; }
  .pf-section, .pf-section--tight { padding: 44px 16px; }

  /* header: hide desktop nav, show compact */
  .pf-nav { display: none; }
  .pf-header-inner { gap: 0; height: 64px; justify-content: space-between; }
  .pf-lang-desktop { display: none; }

  .pf-hero { padding: 40px 18px 46px; }
  .pf-hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .pf-hero h1 { font-size: 33px; margin: 14px 0 18px; }
  .pf-hero p { font-size: 16px; }
  .pf-hero-stats { gap: 18px; margin-top: 28px; }
  .pf-hero-stat-num { font-size: 20px; }

  .pf-trust-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .pf-trust-num { font-size: 22px; }
  .pf-trust { padding: 26px 16px; }

  .pf-grid-2, .pf-grid-3, .pf-grid-4 { grid-template-columns: 1fr; }

  .pf-h2 { font-size: 27px; }
  .pf-h1 { font-size: 28px; }

  .pf-footer-grid { grid-template-columns: 1fr; gap: 30px; }

  /* On mobile the footer links ARE the primary navigation menu (the desktop
     .pf-nav is hidden), so give them ≥44px tap targets. */
  .pf-footer-links { gap: 2px; }
  .pf-footer-links a { display: flex; align-items: center; min-height: 44px; }

  /* У авторизованных низ экрана занимает .pf-bottomnav, и туда же по умолчанию
     садятся ОБА плавающих элемента. Поднимаем их стопкой над навигацией:
     nav → кнопка фидбэка → переключатель темы.
     Измерено: .pf-bottomnav = 75px (9 + ссылка 56 + 9 + safe-area), кнопка
     фидбэка = 34px. Отсюда 86 = 75 + 11 зазор, 130 = 86 + 34 + 10.
     Селектор с .is-authed нужен, чтобы перебить стили #fb-root, которые виджет
     сам инжектит через adoptedStyleSheets (по порядку каскада они идут после
     наших таблиц, специфичностью же id+класс выигрывает). */
  body.is-authed #fb-root { bottom: calc(86px + env(safe-area-inset-bottom)); }
  body.is-authed .theme-toggle { bottom: calc(130px + env(safe-area-inset-bottom)); }

  /* bottom nav for logged-in users only */
  body.is-authed .pf-bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    justify-content: space-around; padding: 9px 6px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--border-subtle);
  }
  /* фактическая высота .pf-bottomnav — 75px, при 64px хвост страницы уходил под неё */
  body.is-authed { padding-bottom: calc(75px + env(safe-area-inset-bottom)); }
  .pf-bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; cursor: pointer; padding: 6px 0; text-decoration: none; color: var(--slate-500);
    font-family: var(--font-sans); font-weight: 600; font-size: 10.5px;
  }
  .pf-bottomnav a.active { color: var(--brand); }
}

@media (min-width: 861px) {
  .pf-only-mobile { display: none !important; }
}

@media (max-width: 860px) {
  .pf-only-mobile-hide { display: none !important; }
  .pf-featured-banner { grid-template-columns: 1fr !important; gap: 20px !important; padding: 26px 20px !important; text-align: left; }
  .pf-featured-banner .pf-btn { width: 100%; }
}
