/* ==========================================================================
   TregAuto — стили
   Светлая/тёмная тема, мобильный приоритет
   ========================================================================== */

:root {
  --bg: #f3f1ec;
  --text: #12243a;
  --muted: #5c6b7a;
  --panel: #ffffff;
  --panel-2: #f7f5f0;
  --border: #d9d4c8;

  --accent: #1b4f8a;
  --accent-600: #163e70;
  --accent-700: #102f56;
  --accent-soft: rgba(27, 79, 138, 0.1);
  --link: #1b4f8a;
  --navy: #16345c;
  --navy-deep: #0e243f;
  --asia-cn: #c41e3a;
  --asia-kr: #1b4f8a;
  --asia-jp: #bc002d;

  --asphalt: #16345c;
  --asphalt-2: #1c406e;

  --header-utility: 36px;
  --header-main: 68px;
  --header-h: calc(var(--header-utility) + var(--header-main));

  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 8px 28px rgba(14, 36, 63, 0.08);
  --shadow-strong: 0 18px 40px rgba(14, 36, 63, 0.16);
}

.theme-dark {
  --bg: #0c1a2c;
  --text: #e8eef5;
  --muted: #b4c6d8;
  --panel: #17344f;
  --panel-2: #1e4264;
  --border: #4a6d91;
  --accent-soft: rgba(142, 184, 232, 0.2);
  --link: #8ec0ef;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 18px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

html, body {
  margin: 0;
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

body {
  padding-top: var(--header-h);
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.25s ease, color 0.25s ease, padding-top 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

body.header-compact {
  --header-utility: 0px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-moz-selection {
  background: var(--accent);
  color: #fff;
}

/* Плавный переход между страницами (Chrome / Edge / Safari) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: ease;
}

img { max-width: 100%; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Шапка — два яруса: девиз / основная полоса
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: box-shadow 0.35s ease;
}

.site-header.is-compact {
  --header-utility: 0px;
  box-shadow: 0 8px 24px rgba(14, 36, 63, 0.12);
}

.header-utility {
  height: var(--header-utility);
  overflow: hidden;
  background: var(--bg);
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  transition: height 0.35s ease;
}

.header-utility-inner {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-lead {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.header-asia {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  flex-shrink: 0;
  font-family: "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Malgun Gothic", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy);
}

.header-asia span {
  padding: 0 10px;
}

.header-asia span + span {
  border-left: 1px solid var(--border);
}

.header-motto {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-phone-text {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  letter-spacing: 0.02em;
}

.header-phone-text:hover { color: var(--link); }

.header-main {
  height: var(--header-main);
  background: var(--navy);
}

.theme-dark .header-utility { background: var(--navy-deep); border-bottom-color: var(--border); }
.theme-dark .header-phone-text { color: #e8eef5; }
.theme-dark .header-asia { color: #e8eef5; }

.header-wrap {
  height: var(--header-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: #f7f5f0;
  padding: 5px 10px;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}

.desktop-nav-item {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}

.desktop-nav-item + .desktop-nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%);
}

.desktop-nav-item:hover {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-phone,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-phone { display: none; }

.header-phone:hover,
.header-cta:hover {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
  transform: none;
  box-shadow: none;
}

.header-phone svg { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 0;
  color: var(--navy);
  cursor: pointer;
  font-family: inherit;
}

.menu-toggle-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.menu-toggle-plus {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
  transition: transform 0.35s ease;
}

.menu-toggle-plus::before,
.menu-toggle-plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  left: 50%;
  top: 50%;
}

.menu-toggle-plus::before {
  width: 14px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.menu-toggle-plus::after {
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
}

body.menu-open .menu-toggle-plus,
.menu-toggle--close .menu-toggle-plus {
  transform: rotate(45deg);
}

/* ==========================================================================
   Полноэкранное меню
   ========================================================================== */

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 36, 63, 0.35);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  background: var(--navy-deep);
  color: #fff;
  border: 0;
  z-index: 1600;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}

.side-menu.open { clip-path: inset(0 0 0 0); }

.menu-header {
  padding: 18px 24px;
  min-height: var(--header-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.menu-logo {
  height: 44px;
  width: auto;
  background: #f7f5f0;
  padding: 5px 10px;
}

.menu-header .menu-toggle {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.menu-nav {
  flex: 1;
  min-height: 0;
  padding: 28px 8vw;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 4px;
}

.menu-nav-item {
  display: block;
  padding: 10px 0;
  color: #fff;
  text-decoration: none;
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 3.4vw, 30px);
  letter-spacing: -0.03em;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, padding-left 0.25s ease;
}

.menu-nav-item:hover {
  background: none;
  color: #9ec4ea;
  padding-left: 12px;
}

.menu-footer {
  padding: 20px 8vw 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas:
    "phone call theme"
    "socials socials socials";
  gap: 16px 12px;
  align-items: center;
  flex-shrink: 0;
  background: var(--navy-deep);
}

.menu-phone { grid-area: phone; }

.menu-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-phone:hover { border: 0; }

.menu-phone-num {
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}

.menu-phone-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.menu-socials {
  display: flex;
  gap: 8px;
  grid-area: socials;
}

.menu-action {
  width: auto;
  grid-area: call;
  justify-self: end;
  padding: 12px 16px;
  background: #fff;
  border: 0;
  border-radius: 0;
  color: var(--navy);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.menu-action:hover {
  background: #d7e4f2;
  border: 0;
}

.menu-action svg { display: none; }

.menu-theme-toggle {
  grid-area: theme;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.menu-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-theme-label { font-weight: 600; }

.toggle-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ffcc00 0%, #ffd54d 60%, #f0f0f0 60%, #f0f0f0 100%);
  box-shadow: inset -5px -5px 8px rgba(0, 0, 0, 0.12);
}


body.menu-open { overflow: hidden; }

@media (max-width: 720px) {
  .header-cta { display: none; }

  .menu-footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "phone"
      "socials"
      "call"
      "theme";
  }

  .menu-action,
  .menu-theme-toggle { justify-self: start; }
}

.menu-header .menu-toggle-label { color: inherit; }

.theme-dark .toggle-icon {
  background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.9) 20%, transparent 21%), #1f2430;
  box-shadow: inset -5px -5px 8px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Соцсети (общий стиль для меню и подвала)
   ========================================================================== */

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

span.social-link {
  cursor: default;
}

span.social-link:hover { transform: none; }

.social-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.social-link:hover { transform: none; }

.social-link.whatsapp:hover { color: #25d366; border-color: #25d366; }
.social-link.telegram:hover { color: #229ed9; border-color: #229ed9; }
.social-link.youtube:hover { color: #ff0000; border-color: #ff0000; }
.social-link.max:hover { border-color: #8f4bd8; }

.max-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  /* перекрашиваем png в серый, совпадающий с цветом остальных иконок */
  filter: brightness(0) invert(0.42);
  transition: filter 0.2s ease;
}

.theme-dark .max-icon {
  filter: brightness(0) invert(0.63);
}

/* при наведении логотип красится в фирменный фиолетовый вместе с рамкой */
.social-link.max:hover .max-icon,
.theme-dark .social-link.max:hover .max-icon {
  filter: brightness(0) saturate(100%) invert(40%) sepia(60%) saturate(2200%) hue-rotate(246deg) brightness(96%) contrast(95%);
}

/* ==========================================================================
   Кнопки
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: none;
  box-shadow: none;
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-600); }

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline-accent:hover {
  background: var(--accent-soft);
  color: var(--accent-600);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.btn-ghost:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.theme-dark .btn-ghost {
  color: #e8eef5;
  border-color: rgba(232, 238, 245, 0.5);
}

.theme-dark .btn-ghost:hover,
.theme-dark .hero .btn-ghost:hover {
  background: #e8eef5;
  color: var(--navy-deep);
  border-color: #e8eef5;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  padding: 48px 0 56px;
  color: var(--text);
  background-color: var(--bg);
  overflow: hidden;
}

.hero-bg { display: none; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(520px 420px at calc(100% - 160px) 80px, rgba(27, 79, 138, 0.16), rgba(27, 79, 138, 0) 70%),
    linear-gradient(180deg, #e7eef6 0, #e7eef6 140px, var(--bg) 280px);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: 0 0;
  background-attachment: scroll;
}

.theme-dark .hero::before {
  background-color: #0c1a2c;
  background-image:
    radial-gradient(560px 440px at calc(100% - 160px) 70px, rgba(90, 149, 214, 0.22), rgba(12, 26, 44, 0) 72%),
    linear-gradient(180deg, #173454 0, #132c46 160px, #0c1a2c 420px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-color: var(--navy);
  opacity: 0.05;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='36' viewBox='0 0 72 36'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.25'%3E%3Cpath d='M0 36a36 36 0 0 1 72 0'/%3E%3Cpath d='M12 36a24 24 0 0 1 48 0'/%3E%3Cpath d='M24 36a12 12 0 0 1 24 0'/%3E%3Cpath d='M-36 36a36 36 0 0 1 72 0'/%3E%3Cpath d='M-24 36a24 24 0 0 1 48 0'/%3E%3Cpath d='M-12 36a12 12 0 0 1 24 0'/%3E%3Cpath d='M36 36a36 36 0 0 1 72 0'/%3E%3Cpath d='M48 36a24 24 0 0 1 48 0'/%3E%3Cpath d='M60 36a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='36' viewBox='0 0 72 36'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.25'%3E%3Cpath d='M0 36a36 36 0 0 1 72 0'/%3E%3Cpath d='M12 36a24 24 0 0 1 48 0'/%3E%3Cpath d='M24 36a12 12 0 0 1 24 0'/%3E%3Cpath d='M-36 36a36 36 0 0 1 72 0'/%3E%3Cpath d='M-24 36a24 24 0 0 1 48 0'/%3E%3Cpath d='M-12 36a12 12 0 0 1 24 0'/%3E%3Cpath d='M36 36a36 36 0 0 1 72 0'/%3E%3Cpath d='M48 36a24 24 0 0 1 48 0'/%3E%3Cpath d='M60 36a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-size: 72px 36px;
  mask-size: 72px 36px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

.theme-dark .hero::after {
  background-color: #e8eef5;
  opacity: 0.05;
}

.hero-asia-vert {
  display: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content { max-width: 640px; }

.asia-script {
  font-family: "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Malgun Gothic", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}

.asia-rail {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 28px;
  width: max-content;
  max-width: 100%;
}

.asia-rail li {
  position: relative;
  padding-top: 10px;
}

.asia-rail li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 3px;
}

.asia-rail .asia-cn::before { background: var(--asia-cn); }
.asia-rail .asia-kr::before { background: var(--asia-kr); }
.asia-rail .asia-jp::before { background: var(--asia-jp); }

.asia-rail .asia-script {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
  color: var(--navy);
}

.asia-rail b {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-dark .asia-rail .asia-script { color: #e8eef5; }

.hero-content h1 {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 40px;
  line-height: 1.16;
  margin: 0 0 16px;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.theme-dark .hero-content h1 { color: #e8eef5; }

.hero-lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.theme-dark .hero .btn-ghost {
  color: #e8eef5;
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 0;
}

.hero-logo-panel img {
  width: min(380px, 100%);
  height: auto;
}

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 16px 4px 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--navy);
  background: none;
}

.hero-facts li {
  padding: 0 14px 0 0;
  border: 0;
}

.hero-facts li + li {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.hero-facts span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-facts strong {
  display: block;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy);
  white-space: nowrap;
}

.theme-dark .hero-facts {
  border-top-color: rgba(232, 238, 245, 0.28);
}

.theme-dark .hero-facts strong { color: #e8eef5; }

/* ==========================================================================
   Секции
   ========================================================================== */

/* Чередование фонов */

/* Чередование фонов: светлая секция → секция на панельном фоне → светлая … */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.section.alt {
  background: var(--panel);
}

.section h2 {
  margin: 0 0 14px;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 30px;
  line-height: 1.25;
  text-align: center;
  font-weight: 600;
}

/* Синий штрих под заголовком */
.section h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 0;
  background: var(--accent);
}

.theme-dark .section h2::after {
  background: var(--link);
}

.section > .container > p {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}

.section p {
  margin: 0 0 12px;
  color: var(--muted);
}

/* ==========================================================================
   Карточки преимуществ
   ========================================================================== */

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 32px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.section.alt .card { background: var(--panel-2); }

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(27, 79, 138, 0.3);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 6px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.theme-dark .card-icon {
  background: rgba(142, 184, 232, 0.18);
  color: #c5daf0;
}

.card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  font-size: 15px;
}

/* ==========================================================================
   Этапы работы
   ========================================================================== */

.timeline {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 32px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 20px 64px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.step-num {
  position: absolute;
  left: 18px;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.step p {
  margin: 0;
  font-size: 14px;
}

/* ==========================================================================
   Расчёт стоимости — список рынков
   ========================================================================== */

.calc-markets {
  display: grid;
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid var(--navy);
}

.calc-market {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 12px 22px 8px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  outline: none;
  transition:
    background 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.calc-market::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--navy);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.calc-market:hover,
.calc-market:focus-visible {
  background: rgba(22, 52, 92, 0.06);
  transform: translateX(10px);
}

.calc-market:hover::before,
.calc-market:focus-visible::before {
  transform: scaleY(1);
}

.calc-market-index {
  font-family: "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Malgun Gothic", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy);
}

.theme-dark .calc-market-index { color: #e8eef5; }

.theme-dark .calc-market-copy h3,
.theme-dark .calc-market-go {
  color: #e8eef5;
}

.theme-dark .calc-market-go {
  border-bottom-color: #e8eef5;
}

.theme-dark .calc-market::before {
  background: #e8eef5;
}

.theme-dark .calc-market:hover,
.theme-dark .calc-market:focus-visible {
  background: rgba(232, 238, 245, 0.06);
}

.calc-market-copy h3 {
  margin: 0 0 4px;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--navy);
}

.calc-market-copy p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.calc-market-go {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--navy);
  padding-bottom: 2px;
  margin-right: 18px;
  white-space: nowrap;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.calc-market:hover .calc-market-go,
.calc-market:focus-visible .calc-market-go {
  transform: translateX(6px);
}

html.js .section-anim:not(.visible) .calc-market {
  clip-path: inset(0 48% 0 0);
  opacity: 0;
}

html.js .section-anim.visible .calc-market {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transition:
    clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.7s ease,
    background 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .section-anim.visible .calc-market:nth-child(2) { transition-delay: 0.1s; }
html.js .section-anim.visible .calc-market:nth-child(3) { transition-delay: 0.2s; }

/* ==========================================================================
   Сроки поставок — таблица маршрутов
   ========================================================================== */

.delivery-table {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--navy);
}

.delivery-table li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.delivery-code {
  font-family: "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Malgun Gothic", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy);
}

.theme-dark .delivery-code { color: #e8eef5; }

.theme-dark .delivery-copy h3,
.theme-dark .delivery-range strong {
  color: #e8eef5;
}

.theme-dark .delivery-table,
.theme-dark .calc-markets,
.theme-dark .terms-list {
  border-top-color: rgba(232, 238, 245, 0.28);
}

.delivery-copy h3 {
  margin: 0 0 2px;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--navy);
}

.delivery-copy p {
  margin: 0;
  font-size: 14px;
}

.delivery-range {
  margin: 0;
  text-align: right;
  padding-right: 28px;
  color: var(--muted);
  font-size: 14px;
}

.delivery-range strong {
  display: block;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1;
  color: var(--navy);
}

html.js .section-anim:not(.visible) .delivery-table li {
  clip-path: inset(0 40% 0 0);
  opacity: 0;
}

html.js .section-anim.visible .delivery-table li {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transition: clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s ease;
}

html.js .section-anim.visible .delivery-table li:nth-child(2) { transition-delay: 0.1s; }
html.js .section-anim.visible .delivery-table li:nth-child(3) { transition-delay: 0.2s; }

/* ==========================================================================
   Б/у запчасти из Кореи
   ========================================================================== */

.parts-section {
  background: var(--panel);
  border-top: 4px solid var(--accent);
  color: var(--text);
}

.parts-banner {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.parts-banner-text {
  text-align: left;
}

.parts-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(27, 79, 138, 0.28);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.parts-section h2 {
  color: var(--text);
  text-align: left;
}

.parts-section h2::after {
  margin: 14px 0 0;
}

.parts-banner-text p {
  max-width: 560px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 17px;
}

.parts-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-dialog.parts-how-dialog {
  max-width: 560px;
  max-height: min(90dvh, 720px);
  padding: 28px 24px 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.parts-how-dialog h3 {
  margin: 0 36px 6px 0;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
}

.parts-how-dialog .modal-sub {
  margin: 0 36px 0 0;
  text-align: left;
}

.parts-how-steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 4px 6px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.parts-how-steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.parts-how-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.parts-how-steps strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 16px;
  color: var(--text);
}

.parts-how-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.parts-highlights {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.parts-highlights li {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.parts-highlights li:last-child {
  border-bottom: none;
}

.parts-highlights strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
}

.parts-highlights span {
  color: var(--muted);
  font-size: 14px;
}

.theme-dark .parts-section {
  background: #12141a;
  color: #fff;
}

.theme-dark .parts-section h2 {
  color: #fff;
}

.theme-dark .parts-banner-text p {
  color: rgba(255, 255, 255, 0.74);
}

.theme-dark .parts-badge {
  background: rgba(27, 79, 138, 0.18);
  border-color: rgba(27, 79, 138, 0.45);
  color: #fff;
}

.theme-dark .parts-highlights {
  background: #1b1e24;
  border-color: rgba(255, 255, 255, 0.14);
}

.theme-dark .parts-highlights li {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .parts-highlights strong {
  color: #fff;
}

.theme-dark .parts-highlights span {
  color: rgba(255, 255, 255, 0.68);
}

.theme-dark .btn-outline-accent {
  color: #fff;
}

.theme-dark .btn-outline-accent:hover {
  background: rgba(27, 79, 138, 0.14);
  color: #fff;
}

/* ==========================================================================
   О компании
   ========================================================================== */

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
  margin-top: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.about-split article {
  padding: 32px 36px;
}

.about-split article + article {
  border-left: 1px solid var(--border);
}

.about-split .asia-mark {
  display: inline-block;
  margin: 0 0 12px;
  padding-top: 10px;
  font-size: 26px;
  color: var(--navy);
}

.about-split .asia-cn { box-shadow: inset 0 3px 0 var(--asia-cn); }
.about-split .asia-kr { box-shadow: inset 0 3px 0 var(--asia-kr); }
.about-split .asia-jp { box-shadow: inset 0 3px 0 var(--asia-jp); }

.about-split h3 {
  margin: 0 0 12px;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--navy);
}

.about-split p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.theme-dark .about-split .asia-mark,
.theme-dark .about-split h3 { color: #e8eef5; }

/* ==========================================================================
   Офис и карта
   ========================================================================== */

/* Ширина карточки офиса подстраивается под содержимое (самая длинная строка —
   примечание о встрече), карта занимает всё остальное место */
.map-wrap {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 16px;
  align-items: stretch;
  margin-top: 8px;
}

.map {
  width: 100%;
  min-height: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.map iframe,
.map > ymaps,
.map > div {
  display: block;
  width: 100% !important;
  height: 400px !important;
  border: 0;
}

.map-info {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
}

.map-info h3 {
  margin: 0 0 14px;
  text-align: center;
}

.map-info p {
  margin: 0 0 10px;
  font-size: 15px;
  text-align: left;
}

.office-address {
  display: block;
  font-style: normal;
  line-height: 1.45;
}

.office-address strong {
  display: block;
  margin-bottom: 4px;
}

#deal {
  font-size: 12px;
  margin-top: auto;
  white-space: normal;
}

.map-info .callback-open {
  width: 100%;
  margin-top: 12px;
}

/* ==========================================================================
   Подвал
   ========================================================================== */

.site-footer {
  margin-top: 0;
  background: #efebe3;
  color: var(--navy);
  padding: 0;
  border-top: 0;
}

.footer-band {
  background: var(--navy);
  color: #fff;
  padding: 28px 0;
}

.footer-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-band p {
  margin: 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  max-width: 640px;
}

.footer-band .btn {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
  margin-right: 28px;
}

.footer-band .btn:hover {
  background: #d7e4f2;
}

.footer-body {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.9fr;
  gap: 32px;
  padding: 36px 0 28px;
  align-items: start;
}

.footer-logo {
  height: 86px;
  width: auto;
  background: none;
  padding: 0;
}

.footer-brand p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 280px;
}

.footer-asia {
  display: flex;
  gap: 0;
  margin: 10px 0 0;
  max-width: none;
  font-family: "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Malgun Gothic", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--navy);
}

.footer-asia span {
  padding: 0 12px 0 0;
}

.footer-asia span + span {
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

.theme-dark .site-footer {
  --muted: #5c6b7a;
  --border: #d9d4c8;
  --text: #12243a;
}

.theme-dark .footer-asia {
  color: var(--navy);
}

.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.site-footer .social-link {
  background: #fff;
  border-color: var(--border);
  color: var(--navy);
  border-radius: 0;
}

.site-footer .max-icon {
  filter: none;
}

.footer-title {
  display: block;
  flex: 1 0 100%;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-nav a,
.footer-contacts a {
  display: inline;
  margin: 0;
  color: var(--navy);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid transparent;
}

.footer-nav a:hover,
.footer-contacts a:hover {
  border-bottom-color: var(--navy);
}

.footer-phone {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  background: none;
  border: none;
  color: var(--navy);
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
}

.footer-phone:hover { color: var(--accent); }

.footer-contacts p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.footer-legal,
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 0 22px;
  border-top: 1px solid var(--border);
}

.footer-legal p,
.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-legal a,
.footer-bottom a {
  color: var(--navy);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid var(--navy);
}

.footer-grid {
  display: contents;
}

/* ==========================================================================
   Тост и кнопка "наверх"
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 11000;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 11000;
}

#toast-container .toast {
  position: static;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.scroll-top {
  position: fixed;
  right: 0;
  top: 58%;
  z-index: 900;
  margin: 0;
  padding: 16px 9px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: var(--navy);
  color: #fff;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  cursor: pointer;
  opacity: 1;
  transform: translateX(110%);
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}

.scroll-top.show {
  transform: translateX(0);
  pointer-events: auto;
}

.scroll-top:hover { background: var(--accent); }

/* ==========================================================================
   Анимации появления
   ========================================================================== */

.section-anim {
  opacity: 1;
}

html.js .section-anim:not(.visible) {
  clip-path: inset(12% 0 12% 0);
  filter: blur(10px);
  transform: none;
}

html.js .hero.section-anim:not(.visible) {
  clip-path: none;
  filter: none;
}

html.js .section-anim.visible {
  clip-path: inset(0 0 0 0);
  filter: blur(0);
  transform: none;
  transition: clip-path 0.85s cubic-bezier(0.22, 1, 0.36, 1), filter 0.85s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .section-anim:not(.visible),
  .section-anim,
  html.js .section-anim:not(.visible) .delivery-table li,
  html.js .section-anim:not(.visible) .calc-market,
  html.js .section-anim:not(.visible) .terms-item,
  html.js .section-anim.visible .delivery-table li,
  html.js .section-anim.visible .calc-market,
  html.js .section-anim.visible .terms-item {
    clip-path: none;
    filter: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .side-menu,
  .scroll-top,
  .header-utility {
    transition: none;
  }
}

/* ==========================================================================
   Модальное окно
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.6);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  padding: 28px 24px;
  transform: translateY(16px);
  transition: transform 0.3s ease;
}

.modal.show .modal-dialog { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  color: var(--navy);
}

.theme-dark .modal-close {
  color: #e8eef5;
}

.modal-close:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.theme-dark .modal-close:hover {
  border-color: #e8eef5;
  background: #e8eef5;
  color: var(--navy-deep);
}

.modal-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 0;
}

.modal-close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.modal-close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }

#callbackModal h3 {
  margin: 0 0 6px;
  font-weight: 700;
  text-align: center;
  font-size: 22px;
}

.modal-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 15px;
}

/* Форма */
.form-row { margin-bottom: 14px; }

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.form-row input:not([type="checkbox"]) {
  width: 100%;
  height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.15);
}

.form-row.consent { margin-top: 4px; }

.form-row.consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.form-row.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.privacy-link {
  color: var(--link);
  text-decoration: underline;
}

.privacy-link:hover { color: var(--accent-600); }

.theme-dark .privacy-link:hover { color: #c5daf0; }

.form-actions {
  margin-top: 16px;
}

.form-actions .btn { width: 100%; }

.form-note {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin: 12px 0 0;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */

/* Десктоп: показываем навигацию в шапке */
@media (min-width: 1000px) {
  :root { --header-main: 72px; }

  .desktop-nav { display: flex; }

  .desktop-nav-item {
    padding: 8px 8px;
    font-size: 12px;
  }

  .brand-logo { height: 48px; }
}

@media (min-width: 1280px) {
  .hero-asia-vert { display: none; }
}

@media (min-width: 1180px) {
  .desktop-nav-item {
    padding: 8px 10px;
    font-size: 14px;
  }
}

/* Планшеты */
@media (max-width: 1100px) {
  .cards,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }

  .hero-content { max-width: none; }

  .hero::after {
    opacity: 0.03;
  }

  .hero-aside { max-width: 520px; margin: 0 auto; }

  .calc-market {
    grid-template-columns: 56px 1fr;
  }

  .calc-market-go {
    grid-column: 2;
  }

  .parts-banner { grid-template-columns: 1fr; }

  .about-split {
    grid-template-columns: 1fr;
  }

  .about-split article + article {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .map-wrap { grid-template-columns: 1fr; }

  .footer-body {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand { grid-column: 1 / -1; }
}

/* Мобильные */
@media (max-width: 600px) {
  :root {
    --header-utility: 0px;
    --header-main: 52px;
  }

  .container { padding: 0 16px; }

  .header-utility { display: none; }

  .brand { padding: 3px 8px; }

  .brand-logo { height: 30px; }

  .header-phone {
    display: inline-flex;
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    letter-spacing: 0.02em;
  }

  .header-cta { display: none; }

  .header-actions { gap: 6px; }

  .header-actions .menu-toggle-label { display: none; }

  .header-actions .menu-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    flex-shrink: 0;
    justify-content: center;
  }

  .hero { padding: 28px 0 40px; }

  .hero-content { text-align: center; }

  .asia-rail {
    margin-left: auto;
    margin-right: auto;
    gap: 18px;
  }

  .asia-rail .asia-script { font-size: 18px; }

  .hero-content h1 { font-size: 28px; }

  .hero-lead { font-size: 15px; }

  .cta-row { justify-content: center; }

  .cta-row .btn {
    width: 100%;
    max-width: 340px;
  }

  .hero-aside {
    margin: 0 auto;
    padding: 0;
    width: 100%;
  }

  .hero-facts strong { font-size: 16px; }

  .section { padding: 44px 0; }

  .section h2 { font-size: 25px; }

  .parts-banner-text,
  .parts-section h2 {
    text-align: center;
  }

  .parts-section h2::after {
    margin-left: auto;
    margin-right: auto;
  }

  .parts-banner-text p {
    margin-left: auto;
    margin-right: auto;
    font-size: 15px;
  }

  .parts-cta {
    justify-content: center;
  }

  .parts-cta .btn {
    width: 100%;
    max-width: 340px;
  }

  .about-split article {
    padding: 24px 22px;
  }

  .cards,
  .timeline {
    grid-template-columns: 1fr;
  }

  .delivery-table li,
  .calc-market {
    grid-template-columns: 56px 1fr;
    gap: 12px;
  }

  .delivery-range {
    grid-column: 2;
    text-align: left;
  }

  .terms-list {
    grid-template-columns: 1fr;
  }

  .map { min-height: 260px; }

  /* На узких экранах примечанию о встрече разрешаем перенос строки */
  #deal { white-space: normal; font-size: 10px; margin-bottom: auto; }

  .footer-body {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-band-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal,
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .scroll-top {
    padding: 12px 7px;
    font-size: 10px;
  }

  .modal-dialog { padding: 24px 18px; }
}

@media (max-width: 380px) {
  .hero-content h1 { font-size: 26px; }

  .side-menu { max-width: 100%; }
}

/* ==========================================================================
   Второстепенные страницы (403, 404, 418, политика)
   ========================================================================== */

body.page-secondary {
  padding-top: var(--header-h);
}

.subpage-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease, background-color 0.25s ease;
}

.theme-dark .subpage-top {
  background: rgba(14, 15, 18, 0.85);
}

.subpage-top.hide-on-scroll { transform: translateY(-100%); }
.subpage-top.header-visible { transform: translateY(0); }

.subpage-top-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Логотип наследует размеры .brand-logo с главной страницы */

.btn-sm {
  padding: 10px 16px;
  font-size: 14px;
}

/* Страницы ошибок */
.error-page {
  padding: 64px 0 72px;
  background: var(--bg);
}

.error-box {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 32px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.error-scene {
  margin: 0 0 8px;
  font-size: 88px;
  line-height: 1;
}

.error-code {
  margin: 0 0 4px;
  font-size: 132px;
  font-weight: 700;
  line-height: 0.95;
  color: var(--muted);
  letter-spacing: -0.03em;
}

.error-box:has(.error-scene) .error-code {
  margin-top: 4px;
  font-size: 72px;
}

.error-box h2 {
  margin: 12px 0 14px;
  font-size: 28px;
}

.error-box p:not(.error-code) {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

/* Политика конфиденциальности */
.policy-page {
  padding: 48px 0 64px;
  background: var(--bg);
}

.policy-wrap h1 {
  margin: 0 0 32px;
  font-size: 30px;
  line-height: 1.25;
  text-align: center;
  color: var(--text);
}

.policy-wrap h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: var(--accent);
}

.theme-dark .policy-wrap h1::after {
  background: var(--link);
}

.policy-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.policy-block h2 {
  margin: 0 0 14px;
  font-size: 20px;
  color: var(--text);
}

.policy-block p,
.policy-block li {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.policy-block p:last-child,
.policy-block li:last-child {
  margin-bottom: 0;
}

.policy-block ul {
  margin: 0 0 10px 20px;
  padding: 0;
}

@media (max-width: 600px) {
  .error-page { padding: 40px 0 56px; }

  .error-box {
    padding: 36px 20px;
  }

  .error-code { font-size: 100px; }

  .error-scene { font-size: 72px; }

  .error-box:has(.error-scene) .error-code { font-size: 56px; }

  .error-box h2 { font-size: 22px; }

  .policy-wrap h1 { font-size: 24px; }

  .policy-block {
    padding: 18px 16px;
  }
}

/* ==========================================================================
   Условия и гарантии
   ========================================================================== */

.terms-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  counter-reset: term;
  border-top: 1px solid var(--navy);
}

.terms-item {
  counter-increment: term;
  padding: 24px 0 22px;
  border-bottom: 1px solid var(--border);
}

.terms-item h3 {
  margin: 0 0 8px;
  padding-left: 36px;
  position: relative;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--navy);
}

.terms-item h3::before {
  content: counter(term, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.theme-dark .terms-item h3 {
  color: #e8eef5;
}

.terms-item p {
  margin: 0;
  padding-left: 36px;
  font-size: 15px;
  line-height: 1.65;
}

html.js .section-anim:not(.visible) .terms-item {
  clip-path: inset(0 0 80% 0);
  opacity: 0;
}

html.js .section-anim.visible .terms-item {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transition: clip-path 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.65s ease;
}

html.js .section-anim.visible .terms-item:nth-child(2) { transition-delay: 0.06s; }
html.js .section-anim.visible .terms-item:nth-child(3) { transition-delay: 0.12s; }
html.js .section-anim.visible .terms-item:nth-child(4) { transition-delay: 0.18s; }
html.js .section-anim.visible .terms-item:nth-child(5) { transition-delay: 0.24s; }
html.js .section-anim.visible .terms-item:nth-child(6) { transition-delay: 0.3s; }

/* ==========================================================================
   Отзывы
   ========================================================================== */

.reviews-carousel {
  position: relative;
  margin-top: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.reviews-viewport {
  overflow: hidden;
  width: 100%;
  /* запас под hover: подъём карточки и тень */
  padding: 10px 4px 22px;
  margin: -10px -4px -22px;
}

.reviews-track {
  display: flex;
  gap: 16px;
  will-change: transform;
}

.reviews-slide {
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 0;
}

.reviews-nav {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.reviews-nav:hover {
  border-color: var(--link);
  color: var(--link);
  background: var(--accent-soft);
}

.reviews-nav svg {
  width: 20px;
  height: 20px;
}

.review-card {
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.section.alt .review-card,
.reviews-page .review-card {
  background: var(--panel-2);
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(27, 79, 138, 0.28);
}

.review-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.review-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.review-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.review-card-info {
  flex: 1;
  min-width: 0;
}

.review-photo-wrap {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.review-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-date {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.review-name {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.review-car {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.review-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Контраст текста отзывов на главной и на странице */
.theme-light #reviews > .container > p,
.theme-light #reviews .review-car,
.theme-light #reviews .review-text {
  color: #3a414d;
}

.theme-light #reviews .review-name {
  color: #12141a;
}

.theme-dark #reviews > .container > p,
.theme-dark #reviews .review-car,
.theme-dark #reviews .review-text,
.theme-dark .reviews-page .review-car,
.theme-dark .reviews-page .review-text,
.theme-dark .reviews-page-intro,
.theme-dark .review-date,
.theme-dark #reviewModalDate {
  color: #c5d4e4;
}

.theme-dark #reviews .review-name,
.theme-dark .reviews-page .review-name,
.theme-dark .review-modal-meta .review-name {
  color: #f4f6f8;
}

.theme-dark .review-card,
.theme-dark .reviews-page .review-card {
  background: var(--panel-2);
  border-color: var(--border);
}

.theme-dark .review-photo-wrap,
.theme-dark .review-modal-photo-wrap {
  background: #d7e4f2;
  border: 1px solid var(--border);
}

.theme-dark .reviews-page h1::after {
  background: var(--link);
}

.theme-dark .reviews-nav {
  background: var(--panel-2);
  color: var(--text);
}

.reviews-actions {
  margin-top: 28px;
  text-align: center;
}

.reviews-page .reviews-actions {
  margin-top: 36px;
}

.reviews-error {
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
}

/* Модалка отзыва */
#reviewModal .modal-dialog {
  max-width: 560px;
  max-height: min(90vh, 900px);
  padding: 0;
  overflow: hidden;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
}

#reviewModal .modal-close {
  z-index: 2;
  background: var(--panel-2);
}

.theme-dark #reviewModal .modal-dialog,
.theme-dark #reviewModal .modal-close,
.theme-dark #reviewModal .review-modal-body {
  background: var(--panel-2);
}

.review-modal-photo-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 36vh;
  background: var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.review-modal-photo-wrap[hidden] {
  display: none !important;
}

.review-modal-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.review-modal-meta,
#reviewModalDate {
  flex-shrink: 0;
}

.review-modal-meta .review-name {
  font-size: 18px;
}

#reviewModalDate {
  display: block;
  margin: 8px 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.review-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0 0 18px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#reviewModalText {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.review-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.review-source-link:hover {
  color: var(--accent-600);
  text-decoration: underline;
}

.theme-dark .review-source-link:hover {
  color: #c5daf0;
}

/* Страница всех отзывов */
body.theme-light:has(main.reviews-page) {
  background: var(--panel);
}

body.theme-light .reviews-page .review-card {
  background: #fff;
}

.reviews-page {
  padding: 40px 0 72px;
  animation: reviews-page-in 0.55s ease both;
}

@keyframes reviews-page-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reviews-grid .review-card {
  opacity: 0;
  transform: translateY(12px);
  animation: reviews-card-in 0.45s ease forwards;
}

.reviews-grid .review-card:nth-child(1) { animation-delay: 0.08s; }
.reviews-grid .review-card:nth-child(2) { animation-delay: 0.14s; }
.reviews-grid .review-card:nth-child(3) { animation-delay: 0.2s; }
.reviews-grid .review-card:nth-child(4) { animation-delay: 0.26s; }
.reviews-grid .review-card:nth-child(5) { animation-delay: 0.32s; }
.reviews-grid .review-card:nth-child(6) { animation-delay: 0.38s; }
.reviews-grid .review-card:nth-child(n+7) { animation-delay: 0.44s; }

@keyframes reviews-card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-page,
  .reviews-grid .review-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.reviews-page h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.25;
  text-align: center;
}

.reviews-page h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: var(--accent);
}

.reviews-page-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--muted);
}

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

@media (max-width: 980px) {
  .reviews-slide {
    flex: 0 0 calc((100% - 16px) / 2);
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .reviews-carousel {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    overflow: hidden;
  }

  .reviews-viewport {
    overflow: hidden;
  }

  .reviews-slide {
    flex: 0 0 82%;
  }

  .reviews-nav {
    width: 40px;
    height: 40px;
    z-index: 2;
  }

  /* Главная: компактнее фото в карточках отзывов */
  #reviews .review-card--has-photo .review-photo-wrap {
    width: 52px;
    height: 52px;
    border-radius: 10px;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .terms-list {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Калькуляторы (Япония / Корея)
   ========================================================================== */

.calc-check-row {
  margin-top: 4px;
}

/* выше специфичность, чем у .form-row label (display:block; margin-bottom) */
.calc-form .form-row.calc-check-row > label.calc-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: var(--text);
  cursor: pointer;
}

.calc-form .form-row.calc-check-row > label.calc-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  align-self: center;
  accent-color: var(--accent);
}

.calc-form .form-row.calc-check-row > label.calc-check > span {
  display: block;
  line-height: 1.2;
}

.calc-page {
  padding: 0 0 64px;
}

.calc-hero {
  background: var(--navy);
  color: #fff;
  padding: 32px 0 36px;
}

.calc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.calc-breadcrumb a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.calc-breadcrumb a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.calc-kicker {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.calc-kicker .asia-script {
  font-size: 22px;
  letter-spacing: 0.1em;
  text-transform: none;
  color: #fff;
}

.calc-page h1,
.calc-hero h1 {
  margin: 0 0 10px;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  color: #fff;
}

.calc-page-intro {
  margin: 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.72);
}

.calc-body {
  padding-top: 28px;
}

.calc-rates {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px 0;
  margin-bottom: 28px;
  padding: 0 0 18px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--navy);
  border-radius: 0;
}

.theme-dark .calc-rates {
  border-bottom-color: var(--border);
}

.calc-rate-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
  padding: 0 20px;
}

.calc-rate-item:first-child {
  padding-left: 0;
}

.calc-rate-item:not(:first-child) {
  border-left: 1px solid var(--border);
}

.calc-rate-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.calc-rate-item strong {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 18px;
  font-weight: 500;
}

.calc-rate-date {
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 560px) {
  .calc-rate-item:not(:first-child) {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    width: 100%;
  }

  .calc-rate-item {
    padding-right: 0;
  }
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 28px;
  align-items: start;
}

.calc-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.calc-form,
.calc-output {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--navy);
  border-radius: 0;
  padding: 22px 0 0;
}

.theme-dark .calc-form,
.theme-dark .calc-output {
  border-top-color: var(--border);
}

.calc-form select,
.calc-form input[type="number"] {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.theme-dark .calc-form select,
.theme-dark .calc-form input[type="number"] {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.theme-dark .calc-form select option {
  background: var(--panel);
  color: var(--text);
}

.theme-dark .calc-form input::placeholder {
  color: #8ea6bd;
  opacity: 1;
}

.calc-form select:focus,
.calc-form input[type="number"]:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: none;
}

.theme-dark .calc-form select:focus,
.theme-dark .calc-form input[type="number"]:focus {
  border-color: var(--link);
}

.calc-form select.is-invalid,
.calc-form input[type="number"].is-invalid {
  border-color: var(--accent);
  box-shadow: none;
  background: transparent;
}

.calc-form .form-row > label,
.calc-form .form-row > div > label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.calc-form-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-form-split > div {
  min-width: 0;
}

#calcVolumeRow.is-disabled {
  opacity: 0.55;
}

.calc-sanction {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #9a5b00;
}

.theme-dark .calc-sanction {
  background: rgba(245, 166, 35, 0.14);
  border-color: rgba(251, 191, 36, 0.35);
  color: #f6c96b;
}

.calc-sanction-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.calc-sanction-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.calc-sanction.is-expanded .calc-sanction-toggle:not(.calc-sanction-collapse) {
  display: none;
}

.calc-sanction-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  opacity: 0.85;
}

.calc-sanction-toggle:hover {
  opacity: 1;
}

.calc-sanction-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease, margin-top 0.28s ease;
}

.calc-sanction.is-expanded .calc-sanction-details {
  grid-template-rows: 1fr;
  margin-top: 8px;
}

.calc-sanction-details-inner {
  overflow: hidden;
  min-height: 0;
}

.calc-sanction-details p {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0.92;
}

.calc-sanction-collapse {
  display: inline-block;
}

.calc-empty {
  margin: 0;
  line-height: 1.5;
  min-height: 220px;
  display: flex;
  align-items: center;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
}

.theme-dark .calc-empty {
  color: #e8eef5;
}

.calc-empty[hidden] {
  display: none;
}

.calc-empty.is-error {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(27, 79, 138, 0.28);
  color: var(--accent-700);
  font-weight: 600;
}

.theme-dark .calc-empty.is-error {
  color: #ffb4b7;
}

.calc-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calc-block {
  margin: 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  overflow: visible;
}

.calc-block-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 0 8px;
  background: none;
  border: 0;
}

.calc-block-num {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  flex-shrink: 0;
}

.theme-dark .calc-block-num {
  background: none;
  color: var(--muted);
}

.calc-block-head h3 {
  margin: 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}

.calc-block-body {
  padding: 0 0 8px;
}

.calc-block-total {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 18px 20px;
  margin-top: 8px;
}

.theme-dark .calc-block-total {
  background: #24568a;
  border: 1px solid rgba(232, 238, 245, 0.22);
}

.calc-block-total .calc-block-head {
  background: transparent;
  border: 0;
  padding-top: 0;
}

.calc-block-total .calc-block-head h3 {
  font-size: 16px;
  color: #fff;
}

.theme-dark .calc-block-total .calc-block-head h3 {
  color: #fff;
}

.calc-block-total .calc-row {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.calc-block-total .calc-row-label,
.calc-block-total .calc-row-strong .calc-row-label,
.calc-block-total .calc-row-grand .calc-row-label,
.calc-block-total .calc-grand-amount,
.calc-block-total .calc-money,
.calc-block-total .calc-footnote,
.calc-block-total .calc-subnote {
  color: #fff;
}

.calc-block-total .calc-grand-usd {
  color: rgba(255, 255, 255, 0.72);
}

.calc-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.05fr) minmax(0, 1.2fr);
  gap: 8px 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.calc-row-with-note {
  align-items: start;
}

.calc-row-with-note .calc-subnote {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
}

.calc-row:last-of-type {
  border-bottom: none;
}

.calc-row-strong {
  margin-top: 2px;
  padding-top: 13px;
  border-top: 1px dashed var(--border);
  border-bottom: none;
  font-weight: 700;
}

.calc-row-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.calc-row-strong .calc-row-label {
  color: var(--text);
  font-size: 15px;
}

.calc-row-strong .calc-money {
  font-size: 15px;
}

.calc-money {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.calc-money-sep {
  color: var(--muted);
  font-weight: 400;
  opacity: 0.7;
}

.calc-money-part {
  white-space: nowrap;
}

.calc-row-grand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0 8px;
  border: none;
}

.calc-row-grand .calc-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.calc-grand-amount {
  display: block;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.calc-grand-usd {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.55em;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0;
  vertical-align: 0.08em;
}

.calc-subnote,
.calc-footnote {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.calc-footnote {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(27, 79, 138, 0.12);
}

.calc-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.theme-light .calc-page-actions .btn-ghost {
  color: var(--text);
  border-color: var(--asphalt);
}

.theme-light .calc-page-actions .btn-ghost:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.theme-dark .calc-page-actions .btn-ghost {
  color: #e8eef5;
  border-color: rgba(232, 238, 245, 0.5);
}

.theme-dark .calc-page-actions .btn-ghost:hover {
  background: #e8eef5;
  color: var(--navy-deep);
  border-color: #e8eef5;
}

@media (max-width: 900px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }

  .calc-row {
    grid-template-columns: 1fr;
  }

  .calc-money {
    justify-content: flex-start;
    text-align: left;
  }

  .calc-grand-amount {
    font-size: clamp(24px, 7vw, 32px);
  }
}

@media (max-width: 560px) {
  .calc-form-split {
    grid-template-columns: 1fr;
  }

  .calc-page-actions .btn {
    width: 100%;
    text-align: center;
  }
}
