:root {
  --ink: #f3f7f5;
  --ink-2: #ffffff;
  --panel: #ffffff;
  --line: rgba(12, 48, 40, 0.12);
  --mint: #0f9f6e;
  --mint-bright: #14c489;
  --mint-dim: #0c7a55;
  --sand: #0c1e28;
  --muted: #5d7582;
  --warn: #c47f1a;
  --danger: #d64545;
  --ok: #0f9f6e;
  --surface: #e8f2ee;
  --radius: 16px;
  --max: 1120px;
  --font-display: "Syne", sans-serif;
  --font-body: "Sora", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--sand);
  background:
    radial-gradient(ellipse 55% 40% at 85% -5%, rgba(15, 159, 110, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(26, 107, 138, 0.08), transparent 50%),
    var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em;
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--sand);
}
.brand-mark {
  width: 1.35rem; height: 1.35rem; border-radius: 0.35rem;
  background: linear-gradient(135deg, var(--mint-bright), #1a6b8a);
}
.nav-meta { color: var(--muted); font-size: 0.78rem; }
.nav-actions { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; justify-content: flex-end; }
.user-badge {
  color: var(--mint-dim); font-size: 0.82rem; font-weight: 600;
  max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  border-radius: 999px; border: 1px solid transparent;
  padding: 0.65rem 1.1rem; font-weight: 600; font-size: 0.88rem;
  cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  background: transparent; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--mint); color: #fff; }
.btn-primary:hover { background: var(--mint-dim); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--sand); background: #fff; }
.btn-ghost:hover { border-color: var(--mint); color: var(--mint-dim); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.78rem; }
.btn-link {
  background: none; border: none; color: var(--mint-dim); cursor: pointer;
  font-size: 0.8rem; font-weight: 600; padding: 0;
}
.btn-link:hover { text-decoration: underline; }

.page { padding: 1.75rem 0 3rem; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.03em; margin: 0 0 0.4rem; font-weight: 700;
  color: var(--sand);
}
.page-lead { margin: 0 0 1.35rem; color: var(--muted); font-size: 0.95rem; max-width: 52ch; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 8px 28px rgba(12, 40, 32, 0.04);
}
.panel-h {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: rgba(232, 242, 238, 0.55);
}
.panel-h h2 {
  margin: 0; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.02em;
}
.panel-h p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.78rem; }
.panel-b { padding: 1.1rem 1.15rem; }
.panel-split {
  display: grid;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .panel-split { grid-template-columns: 1fr 1fr; }
  .panel-split > * + * { border-left: 1px solid var(--line); }
}
.panel-split > * + * { border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .panel-split > * + * { border-top: none; }
}
.col-head {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 159, 110, 0.08);
}
.col-head.geo { background: rgba(26, 107, 138, 0.1); }
.col-head h3 { margin: 0; font-size: 0.95rem; }
.col-head p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.75rem; }

.field-row { display: flex; flex-direction: column; gap: 0.65rem; }
@media (min-width: 640px) { .field-row { flex-direction: row; } }
.input, .select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sand);
  padding: 0.8rem 0.95rem;
}
.input:focus, .select:focus {
  outline: 2px solid rgba(15, 159, 110, 0.35);
  border-color: transparent;
}
.select { padding: 0.55rem 0.75rem; font-size: 0.82rem; width: auto; }

.stages { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin-top: 0.9rem; font-size: 0.78rem; color: var(--muted); }
.stages .on { color: var(--mint-dim); font-weight: 600; }
.stages .done { color: var(--ok); font-weight: 600; }

.status { margin-top: 0.75rem; font-size: 0.88rem; color: var(--muted); }
.status.ok { color: var(--mint-dim); }
.status.err { color: var(--danger); }
.status.warn { color: var(--warn); }

.empty {
  text-align: center; color: var(--muted); font-size: 0.9rem;
  padding: 2.5rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius);
  margin-top: 1.25rem; background: rgba(255,255,255,0.6);
}

.stats {
  display: grid; gap: 0.75rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}
@media (min-width: 560px) { .stats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 4px 16px rgba(12, 40, 32, 0.03);
}
.stat .l { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat .v { font-family: var(--font-display); font-size: 1.55rem; margin-top: 0.25rem; letter-spacing: -0.02em; color: var(--sand); }
.stat .s { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

.bar-row { margin-bottom: 0.75rem; }
.bar-meta { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.78rem; margin-bottom: 0.3rem; }
.bar-meta span:last-child { color: var(--muted); flex-shrink: 0; }
.bar-track { height: 0.45rem; background: var(--surface); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--mint); }
.bar-fill.teal { background: #14b8a6; }
.bar-fill.cyan { background: #0891b2; }

.table-wrap { overflow-x: auto; }
.table-scroll { max-height: 24rem; overflow: auto; }
.table-wrap,
.table-scroll {
  scrollbar-width: thin;
  scrollbar-color: #1f9e74 #e8eef2;
}
.table-wrap::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
.table-wrap::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track {
  background: #e8eef2;
  border-radius: 999px;
  margin: 2px;
}
.table-wrap::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  background: #1f9e74;
  border-radius: 999px;
  border: 2px solid #e8eef2;
}
.table-wrap::-webkit-scrollbar-thumb:hover,
.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #0f9f6e;
}
.table-wrap::-webkit-scrollbar-corner,
.table-scroll::-webkit-scrollbar-corner {
  background: #e8eef2;
}
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data th {
  text-align: left; padding: 0.7rem 1.1rem;
  color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--surface); font-weight: 600;
}
table.data th.num, table.data td.num { text-align: right; }
table.data td { padding: 0.7rem 1.1rem; border-top: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: rgba(15, 159, 110, 0.05); }
table.data.compact th, table.data.compact td { padding: 0.45rem 0.5rem; font-size: 0.82rem; }
.sticky-head thead th { position: sticky; top: 0; z-index: 1; }
.hint { padding: 0.55rem 1.15rem; font-size: 0.72rem; color: var(--muted); }

.pill {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  background: var(--surface); color: var(--muted);
}
.pill-hi { background: rgba(214, 69, 69, 0.12); color: #b91c1c; }
.pill-mid { background: rgba(196, 127, 26, 0.14); color: #9a6210; }
.pill-lo { background: rgba(15, 159, 110, 0.14); color: var(--mint-dim); }
.pill-base { background: rgba(15, 159, 110, 0.14); color: var(--mint-dim); }
.trend-up { color: var(--mint-dim); }
.trend-down { color: var(--danger); }

.meta-row {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem;
  padding: 0.7rem 1.15rem; font-size: 0.78rem; color: var(--muted);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.meta-row b { color: var(--sand); font-weight: 600; }

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.tools .input { width: 9rem; padding: 0.45rem 0.7rem; font-size: 0.78rem; }

.rec-block {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.75rem;
  background: #fafcfb;
}
.rec-block .t { font-weight: 600; margin-bottom: 0.4rem; }
.rec-block .b { color: var(--muted); font-size: 0.88rem; white-space: pre-wrap; }

.mini-grid { display: grid; gap: 0.4rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .mini-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .mini-grid.months { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1200px) { .mini-grid.months { grid-template-columns: repeat(12, 1fr); } }
.mini {
  border: 1px solid var(--line); border-radius: 10px; padding: 0.45rem 0.65rem;
  background: #fff; font-size: 0.78rem;
  display: flex; justify-content: space-between; gap: 0.5rem;
}
.mini.center { flex-direction: column; align-items: center; text-align: center; }
.mini .l { color: var(--muted); font-size: 0.68rem; }
.detail { background: #f7fbf9; }
.detail td { padding: 1rem 1.15rem !important; }
.hidden { display: none !important; }

.chk {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 0.75rem;
  background: #fff;
}
.chk-h { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); background: rgba(15, 159, 110, 0.08); }
.chk-h.geo { background: rgba(26, 107, 138, 0.1); }
.chk-h .t { font-weight: 600; font-size: 0.9rem; }
.chk-h .s { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.chk-row {
  display: flex; gap: 0.75rem; padding: 0.7rem 1rem;
  border-top: 1px solid var(--line); font-size: 0.88rem;
}
.chk-row.pass { background: rgba(15, 159, 110, 0.06); }
.chk-row.fail { background: rgba(214, 69, 69, 0.06); }
.chk-row.partial { background: rgba(196, 127, 26, 0.07); }
.chk-row .note { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }
.sev {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.65rem;
  background: #fff;
}
.sev.critical { border-color: rgba(214, 69, 69, 0.4); background: rgba(214, 69, 69, 0.06); }
.sev.warning { border-color: rgba(196, 127, 26, 0.4); background: rgba(196, 127, 26, 0.07); }
.sev.ok { border-color: rgba(15, 159, 110, 0.35); background: rgba(15, 159, 110, 0.06); }
.score-box { text-align: center; padding: 0 0.75rem; }
.score-box .n { font-family: var(--font-display); font-size: 2rem; color: var(--mint-dim); }
.verdict {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 12px; padding: 1rem;
  background: var(--surface); margin-bottom: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted); font-size: 0.8rem; text-align: center;
}

.saved-list { display: grid; gap: 0.45rem; }
.saved-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.55rem; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fafcfb; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.saved-item:hover, .saved-item.active {
  border-color: rgba(15, 159, 110, 0.45);
  background: rgba(15, 159, 110, 0.07);
}
.saved-item .q { font-weight: 600; font-size: 0.9rem; }
.saved-item .m { color: var(--muted); font-size: 0.75rem; margin-top: 0.15rem; }
.saved-item .acts { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.75rem; }
@media (max-width: 640px) {
  .nav-meta, .nav-extra { display: none; }
  .user-badge { max-width: 7rem; }
}

/* —— Личный кабинет —— */
.account-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 900px) {
  .account-grid { grid-template-columns: 1fr 1fr; }
}
.form-stack { display: grid; gap: 0.85rem; }
.field { display: grid; gap: 0.35rem; }
.field > span { font-size: 0.78rem; color: var(--muted); }
.form-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem;
  margin-top: 0.25rem;
}
.muted { color: var(--muted); }
.plan-current { margin-bottom: 1rem; }
.plan-current-card {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(15, 159, 110, 0.35);
  border-radius: 14px;
  background: rgba(15, 159, 110, 0.07);
}
.plan-limits {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.82rem; color: var(--muted);
}
.plan-limits b { color: var(--mint-dim); }
.plan-cards {
  display: grid; gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .plan-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .plan-cards { grid-template-columns: repeat(4, 1fr); } }
.plan-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  display: flex; flex-direction: column; gap: 0.65rem;
  box-shadow: 0 4px 16px rgba(12, 40, 32, 0.03);
}
.plan-card.active {
  border-color: rgba(15, 159, 110, 0.5);
  background: rgba(15, 159, 110, 0.06);
}
.plan-card h3 {
  margin: 0; font-family: var(--font-display); font-size: 1.05rem;
}
.plan-card .price {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
}
.plan-card .price small {
  font-size: 0.72rem; color: var(--muted); font-family: var(--font-body); font-weight: 500;
}
.plan-mini {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.35rem; font-size: 0.78rem; flex: 1;
}
.plan-mini li {
  display: flex; justify-content: space-between; gap: 0.5rem;
  color: var(--muted);
}
.plan-mini b { color: var(--sand); font-weight: 600; }
.plan-mini .val { color: var(--mint-dim); font-weight: 600; }
.plan-mini .val.no { color: var(--muted); font-weight: 500; }
.plan-card .btn { width: 100%; margin-top: auto; }
.hidden { display: none !important; }

.nav-link.is-active {
  border-color: var(--mint);
  color: var(--mint-dim);
  background: rgba(15, 159, 110, 0.08);
}
.grid-2 {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.zone-grid { display: grid; gap: 0.5rem; grid-template-columns: repeat(3, 1fr); margin-top: 1rem; }
.zone {
  border-radius: 10px; padding: 0.55rem 0.7rem; font-size: 0.78rem;
  background: var(--surface); border: 1px solid var(--line);
}
.zone .n { font-weight: 600; color: var(--sand); }
.zone .v { color: var(--muted); margin-top: 0.15rem; }
.tag {
  display: inline-block; padding: 0.2rem 0.55rem; border-radius: 8px;
  background: var(--surface); color: var(--sand); font-size: 0.75rem; margin: 0.15rem;
}
.tag.mint { background: rgba(15, 159, 110, 0.12); color: var(--mint-dim); }
.phrases { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.note {
  border: 1px solid rgba(196, 127, 26, 0.35);
  background: rgba(196, 127, 26, 0.08);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 0.85rem;
  color: #8a5a12;
  margin-bottom: 1rem;
}
.note ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.note li { margin: 0.25rem 0; font-size: 0.78rem; }
.modal-back {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(12, 30, 40, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--line);
  width: min(100%, 40rem); max-height: 85vh; overflow: auto;
  box-shadow: 0 20px 50px rgba(12, 40, 32, 0.18);
}
.modal-h {
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start;
  padding: 1rem 1.15rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff;
}
.modal-b { padding: 1.1rem 1.15rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.kv .l { color: var(--muted); }
.kv .r { text-align: right; }
.row-click { cursor: pointer; }
.sub { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.bar-fill.hi { background: #e57373; }
.bar-fill.mid { background: #e0a84a; }
.bar-fill.lo { background: var(--mint); }
.bar-fill.blue { background: #3b82f6; }
.bar-fill.amber { background: #f59e0b; }

.mkt-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: rgba(15, 159, 110, 0.06);
  margin-bottom: 1rem;
}
.mkt-summary .l {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.mkt-summary p { margin: 0; white-space: pre-wrap; font-size: 0.92rem; }
.mkt-block {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
}
.mkt-n {
  width: 2rem; height: 2rem;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  color: var(--mint-dim);
  font-weight: 700;
  font-size: 0.85rem;
}
.mkt-body h3 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}
.mkt-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: pre-wrap;
}
.mkt-points {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  color: var(--sand);
  font-size: 0.86rem;
}
.mkt-points li { margin: 0.2rem 0; }
