@font-face {
  font-family: "Roboto Slab";
  src: url("/assets/RobotoSlab-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #15242b;
  --ink-soft: #3f5056;
  --paper: #f7f1e6;
  --paper-deep: #eee4d3;
  --white: #fffdf8;
  --red: #bd3d2d;
  --red-dark: #8e2b20;
  --gold: #df9d32;
  --teal: #2f6c63;
  --line: rgba(21, 36, 43, 0.16);
  --shadow: 0 24px 70px rgba(48, 36, 23, 0.12);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 5%, rgba(223, 157, 50, 0.16), transparent 28rem),
    radial-gradient(circle at 95% 18%, rgba(47, 108, 99, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--paper) 0%, #fbf8f2 52%, var(--paper) 100%);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(21, 36, 43, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 36, 43, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}
img, svg { display: block; max-width: 100%; }
html, body { max-width: 100%; overflow-x: clip; }
a {
  color: var(--red-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--red); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(47, 108, 99, 0.65); outline-offset: 3px; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.container { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(21, 36, 43, 0.1);
  background: rgba(247, 241, 230, 0.9);
  backdrop-filter: blur(18px);
}
.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-inner > *, .hero-grid > *, .calculator-shell > *, .content-grid > * { min-width: 0; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 850;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  color: var(--white);
  padding: 8px;
  background: var(--red);
  border-radius: 50% 50% 50% 14%;
  transform: rotate(-8deg);
}
.brand-mark svg { transform: rotate(8deg); }
.brand strong { color: var(--red); }
.desktop-nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 650; }
.desktop-nav a { color: var(--ink); text-decoration: none; }
.desktop-nav a:hover { color: var(--red); }
.nav-cta { padding: 10px 16px; color: var(--white) !important; background: var(--ink); border-radius: 999px; }
.hero { position: relative; overflow: hidden; padding: 78px 0 54px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 52px;
}
.hero-copy, .page-hero, .prose { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.14; text-wrap: balance; }
h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(40px, 6.5vw, 78px);
  font-weight: 860;
  letter-spacing: -0.055em;
}
h2 {
  margin: 0 0 22px;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 820;
  letter-spacing: -0.04em;
}
h3 { margin: 0 0 12px; font-size: 22px; font-weight: 780; letter-spacing: -0.02em; }
.hero-lead { max-width: 740px; margin: 28px 0 0; color: var(--ink-soft); font-size: clamp(18px, 2vw, 22px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--red);
  box-shadow: 0 12px 28px rgba(189, 61, 45, 0.2);
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: var(--white); background: var(--red-dark); }
.button--ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); box-shadow: none; }
.button--ghost:hover { color: var(--ink); background: var(--white); }
.hero-visual {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; color: var(--ink-soft); font-size: 14px; }
.breadcrumbs a { color: inherit; }
.section { padding: 68px 0; }
.section--white { background: rgba(255, 253, 248, 0.78); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.section-head p { max-width: 560px; margin: 0 0 6px; color: var(--ink-soft); }
.calculator-shell {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}
.calculator-intro {
  padding: 38px;
  color: var(--white);
  background: radial-gradient(circle at 85% 15%, rgba(223, 157, 50, 0.3), transparent 14rem), var(--teal);
}
.calculator-intro h2 { font-size: clamp(30px, 4vw, 45px); }
.calculator-intro p { color: rgba(255, 255, 255, 0.84); }
.calculator-intro ul { padding-left: 20px; }
.calculator-panel { padding: 38px; }
.calculator-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field--wide { grid-column: 1 / -1; }
.field label, .field-label { font-size: 14px; font-weight: 760; }
.field input, .field select {
  width: 100%;
  min-height: 52px;
  padding: 10px 13px;
  color: var(--ink);
  border: 1px solid rgba(21, 36, 43, 0.25);
  background: #fff;
  border-radius: 12px;
}
.check-field {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--paper);
  border-radius: 12px;
  font-size: 14px;
}
.check-field input { width: 19px; height: 19px; margin-top: 3px; }
.form-footer { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 18px; }
.rate-date { color: var(--ink-soft); font-size: 13px; }
.calculator-result {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 22px;
  border-left: 5px solid var(--gold);
  background: var(--paper);
  border-radius: 14px;
}
.result-total, .result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.result-total { font-size: 20px; }
.result-total strong { color: var(--red-dark); font-size: 28px; }
.result-row--warning strong, .form-error { color: var(--red-dark); }
.result-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 13px; }
.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  margin: 26px 0;
  padding: 22px 24px;
  border: 1px solid rgba(189, 61, 45, 0.25);
  background: rgba(255, 253, 248, 0.82);
  border-radius: 16px;
}
.notice::before {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  content: "!";
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  font-weight: 900;
}
.notice p { margin: 0; }
.notice--eaeu { border-color: rgba(47, 108, 99, 0.3); }
.notice--eaeu::before { content: "Е"; background: var(--teal); }
.country-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.country-card {
  position: relative;
  display: grid;
  min-height: 184px;
  align-content: space-between;
  padding: 22px;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
  border-radius: 18px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.country-card:hover { color: var(--ink); box-shadow: 0 18px 36px rgba(48, 36, 23, 0.11); transform: translateY(-4px); }
.country-card img { width: 58px; height: 58px; object-fit: contain; }
.country-card strong { display: block; margin-top: 18px; font-size: 20px; }
.country-card span { color: var(--ink-soft); font-size: 13px; }
.country-card--top { color: var(--white); background: var(--ink); }
.country-card--top:hover { color: var(--white); }
.country-card--top span { color: rgba(255, 255, 255, 0.7); }
.flag-title { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }
.flag-title img {
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(21, 36, 43, 0.16));
}
.model-finder {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.search-input {
  width: 100%;
  min-height: 58px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  background: var(--white);
  border-radius: 14px;
  font-size: 18px;
}
.model-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.model-results a, .model-link {
  padding: 10px 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.model-results a:hover, .model-link:hover { color: var(--red); background: var(--paper); }
.model-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 18px; margin-top: 30px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 50px; }
.prose { min-width: 0; }
.prose h2 { margin-top: 52px; }
.prose h3 { margin-top: 32px; }
.prose table, .spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td, .spec-table th, .spec-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th, .spec-table th { width: 48%; color: var(--ink-soft); font-weight: 650; }
.side-card {
  position: sticky;
  top: 102px;
  padding: 24px;
  border-left: 5px solid var(--gold);
  background: var(--ink);
  border-radius: 0 18px 18px 0;
  color: var(--white);
}
.side-card h3 { color: var(--gold); }
.side-card a { color: var(--white); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 26px 0; }
.fact { padding: 20px; border: 1px solid var(--line); background: var(--white); border-radius: 16px; }
.fact strong { display: block; margin-bottom: 7px; color: var(--red-dark); font-size: 24px; }
.faq { display: grid; gap: 10px; }
.faq details { padding: 0 20px; border: 1px solid var(--line); background: var(--white); border-radius: 14px; }
.faq summary { padding: 18px 34px 18px 0; cursor: pointer; font-weight: 740; }
.faq details[open] { border-color: rgba(47, 108, 99, 0.38); box-shadow: 0 12px 30px rgba(48, 36, 23, 0.08); }
.faq details p { margin: 0 0 20px; color: var(--ink-soft); }
.source-list { padding-left: 20px; font-size: 14px; }
.site-footer { padding: 48px 0; color: var(--white); background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; gap: 36px; }
.site-footer .brand { color: var(--white); }
.site-footer .brand strong { color: var(--white); }
.site-footer a { color: var(--white); }
.footer-links { display: grid; align-content: start; gap: 8px; }
.footer-note { max-width: 600px; font-size: 13px; }
.page-hero { padding: 52px 0 38px; }
.page-hero h1 { font-size: clamp(38px, 5.5vw, 66px); }
.model-hero h1 { font-size: clamp(36px, 5vw, 58px); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag {
  padding: 7px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  font-size: 13px;
}
.legacy-content { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.legacy-content img, .legacy-content iframe, .legacy-content form { display: none; }
.not-found { display: grid; min-height: 64vh; place-items: center; text-align: center; }
.not-found strong { display: block; color: var(--red); font-size: clamp(90px, 18vw, 210px); line-height: 0.9; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy, .route-card, .calculator-shell { animation: rise 560ms both; }
.route-card { animation-delay: 100ms; }
.calculator-shell { animation-delay: 160ms; }
@media (max-width: 980px) {
  .hero-grid, .calculator-shell, .content-grid { grid-template-columns: 1fr; }
  .country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .desktop-nav { gap: 10px; }
  .desktop-nav a:not(.nav-cta) { display: none; }
  .hero { padding-top: 48px; }
  .hero-visual { max-width: 680px; }
  .section { padding: 50px 0; }
  .section-head, .form-footer { align-items: stretch; flex-direction: column; }
  .calculator-intro, .calculator-panel { padding: 26px 22px; }
  .calculator-form, .model-results, .model-link-grid { grid-template-columns: 1fr; }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts, .footer-grid { grid-template-columns: 1fr; }
  .flag-title { align-items: flex-start; }
  .flag-title img { width: 64px; height: 64px; }
}
@media (max-width: 430px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .header-inner { min-height: 68px; }
  .desktop-nav { display: none; }
  .brand span { font-size: 14px; }
  .hero { padding-top: 38px; }
  h1, .page-hero h1, .model-hero h1 {
    font-size: clamp(32px, 10vw, 40px);
    letter-spacing: -0.04em;
    text-wrap: pretty;
  }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .hero-visual { border-radius: 18px; }
  .calculator-intro, .calculator-panel { padding: 22px 16px; }
  .country-grid { grid-template-columns: 1fr; }
  .country-card { min-height: 150px; }
  .notice { grid-template-columns: 1fr; }
  .result-total, .result-row { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Product tools and cache-safe hero layout. */
@media (min-width: 961px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    gap: 44px;
  }
}

.hero-visual {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.products-home {
  border-top: 1px solid var(--line, #ddd4c7);
}

.products-intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  min-height: 210px;
  padding: 24px;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: #fffdf8;
  border: 1px solid #d9cdbd;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgb(24 37 42 / 6%);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-3px);
  border-color: #c74532;
  box-shadow: 0 16px 38px rgb(24 37 42 / 10%);
}

.product-card__number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  color: #fff;
  background: #c74532;
  border-radius: 50%;
  font: 700 14px/1 Georgia, serif;
}

.product-card h3 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.12;
}

.product-card p {
  margin: 0 0 20px;
  color: #526066;
  line-height: 1.55;
}

.product-card__link {
  margin-top: auto;
  color: #a62f21;
  font-weight: 800;
}

.tool-hero {
  padding-top: clamp(44px, 7vw, 88px);
  padding-bottom: 30px;
}

.tool-hero h1 {
  max-width: 930px;
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.tool-hero__lead {
  max-width: 780px;
  margin: 0;
  color: #46565d;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.55;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 30px;
}

.tool-panel {
  padding: clamp(22px, 4vw, 40px);
  background: #fffdf8;
  border: 1px solid #d9cdbd;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgb(24 37 42 / 7%);
}

.tool-panel h2,
.tool-content h2 {
  margin-top: 0;
}

.tool-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-form .field {
  margin: 0;
}

.tool-form .field--wide,
.tool-form button,
.tool-result {
  grid-column: 1 / -1;
}

.tool-form input,
.tool-form select {
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  padding: 12px 14px;
  color: #17272d;
  background: #fff;
  border: 1px solid #b9b1a7;
  border-radius: 10px;
  font: inherit;
}

.tool-form input:focus,
.tool-form select:focus {
  outline: 3px solid rgb(199 69 50 / 18%);
  border-color: #c74532;
}

.tool-form button {
  min-height: 54px;
  padding: 13px 24px;
  color: #fff;
  background: #17272d;
  border: 0;
  border-radius: 999px;
  font: 800 17px/1.2 Georgia, serif;
  cursor: pointer;
}

.tool-form button:hover,
.tool-form button:focus-visible {
  background: #c74532;
}

.tool-result {
  margin-top: 4px;
  padding: 20px;
  color: #17272d;
  background: #f2eee5;
  border-left: 5px solid #c74532;
  border-radius: 12px;
}

.tool-result[hidden] {
  display: none;
}

.tool-result h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.tool-result p:last-child,
.tool-result ul:last-child {
  margin-bottom: 0;
}

.tool-result__sum {
  display: block;
  margin: 8px 0 14px;
  color: #a62f21;
  font: 800 clamp(30px, 5vw, 48px)/1 Georgia, serif;
}

.tool-aside {
  position: sticky;
  top: 24px;
  padding: 24px;
  background: #17272d;
  color: #fff;
  border-radius: 18px;
}

.tool-aside h2 {
  margin-top: 0;
  color: #fff;
  font-size: 22px;
}

.tool-aside p,
.tool-aside li {
  color: #e1e5e3;
  line-height: 1.55;
}

.tool-aside a {
  color: #ffb09e;
}

.tool-content {
  max-width: 900px;
}

.tool-content p,
.tool-content li {
  line-height: 1.72;
}

.tool-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fffdf8;
}

.tool-content th,
.tool-content td {
  padding: 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid #d9cdbd;
}

.tool-content th {
  background: #ece5d9;
}

.tool-note {
  margin: 24px 0;
  padding: 18px 20px;
  background: #fff4ec;
  border: 1px solid #e7b8a8;
  border-radius: 12px;
}

.tool-faq {
  max-width: 900px;
}

.tool-faq details {
  margin-bottom: 10px;
  background: #fffdf8;
  border: 1px solid #d9cdbd;
  border-radius: 12px;
}

.tool-faq summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 800;
}

.tool-faq details p {
  margin: 0;
  padding: 0 20px 20px;
  line-height: 1.65;
}

.source-list {
  padding-left: 20px;
}

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-aside {
    position: static;
  }
}

@media (max-width: 620px) {
  .product-grid,
  .tool-form {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 0;
  }

  .tool-hero h1 {
    font-size: clamp(36px, 13vw, 54px);
  }
}

/* Unified page architecture, appended after the first product release. */
.tool-hero.container,
main > .section.container,
.products-home.container {
  box-sizing: border-box;
}

.tool-hero {
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: clamp(22px, 3vw, 36px);
}

.tool-hero .breadcrumbs {
  margin: 0 0 18px;
  color: #69757a;
  font-size: 14px;
}

.tool-hero h1 {
  max-width: 920px;
  margin: 0 0 18px;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.02;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: auto;
}

.tool-hero__lead {
  max-width: 760px;
  font-size: clamp(18px, 1.8vw, 22px);
}

.tool-hero + .section.container {
  padding-top: 20px;
}

main > .section.container {
  padding-bottom: clamp(36px, 5vw, 64px);
}

.product-grid {
  gap: 20px;
}

.product-card {
  min-height: 230px;
  padding: 28px;
  border-top: 4px solid #c74532;
}

.product-card__label {
  align-self: flex-start;
  margin-bottom: 24px;
  padding: 7px 10px 6px;
  color: #8e2f22;
  background: #f7e7df;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tool-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  gap: clamp(20px, 3vw, 32px);
}

.tool-panel,
.tool-aside {
  min-width: 0;
}

.tool-panel {
  padding: clamp(24px, 3.2vw, 38px);
}

.tool-panel > h2 {
  margin-bottom: 24px;
  font-size: clamp(30px, 3vw, 42px);
}

.tool-scope,
.calculator-scope {
  margin: 22px 0 0;
  padding: 16px 18px;
  color: #39494f;
  background: #f4f0e8;
  border: 1px solid #d9cdbd;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
}

.calculator-scope {
  grid-column: 1 / -1;
}

.calculator-shell,
.calculator-intro,
.calculator-form {
  min-width: 0;
}

.calculator-intro h2 {
  max-width: 100%;
  font-size: clamp(32px, 2.8vw, 44px);
  line-height: 1.02;
  overflow-wrap: normal;
  hyphens: auto;
}

.tool-content,
.tool-faq {
  width: min(900px, calc(100% - 32px));
  margin-inline: auto;
}

.tool-content table {
  display: table;
  max-width: 100%;
}

@media (max-width: 960px) {
  .tool-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-aside {
    max-width: none;
  }

  .tool-hero h1 {
    max-width: 760px;
  }
}

@media (max-width: 720px) {
  .tool-hero {
    padding-top: 30px;
    padding-bottom: 20px;
  }

  .tool-hero h1 {
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .tool-hero + .section.container {
    padding-top: 14px;
  }

  .product-card {
    min-height: 0;
    padding: 22px;
  }

  .tool-panel {
    padding: 20px;
    border-radius: 16px;
  }

  .tool-content,
  .tool-faq {
    width: calc(100% - 32px);
  }

  .tool-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calculator-intro h2 {
    font-size: 34px;
  }
}

/* Header market bar. */
.market-strip {
  border-top: 1px solid #e1d8ca;
  background: rgb(255 253 248 / 78%);
  backdrop-filter: blur(12px);
}

.market-strip__inner {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.market-date {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  color: #526066;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.market-date::before {
  width: 7px;
  height: 7px;
  content: "";
  background: #c74532;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(199 69 50 / 10%);
}

.market-rates {
  display: flex;
  align-items: center;
  flex: 1 0 auto;
  gap: 8px;
}

.market-rate {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 4px;
  color: #24353b;
  background: #fff;
  border: 1px solid #ded5c8;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.market-rate__icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #17272d;
  border-radius: 50%;
  font: 800 11px/1 Georgia, serif;
}

.market-rate--cny .market-rate__icon { background: #c74532; }
.market-rate--eur .market-rate__icon { background: #24705f; }
.market-rate--kzt .market-rate__icon { background: #2779a7; }
.market-rate--byn .market-rate__icon { background: #8a5537; }

.market-rate__code {
  color: #69757a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
}

.market-rate strong {
  color: #17272d;
  font-size: 12px;
}

.market-source {
  flex: 0 0 auto;
  color: #7a8589;
  font-size: 10px;
  white-space: nowrap;
}

/* Custom calculator selects. */
.select-native--enhanced {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select__trigger {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-sizing: border-box;
  padding: 11px 11px 11px 15px;
  color: #17272d;
  text-align: left;
  background: linear-gradient(180deg, #fff 0%, #fbf8f2 100%);
  border: 1px solid #b9b1a7;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.custom-select__trigger:hover {
  border-color: #8f9a9e;
  background: #fff;
}

.custom-select__trigger:focus-visible,
.custom-select--open .custom-select__trigger {
  outline: none;
  border-color: #c74532;
  box-shadow: 0 0 0 4px rgb(199 69 50 / 12%);
}

.custom-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__mark {
  width: 28px;
  height: 28px;
  position: relative;
  flex: 0 0 28px;
  background: #f3e7df;
  border-radius: 50%;
  transition: transform 180ms ease, background 180ms ease;
}

.custom-select__mark::before,
.custom-select__mark::after {
  position: absolute;
  top: 13px;
  left: 8px;
  width: 12px;
  height: 2px;
  content: "";
  background: #a93425;
  border-radius: 2px;
}

.custom-select__mark::after {
  transform: rotate(90deg);
}

.custom-select--open .custom-select__mark {
  background: #c74532;
  transform: rotate(45deg);
}

.custom-select--open .custom-select__mark::before,
.custom-select--open .custom-select__mark::after {
  background: #fff;
}

.custom-select__list {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: 286px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  background: #fffdf8;
  border: 1px solid #d7cbbd;
  border-radius: 14px;
  box-shadow: 0 22px 54px rgb(23 39 45 / 18%);
}

.custom-select--above .custom-select__list {
  top: auto;
  bottom: calc(100% + 8px);
}

.custom-select__list[hidden] {
  display: none;
}

.custom-select__option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  color: #26373d;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
}

.custom-select__option::before {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  content: "";
  background: #ded5c8;
  border-radius: 50%;
}

.custom-select__option:hover,
.custom-select__option:focus-visible {
  outline: none;
  background: #f3ede4;
}

.custom-select__option[aria-selected="true"] {
  color: #fff;
  background: #17272d;
  font-weight: 800;
}

.custom-select__option[aria-selected="true"]::before {
  background: #e56854;
  box-shadow: 0 0 0 4px rgb(229 104 84 / 20%);
}

/* The main calculator receives 30% more horizontal space. */
@media (min-width: 961px) {
  .calculator-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
  }

  .calculator-intro {
    padding: 32px 24px;
  }

  .calculator-intro h2 {
    font-size: 30px;
    line-height: 1.04;
  }

  .calculator-intro p,
  .calculator-intro li {
    font-size: 14px;
    line-height: 1.5;
  }

  .calculator-form {
    padding: 34px 36px;
  }

  .calculator-form input,
  .calculator-form .custom-select__trigger {
    min-height: 58px;
  }
}

.country-card--leader {
  position: relative;
  background: linear-gradient(135deg, #fff9f2 0%, #fff 72%);
  border-color: #d99582;
  box-shadow: 0 12px 30px rgb(199 69 50 / 9%);
}

.country-card__badge {
  display: block;
  width: max-content;
  margin-bottom: 4px;
  padding: 4px 7px;
  color: #a93425;
  background: #f7e7df;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1.2;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .market-strip__inner {
    width: 100%;
    max-width: none;
    padding-inline: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .market-strip__inner::-webkit-scrollbar {
    display: none;
  }

  .market-date {
    position: sticky;
    left: -16px;
    z-index: 2;
    padding: 0 10px 0 16px;
    background: #fffaf2;
  }

  .market-source {
    display: none;
  }

  .custom-select__value {
    white-space: normal;
  }
}
/* Compact original currency notes: crisp at header size, without coin badges. */
.market-rate__icon {
  width: 30px !important;
  height: 19px !important;
  flex: 0 0 30px !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
}

.market-rate--usd .market-rate__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 22'%3E%3Cpath fill='%231f4e46' d='M3 1h30l2 2v16l-2 2H3l-2-2V3z'/%3E%3Cpath fill='none' stroke='%23f6eddd' stroke-width='1' d='M5 4h26v14H5z'/%3E%3Cpath stroke='%23f6eddd' stroke-opacity='.55' d='M6 7h7m10 8h7'/%3E%3Ctext x='18' y='16' fill='%23f6eddd' font-family='Georgia' font-size='14' font-weight='700' text-anchor='middle'%3E%24%3C/text%3E%3C/svg%3E") !important;
}

.market-rate--cny .market-rate__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 22'%3E%3Cpath fill='%23bd3a2a' d='M3 1h30l2 2v16l-2 2H3l-2-2V3z'/%3E%3Cpath fill='none' stroke='%23f6e5c1' stroke-width='1' d='M5 4h26v14H5z'/%3E%3Cpath stroke='%23f6e5c1' stroke-opacity='.6' d='M6 7h7m10 8h7'/%3E%3Ctext x='18' y='16' fill='%23f6e5c1' font-family='Georgia' font-size='14' font-weight='700' text-anchor='middle'%3E%C2%A5%3C/text%3E%3C/svg%3E") !important;
}

.market-rate--eur .market-rate__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 22'%3E%3Cpath fill='%23176665' d='M3 1h30l2 2v16l-2 2H3l-2-2V3z'/%3E%3Cpath fill='none' stroke='%23f6eddd' stroke-width='1' d='M5 4h26v14H5z'/%3E%3Cpath stroke='%23f6eddd' stroke-opacity='.55' d='M6 7h7m10 8h7'/%3E%3Ctext x='18' y='16' fill='%23f6eddd' font-family='Georgia' font-size='14' font-weight='700' text-anchor='middle'%3E%E2%82%AC%3C/text%3E%3C/svg%3E") !important;
}

.market-rate--kzt .market-rate__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 22'%3E%3Cpath fill='%231b6983' d='M3 1h30l2 2v16l-2 2H3l-2-2V3z'/%3E%3Cpath fill='none' stroke='%23e9f2ed' stroke-width='1' d='M5 4h26v14H5z'/%3E%3Cpath stroke='%23e9f2ed' stroke-opacity='.58' d='M6 7h7m10 8h7'/%3E%3Ctext x='18' y='16' fill='%23e9f2ed' font-family='Georgia' font-size='14' font-weight='700' text-anchor='middle'%3E%E2%82%B8%3C/text%3E%3C/svg%3E") !important;
}

.market-rate--byn .market-rate__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 22'%3E%3Cpath fill='%238a5a43' d='M3 1h30l2 2v16l-2 2H3l-2-2V3z'/%3E%3Cpath fill='none' stroke='%23f6eddd' stroke-width='1' d='M5 4h26v14H5z'/%3E%3Cpath stroke='%23f6eddd' stroke-opacity='.55' d='M6 7h7m10 8h7'/%3E%3Ctext x='18' y='15.5' fill='%23f6eddd' font-family='Georgia' font-size='11' font-weight='700' text-anchor='middle'%3EBr%3C/text%3E%3C/svg%3E") !important;
}

/* Import leaders use the same card treatment as every country; only the outline differs. */
.country-card.country-card--top.country-card--leader {
  background: #fffdf8 !important;
  border-color: #df725f !important;
  color: #435158 !important;
  box-shadow: none !important;
}

.country-card.country-card--leader span,
.country-card.country-card--leader strong {
  color: inherit !important;
}

.country-card.country-card--leader .country-card__badge {
  display: none !important;
}

.country-card.country-card--leader:hover {
  background: #fffdf8 !important;
  border-color: #bd3b2d !important;
  color: #26383f !important;
}
