/* Оформление tools.ovo-partners.ru — в стиле ovo-partners.ru:
   тёмно-синий #1A2542, коралловый #FF7254, шрифт Manrope (свой, не с чужих серверов). */

@font-face {
  font-family: Manrope;
  src: url(../brand/Manrope.ttf) format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --accent: #FF7254;
  --accent-hover: #E3573A;
  --navy: #1A2542;
  --ink: #0F172A;
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --line: #E3E5EA;
  --muted: #64748B;
  --ok: #15803D;
  --warn: #B45309;
  --err: #B91C1C;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 .8em; }

/* ---- Шапка и подвал ---- */
.site-header { background: var(--navy); color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.site-header .logo { display: block; height: 40px; }
.site-header .logo img { height: 100%; width: auto; display: block; }
.site-nav { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-nav a.to-main { color: var(--accent); }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main.wrap { padding-top: 28px; padding-bottom: 40px; }

.site-footer { background: var(--navy); color: #CBD5E1; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 22px; padding-bottom: 22px; }
.site-footer a { color: #fff; }
.site-footer .src { flex-basis: 100%; color: #94A3B8; }

/* ---- Карточки и сетки ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.lead { color: var(--muted); max-width: 720px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile h3 { margin-bottom: .3em; }
.tile p { color: var(--muted); font-size: 14px; margin: 0; }
.tile .tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.tile.soon { opacity: .55; pointer-events: none; }
.cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* ---- Формы ---- */
label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid #CBD2DC; border-radius: 10px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { min-height: 180px; resize: vertical; line-height: 1.4; }
textarea.short { min-height: 70px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > .field { flex: 1 1 160px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; margin-bottom: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.seg { display: inline-flex; border: 1px solid #CBD2DC; border-radius: 10px; overflow: hidden; }
.seg label { margin: 0; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--navy); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 11px 20px; min-height: 44px;
}
.btn:hover { background: var(--accent-hover); }
.btn.alt { background: var(--navy); }
.btn.alt:hover { background: var(--ink); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid #CBD2DC; }
.btn.ghost:hover { border-color: var(--navy); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }

/* ---- Таблица классов и расчёт ---- */
.classes { width: 100%; border-collapse: collapse; }
.classes th, .classes td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.classes th { font-size: 13px; color: var(--muted); font-weight: 600; }
.classes input { width: 90px; padding: 6px 8px; }
.classes .num { font-weight: 700; }

.fees { width: 100%; border-collapse: collapse; }
.fees td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fees td:last-child { text-align: right; white-space: nowrap; font-weight: 700; padding-left: 12px; }
.fees td.muted, .fees td.hint { white-space: normal; text-align: left; font-weight: 400; padding-left: 0; }
.fees .pt { color: var(--muted); font-size: 13px; display: block; }
.fees tr.sub td { font-weight: 700; color: var(--navy); border-bottom: 0; padding-top: 12px; }
.fees tr.total td { font-size: 20px; font-weight: 800; border-bottom: 0; padding-top: 14px; }

.msg { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }
.msg.err { background: #FEF2F2; color: var(--err); }
.msg.warn { background: #FFFBEB; color: var(--warn); }
.msg.ok { background: #F0FDF4; color: var(--ok); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---- QR ---- */
.qr-box { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.qr-box svg { width: 220px; height: 220px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.payload { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; background: var(--bg); border-radius: 8px; padding: 10px; }
.req { width: 100%; border-collapse: collapse; font-size: 14px; }
.req td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.req td:first-child { color: var(--muted); width: 42%; }

/* ---- Отступы и ширины вместо встроенных стилей (их запрещает CSP) ---- */
.w-120 { flex: 0 1 120px; } .w-130 { flex: 0 1 130px; } .w-140 { flex: 0 1 140px; }
.w-200 { flex: 0 1 200px; } .w-220 { max-width: 220px; } .m0 { margin: 0; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; } .mt-28 { margin-top: 28px; }

@media (max-width: 520px) {
  .site-header .logo { height: 32px; }
  .site-nav { margin-left: 0; }
  .card { padding: 16px; }
  .qr-box svg { width: 100%; height: auto; max-width: 280px; }
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
}
