/**
 * KalkPlace — базовый UI-kit платных калькуляторов (фаза 2)
 * Токены, шапка, демо-бар, каркас страницы.
 */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #151c28;
  --surface: #243044;
  --surface-soft: #2c3a50;
  --surface2: #35455c;
  --text: #f5f7fa;
  --text-muted: #c5d0dc;
  --subtle: #9aabbd;
  --border: #4a5f78;
  --border2: #5a7290;
  --border-strong: #455a72;
  --brand: #c9a227;
  --brand-hover: #a88720;
  --accent: var(--brand);
  --accent-dim: rgba(201, 162, 39, 0.12);
  --accent-glow: rgba(201, 162, 39, 0.22);
  --green: #2dd4a3;
  --green-dim: rgba(45, 212, 163, 0.1);
  --warn: #f0a050;
  --error: #ef7070;
  --ok: #2dd4a3;
  --cyan: #5ec9e8;
  --radius-sm: 9px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.38);
  --font-main: "Manrope", system-ui, sans-serif;
  --font-display: var(--font-main);
  --font-body: var(--font-main);
  --font-mono: var(--font-main);
  --shell-max: 1100px;
  --ai-neutral-bg: #1a2332;
  --ai-neutral-border: rgba(201, 162, 39, 0.28);
  --ai-neutral-head: #f5f7fa;
  --ai-neutral-title: #f5f7fa;
  --ai-neutral-subtitle: #c5d0dc;
  --ai-neutral-text: #a8b4c4;
  --ai-neutral-strong: #fff;
  --ai-neutral-note: #6d8098;
  --ai-neutral-cta: #e8c96a;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--brand-hover); }

/* ── Site header ── */
.kp-site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(16, 22, 30, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.kp-site-header .kp-shell-wrap {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}
.kp-site-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.kp-site-header .logo:hover { text-decoration: none; }
.kp-site-header .logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.kp-site-header .logo-mark span {
  border-radius: 3px;
  background: var(--subtle);
}
.kp-site-header .logo-mark span:nth-child(5) { background: var(--brand); }
.kp-site-header .logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}
.kp-site-header .logo-text em { color: var(--brand); font-style: normal; }
.kp-site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.kp-site-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.38rem 0.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.kp-site-nav a:hover {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}
.kp-site-nav a.is-active { color: var(--brand); background: var(--accent-dim); }
.kp-site-nav .kp-nav-cta {
  background: var(--brand);
  color: #110e00;
  font-weight: 800;
  margin-left: 0.25rem;
}
.kp-site-nav .kp-nav-cta:hover {
  filter: brightness(1.08);
  color: #110e00;
}
@media (max-width: 720px) {
  .kp-site-nav a:not(.kp-nav-cta) { display: none; }
}

body.lk-hide-kp-chrome .kp-site-header { display: none; }

/* ── Demo bar ── */
.kp-demo-bar {
  max-width: 1400px;
  margin: 0.75rem auto 0;
  padding: 0 1.25rem;
}
.kp-demo-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.82rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.kp-demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: var(--accent-dim);
  color: var(--text);
  border-radius: 999px;
  padding: 0.22rem 0.56rem;
  font-weight: 700;
  white-space: nowrap;
}
.kp-demo-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.kp-demo-link:hover { color: var(--brand-hover); text-decoration: underline; }
.kp-demo-skin-hint { font-size: 0.72rem; opacity: 0.85; margin-left: 0.35rem; }
.kp-demo-skin-hint a { color: inherit; text-decoration: underline; }
@media (max-width: 780px) {
  .kp-demo-bar-inner { flex-direction: column; align-items: flex-start; }
}

img[data-lk-logo] { max-height: 40px; margin-bottom: 0.65rem; }
img[data-lk-logo][hidden] { display: none !important; }

/* ── Page layout ── */
.calc-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.25rem;
}

.calc-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.calc-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.calc-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  border-left: 2px solid var(--brand);
  padding-left: 1rem;
  margin: 0 auto;
  max-width: 620px;
  text-align: left;
  line-height: 1.62;
}

.demo-includes {
  margin: 0 auto 1.5rem;
  max-width: 980px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

.demo-includes-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.demo-includes-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 2rem;
  align-items: start;
  justify-content: center;
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.kp-sticky-cta {
  position: fixed;
  left: 0.8rem;
  right: 0.8rem;
  bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.36);
  background: var(--brand);
  color: #110e00;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
}

@media (max-width: 860px) {
  body { padding-bottom: 84px; }
  .kp-sticky-cta { display: inline-flex; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
