:root {
  --navy: #0b2a5b;
  --navy-deep: #071e44;
  --navy-soft: #14356e;
  --orange: #ff6b1a;
  --orange-hover: #e85a0c;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #12233f;
  --muted: #66758c;
  --line: #e4e9f2;
  --ok: #1f8a5b;
  --danger: #d64545;
  --shadow: 0 12px 32px rgba(11, 42, 91, .08);
  --radius: 16px;
  --sidebar: 252px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.saas-body,
body.saas-app,
body.analiz-page {
  margin: 0;
  font-family: "Manrope", "Nunito", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; }
.saas-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.saas-logo {
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 20px;
  text-decoration: none;
  color: var(--navy);
}
.saas-sidebar .saas-logo { color: #fff; padding: 6px 10px 18px; display: block; }
.saas-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.saas-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.saas-links a.is-active,
.saas-links a:hover { color: var(--navy); }
.saas-cta {
  background: var(--orange) !important;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}
.saas-cta:hover { background: var(--orange-hover) !important; }
.hero {
  padding: 72px 28px 40px;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: 46px;
  line-height: 1.08;
  margin: 0 0 16px;
  color: var(--navy);
  letter-spacing: -.03em;
}
.hero p.lead,
.lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 24px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-main, .btn-ghost, .btn-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
}
.btn-main, .btn-pay { background: var(--orange); color: #fff; }
.btn-main:hover, .btn-pay:hover { background: var(--orange-hover); }
.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-pay { width: 100%; }
.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.hero-card li {
  list-style: none;
  margin: 0 0 14px;
  color: var(--muted);
  padding-left: 28px;
  position: relative;
}
.hero-card li:before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  position: absolute;
  left: 0;
  top: 4px;
}
.hero-card ul { margin: 0; padding: 0; }
.hero-card strong { color: var(--navy); }
.compare-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.compare-col {
  background: var(--bg);
  border-radius: 14px;
  padding: 14px;
}
.compare-col b { display: block; margin-bottom: 8px; color: var(--navy); }
.compare-col span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.compare-col.is-top { background: #fff4ed; }
.section { max-width: 1120px; margin: 0 auto; padding: 28px; }
.section h2 { font-size: 32px; margin: 0 0 18px; color: var(--navy); }
.grid3, .grid2 { display: grid; gap: 16px; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid2 { grid-template-columns: 1fr 1fr; }
.cardx {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 20px rgba(11, 42, 91, .04);
}
.cardx h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.cardx p { margin: 0; color: var(--muted); line-height: 1.5; }
.price { font-size: 48px; font-weight: 800; margin: 4px 0 8px; color: var(--navy); }
.price span { font-size: 18px; font-weight: 700; color: var(--orange); }
.muted { color: var(--muted); }
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(800px 400px at 10% -10%, rgba(255,107,26,.12), transparent 50%),
    radial-gradient(700px 360px at 110% 10%, rgba(11,42,91,.08), transparent 45%),
    var(--bg);
}
.auth-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-box h1 { margin: 8px 0; font-size: 28px; color: var(--navy); }
.auth-box label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-box input, .saas-field {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
}
.auth-box input:focus, .saas-field:focus {
  outline: 0;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11,42,91,.12);
}
.err, .ok, .saas-alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0 0 14px;
}
.err { background: #fdecec; color: var(--danger); }
.ok { background: #e8f7ef; color: var(--ok); }
.saas-alert-warn { background: #fff4ed; color: #9a3d00; }
.faq details { margin: 0 0 10px; background: #fff; border-radius: 12px; padding: 12px 16px; border: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.saas-foot { padding: 28px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); margin-top: 40px; }

.saas-menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.saas-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 30, 68, .4);
  z-index: 35;
}
.saas-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar);
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  overflow: auto;
}
.saas-side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.saas-side-nav a,
.saas-side-foot a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255,255,255,.78);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}
.saas-side-nav a:hover,
.saas-side-foot a:hover,
.saas-side-nav a.is-active,
.saas-side-toc a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.saas-side-nav a.is-active {
  background: var(--orange);
  color: #fff;
}
.saas-side-label {
  margin: 18px 12px 6px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.saas-side-toc { display: flex; flex-direction: column; gap: 2px; }
.saas-side-foot {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 14px;
  margin-top: 12px;
}
.saas-side-user { font-weight: 700; padding: 0 12px; }
.saas-side-checks { font-size: 13px; color: #ffb489; padding: 4px 12px 10px; }
body.saas-app .saas-app-main,
body.saas-app > .wrapper,
body.analiz-page > .wrapper {
  margin-left: var(--sidebar);
  min-height: 100vh;
}
body.analiz-page .wrapper {
  height: auto !important;
  overflow: visible;
}
body.analiz-page .wrapper .main-panel {
  width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  background: transparent;
}
body.analiz-page .main-panel .content {
  margin-top: 0 !important;
  padding: 20px 20px 48px;
}
.saas-app-main { padding: 28px; max-width: 860px; }
.formav1 { position: relative; }
#search_city-result {
  position: absolute;
  background: #fff;
  z-index: 9;
  padding: 8px;
  list-style: none;
  box-shadow: var(--shadow);
  display: none;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  border-radius: 12px;
  margin: 4px 0 0;
  border: 1px solid var(--line);
}
#search_city-result li a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
#search_city-result li a:hover { background: #fff4ed; }
#search_city-result li a span { font-weight: 800; color: var(--orange); }
#search_city-result li a em {
  float: right;
  font-style: normal;
  font-size: 12px;
  color: #7a8499;
}
#enter_manual_lr { display: inline-block; margin: 8px 0 12px; color: var(--navy); font-size: 13px; font-weight: 600; }
.engine-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.engine-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}
.engine-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.engine-pill span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  color: var(--navy);
  background: #fff;
}
.engine-pill input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.lr-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: #7a8499;
}
.lr-hint.is-set { color: var(--navy); }
.lr-hint strong { font-weight: 800; }
.saas-form-row { margin: 0 0 16px; }
.saas-form-row label { display: block; font-weight: 700; margin: 0 0 6px; color: var(--navy); }
.saas-loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(244,246,251,.82);
  display: grid;
  place-items: center;
}
.saas-loader span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--orange);
  animation: saas-spin .8s linear infinite;
}
@keyframes saas-spin { to { transform: rotate(360deg); } }
.quick-amt { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.quick-amt button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  font-family: inherit;
}
.quick-amt button:hover { border-color: var(--orange); color: var(--orange); }
.history-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.check-history-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.check-history-item {
  display: block;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  padding: 14px 0;
}
.check-history-item:hover { color: var(--navy); }
.check-history-item strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 4px;
}
.check-history-item span { font-size: 13px; word-break: break-all; }
.check-history-del {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #c0392b;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  padding: 6px 4px;
}
.check-history-del:hover { text-decoration: underline; }
.saas-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}
.saas-pager a,
.saas-pager span {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--navy);
  border: 1px solid var(--line);
  background: #fff;
}
.saas-pager a:hover { border-color: var(--orange); color: var(--orange); }
.saas-pager .is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.saas-pager .is-disabled {
  opacity: .4;
  pointer-events: none;
}
.check-status {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.check-status-done { background: #e8f7ee; color: #1e7a3a; }
.check-status-running { background: #fff4e5; color: #b86a00; }
.check-status-queued { background: #eef2f8; color: #3a4a6b; }
.check-status-error { background: #fdecea; color: #c0392b; }
body.analiz-page .wrapper .main-panel {
  width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  background: transparent;
}
body.analiz-page .main-header { display: none !important; }
body.analiz-page .content { padding-top: 16px; }
body.analiz-page .card {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(11,42,91,.05);
}
body.analiz-page .card-title { color: var(--navy); }
body.analiz-page .btn-primary,
body.analiz-page input[type="submit"].btn-primary {
  background: var(--orange);
  border-color: var(--orange);
}
body.analiz-page .btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.rank-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 720px;
  margin: 12px 0 8px;
}
.rank-actions-lead {
  margin: 0 0 2px;
  color: #5b6b86;
  font-size: 14px;
}
.rank-action {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--navy);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.rank-action:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 18px rgba(11,42,91,.06);
}
.rank-action:disabled {
  opacity: .72;
  cursor: wait;
}
.rank-action-step {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef2f8;
  color: var(--navy);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.rank-action-primary {
  border-color: rgba(232, 123, 32, .45);
  background: #fffaf4;
}
.rank-action-primary .rank-action-step {
  background: var(--orange);
  color: #fff;
}
.rank-action-body { flex: 1; min-width: 0; }
.rank-action-title {
  display: block;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 2px;
}
.rank-action-desc {
  display: block;
  font-size: 13px;
  color: #5b6b86;
  line-height: 1.4;
  font-weight: 500;
}
.rank-action-go {
  flex: 0 0 auto;
  align-self: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--orange);
  white-space: nowrap;
}
.rank-action:disabled .rank-action-go { visibility: hidden; }
@media (max-width: 640px) {
  .rank-action-go { display: none; }
}
.word-cell {
  margin: 0;
  word-break: break-word;
}
.word-cell-plain { display: block; }
details.word-cell > summary {
  cursor: pointer;
  list-style: none;
  display: block;
  outline: none;
}
details.word-cell > summary::-webkit-details-marker { display: none; }
details.word-cell > summary::marker { content: ""; }
details.word-cell > summary::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  color: var(--navy, #0b2a5b);
  font-size: 14px;
  line-height: 1.3;
}
details.word-cell[open] > summary::before { content: "▾"; }
body.analiz-page .table_artist th:first-child,
body.analiz-page .table_artist td:first-child {
  min-width: 320px;
  width: 340px;
  max-width: 420px;
}
body.analiz-page .table_artist td:first-child {
  overflow: visible;
  vertical-align: top;
}
.word-forms-list {
  display: none;
  flex: 1 1 100%;
  width: 100%;
  margin: 6px 0 0;
  padding: 8px 10px;
  background: #f4f6fb;
  border: 1px solid #e4e9f2;
  border-radius: 10px;
}
details.word-cell[open] .word-forms-list { display: block; }
.word-form-item {
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  margin: 0 0 6px;
}
.word-form-item:last-child { margin: 0; }
.saas-side-toc a span { line-height: 1.3; }
body.analiz-page #form_tab,
body.analiz-page #page_vs_top,
body.analiz-page #oblako_tegov,
body.analiz-page #density_top20,
body.analiz-page #screen_three,
body.analiz-page #screen_four,
body.analiz-page #meta_tags,
body.analiz-page #screen_five {
  scroll-margin-top: 18px;
}
.density-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--navy, #0b2a5b);
}
.density-leg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.density-leg:before {
  content: "";
  width: 16px;
  height: 3px;
  border-radius: 2px;
}
.density-leg-med:before { background: #0b2a5b; }
.density-leg-site:before { background: #ff6b1a; }
.density-chart-wrap {
  position: relative;
  height: 320px;
}
.analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}
.analysis-tab {
  border: 1px solid #d9e1ef;
  background: #fff;
  color: var(--navy, #0b2a5b);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.analysis-tab.is-active {
  background: var(--navy, #0b2a5b);
  color: #fff;
  border-color: var(--navy, #0b2a5b);
}
.analysis-pane { display: none; }
.analysis-pane.is-open { display: block; }
.copy_stolb {
  text-decoration: underline;
  cursor: pointer;
}
.copy_stolb:hover { text-decoration: none; }
@media (max-width: 860px) {
  .hero, .grid3, .grid2, .compare-card { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .saas-nav { flex-direction: column; align-items: flex-start; }
  .saas-menu-btn { display: inline-flex; }
  .saas-sidebar { transform: translateX(-110%); transition: transform .2s ease; }
  body.saas-nav-open .saas-sidebar { transform: none; }
  body.saas-nav-open .saas-sidebar-backdrop { display: block; }
  body.saas-app .saas-app-main,
  body.saas-app > .wrapper,
  body.analiz-page > .wrapper { margin-left: 0; }
  .saas-app-main { padding: 64px 16px 24px; }
}
