/* TailRetail — основные стили */
@font-face {
  font-family: Onest;
  src: url("/assets/fonts/onest.woff2") format("woff2"), url("/assets/fonts/onest.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f6f7f5;
  --bg-card: #ffffff;
  --bg-secondary: #eef1ee;
  --text: #14201b;
  --text-secondary: #5b6762;
  --text-muted: #5b6762;
  --accent: #3e6248;
  --accent-hover: #314e3a;
  --success: #3e6248;
  --dark: #14201b;
  --border: #dde2de;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(20, 32, 27, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; overflow-x: clip; }

body {
  font-family: Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100%;
}
body > .header { flex-shrink: 0; }
body > .container { flex: 1 0 auto; }
body > .footer { flex-shrink: 0; margin-top: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Header — жёсткая фиксация */
.header {
  background: var(--bg);
  color: var(--text);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 80px;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: nowrap;
  min-height: 80px;
}
.logo {
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
}
.logo .logo-name {
  display: block;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}
.logo .logo-tagline { display: none; }
.promo-pitch { text-align: center; margin: 10px auto 14px; max-width: 520px; }
.promo-pitch p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-secondary); }
.promo-pitch p:first-child { color: var(--text); font-weight: 650; margin-bottom: 6px; }
.nav-toggle { display: none; }
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 14px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--nav-w, auto);
  width: var(--nav-w, auto);
  box-sizing: border-box;
  color: var(--text-secondary) !important;
  opacity: 1;
  white-space: nowrap;
  font-weight: 600 !important;
  font-synthesis: none;
  font-size: 14px;
  line-height: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  box-shadow: inset 0 -2px 0 transparent;
  text-decoration: none !important;
  letter-spacing: 0 !important;
  transform: none !important;
}
.nav a:hover,
.nav a.nav-active {
  opacity: 1;
  color: var(--text) !important;
  font-weight: 600 !important;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}
.btn-header {
  padding: 8px 14px !important;
  font-size: 13px !important;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.35;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); color: white; }
.btn-dark {
  background: #2C2118;
  color: #F7F3EB;
}
.btn-dark:hover { background: #1a1410; color: #F7F3EB; }
.home-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.header .btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.header .btn-outline:hover {
  background: var(--bg-secondary);
  color: var(--text);
  border-color: var(--border);
}
.btn-block { display: block; width: 100%; padding: 14px; font-size: 15px; }

/* Hero */
.hero {
  padding: 64px 0 72px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(247,243,235,.82) 0%, rgba(247,243,235,.62) 42%, rgba(247,243,235,.78) 100%),
    url('/assets/img/hero-bg.png') center bottom / cover no-repeat;
}
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 24px;
}

.search-box {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto 12px;
  box-shadow: var(--shadow);
}
.search-box input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--bg);
}
.search-box .btn { white-space: nowrap; }

.proof { font-size: 13px; color: var(--text-muted); }

/* Sections */
.section { padding: 36px 0; }
.section-title {
  font-size: 20px;
  font-weight: 650;
  margin-bottom: 18px;
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.grid > a.card,
.prem-grid > a.card,
.mall-grid > a.card,
.home-grid > a.card {
  transition: box-shadow .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .grid > a.card:hover,
  .prem-grid > a.card:hover,
  .mall-grid > a.card:hover,
  .home-grid > a.card:hover {
    box-shadow: 0 4px 16px rgba(40, 48, 40, .10);
  }
}
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card .meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.card .status { font-size: 12px; color: var(--success); margin-bottom: 12px; }

/* Footer */
.footer {
  background: var(--bg);
  color: var(--text-muted);
  padding: 32px 0 24px;
  margin-top: 40px;
  font-size: 14px;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--text-muted); margin-right: 16px; }
.footer a:hover { color: var(--text); }
.footer .copy { margin-top: 16px; opacity: 1; }

/* Forms */
.form-card {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 0 auto;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 5px;
  margin-top: 14px;
}
label:first-child { margin-top: 0; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"], input[type="radio"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

@media (max-width: 900px) {
  .nav a { font-size: 13px; }
  .logo { min-width: 120px; }
  .logo .logo-name { font-size: 16px; }
}
@media (max-width: 1100px) {
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    max-width: 100%;
  }
  .hero h1 { font-size: 24px; }
  .search-box { flex-direction: column; }
  .header { min-height: 0; padding: 0; }
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    min-height: 52px;
    padding-top: 8px;
    padding-bottom: 8px;
    min-width: 0;
    max-width: 100%;
  }
  .logo { order: 1; min-width: 0; max-width: none; display: flex; align-items: center; }
  .logo .logo-tagline { display: none; }
  .header-actions { order: 2; margin-left: auto; gap: 6px; align-items: center; }
  .btn-header { padding: 7px 10px !important; font-size: 13px !important; }
  .nav-toggle {
    display: flex;
    order: 3;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }
  .nav-toggle::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--text);
    border-bottom: 1.5px solid var(--text);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .3s ease;
  }
  .header.nav-open .nav-toggle::after { transform: rotate(225deg) translateY(-1px); }
  .nav {
    order: 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    column-gap: 14px;
    row-gap: 10px;
    padding: 0;
    transition: max-height .35s ease, opacity .3s ease, padding .35s ease;
  }
  .header.nav-open .nav {
    max-height: 140px;
    opacity: 1;
    padding: 8px 2px 12px;
  }
  .nav a {
    grid-column: span 2;
    flex: none !important;
    width: auto !important;
    min-height: 32px;
    height: auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.15;
    font-size: 13px;
    padding: 4px 2px;
  }
  .nav a:nth-child(4) { grid-column: 2 / span 2; }
  .nav a:nth-child(5) { grid-column: 4 / span 2; }
  .section { padding-left: 0; padding-right: 0; }
  .grid, .prem-grid, .home-grid { gap: 12px; }
  img, video, svg { max-width: 100%; }
}
@media (max-width: 420px) {
  .container {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .hero { padding: 36px 0 32px; }
  .hero h1 { font-size: 21px; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 16px; }
  .hero-stats strong { font-size: 19px; }
  .btn-block { padding: 13px; }
}

#tr-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  max-width: min(440px, calc(100% - 32px));
  background: #2C2118;
  color: #F7F3EB;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  z-index: 10050;
  box-shadow: 0 10px 32px rgba(44,33,24,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
#tr-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.fmt-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
  max-width: 100%;
}
.fmt-badge.tone-orange { background: #F4E1D2; color: #9A4A1A; }
.fmt-badge.tone-blue { background: #D9E4F2; color: #2B4C7E; }
.fmt-badge.tone-lilac { background: #E6DDF0; color: #5C3D7A; }

.fill-toast {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: min(280px, calc(100vw - 32px));
  background: rgba(44, 33, 24, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid #E07A3D;
  color: #fff;
  border-radius: 12px;
  padding: 16px 18px 14px;
  z-index: 9000;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(44,33,24,.28);
  animation: fill-in .4s ease;
}
@keyframes fill-in {
  from { opacity: 0; transform: translate(-16px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}
.fill-toast-kicker {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 4px;
}
.fill-toast-pct {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: #fff;
}
.fill-toast p { margin: 0 0 6px; color: #fff; }
.fill-toast-x {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: .7;
}
@media (max-width: 900px) {
  .fill-toast {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: auto;
    margin: 0 0 16px;
    animation: fill-in-m .35s ease;
  }
  @keyframes fill-in-m {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
  }
}

.ai-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 16px;
  box-shadow: var(--shadow);
}
.ai-panel.is-ok { border-color: #c5d6b8; background: #f7faf5; }
.ai-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.ai-panel-head strong { font-size: 14px; }
.ai-panel-note { font-size: 12px; color: var(--text-secondary); margin: 0 0 12px; line-height: 1.45; }
.ai-bar { margin-bottom: 8px; }
.ai-bar-lab { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.ai-bar-track { height: 6px; background: var(--bg-secondary); border-radius: 99px; overflow: hidden; }
.ai-bar-track i { display: block; height: 100%; border-radius: 99px; }
.ai-strength { font-size: 13px; margin: 10px 0 0; color: var(--text); }

.launch-note, .tg-nudge {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 80;
  display: flex;
  align-items: center;
  min-height: 52px;
  height: 52px;
  margin: 0;
  box-sizing: border-box;
  animation: nudge-in .4s ease;
}
.launch-note {
  transform: translateX(-50%);
  gap: 10px;
  width: min(640px, calc(100% - 20px));
  padding: 0 32px 0 14px;
  background: #fff;
  border: 1px solid #E7D3C4;
  border-left: 3px solid #E07A3D;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(44, 33, 24, .12);
}
.launch-note .launch-msg, .tg-nudge span {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  max-height: 2.5em;
  white-space: normal;
  overflow: hidden;
}
.launch-note .launch-msg { color: var(--text); }
.launch-note .launch-left {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap;
}
.launch-note[hidden] { display: none !important; }
.launch-short { display: none; }
@media (max-width: 1100px) {
  .launch-full { display: none; }
  .launch-short { display: block; }
}
.tg-nudge {
  transform: translateX(-50%);
  gap: 10px;
  width: min(640px, calc(100% - 20px));
  padding: 0 32px 0 14px;
  background: rgba(44, 33, 24, .92);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(44, 33, 24, .28);
}
.tg-nudge .tg-go {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0;
  background: #fff;
  color: #2c2118;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}
.tg-nudge.is-light {
  background: #fff;
  color: #2c2118;
  border: 1px solid #E7D3C4;
  box-shadow: 0 10px 28px rgba(44, 33, 24, .12);
}
.tg-nudge.is-light span { color: #2c2118; }
.tg-nudge.is-light .tg-go { background: #2c2118; color: #fff; }
.tg-nudge.is-light .nudge-x { color: #8a7568; }
.nudge-x {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 52px;
  border: 0;
  background: none;
  padding: 0;
  font-size: 16px;
  line-height: 52px;
  cursor: pointer;
  color: #8a7568;
}
.tg-nudge .nudge-x { color: #fff; }
@keyframes nudge-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 640px) {
  .launch-note, .tg-nudge, .cookie-card { width: calc(100% - 20px); }
}

.cookie-card {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(640px, calc(100% - 20px));
  height: 52px;
  min-height: 52px;
  margin: 0;
  padding: 0 12px 0 14px;
  box-sizing: border-box;
  background: #fff;
  color: #14201b;
  border: 1px solid #dde2de;
  border-left: 3px solid #3e6248;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(20, 32, 27, .08);
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.cookie-card.is-in { transform: translate(-50%, 0); opacity: 1; }
.cookie-card p {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cookie-card a { color: #3e6248; text-decoration: underline; }
.cookie-card button {
  flex: 0 0 auto;
  border: 0;
  background: #3e6248;
  color: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.cookie-card[hidden] { display: none !important; }


/* Readability, keyboard access and small screens. */
body { font-size:16px; }
button, input, select, textarea { font-family:inherit; }
button, .btn { min-height:44px; }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.form-error { color:#852b2b; background:#fff0ef; padding:16px; border-radius:10px; margin:12px 0; }
.meta, .prem-card .meta, .net-card .area { font-size:14px; }
.section-title { font-size:clamp(24px,3vw,32px); line-height:1.2; }
.link-button { font:inherit; background:none; border:0; padding:0; color:inherit; text-decoration:underline; cursor:pointer; }
.cookie-card { height:auto; min-height:76px; padding:14px; z-index:1200; }
.cookie-card p { display:block; overflow:visible; font-size:14px; line-height:1.45; }
.cookie-actions { display:flex; flex-wrap:wrap; gap:6px; }
#cookie-decline { color:var(--accent); background:var(--bg-secondary); }
.cookie-open .mobile-cta, .cookie-open .sticky-cta, .cookie-open .place-sticky { visibility:hidden; }
@media (max-width:640px) {
  .cookie-card { flex-direction:column; align-items:stretch; bottom:8px; }
  .cookie-actions { justify-content:flex-start; }
  input, select, textarea { font-size:16px; }
  .header-inner { gap:12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
