/* ==== BULLS Brand Styles (Solid Red) ======================
   Цвета из брендбука:
   - Тёмно-красный (бренд): #c00000
   - Ярко-красный (акцент): #ff0000 (используем только для hover)
   - Серый: #6a6b6b
   - Светло-серый: #dedede
   - Белый: #ffffff
   ========================================================== */

/* Шрифты */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Mono:wght@400;600&display=swap");

:root{
  --brand:#c00000;
  --brand-hover:#a60000; /* чуть темнее при hover */
  --brand-active:#8a0000; /* ещё темнее при active */
  --brand-dark:#3d3e3e;
  --brand-gray:#6a6b6b;
  --brand-light:#dedede;

  --bg:#f6f7f8;
  --card:#ffffff;
  --text:#3d3e3e;
  --muted:#6a6b6b;

  --ring: rgba(192,0,0,.25);
  --radius:18px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family:"Roboto", Arial, sans-serif;
  color:var(--text);
  background:#f6f7f8;
  min-height:100dvh;
  display:flex;
  align-items:flex-start;   /* было center — из-за этого прыгало */
  justify-content:center;
  padding:20px;
}

/* Дополнительно отключаем «резкие» родные эффекты прокрутки */
html, body{
  scroll-behavior:auto;
  overscroll-behavior-y: contain; /* без перетягиваний */
}


.wrap{ width:100%; max-width:980px; }

.header{ text-align:center; margin-bottom:16px; }
.title{
  font-size:clamp(22px,3.2vw,34px);
  font-weight:800;
  letter-spacing:.2px;
  color:var(--brand-dark);
}
.subtitle{ color:var(--muted); margin-top:6px; font-size:14px; }

.grid{
  display:grid; gap:16px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (max-width:820px){ .grid{ grid-template-columns:1fr; } }

.card{
  background: var(--card);
  border:1px solid var(--brand-light);
  border-radius:var(--radius);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  position:relative;
  overflow:hidden;
}
.card .content{ padding:18px; }

/* Кнопки */
.btn{
  width:100%;
  display:flex; align-items:center; justify-content:center; gap:10px;
  font-weight:700;
  border:none;
  padding:16px 18px;
  border-radius:14px;
  cursor:pointer;
  color:#fff;
  background: var(--brand);
  transition: background-color .15s ease, transform .06s ease, box-shadow .15s ease, opacity .25s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.btn:hover{ background: var(--brand-hover); transform: translateY(-1px); }
.btn:active{ background: var(--brand-active); transform: translateY(0); box-shadow:none; }
.btn:disabled{ opacity:.6; cursor:not-allowed; box-shadow:none; }
.btn:focus-visible{
  outline:0;
  box-shadow:0 0 0 4px rgba(192,0,0,.12), 0 0 0 1px var(--ring) inset;
}

/* Все кнопки теперь одинаковые */
.btn-red, .btn-green, .btn-blue, .btn-amber {
  background: var(--brand);
}

/* Разделы */
.section{ margin-top:18px; display:none; }
.section.active{ display:block; }

/* Формы */
.calc{
  display:grid; gap:14px; grid-template-columns:repeat(2,1fr);
}
@media (max-width:720px){ .calc{ grid-template-columns:1fr; } }

label{
  font-size:12px;
  color:var(--muted);
  display:block;
  margin-bottom:6px;
}

select, input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--brand-light);
  background:#fff;
  color:var(--text);
  outline:none;
  box-shadow: inset 0 1px 0 rgba(0,0,0,.02);
  transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:focus, input:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.row-2{ grid-column: span 2; }
@media (max-width:720px){ .row-2{ grid-column: auto; } }

.actions{ display:flex; gap:12px; margin-top:6px; flex-wrap:wrap; }

.hint{ font-size:12px; color:var(--muted); }
.mono{ font-family:"Roboto Mono", monospace; font-variant-numeric: tabular-nums; }

.result{
  margin-top:16px; padding:16px; border-radius:14px;
  background: linear-gradient(180deg, rgba(192,0,0,.05), rgba(255,255,255,.02));
  border:1px solid rgba(192,0,0,.25);
}

.kpi{
  display:grid; gap:10px;
  grid-template-columns: repeat(2,1fr);
}
@media (max-width:720px){ .kpi{ grid-template-columns:1fr; } }

.kpi .item{
  padding:12px;
  border-radius:12px;
  background:#fff;
  border:1px solid var(--brand-light);
}

.muted{ color:var(--muted); font-size:12px; }

.sep{
  height:1px;
  background: linear-gradient(90deg, transparent, var(--brand-light), transparent);
  margin:14px 0;
}

.footer{
  margin-top:18px; text-align:center;
  color:var(--muted); font-size:12px;
}
