/* =========================
   Base / Reset
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.6;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   Layout
========================= */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

section {
  margin-bottom: 32px;
}

/* =========================
   Header
========================= */
header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e7;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.logo a {
  font-weight: 600;
  font-size: 16px;
  color: #1d1d1f;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
}

nav a {
  font-size: 14px;
  color: #1d1d1f;
}

/* =========================
   Breadcrumbs
========================= */
.breadcrumbs ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #6e6e73;
}

.breadcrumbs li::after {
  content: "›";
  margin-left: 8px;
}

.breadcrumbs li:last-child::after {
  content: "";
}

/* =========================
   Typography
========================= */
h1 {
  font-size: 28px;
  line-height: 1.3;
  margin-bottom: 12px;
}

h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

p {
  margin: 0 0 12px;
  color: #333;
}

/* =========================
   Cards (Calculator, Result, etc.)
========================= */
.intro,
.calculator,
.example,
.formulas,
.faq,
.meta,
.related {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* =========================
   Calculator Form
========================= */
.calculator form {
  margin-top: 16px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 16px;
}

legend {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  font-size: 14px;
  cursor: pointer;
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

input[type="number"],
select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.4;
  border-radius: 12px;
  border: 1px solid #d2d2d7;
  background-color: #fff;
  appearance: none;
}

/* кастомная стрелка */
select {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 44px;
}


input:focus,
select:focus {
  outline: none;
  border-color: #0066cc;
}

/* =========================
   Button
========================= */
button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 14px;
  border: none;
  background: #1d1d1f;
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: #000000;
}

/* =========================
   Result
========================= */
.result {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e7;
}

.result ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
}

.result strong {
  font-weight: 600;
}

/* =========================
   FAQ
========================= */
.faq h3 {
  margin-top: 16px;
}

/* =========================
   Footer
========================= */
footer {
  background: #ffffff;
  border-top: 1px solid #e5e5e7;
  padding: 24px 16px;
  font-size: 13px;
  color: #6e6e73;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  gap: 16px;
}

footer a {
  color: #6e6e73;
}

/* =========================
   Mobile tweaks
========================= */
@media (max-width: 600px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  section {
    margin-bottom: 24px;
  }

  .intro,
  .calculator,
  .example,
  .formulas,
  .faq,
  .meta,
  .related {
    padding: 20px;
  }
}
 /* =========================
   Share button (global)
========================= */
.share-btn {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 14px;
  border: 1px solid #d2d2d7;
  background: #ffffff;
  color: #1d1d1f;
  cursor: pointer;
}

.share-btn:hover {
  background: #f5f5f7;
}

.share-btn:active {
  background: #e5e5e7;
}


.vat-info {
  margin-top: 40px;
}

.vat-intro {
  color: #6e6e73;
  margin-bottom: 20px;
}

.vat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}


.vat-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  display: flex;
  gap: 14px;
}

.vat-card.main {
  border: 1px solid #1d1d1f;
}

.vat-rate {
  font-size: 24px;
  font-weight: 600;
  min-width: 48px;
}

.vat-text {
  font-size: 14px;
  line-height: 1.4;
}

.vat-note {
  margin-top: 16px;
  font-size: 14px;
}

.calc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.calc-list li {
  margin-bottom: 12px;
}

.calc-list a {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f5f5f7;
  color: #1d1d1f;
}

.calc-list a:hover {
  background: #e5e5e7;
  text-decoration: none;
}


/* Быстрые ставки (чипсы) */
.quick-rates{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 10px;
}

.quick-rates button{
  /* перебиваем глобальные стили кнопок */
  width:auto !important;
  min-height:32px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#f5f5f7;
  color:#111;
  font-weight:600;
  font-size:14px;
  line-height:1;
  cursor:pointer;
}

.quick-rates button:hover{
  background:#ededf2;
}

.quick-rates button.is-active{
  background:#111;
  border-color:#111;
  color:#fff;
}

/* На очень узких экранах чуть меньше */
@media (max-width: 420px){
  .quick-rates button{
    min-height:30px;
    padding:6px 9px;
    font-size:13px;
  }
}

/* Таблица НДС */

.vat-table {
  margin-top: 40px;
}

.vat-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 15px;
}

.vat-table th,
.vat-table td {
  padding: 12px 14px;
  text-align: left;
}

.vat-table thead {
  background: #f4f6f8;
}

.vat-table th {
  font-weight: 600;
  border-bottom: 2px solid #e3e6ea;
}

.vat-table td {
  border-bottom: 1px solid #e8ebef;
}

.vat-table tbody tr:hover {
  background: #fafbfc;
}

.vat-table p {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

.vat-table td:nth-child(2) {
  font-weight: 600;
  color: #2b6cb0;
}

@media (max-width: 600px) {

  .vat-table table {
    font-size: 14px;
  }

  .vat-table th,
  .vat-table td {
    padding: 10px;
  }

}

.popular-calculations {
  margin-top: 40px;
}

.popular-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.popular-list li {
  margin-bottom: 6px;
}

.popular-list a {
  color: #2563eb;
  text-decoration: none;
}

.popular-list a:hover {
  text-decoration: underline;
}

.popular-note {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* Формула (картинка) */

.formula-image {
  margin: 24px auto;
  text-align: center;
  max-width: 720px;
}

.formula-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background: #f8fafc;
}

.formula-image figcaption {
  margin-top: 6px;
  font-size: 14px;
  color: #6b7280;
}